From 861a0de6e7a703a867a9e0e3903db2d07ae7ba6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 10:32:34 +0000 Subject: [PATCH 001/213] decomp: name SDK rpc, tty, stdio and memory card fields Field names from the SIF RPC packet layout, the TTY handler's own error strings (ti->wlen), newlib's FILE and _reent, and the memory card RPC parameter blocks. init_moby_instance and process_menu_entry use the struct Moby / MobyClass names and name their menu entry fields. --- include/rnc/ui/vendor/vendor_capture.h | 4 +- src/mobys/init_moby_instance.c | 112 +++++++++--------- src/sdk/deci2/sce_tty_init.c | 54 ++++----- src/sdk/deci2/sce_tty_write.c | 64 +++++----- src/sdk/libc/stdio/sinit.c | 21 ++-- src/sdk/libc/stdio/sread.c | 18 +-- src/sdk/libc/stdio/std.c | 55 ++++----- src/sdk/rpc/rpc/get_rpc_packet.c | 12 +- src/sdk/rpc/rpc/request_bind.c | 44 +++---- src/sdk/rpc/rpc/request_rdata.c | 28 ++--- src/sdk/rpc/rpc/sce_sif_bind_rpc.c | 16 +-- src/sdk/storage/memory_card/sce_mc_chdir.c | 20 ++-- src/sdk/storage/memory_card/sce_mc_get_dir.c | 28 ++--- src/sdk/storage/memory_card/sce_mc_get_info.c | 30 ++--- src/ui/menus/system/process_menu_entry.c | 107 ++++++++--------- 15 files changed, 306 insertions(+), 307 deletions(-) diff --git a/include/rnc/ui/vendor/vendor_capture.h b/include/rnc/ui/vendor/vendor_capture.h index 07500ff3e1..98c6584b70 100644 --- a/include/rnc/ui/vendor/vendor_capture.h +++ b/include/rnc/ui/vendor/vendor_capture.h @@ -10,7 +10,9 @@ struct VendorItemPricing { u16 discounted_ammo_price; u16 pad0C; u16 ammo_capacity; - u8 pad10[8]; + u8 pad10[4]; + u16 gold_weapon_price; /* bolts; a gold weapon also costs 4 gold bolts (process_menu_entry) */ + u8 pad16[2]; }; struct CaptureBoundsAdjustment { diff --git a/src/mobys/init_moby_instance.c b/src/mobys/init_moby_instance.c index 49c3b98ded..68cd5a91d5 100644 --- a/src/mobys/init_moby_instance.c +++ b/src/mobys/init_moby_instance.c @@ -11,59 +11,59 @@ typedef struct { typedef struct { char pad00[6]; - unsigned char unk06; /* 0x06 */ + unsigned char metal_count; /* 0x06 */ char pad07[5]; - unsigned char unk0C; /* 0x0C */ + unsigned char seq_count; /* 0x0C */ char pad0D; - unsigned char unk0E; /* 0x0E */ - unsigned char unk0F; /* 0x0F */ - int unk10; /* 0x10 */ + unsigned char lod_trans; /* 0x0E */ + unsigned char shadow_count; /* 0x0F */ + int collision; /* 0x10 */ char pad14[0x10]; - float unk24; /* 0x24 */ + float scale; /* 0x24 */ char pad28[0x18]; - int unk40; /* 0x40 */ - unsigned short unk44; /* 0x44 */ + int glow_rgba; /* 0x40 */ + unsigned short flags; /* 0x44 */ char pad46[2]; MobyISeq *seq; /* 0x48 */ } MobyIClass; typedef struct { char pad00[0x21]; - unsigned char unk21; /* 0x21 */ + unsigned char group; /* 0x21 */ unsigned char oClass; /* 0x22 */ - unsigned char unk23; /* 0x23 */ + unsigned char alpha; /* 0x23 */ MobyIClass *pClass; /* 0x24 */ char pad28[4]; - float unk2C; /* 0x2C */ + float scale; /* 0x2C */ char pad30[4]; - unsigned short flags; /* 0x34 */ - unsigned short unk36; /* 0x36 */ - unsigned long unk38; /* 0x38 */ + unsigned short flags; /* 0x34 */ + unsigned short occlusion; /* 0x36 */ + unsigned long lights; /* 0x38 */ char pad40[0x18]; - float unk58; /* 0x58 */ - float unk5C; /* 0x5C */ + float anim_speed; /* 0x58 */ + float unk5C; /* 0x5C */ char pad60[0x11]; - unsigned char unk71; /* 0x71 */ - unsigned char unk72; /* 0x72 */ - unsigned char unk73; /* 0x73 */ - int unk74; /* 0x74 */ + unsigned char unk71; /* 0x71 */ + unsigned char lod_dist; /* 0x72 */ + unsigned char metal_alpha; /* 0x73 */ + int update; /* 0x74 */ char pad78[4]; - unsigned char unk7C; /* 0x7C */ - unsigned char unk7D; /* 0x7D */ - unsigned char unk7E; /* 0x7E */ - unsigned char unk7F; /* 0x7F */ + unsigned char seq_sound; /* 0x7C */ + unsigned char sound_slot; /* 0x7D */ + unsigned char anim_trigger_count; /* 0x7E */ + unsigned char shadow_range; /* 0x7F */ char pad80[4]; int unk84; /* 0x84 */ int unk88; /* 0x88 */ char pad8C[4]; - int unk90; /* 0x90 */ - int unk94; /* 0x94 */ + int glow_color; /* 0x90 */ + int collision; /* 0x94 */ char pad98[8]; - unsigned char unkA0; /* 0xA0 */ - unsigned char unkA1; /* 0xA1 */ - unsigned char unkA2; /* 0xA2 */ - unsigned char unkA3; /* 0xA3 */ - unsigned char unkA4; /* 0xA4 */ + unsigned char unkA0; /* 0xA0 */ + unsigned char unkA1; /* 0xA1 */ + unsigned char unkA2; /* 0xA2 */ + unsigned char unkA3; /* 0xA3 */ + unsigned char hit_slot; /* 0xA4 */ char padA5; short original_class_id; /* 0xA6 */ int unkA8; /* 0xA8 */ @@ -96,27 +96,27 @@ void init_moby_instance(void *moby_mem, int oClass) { fill_transfer_words(moby_instance, 0, 0x100); resident_class_slot = resident_class_slot_by_id[oClass]; - moby_instance->unk23 = 0x80; + moby_instance->alpha = 0x80; moby_instance->oClass = resident_class_slot; - moby_instance->unkA4 = 0xFF; - moby_instance->unk21 = 0xFF; + moby_instance->hit_slot = 0xFF; + moby_instance->group = 0xFF; moby_instance->unk71 = 0xFF; - moby_instance->unk72 = 0xFF; + moby_instance->lod_dist = 0xFF; moby_instance->original_class_id = oClass; - moby_instance->unk38 = 0x40404000000000L; - moby_instance->unk36 = 0x7F80; + moby_instance->lights = 0x40404000000000L; + moby_instance->occlusion = 0x7F80; resident_pool_slot_index = ((char *)moby_instance - (char *)resident_object_pool) >> 8; moby_instance->unkA8 = resident_pool_slot_index << 16; moby_instance->unkAC = resident_pool_slot_index; - moby_instance->unk7E = 0; - moby_instance->unk7C = 0xFF; + moby_instance->anim_trigger_count = 0; + moby_instance->seq_sound = 0xFF; moby_instance->unkA0 = 0x7F; moby_instance->unkA2 = 0x80; - moby_instance->unk7D = 0xFF; + moby_instance->sound_slot = 0xFF; moby_instance->unkA1 = 0x7F; moby_instance->unkA3 = 0x80; - moby_instance->unk74 = moby_class_updates[moby_instance->oClass]; - if (moby_instance->unk74 == 0) { + moby_instance->update = moby_class_updates[moby_instance->oClass]; + if (moby_instance->update == 0) { moby_instance->flags |= 2; } pClass = moby_class_resources[moby_instance->oClass]; @@ -124,15 +124,15 @@ void init_moby_instance(void *moby_mem, int oClass) { MobyIClass *class_resource; moby_instance->pClass = pClass; - moby_instance->unk72 = pClass->unk0E; - moby_instance->flags |= pClass->unk44; - moby_instance->unk94 = pClass->unk10; - moby_instance->unk2C = pClass->unk24; - moby_instance->unk58 = 1.0f; + moby_instance->lod_dist = pClass->lod_trans; + moby_instance->flags |= pClass->flags; + moby_instance->collision = pClass->collision; + moby_instance->scale = pClass->scale; + moby_instance->anim_speed = 1.0f; moby_instance->unk5C = 1.0f; - if (pClass->unk40 != 0) { + if (pClass->glow_rgba != 0) { moby_instance->flags |= 0x10; - moby_instance->unk90 = pClass->unk40; + moby_instance->glow_color = pClass->glow_rgba; } { /* retail re-reads m->pClass (lw v0, 0x24(s1)) before each of the @@ -142,15 +142,15 @@ void init_moby_instance(void *moby_mem, int oClass) { a real load; the stores still go through the plain m. */ volatile MobyI *vm = moby_instance; - if (vm->pClass->unk0F != 0) { - moby_instance->unk7F = 0x18; + if (vm->pClass->shadow_count != 0) { + moby_instance->shadow_range = 0x18; moby_instance->flags |= 0x400; moby_instance->unk84 = 0; moby_instance->unk88 = 0; moby_instance->unkBD = 0; } - if (vm->pClass->unk06 != 0) { - moby_instance->unk73 = 0x18; + if (vm->pClass->metal_count != 0) { + moby_instance->metal_alpha = 0x18; } if (vm->pClass->seq == 0) { return; @@ -161,9 +161,9 @@ void init_moby_instance(void *moby_mem, int oClass) { moby_instance->flags &= 0xFFFD; } class_resource = moby_instance->pClass; - if (class_resource->unk0C == 1) { + if (class_resource->seq_count == 1) { if (class_resource->seq->nframes < 2) { - moby_instance->unk58 = 0.0f; + moby_instance->anim_speed = 0.0f; if (class_resource->seq->unk11 < 0) { moby_instance->flags |= 0x40; } @@ -173,7 +173,7 @@ void init_moby_instance(void *moby_mem, int oClass) { } moby_instance->pClass = 0; moby_instance->flags |= 5; - moby_instance->unk94 = 0; + moby_instance->collision = 0; } extern __typeof__(init_moby_instance) func_0020C5F0 __attribute__((alias("FUN_0020c5f0"))); diff --git a/src/sdk/deci2/sce_tty_init.c b/src/sdk/deci2/sce_tty_init.c index 78b328b706..1cfdcbda9f 100644 --- a/src/sdk/deci2/sce_tty_init.c +++ b/src/sdk/deci2/sce_tty_init.c @@ -4,21 +4,21 @@ #include "rnc/sdk/deci2.h" struct TtyState { - s32 unk0; - volatile s32 unk4; - volatile s32 unk8; - volatile s32 unkC; - s32 unk10; - s32 unk14; - s32 unk18; + s32 socket; + volatile s32 wlen; + volatile s32 rlen; + volatile s32 busy; + s32 wbuf; + s32 rbuf; + s32 queue; }; -struct Mmio { - u16 unk0; - u16 unk2; - u16 unk4; - u8 unk6; - u8 unk7; +struct Deci2Hdr { + u16 len; + u16 rsvd; + u16 proto; + u8 src; + u8 dest; u32 unk8; }; @@ -28,24 +28,24 @@ extern s32 FlushCache(); s32 sceTtyInit(void) { struct TtyState *state = &D_00154A50; - struct Mmio *hdr; + struct Deci2Hdr *hdr; FlushCache(0); - *(volatile s32 *)&state->unk0 = sceDeci2Open(0x210, state, &sceTtyHandler); - if (state->unk0 < 0) { + *(volatile s32 *)&state->socket = sceDeci2Open(0x210, state, &sceTtyHandler); + if (state->socket < 0) { return 0; } - state->unkC = 0; - state->unk4 = 0; - state->unk8 = 0; - state->unk14 = (u32)tty_receive_packet | 0x20000000; - hdr = (struct Mmio *)((u32)D_00154A80 | 0x20000000); - state->unk10 = (s32)hdr; - hdr->unk2 = 0; - hdr->unk4 = 0x210; - hdr->unk6 = 'E'; - hdr->unk7 = 'H'; + state->busy = 0; + state->wlen = 0; + state->rlen = 0; + state->rbuf = (u32)tty_receive_packet | 0x20000000; + hdr = (struct Deci2Hdr *)((u32)D_00154A80 | 0x20000000); + state->wbuf = (s32)hdr; + hdr->rsvd = 0; + hdr->proto = 0x210; + hdr->src = 'E'; + hdr->dest = 'H'; hdr->unk8 = 0; - state->unk18 = init_ring_buffer(0x100); + state->queue = init_ring_buffer(0x100); return 1; } diff --git a/src/sdk/deci2/sce_tty_write.c b/src/sdk/deci2/sce_tty_write.c index b720726a75..dddc35b863 100644 --- a/src/sdk/deci2/sce_tty_write.c +++ b/src/sdk/deci2/sce_tty_write.c @@ -7,46 +7,46 @@ #include "rnc/sdk/interrupts.h" struct TtyState { - volatile s32 unk0; /* deci2 handle from sceDeci2Open */ - volatile s32 unk4; /* published payload length */ - volatile s32 unk8; - volatile s32 unkC; /* busy flag, also written by sceTtyHandler */ - s32 unk10; /* MMIO block pointer (with 0x20000000 flag bit) */ - s32 unk14; - s32 unk18; + volatile s32 socket; + volatile s32 wlen; + volatile s32 rlen; + volatile s32 busy; + s32 wbuf; + s32 rbuf; + s32 queue; }; -struct Mmio { - u16 unk0; /* transmit length */ - u16 unk2; - u16 unk4; - u8 unk6; - s8 unk7; /* CallDebugCharacter mode byte (read with `lb`) */ +struct Deci2Hdr { + u16 len; + u16 rsvd; + u16 proto; + u8 src; + s8 dest; u32 unk8; - u8 data[0xF4]; /* payload window, addressed at block + 0xC */ + u8 data[0xF4]; }; extern struct TtyState D_00154A50; extern s32 DIntr(); s32 sceTtyWrite(s8 *text, s32 text_len) { - s32 written_count; /* characters consumed -> return value */ - s32 remaining; /* countdown, hits -1 after len+1 tests */ - s32 window_bytes; /* bytes resident in the payload window */ - s8 *text_cursor; /* source cursor */ - struct Mmio *mmio; - u8 *payload_cursor; /* payload cursor */ + s32 written_count; /* characters consumed -> return value */ + s32 remaining; /* countdown, hits -1 after len+1 tests */ + s32 window_bytes; /* bytes resident in the payload window */ + s8 *text_cursor; /* source cursor */ + struct Deci2Hdr *hdr; + u8 *payload_cursor; /* payload cursor */ written_count = 0; remaining = text_len; window_bytes = 0; text_cursor = text; - if (D_00154A50.unkC == 0) { + if (D_00154A50.busy == 0) { DIntr(); - D_00154A50.unkC = 1; - mmio = (struct Mmio *)((u32)D_00154A80 | 0x20000000); - D_00154A50.unk10 = (s32)mmio; - payload_cursor = mmio->data; + D_00154A50.busy = 1; + hdr = (struct Deci2Hdr *)((u32)D_00154A80 | 0x20000000); + D_00154A50.wbuf = (s32)hdr; + payload_cursor = hdr->data; do { remaining = remaining - 1; if (remaining == -1) { @@ -66,17 +66,17 @@ s32 sceTtyWrite(s8 *text, s32 text_len) { payload_cursor = payload_cursor + 1; written_count = written_count + 1; } while (window_bytes < 0x100); - D_00154A50.unk4 = window_bytes + 0xC; - mmio->unk0 = D_00154A50.unk4; - if (CallDebugCharacter(D_00154A50.unk0, mmio->unk7) < 0) { - *(s32 *)&D_00154A50.unkC = 0; + D_00154A50.wlen = window_bytes + 0xC; + hdr->len = D_00154A50.wlen; + if (CallDebugCharacter(D_00154A50.socket, hdr->dest) < 0) { + *(s32 *)&D_00154A50.busy = 0; EnableInterrupts(); return -1; } - if (D_00154A50.unkC != 0) { + if (D_00154A50.busy != 0) { do { - SceDeci2Poll(D_00154A50.unk0); - } while (D_00154A50.unkC != 0); + SceDeci2Poll(D_00154A50.socket); + } while (D_00154A50.busy != 0); } EnableInterrupts(); return written_count; diff --git a/src/sdk/libc/stdio/sinit.c b/src/sdk/libc/stdio/sinit.c index 26c9270c34..64d159e254 100644 --- a/src/sdk/libc/stdio/sinit.c +++ b/src/sdk/libc/stdio/sinit.c @@ -21,26 +21,27 @@ #include "rnc/data_labels.h" #include "rnc/sdk/libc/stdio.h" +/* newlib struct _reent */ struct Reent { u8 pad_0[0x38]; - s32 unk38; - s32 unk3C; + s32 __sdidinit; + s32 __cleanup; u8 pad_40[0x198]; - s32 unk1D8; - s32 unk1DC; - s32 unk1E0; + s32 __sglue_next; + s32 __sglue_niobs; + s32 __sglue_iobs; }; void __sinit(struct Reent *reent_context) { s32 *std_streams; std_streams = ((u8 *)reent_context + (0x1E4)); - reent_context->unk3C = D_00113AC8; - reent_context->unk38 = 1; + reent_context->__cleanup = D_00113AC8; + reent_context->__sdidinit = 1; std(std_streams, 4, 0, reent_context); std(((u8 *)reent_context + (0x23C)), 9, 1, reent_context); std(((u8 *)reent_context + (0x294)), 0xA, 2, reent_context); - reent_context->unk1E0 = std_streams; - reent_context->unk1DC = 3; - reent_context->unk1D8 = 0; + reent_context->__sglue_iobs = std_streams; + reent_context->__sglue_niobs = 3; + reent_context->__sglue_next = 0; } diff --git a/src/sdk/libc/stdio/sread.c b/src/sdk/libc/stdio/sread.c index a0c9345cfe..f1f762bc76 100644 --- a/src/sdk/libc/stdio/sread.c +++ b/src/sdk/libc/stdio/sread.c @@ -19,13 +19,14 @@ #include "types.h" +/* newlib struct __sFILE */ struct StdioFile { u8 pad_0[0xC]; - u16 unkC; - s32 unkE; - u8 pad_12[0x3E]; - s32 unk50; - s32 unk54; + u16 _flags; + s16 _file; + u8 pad_10[0x40]; + s32 _offset; + s32 _data; }; extern s64 _read_r() __asm__("func_00116108"); @@ -33,17 +34,16 @@ extern s64 _read_r() __asm__("func_00116108"); s64 __sread(struct StdioFile *fp, s32 destination_buffer, s32 max_bytes) { register s32 bytes_read; - bytes_read = (s32)_read_r( - *(s32 *)((u8 *)fp + 0x54), *(s16 *)((u8 *)fp + 0xE), destination_buffer, max_bytes); + bytes_read = (s32)_read_r(fp->_data, fp->_file, destination_buffer, max_bytes); if (bytes_read >= 0) { goto block_2; } goto block_4; block_2: - *(s32 *)((u8 *)fp + 0x50) = *(s32 *)((u8 *)fp + 0x50) + bytes_read; + fp->_offset = fp->_offset + bytes_read; goto block_5; block_4: - fp->unkC = (u16)(fp->unkC & 0xEFFF); + fp->_flags = (u16)(fp->_flags & 0xEFFF); block_5: return bytes_read; } diff --git a/src/sdk/libc/stdio/std.c b/src/sdk/libc/stdio/std.c index 03ae8d817a..9a77a9169d 100644 --- a/src/sdk/libc/stdio/std.c +++ b/src/sdk/libc/stdio/std.c @@ -7,22 +7,23 @@ typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; +/* newlib struct __sFILE */ struct StdioFile { - s32 unk0; - s32 unk4; - s32 unk8; - u16 unkC; - u16 unkE; - s32 unk10; - u8 pad_14[0x4]; - s32 unk18; - s32 unk1C; - s32 unk20; - s32 unk24; - s32 unk28; - s32 unk2C; + s32 _p; + s32 _r; + s32 _w; + u16 _flags; + u16 _file; + s32 _bf_base; + s32 _bf_size; + s32 _lbfsize; + s32 _cookie; + s32 _read; + s32 _write; + s32 _seek; + s32 _close; u8 pad_30[0x24]; - s32 unk54; + s32 _data; }; extern void __sread(); @@ -33,21 +34,21 @@ extern void __sclose() __asm__("func_00116408"); void std(struct StdioFile *fp, s16 flags, s16 fd, s32 reent) { int new_var2; struct StdioFile *new_var; - fp->unk54 = reent; + fp->_data = reent; new_var = fp; - new_var->unkC = (unsigned long)flags; - new_var->unkE = fd; - fp->unk20 = &__sread; - new_var->unk24 = &__swrite; - new_var->unk28 = &__sseek; - new_var->unk2C = &__sclose; + new_var->_flags = (unsigned long)flags; + new_var->_file = fd; + fp->_read = &__sread; + new_var->_write = &__swrite; + new_var->_seek = &__sseek; + new_var->_close = &__sclose; do { new_var2 = 0; - fp->unk0 = new_var2; - fp->unk4 = new_var2; - new_var->unk8 = new_var2; - new_var->unk10 = new_var2; - fp->unk18 = new_var2; + fp->_p = new_var2; + fp->_r = new_var2; + new_var->_w = new_var2; + new_var->_bf_base = new_var2; + fp->_lbfsize = new_var2; } while (0); - new_var->unk1C = fp; + new_var->_cookie = fp; } diff --git a/src/sdk/rpc/rpc/get_rpc_packet.c b/src/sdk/rpc/rpc/get_rpc_packet.c index fd8dc08e73..2089b330b3 100644 --- a/src/sdk/rpc/rpc/get_rpc_packet.c +++ b/src/sdk/rpc/rpc/get_rpc_packet.c @@ -2,10 +2,10 @@ struct RpcPacketQueue { u8 pad_0[0x14]; - s32 unk14; - s32 unk18; + s32 rdata_table; + s32 rdata_table_len; u8 pad_1C[0x8]; - s32 unk24; + s32 rdata_table_idx; }; s32 GetRpcPacket(struct RpcPacketQueue *queue) { @@ -14,9 +14,9 @@ s32 GetRpcPacket(struct RpcPacketQueue *queue) { s32 remainder; s32 scaled; alias = queue; - remainder = (s32)queue->unk24 % (s32)alias->unk18; + remainder = (s32)queue->rdata_table_idx % (s32)alias->rdata_table_len; scaled = remainder << 6; store = queue; - store->unk24 = (s32)(remainder + 1); - return store->unk14 + scaled; + store->rdata_table_idx = (s32)(remainder + 1); + return store->rdata_table + scaled; } diff --git a/src/sdk/rpc/rpc/request_bind.c b/src/sdk/rpc/rpc/request_bind.c index 4130ab139d..9341c79f33 100644 --- a/src/sdk/rpc/rpc/request_bind.c +++ b/src/sdk/rpc/rpc/request_bind.c @@ -11,28 +11,28 @@ typedef double f64; struct RpcBindRequest { u8 pad_0[0x14]; - s32 unk14; + s32 pkt_addr; u8 pad_18[0x4]; - s32 unk1C; - s32 unk20; + s32 client; + s32 sid; }; struct RpcBindPacket { u8 pad_0[0x14]; - s32 unk14; + s32 pkt_addr; u8 pad_18[0x4]; - s32 unk1C; - s32 unk20; - s32 unk24; - s32 unk28; - s32 unk2C; + s32 client; + s32 cid; + s32 server; + s32 buff; + s32 cbuff; }; struct sceSifServeData { u8 pad_0[0x8]; - s32 unk8; + s32 buff; u8 pad_C[0x8]; - s32 unk14; + s32 cbuff; }; extern s32 GetRpcPacket(); @@ -44,19 +44,19 @@ void _request_bind(struct RpcBindRequest *bind_request, s32 rpc_state) { s32 new_var; struct sceSifServeData *svdata; packet = GetRpcPacket(rpc_state); - new_var = (s32)bind_request->unk14; - packet->unk1C = (s32)bind_request->unk1C; - packet->unk14 = new_var; - packet->unk20 = 0x80000009; - svdata = SearchSvdata(bind_request->unk20, rpc_state); + new_var = (s32)bind_request->pkt_addr; + packet->client = (s32)bind_request->client; + packet->pkt_addr = new_var; + packet->cid = 0x80000009; + svdata = SearchSvdata(bind_request->sid, rpc_state); if (svdata == 0) { - packet->unk24 = 0; - packet->unk28 = 0; - packet->unk2C = 0; + packet->server = 0; + packet->buff = 0; + packet->cbuff = 0; } else { - packet->unk24 = svdata; - packet->unk28 = (s32)svdata->unk8; - packet->unk2C = (s32)svdata->unk14; + packet->server = svdata; + packet->buff = (s32)svdata->buff; + packet->cbuff = (s32)svdata->cbuff; } isceSifSendCmd(0x80000008, packet, 0x40, 0, 0, 0); } diff --git a/src/sdk/rpc/rpc/request_rdata.c b/src/sdk/rpc/rpc/request_rdata.c index 6853f82264..88b11e743c 100644 --- a/src/sdk/rpc/rpc/request_rdata.c +++ b/src/sdk/rpc/rpc/request_rdata.c @@ -11,20 +11,20 @@ typedef double f64; struct RpcRdataRequest { u8 pad_0[0x14]; - s32 unk14; + s32 pkt_addr; u8 pad_18[0x4]; - s32 unk1C; - s32 unk20; - s32 unk24; - s32 unk28; + s32 client; + s32 src; + s32 dest; + s32 size; }; struct RpcRdataPacket { u8 pad_0[0x14]; - s32 unk14; + s32 pkt_addr; u8 pad_18[0x4]; - s32 unk1C; - s32 unk20; + s32 client; + s32 cid; }; extern s32 GetRpcPacket(); @@ -35,10 +35,10 @@ void _request_rdata(struct RpcRdataRequest *request, s32 rpc_state) { s32 client_address; struct RpcRdataPacket *packet; packet = GetRpcPacket(rpc_state); - packet_address = (s32)request->unk14; - client_address = (s32)request->unk1C; - packet->unk14 = packet_address; - packet->unk1C = client_address; - packet->unk20 = 0x8000000C; - isceSifSendCmd(0x80000008, packet, 0x40, request->unk20, request->unk24, request->unk28); + packet_address = (s32)request->pkt_addr; + client_address = (s32)request->client; + packet->pkt_addr = packet_address; + packet->client = client_address; + packet->cid = 0x8000000C; + isceSifSendCmd(0x80000008, packet, 0x40, request->src, request->dest, request->size); } diff --git a/src/sdk/rpc/rpc/sce_sif_bind_rpc.c b/src/sdk/rpc/rpc/sce_sif_bind_rpc.c index 0f2b580f7e..c79866e0e5 100644 --- a/src/sdk/rpc/rpc/sce_sif_bind_rpc.c +++ b/src/sdk/rpc/rpc/sce_sif_bind_rpc.c @@ -6,10 +6,10 @@ struct SifRpcPacket { u8 pad_0[0x14]; - s32 unk14; - s32 unk18; - s32 unk1C; - s32 unk20; + s32 pkt_addr; + s32 rpc_id; + s32 client; + s32 sid; }; extern s32 CreateSema(); @@ -28,11 +28,11 @@ s32 sceSifBindRpc(struct sceSifClientData *client, s32 rpc_number, s32 mode) { if (packet == NULL) { return -1; } - client->rpcd.pid = packet->unk18; + client->rpcd.pid = packet->rpc_id; client->rpcd.paddr = packet; - packet->unk20 = rpc_number; - packet->unk14 = (s32)packet; - packet->unk1C = (s32)client; + packet->sid = rpc_number; + packet->pkt_addr = (s32)packet; + packet->client = (s32)client; if (mode & 1) { goto block_7; } diff --git a/src/sdk/storage/memory_card/sce_mc_chdir.c b/src/sdk/storage/memory_card/sce_mc_chdir.c index 179654adfc..36d55006fd 100644 --- a/src/sdk/storage/memory_card/sce_mc_chdir.c +++ b/src/sdk/storage/memory_card/sce_mc_chdir.c @@ -5,13 +5,13 @@ #include "rnc/sdk/rpc/rpc.h" #include "rnc/sdk/storage/memory_card.h" +/* RPC parameters of a name call (mcNameParam in the open-source PS2 SDK). */ struct McChdirRequest { - s32 unk0; - s32 unk4; + s32 port; + s32 slot; u8 pad_8[0x8]; - s32 unk10; - u8 pad_14[0x3FF]; - s32 unk413; + s32 buffer; + s8 name[0x400]; }; extern struct McChdirRequest D_00159AB0; @@ -36,11 +36,11 @@ s32 sceMcChdir(s32 port, s32 slot, s8 *path, s32 pwd) { SignalSema(mc_sema); return -0xD2; } - D_00159AB0.unk0 = port; - D_00159AB0.unk10 = D_00159FC0; - D_00159AB0.unk4 = slot; - strncpy((s8 *)((u8 *)&D_00159AB0 + 0x14), path, 0x3FF); - *(u8 *)((u8 *)&D_00159AB0 + 0x413) = 0; + D_00159AB0.port = port; + D_00159AB0.buffer = D_00159FC0; + D_00159AB0.slot = slot; + strncpy(D_00159AB0.name, path, 0x3FF); + D_00159AB0.name[0x3FF] = 0; sceSifWriteBackDCache(D_00159FC0, 0x400); rpc_dispatch_status = sceSifCallRpc(&mc_rpc_client, MC_FUNC_CHDIR, diff --git a/src/sdk/storage/memory_card/sce_mc_get_dir.c b/src/sdk/storage/memory_card/sce_mc_get_dir.c index 57eaf4a164..477cb66d91 100644 --- a/src/sdk/storage/memory_card/sce_mc_get_dir.c +++ b/src/sdk/storage/memory_card/sce_mc_get_dir.c @@ -4,14 +4,14 @@ #include "rnc/sdk/libmc.h" #include "rnc/sdk/rpc/rpc.h" +/* RPC parameters of a name call (mcNameParam in the open-source PS2 SDK). */ struct McGetDirRequest { - s32 unk0; - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - u8 pad_14[0x3FF]; - s32 unk413; + s32 port; + s32 slot; + s32 mode; + s32 maxent; + s32 table; + s8 name[0x400]; }; extern struct McGetDirRequest D_00159AB0; @@ -37,13 +37,13 @@ s32 sceMcGetDir(s32 port, s32 slot, s8 *name, s32 mode, s32 maxent, s32 table) { SignalSema(mc_sema); return -0xD2; } - D_00159AB0.unk0 = port; - D_00159AB0.unk4 = path_arg; - D_00159AB0.unk8 = mode; - D_00159AB0.unkC = maxent; - D_00159AB0.unk10 = table; - strncpy((s8 *)((u8 *)&D_00159AB0 + 0x14), name, 0x3FF); - *(u8 *)((u8 *)&D_00159AB0 + 0x413) = 0; + D_00159AB0.port = port; + D_00159AB0.slot = path_arg; + D_00159AB0.mode = mode; + D_00159AB0.maxent = maxent; + D_00159AB0.table = table; + strncpy(D_00159AB0.name, name, 0x3FF); + D_00159AB0.name[0x3FF] = 0; if (maxent >= 0) { sceSifWriteBackDCache(table, maxent << 6); } diff --git a/src/sdk/storage/memory_card/sce_mc_get_info.c b/src/sdk/storage/memory_card/sce_mc_get_info.c index 85b4c49422..2116997fc0 100644 --- a/src/sdk/storage/memory_card/sce_mc_get_info.c +++ b/src/sdk/storage/memory_card/sce_mc_get_info.c @@ -5,13 +5,13 @@ struct McGetInfoRequest { u8 pad_0[0x4]; - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - s32 unk14; + s32 port; + s32 slot; + s32 want_format; + s32 want_free_blocks; + s32 want_type; u8 pad_18[0x4]; - s32 unk1C; + s32 result; }; extern u8 D_00123D10[]; @@ -33,23 +33,23 @@ s32 sceMcGetInfo(s32 port, s32 slot, s32 type, s32 free_blocks, s32 format) { if (PollSema(mc_sema) < 0) { return -0xC8; } - D_00159A80.unk4 = port; - D_00159A80.unk8 = slot; - D_00159A80.unk1C = D_00159F00; + D_00159A80.port = port; + D_00159A80.slot = slot; + D_00159A80.result = D_00159F00; if (type != NULL) { - D_00159A80.unk14 = 1; + D_00159A80.want_type = 1; } else { - D_00159A80.unk14 = 0; + D_00159A80.want_type = 0; } if (free_blocks != 0) { - D_00159A80.unk10 = 1; + D_00159A80.want_free_blocks = 1; } else { - D_00159A80.unk10 = 0; + D_00159A80.want_free_blocks = 0; } if (format != 0) { - D_00159A80.unkC = 1; + D_00159A80.want_format = 1; } else { - D_00159A80.unkC = 0; + D_00159A80.want_format = 0; } D_00159A28[0] = type; D_00159A2C[0] = free_blocks; diff --git a/src/ui/menus/system/process_menu_entry.c b/src/ui/menus/system/process_menu_entry.c index 756cb01507..3eed284c4f 100644 --- a/src/ui/menus/system/process_menu_entry.c +++ b/src/ui/menus/system/process_menu_entry.c @@ -3,37 +3,31 @@ #include "rnc/globals.h" #include "rnc/ui/hud/remove_hud_item.h" #include "rnc/ui/menus/weapons/count_unspent_gold_bolts.h" +#include "rnc/ui/vendor/vendor_capture.h" #include "rnc/sdk/libc/string.h" typedef struct { - s32 unk0; - u16 unk4; - s16 unk6; - s16 unk8; - s16 unkA; - s16 unkC; - s16 unkE; - u16 unk10; + s32 help_text; + u16 action; + s16 link; + s16 condition; + s16 condition_arg; + s16 entry_if_met; + s16 entry_if_not_met; + u16 flags; } MenuItem; typedef struct { u8 pad0[0x4]; - u16 unk4; + u16 previous_entry; u8 pad6[0x2]; - u8 unk8; + u8 entry_flag; u8 pad9[0x2D]; - s16 unk36; - s32 unk38; - u8 *unk3C; + s16 current_entry; + s32 entry_time; + u8 *entries; } Menu; -typedef struct { - s32 unk0; - u8 pad4[0x10]; - u16 unk14; - u8 pad16[0x2]; -} Weapon; - typedef struct { char *s[6]; } Suffixes; @@ -46,7 +40,6 @@ extern s32 world_update_time_macro __asm__("D_0015F60C") MACRO_ADDR; extern Suffixes menu_bolt_threshold_thousands_separators __asm__("D_001E8680"); extern char help_text_integer_placeholder[] __asm__("D_00160088"); extern char bolt_threshold_number_format[] __asm__("D_00160090"); -extern Weapon D_001DFFB0[]; #include "rnc/game/item_state.h" #include "rnc/game/game_globals.h" @@ -85,45 +78,45 @@ void process_menu_entry(void *callback_context, Menu *menu, s32 follow_entry_lin s16 kind; s32 bolt_threshold; - current_menu_entry = (MenuItem *)(menu->unk3C + menu->unk36 * 0x1C); - if (menu->unk3C == 0) { + current_menu_entry = (MenuItem *)(menu->entries + menu->current_entry * 0x1C); + if (menu->entries == 0) { return; } if (follow_entry_link != 0) { - menu->unk4 = menu->unk36; - menu->unk38 = world_update_time; - linked_entry_index = current_menu_entry->unk6; - if (menu->unk36 != linked_entry_index) { - flags = current_menu_entry->unk10; - menu->unk36 = current_menu_entry->unk6; - current_menu_entry = (MenuItem *)(menu->unk3C + linked_entry_index * 0x1C); - menu->unk8 = *(u8 *)¤t_menu_entry->unk10 & 1; + menu->previous_entry = menu->current_entry; + menu->entry_time = world_update_time; + linked_entry_index = current_menu_entry->link; + if (menu->current_entry != linked_entry_index) { + flags = current_menu_entry->flags; + menu->current_entry = current_menu_entry->link; + current_menu_entry = (MenuItem *)(menu->entries + linked_entry_index * 0x1C); + menu->entry_flag = *(u8 *)¤t_menu_entry->flags & 1; if (flags & 4) { menu_entry_context[2] = (s32)callback_context; menu_entry_context[3] = (s32)menu; - if (current_menu_entry->unk4 & 0x4000) { - noop_callback_n((s16)(current_menu_entry->unk4 ^ 0x4000)); + if (current_menu_entry->action & 0x4000) { + noop_callback_n((s16)(current_menu_entry->action ^ 0x4000)); } else { remove_hud_item(menu_help_hud_item); menu_help_hud_item = -1; - noop_callback_o((s16)current_menu_entry->unk4); + noop_callback_o((s16)current_menu_entry->action); } } } } - if (menu->unk36 == -1) { + if (menu->current_entry == -1) { return; } - menu_entry_context[5] = current_menu_entry->unk0; - kind = current_menu_entry->unk8; + menu_entry_context[5] = current_menu_entry->help_text; + kind = current_menu_entry->condition; if (kind == MENU_CONDITION_BOLT_THRESHOLD_AND_COUNT_DIFFERENCE_MET) { sfx = menu_bolt_threshold_thousands_separators; - strcpy(SCRATCH, get_help_message_text(current_menu_entry->unk0)); + strcpy(SCRATCH, get_help_message_text(current_menu_entry->help_text)); substring_match = FindSubstring(SCRATCH, help_text_integer_placeholder); if (substring_match != 0) { substring_match[1] = 's'; } - bolt_threshold = D_001DFFB0[current_menu_entry->unkA].unk14; + bolt_threshold = vendor_item_prices[current_menu_entry->condition_arg].gold_weapon_price; sprintf(num, bolt_threshold_number_format, bolt_threshold / 1000, @@ -131,7 +124,7 @@ void process_menu_entry(void *callback_context, Menu *menu, s32 follow_entry_lin bolt_threshold % 1000); sprintf(formatted_help_text, SCRATCH, num); } else { - sprintf(formatted_help_text, get_help_message_text(current_menu_entry->unk0)); + sprintf(formatted_help_text, get_help_message_text(current_menu_entry->help_text)); } if (menu_entry_context[5] != 0) { copy_text_to_shared_buffer(formatted_help_text); @@ -139,31 +132,33 @@ void process_menu_entry(void *callback_context, Menu *menu, s32 follow_entry_lin remove_hud_item(menu_help_hud_item); menu_help_hud_item = -1; } - if (current_menu_entry->unk8 == 0) { + if (current_menu_entry->condition == 0) { return; } ok = 0; - switch (current_menu_entry->unk8) { + switch (current_menu_entry->condition) { case MENU_CONDITION_PURCHASE_PRICE_MET: - ok = !(current_bolt_count < D_001DFFB0[current_menu_entry->unkA].unk0); + ok = !(current_bolt_count < + vendor_item_prices[current_menu_entry->condition_arg].purchase_price); break; case MENU_CONDITION_ITEM_AVAILABLE: - ok = item_available[current_menu_entry->unkA] != 0; + ok = item_available[current_menu_entry->condition_arg] != 0; break; case MENU_CONDITION_ITEM_AVAILABLE_NOT_ACQUIRED: ok = 0; - if (item_available[current_menu_entry->unkA] != 0) { - ok = items_acquired[current_menu_entry->unkA] == 0; + if (item_available[current_menu_entry->condition_arg] != 0) { + ok = items_acquired[current_menu_entry->condition_arg] == 0; } break; case MENU_CONDITION_ALTERNATE_ITEM_AVAILABLE: - ok = alternate_item_available[current_menu_entry->unkA] != 0; + ok = alternate_item_available[current_menu_entry->condition_arg] != 0; break; case MENU_CONDITION_COUNT_DIFFERENCE_MET: - ok = !(count_unspent_gold_bolts() < current_menu_entry->unkA); + ok = !(count_unspent_gold_bolts() < current_menu_entry->condition_arg); break; case MENU_CONDITION_BOLT_THRESHOLD_AND_COUNT_DIFFERENCE_MET: - ok = current_bolt_count >= D_001DFFB0[current_menu_entry->unkA].unk14 && + ok = current_bolt_count >= + vendor_item_prices[current_menu_entry->condition_arg].gold_weapon_price && count_unspent_gold_bolts() >= 4; break; default: @@ -171,15 +166,15 @@ void process_menu_entry(void *callback_context, Menu *menu, s32 follow_entry_lin break; } if (ok) { - condition_target_entry_index = current_menu_entry->unkC; + condition_target_entry_index = current_menu_entry->entry_if_met; } else { - condition_target_entry_index = current_menu_entry->unkE; + condition_target_entry_index = current_menu_entry->entry_if_not_met; } - if (condition_target_entry_index != menu->unk36) { - menu->unk36 = condition_target_entry_index; - menu->unk38 = world_update_time_macro; - current_menu_entry = (MenuItem *)(menu->unk3C + condition_target_entry_index * 0x1C); - menu->unk8 = *(u8 *)¤t_menu_entry->unk10 & 1; + if (condition_target_entry_index != menu->current_entry) { + menu->current_entry = condition_target_entry_index; + menu->entry_time = world_update_time_macro; + current_menu_entry = (MenuItem *)(menu->entries + condition_target_entry_index * 0x1C); + menu->entry_flag = *(u8 *)¤t_menu_entry->flags & 1; process_menu_entry(callback_context, menu, 0); } } From cb91d7b1c87e32b561fc697eb4e6f042e91b341a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 10:33:22 +0000 Subject: [PATCH 002/213] decomp: name SDK DMA, IPU, clock and file I/O fields sceIpuRestartDMA takes the SDK's sceIpuDmaEnv, the BCD clock helpers the sceCdCLOCK layout, sceDmaSend the channel's chcr/qwc/tadr; the SIF command, load-module and close parameter blocks get names from their use. --- include/rnc/sdk/ipu.h | 4 +- src/sdk/dma/sce_dma_send.c | 14 +++---- src/sdk/ipu/sce_ipu_restart_dma.c | 41 ++++++++++---------- src/sdk/rpc/cmd/sce_sif_init_cmd.c | 20 +++++----- src/sdk/rpc/iop/sce_sif_load_module_buffer.c | 16 ++++---- src/sdk/storage/fileio/sceClose.c | 20 +++++----- src/sdk/time/decode_bcd_time_fields.c | 29 +++++++------- src/sdk/time/encode_bcd_time_fields.c | 29 +++++++------- 8 files changed, 88 insertions(+), 85 deletions(-) diff --git a/include/rnc/sdk/ipu.h b/include/rnc/sdk/ipu.h index b2bff304fd..d3753fd439 100644 --- a/include/rnc/sdk/ipu.h +++ b/include/rnc/sdk/ipu.h @@ -3,13 +3,13 @@ #include "types.h" -struct IpuContext; +struct sceIpuDmaEnv; struct MpegDecoder; u32 SetIpuMpeg1(u32) __asm__("_ipuSetMPEG1"); s16 _ipuVdec(struct MpegDecoder *, s32); void receiveDataFromIPU(s32, s32); -void sceIpuRestartDMA(struct IpuContext *); +void sceIpuRestartDMA(struct sceIpuDmaEnv *); s32 SendIpuCommand() __asm__("_sendIpuCommand"); void suspend_ipu_dma_state(u32 *) __asm__("FUN_0012cc20"); s32 _waitBdecOut(); diff --git a/src/sdk/dma/sce_dma_send.c b/src/sdk/dma/sce_dma_send.c index 359048d702..bdf71add24 100644 --- a/src/sdk/dma/sce_dma_send.c +++ b/src/sdk/dma/sce_dma_send.c @@ -3,11 +3,11 @@ #include "rnc/sdk/system.h" struct DmaChannelRegs { - s32 unk0; + s32 chcr; u8 pad_4[0x1C]; - s32 unk20; + s32 qwc; u8 pad_24[0xC]; - s32 unk30; + s32 tadr; }; void sceDmaSend(struct DmaChannelRegs *channel, s32 addr) { @@ -16,8 +16,8 @@ void sceDmaSend(struct DmaChannelRegs *channel, s32 addr) { phys_addr = CheckAddress(addr); WaitDma(channel); sentinel = 0xFFFFFFFFu; - if ((u32)channel->unk30 != sentinel) - channel->unk30 = phys_addr; - channel->unk20 = 0; - channel->unk0 = (s32)((channel->unk0 & ~0xC) | 0x105); + if ((u32)channel->tadr != sentinel) + channel->tadr = phys_addr; + channel->qwc = 0; + channel->chcr = (s32)((channel->chcr & ~0xC) | 0x105); } diff --git a/src/sdk/ipu/sce_ipu_restart_dma.c b/src/sdk/ipu/sce_ipu_restart_dma.c index 4a39b7a437..895c0ea8e6 100644 --- a/src/sdk/ipu/sce_ipu_restart_dma.c +++ b/src/sdk/ipu/sce_ipu_restart_dma.c @@ -1,34 +1,35 @@ #include "types.h" #include "rnc/sdk/dma.h" -struct IpuContext { - s32 unk0; - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - s32 unk14; - s32 unk18; - s32 unk1C; +/* sceIpuDmaEnv in the PS2 SDK (ipuctrl at 0x20 is not read). */ +struct sceIpuDmaEnv { + s32 d4madr; + s32 d4tadr; + s32 d4qwc; + s32 d4chcr; + s32 d3madr; + s32 d3qwc; + s32 d3chcr; + s32 ipubp; }; -void sceIpuRestartDMA(struct IpuContext *ctx) { +void sceIpuRestartDMA(struct sceIpuDmaEnv *ctx) { u32 bits; u32 magic; u32 count; s32 input_dma_quadword_count; s32 input_dma_address; - bits = (u32)ctx->unk1C; + bits = (u32)ctx->ipubp; magic = bits & 0x7F; count = ((bits >> 16) & 3) + ((bits >> 8) & 0xF); - input_dma_address = ctx->unk0 - count * 0x10; - input_dma_quadword_count = ctx->unk8 + count; - if (ctx->unk10 != 0) { - if (ctx->unk14 != 0) { - *(volatile u32 *)0x1000B010 = ctx->unk10; - *(volatile u32 *)0x1000B020 = ctx->unk14; - SetD3Chcr(ctx->unk18 | 0x100); + input_dma_address = ctx->d4madr - count * 0x10; + input_dma_quadword_count = ctx->d4qwc + count; + if (ctx->d3madr != 0) { + if (ctx->d3qwc != 0) { + *(volatile u32 *)0x1000B010 = ctx->d3madr; + *(volatile u32 *)0x1000B020 = ctx->d3qwc; + SetD3Chcr(ctx->d3chcr | 0x100); } } while (*(volatile s32 *)0x10002010 < 0) { @@ -39,9 +40,9 @@ void sceIpuRestartDMA(struct IpuContext *ctx) { if (input_dma_address != 0) { if (input_dma_quadword_count != 0) { *(volatile u32 *)0x1000B410 = input_dma_address; - *(volatile u32 *)0x1000B430 = ctx->unk4; + *(volatile u32 *)0x1000B430 = ctx->d4tadr; *(volatile u32 *)0x1000B420 = input_dma_quadword_count; - SetD4Chcr(ctx->unkC | 0x100); + SetD4Chcr(ctx->d4chcr | 0x100); } } } diff --git a/src/sdk/rpc/cmd/sce_sif_init_cmd.c b/src/sdk/rpc/cmd/sce_sif_init_cmd.c index 117d6f5cbf..fcb253b8d3 100644 --- a/src/sdk/rpc/cmd/sce_sif_init_cmd.c +++ b/src/sdk/rpc/cmd/sce_sif_init_cmd.c @@ -23,8 +23,8 @@ typedef struct SifCmdHeader { first and fourth fields reorder the stores below, so they stay void *. */ typedef struct SifCmdData { void *packet_buffer; - void *unk4; - s32 unk8; + void *send_buffer; + s32 iop_buffer; void *system_handlers; s32 system_handler_count; SifCmdHandlerEntry *user_handlers; @@ -60,7 +60,7 @@ extern void handle_sif_set_system_register(s32 *packet, void sceSifInitCmd(void) { int i; - u32 uncached_packet_buffer, uncached_unk4; + u32 uncached_packet_buffer, uncached_send_buffer; DIntr(); if (D_0012FC04[0] != 0) { EnableInterrupts(); @@ -68,10 +68,10 @@ void sceSifInitCmd(void) { } D_0012FC04[0] = 1; uncached_packet_buffer = (u32)sif_cmd_packet_buffer | 0x20000000; - uncached_unk4 = (u32)sif_cmd_send_buffer | 0x20000000; + uncached_send_buffer = (u32)sif_cmd_send_buffer | 0x20000000; sif_cmd_data.packet_buffer = (void *)uncached_packet_buffer; - sif_cmd_data.unk4 = (void *)uncached_unk4; - sif_cmd_data.unk8 = 0; + sif_cmd_data.send_buffer = (void *)uncached_send_buffer; + sif_cmd_data.iop_buffer = 0; sif_cmd_data.system_handlers = sif_system_handlers; sif_cmd_data.system_handler_count = 0x20; sif_cmd_data.user_handlers = 0; @@ -98,16 +98,16 @@ void sceSifInitCmd(void) { } D_00154E54[0] = AddDmacHandler(5, _sceSifCmdIntrHdlr, 0); enable_dmac(5); - sif_cmd_data.unk8 = sceSifGetReg(0x80000000); - if (sif_cmd_data.unk8 != 0) { + sif_cmd_data.iop_buffer = sceSifGetReg(0x80000000); + if (sif_cmd_data.iop_buffer != 0) { sif_init_packet.packet_buffer = sif_cmd_packet_buffer; sceSifSendCmd(0x80000000, &sif_init_packet, 0x14, 0, 0, 0); return; } do { } while (!(sceSifGetReg(4) & 0x20000)); - sif_cmd_data.unk8 = sceSifGetReg(2); - sceSifSetReg(0x80000000, sif_cmd_data.unk8); + sif_cmd_data.iop_buffer = sceSifGetReg(2); + sceSifSetReg(0x80000000, sif_cmd_data.iop_buffer); sceSifSetReg(0x80000001, (u32)&sif_cmd_data); sif_init_packet.packet_buffer = sif_cmd_packet_buffer; sif_init_packet.header.option = 0; diff --git a/src/sdk/rpc/iop/sce_sif_load_module_buffer.c b/src/sdk/rpc/iop/sce_sif_load_module_buffer.c index 348f45a93f..31b59b6207 100644 --- a/src/sdk/rpc/iop/sce_sif_load_module_buffer.c +++ b/src/sdk/rpc/iop/sce_sif_load_module_buffer.c @@ -3,8 +3,8 @@ #include "rnc/sdk/rpc/rpc.h" struct SifLoadModuleArgs { - s32 unk0; - s32 unk4; + s32 module_or_result; + s32 arg_len_or_modres; }; extern u8 D_00158400[]; @@ -22,22 +22,22 @@ s32 _sceSifLoadModuleBuffer(s32 iop_address, s32 size, s32 module_arguments, s32 if (sif_load_module_server_changed() != 0) { return 0xFFFEFFFC; } - SIFCMD->unk0 = iop_address; + SIFCMD->module_or_result = iop_address; if (module_arguments != 0) { if (size >= 0xFD) { memcpy(D_00158200 + 0x104, (void *)module_arguments, 0xFC); - SIFCMD->unk4 = 0xFC; + SIFCMD->arg_len_or_modres = 0xFC; } else { memcpy(D_00158200 + 0x104, (void *)module_arguments, size); - SIFCMD->unk4 = size; + SIFCMD->arg_len_or_modres = size; } } else { - SIFCMD->unk4 = 0; + SIFCMD->arg_len_or_modres = 0; } if (sceSifCallRpc(D_00158400, 6, 0, D_00158200, 0x200, D_00158200, 8, 0, 0) < 0) { return 0xFFFEFFFF; } - rpc_return_value = SIFCMD->unk0; - *result_out = SIFCMD->unk4; + rpc_return_value = SIFCMD->module_or_result; + *result_out = SIFCMD->arg_len_or_modres; return rpc_return_value; } diff --git a/src/sdk/storage/fileio/sceClose.c b/src/sdk/storage/fileio/sceClose.c index cc6f025504..1b23b3b684 100644 --- a/src/sdk/storage/fileio/sceClose.c +++ b/src/sdk/storage/fileio/sceClose.c @@ -5,11 +5,11 @@ #include "rnc/sdk/library/sif_file_slot.h" struct SifFileState { - s32 unk0; - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; + s32 sema; + s32 result_addr; + s32 result_size; + s32 fd; + s32 iob_index; }; extern struct SifFileState D_00156880; @@ -40,15 +40,15 @@ s32 sceClose(s32 fd) { _sceFsSigSema(); return -9; } - state->unkC = io->fd; + state->fd = io->fd; sema.maxCount = 1; - state->unk10 = io - fio_iob; + state->iob_index = io - fio_iob; sema.initCount = 0; sema.option = 0; sid = CreateSema(&sema); - state->unk0 = sid; - state->unk4 = (s32)&close_completion_result; - state->unk8 = 4; + state->sema = sid; + state->result_addr = (s32)&close_completion_result; + state->result_size = 4; if (sceSifCallRpc(&fio_rpc_client, 1, 0, state, 0x14, fio_rpc_result, 4, 0, 0) < 0) { DeleteSema(sid); _sceFsSigSema(); diff --git a/src/sdk/time/decode_bcd_time_fields.c b/src/sdk/time/decode_bcd_time_fields.c index 3530b76c20..44e0389aa0 100644 --- a/src/sdk/time/decode_bcd_time_fields.c +++ b/src/sdk/time/decode_bcd_time_fields.c @@ -1,26 +1,27 @@ #include "types.h" #include "rnc/sdk/time.h" +/* sceCdCLOCK in the PS2 SDK . */ struct BcdClockTime { - u8 pad_0; - u8 unk1; - u8 unk2; - u8 unk3; - u8 pad_4; - u8 unk5; - u8 unk6; - u8 unk7; + u8 stat; + u8 second; + u8 minute; + u8 hour; + u8 pad; + u8 day; + u8 month; + u8 year; }; void decode_bcd_time_fields(struct BcdClockTime *time) __asm__("FUN_0012d3c0"); void decode_bcd_time_fields(struct BcdClockTime *time) { - time->unk7 = BcdToTime(time->unk7); - time->unk6 = BcdToTime(time->unk6); - time->unk5 = BcdToTime(time->unk5); - time->unk3 = BcdToTime(time->unk3); - time->unk2 = BcdToTime(time->unk2); - time->unk1 = BcdToTime(time->unk1); + time->year = BcdToTime(time->year); + time->month = BcdToTime(time->month); + time->day = BcdToTime(time->day); + time->hour = BcdToTime(time->hour); + time->minute = BcdToTime(time->minute); + time->second = BcdToTime(time->second); } extern void func_0012D3C0(struct BcdClockTime *) __attribute__((alias("FUN_0012d3c0"))); diff --git a/src/sdk/time/encode_bcd_time_fields.c b/src/sdk/time/encode_bcd_time_fields.c index be0111833a..c0bfc723f6 100644 --- a/src/sdk/time/encode_bcd_time_fields.c +++ b/src/sdk/time/encode_bcd_time_fields.c @@ -1,24 +1,25 @@ #include "types.h" #include "rnc/sdk/time.h" +/* sceCdCLOCK in the PS2 SDK . */ struct BcdClockTime { - u8 pad_0; - u8 unk1; - u8 unk2; - u8 unk3; - u8 pad_4; - u8 unk5; - u8 unk6; - u8 unk7; + u8 stat; + u8 second; + u8 minute; + u8 hour; + u8 pad; + u8 day; + u8 month; + u8 year; }; void encode_bcd_time_fields(struct BcdClockTime *time) __asm__("FUN_0012d428"); void encode_bcd_time_fields(struct BcdClockTime *time) { - time->unk7 = TimeToBcd(time->unk7); - time->unk6 = TimeToBcd(time->unk6); - time->unk5 = TimeToBcd(time->unk5); - time->unk3 = TimeToBcd(time->unk3); - time->unk2 = TimeToBcd(time->unk2); - time->unk1 = TimeToBcd(time->unk1); + time->year = TimeToBcd(time->year); + time->month = TimeToBcd(time->month); + time->day = TimeToBcd(time->day); + time->hour = TimeToBcd(time->hour); + time->minute = TimeToBcd(time->minute); + time->second = TimeToBcd(time->second); } From 023768e5d6f95963789df8f859bb9f98196591cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 10:35:05 +0000 Subject: [PATCH 003/213] decomp: name camera tracking, controls picture and moby animation fields update_camera_tracking_state names the hero motion it tracks (up vector, move along and across it, the ground moby and its height step); the controls help screen reads the left and right picture halves from the disc table; the cutscene loader and the frame helper use struct Moby's field names (lights, lod_dist, metal_alpha, pvars). --- include/rnc/streaming/disc_table.h | 5 +- .../streaming/advance_audio_stream_state.c | 52 +++++-------- src/camera/update_camera_tracking_state.c | 75 +++++++++--------- .../compute_interpolated_record_value.c | 39 +++++----- src/world/update_world_object_animation.c | 78 +++++++++---------- 5 files changed, 121 insertions(+), 128 deletions(-) diff --git a/include/rnc/streaming/disc_table.h b/include/rnc/streaming/disc_table.h index 91dced0e38..fe2b53ed85 100644 --- a/include/rnc/streaming/disc_table.h +++ b/include/rnc/streaming/disc_table.h @@ -35,8 +35,9 @@ struct DiscTable { misc_animations[20]; /* 0xF8, loaded into the stash by load_misc_animations_into_stash */ struct DiscFile vendor_animation; /* 0x198, streamed by draw_vendor_inset_quads */ struct DiscFile music_10000[37]; /* 0x1A0, music tracks 10000.. */ - struct DiscFile unk2C8[6]; /* 0x2C8, one per language */ - struct DiscFile unk2F8[6]; /* 0x2F8, one per language */ + struct DiscFile + controls_help_left[6]; /* 0x2C8: left half of the controls picture, one per language */ + struct DiscFile controls_help_right[6]; /* 0x2F8: right half */ u8 pad_328[0x1D0]; struct DiscFile level_chunk; /* 0x4F8, read by load_level_chunk_from_disc */ u8 pad_500[0x3B8]; diff --git a/src/audio/streaming/advance_audio_stream_state.c b/src/audio/streaming/advance_audio_stream_state.c index 54f7e37dc3..42b6f51e55 100644 --- a/src/audio/streaming/advance_audio_stream_state.c +++ b/src/audio/streaming/advance_audio_stream_state.c @@ -3,21 +3,9 @@ struct AudioStream { u8 pad_0[0x44]; - s32 unk44; - s32 unk48; - s32 unk4C; -}; - -struct AudioStreamTableA { - u8 pad_0[0x2C8]; - s32 unk2C8; - s32 unk2CC; -}; - -struct AudioStreamTableB { - u8 pad_0[0x2F8]; - s32 unk2F8; - s32 unk2FC; + s32 state; + s32 left_buffer; + s32 right_buffer; }; #include "rnc/streaming/disc_table.h" @@ -38,45 +26,45 @@ s32 advance_audio_stream_state(struct AudioStream *stream) { CD_READ_STATE_IDLE = 0 }; - switch (stream->unk44) { + switch (stream->state) { case AUDIO_STREAM_START_FIRST_READ: - if (stream->unk48 == 0 || music_stream_state.read_state != CD_READ_STATE_IDLE) { + if (stream->left_buffer == 0 || music_stream_state.read_state != CD_READ_STATE_IDLE) { break; } - if (disc_table.unk2C8[game_language].size == 0) { + if (disc_table.controls_help_left[game_language].size == 0) { break; } - if (start_audio_stream_read(stream->unk48, - disc_table.unk2C8[game_language].sector, - disc_table.unk2C8[game_language].size) != 0) { - stream->unk44 = stream->unk44 + 1; + if (start_audio_stream_read(stream->left_buffer, + disc_table.controls_help_left[game_language].sector, + disc_table.controls_help_left[game_language].size) != 0) { + stream->state = stream->state + 1; } else { - stream->unk44 = -1; + stream->state = -1; } break; case AUDIO_STREAM_WAIT_FIRST_READ: if (music_stream_state.read_state == CD_READ_STATE_IDLE) { - stream->unk44 = 2; + stream->state = 2; } break; case AUDIO_STREAM_START_SECOND_READ: - if (stream->unk4C == 0 || music_stream_state.read_state != CD_READ_STATE_IDLE) { + if (stream->right_buffer == 0 || music_stream_state.read_state != CD_READ_STATE_IDLE) { break; } - if (disc_table.unk2F8[game_language].size == 0) { + if (disc_table.controls_help_right[game_language].size == 0) { break; } - if (start_audio_stream_read(stream->unk4C, - disc_table.unk2F8[game_language].sector, - disc_table.unk2F8[game_language].size) != 0) { - stream->unk44 = stream->unk44 + 1; + if (start_audio_stream_read(stream->right_buffer, + disc_table.controls_help_right[game_language].sector, + disc_table.controls_help_right[game_language].size) != 0) { + stream->state = stream->state + 1; } else { - stream->unk44 = -1; + stream->state = -1; } break; case AUDIO_STREAM_WAIT_SECOND_READ: if (music_stream_state.read_state == CD_READ_STATE_IDLE) { - stream->unk44 = 4; + stream->state = 4; } break; } diff --git a/src/camera/update_camera_tracking_state.c b/src/camera/update_camera_tracking_state.c index 0eab90ef30..20c9f2f16f 100644 --- a/src/camera/update_camera_tracking_state.c +++ b/src/camera/update_camera_tracking_state.c @@ -13,21 +13,21 @@ struct CamColl { f32 vel; u8 pad14[0xC]; Vec4 dir; - Vec4 unk30; - Vec4 unk40; + Vec4 up; + Vec4 prev_up; f32 dir_vel[4]; - Vec4 unk60; - Vec4 unk70; - Vec4 unk80; - Vec4 unk90; - f32 unkA0; - f32 unkA4; - f32 unkA8; + Vec4 prev_hero_pos; + Vec4 hero_move; + Vec4 hero_move_flat_dir; + Vec4 hero_move_up; + f32 hero_move_length; + f32 hero_move_flat_length; + f32 hero_move_along_up; f32 hist[5]; u8 padC0[0x14]; - struct Moby *unkD4; - f32 unkD8; - f32 unkDC; + struct Moby *ground_moby; + f32 ground_z; + f32 ground_dz; }; extern struct CamColl cam_coll_state __asm__("D_001870D0"); @@ -47,8 +47,8 @@ void update_camera_tracking_state(void) { camera_tracking_state = &cam_coll_state; fast_vec_normalize(&dir, &hero.gravity_dir, -1.0f); - qcopy(&camera_tracking_state->unk40, &camera_tracking_state->unk30); - qcopy(&camera_tracking_state->unk30, &dir); + qcopy(&camera_tracking_state->prev_up, &camera_tracking_state->up); + qcopy(&camera_tracking_state->up, &dir); if (fast_vec_dot(&camera_tracking_state->dir, &dir) < -0.98f) { dir.f[0] += 0.2f; dir.f[1] += 0.2f; @@ -74,18 +74,21 @@ void update_camera_tracking_state(void) { 0.0f); fast_vec_normalize(&camera_tracking_state->dir, &camera_tracking_state->dir, 1.0f); - fast_vec_sub(&camera_tracking_state->unk70, &hero.motion.pos, &camera_tracking_state->unk60); - camera_tracking_state->unkA0 = fast_vec_length(&camera_tracking_state->unk70); - displacement_dot_direction = fast_vec_dot(&camera_tracking_state->unk70, &dir); - camera_tracking_state->unkA8 = displacement_dot_direction; + fast_vec_sub( + &camera_tracking_state->hero_move, &hero.motion.pos, &camera_tracking_state->prev_hero_pos); + camera_tracking_state->hero_move_length = fast_vec_length(&camera_tracking_state->hero_move); + displacement_dot_direction = fast_vec_dot(&camera_tracking_state->hero_move, &dir); + camera_tracking_state->hero_move_along_up = displacement_dot_direction; fast_vec_normalize(&proj, &dir, displacement_dot_direction); - qcopy(&camera_tracking_state->unk90, &proj); - fast_vec_sub(&camera_tracking_state->unk80, &camera_tracking_state->unk70, &proj); - camera_tracking_state->unkA4 = fast_vec_length(&camera_tracking_state->unk80); - fast_vec_scale(&camera_tracking_state->unk80, - &camera_tracking_state->unk80, - 1.0f / camera_tracking_state->unkA4); - qcopy(&camera_tracking_state->unk60, &hero.motion.pos); + qcopy(&camera_tracking_state->hero_move_up, &proj); + fast_vec_sub( + &camera_tracking_state->hero_move_flat_dir, &camera_tracking_state->hero_move, &proj); + camera_tracking_state->hero_move_flat_length = + fast_vec_length(&camera_tracking_state->hero_move_flat_dir); + fast_vec_scale(&camera_tracking_state->hero_move_flat_dir, + &camera_tracking_state->hero_move_flat_dir, + 1.0f / camera_tracking_state->hero_move_flat_length); + qcopy(&camera_tracking_state->prev_hero_pos, &hero.motion.pos); if (hero.unk2284 != 0x50 || hero.state.current == 0x11) { camera_tracking_state->pos.f[0] = hero.motion.pos.f[0]; @@ -109,21 +112,21 @@ void update_camera_tracking_state(void) { ground_moby = hero.ground_moby; if (ground_moby != NULL && ground_moby->oclass != 0x4BA && ground_moby->oclass != 0x336) { - if (ground_moby == camera_tracking_state->unkD4) { - camera_tracking_state->unkDC = ground_moby->pos.z - camera_tracking_state->unkD8; - if (absolute_float(camera_tracking_state->unkDC) < 0.001f) { - camera_tracking_state->unkDC = 0.0f; + if (ground_moby == camera_tracking_state->ground_moby) { + camera_tracking_state->ground_dz = ground_moby->pos.z - camera_tracking_state->ground_z; + if (absolute_float(camera_tracking_state->ground_dz) < 0.001f) { + camera_tracking_state->ground_dz = 0.0f; } - camera_tracking_state->unkD8 = camera_tracking_state->unkD4->pos.z; + camera_tracking_state->ground_z = camera_tracking_state->ground_moby->pos.z; } else { - camera_tracking_state->unkD4 = ground_moby; - camera_tracking_state->unkDC = 0.0f; - camera_tracking_state->unkD8 = ground_moby->pos.z; + camera_tracking_state->ground_moby = ground_moby; + camera_tracking_state->ground_dz = 0.0f; + camera_tracking_state->ground_z = ground_moby->pos.z; } } else { - camera_tracking_state->unkDC = 0.0f; - camera_tracking_state->unkD4 = NULL; - camera_tracking_state->unkD8 = hero.motion.pos.f[2]; + camera_tracking_state->ground_dz = 0.0f; + camera_tracking_state->ground_moby = NULL; + camera_tracking_state->ground_z = hero.motion.pos.f[2]; } } diff --git a/src/mobys/animation/compute_interpolated_record_value.c b/src/mobys/animation/compute_interpolated_record_value.c index 256e750182..1ab626b737 100644 --- a/src/mobys/animation/compute_interpolated_record_value.c +++ b/src/mobys/animation/compute_interpolated_record_value.c @@ -1,15 +1,16 @@ #include "types.h" +/* The animation fields of struct Moby (0x50..0x6F). */ struct InterpolatedStateEntry { u8 pad_0[0x50]; - u8 unk50; - u8 unk51; - u8 unk52; - u8 unk53; - f32 unk54; + u8 frame; + u8 prev_frame; + u8 seq; + u8 prev_seq; + f32 anim_time; u8 pad_58[0x10]; - struct InterpKeyframeA *unk68; - struct InterpKeyframeB *unk6C; + struct InterpKeyframeA *cur_frame_data; + struct InterpKeyframeB *prev_frame_data; }; struct InterpKeyframeB { @@ -31,28 +32,28 @@ f32 compute_interpolated_record_value(struct InterpolatedStateEntry *anim) { f32 weighted_current_record_value; u8 primary_binding_index, secondary_binding_index; - if (anim->unk52 != 0xFF) { - cur_record = anim->unk68; + if (anim->seq != 0xFF) { + cur_record = anim->cur_frame_data; } else { - cur_record = anim->unk6C; + cur_record = anim->prev_frame_data; } - if (anim->unk54 == 0.0f) { + if (anim->anim_time == 0.0f) { return convert_integer_to_float(cur_record->unk4) * 0.0625f; } - if (anim->unk52 != anim->unk53) { - return (convert_integer_to_float(cur_record->unk4) * 0.0625f) + anim->unk54; + if (anim->seq != anim->prev_seq) { + return (convert_integer_to_float(cur_record->unk4) * 0.0625f) + anim->anim_time; } - primary_binding_index = anim->unk50; - secondary_binding_index = anim->unk51; + primary_binding_index = anim->frame; + secondary_binding_index = anim->prev_frame; if ((u8)secondary_binding_index >= (u8)primary_binding_index) { - next_record = anim->unk6C; + next_record = anim->prev_frame_data; weighted_current_record_value = - convert_integer_to_float(cur_record->unk4) * (1.0f - anim->unk54); + convert_integer_to_float(cur_record->unk4) * (1.0f - anim->anim_time); return (weighted_current_record_value + - (convert_integer_to_float(next_record->unk4) * anim->unk54)) * + (convert_integer_to_float(next_record->unk4) * anim->anim_time)) * 0.0625f; } - return (convert_integer_to_float(cur_record->unk4) * 0.0625f) + anim->unk54; + return (convert_integer_to_float(cur_record->unk4) * 0.0625f) + anim->anim_time; } extern f32 func_0020C9E0(struct InterpolatedStateEntry *) __attribute__((alias("FUN_0020c9e0"))); diff --git a/src/world/update_world_object_animation.c b/src/world/update_world_object_animation.c index 31d7b860de..7cba8273b0 100644 --- a/src/world/update_world_object_animation.c +++ b/src/world/update_world_object_animation.c @@ -8,40 +8,40 @@ extern void FlushCache(int); -struct PartList { +struct CutsceneMobyClass { unsigned char pad00[6]; - unsigned char flag; /* 0x06 */ + unsigned char metal_count; /* 0x06 */ unsigned char pad07[5]; - unsigned char used; /* 0x0C */ + unsigned char seq_count; /* 0x0C */ unsigned char pad0D[0x3B]; - int entries[1]; /* 0x48 */ + int seqs[1]; /* 0x48 */ }; -struct ColorSrc { +struct LightsSrc { unsigned char pad00[0x38]; - unsigned long color; /* 0x38 */ + unsigned long lights; /* 0x38 */ }; struct Moby { - unsigned char pad00[0x24]; - struct PartList *parts; /* 0x24 */ - unsigned char pad28[0xA]; - unsigned short unk32; /* 0x32 */ - unsigned short unk34; /* 0x34 */ - unsigned char pad36[2]; - unsigned long color; /* 0x38 */ - unsigned char pad40[8]; - int attach; /* 0x48 */ - unsigned char pad4C[6]; - unsigned char idx; /* 0x52 */ - unsigned char slot; /* 0x53 */ - unsigned char pad54[0x1E]; - unsigned char flag72; /* 0x72 */ - unsigned char flag73; /* 0x73 */ - unsigned char pad74[4]; - int model; /* 0x78 */ - unsigned char pad7C[0x18]; - int unk94; /* 0x94 */ + unsigned char pad00[0x24]; + struct CutsceneMobyClass *pclass; /* 0x24 */ + unsigned char pad28[0xA]; + unsigned short draw_dist; /* 0x32 */ + unsigned short flags; /* 0x34 */ + unsigned char pad36[2]; + unsigned long lights; /* 0x38 */ + unsigned char pad40[8]; + int attach; /* 0x48 */ + unsigned char pad4C[6]; + unsigned char seq; /* 0x52 */ + unsigned char prev_seq; /* 0x53 */ + unsigned char pad54[0x1E]; + unsigned char lod_dist; /* 0x72 */ + unsigned char metal_alpha; /* 0x73 */ + unsigned char pad74[4]; + int pvars; /* 0x78 */ + unsigned char pad7C[0x18]; + int collision; /* 0x94 */ }; struct ModelRec { @@ -126,26 +126,26 @@ void update_world_object_animation(void *unused_arg) { mob = D_0018CB20_lui.slots[i]; if (mob == 0) { mob = create_moby(id); - idx = mob->parts->used; - mob->parts->used = idx + 1; - mob->idx = idx; - mob->slot = idx; - mob->unk32 = 0x1FF; - mob->unk34 |= 6; - mob->flag72 = 0xFF; - mob->unk94 = 0; + idx = mob->pclass->seq_count; + mob->pclass->seq_count = idx + 1; + mob->seq = idx; + mob->prev_seq = idx; + mob->draw_dist = 0x1FF; + mob->flags |= 6; + mob->lod_dist = 0xFF; + mob->collision = 0; if (hero.moby == 0) { - mob->color = 0x38383800000000; + mob->lights = 0x38383800000000; } else { - mob->color = ((struct ColorSrc *)hero.moby)->color; + mob->lights = ((struct LightsSrc *)hero.moby)->lights; } - if (mob->parts->flag) { - mob->flag73 = 0x18; + if (mob->pclass->metal_count) { + mob->metal_alpha = 0x18; } D_0018CB20_lui.slots[i] = mob; } - mob->model = endp; - mob->parts->entries[mob->idx] = sp; + mob->pvars = endp; + mob->pclass->seqs[mob->seq] = sp; for (k = 0; k < ((unsigned char *)sp)[0x10]; k++) { int *pointer_fixup_entries = (int *)((unsigned char *)sp + 0x1C); From e2edf86a5cbeb367fbd0dca13407f5adcce0f2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 10:37:32 +0000 Subject: [PATCH 004/213] decomp: name 44 hero fields from their use Camera mode, hidden and hand-item-hidden flags, the weapon raised and lowered at a wall, wall and platform mobys, the magnetic floor, the velocity curve, jump, swim, swing, wake and head-look fields, the sound slot mobys and timers, each named from the code that reads and writes it. Level code follows in the next commit. --- include/rnc/hero/hero.h | 130 +++++++++--------- src/camera/camera_activation_check_priority.c | 2 +- src/camera/update_camera_tracking_state.c | 2 +- src/check/hero_layout_check.c | 86 ++++++------ src/game/initialize_level_runtime.c | 33 +++-- .../selection/update_menu_grid_selection.c | 2 +- 6 files changed, 128 insertions(+), 127 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index 5c2edc9478..6ddbe038f1 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -102,10 +102,10 @@ struct HeroItemSlot { }; /* - * One key of the hero's per-state vertical velocity curve (hero.unk3E4[i]), - * run by hero_integrate_velocity between state frames unk3D0 and unk3D4. Entering a - * key sets hero.unk3F0 to value * frame_time_sq (-999999 keeps it); each later - * frame adds delta * frame_time_sq. A key lasts scale_game_frames(frames). + * One key of the hero's per-state vertical velocity curve (hero.velocity_keys[i]), + * run by hero_integrate_velocity between state frames velocity_keys_start_frame and + * velocity_keys_end_frame. Entering a key sets hero.velocity_key_accel to + * value * frame_time_sq (-999999 keeps it); each later frame adds delta * frame_time_sq. A key lasts scale_game_frames(frames). */ struct HeroVelocityKey { f32 value; @@ -164,7 +164,7 @@ struct HeroHealth { s32 hp; /* 0x22A8: hit points; 0 = dead */ s32 vehicle_mode_hp; /* 0x22AC: swapped with health.hp */ s16 unk22B0; /* 0x22B0: s16 copy of health.hp */ - s16 unk22B2; /* 0x22B2 */ + s16 fall_voice_slot; /* 0x22B2 */ }; /* @@ -173,9 +173,7 @@ struct HeroHealth { * pad_XXX = no named access. Some level overlays read the item-slot mobys and * 0x2080 as raw bytes, and one view reads 0x560 as an int *. * Notes on unknown fields: - * unk200 / unk210 - copied from the collision hit (FUN_L00_002133a8) * unk458 / unk45C - speeds eased in and scaled into velocity (hero_update_hop_velocity) - * unk22D2 - set on a pad bit-0x10 press (no C reader yet) * unk22DA - nonzero makes FUN_L00_002133a8 call FUN_L00_002347c0 * Item switching (hero_switch_item): a nonzero pending_item[i] that differs * moves into selected_item[i] and changes slot i; saved_item[i] keeps the @@ -210,18 +208,18 @@ struct Hero { s16 jump_lockout_timer; /* 0x1D8 */ s16 unk1DA; /* 0x1DA */ s16 unk1DC; /* 0x1DC */ - s16 unk1DE; /* 0x1DE */ - s16 unk1E0; /* 0x1E0 */ + s16 dive_lock; /* 0x1DE */ + s16 sinking_floor_hold; /* 0x1E0 */ s16 still_frames; /* 0x1E2 */ s16 rail_grab_cooldown; /* 0x1E4 */ s16 grapple_lockout_timer; /* 0x1E6 */ s16 fidget_cooldown; /* 0x1E8 */ s16 unk1EA; /* 0x1EA */ s16 unk1EC; /* 0x1EC */ - s16 unk1EE; /* 0x1EE */ + s16 hit_flash_timer; /* 0x1EE */ s16 unk1F0; /* 0x1F0 */ s16 jump_lock_timer; /* 0x1F2 */ - s16 unk1F4; /* 0x1F4 */ + s16 edge_brake_lock_timer; /* 0x1F4 */ s16 unk1F6; /* 0x1F6 */ s16 unk1F8; /* 0x1F8 */ u8 pad_1FA[0x6]; @@ -235,7 +233,7 @@ struct Hero { f32 capsule_radius; /* 0x234 */ f32 unk238; /* 0x238: velocity of the unk234 spring (FUN_L00_00211380) */ u8 *coll_hit_moby; /* 0x23C: moby of the last push-out collision hit */ - s32 unk240; /* 0x240 */ + s32 wall_moby; /* 0x240 */ union { f32 f; s32 i; @@ -259,15 +257,15 @@ struct Hero { union { f32 f[2]; s32 i[2]; - } unk2C0; /* 0x2C0: written as floats and zeroed as ints */ + } side_probe_drop; /* 0x2C0: written as floats and zeroed as ints */ union { f32 f[2]; s32 i[2]; - } unk2C8; /* 0x2C8: written as floats and zeroed as ints */ + } side_probe_pitch; /* 0x2C8: written as floats and zeroed as ints */ union { f32 f[2]; s32 i[2]; - } unk2D0; /* 0x2D0: written as floats and zeroed as ints */ + } side_probe_roll; /* 0x2D0: written as floats and zeroed as ints */ union { f32 f; s32 i; @@ -292,7 +290,7 @@ struct Hero { struct Moby *ground_moby; /* 0x2FC: moby the ground probe hit (0 = level ground) */ s32 grounded_frames; /* 0x300: frames on the ground */ f32 ground_spring_velocity; /* 0x304 */ - s16 unk308; /* 0x308 */ + s16 magnetic_floor; /* 0x308 */ s16 on_flagged_ground_moby; /* 0x30A */ union { s16 s; @@ -309,8 +307,8 @@ struct Hero { u8 pad_340[0x10]; Vec4 attached_moby_move; /* 0x350: per-frame move of the moby the hero is attached to (FUN_L00_00233f80) */ - s32 unk360; /* 0x360: attached moby (FUN_L00_00233f80) */ - s32 attach_flags; /* 0x364: attach flags, bits 0 and 1 */ + s32 platform_moby; /* 0x360: attached moby (FUN_L00_00233f80) */ + s32 attach_flags; /* 0x364: attach flags, bits 0 and 1 */ u8 pad_368[0x48]; f32 unk3B0; /* 0x3B0 */ union { @@ -320,20 +318,20 @@ struct Hero { s16 unk3B8; /* 0x3B8 */ u8 pad_3BA[0x2]; s16 run_start_blending; /* 0x3BC */ - s16 unk3BE; /* 0x3BE */ + s16 sharp_turn; /* 0x3BE */ u8 pad_3C0[0x10]; - s32 unk3D0; /* 0x3D0 */ - s32 velocity_keys_end_frame; /* 0x3D4 */ - f32 keyed_move_target_frame; /* 0x3D8 */ - f32 unk3DC; /* 0x3DC */ - s32 keyed_anim_target_frame; /* 0x3E0 */ - struct HeroVelocityKey - *unk3E4; /* 0x3E4: keys run by hero_integrate_velocity while unk41C is set */ - s32 unk3E8; /* 0x3E8: current key in unk3E4, -1 before the first */ - s32 unk3EC; /* 0x3EC: frames spent in the current key */ - f32 unk3F0; /* 0x3F0: value added to velocity.z each frame */ - f32 long_jump_speed; /* 0x3F4 */ - f32 fall_gravity; /* 0x3F8 */ + s32 velocity_keys_start_frame; /* 0x3D0 */ + s32 velocity_keys_end_frame; /* 0x3D4 */ + f32 keyed_move_target_frame; /* 0x3D8 */ + f32 unk3DC; /* 0x3DC */ + s32 keyed_anim_target_frame; /* 0x3E0 */ + struct HeroVelocityKey * + velocity_keys; /* 0x3E4: keys run by hero_integrate_velocity while velocity_keys_active is set */ + s32 velocity_key_index; /* 0x3E8: current key in velocity_keys, -1 before the first */ + s32 velocity_key_frames; /* 0x3EC: frames spent in the current key */ + f32 velocity_key_accel; /* 0x3F0: value added to velocity.z each frame */ + f32 long_jump_speed; /* 0x3F4 */ + f32 fall_gravity; /* 0x3F8 */ u8 pad_3FC[0x4]; Vec4 takeoff_pos; /* 0x400 */ f32 smoothed_ground_z; /* 0x410 */ @@ -345,7 +343,7 @@ struct Hero { f32 air_stick_speed; /* 0x424 */ f32 unk428; /* 0x428 */ f32 unk42C; /* 0x42C */ - f32 unk430; /* 0x430 */ + f32 jump_height; /* 0x430 */ f32 unk434; /* 0x434 */ f32 high_jump_drift_yaw; /* 0x438 */ f32 takeoff_yaw; /* 0x43C */ @@ -358,14 +356,14 @@ struct Hero { f32 high_jump_drift_speed; /* 0x458 */ f32 ledge_jump_speed; /* 0x45C */ Vec4 unk460; /* 0x460 */ - Vec4 unk470; /* 0x470 */ + Vec4 wall_jump_normal; /* 0x470 */ f32 air_speed_step_up; /* 0x480 */ f32 jump_decel; /* 0x484 */ f32 jump_height_start; /* 0x488 */ f32 unk48C; /* 0x48C */ f32 fall_start_distance; /* 0x490 */ f32 jump_anim_retime_scale; /* 0x494 */ - s16 unk498; /* 0x498 */ + s16 jump_ramp_frames; /* 0x498 */ s16 jump_max_frames; /* 0x49A */ s16 unk49C; /* 0x49C */ s16 unk49E; /* 0x49E */ @@ -426,7 +424,7 @@ struct Hero { s32 unk5B4; /* 0x5B4 */ s32 unk5B8; /* 0x5B8 */ s16 unk5BC; /* 0x5BC */ - s16 unk5BE; /* 0x5BE */ + s16 grind_hit; /* 0x5BE */ s32 rail_jump_queued; /* 0x5C0 */ s32 rail_gap_jump; /* 0x5C4 */ f32 rail_jump_gravity; /* 0x5C8 */ @@ -458,16 +456,16 @@ struct Hero { f32 basis_pitch; /* 0x684 */ f32 held_pose_yaw; /* 0x688 */ u8 pad_68C[0x4]; - f32 unk690; /* 0x690 */ - f32 unk694; /* 0x694 */ - s32 unk698; /* 0x698 */ - f32 unk69C; /* 0x69C */ - s32 unk6A0; /* 0x6A0 */ - struct Moby *sink_effect_moby; /* 0x6A4 */ - f32 unk6A8; /* 0x6A8 */ - f32 unk6AC; /* 0x6AC */ - f32 unk6B0; /* 0x6B0 */ - f32 unk6B4; /* 0x6B4 */ + f32 swim_bob_offset; /* 0x690 */ + f32 swim_bob_velocity; /* 0x694 */ + s32 swim_stroke_timer; /* 0x698 */ + f32 swim_water_level; /* 0x69C */ + s32 unk6A0; /* 0x6A0 */ + struct Moby *sink_effect_moby; /* 0x6A4 */ + f32 unk6A8; /* 0x6A8 */ + f32 unk6AC; /* 0x6AC */ + f32 unk6B0; /* 0x6B0 */ + f32 unk6B4; /* 0x6B4 */ u8 pad_6B8[0x8]; Vec4 smoothed_spin_stick; /* 0x6C0: 0x60 bytes cleared by fill_transfer_words */ f32 pivot_rot_x; /* 0x6D0 */ @@ -552,9 +550,9 @@ struct Hero { f32 drown_sink_speed; /* 0x8FC */ s16 cw_turn_frames; /* 0x900 */ s16 swim_square_hold_frames; /* 0x902 */ - s16 unk904; /* 0x904 */ - s16 unk906; /* 0x906 */ - s16 unk908; /* 0x908 */ + s16 wake_ring_counter; /* 0x904 */ + s16 spray_counter; /* 0x906 */ + s16 bow_ring_counter; /* 0x908 */ s16 splash_effect_timer; /* 0x90A */ s16 swim_hard_press_frames; /* 0x90C */ s16 jump_button_frames; /* 0x90E */ @@ -589,10 +587,10 @@ struct Hero { struct Moby *swing_target; /* 0x990 */ struct Moby *swing_target_moby; /* 0x994 */ f32 swing_target_dist; /* 0x998 */ - s16 unk99C; /* 0x99C */ + s16 swing_hooked; /* 0x99C */ s16 swing_target_in_sight; /* 0x99E */ f32 unk9A0; /* 0x9A0 */ - f32 unk9A4; /* 0x9A4 */ + f32 swing_rope_length; /* 0x9A4 */ f32 swing_length_vel; /* 0x9A8 */ f32 swing_yaw; /* 0x9AC */ f32 swing_gravity; /* 0x9B0 */ @@ -617,7 +615,7 @@ struct Hero { s32 heading_locked; /* 0xA58 */ f32 attack_target_yaw; /* 0xA5C */ s32 attack_record; /* 0xA60 */ - s32 unkA64; /* 0xA64 */ + s32 melee_hit; /* 0xA64 */ f32 pushback_yaw; /* 0xA68 */ f32 speed_scale; /* 0xA6C: multiplier on the run target in some states (target = frame_time * 5.7 * speed_scale); 1.0 normally */ f32 slam_descending; /* 0xA70 */ @@ -655,10 +653,10 @@ struct Hero { u8 pad_EF0[0x100]; struct HeroRandTimer rand_timer; /* 0xFF0 */ u8 pad_FFC[0x8]; - s32 unk1004; /* 0x1004 */ - s32 unk1008; /* 0x1008 */ + s32 head_look_pitch; /* 0x1004 */ + s32 head_look_yaw; /* 0x1008 */ u8 pad_100C[0x4]; - s32 unk1010; /* 0x1010 */ + s32 head_look_timer; /* 0x1010 */ f32 idle_look_ease_rate; /* 0x1014 */ f32 unk1018; /* 0x1018 */ u8 pad_101C[0x8]; @@ -753,11 +751,11 @@ struct Hero { s8 unk1F3F; /* 0x1F3F */ f32 unk1F40; /* 0x1F40 */ u8 pad_1F44[0x1C]; - u8 unk1F60[0x40]; /* 0x1F60: 0x40-byte buffer cleared by FUN_L00_002b58d8 */ - u8 unk1FA0[0x40]; /* 0x1FA0: 0x40-byte buffer cleared by FUN_L00_002b58d8 */ - u8 *unk1FE0; /* 0x1FE0: moby set by FUN_L00_002b58d8 */ + u8 unk1F60[0x40]; /* 0x1F60: 0x40-byte buffer cleared by FUN_L00_002b58d8 */ + u8 unk1FA0[0x40]; /* 0x1FA0: 0x40-byte buffer cleared by FUN_L00_002b58d8 */ + u8 *visibomb_missile; /* 0x1FE0: moby set by FUN_L00_002b58d8 */ u8 pad_1FE4[0x11]; - u8 unk1FF5; /* 0x1FF5 */ + u8 launch_drones; /* 0x1FF5 */ u8 ammo_used; /* 0x1FF6 */ u8 ammo_capacity; /* 0x1FF7 */ u8 pad_1FF8[0x28]; @@ -774,17 +772,17 @@ struct Hero { struct Moby *moby; /* 0x2080: the hero's moby */ struct HeroState state; /* 0x2084 */ u8 vehicle_mode; /* 0x20A4 */ - u8 unk20A5; /* 0x20A5 */ + u8 hidden; /* 0x20A5 */ u8 force_slot0_item8; /* 0x20A6: forces slot 0 to item 8 */ u8 item_select_blocked; /* 0x20A7 */ u8 item_anim_active; /* 0x20A8 */ u8 wading; /* 0x20A9 */ - u8 unk20AA; /* 0x20AA */ + u8 weapon_up; /* 0x20AA */ u8 item_slot_anim_count; /* 0x20AB: item slot blends to play: 0 none, 1 slot 0, 2 both */ u8 item_use_locked; /* 0x20AC */ u8 tilt_disabled; /* 0x20AD */ u8 unk20AE; /* 0x20AE */ - u8 unk20AF; /* 0x20AF */ + u8 hand_item_hidden; /* 0x20AF */ u8 hydro_tank_full; /* 0x20B0 */ u8 fall_fade_pending; /* 0x20B1 */ u8 unk20B2; /* 0x20B2 */ @@ -811,15 +809,15 @@ struct Hero { s32 pack_swim_voice; /* 0x222C */ s32 voice_slot6; /* 0x2230 */ s32 board_boost_voice; /* 0x2234 */ - struct Moby *unk2238 + struct Moby *sound_slot_moby [8]; /* 0x2238: per sound slot (unk2218 + i * 4): moby the sound plays on, 0 = hero.moby */ u8 pad_2258[0x18]; s32 fidget_index; /* 0x2270 */ - s32 unk2274; /* 0x2274 */ + s32 look_target; /* 0x2274 */ void *unk2278; /* 0x2278 */ s32 unk227C; /* 0x227C */ struct Moby *damage_source_moby; /* 0x2280 */ - s32 unk2284; /* 0x2284 */ + s32 camera_mode; /* 0x2284 */ f32 reach_distance; /* 0x2288 */ f32 reach_height; /* 0x228C */ f32 unk2290; /* 0x2290 */ @@ -833,8 +831,8 @@ struct Hero { f32 current_path_dist; /* 0x22B8: distance to the nearest carrying path this frame (water_current_update keeps the minimum) */ u8 pad_22BC[0x8]; s32 slot3_anim_timer; /* 0x22C4 */ - s16 unk22C8; /* 0x22C8 */ - u8 unk22CA; /* 0x22CA */ + s16 weapon_lowered; /* 0x22C8 */ + u8 hover_latch; /* 0x22CA */ u8 vent_updraft; /* 0x22CB */ s16 unk22CC; /* 0x22CC */ s16 unk22CE; /* 0x22CE */ diff --git a/src/camera/camera_activation_check_priority.c b/src/camera/camera_activation_check_priority.c index ff087d0fee..2818638c60 100644 --- a/src/camera/camera_activation_check_priority.c +++ b/src/camera/camera_activation_check_priority.c @@ -90,7 +90,7 @@ int camera_activation_check_priority(struct UpdateCam *candidate, struct UpdateC struct Hero *hero_state = &hero; short listener_group = candidate->unk86; - if (listener_group != hero_state->unk2284) { + if (listener_group != hero_state->camera_mode) { return 0; } if (current->transition_state == CAMERA_TRANSITION_PRIORITY_GATED && diff --git a/src/camera/update_camera_tracking_state.c b/src/camera/update_camera_tracking_state.c index 20c9f2f16f..cce1d35993 100644 --- a/src/camera/update_camera_tracking_state.c +++ b/src/camera/update_camera_tracking_state.c @@ -90,7 +90,7 @@ void update_camera_tracking_state(void) { 1.0f / camera_tracking_state->hero_move_flat_length); qcopy(&camera_tracking_state->prev_hero_pos, &hero.motion.pos); - if (hero.unk2284 != 0x50 || hero.state.current == 0x11) { + if (hero.camera_mode != 0x50 || hero.state.current == 0x11) { camera_tracking_state->pos.f[0] = hero.motion.pos.f[0]; camera_tracking_state->pos.f[1] = hero.motion.pos.f[1]; camera_tracking_state->pos.f[2] = cam_interp_values(&camera_tracking_state->vel, diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index 50e2b74261..6159224320 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -49,12 +49,12 @@ HERO_OFFSET_CHECK(wall_normal_pitch, 0x250); HERO_OFFSET_CHECK(wall_probe_moby_in_class_range, 0x254); HERO_OFFSET_CHECK(edge_drop_depth, 0x258); HERO_OFFSET_CHECK(edge_ahead, 0x260); -HERO_OFFSET_CHECK(unk3E4, 0x3E4); -HERO_OFFSET_CHECK(unk3F0, 0x3F0); +HERO_OFFSET_CHECK(velocity_keys, 0x3E4); +HERO_OFFSET_CHECK(velocity_key_accel, 0x3F0); HERO_OFFSET_CHECK(yaw_history, 0x2128); HERO_OFFSET_CHECK(yaw_history_index, 0x21A8); HERO_OFFSET_CHECK(yaw_ring_count, 0x21AC); -HERO_OFFSET_CHECK(unk2238, 0x2238); +HERO_OFFSET_CHECK(sound_slot_moby, 0x2238); HERO_OFFSET_CHECK(aim_yaw, 0xA74); HERO_OFFSET_CHECK(aim_pitch, 0xA78); HERO_OFFSET_CHECK(platform_local_pos, 0x310); @@ -110,18 +110,18 @@ HERO_OFFSET_CHECK(jump_buffer_lockout, 0x1D4); HERO_OFFSET_CHECK(jump_lockout_timer, 0x1D8); HERO_OFFSET_CHECK(unk1DA, 0x1DA); HERO_OFFSET_CHECK(unk1DC, 0x1DC); -HERO_OFFSET_CHECK(unk1DE, 0x1DE); -HERO_OFFSET_CHECK(unk1E0, 0x1E0); +HERO_OFFSET_CHECK(dive_lock, 0x1DE); +HERO_OFFSET_CHECK(sinking_floor_hold, 0x1E0); HERO_OFFSET_CHECK(still_frames, 0x1E2); HERO_OFFSET_CHECK(rail_grab_cooldown, 0x1E4); HERO_OFFSET_CHECK(grapple_lockout_timer, 0x1E6); HERO_OFFSET_CHECK(fidget_cooldown, 0x1E8); HERO_OFFSET_CHECK(unk1EA, 0x1EA); HERO_OFFSET_CHECK(unk1EC, 0x1EC); -HERO_OFFSET_CHECK(unk1EE, 0x1EE); +HERO_OFFSET_CHECK(hit_flash_timer, 0x1EE); HERO_OFFSET_CHECK(unk1F0, 0x1F0); HERO_OFFSET_CHECK(jump_lock_timer, 0x1F2); -HERO_OFFSET_CHECK(unk1F4, 0x1F4); +HERO_OFFSET_CHECK(edge_brake_lock_timer, 0x1F4); HERO_OFFSET_CHECK(unk1F6, 0x1F6); HERO_OFFSET_CHECK(unk1F8, 0x1F8); HERO_OFFSET_CHECK(wall_contact_normal, 0x200); @@ -133,7 +133,7 @@ HERO_OFFSET_CHECK(capsule_bottom_target, 0x22C); HERO_OFFSET_CHECK(capsule_radius_target, 0x230); HERO_OFFSET_CHECK(capsule_radius, 0x234); HERO_OFFSET_CHECK(coll_hit_moby, 0x23C); -HERO_OFFSET_CHECK(unk240, 0x240); +HERO_OFFSET_CHECK(wall_moby, 0x240); HERO_OFFSET_CHECK(wall_probe_distance, 0x248); HERO_OFFSET_CHECK(wall_hit, 0x257); HERO_OFFSET_CHECK(ground_normal, 0x270); @@ -141,9 +141,9 @@ HERO_OFFSET_CHECK(water_surface_normal, 0x280); HERO_OFFSET_CHECK(gravity_dir, 0x290); HERO_OFFSET_CHECK(ground_point, 0x2A0); HERO_OFFSET_CHECK(last_ground_point, 0x2B0); -HERO_OFFSET_CHECK(unk2C0, 0x2C0); -HERO_OFFSET_CHECK(unk2C8, 0x2C8); -HERO_OFFSET_CHECK(unk2D0, 0x2D0); +HERO_OFFSET_CHECK(side_probe_drop, 0x2C0); +HERO_OFFSET_CHECK(side_probe_pitch, 0x2C8); +HERO_OFFSET_CHECK(side_probe_roll, 0x2D0); HERO_OFFSET_CHECK(ground_z, 0x2D8); HERO_OFFSET_CHECK(ground_distance, 0x2DC); HERO_OFFSET_CHECK(ground_slope, 0x2E0); @@ -157,7 +157,7 @@ HERO_OFFSET_CHECK(in_water_frames, 0x2F8); HERO_OFFSET_CHECK(ground_moby, 0x2FC); HERO_OFFSET_CHECK(grounded_frames, 0x300); HERO_OFFSET_CHECK(ground_spring_velocity, 0x304); -HERO_OFFSET_CHECK(unk308, 0x308); +HERO_OFFSET_CHECK(magnetic_floor, 0x308); HERO_OFFSET_CHECK(on_flagged_ground_moby, 0x30A); HERO_OFFSET_CHECK(frames_off_ground, 0x30C); HERO_OFFSET_CHECK(air_frames, 0x30E); @@ -165,14 +165,14 @@ HERO_OFFSET_CHECK(unk3B0, 0x3B0); HERO_OFFSET_CHECK(unk3B4, 0x3B4); HERO_OFFSET_CHECK(unk3B8, 0x3B8); HERO_OFFSET_CHECK(run_start_blending, 0x3BC); -HERO_OFFSET_CHECK(unk3BE, 0x3BE); -HERO_OFFSET_CHECK(unk3D0, 0x3D0); +HERO_OFFSET_CHECK(sharp_turn, 0x3BE); +HERO_OFFSET_CHECK(velocity_keys_start_frame, 0x3D0); HERO_OFFSET_CHECK(velocity_keys_end_frame, 0x3D4); HERO_OFFSET_CHECK(keyed_move_target_frame, 0x3D8); HERO_OFFSET_CHECK(unk3DC, 0x3DC); HERO_OFFSET_CHECK(keyed_anim_target_frame, 0x3E0); -HERO_OFFSET_CHECK(unk3E4, 0x3E4); -HERO_OFFSET_CHECK(unk3E8, 0x3E8); +HERO_OFFSET_CHECK(velocity_keys, 0x3E4); +HERO_OFFSET_CHECK(velocity_key_index, 0x3E8); HERO_OFFSET_CHECK(long_jump_speed, 0x3F4); HERO_OFFSET_CHECK(fall_gravity, 0x3F8); HERO_OFFSET_CHECK(takeoff_pos, 0x400); @@ -185,7 +185,7 @@ HERO_OFFSET_CHECK(takeoff_frame, 0x420); HERO_OFFSET_CHECK(air_stick_speed, 0x424); HERO_OFFSET_CHECK(unk428, 0x428); HERO_OFFSET_CHECK(unk42C, 0x42C); -HERO_OFFSET_CHECK(unk430, 0x430); +HERO_OFFSET_CHECK(jump_height, 0x430); HERO_OFFSET_CHECK(unk434, 0x434); HERO_OFFSET_CHECK(high_jump_drift_yaw, 0x438); HERO_OFFSET_CHECK(takeoff_yaw, 0x43C); @@ -198,14 +198,14 @@ HERO_OFFSET_CHECK(air_target_speed, 0x454); HERO_OFFSET_CHECK(high_jump_drift_speed, 0x458); HERO_OFFSET_CHECK(ledge_jump_speed, 0x45C); HERO_OFFSET_CHECK(unk460, 0x460); -HERO_OFFSET_CHECK(unk470, 0x470); +HERO_OFFSET_CHECK(wall_jump_normal, 0x470); HERO_OFFSET_CHECK(air_speed_step_up, 0x480); HERO_OFFSET_CHECK(jump_decel, 0x484); HERO_OFFSET_CHECK(jump_height_start, 0x488); HERO_OFFSET_CHECK(unk48C, 0x48C); HERO_OFFSET_CHECK(fall_start_distance, 0x490); HERO_OFFSET_CHECK(jump_anim_retime_scale, 0x494); -HERO_OFFSET_CHECK(unk498, 0x498); +HERO_OFFSET_CHECK(jump_ramp_frames, 0x498); HERO_OFFSET_CHECK(jump_max_frames, 0x49A); HERO_OFFSET_CHECK(unk49C, 0x49C); HERO_OFFSET_CHECK(unk49E, 0x49E); @@ -253,7 +253,7 @@ HERO_OFFSET_CHECK(grind_base_speed, 0x5B0); HERO_OFFSET_CHECK(unk5B4, 0x5B4); HERO_OFFSET_CHECK(unk5B8, 0x5B8); HERO_OFFSET_CHECK(unk5BC, 0x5BC); -HERO_OFFSET_CHECK(unk5BE, 0x5BE); +HERO_OFFSET_CHECK(grind_hit, 0x5BE); HERO_OFFSET_CHECK(rail_jump_queued, 0x5C0); HERO_OFFSET_CHECK(rail_gap_jump, 0x5C4); HERO_OFFSET_CHECK(rail_jump_gravity, 0x5C8); @@ -272,10 +272,10 @@ HERO_OFFSET_CHECK(facing_x, 0x670); HERO_OFFSET_CHECK(facing_y, 0x674); HERO_OFFSET_CHECK(basis_pitch, 0x684); HERO_OFFSET_CHECK(held_pose_yaw, 0x688); -HERO_OFFSET_CHECK(unk690, 0x690); -HERO_OFFSET_CHECK(unk694, 0x694); -HERO_OFFSET_CHECK(unk698, 0x698); -HERO_OFFSET_CHECK(unk69C, 0x69C); +HERO_OFFSET_CHECK(swim_bob_offset, 0x690); +HERO_OFFSET_CHECK(swim_bob_velocity, 0x694); +HERO_OFFSET_CHECK(swim_stroke_timer, 0x698); +HERO_OFFSET_CHECK(swim_water_level, 0x69C); HERO_OFFSET_CHECK(unk6A0, 0x6A0); HERO_OFFSET_CHECK(sink_effect_moby, 0x6A4); HERO_OFFSET_CHECK(unk6A8, 0x6A8); @@ -311,9 +311,9 @@ HERO_OFFSET_CHECK(pack_particle_timer, 0x8F8); HERO_OFFSET_CHECK(drown_sink_speed, 0x8FC); HERO_OFFSET_CHECK(cw_turn_frames, 0x900); HERO_OFFSET_CHECK(swim_square_hold_frames, 0x902); -HERO_OFFSET_CHECK(unk904, 0x904); -HERO_OFFSET_CHECK(unk906, 0x906); -HERO_OFFSET_CHECK(unk908, 0x908); +HERO_OFFSET_CHECK(wake_ring_counter, 0x904); +HERO_OFFSET_CHECK(spray_counter, 0x906); +HERO_OFFSET_CHECK(bow_ring_counter, 0x908); HERO_OFFSET_CHECK(splash_effect_timer, 0x90A); HERO_OFFSET_CHECK(swim_hard_press_frames, 0x90C); HERO_OFFSET_CHECK(jump_button_frames, 0x90E); @@ -340,10 +340,10 @@ HERO_OFFSET_CHECK(unk988, 0x988); HERO_OFFSET_CHECK(swing_target, 0x990); HERO_OFFSET_CHECK(swing_target_moby, 0x994); HERO_OFFSET_CHECK(swing_target_dist, 0x998); -HERO_OFFSET_CHECK(unk99C, 0x99C); +HERO_OFFSET_CHECK(swing_hooked, 0x99C); HERO_OFFSET_CHECK(swing_target_in_sight, 0x99E); HERO_OFFSET_CHECK(unk9A0, 0x9A0); -HERO_OFFSET_CHECK(unk9A4, 0x9A4); +HERO_OFFSET_CHECK(swing_rope_length, 0x9A4); HERO_OFFSET_CHECK(swing_length_vel, 0x9A8); HERO_OFFSET_CHECK(swing_yaw, 0x9AC); HERO_OFFSET_CHECK(swing_gravity, 0x9B0); @@ -362,7 +362,7 @@ HERO_OFFSET_CHECK(melee_target, 0xA54); HERO_OFFSET_CHECK(heading_locked, 0xA58); HERO_OFFSET_CHECK(attack_target_yaw, 0xA5C); HERO_OFFSET_CHECK(attack_record, 0xA60); -HERO_OFFSET_CHECK(unkA64, 0xA64); +HERO_OFFSET_CHECK(melee_hit, 0xA64); HERO_OFFSET_CHECK(pushback_yaw, 0xA68); HERO_OFFSET_CHECK(speed_scale, 0xA6C); HERO_OFFSET_CHECK(slam_descending, 0xA70); @@ -391,11 +391,11 @@ HERO_OFFSET_CHECK(manipulators, 0xD30); HERO_OFFSET_CHECK(rand_timer.fired, 0xFF0); HERO_OFFSET_CHECK(rand_timer.deadline, 0xFF4); HERO_OFFSET_CHECK(rand_timer.range, 0xFF8); -HERO_OFFSET_CHECK(unk1010, 0x1010); +HERO_OFFSET_CHECK(head_look_timer, 0x1010); HERO_OFFSET_CHECK(idle_look_ease_rate, 0x1014); HERO_OFFSET_CHECK(unk1018, 0x1018); -HERO_OFFSET_CHECK(unk1004, 0x1004); -HERO_OFFSET_CHECK(unk1008, 0x1008); +HERO_OFFSET_CHECK(head_look_pitch, 0x1004); +HERO_OFFSET_CHECK(head_look_yaw, 0x1008); HERO_OFFSET_CHECK(items, 0x1090); HERO_OFFSET_CHECK(ground_type, 0x12E0); HERO_OFFSET_CHECK(on_ice_ground, 0x12E2); @@ -441,8 +441,8 @@ HERO_OFFSET_CHECK(unk1F3F, 0x1F3F); HERO_OFFSET_CHECK(unk1F40, 0x1F40); HERO_OFFSET_CHECK(unk1F60, 0x1F60); HERO_OFFSET_CHECK(unk1FA0, 0x1FA0); -HERO_OFFSET_CHECK(unk1FE0, 0x1FE0); -HERO_OFFSET_CHECK(unk1FF5, 0x1FF5); +HERO_OFFSET_CHECK(visibomb_missile, 0x1FE0); +HERO_OFFSET_CHECK(launch_drones, 0x1FF5); HERO_OFFSET_CHECK(ammo_used, 0x1FF6); HERO_OFFSET_CHECK(ammo_capacity, 0x1FF7); HERO_OFFSET_CHECK(unk2020, 0x2020); @@ -459,16 +459,16 @@ HERO_OFFSET_CHECK(state.prev_timer, 0x2098); HERO_OFFSET_CHECK(state.prev2, 0x209C); HERO_OFFSET_CHECK(state.prev2_control_mode, 0x20A0); HERO_OFFSET_CHECK(vehicle_mode, 0x20A4); -HERO_OFFSET_CHECK(unk20A5, 0x20A5); +HERO_OFFSET_CHECK(hidden, 0x20A5); HERO_OFFSET_CHECK(item_select_blocked, 0x20A7); HERO_OFFSET_CHECK(item_anim_active, 0x20A8); HERO_OFFSET_CHECK(wading, 0x20A9); -HERO_OFFSET_CHECK(unk20AA, 0x20AA); +HERO_OFFSET_CHECK(weapon_up, 0x20AA); HERO_OFFSET_CHECK(item_slot_anim_count, 0x20AB); HERO_OFFSET_CHECK(item_use_locked, 0x20AC); HERO_OFFSET_CHECK(tilt_disabled, 0x20AD); HERO_OFFSET_CHECK(unk20AE, 0x20AE); -HERO_OFFSET_CHECK(unk20AF, 0x20AF); +HERO_OFFSET_CHECK(hand_item_hidden, 0x20AF); HERO_OFFSET_CHECK(hydro_tank_full, 0x20B0); HERO_OFFSET_CHECK(fall_fade_pending, 0x20B1); HERO_OFFSET_CHECK(unk20B2, 0x20B2); @@ -483,11 +483,11 @@ HERO_OFFSET_CHECK(unk2224, 0x2224); HERO_OFFSET_CHECK(voice_slot4, 0x2228); HERO_OFFSET_CHECK(pack_swim_voice, 0x222C); HERO_OFFSET_CHECK(fidget_index, 0x2270); -HERO_OFFSET_CHECK(unk2274, 0x2274); +HERO_OFFSET_CHECK(look_target, 0x2274); HERO_OFFSET_CHECK(unk2278, 0x2278); HERO_OFFSET_CHECK(unk227C, 0x227C); HERO_OFFSET_CHECK(damage_source_moby, 0x2280); -HERO_OFFSET_CHECK(unk2284, 0x2284); +HERO_OFFSET_CHECK(camera_mode, 0x2284); HERO_OFFSET_CHECK(reach_distance, 0x2288); HERO_OFFSET_CHECK(reach_height, 0x228C); HERO_OFFSET_CHECK(unk2290, 0x2290); @@ -499,12 +499,12 @@ HERO_OFFSET_CHECK(water_depth, 0x22A4); HERO_OFFSET_CHECK(health.hp, 0x22A8); HERO_OFFSET_CHECK(health.vehicle_mode_hp, 0x22AC); HERO_OFFSET_CHECK(health.unk22B0, 0x22B0); -HERO_OFFSET_CHECK(health.unk22B2, 0x22B2); +HERO_OFFSET_CHECK(health.fall_voice_slot, 0x22B2); HERO_OFFSET_CHECK(unk22B4, 0x22B4); HERO_OFFSET_CHECK(current_path_dist, 0x22B8); HERO_OFFSET_CHECK(slot3_anim_timer, 0x22C4); -HERO_OFFSET_CHECK(unk22C8, 0x22C8); -HERO_OFFSET_CHECK(unk22CA, 0x22CA); +HERO_OFFSET_CHECK(weapon_lowered, 0x22C8); +HERO_OFFSET_CHECK(hover_latch, 0x22CA); HERO_OFFSET_CHECK(vent_updraft, 0x22CB); HERO_OFFSET_CHECK(unk22CC, 0x22CC); HERO_OFFSET_CHECK(unk22CE, 0x22CE); diff --git a/src/game/initialize_level_runtime.c b/src/game/initialize_level_runtime.c index ede7f5202d..8314361be6 100644 --- a/src/game/initialize_level_runtime.c +++ b/src/game/initialize_level_runtime.c @@ -38,14 +38,14 @@ typedef struct { s32 parts; /* 0x24 */ s32 pointCount; /* 0x28 */ s32 points; /* 0x2C */ - s32 unk30; - s32 unk34; - s32 unk38; - s32 unk3C; - s32 unk40; - s32 unk44; + s32 class_data; + s32 particle_data; + s32 texture_payload; + s32 particle_textures; + s32 special_texture_base; + s32 special_clut_base; s32 sky; /* 0x48 */ - s32 unk4C; + s32 level_textures; s32 scenes[5]; /* 0x50 */ s32 sound; /* 0x64 */ } LevelHeader; @@ -202,10 +202,11 @@ void initialize_level_runtime(void) { upload_texture_images( (s32)header + header->tex, header->texCount, (s32)header + header->texInfo); data_base = (s32)header + header->data_offset; - class_data_base = data_base + header->unk30; + class_data_base = data_base + header->class_data; special_material_template[0] = - (s32)((gs_texture_allocation_base + header->unk40) >> 8) | 0x1D308000 | - ((s64)0xB800 << 19) | ((s64)((gs_texture_allocation_base + header->unk44) >> 8) << 37) | + (s32)((gs_texture_allocation_base + header->special_texture_base) >> 8) | 0x1D308000 | + ((s64)0xB800 << 19) | + ((s64)((gs_texture_allocation_base + header->special_clut_base) >> 8) << 37) | 0x8000000000000000LL; special_material_template[1] = 0x0000FFA0000000E0LL; special_material_template[2] = 0x0040000400004000LL; @@ -226,16 +227,18 @@ void initialize_level_runtime(void) { moby_entry->oclass); moby_entry++; } - level_texture_payload_address = data_base + header->unk38; + level_texture_payload_address = data_base + header->texture_payload; unpack_point_records((s32)header + header->points, header->pointCount); { - s32 particle_data_base = data_base + header->unk34; + s32 particle_data_base = data_base + header->particle_data; s32 particle_entries = (s32)header + header->parts; - parse_particle_textures( - (s32)header + header->unk3C, particle_data_base, particle_entries, header->partCount); + parse_particle_textures((s32)header + header->particle_textures, + particle_data_base, + particle_entries, + header->partCount); } - texture_offsets = (s32 *)(data_base + header->unk4C); + texture_offsets = (s32 *)(data_base + header->level_textures); language_index = game_language - 1; if (language_index < 0) { language_index = 0; diff --git a/src/ui/menus/selection/update_menu_grid_selection.c b/src/ui/menus/selection/update_menu_grid_selection.c index 5f3b23ae00..57e5353bbb 100644 --- a/src/ui/menus/selection/update_menu_grid_selection.c +++ b/src/ui/menus/selection/update_menu_grid_selection.c @@ -158,7 +158,7 @@ s32 update_menu_grid_selection(struct MenuScreen *grid) { } else if (selected_cell->id == 0x18) { if (noop_callback_p(0x18) != 0 && menu_system.state == 3) { next_columns = noop_callback_p(0x18); - hero.unk1FF5 = 1; + hero.launch_drones = 1; total = hero.ammo_capacity + next_columns; if (total > 6) { total = 6; From f846a41e0a44384c89707a2142804a71420d4b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 10:38:29 +0000 Subject: [PATCH 005/213] decomp: name moby LOD, metal, sequence sound and class header fields lod_dist and metal_alpha come from the class header's lod_trans and metal_count at init; seq_sound is the sequence's looping sound (AnimSeq + 0x11, 0xFF none) that update_moby_voice plays; the class header gains metal_count, lod_trans, shadow_count and glow_rgba. --- include/rnc/mobys/animation/moby_anim.h | 4 +-- include/rnc/mobys/moby.h | 27 +++++++++++-------- src/mobys/animation/blend_moby_animation.c | 2 +- src/mobys/animation/blend_moby_animation_ex.c | 6 ++--- .../animation/update_moby_animation_state.c | 6 ++--- src/mobys/init_moby_instance.c | 4 +-- src/mobys/update_moby_voice.c | 8 +++--- 7 files changed, 31 insertions(+), 26 deletions(-) diff --git a/include/rnc/mobys/animation/moby_anim.h b/include/rnc/mobys/animation/moby_anim.h index 47762da382..92bbea5def 100644 --- a/include/rnc/mobys/animation/moby_anim.h +++ b/include/rnc/mobys/animation/moby_anim.h @@ -8,7 +8,7 @@ typedef struct { char _pad00[0x10]; unsigned char nframes; /* 0x10 */ - unsigned char unk11; /* 0x11: copied into MobyAnim.unk7C by a blend */ + unsigned char sound; /* 0x11: copied into MobyAnim.seq_sound by a blend */ } AnimSeq; typedef struct { @@ -33,7 +33,7 @@ typedef struct { char _pad6C[4]; unsigned char unk70; /* 0x70: Moby.anim_flags; a blend clears bit 1 */ char _pad71[0xB]; - unsigned char unk7C; /* 0x7C */ + unsigned char seq_sound; /* 0x7C */ char _pad7D[0x28]; unsigned char saved_seq; /* 0xA5: seq before a blend parked the pose */ char _padA6[0x4A]; diff --git a/include/rnc/mobys/moby.h b/include/rnc/mobys/moby.h index bc8b7de2c6..b8216dcf87 100644 --- a/include/rnc/mobys/moby.h +++ b/include/rnc/mobys/moby.h @@ -11,20 +11,25 @@ struct AnimSeq; /* A moby class header, pointed to by Moby.pclass. Size unknown; only fields some matched function reads are named. */ struct MobyClass { - u8 pad_0[0xC]; + u8 pad_0[0x6]; + u8 metal_count; /* metal (shine) packets */ + u8 pad_7[0x5]; u8 seq_count; /* number of entries in seqs[] (menu previews clamp the sequence to it) */ - u8 pad_D[3]; - u32 collision; /* collision data; copied into Moby.collision when a moby is (re)classed */ + u8 pad_D; + u8 lod_trans; /* LOD switch distance, copied into Moby.lod_dist */ + u8 shadow_count; /* 16-byte shadow entries; nonzero gives the moby a shadow */ + u32 collision; /* collision data; copied into Moby.collision when a moby is (re)classed */ u8 pad_14[0x8]; void *retarget_table; /* retarget table: word table, indexed id * 4 + 4 (0024eec0) */ struct GifEntry *gifs; /* patched by patch_moby_gifs */ f32 scale; /* default draw scale: copied into Moby.scale, divides it */ s32 sound_defs; /* sound definitions, 0x20 bytes each */ void **callbacks; /* function-pointer table, called with the moby */ - u8 pad_30[0x14]; - u16 flags; /* initial Moby.flags */ - s16 type; /* class type; 5 (a creature) is tested by targeting code */ - struct AnimSeq *seqs[1]; /* animation sequences, indexed by Moby.seq */ + u8 pad_30[0x10]; + s32 glow_rgba; /* nonzero: copied into Moby.glow_color */ + u16 flags; /* initial Moby.flags */ + s16 type; /* class type; 5 (a creature) is tested by targeting code */ + struct AnimSeq *seqs[1]; /* animation sequences, indexed by Moby.seq */ }; /* A moby instance (MobyInstance in the recovered symbols), 0x100 bytes. @@ -57,12 +62,12 @@ struct Moby { void *cur_frame_data; void *prev_frame_data; u8 anim_flags; - u8 unk71; /* set to 0xFF when a moby changes class */ - u8 unk72; - u8 unk73; + u8 unk71; /* set to 0xFF when a moby changes class */ + u8 lod_dist; /* low LOD beyond lod_dist * 1024 (class lod_trans) */ + u8 metal_alpha; /* 0x18 when the class has metal packets */ void (*update)(struct Moby *moby); u8 *pvars; - u8 unk7C; + u8 seq_sound; /* 0x7C: looping sound of the sequence (AnimSeq + 0x11), 0xFF: none */ u8 sound_slot; /* 0x7D: D_0013E550 slot of its looping sound, 0xFF: none (advance_hero_animation) */ u8 anim_trigger_count; u8 shadow_range; /* shadow range in units of 1024; 0x17 from seeker_update near D_L09_00166F40 */ diff --git a/src/mobys/animation/blend_moby_animation.c b/src/mobys/animation/blend_moby_animation.c index 5ad34afde2..529cf53068 100644 --- a/src/mobys/animation/blend_moby_animation.c +++ b/src/mobys/animation/blend_moby_animation.c @@ -49,7 +49,7 @@ void blend_moby_animation(MobyAnim *moby, int new_seq, int frame_index, int blen moby->anim_time = 0.0f; moby->unk70 = (unsigned char)(moby->unk70 & 0xFD); moby->unk5C = scale; - moby->unk7C = moby->pClass->seqs[new_seq]->unk11; + moby->seq_sound = moby->pClass->seqs[new_seq]->sound; } extern __typeof__(blend_moby_animation) func_00212F90 __attribute__((alias("FUN_00212f90"))); diff --git a/src/mobys/animation/blend_moby_animation_ex.c b/src/mobys/animation/blend_moby_animation_ex.c index 40c6c4e5e3..33df6500ac 100644 --- a/src/mobys/animation/blend_moby_animation_ex.c +++ b/src/mobys/animation/blend_moby_animation_ex.c @@ -18,8 +18,8 @@ extern void FUN_0020ede8(void *, int); frame = slot. Either way it then sets nextFrame/prevSeq from arg2/arg1, refreshes frame pointers (update_moby_animation_state), arms the timer (anim_speed = 1), resets anim_time, clears unk70 bit 1, stores 1/convert_integer_to_float(arg3) into - unk5C, and copies unk11 out of - pClass->seqs[arg1] into unk7C. */ + unk5C, and copies sound out of + pClass->seqs[arg1] into seq_sound. */ void blend_moby_animation_ex(MobyAnim *moby, int new_seq, int frame_index, @@ -56,7 +56,7 @@ void blend_moby_animation_ex( moby->anim_time = 0.0f; moby->unk70 = (unsigned char)(moby->unk70 & 0xFD); moby->unk5C = scale; - moby->unk7C = moby->pClass->seqs[new_seq]->unk11; + moby->seq_sound = moby->pClass->seqs[new_seq]->sound; } extern __typeof__(blend_moby_animation_ex) func_002130D8 __attribute__((alias("FUN_002130d8"))); diff --git a/src/mobys/animation/update_moby_animation_state.c b/src/mobys/animation/update_moby_animation_state.c index 7754100700..9dc2c40978 100644 --- a/src/mobys/animation/update_moby_animation_state.c +++ b/src/mobys/animation/update_moby_animation_state.c @@ -4,7 +4,7 @@ struct AnimSeq { u8 pad0[0x11]; - u8 unk11; + u8 sound; u8 unk12; u8 pad13[9]; void *frames[1]; @@ -18,9 +18,9 @@ void update_moby_animation_state(struct Moby *moby) { if (moby->seq != 0xFF) { moby->cur_frame_data = moby->pclass->seqs[moby->seq]->frames[moby->frame]; moby->anim_trigger_count = moby->pclass->seqs[moby->seq]->unk12; - moby->unk7C = moby->pclass->seqs[moby->seq]->unk11; + moby->seq_sound = moby->pclass->seqs[moby->seq]->sound; } else { - moby->unk7C = 0xFF; + moby->seq_sound = 0xFF; moby->anim_trigger_count = 0; moby->cur_frame_data = debug_font_buffer + moby->frame * 0x800; } diff --git a/src/mobys/init_moby_instance.c b/src/mobys/init_moby_instance.c index 68cd5a91d5..ae3529a5f7 100644 --- a/src/mobys/init_moby_instance.c +++ b/src/mobys/init_moby_instance.c @@ -6,7 +6,7 @@ typedef struct { char pad00[0x10]; unsigned char nframes; /* 0x10 */ - signed char unk11; /* 0x11 */ + signed char sound; /* 0x11 */ } MobyISeq; typedef struct { @@ -164,7 +164,7 @@ void init_moby_instance(void *moby_mem, int oClass) { if (class_resource->seq_count == 1) { if (class_resource->seq->nframes < 2) { moby_instance->anim_speed = 0.0f; - if (class_resource->seq->unk11 < 0) { + if (class_resource->seq->sound < 0) { moby_instance->flags |= 0x40; } } diff --git a/src/mobys/update_moby_voice.c b/src/mobys/update_moby_voice.c index 815793db8e..b2a1288644 100644 --- a/src/mobys/update_moby_voice.c +++ b/src/mobys/update_moby_voice.c @@ -4,7 +4,7 @@ struct MobyVoiceFlags { u8 pad_0[0x7C]; - u8 unk7C; + u8 seq_sound; u8 current_voice_slot_index; }; @@ -28,12 +28,12 @@ void update_moby_voice(struct MobyVoiceFlags *moby) { voice_slot = (struct MobyVoiceEntry *)(voice_slot_index * 0x70 + ((u8 *)&voice_pool)); if (voice_slot->unk88 != (s32)moby) { moby->current_voice_slot_index = 0xFF; - } else if (voice_slot->voice_entry_index != moby->unk7C) { + } else if (voice_slot->voice_entry_index != moby->seq_sound) { release_voice_slot(voice_slot_index); moby->current_voice_slot_index = 0xFF; } - } else if (moby->unk7C != 0xFF) { - moby->current_voice_slot_index = allocate_voice_for_target_entry(moby->unk7C, 4, moby); + } else if (moby->seq_sound != 0xFF) { + moby->current_voice_slot_index = allocate_voice_for_target_entry(moby->seq_sound, 4, moby); } } From 06e209f9018c627b0b78337dd1e51cb9326ba8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 10:39:59 +0000 Subject: [PATCH 006/213] decomp: name manipulator, sky cluster, draw switch and resident object fields attach_manipulator names the manipulator node (joint list, target matrix, next, rotation w, scale); the sky shells read the cluster header (vertex/tri counts and offsets, data size); draw_config names the switches the world draw reads (sky, effects, particles, sprites, hud, screen overlays, aa blur); the resident render object uses struct Moby's names (lights, lod_dist, metal_alpha, shadow_range, collision). --- include/rnc/rendering/draw_config.h | 16 ++-- .../rnc/rendering/resident_render_object.h | 16 ++-- src/game/update_resident_gameplay_state.c | 82 ++++++++++--------- src/mobys/attach_manipulator.c | 40 ++++----- src/rendering/debug/draw_debug_profiler.c | 24 +++--- src/rendering/sky/sky_draw_shell_gouraud.c | 37 +++++---- src/rendering/sky/sky_draw_shell_textured.c | 37 +++++---- 7 files changed, 128 insertions(+), 124 deletions(-) diff --git a/include/rnc/rendering/draw_config.h b/include/rnc/rendering/draw_config.h index d51034ae6f..dcac02da00 100644 --- a/include/rnc/rendering/draw_config.h +++ b/include/rnc/rendering/draw_config.h @@ -16,19 +16,19 @@ struct DrawPass { struct DrawConfig { s32 unk0; s32 unk4; - s32 unk8; + s32 sky; struct DrawPass tfrag; /* 0xC */ struct DrawPass tie; /* 0x14 */ struct DrawPass shrub; /* 0x1C */ struct DrawPass moby; /* 0x24 */ s32 unk2C; - s32 unk30; - s32 unk34; - s32 unk38; - s32 unk3C; - s32 unk40; - s32 unk44; - s32 unk48; + s32 effects_program; /* loads the effects VU1 program */ + s32 effects; /* effect callbacks, lens flare, light quads */ + s32 particles; + s32 sprites; /* billboards and rotated sprites */ + s32 hud; + s32 screen_overlays; /* fog sprite and screen fades */ + s32 aa_blur; s32 unk4C; }; diff --git a/include/rnc/rendering/resident_render_object.h b/include/rnc/rendering/resident_render_object.h index 2aa138ccc0..7a3f8ca4df 100644 --- a/include/rnc/rendering/resident_render_object.h +++ b/include/rnc/rendering/resident_render_object.h @@ -13,7 +13,7 @@ typedef union { typedef struct { u8 pad0[6]; - u8 unk6; + u8 metal_count; u8 pad7[5]; u8 count; /* 0x0C */ u8 padD[0x48 - 0xD]; @@ -30,8 +30,8 @@ typedef struct ResidentRenderObject { s16 selected_index; /* 0x32 */ u16 flags; /* 0x34 */ u8 pad36[2]; - s64 lifetime_stamp; /* 0x38 */ - Vector4 rotation; /* 0x40 */ + s64 lights; /* 0x38: Moby light state, copied from the hero moby */ + Vector4 rotation; /* 0x40 */ u8 current_frame; u8 next_frame; u8 selected_a; @@ -39,15 +39,15 @@ typedef struct ResidentRenderObject { f32 blend; /* 0x54 */ u8 pad58[0x71 - 0x58]; u8 cached_selector; - u8 opacity; - u8 unk73; + u8 lod_dist; + u8 metal_alpha; u8 pad74[4]; u8 *animation_positions; /* 0x78 */ u8 pad7C[3]; - u8 unk7F; + u8 shadow_range; u8 pad80[0x10]; - s32 color; /* 0x90 */ - s32 unk94; /* 0x94 */ + s32 glow_color; /* 0x90 */ + s32 collision; /* 0x94 */ u8 pad98[0xE]; s16 class_id; /* 0xA6 */ u8 padA8[0xA]; diff --git a/src/game/update_resident_gameplay_state.c b/src/game/update_resident_gameplay_state.c index 0da07965b0..6f18cdc73f 100644 --- a/src/game/update_resident_gameplay_state.c +++ b/src/game/update_resident_gameplay_state.c @@ -333,35 +333,35 @@ void update_resident_gameplay_state(void) { if (playback_object->class_id == 0) { if (level_render_state.state == LEVEL_RENDER_STATE_PLAYBACK_TO_MENU) { if (current_level_index == LEVEL_ORXON && item_available[ITEM_O2_MASK] == 0) { - playback_object->unk7F = 0; + playback_object->shadow_range = 0; } else if (render_sequence.time <= scale_game_frames(0x3E)) { - playback_object->unk7F = 0x18; + playback_object->shadow_range = 0x18; } else { - playback_object->unk7F = 0; + playback_object->shadow_range = 0; } } else if (scale_game_frames(360) < render_sequence.time) { if (current_level_index == LEVEL_ORXON && item_available[ITEM_O2_MASK] == 0) { - playback_object->unk7F = 0; + playback_object->shadow_range = 0; } else { - playback_object->unk7F = 0x18; + playback_object->shadow_range = 0x18; } } else { - playback_object->unk7F = 0; + playback_object->shadow_range = 0; } } else if (playback_object->class_id == 10) { if (level_render_state.state == LEVEL_RENDER_STATE_PLAYBACK_TO_MENU) { if (render_sequence.time <= scale_game_frames(350)) { - playback_object->unk7F = 0x18; + playback_object->shadow_range = 0x18; } else { - playback_object->unk7F = 0; + playback_object->shadow_range = 0; } } else if (render_sequence.time <= scale_game_frames(524)) { - playback_object->unk7F = 0; + playback_object->shadow_range = 0; } else { - playback_object->unk7F = 0x18; + playback_object->shadow_range = 0x18; } } - if (playback_object->unk7F != 0) { + if (playback_object->shadow_range != 0) { update_moby_shadow_range(playback_object); } if (playback_object->class_id == 10) { @@ -375,10 +375,9 @@ void update_resident_gameplay_state(void) { level_render_state.attachment = create_moby(0x509); level_render_state.attachment->selected_index = 0x40; level_render_state.attachment->flags |= 0x806; - level_render_state.attachment->lifetime_stamp = - playback_object->lifetime_stamp; - if (level_render_state.attachment->model->unk6 != 0) { - level_render_state.attachment->unk73 = 0x18; + level_render_state.attachment->lights = playback_object->lights; + if (level_render_state.attachment->model->metal_count != 0) { + level_render_state.attachment->metal_alpha = 0x18; } } noop_callback_m(playback_object, level_render_state.attachment); @@ -396,11 +395,11 @@ void update_resident_gameplay_state(void) { 80.0f) + 120; if (playback_object->class_id == 0x215) { - playback_object->color = (color_intensity >> 1) | - (color_intensity << 8) | - (color_intensity << 16); + playback_object->glow_color = (color_intensity >> 1) | + (color_intensity << 8) | + (color_intensity << 16); } else { - playback_object->color = + playback_object->glow_color = color_intensity | (color_intensity << 8) | (color_intensity << 16); } } else if (render_sequence.time < scale_game_frames(0x1F8)) { @@ -411,10 +410,10 @@ void update_resident_gameplay_state(void) { color_intensity = 255; } if (playback_object->class_id == 0x215) { - playback_object->color = + playback_object->glow_color = (color_intensity << 8) | (color_intensity << 16); } else { - playback_object->color = + playback_object->glow_color = color_intensity | (color_intensity << 8) | (color_intensity << 16); } if (scale_game_frames(0x1A4) < render_sequence.time) { @@ -432,7 +431,7 @@ void update_resident_gameplay_state(void) { } } } else { - playback_object->color = 0xA0A0A0; + playback_object->glow_color = 0xA0A0A0; D_0015F440 -= 0.025f; if (D_0015F440 < 0.0f) { D_0015F440 = 0.0f; @@ -450,10 +449,11 @@ void update_resident_gameplay_state(void) { 80.0f) + 120; if (playback_object->class_id == 0x215) { - playback_object->color = (color_intensity >> 1) | (color_intensity << 8) | - (color_intensity << 16); + playback_object->glow_color = (color_intensity >> 1) | + (color_intensity << 8) | + (color_intensity << 16); } else { - playback_object->color = + playback_object->glow_color = color_intensity | (color_intensity << 8) | (color_intensity << 16); } playback_object->quad_alpha = 0x32; @@ -472,9 +472,10 @@ void update_resident_gameplay_state(void) { (s32)((multiply_global_scale(360.0f) - (f32)render_sequence.time) * (frame_scale * 1.25f)); if (playback_object->class_id == 0x215) { - playback_object->color = (color_intensity << 8) | (color_intensity << 16); + playback_object->glow_color = + (color_intensity << 8) | (color_intensity << 16); } else { - playback_object->color = + playback_object->glow_color = color_intensity | (color_intensity << 8) | (color_intensity << 16); } } else { @@ -484,10 +485,11 @@ void update_resident_gameplay_state(void) { 80.0f) + 120; if (playback_object->class_id == 0x215) { - playback_object->color = (color_intensity >> 1) | (color_intensity << 8) | - (color_intensity << 16); + playback_object->glow_color = (color_intensity >> 1) | + (color_intensity << 8) | + (color_intensity << 16); } else { - playback_object->color = + playback_object->glow_color = color_intensity | (color_intensity << 8) | (color_intensity << 16); } } @@ -519,23 +521,23 @@ void update_resident_gameplay_state(void) { level_render_state.player->selected_b = 2; level_render_state.player->blend = 0.0f; update_moby_animation_state(level_render_state.player); - level_render_state.player->opacity = 0xFF; - level_render_state.player->unk94 = 0; + level_render_state.player->lod_dist = 0xFF; + level_render_state.player->collision = 0; if (level_render_state.path >= 0) { level_render_state.companion_a = create_moby(0); level_render_state.companion_a->selected_index = 0x1FF; - level_render_state.companion_a->opacity = 0xFF; - level_render_state.companion_a->unk94 = 0; + level_render_state.companion_a->lod_dist = 0xFF; + level_render_state.companion_a->collision = 0; level_render_state.companion_a->flags |= 6; - level_render_state.companion_a->lifetime_stamp = - ((ResidentRenderObject *)hero.moby)->lifetime_stamp; + level_render_state.companion_a->lights = + ((ResidentRenderObject *)hero.moby)->lights; level_render_state.companion_b = create_moby(10); level_render_state.companion_b->selected_index = 0x1FF; - level_render_state.companion_b->opacity = 0xFF; - level_render_state.companion_b->unk94 = 0; + level_render_state.companion_b->lod_dist = 0xFF; + level_render_state.companion_b->collision = 0; level_render_state.companion_b->flags |= 6; - level_render_state.companion_b->lifetime_stamp = - ((ResidentRenderObject *)hero.moby)->lifetime_stamp; + level_render_state.companion_b->lights = + ((ResidentRenderObject *)hero.moby)->lights; } noop_callback_a(&game_camera.position, &game_camera.rotation, 1, 0, 0); level_render_state.blend = 0.0f; diff --git a/src/mobys/attach_manipulator.c b/src/mobys/attach_manipulator.c index 5e75fe783e..0ca908a9fa 100644 --- a/src/mobys/attach_manipulator.c +++ b/src/mobys/attach_manipulator.c @@ -4,22 +4,22 @@ typedef struct Manipulator Manipulator; typedef struct MobyAttachOwner { u8 pad0[0x24]; - void *unk24; + void *pclass; u8 pad28[0x3C]; Manipulator *manipulator_head; } MobyAttachOwner; struct Manipulator { - u8 unk0; - u8 unk1; + u8 joint_list; /* index into the class joint lists */ + u8 attached; u8 pad2[2]; - void *unk4; - void *unk8; + void *target; /* scratchpad matrix of the list's joint */ + void *next; u8 padC[0x10]; - f32 unk1C; - f32 unk20; - f32 unk24; - f32 unk28; + f32 rotation_w; /* the rotation quaternion's w */ + f32 scale_x; + f32 scale_y; + f32 scale_z; }; void attach_manipulator(MobyAttachOwner *owner, @@ -27,23 +27,23 @@ void attach_manipulator(MobyAttachOwner *owner, Manipulator *manip) __asm__("FUN_0020cb10"); void attach_manipulator(MobyAttachOwner *source_moby, s32 slot_index, Manipulator *manip) { - if (manip->unk1 == 0) { + if (manip->attached == 0) { u8 *slot_record; - manip->unk0 = slot_index; - manip->unk1 = 1; - manip->unk1C = 1.0f; - manip->unk20 = 1.0f; - manip->unk24 = 1.0f; - manip->unk28 = 1.0f; + manip->joint_list = slot_index; + manip->attached = 1; + manip->rotation_w = 1.0f; + manip->scale_x = 1.0f; + manip->scale_y = 1.0f; + manip->scale_z = 1.0f; - slot_record = - *(u8 **)((u8 *)(*(s32 *)((u8 *)source_moby->unk24 + 0x1C) + manip->unk0 * 4) + 4); + slot_record = *( + u8 **)((u8 *)(*(s32 *)((u8 *)source_moby->pclass + 0x1C) + manip->joint_list * 4) + 4); { u8 record_byte_offset = *slot_record; - manip->unk4 = (void *)((slot_record[record_byte_offset + 4] << 6) + 0x70000000); + manip->target = (void *)((slot_record[record_byte_offset + 4] << 6) + 0x70000000); } - manip->unk8 = source_moby->manipulator_head; + manip->next = source_moby->manipulator_head; source_moby->manipulator_head = manip; } } diff --git a/src/rendering/debug/draw_debug_profiler.c b/src/rendering/debug/draw_debug_profiler.c index 9ec5cd5028..c9bd9ab6ed 100644 --- a/src/rendering/debug/draw_debug_profiler.c +++ b/src/rendering/debug/draw_debug_profiler.c @@ -119,7 +119,7 @@ void draw_debug_profiler(void) { f32 div; if (level_sky_effect_data == NULL || level_sky_effect_data->unk4 != 0 || - ((draw_enable_mask ^ 1) & 1) || draw_config.unk8 == 0 || D_0018C34C[0] != 0) { + ((draw_enable_mask ^ 1) & 1) || draw_config.sky == 0 || D_0018C34C[0] != 0) { append_gif_transfer_packet(); } update_camera_view_matrices(); @@ -130,7 +130,7 @@ void draw_debug_profiler(void) { noop_core_callback(render_setup_label, 0xF); noop_core_callback_secondary(render_setup_label, 0xF); if (level_sky_effect_data != NULL && (draw_enable_mask & 1)) { - if (draw_config.unk8 != 0) { + if (draw_config.sky != 0) { transition_draw_sky(); } noop_core_callback_secondary(sky_draw_label, 0xE); @@ -148,7 +148,7 @@ void draw_debug_profiler(void) { } } append_dma_tag(0x02020000); - if (draw_config.unk34 != 0 && draw_callback3_count != 0) { + if (draw_config.effects != 0 && draw_callback3_count != 0) { vu1_gs_regs_alt(); setup_gif_paging(1); dispatch_callback_list_2(); @@ -161,7 +161,7 @@ void draw_debug_profiler(void) { draw_shrubs(); } append_dma_tag(0x02040000); - if (draw_config.unk44 != 0 && occl_debug_overlay_enabled[0] != 0) { + if (draw_config.screen_overlays != 0 && occl_debug_overlay_enabled[0] != 0) { draw_fogged_fullscreen_sprite(occl_debug_overlay_enabled); } if (draw_enable_mask & 0x20) { @@ -169,7 +169,7 @@ void draw_debug_profiler(void) { draw_debug_font(); do_gif_paging(); } - if (draw_config.unk34 != 0 && draw_callback4_count != 0) { + if (draw_config.effects != 0 && draw_callback4_count != 0) { vu1_gs_regs_alt(); setup_gif_paging(1); dispatch_callback_list_3(); @@ -181,7 +181,7 @@ void draw_debug_profiler(void) { } append_dma_tag(0x02080000); setup_gif_paging(0); - if ((draw_enable_mask & 0x20) && draw_config.unk30 != 0 && + if ((draw_enable_mask & 0x20) && draw_config.effects_program != 0 && font_state != FONT_STATE_EFFECTS_DATA) { vu1_add_data_ref(D_0010FAA0, D_0010FA90[0]); font_state = FONT_STATE_EFFECTS_DATA; @@ -190,7 +190,7 @@ void draw_debug_profiler(void) { noop_core_callback(vu_effects_label, 4); if (draw_enable_mask & 0x20) { vu1_gs_regs_alt(); - if (draw_config.unk34 != 0) { + if (draw_config.effects != 0) { if (draw_callback_count != 0) { dispatch_callback_list_1(); } @@ -201,7 +201,7 @@ void draw_debug_profiler(void) { } noop_core_callback(moby_effects_label, 6); noop_core_callback_secondary(moby_effects_label, 6); - if (draw_config.unk38 != 0) { + if (draw_config.particles != 0) { vu1_add_g_sregister(8, 5); vu1_gs_regs_alt(); FlushCache(0); @@ -210,7 +210,7 @@ void draw_debug_profiler(void) { } noop_core_callback(part_draw_label, 8); noop_core_callback_secondary(part_draw_label, 8); - if (draw_config.unk3C != 0) { + if (draw_config.sprites != 0) { if (draw_callback2_count != 0) { vu1_gs_regs_alt(); dispatch_callback_list_4(); @@ -224,7 +224,7 @@ void draw_debug_profiler(void) { noop_core_callback(post_effects_label, 6); noop_core_callback_secondary(post_effects_label, 6); } - if (draw_config.unk48 != 0) { + if (draw_config.aa_blur != 0) { aa_blur_pass(); } noop_core_callback_secondary(aa_blur_label, 0xF); @@ -232,7 +232,7 @@ void draw_debug_profiler(void) { if (draw_enable_mask & 0x10000) { noop_graphics_callback(); } - if ((draw_enable_mask & 0x80) && draw_config.unk40 != 0) { + if ((draw_enable_mask & 0x80) && draw_config.hud != 0) { update_hud(); draw_help(); draw_letterbox_bars(); @@ -244,7 +244,7 @@ void draw_debug_profiler(void) { noop_core_callback(hud_label, 0xE); do_gif_paging(); if (draw_enable_mask & 0x40) { - if (draw_config.unk44 != 0) { + if (draw_config.screen_overlays != 0) { vu1_add_g_sregister(0x42, 0x8000000044); if (use_alt_fog[0] != 0) { emit_rgba_draw_packet(D_001610C0, D_001610C1, D_001610C2, D_001610C3); diff --git a/src/rendering/sky/sky_draw_shell_gouraud.c b/src/rendering/sky/sky_draw_shell_gouraud.c index 56f8e47145..8e34068b7d 100644 --- a/src/rendering/sky/sky_draw_shell_gouraud.c +++ b/src/rendering/sky/sky_draw_shell_gouraud.c @@ -7,15 +7,16 @@ #include "rnc/data_labels.h" #include "rnc/rendering/vu1_registers.h" +/* A sky cluster header (0x20 bytes). */ struct SkyTile { - u128 bounds; /* 16-byte aligned: tile fields are addressed from the tile base */ - s32 address; - s16 unk4; - s16 unk6; - s16 unk8; - s16 unkA; - s16 unkC; - s16 unkE; + u128 bounds; /* 16-byte aligned: tile fields are addressed from the tile base */ + s32 address; /* cluster data */ + s16 vertex_count; + s16 tri_count; + s16 vertex_offset; + s16 st_offset; + s16 tri_offset; + s16 data_size; }; struct Shell { @@ -39,8 +40,8 @@ void sky_draw_shell_gouraud(struct Shell *shell) { u8 visibility[shell->count]; s32 i; s32 dest; - s32 c_dest; - s32 a_dest; + s32 tri_dest; + s32 st_dest; s32 next_tile_index; if (shell->count == 0) { @@ -58,7 +59,7 @@ void sky_draw_shell_gouraud(struct Shell *shell) { D_00160410 = 1 - D_00160410; if (visibility[0] == 1) { WriteDmaChannelRegisters( - shell->tiles[0].address, shell->tiles[0].unkE >> 4, D_00160408[D_00160410]); + shell->tiles[0].address, shell->tiles[0].data_size >> 4, D_00160408[D_00160410]); } for (i = 0; i < shell->count; i++) { @@ -70,19 +71,19 @@ void sky_draw_shell_gouraud(struct Shell *shell) { D_00160410 = 1 - D_00160410; if (next_tile_index < shell->count && visibility[next_tile_index] == 1) { WriteDmaChannelRegisters(shell->tiles[next_tile_index].address, - shell->tiles[next_tile_index].unkE >> 4, + shell->tiles[next_tile_index].data_size >> 4, D_00160408[D_00160410]); } if (visibility[i] == 1) { dest = D_00160408[1 - D_00160410]; - c_dest = dest + shell->tiles[i].unkC; - a_dest = dest + shell->tiles[i].unkA; - if (sky_transform_vertices(dest + shell->tiles[i].unk8, + tri_dest = dest + shell->tiles[i].tri_offset; + st_dest = dest + shell->tiles[i].st_offset; + if (sky_transform_vertices(dest + shell->tiles[i].vertex_offset, 0x70002000, - shell->tiles[i].unk4, - (&shell->tiles[i])->unkC) == 0) { - sky_build_gif_gouraud(shell->tiles[i].unk6, c_dest, a_dest, 0x70002000); + shell->tiles[i].vertex_count, + (&shell->tiles[i])->tri_offset) == 0) { + sky_build_gif_gouraud(shell->tiles[i].tri_count, tri_dest, st_dest, 0x70002000); } } } diff --git a/src/rendering/sky/sky_draw_shell_textured.c b/src/rendering/sky/sky_draw_shell_textured.c index 098da747ca..0434d8783a 100644 --- a/src/rendering/sky/sky_draw_shell_textured.c +++ b/src/rendering/sky/sky_draw_shell_textured.c @@ -5,15 +5,16 @@ #include "rnc/rendering/dma_tag.h" #include "rnc/data_labels.h" +/* A sky cluster header (0x20 bytes). */ struct SkyTile { - u128 bounds; /* 16-byte aligned: tile fields are addressed from the tile base */ - s32 address; - s16 unk4; - s16 unk6; - s16 unk8; - s16 unkA; - s16 unkC; - s16 unkE; + u128 bounds; /* 16-byte aligned: tile fields are addressed from the tile base */ + s32 address; /* cluster data */ + s16 vertex_count; + s16 tri_count; + s16 vertex_offset; + s16 st_offset; + s16 tri_offset; + s16 data_size; }; struct Shell { @@ -37,8 +38,8 @@ void sky_draw_shell_textured(struct Shell *shell) { u8 visibility[shell->count]; s32 i; s32 dest; - s32 c_dest; - s32 a_dest; + s32 tri_dest; + s32 st_dest; s32 next_tile_index; if (shell->count == 0) { @@ -56,7 +57,7 @@ void sky_draw_shell_textured(struct Shell *shell) { D_00160410 = 1 - D_00160410; if (visibility[0] == 1) { WriteDmaChannelRegisters( - shell->tiles[0].address, shell->tiles[0].unkE >> 4, D_00160408[D_00160410]); + shell->tiles[0].address, shell->tiles[0].data_size >> 4, D_00160408[D_00160410]); } for (i = 0; i < shell->count; i++) { @@ -68,19 +69,19 @@ void sky_draw_shell_textured(struct Shell *shell) { D_00160410 = 1 - D_00160410; if (next_tile_index < shell->count && visibility[next_tile_index] == 1) { WriteDmaChannelRegisters(shell->tiles[next_tile_index].address, - shell->tiles[next_tile_index].unkE >> 4, + shell->tiles[next_tile_index].data_size >> 4, D_00160408[D_00160410]); } if (visibility[i] == 1) { dest = D_00160408[1 - D_00160410]; - c_dest = dest + shell->tiles[i].unkC; - a_dest = dest + shell->tiles[i].unkA; - if (sky_transform_vertices(dest + shell->tiles[i].unk8, + tri_dest = dest + shell->tiles[i].tri_offset; + st_dest = dest + shell->tiles[i].st_offset; + if (sky_transform_vertices(dest + shell->tiles[i].vertex_offset, 0x70002000, - shell->tiles[i].unk4, - (&shell->tiles[i])->unkC) == 0) { - FUN_0022c208(shell->tiles[i].unk6, c_dest, a_dest, 0x70002000); + shell->tiles[i].vertex_count, + (&shell->tiles[i])->tri_offset) == 0) { + FUN_0022c208(shell->tiles[i].tri_count, tri_dest, st_dest, 0x70002000); } } } From 2642d532a63dff746cb94c4bb555f4d1915ee096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 10:55:54 +0000 Subject: [PATCH 007/213] chore: check-unit picks up header edits; cleanup guide says where names come from check-unit copies the checkout's changed headers into the baseline workspace and rebuilds the unit, so a header-only rename is measured instead of the stale copy. --- docs/contributing/code-cleanup.md | 5 +++++ scripts/check-unit.py | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/contributing/code-cleanup.md b/docs/contributing/code-cleanup.md index 5ee495d0de..112ffb7ed2 100644 --- a/docs/contributing/code-cleanup.md +++ b/docs/contributing/code-cleanup.md @@ -96,6 +96,11 @@ register that nothing set on that path (to keep it live) as - **Locals and fields:** name them by what they hold (`count`, `next`), not by register or offset (`v1`, `unk_70`). Keep `unkXXX` only until the meaning is clear. +- **Where names come from:** what the code does with the value first. SDK + code takes the names of the PS2 SDK headers (`sceSifServeData`, + `sceIpuDmaEnv`, `sceCdCLOCK`) or of newlib (`FILE`, `_reent`). A file-local + copy of a shared struct (a moby, a moby class) uses the names of its header + (`rnc/mobys/moby.h`), even when it keeps its own layout. ## Structs and data diff --git a/scripts/check-unit.py b/scripts/check-unit.py index 799e9de063..fb01b94c3e 100755 --- a/scripts/check-unit.py +++ b/scripts/check-unit.py @@ -75,6 +75,21 @@ def normalize_unit(value: str) -> str | None: return "/".join(parts) +def sync_headers(workspace: Path) -> bool: + """Copy the checkout's headers that differ into the workspace, so a unit + staged after a header edit compiles against the edited header. The + workspace build has no header dependencies: True means rebuild.""" + changed = False + for header in (ROOT / "include").rglob("*.h"): + target = workspace / "include" / header.relative_to(ROOT / "include") + data = header.read_bytes() + if not target.is_file() or target.read_bytes() != data: + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(data) + changed = True + return changed + + def find_ninja() -> str | None: venv_ninja = ROOT / ".venv" / "bin" / "ninja" if venv_ninja.is_file(): @@ -403,7 +418,8 @@ def main(argv=None) -> int: if ninja is None: return error("ninja was not found; install the requirements into .venv") - if workspace_source.read_text() != staged: + headers_changed = sync_headers(workspace) + if headers_changed or workspace_source.read_text() != staged: workspace_source.write_text(staged) object_target = f"build/src/{unit}.c.o" # The workspace was configured with the oracle present. Staging its C From d82cb3e83c9ca72f9435ecb80df2c1eb0db276b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 10:56:49 +0000 Subject: [PATCH 008/213] decomp: name delete_moby, scrolling status and class registration fields --- src/mobys/delete_moby.c | 4 ++-- src/ui/text/set_scrolling_status_message.c | 8 ++++---- src/ui/text/update_scrolling_status_message.c | 10 +++++----- src/world/loaders/register_moby_class.c | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mobys/delete_moby.c b/src/mobys/delete_moby.c index 8cbee3e126..0bd9a24fd2 100644 --- a/src/mobys/delete_moby.c +++ b/src/mobys/delete_moby.c @@ -4,7 +4,7 @@ struct MobyRef { u8 pad_0[0x38]; - s64 unk38; + s64 spawn_frame; }; extern s32 mark_moby_for_removal() __asm__("func_0020C828"); @@ -16,6 +16,6 @@ s32 delete_moby(struct MobyRef *moby) { return 0; } mark_moby_for_removal(); - moby->unk38 = (s64)world_update_time; + moby->spawn_frame = (s64)world_update_time; return 0; } diff --git a/src/ui/text/set_scrolling_status_message.c b/src/ui/text/set_scrolling_status_message.c index 49b91fe912..2e95b61eb1 100644 --- a/src/ui/text/set_scrolling_status_message.c +++ b/src/ui/text/set_scrolling_status_message.c @@ -3,9 +3,9 @@ struct ScrollingStatus { u8 pad_0[0x2C]; - s32 unk2C; + s32 text; u8 pad_30[0x14]; - s32 unk44; + s32 scroll; }; extern struct ScrollingStatus D_001E63C0; @@ -13,8 +13,8 @@ extern const char scrolling_status_message_format[] __asm__("D_001E8 void set_scrolling_status_message(s32 message) __asm__("FUN_00237e90"); void set_scrolling_status_message(s32 message) { - sprintf(D_001E63C0.unk2C, scrolling_status_message_format, message); - D_001E63C0.unk44 = 0; + sprintf(D_001E63C0.text, scrolling_status_message_format, message); + D_001E63C0.scroll = 0; } extern void func_00237E90(s32 arg0) __attribute__((alias("FUN_00237e90"))); diff --git a/src/ui/text/update_scrolling_status_message.c b/src/ui/text/update_scrolling_status_message.c index 6488af2681..00f3649ea8 100644 --- a/src/ui/text/update_scrolling_status_message.c +++ b/src/ui/text/update_scrolling_status_message.c @@ -3,9 +3,9 @@ struct ScrollingStatus { u8 pad_0[0x2C]; - s32 unk2C; + s32 text; u8 pad_30[0x14]; - s32 unk44; + s32 scroll; }; extern struct ScrollingStatus D_001E63C0; @@ -19,14 +19,14 @@ void update_scrolling_status_message(void) __asm__("FUN_00238520"); void update_scrolling_status_message(void) { draw_framebuffer_rect(0, 0, 0x200, 0x80, 0x200, 0x80, 0); - if ((strlen(D_001E63C0.unk2C) - ((s32)D_001E63C0.unk44 / 20)) > 0) { - D_001E63C0.unk44 = (s32)(D_001E63C0.unk44 + 2); + if ((strlen(D_001E63C0.text) - ((s32)D_001E63C0.scroll / 20)) > 0) { + D_001E63C0.scroll = (s32)(D_001E63C0.scroll + 2); } else { u8 *base_1e5fb8 = (u8 *)scrolling_status_message_ids; set_scrolling_status_message(get_help_message_text( *(s32 *)(void *)((random_integer_below(0x18) * 4) + base_1e5fb8))); } - render_capture_scrolling_text(D_001E63C0.unk2C, -D_001E63C0.unk44, 8, 2.0f); + render_capture_scrolling_text(D_001E63C0.text, -D_001E63C0.scroll, 8, 2.0f); draw_framebuffer_rect(0, 0, 4, 0x40, 0x200, 0x80, 0); draw_framebuffer_rect(0xE2, 0, 0xE6, 0x40, 0x200, 0x80, 0); } diff --git a/src/world/loaders/register_moby_class.c b/src/world/loaders/register_moby_class.c index 8bb7f6b3dc..0f31034f86 100644 --- a/src/world/loaders/register_moby_class.c +++ b/src/world/loaders/register_moby_class.c @@ -6,7 +6,7 @@ /* Class data block of a moby class in the level file (not a Moby instance). */ typedef struct MobyClassData { u8 pad[0x2C]; - s32 unk2C; + s32 callbacks; /* MobyClass.callbacks */ } MobyClassData; extern void @@ -27,7 +27,7 @@ void register_moby_class(MobyClassData *moby, s32 indexed_textures, s32 material assign_moby_class_data(oclass); D_0015FF00++; } else { - D_001B6180[class_slot] = moby->unk2C; + D_001B6180[class_slot] = moby->callbacks; assign_moby_class_data(oclass); D_0015FF00++; prepare_resident_class_render_data(moby, indexed_textures, material_map, oclass); From 4defb37a7250587a0fb38660280b44d1a7b13a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 10:36:26 +0000 Subject: [PATCH 009/213] decomp: name level 11 moby fields Puffoid, psytcopus, resort owner, teleporter, blarg ship, ammo crate and smaller l11 pvars: hit points, knockback motion block, path goal and reach, gates and volumes, teleporter destinations and part motion. --- src/overlays/l11/mobys/ammocrate.c | 54 ++++--- src/overlays/l11/mobys/blarg_ship.c | 92 ++++++------ src/overlays/l11/mobys/bubble.c | 26 ++-- .../l11/mobys/link_triggered_moby_motion.c | 34 ++--- src/overlays/l11/mobys/owner_linked_moby.c | 8 +- src/overlays/l11/mobys/psytcopus.c | 91 +++++------ src/overlays/l11/mobys/puffoid.c | 104 +++++++------ src/overlays/l11/mobys/resort_owner.c | 141 +++++++++--------- src/overlays/l11/mobys/teleporter.c | 91 +++++------ src/overlays/l11/mobys/two_door_gate.c | 12 +- src/overlays/l11/mobys/water_tile.c | 12 +- 11 files changed, 342 insertions(+), 323 deletions(-) diff --git a/src/overlays/l11/mobys/ammocrate.c b/src/overlays/l11/mobys/ammocrate.c index 4afb0778e9..be57e76845 100644 --- a/src/overlays/l11/mobys/ammocrate.c +++ b/src/overlays/l11/mobys/ammocrate.c @@ -79,15 +79,12 @@ void ammocrate_update(struct Moby *m) __asm__("FUN_L11_0030f728"); typedef struct AmmocrateVars { u8 pad_0[0x10]; - u8 unk10; - u8 pad_11[0x7]; - f32 unk18; - u8 pad_1C[0x4]; + f32 velocity[4]; f32 unk20[4]; - f32 unk30; - struct Moby *unk34; + f32 wobble_phase; + struct Moby *child; u8 pad_38[0x38]; - char *unk70; + char *owner; } AmmocrateVars; /* Moby classes 1218, 1220 */ @@ -120,7 +117,7 @@ void ammocrate_update(struct Moby *pickup) { taken = 1; } else { FUN_L00_0025e450_f728(pickup, - &pickup_vars->unk10, + pickup_vars->velocity, &pickup_vector_scratch, 0.0f, 0.0f, @@ -151,8 +148,8 @@ void ammocrate_update(struct Moby *pickup) { } if (taken || ship_pickup_distance_metric < 4.0f || mid < 4.0f) { pickup->collision = 0; - if (pickup_vars->unk34 != 0) { - pickup_vars->unk34->collision = 0; + if (pickup_vars->child != 0) { + pickup_vars->child->collision = 0; } switch (pickup->oclass) { case OCLASS_SHIP_AMMO_PICKUP: @@ -185,19 +182,19 @@ void ammocrate_update(struct Moby *pickup) { } switch (pickup->state) { case AMMOCRATE_STATE_INITIALIZE: - pickup_vars->unk34 = 0; + pickup_vars->child = 0; sync_ship_pickup_child_pose(pickup, pickup_vars); - pickup_vars->unk30 = 0.0f; + pickup_vars->wobble_phase = 0.0f; pickup->state = AMMOCRATE_STATE_DAMPED_FALL; break; case AMMOCRATE_STATE_DAMPED_FALL: - fast_vec_scale(&pickup_vars->unk10, &pickup_vars->unk10, 0.9f); - pickup_vars->unk18 -= frame_time_sq * 9.8f; - fast_vec_add(pickup_vars, pickup_vars, &pickup_vars->unk10); + fast_vec_scale(pickup_vars->velocity, pickup_vars->velocity, 0.9f); + pickup_vars->velocity[2] -= frame_time_sq * 9.8f; + fast_vec_add(pickup_vars, pickup_vars, pickup_vars->velocity); fast_vec_add(&pickup->pos, pickup_vars, pickup_vars->unk20); if (sync_ship_pickup_child_pose(pickup, pickup_vars)) { - if (pickup_vars->unk34->seq == 1) { - fast_vec_scale(&pickup_vars->unk10, &pickup_vars->unk10, 0.8f); + if (pickup_vars->child->seq == 1) { + fast_vec_scale(pickup_vars->velocity, pickup_vars->velocity, 0.8f); pickup->state = AMMOCRATE_STATE_ATTRACT_TO_SHIP; } } @@ -205,28 +202,29 @@ void ammocrate_update(struct Moby *pickup) { case AMMOCRATE_STATE_ATTRACT_TO_SHIP: { float k = 0.8f; pickup->rot.z = fast_add_rotations(pickup->rot.z, frame_time * 0.034906585f); - pickup_vars->unk30 = fast_add_rotations(pickup_vars->unk30, frame_time * 1.5707964f); - pickup->rot.y = fast_cos(pickup_vars->unk30) * 0.7853982f; - fast_vec_scale(&pickup_vars->unk10, &pickup_vars->unk10, k); - pickup_vars->unk18 -= frame_time_sq * 9.8f; + pickup_vars->wobble_phase = + fast_add_rotations(pickup_vars->wobble_phase, frame_time * 1.5707964f); + pickup->rot.y = fast_cos(pickup_vars->wobble_phase) * 0.7853982f; + fast_vec_scale(pickup_vars->velocity, pickup_vars->velocity, k); + pickup_vars->velocity[2] -= frame_time_sq * 9.8f; if (ship_pickup_distance_metric < 40.0f && pickup->visible != 0) { k = k / square_root(ship_pickup_distance_metric); fast_vec_sub(&pickup_vector_scratch, &ship->pos, &pickup->pos); fast_vec_normalize(&pickup_vector_scratch, &pickup_vector_scratch, k); - fast_vec_add(&pickup_vars->unk10, &pickup_vars->unk10, &pickup_vector_scratch); + fast_vec_add(pickup_vars->velocity, pickup_vars->velocity, &pickup_vector_scratch); } - fast_vec_add(pickup_vars, pickup_vars, &pickup_vars->unk10); + fast_vec_add(pickup_vars, pickup_vars, pickup_vars->velocity); fast_vec_add(&pickup->pos, pickup_vars, pickup_vars->unk20); if (sync_ship_pickup_child_pose(pickup, pickup_vars)) { - if (pickup_vars->unk34->state == 2) { - pickup->state = pickup_vars->unk34->state; + if (pickup_vars->child->state == 2) { + pickup->state = pickup_vars->child->state; } } break; } case AMMOCRATE_STATE_FREE_FALL: - pickup_vars->unk18 -= frame_time_sq * 9.8f; - fast_vec_add(&pickup->pos, &pickup->pos, &pickup_vars->unk10); + pickup_vars->velocity[2] -= frame_time_sq * 9.8f; + fast_vec_add(&pickup->pos, &pickup->pos, pickup_vars->velocity); break; case AMMOCRATE_STATE_COLLECTED: pickup->state = AMMOCRATE_STATE_REMOVE; @@ -275,7 +273,7 @@ char *spawn_ship_pickup_child(struct Moby *pickup_moby) { moby[0xBC] = 0; qcopy(moby + 0x10, &pickup_moby->pos); qcopy(moby + 0x40, &pickup_moby->rot); - child_private_data->unk70 = pickup_moby; + child_private_data->owner = pickup_moby; if ((unsigned char)moby[0x53] != 2) { blend_moby_animation(moby, 2, 0xD, 0); } diff --git a/src/overlays/l11/mobys/blarg_ship.c b/src/overlays/l11/mobys/blarg_ship.c index 106f72591f..4285fd822e 100644 --- a/src/overlays/l11/mobys/blarg_ship.c +++ b/src/overlays/l11/mobys/blarg_ship.c @@ -89,21 +89,21 @@ extern int scale_game_frames(int); typedef struct BlargShipVars { u8 pad_0[0x60]; s32 path_60; - s32 unk64; - f32 unk68; - f32 unk6C; - f32 unk70; - f32 unk74; + s32 path_point; + f32 path_progress; + f32 speed; + f32 spin_angle; + f32 spin_speed; f32 unk78; u8 pad_7C[0x8]; - s32 unk84; - s32 unk88; - f32 unk8C; - f32 unk90; - f32 unk94; - s32 unk98; + s32 reactivate_timer; + s32 formation_slot; + f32 yaw_turn_velocity; + f32 pitch_turn_velocity; + f32 shot_lead_scale; + s32 maneuver_timer; u8 pad_9C[0x14]; - f32 unkB0[4]; + f32 last_hero_pos[4]; } BlargShipVars; /* Moby class 1319 */ @@ -140,11 +140,12 @@ void blarg_ship_update(struct Moby *moby) { case BLARG_SHIP_INITIALIZE: moby->draw_dist = 0xFF; moby->update_dist = 0xFF; - if (moby_vars->unk88 == 0) { + if (moby_vars->formation_slot == 0) { moby->state = BLARG_SHIP_FOLLOW_PATH; - moby_vars->unk6C = randf_sym(0.3f, 0.5f); - moby_vars->unk70 = random_angle_radians(); - moby_vars->unk74 = randf_sym(60.0f, 120.0f) * DEG_TO_RAD * frame_scale_inv_macro[1]; + moby_vars->speed = randf_sym(0.3f, 0.5f); + moby_vars->spin_angle = random_angle_radians(); + moby_vars->spin_speed = + randf_sym(60.0f, 120.0f) * DEG_TO_RAD * frame_scale_inv_macro[1]; moby_vars->unk78 = random_float_between(8.0f, 12.0f); } else { moby->state = BLARG_SHIP_INACTIVE; @@ -155,16 +156,18 @@ void blarg_ship_update(struct Moby *moby) { case BLARG_SHIP_FOLLOW_PATH: case BLARG_SHIP_BURST_AND_WAIT_TO_REACTIVATE: update_moby_trail_points(moby); - moby_vars->unk68 += moby_vars->unk6C; - if (moby_vars->unk68 > 1.0f) { - moby_vars->unk68 -= 1.0f; - moby_vars->unk64 = (moby_vars->unk64 + 1) % l11_paths[moby_vars->path_60]->count; - } else if (moby_vars->unk68 < 0.0f) { - moby_vars->unk68 += 1.0f; - moby_vars->unk64 = (moby_vars->unk64 + l11_paths[moby_vars->path_60]->count - 1) % - l11_paths[moby_vars->path_60]->count; + moby_vars->path_progress += moby_vars->speed; + if (moby_vars->path_progress > 1.0f) { + moby_vars->path_progress -= 1.0f; + moby_vars->path_point = + (moby_vars->path_point + 1) % l11_paths[moby_vars->path_60]->count; + } else if (moby_vars->path_progress < 0.0f) { + moby_vars->path_progress += 1.0f; + moby_vars->path_point = + (moby_vars->path_point + l11_paths[moby_vars->path_60]->count - 1) % + l11_paths[moby_vars->path_60]->count; } - fast_add_rotations(moby_vars->unk70, moby_vars->unk74); + fast_add_rotations(moby_vars->spin_angle, moby_vars->spin_speed); update_moby_path_transform(moby); if (moby->state == BLARG_SHIP_BURST_AND_WAIT_TO_REACTIVATE) { cart_burst(moby, &moby->pos, -1, 2.0f, 13.0f); @@ -191,8 +194,8 @@ void blarg_ship_update(struct Moby *moby) { scratch_vector[3] = 3.0f; if (fast_bsphere_check((char *)&moby->pos, 512.0f) == -1) { if (fast_vec_dist(&moby->pos, &hero.motion.pos) > 32.0f) { - moby_vars->unk84 += 1; - if (scale_game_frames(60) < moby_vars->unk84) { + moby_vars->reactivate_timer += 1; + if (scale_game_frames(60) < moby_vars->reactivate_timer) { moby->state = BLARG_SHIP_FOLLOW_PATH; if (moby->prev_seq) { blend_moby_animation(moby, 0, 0, scale_game_frames(10)); @@ -201,10 +204,10 @@ void blarg_ship_update(struct Moby *moby) { moby->collision = moby->pclass->collision; } } else { - moby_vars->unk84 = 0; + moby_vars->reactivate_timer = 0; } } else { - moby_vars->unk84 = 0; + moby_vars->reactivate_timer = 0; } break; case BLARG_SHIP_INACTIVE: @@ -219,10 +222,11 @@ void blarg_ship_update(struct Moby *moby) { basis_rotation_angles[1] = -0.2617994f; } euler_rotation_basis(basis_row0, basis_rotation_angles); - fast_vec_sub(hero_position_delta, &hero.motion.pos, moby_vars->unkB0); - qcopy(moby_vars->unkB0, &hero.motion.pos); + fast_vec_sub(hero_position_delta, &hero.motion.pos, moby_vars->last_hero_pos); + qcopy(moby_vars->last_hero_pos, &hero.motion.pos); fast_vec_add(&moby->pos, &moby->pos, hero_position_delta); - placement_angle = fast_add_rotations(0.7853982f, (float)moby_vars->unk88 * 1.5707964f); + placement_angle = + fast_add_rotations(0.7853982f, (float)moby_vars->formation_slot * 1.5707964f); fast_vec_normalize(scratch_vector, basis_row1, fast_sin(placement_angle) * 8.0f); fast_vec_add(target_position, D_L11_001677C0_c, scratch_vector); fast_vec_normalize(scratch_vector, basis_row2, fast_cos(placement_angle) * 8.0f); @@ -233,35 +237,35 @@ void blarg_ship_update(struct Moby *moby) { distance_to_target = fast_vec_length(scratch_vector); if (*(char *)&hero.ship_flags & 2) { advance_accelerated_scalar(&movement_distance_scratch, - &moby_vars->unk6C, + &moby_vars->speed, distance_to_target, frame_time_sq + frame_time_sq, frame_time_sq * 20.0f, frame_scale_inv_macro[1]); } else if (moby->command) { advance_accelerated_scalar(&movement_distance_scratch, - &moby_vars->unk6C, + &moby_vars->speed, distance_to_target, frame_time_sq + frame_time_sq, frame_time_sq * 20.0f, frame_scale_inv_macro[1] * 15.0f); } else { advance_accelerated_scalar(&movement_distance_scratch, - &moby_vars->unk6C, + &moby_vars->speed, distance_to_target, frame_time_sq + frame_time_sq, frame_time_sq * 20.0f, frame_scale_inv_macro[1] * 5.0f); } - FUN_L00_0025f730(scratch_vector, moby_vars->unk6C); + FUN_L00_0025f730(scratch_vector, moby_vars->speed); fast_vec_add(&moby->pos.x, &moby->pos.x, scratch_vector); if (moby->command) { if (moby->visible) { - moby_vars->unk98 += 1; + moby_vars->maneuver_timer += 1; } if (fast_vec_dist(target_position, &moby->pos.x) < 2.0f) { moby->command = 0; - } else if (scale_game_frames(120) < moby_vars->unk98) { + } else if (scale_game_frames(120) < moby_vars->maneuver_timer) { moby->command = 0; } } else { @@ -272,7 +276,7 @@ void blarg_ship_update(struct Moby *moby) { fast_vec_sub(direction_to_hero, hero_position, &moby->pos.x); steering_target_angle = fast_arc_tan(direction_to_hero[0], direction_to_hero[1]); approach_angle(yaw, - &moby_vars->unk8C, + &moby_vars->yaw_turn_velocity, steering_target_angle, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, @@ -280,15 +284,15 @@ void blarg_ship_update(struct Moby *moby) { steering_target_angle = -fast_arc_tan(vector_length_xy(direction_to_hero), direction_to_hero[2]); approach_angle(pitch, - &moby_vars->unk90, + &moby_vars->pitch_turn_velocity, steering_target_angle, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, frame_scale_inv_macro[1] * 12.566371f); if (level_frame % 10 == 0) { allocate_voice_for_target_entry(2, 0, (int)moby); - approach_value(&moby_vars->unk94, 0.0f, 0.25f); - fast_vec_normalize(sB0, hero_position_delta, moby_vars->unk94); + approach_value(&moby_vars->shot_lead_scale, 0.0f, 0.25f); + fast_vec_normalize(sB0, hero_position_delta, moby_vars->shot_lead_scale); fast_vec_add(sB0, sB0, hero_position); if (level_frame % 20 == 0) { transform_vector_by_basis( @@ -322,8 +326,8 @@ void blarg_ship_update(struct Moby *moby) { break; case BLARG_SHIP_BURST_AND_DEACTIVATE: *(unsigned short *)(D_00141C18) = 0xFFFF; - fast_vec_sub(scratch_vector, &hero.motion.pos, moby_vars->unkB0); - qcopy(moby_vars->unkB0, &hero.motion.pos); + fast_vec_sub(scratch_vector, &hero.motion.pos, moby_vars->last_hero_pos); + qcopy(moby_vars->last_hero_pos, &hero.motion.pos); fast_vec_add(&moby->pos, &moby->pos, scratch_vector); cart_burst(moby, &moby->pos, -1, 2.0f, 13.0f); if (random_integer_below(2)) { diff --git a/src/overlays/l11/mobys/bubble.c b/src/overlays/l11/mobys/bubble.c index 1d19daa810..874e408af6 100644 --- a/src/overlays/l11/mobys/bubble.c +++ b/src/overlays/l11/mobys/bubble.c @@ -55,10 +55,10 @@ void bubble_update(struct Moby *bubble_moby) __asm__("FUN_L11_0031ab08") typedef struct BubbleVars { u8 pad_0[0x8]; - f32 unk8; + f32 velocity_z; u8 pad_C[0x16]; - s16 unk22; - f32 *unk24; + s16 offscreen_frames; + f32 *surface_z; } BubbleVars; /* Moby class 1524 */ @@ -73,40 +73,42 @@ void bubble_update(struct Moby *bubble_moby) { float rate; char *spawned_effect; if (bubble_moby->visible == 0) { - if (++bubble_vars->unk22 > scale_game_frames(0xF)) { + if (++bubble_vars->offscreen_frames > scale_game_frames(0xF)) { mark_moby_for_removal(bubble_moby); return; } } else { - bubble_vars->unk22 = 0; + bubble_vars->offscreen_frames = 0; } switch (bubble_moby->state) { case BUBBLE_MOVE_UNTIL_SURFACE_CROSSING: - bubble_vars->unk8 -= *(float *)&bubble_pre_surface_vertical_acceleration_gp * frame_time_sq; - if (*bubble_vars->unk24 + 3.0f < bubble_moby->pos.z) { + bubble_vars->velocity_z -= + *(float *)&bubble_pre_surface_vertical_acceleration_gp * frame_time_sq; + if (*bubble_vars->surface_z + 3.0f < bubble_moby->pos.z) { if (random_integer_below(*(int *)&bubble_spark_spawn_random_limit_gp) == 0) { FUN_L11_0031b098_c(bubble_moby); } } - if (bubble_moby->pos.z < *bubble_vars->unk24) { + if (bubble_moby->pos.z < *bubble_vars->surface_z) { fast_vec_scale( bubble_vars, bubble_vars, *(float *)&bubble_surface_crossing_velocity_scale_gp); bubble_moby->state = BUBBLE_SHRINK_TO_REMOVAL; - spawn_bubble_surface_effects((struct Moby *)bubble_moby, bubble_vars->unk24, 8, 4); + spawn_bubble_surface_effects((struct Moby *)bubble_moby, bubble_vars->surface_z, 8, 4); } break; case BUBBLE_SHRINK_TO_REMOVAL: - bubble_vars->unk8 -= *(float *)&bubble_shrink_vertical_acceleration_gp * frame_time_sq; + bubble_vars->velocity_z -= + *(float *)&bubble_shrink_vertical_acceleration_gp * frame_time_sq; rate = bubble_moby->pclass->scale / (float)scale_game_frames(0x3C); if ((level_frame & 3) == 0) { - spawn_bubble_surface_effects((struct Moby *)bubble_moby, bubble_vars->unk24, 0, 1); + spawn_bubble_surface_effects((struct Moby *)bubble_moby, bubble_vars->surface_z, 0, 1); random_vector(randomized_effect_vector, 0.0f, frame_scale_inv_macro[1]); randomized_effect_vector[2] = absolute_float(randomized_effect_vector[2]); spawned_effect = func_L00_0026FF20_p(&bubble_moby->pos, randomized_effect_vector, *(float *)&l11_bubble_shrink_effect_randomization_scale, - *bubble_vars->unk24); + *bubble_vars->surface_z); if (spawned_effect != 0) { *(int *)(spawned_effect + 4) = fast_tween_color(*(int *)&bubble_shrink_effect_color_range_start_gp, diff --git a/src/overlays/l11/mobys/link_triggered_moby_motion.c b/src/overlays/l11/mobys/link_triggered_moby_motion.c index 657eec76f9..95fba2dfc6 100644 --- a/src/overlays/l11/mobys/link_triggered_moby_motion.c +++ b/src/overlays/l11/mobys/link_triggered_moby_motion.c @@ -29,11 +29,11 @@ void link_triggered_moby_motion_update(struct Moby *moving_moby) __asm__("FUN_L1 typedef struct LinkTriggeredMobyMotionVars { u8 pad_0[0x4]; - f32 unk4; - s32 unk8; - f32 unkC; - f32 unk10; - s32 unk14; + f32 speed; + s32 linked_moby; + f32 size_scale; + f32 travel_distance; + s32 trigger_record_offset; } LinkTriggeredMobyMotionVars; /* Moby class 1159 */ @@ -51,7 +51,7 @@ void link_triggered_moby_motion_update(struct Moby *moving_moby) { struct MobyClass *source_moby_class; switch (moving_moby->state) { case LINKED_MOTION_STATE_INITIALIZE: - moving_moby->pos.z = moving_moby->pos.z + private_data->unkC * 1.9f; + moving_moby->pos.z = moving_moby->pos.z + private_data->size_scale * 1.9f; spawned_moby = (struct Moby *)create_moby(0x487); spawned_moby->visible = 1; spawned_moby->draw_dist = 0x40; @@ -62,36 +62,36 @@ void link_triggered_moby_motion_update(struct Moby *moving_moby) { spawned_moby->rot.x = fast_add_rotations(spawned_moby->rot.x, 3.1415927f); update_entity(spawned_moby); spawned_private_data = (char *)spawned_moby->pvars; - *(int *)(spawned_private_data + 8) = private_data->unk8; - *(float *)(spawned_private_data + 0x10) = private_data->unk10; - *(int *)(spawned_private_data + 0x14) = private_data->unk14; + *(int *)(spawned_private_data + 8) = private_data->linked_moby; + *(float *)(spawned_private_data + 0x10) = private_data->travel_distance; + *(int *)(spawned_private_data + 0x14) = private_data->trigger_record_offset; source_moby_class = moving_moby->pclass; - moving_moby->scale = source_moby_class->scale * private_data->unkC; - spawned_moby->scale = source_moby_class->scale * private_data->unkC; + moving_moby->scale = source_moby_class->scale * private_data->size_scale; + spawned_moby->scale = source_moby_class->scale * private_data->size_scale; spawned_moby->state = LINKED_MOTION_STATE_WAIT_FOR_LINK_TRIGGER; moving_moby->state = LINKED_MOTION_STATE_WAIT_FOR_LINK_TRIGGER; break; case LINKED_MOTION_STATE_WAIT_FOR_LINK_TRIGGER: - linked_moby = (struct Moby *)((private_data->unk8 << 8) + (int)D_L11_0015FFD8); + linked_moby = (struct Moby *)((private_data->linked_moby << 8) + (int)D_L11_0015FFD8); if (linked_moby->oclass == 0x267 && linked_moby->state == 4) { goto go; } if (linked_moby->oclass == 0x33E && linked_moby->command != 0) { go: moving_moby->state = LINKED_MOTION_STATE_MOVE_ALONG_LOCAL_AXIS; - ((Rec57 *)(private_data->unk14 + (int)(alternate_item_available)))->motion_triggered = - 1; + ((Rec57 *)(private_data->trigger_record_offset + (int)(alternate_item_available))) + ->motion_triggered = 1; allocate_voice_for_target_entry(0, 0, moving_moby); } break; case LINKED_MOTION_STATE_MOVE_ALONG_LOCAL_AXIS: advance_accelerated_scalar((float *)private_data, - &private_data->unk4, - private_data->unk10, + &private_data->speed, + private_data->travel_distance, frame_time_sq, frame_time_sq, frame_time + frame_time); - fast_vec_normalize(motion_displacement, &moving_moby->rot_row1, -private_data->unk4); + fast_vec_normalize(motion_displacement, &moving_moby->rot_row1, -private_data->speed); fast_vec_add(&moving_moby->pos, &moving_moby->pos, motion_displacement); break; } diff --git a/src/overlays/l11/mobys/owner_linked_moby.c b/src/overlays/l11/mobys/owner_linked_moby.c index 7ab4c9ce38..0c5c3cb543 100644 --- a/src/overlays/l11/mobys/owner_linked_moby.c +++ b/src/overlays/l11/mobys/owner_linked_moby.c @@ -99,9 +99,9 @@ void owner_linked_moby_update(struct Moby *moby) __asm__("FUN_L11_00310028"); typedef struct OwnerLinkedMobyVars { u8 pad_0[0x20]; - u8 unk20; + u8 health; u8 pad_21[0x4F]; - u8 *unk70; + u8 *owner; } OwnerLinkedMobyVars; /* Moby class 1219 */ @@ -110,8 +110,8 @@ void owner_linked_moby_update(struct Moby *moby) { MOBY_STATE_MARKED_FOR_REMOVAL = 0xFE }; OwnerLinkedMobyVars *owner_linked_moby_vars = (OwnerLinkedMobyVars *)moby->pvars; - char *health_ptr = &owner_linked_moby_vars->unk20; - struct Moby *owner_moby = owner_linked_moby_vars->unk70; + char *health_ptr = &owner_linked_moby_vars->health; + struct Moby *owner_moby = owner_linked_moby_vars->owner; if (owner_moby == 0 || owner_moby->state == MOBY_STATE_MARKED_FOR_REMOVAL || owner_moby->state == 0xFD) { if (moby->state < LINKED_MOBY_STATE_FADE_OUT) { diff --git a/src/overlays/l11/mobys/psytcopus.c b/src/overlays/l11/mobys/psytcopus.c index 8adb389278..8251dcdd30 100644 --- a/src/overlays/l11/mobys/psytcopus.c +++ b/src/overlays/l11/mobys/psytcopus.c @@ -32,7 +32,7 @@ struct PokiPathVars { f32 health; /* 0x20 */ s16 unk24; /* 0x24 */ u8 pad_26[2]; - u8 unk28; /* 0x28 */ + u8 hit_response_class; /* 0x28 */ u8 pad_29; u8 unk2A; /* 0x2A */ u8 pad_2B[0x2D]; @@ -40,41 +40,41 @@ struct PokiPathVars { u8 pad_59; u8 unk5A; /* 0x5A */ u8 pad_5B[5]; - u8 unk60[7]; /* 0x60: passed to trooper_anim_update / trooper_anim_finish */ + u8 move[7]; /* 0x60: passed to trooper_anim_update / trooper_anim_finish */ u8 hit_reaction_channel_target; /* 0x67 */ u8 pad_68[8]; - u8 unk70[0x10]; /* 0x70: passed to trooper_start_knockback / step_moby_motion */ - f32 unk80; /* 0x80 */ + u8 motion[0x10]; /* 0x70: passed to trooper_start_knockback / step_moby_motion */ + f32 knockback_gravity; /* 0x80 */ f32 knockback_speed_approach_step; /* 0x84 */ - f32 unk88; /* 0x88 */ + f32 knockback_speed; /* 0x88 */ f32 knockback_vertical_speed; /* 0x8C */ s32 knockback_collision_radius; /* 0x90 */ s32 unk94; /* 0x94 */ - f32 unk98; /* 0x98 */ + f32 knockback_collision_z_offset; /* 0x98 */ u8 pad_9C[0x11]; u8 unkAD; /* 0xAD */ u8 pad_AE[0x12]; - f32 unkC0; /* 0xC0 */ - f32 unkC4; /* 0xC4 */ + f32 knockback_apex_animation_frame; /* 0xC0 */ + f32 knockback_landing_animation_frame; /* 0xC4 */ u8 pad_C8[8]; - Vec4f unkD0; /* 0xD0 */ + Vec4f goal; /* 0xD0 */ u8 pad_E0[0x30]; struct Moby *target; /* 0x110 */ s32 unk114; /* 0x114 */ u8 pad_118[0x18]; - s32 unk130; /* 0x130 */ - s32 unk134; /* 0x134 */ + s32 unk130; /* 0x130 */ + s32 start_path; /* 0x134 */ u8 pad_138[4]; - s32 unk13C; /* 0x13C */ - f32 unk140; /* 0x140 */ + s32 path_index; /* 0x13C */ + f32 reach; /* 0x140 */ u8 pad_144[8]; - f32 unk14C; /* 0x14C */ + f32 yaw_turn_velocity; /* 0x14C */ u8 pad_150[8]; s32 knockback_extension_timer; /* 0x158 */ u8 pad_15C[4]; void *held_projectile; /* 0x160 */ u8 pad_164[0x7C]; - u8 unk1E0[0x10]; /* 0x1E0 */ + u8 manipulator[0x10]; /* 0x1E0 */ }; extern struct Moby *D_001413D0 NOT_SDA; @@ -128,7 +128,7 @@ void psytcopus_update(struct Moby *psytcopus) { handle_psytcopus_hits(psytcopus); target = psytcopus_vars->target; - FUN_L00_00263ac8_0180(psytcopus, 0, psytcopus_vars->unk1E0, 2.5f); + FUN_L00_00263ac8_0180(psytcopus, 0, psytcopus_vars->manipulator, 2.5f); if (psytcopus->visible != 0 && fast_vec_dist(&psytcopus->pos, D_L11_001677C0) < 28.0f) { FUN_L00_0025a120_p(psytcopus); psytcopus->shadow_range = 0x16; @@ -137,7 +137,7 @@ void psytcopus_update(struct Moby *psytcopus) { case PSYTCOPUS_STATE_INITIALIZE: psytcopus_vars->unk24 = 3; psytcopus_vars->health = 3.0f; - psytcopus_vars->unk28 = 2; + psytcopus_vars->hit_response_class = 2; psytcopus_vars->unk2A = 6; psytcopus_vars->unk58 = truncate_float_to_s32(8.0f); psytcopus_vars->unk5A = truncate_float_to_s32(8.0f); @@ -147,7 +147,7 @@ void psytcopus_update(struct Moby *psytcopus) { } if (psytcopus_vars->unk130 != 0) { psytcopus->state = 1; - qcopy(&psytcopus->pos, (char *)(s32 *)l11_paths[psytcopus_vars->unk134] + 0x10); + qcopy(&psytcopus->pos, (char *)(s32 *)l11_paths[psytcopus_vars->start_path] + 0x10); break; } psytcopus->state = PSYTCOPUS_STATE_FACE_PLAYER; @@ -161,7 +161,7 @@ void psytcopus_update(struct Moby *psytcopus) { D_001413D0->pos.y - psytcopus->pos.y); approach_angle(yaw, angle, - &psytcopus_vars->unk14C, + &psytcopus_vars->yaw_turn_velocity, frame_time_sq * 6.2831855f, frame_time_sq * 6.2831855f, frame_time * 6.2831855f); @@ -178,7 +178,7 @@ void psytcopus_update(struct Moby *psytcopus) { angle = fast_arc_tan(target->pos.x - psytcopus->pos.x, target->pos.y - psytcopus->pos.y); approach_angle(yaw, angle, - &psytcopus_vars->unk14C, + &psytcopus_vars->yaw_turn_velocity, frame_time_sq * 6.2831855f, frame_time_sq * 6.2831855f, frame_time * 6.2831855f); @@ -205,7 +205,7 @@ void psytcopus_update(struct Moby *psytcopus) { angle = fast_arc_tan(target->pos.x - psytcopus->pos.x, target->pos.y - psytcopus->pos.y); approach_angle(yaw, angle, - &psytcopus_vars->unk14C, + &psytcopus_vars->yaw_turn_velocity, frame_time_sq * 6.2831855f, frame_time_sq * 6.2831855f, frame_time * 6.2831855f); @@ -234,9 +234,9 @@ void psytcopus_update(struct Moby *psytcopus) { } break; case PSYTCOPUS_STATE_KNOCKBACK: - knockback_result_flags = FUN_L00_0025c698_p(psytcopus, psytcopus_vars->unk70); + knockback_result_flags = FUN_L00_0025c698_p(psytcopus, psytcopus_vars->motion); if (knockback_result_flags & 0x41) { - path = (s32 *)l11_paths[psytcopus_vars->unk13C]; + path = (s32 *)l11_paths[psytcopus_vars->path_index]; if (FUN_L00_00259740_p(&psytcopus->pos, path + 4, *path) != 0) { psytcopus->state = PSYTCOPUS_STATE_FACE_PLAYER; if (psytcopus->prev_seq != 0) { @@ -253,7 +253,7 @@ void psytcopus_update(struct Moby *psytcopus) { } break; case PSYTCOPUS_STATE_DEATH_KNOCKBACK: - if (FUN_L00_0025c698_p(psytcopus, psytcopus_vars->unk70) & 0x160) { + if (FUN_L00_0025c698_p(psytcopus, psytcopus_vars->motion) & 0x160) { FUN_L00_0025f3e8_p(psytcopus, &psytcopus->pos, -1, 1.0f, 10.0f); FUN_L00_00257470_p(psytcopus, 0, -1); mark_moby_for_removal(psytcopus); @@ -312,8 +312,8 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { hit_reaction = 1; } psytcopus_vars->knockback_collision_radius = truncate_float_to_s32(512.0f); - psytcopus_vars->unk98 = 0.5f; - psytcopus_vars->unk80 = psytcopus_knockback_base_gravity_gp * frame_time_sq; + psytcopus_vars->knockback_collision_z_offset = 0.5f; + psytcopus_vars->knockback_gravity = psytcopus_knockback_base_gravity_gp * frame_time_sq; psytcopus_vars->knockback_speed_approach_step = 0.0005f; psytcopus_vars->unk94 = 9; psytcopus_vars->unkAD = 0; @@ -331,11 +331,12 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { case HIT_REACTION_KNOCKBACK_WITH_PROJECTILE_CANCELLATION_AND_TIMER_EXTENSION: case HIT_REACTION_KNOCKBACK_WITH_SOURCE_RELATIVE_HEADING: case HIT_REACTION_KNOCKBACK_WITH_SOURCE_RELATIVE_HEADING_AND_TIMER_EXTENSION: - psytcopus_vars->unk88 = psytcopus_hurt_knockback_base_horizontal_speed_gp * frame_time; + psytcopus_vars->knockback_speed = + psytcopus_hurt_knockback_base_horizontal_speed_gp * frame_time; psytcopus_vars->knockback_vertical_speed = psytcopus_hurt_knockback_base_vertical_speed_gp * frame_time; - psytcopus_vars->unkC0 = 3.0f; - psytcopus_vars->unkC4 = 6.0f; + psytcopus_vars->knockback_apex_animation_frame = 3.0f; + psytcopus_vars->knockback_landing_animation_frame = 6.0f; source_to_psytcopus_heading = fast_arc_tan( psytcopus->pos.x - (*(struct Moby **)(psytcopus_hit_record + 0x20))->pos.x, psytcopus->pos.y - (*(struct Moby **)(psytcopus_hit_record + 0x20))->pos.y); @@ -343,9 +344,9 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { angle1 = source_to_psytcopus_heading; FUN_L00_0025ab48_p(&projectile_and_hit_vector_scratch, &angle1, - &psytcopus_vars->unk88, + &psytcopus_vars->knockback_speed, &psytcopus_vars->knockback_vertical_speed); - FUN_L00_0025c558_p(psytcopus, psytcopus_vars->unk70, 5, 1, 0, angle1); + FUN_L00_0025c558_p(psytcopus, psytcopus_vars->motion, 5, 1, 0, angle1); psytcopus->state = PSYTCOPUS_STATE_KNOCKBACK; psytcopus_vars->hit_reaction_channel_target = 0x78; if (psytcopus_vars->held_projectile != 0) { @@ -357,12 +358,13 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { case HIT_REACTION_DEATH: case HIT_REACTION_DEATH_KNOCKBACK: psytcopus->flags &= 0xEFFF; - psytcopus_vars->unk80 = psytcopus_knockback_base_gravity_gp * frame_time_sq; - psytcopus_vars->unk88 = psytcopus_death_knockback_base_horizontal_speed_gp * frame_time; + psytcopus_vars->knockback_gravity = psytcopus_knockback_base_gravity_gp * frame_time_sq; + psytcopus_vars->knockback_speed = + psytcopus_death_knockback_base_horizontal_speed_gp * frame_time; psytcopus_vars->knockback_vertical_speed = psytcopus_death_knockback_base_vertical_speed_gp * frame_time; - psytcopus_vars->unkC0 = 4.0f; - psytcopus_vars->unkC4 = 10.0f; + psytcopus_vars->knockback_apex_animation_frame = 4.0f; + psytcopus_vars->knockback_landing_animation_frame = 10.0f; source_to_psytcopus_heading = fast_arc_tan( psytcopus->pos.x - (*(struct Moby **)(psytcopus_hit_record + 0x20))->pos.x, psytcopus->pos.y - (*(struct Moby **)(psytcopus_hit_record + 0x20))->pos.y); @@ -370,9 +372,9 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { angle2 = source_to_psytcopus_heading; FUN_L00_0025ab48_p(&projectile_and_hit_vector_scratch, &angle2, - &psytcopus_vars->unk88, + &psytcopus_vars->knockback_speed, &psytcopus_vars->knockback_vertical_speed); - FUN_L00_0025c558_p(psytcopus, psytcopus_vars->unk70, 6, 1, 0, angle2); + FUN_L00_0025c558_p(psytcopus, psytcopus_vars->motion, 6, 1, 0, angle2); psytcopus->state = PSYTCOPUS_STATE_DEATH_KNOCKBACK; psytcopus_vars->hit_reaction_channel_target = 0xF0; if (psytcopus_vars->held_projectile != 0) { @@ -382,17 +384,16 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { FUN_L00_00257470_p(psytcopus, 0, -1); break; } - FUN_L00_0025d458_p(psytcopus, psytcopus_vars->unk60); + FUN_L00_0025d458_p(psytcopus, psytcopus_vars->move); } psytcopus->hit_slot = 0xFF; - FUN_L00_0025d538_p(psytcopus, psytcopus_vars->unk60); - psytcopus_vars->unk140 = 24.0f; - path = (s32 *)l11_paths[psytcopus_vars->unk13C]; + FUN_L00_0025d538_p(psytcopus, psytcopus_vars->move); + psytcopus_vars->reach = 24.0f; + path = (s32 *)l11_paths[psytcopus_vars->path_index]; if (FUN_L00_0025ff38_p( - psytcopus, &psytcopus_vars->unkD0, 0, 0, path + 4, *path, psytcopus_vars->unk140) != - 2 && - (psytcopus_vars->unk140 < vector_distance_xy(&psytcopus->pos, &psytcopus_vars->unkD0) || - absolute_float(psytcopus->pos.z - psytcopus_vars->unkD0.z) > 3.0f)) { + psytcopus, &psytcopus_vars->goal, 0, 0, path + 4, *path, psytcopus_vars->reach) != 2 && + (psytcopus_vars->reach < vector_distance_xy(&psytcopus->pos, &psytcopus_vars->goal) || + absolute_float(psytcopus->pos.z - psytcopus_vars->goal.z) > 3.0f)) { psytcopus_vars->unk114 = 2; } if (psytcopus_vars->target == 0) { diff --git a/src/overlays/l11/mobys/puffoid.c b/src/overlays/l11/mobys/puffoid.c index 797fea865b..671c7c4324 100644 --- a/src/overlays/l11/mobys/puffoid.c +++ b/src/overlays/l11/mobys/puffoid.c @@ -48,11 +48,11 @@ enum { typedef struct { u8 pad00[0x20]; - f32 unk20; /* 0x20 */ + f32 hp; /* 0x20 */ s16 unk24; /* 0x24 */ u8 pad26[2]; - u8 unk28; /* 0x28 */ - u8 unk29; /* 0x29 */ + u8 hit_response_class; /* 0x28 */ + u8 unk29; /* 0x29 */ u8 pad2A[6]; f32 unk30; /* 0x30 */ u8 pad34[0xC]; @@ -66,7 +66,7 @@ typedef struct { u8 padCA[6]; void *unkD0; /* 0xD0 */ u8 padD4[0x4C]; - u8 unk120[0x5C]; /* 0x120: step_moby_motion / FUN_L00_002dc9f0 state */ + u8 motion[0x5C]; /* 0x120: step_moby_motion / FUN_L00_002dc9f0 state */ f32 smoke; /* 0x17C: nonzero: dying states give off smoke */ s32 unk180; /* 0x180: block set up by FUN_L01_0026d930 */ f32 unk184; /* 0x184 */ @@ -75,17 +75,17 @@ typedef struct { u8 pad190[0x28]; s32 unk1B8; /* 0x1B8 */ u8 pad1BC[0x14]; - f32 unk1D0[4]; /* 0x1D0 */ + f32 goal[4]; /* 0x1D0 */ u8 pad1E0[0x30]; struct Moby *target; /* 0x210 */ s32 unk214; /* 0x214: 2 = target in range */ u8 pad218[8]; - f32 home[4]; /* 0x220 */ - s32 unk230; /* 0x230: path index for FUN_L00_00261968 / the landing check */ - s32 path; /* 0x234: index into l11_paths */ - s32 mode; /* 0x238: start mode */ + f32 home[4]; /* 0x220 */ + s32 path_index; /* 0x230: path index for FUN_L00_00261968 / the landing check */ + s32 path; /* 0x234: index into l11_paths */ + s32 mode; /* 0x238: start mode */ u8 pad23C[8]; - s32 unk244; /* 0x244 */ + s32 timer; /* 0x244 */ u8 pad248[4]; f32 chase_heading_offset_radians; /* 0x24C: heading offset for FUN_L11_00315f58 */ f32 yaw_turn_velocity; /* 0x250: turn speed */ @@ -94,7 +94,7 @@ typedef struct { s32 point; /* 0x25C: current path point */ f32 wander_destination[4]; /* 0x260 */ u8 pad270[0x10]; - u8 unk280[0x10]; /* 0x280 */ + u8 manipulator[0x10]; /* 0x280 */ } CreatureVars_4318; extern char *D_L11_0015FFD8_4318 __asm__("D_L11_0015FFD8"); @@ -152,16 +152,16 @@ void puffoid_update(struct Moby *moby) { update_puffoid_damage_and_path_goal(moby); } target = puffoid_vars->target; - spawn_4318(moby, 0, puffoid_vars->unk280, 2.5f); + spawn_4318(moby, 0, puffoid_vars->manipulator, 2.5f); if (moby->visible != 0 && fast_vec_dist(&moby->pos, D_L11_001677C0_4318) < 28.0f) { FUN_L00_0025a120_4318(moby); moby->shadow_range = 0x16; } switch (moby->state) { case PUFFOID_STATE_INITIALIZE: - puffoid_vars->unk20 = 2.0f; + puffoid_vars->hp = 2.0f; puffoid_vars->unk24 = 2; - puffoid_vars->unk28 = 1; + puffoid_vars->hit_response_class = 1; puffoid_vars->unk30 = 0.25f; puffoid_vars->unk58 = truncate_float_to_s32(8.0f); puffoid_vars->unk5A = truncate_float_to_s32(2.0f); @@ -312,11 +312,11 @@ void puffoid_update(struct Moby *moby) { } break; case PUFFOID_STATE_REPOSITION_AND_FACE_TARGET: - fast_vec_sub(pos, puffoid_vars->unk1D0, &moby->pos); + fast_vec_sub(pos, puffoid_vars->goal, &moby->pos); pos[2] = 0.0f; fast_vec_normalize(pos, pos, 2.5f); fast_vec_add(pos, pos, &moby->pos); - if (test_path_segment_strict_crossing(puffoid_vars->unk230, &moby->pos, pos)) { + if (test_path_segment_strict_crossing(puffoid_vars->path_index, &moby->pos, pos)) { float *rz = &moby->rot.z; float target_facing_heading = fast_arc_tan(puffoid_vars->target->pos.x - moby->pos.x, puffoid_vars->target->pos.y - moby->pos.y); @@ -327,12 +327,12 @@ void puffoid_update(struct Moby *moby) { frame_time_sq * 12.566371f, frame_time * 12.566371f); } else { - update_moby_target_heading_and_conditional_movement((char *)moby, puffoid_vars->unk1D0); + update_moby_target_heading_and_conditional_movement((char *)moby, puffoid_vars->goal); } if (moby->anim_flags & 2) { if (puffoid_vars->unk214 != 2) { moby->state = PUFFOID_STATE_CHASE_TARGET; - } else if (puffoid_vars->unk244 == 0) { + } else if (puffoid_vars->timer == 0) { moby->state = PUFFOID_STATE_RETURN_HOME; } } @@ -375,14 +375,14 @@ void puffoid_update(struct Moby *moby) { } break; case PUFFOID_STATE_KNOCKBACK: { - int hit = FUN_L00_0025c698_4318(moby, puffoid_vars->unk120); + int hit = FUN_L00_0025c698_4318(moby, puffoid_vars->motion); if (hit & 0x40) { char *path; if (moby->pos.z < 222.0f) { mark_moby_for_removal(moby); return; } - path = (char *)l11_paths[puffoid_vars->unk230]; + path = (char *)l11_paths[puffoid_vars->path_index]; if (point_in_path_xy(&moby->pos, path + 0x10, *(int *)path) == 0) { mark_moby_for_removal(moby); return; @@ -400,7 +400,7 @@ void puffoid_update(struct Moby *moby) { break; } case PUFFOID_STATE_DEATH_KNOCKBACK: - if (FUN_L00_0025c698_4318(moby, puffoid_vars->unk120) & 0x160) { + if (FUN_L00_0025c698_4318(moby, puffoid_vars->motion) & 0x160) { clear_u64_value(pos); spawn_color_swapped_explosion_burst(moby, &moby->pos, -1, 0.5f, 10.0f); mark_moby_for_removal(moby); @@ -534,14 +534,14 @@ void puffoid_update(struct Moby *moby) { &moby->rot, &moby->pos, &moby->rot); - hit = FUN_L00_0025c698_4318(moby, puffoid_vars->unk120); + hit = FUN_L00_0025c698_4318(moby, puffoid_vars->motion); if (hit & 0x40) { char *path; if (moby->pos.z < 222.0f) { mark_moby_for_removal(moby); return; } - path = (char *)l11_paths[puffoid_vars->unk230]; + path = (char *)l11_paths[puffoid_vars->path_index]; if (point_in_path_xy(&moby->pos, path + 0x10, *(int *)path) == 0) { mark_moby_for_removal(moby); return; @@ -565,7 +565,7 @@ void puffoid_update(struct Moby *moby) { &moby->rot, &moby->pos, &moby->rot); - if (FUN_L00_0025c698_4318(moby, puffoid_vars->unk120) & 0x160) { + if (FUN_L00_0025c698_4318(moby, puffoid_vars->motion) & 0x160) { clear_u64_value(pos); spawn_color_swapped_explosion_burst(moby, &moby->pos, -1, 0.5f, 10.0f); mark_moby_for_removal(moby); @@ -637,7 +637,7 @@ void puffoid_update(struct Moby *moby) { break; } case PUFFOID_STATE_WAIT_TO_RESUME_COMMAND: - if (puffoid_vars->unkC8 != 0 && FUN_L00_002dc9f0_4318(moby, puffoid_vars->unk120)) { + if (puffoid_vars->unkC8 != 0 && FUN_L00_002dc9f0_4318(moby, puffoid_vars->motion)) { moby->state = moby->command; puffoid_vars->unkC8 = 0; } @@ -696,14 +696,14 @@ struct L11PatrolVars { u8 move[7]; /* 0x110: movement state (trooper_anim_update / trooper_anim_finish) */ u8 hit_flash_red_target; /* 0x117 */ u8 pad118[8]; - u8 unk120[0x10]; /* 0x120 */ - f32 unk130; /* 0x130 */ - f32 unk134; /* 0x134 */ - f32 unk138; /* 0x138 */ - f32 unk13C; /* 0x13C */ - s32 unk140; /* 0x140 */ - s32 unk144; /* 0x144 */ - f32 knockback_collision_z_offset; /* 0x148 */ + u8 motion[0x10]; /* 0x120 */ + f32 knockback_gravity; /* 0x130 */ + f32 knockback_speed_approach_step; /* 0x134 */ + f32 knockback_speed; /* 0x138 */ + f32 knockback_vertical_speed; /* 0x13C */ + s32 knockback_collision_radius; /* 0x140 */ + s32 unk144; /* 0x144 */ + f32 knockback_collision_z_offset; /* 0x148 */ u8 pad14C[0x11]; u8 unk15D; /* 0x15D */ u8 pad15E[0x12]; @@ -813,10 +813,11 @@ void update_puffoid_damage_and_path_goal(struct Moby *moby) { if (patrol_vars->hp <= 0.0f) { kind = HIT_RESPONSE_DEATH; } - patrol_vars->unk140 = truncate_float_to_s32(512.0f); + patrol_vars->knockback_collision_radius = truncate_float_to_s32(512.0f); patrol_vars->knockback_collision_z_offset = 0.2f; - patrol_vars->unk134 = 0.0f; - patrol_vars->unk130 = puffoid_hit_motion_time_squared_scale_gp * frame_time_sq; + patrol_vars->knockback_speed_approach_step = 0.0f; + patrol_vars->knockback_gravity = + puffoid_hit_motion_time_squared_scale_gp * frame_time_sq; patrol_vars->unk144 = 9; patrol_vars->unk15D = 0; switch (kind) { @@ -833,15 +834,19 @@ void update_puffoid_damage_and_path_goal(struct Moby *moby) { case HIT_RESPONSE_KNOCKBACK_ARC: case HIT_RESPONSE_KNOCKBACK_MOTION: { float yaw; - patrol_vars->unk138 = puffoid_hit_knockback_horizontal_scale_gp * frame_time; - patrol_vars->unk13C = puffoid_hit_knockback_vertical_scale_gp * frame_time; + patrol_vars->knockback_speed = + puffoid_hit_knockback_horizontal_scale_gp * frame_time; + patrol_vars->knockback_vertical_speed = + puffoid_hit_knockback_vertical_scale_gp * frame_time; patrol_vars->knockback_apex_animation_frame = 7.5f; patrol_vars->knockback_landing_animation_frame = 11.0f; yaw = fast_arc_tan(moby->pos.x - hit->moby->pos.x, moby->pos.y - hit->moby->pos.y); position_scratch.q = hit->pos.q; - trooper_knockback_arc( - &position_scratch, &yaw, &patrol_vars->unk138, &patrol_vars->unk13C); - trooper_start_knockback(moby, patrol_vars->unk120, 3, 1, 0, yaw); + trooper_knockback_arc(&position_scratch, + &yaw, + &patrol_vars->knockback_speed, + &patrol_vars->knockback_vertical_speed); + trooper_start_knockback(moby, patrol_vars->motion, 3, 1, 0, yaw); if (moby->state < PUFFOID_STATE_WAIT_FOR_CARRIER_JUMP) { moby->state = PUFFOID_STATE_KNOCKBACK; } else { @@ -854,16 +859,21 @@ void update_puffoid_damage_and_path_goal(struct Moby *moby) { case HIT_RESPONSE_DEATH_KNOCKBACK: { float yaw; moby->flags &= ~0x1000; - patrol_vars->unk130 = puffoid_hit_motion_time_squared_scale_gp * frame_time_sq; - patrol_vars->unk138 = puffoid_death_knockback_horizontal_scale_gp * frame_time; - patrol_vars->unk13C = puffoid_death_knockback_vertical_scale_gp * frame_time; + patrol_vars->knockback_gravity = + puffoid_hit_motion_time_squared_scale_gp * frame_time_sq; + patrol_vars->knockback_speed = + puffoid_death_knockback_horizontal_scale_gp * frame_time; + patrol_vars->knockback_vertical_speed = + puffoid_death_knockback_vertical_scale_gp * frame_time; patrol_vars->knockback_apex_animation_frame = 7.5f; patrol_vars->knockback_landing_animation_frame = 11.0f; yaw = fast_arc_tan(moby->pos.x - hit->moby->pos.x, moby->pos.y - hit->moby->pos.y); position_scratch.q = hit->pos.q; - trooper_knockback_arc( - &position_scratch, &yaw, &patrol_vars->unk138, &patrol_vars->unk13C); - trooper_start_knockback(moby, patrol_vars->unk120, 3, 1, 0, yaw); + trooper_knockback_arc(&position_scratch, + &yaw, + &patrol_vars->knockback_speed, + &patrol_vars->knockback_vertical_speed); + trooper_start_knockback(moby, patrol_vars->motion, 3, 1, 0, yaw); if (moby->state < PUFFOID_STATE_WAIT_FOR_CARRIER_JUMP) { moby->state = PUFFOID_STATE_DEATH_KNOCKBACK; } else { diff --git a/src/overlays/l11/mobys/resort_owner.c b/src/overlays/l11/mobys/resort_owner.c index 8dd390ef9b..41b7b09656 100644 --- a/src/overlays/l11/mobys/resort_owner.c +++ b/src/overlays/l11/mobys/resort_owner.c @@ -66,29 +66,28 @@ void trigger_pokitaru_paired_rotation(struct Moby *moby) __asm__("FUN_L11_002cb9 typedef struct ResortOwnerVars { u8 pad_0[0x8]; - char *unk8; + char *partner_moby; u8 pad_C[0x20]; - f32 unk2C; + f32 talk_range; u8 pad_30[0x26]; s16 unk56; u8 pad_58[0x28]; - void *unk80; + void *clearance_path; void *supplemental_clearance_path; - void *unk88; + void *penultimate_clearance_path; u8 pad_8C[0x64]; - s32 unkF0; - u8 pad_F4[0x4]; - s32 unkF8; - u8 pad_FC[0x8]; - s32 unk104; + s32 gates[2]; + s32 volumes[2]; + u8 pad_100[0x4]; + s32 paired_rotation_moby; u8 pad_108[0x18]; - f32 unk120[4]; - f32 unk130[4]; - f32 unk140[4]; - f32 unk150; + f32 target[4]; + f32 velocity[4]; + f32 displacement[4]; + f32 yaw_turn_velocity; f32 horizontal_step_distance; u32 current_path_leg; - s32 unk15C; + s32 next_state; } ResortOwnerVars; void trigger_pokitaru_paired_rotation(struct Moby *moby) { @@ -101,7 +100,7 @@ void trigger_pokitaru_paired_rotation(struct Moby *moby) { char *child; D_0013D3E2[0] = moby->state; moby->state = POKITARU_PAIRED_ROTATION_ROTATING; - child = state->unk8; + child = state->partner_moby; if (child) child[0x20] = 2; } @@ -177,24 +176,24 @@ void update_resort_owner_state_actions(void *mp) { case RESORT_OWNER_MOVE_TO_GATE_TARGET: case RESORT_OWNER_MOVE_TO_GATE_DEPARTURE_TARGET: { char *yaw_ptr = (char *)moby + 0x48; - target_yaw = fast_arc_tan(pvars->unk120[0] - MOBY(moby)->pos.x, - pvars->unk120[1] - MOBY(moby)->pos.y); + target_yaw = fast_arc_tan(pvars->target[0] - MOBY(moby)->pos.x, + pvars->target[1] - MOBY(moby)->pos.y); approach_angle((float *)(yaw_ptr), target_yaw, - &pvars->unk150, + &pvars->yaw_turn_velocity, D_0015ED70 * 12.566371f, D_0015ED70 * 25.132742f, D_0015ED6C * 12.566371f); - pvars->unk130[0] = fast_cos(*(float *)(yaw_ptr)) * pvars->horizontal_step_distance; + pvars->velocity[0] = fast_cos(*(float *)(yaw_ptr)) * pvars->horizontal_step_distance; motion_scalar = fast_sin(*(float *)(yaw_ptr)); - vertical_motion = pvars->unk140[2]; + vertical_motion = pvars->displacement[2]; vertical_motion_decrement = D_0015ED70 * 20.0f; horizontal_speed = pvars->horizontal_step_distance; - pvars->unk130[1] = motion_scalar * horizontal_speed; + pvars->velocity[1] = motion_scalar * horizontal_speed; vertical_motion = vertical_motion - vertical_motion_decrement; - pvars->unk130[2] = vertical_motion; + pvars->velocity[2] = vertical_motion; if (0.0f < vertical_motion) { - pvars->unk130[2] = 0.0f; + pvars->velocity[2] = 0.0f; /* Fakematch: storing the speed back is a no-op that reload * deletes, but it keeps f3 live into this branch, so the * first scheduling pass hoists the 0x154 load and the @@ -205,24 +204,24 @@ void update_resort_owner_state_actions(void *mp) { } case RESORT_OWNER_JUMP_TO_TARGET: if (is_value_within_interpolated_window(moby, 9.0f)) { - fast_vec_sub(pvars->unk130, pvars->unk120, (char *)moby + 0x10); + fast_vec_sub(pvars->velocity, pvars->target, (char *)moby + 0x10); motion_scalar = (float)scale_game_frames(0x3C); - fast_vec_scale(pvars->unk130, pvars->unk130, 1.0f / motion_scalar); - motion_scalar = vector_length_xy(pvars->unk130); - pvars->unk130[2] = FUN_L00_0025abf0( - (char *)moby + 0x10, pvars->unk120, motion_scalar, 0, -(D_0015ED70 * 10.8f)); + fast_vec_scale(pvars->velocity, pvars->velocity, 1.0f / motion_scalar); + motion_scalar = vector_length_xy(pvars->velocity); + pvars->velocity[2] = FUN_L00_0025abf0( + (char *)moby + 0x10, pvars->target, motion_scalar, 0, -(D_0015ED70 * 10.8f)); MOBY(moby)->anim_speed = 0.6666667f; } - motion_scalar = fast_vec_length(pvars->unk130); + motion_scalar = fast_vec_length(pvars->velocity); if (0.0f < motion_scalar) - pvars->unk130[2] = pvars->unk130[2] - D_0015ED70 * 10.8f; + pvars->velocity[2] = pvars->velocity[2] - D_0015ED70 * 10.8f; if (is_value_within_interpolated_window(moby, 29.0f)) { - clear_u64_value(pvars->unk130); + clear_u64_value(pvars->velocity); MOBY(moby)->anim_speed = 1.0f; } break; case RESORT_OWNER_WAIT_AT_GATE: { - int *gate_moby_index_ptr = &pvars->unkF0; + int *gate_moby_index_ptr = pvars->gates; unsigned int gate_slot_index = 0U < pvars->current_path_leg; char *gate_moby; gate_moby_index_ptr += gate_slot_index; @@ -245,7 +244,8 @@ void update_resort_owner_state_actions(void *mp) { break; if (resort_owner_completion_rotation_trigger_state[13] != scale_game_frames(0x7D0)) break; - trigger_pokitaru_paired_rotation((struct Moby *)(D_L11_0015FFD8 + (pvars->unk104 << 8))); + trigger_pokitaru_paired_rotation( + (struct Moby *)(D_L11_0015FFD8 + (pvars->paired_rotation_moby << 8))); break; default: break; @@ -265,11 +265,11 @@ void apply_resort_owner_movement(void *mp) { float A[4]; float B[4]; qcopy(A, moby + 0x10); - qcopy(B, moby_vars->unk130); + qcopy(B, moby_vars->velocity); FUN_L00_00258830((int)moby, (int)B, 0.5f, 0.3f, 0.0f, 0x10); if ((MOBY(moby)->state >= RESORT_OWNER_FOLLOW_HERO && MOBY(moby)->state <= RESORT_OWNER_MOVE_TO_PATH_POINT) || - (MOBY(moby)->state == RESORT_OWNER_JUMP_TO_TARGET && moby_vars->unk15C == 3)) { + (MOBY(moby)->state == RESORT_OWNER_JUMP_TO_TARGET && moby_vars->next_state == 3)) { resolve_point_path_segment_xy_clearance( 0.3f, *(void **)((u8 *)moby_vars + 0x60 - -(*(int *)&moby_vars->current_path_leg * 4)), @@ -278,21 +278,21 @@ void apply_resort_owner_movement(void *mp) { switch (*(int *)&moby_vars->current_path_leg) { case RESORT_OWNER_PENULTIMATE_PATH_LEG: resolve_point_path_segment_xy_clearance( - 0.3f, moby_vars->unk80, moby + 0x10, moby + 0x10); + 0.3f, moby_vars->clearance_path, moby + 0x10, moby + 0x10); resolve_point_path_segment_xy_clearance( 0.3f, moby_vars->supplemental_clearance_path, moby + 0x10, moby + 0x10); resolve_point_path_segment_xy_clearance( - 0.3f, moby_vars->unk88, moby + 0x10, moby + 0x10); + 0.3f, moby_vars->penultimate_clearance_path, moby + 0x10, moby + 0x10); break; case RESORT_OWNER_FINAL_PATH_LEG: resolve_point_path_segment_xy_clearance( - 0.3f, moby_vars->unk80, moby + 0x10, moby + 0x10); + 0.3f, moby_vars->clearance_path, moby + 0x10, moby + 0x10); resolve_point_path_segment_xy_clearance( 0.3f, moby_vars->supplemental_clearance_path, moby + 0x10, moby + 0x10); break; } } - fast_vec_sub(moby_vars->unk140, moby + 0x10, A); + fast_vec_sub(moby_vars->displacement, moby + 0x10, A); } int classify_resort_owner_target_proximity(struct Moby *moby) __asm__("FUN_L11_002d2460"); @@ -337,25 +337,25 @@ struct PokKeeperVars { u8 pad30[0x26]; s16 unk56; u8 pad58[8]; - s32 unk60[3]; /* 0x60: FUN_L05_0028be78 handles, set from unk70[] */ + s32 leg_paths[3]; /* 0x60: per-leg clearance paths, set from unk70[] */ u8 pad6C[4]; s32 unk70[3]; u8 pad7C[0x54]; - s32 unkD0[4]; + s32 leg_entry_points[4]; s32 points[4]; /* 0xE0: path point of each leg */ s32 gates[2]; /* 0xF0: gate mobys */ s32 volumes[2]; /* 0xF8 */ s32 unk100; - s32 unk104; - s32 unk108; - s32 unk10C; + s32 paired_rotation_moby; + s32 first_gate_open_mission; + s32 path_complete_mission; s32 second_gate_arrival_cuboid_index; s32 final_path_arrival_cuboid_index; s32 post_path_dialogue_condition_index; u8 pad11C[4]; Vec4f target; /* 0x120 */ - Vec4f unk130; - Vec4f unk140; + Vec4f velocity; + Vec4f displacement; u8 pad150[8]; s32 leg; /* 0x158 */ s32 next_state; /* 0x15C: state entered once the walk animation ends */ @@ -389,27 +389,27 @@ void update_resort_owner_state_transitions(void *resort_owner_moby) { case RESORT_OWNER_INITIALIZE: initialize_npc_dialogue(moby, moby_vars->talk); moby->update_dist = 0xFF; - build_symmetric_adjacency_masks(&moby_vars->unk60[0], 1, moby_vars->unk70[0]); - build_symmetric_adjacency_masks(&moby_vars->unk60[1], 1, moby_vars->unk70[1]); - build_symmetric_adjacency_masks(&moby_vars->unk60[2], 1, moby_vars->unk70[2]); - clear_u64_value(&moby_vars->unk130); - clear_u64_value(&moby_vars->unk140); + build_symmetric_adjacency_masks(&moby_vars->leg_paths[0], 1, moby_vars->unk70[0]); + build_symmetric_adjacency_masks(&moby_vars->leg_paths[1], 1, moby_vars->unk70[1]); + build_symmetric_adjacency_masks(&moby_vars->leg_paths[2], 1, moby_vars->unk70[2]); + clear_u64_value(&moby_vars->velocity); + clear_u64_value(&moby_vars->displacement); if (D_0013D4EE) { - if (D_0014C050[moby_vars->unk10C + D_0015ED84 * 16] == 0xFF) { + if (D_0014C050[moby_vars->path_complete_mission + D_0015ED84 * 16] == 0xFF) { FUN_L11_0030a840((unsigned char *)(D_L11_0015FFD8 + (moby_vars->gates[0] << 8))); FUN_L11_0030a840((unsigned char *)(D_L11_0015FFD8 + (moby_vars->gates[1] << 8))); trigger_pokitaru_paired_rotation( - (struct Moby *)(D_L11_0015FFD8 + (moby_vars->unk104 << 8))); + (struct Moby *)(D_L11_0015FFD8 + (moby_vars->paired_rotation_moby << 8))); mark_moby_for_removal(moby); break; } } else { - if (D_0014C050[moby_vars->unk10C + D_0015ED84 * 16] == 0xFF) { + if (D_0014C050[moby_vars->path_complete_mission + D_0015ED84 * 16] == 0xFF) { moby_vars->leg = 3; qcopy_nc(&moby->pos, &l11_cuboids[moby_vars->points[3]].pos); qcopy_nc(&moby->rot, &l11_cuboids[moby_vars->points[3]].rot); trigger_pokitaru_paired_rotation( - (struct Moby *)(D_L11_0015FFD8 + (moby_vars->unk104 << 8))); + (struct Moby *)(D_L11_0015FFD8 + (moby_vars->paired_rotation_moby << 8))); FUN_L11_002d2088_c(moby, 0xE); moby_vars->talk_range = 10.0f; FUN_L11_0030a840((unsigned char *)(D_L11_0015FFD8 + (moby_vars->gates[0] << 8))); @@ -417,7 +417,7 @@ void update_resort_owner_state_transitions(void *resort_owner_moby) { break; } } - if (D_0014C050[moby_vars->unk108 + D_0015ED84 * 16] == 0xFF && + if (D_0014C050[moby_vars->first_gate_open_mission + D_0015ED84 * 16] == 0xFF && fast_vec_dist(&hero.motion.pos, &l11_cuboids[moby_vars->points[1]].pos) < 12.0f) { moby_vars->leg = 1; qcopy_nc(&moby->pos, &l11_cuboids[moby_vars->points[1]].pos); @@ -523,7 +523,7 @@ void update_resort_owner_state_transitions(void *resort_owner_moby) { case RESORT_OWNER_CHECK_PATH_COMPLETION_DIALOGUE: moby_vars->talk_range = 255.0f; if (update_npc_dialogue(moby, moby_vars->talk)) { - jet_clear_persistent(moby_vars->unk10C); + jet_clear_persistent(moby_vars->path_complete_mission); D_0013D3DC = 1; set_moby_dialogue_record_value(moby, 2); qcopy_nc(&moby->pos, &l11_cuboids[moby_vars->points[moby_vars->leg]].pos); @@ -543,7 +543,7 @@ void update_resort_owner_state_transitions(void *resort_owner_moby) { case RESORT_OWNER_WAIT_FOR_PATH_COMPLETION_DIALOGUE_END: if (D_L11_0015F5C4 != 2) { trigger_pokitaru_paired_rotation( - (struct Moby *)(D_L11_0015FFD8 + (moby_vars->unk104 << 8))); + (struct Moby *)(D_L11_0015FFD8 + (moby_vars->paired_rotation_moby << 8))); FUN_L11_002d2088_c(moby, 0xE); } break; @@ -563,7 +563,8 @@ void update_resort_owner_state_transitions(void *resort_owner_moby) { case RESORT_OWNER_MOVE_TO_GATE_DEPARTURE_TARGET: if (vector_distance_xy(&moby->pos, &moby_vars->target) < 0.5f) { int next_leg_index = ++moby_vars->leg; - qcopy(&moby_vars->target, &l11_cuboids[moby_vars->unkD0[next_leg_index]].pos); + qcopy(&moby_vars->target, + &l11_cuboids[moby_vars->leg_entry_points[next_leg_index]].pos); moby_vars->next_state = RESORT_OWNER_FOLLOW_HERO; FUN_L11_002d2088_c(moby, 7); } @@ -613,8 +614,8 @@ void set_resort_owner_state(struct Moby *moby, unsigned char state) { if (moby->prev_seq != 0) FUN_00212f90(moby, 0, 0, scale_game_frames(0x14)); if (moby->state == RESORT_OWNER_CHECK_POST_PATH_DIALOGUE) - moby_vars->unk2C = 10.0f; - clear_u64_value(moby_vars->unk130); + moby_vars->talk_range = 10.0f; + clear_u64_value(moby_vars->velocity); if (moby->state == RESORT_OWNER_CHECK_POST_PATH_DIALOGUE) moby_vars->unk56 = 2; break; @@ -633,13 +634,13 @@ void set_resort_owner_state(struct Moby *moby, unsigned char state) { case RESORT_OWNER_JUMP_TO_TARGET: if (moby->prev_seq != 4) FUN_00212f90(moby, 4, 0, scale_game_frames(0x14)); - clear_u64_value(moby_vars->unk130); + clear_u64_value(moby_vars->velocity); break; case RESORT_OWNER_MOVE_TO_GATE_TARGET: if (moby->prev_seq != 3) FUN_00212f90(moby, 3, 0, scale_game_frames(0x14)); { - int *tbl = &moby_vars->unkF0; + int *tbl = moby_vars->gates; unsigned int idx = 0U < moby_vars->current_path_leg; int p; char *o; @@ -647,23 +648,23 @@ void set_resort_owner_state(struct Moby *moby, unsigned char state) { p = *tbl; o = (char *)D_L11_0015FFD8; o += p << 8; - qcopy(moby_vars->unk120, o + 0x10); + qcopy(moby_vars->target, o + 0x10); transform_vector_by_basis( gate_target_offset, &l11_resort_owner_gate_attachment_local_x_offset, o + 0xC0); - fast_vec_add(moby_vars->unk120, moby_vars->unk120, gate_target_offset); + fast_vec_add(moby_vars->target, moby_vars->target, gate_target_offset); } break; case RESORT_OWNER_WAIT_AT_GATE: case 16: if (moby->prev_seq != 0) FUN_00212f90(moby, 0, 0, scale_game_frames(0x14)); - clear_u64_value(moby_vars->unk130); + clear_u64_value(moby_vars->velocity); break; case RESORT_OWNER_MOVE_TO_GATE_DEPARTURE_TARGET: if (moby->prev_seq != 3) FUN_00212f90(moby, 3, 0, scale_game_frames(0x14)); { - int *tbl = &moby_vars->unkF0; + int *tbl = moby_vars->gates; unsigned int idx = 0U < moby_vars->current_path_leg; int p; char *o; @@ -671,11 +672,11 @@ void set_resort_owner_state(struct Moby *moby, unsigned char state) { p = *tbl; o = (char *)D_L11_0015FFD8; o += p << 8; - qcopy(moby_vars->unk120, o + 0x10); + qcopy(moby_vars->target, o + 0x10); transform_vector_by_basis(gate_target_offset, &l11_resort_owner_gate_departure_target_local_x_offset, o + 0xC0); - fast_vec_add(moby_vars->unk120, moby_vars->unk120, gate_target_offset); + fast_vec_add(moby_vars->target, moby_vars->target, gate_target_offset); } break; default: @@ -790,7 +791,7 @@ extern float func_L00_0025A748_f(void *) __asm__("FUN_L00_00259710"); int try_find_resort_owner_jump_target(struct Moby *moby, float *jump_target_position) { ResortOwnerVars *pvars = (ResortOwnerVars *)moby->pvars; - int *clip_volume_index_ptr = &pvars->unkF8; + int *clip_volume_index_ptr = pvars->volumes; int i; int found = 0; float candidate_position[4]; diff --git a/src/overlays/l11/mobys/teleporter.c b/src/overlays/l11/mobys/teleporter.c index 73988d659b..3d6f71af9d 100644 --- a/src/overlays/l11/mobys/teleporter.c +++ b/src/overlays/l11/mobys/teleporter.c @@ -46,21 +46,20 @@ float teleporter_parts_max_speed_gp __asm__("D_L11_00161918") = 32.0f; void teleporter_update(struct Moby *moby) __asm__("FUN_L11_002f2518"); typedef struct TeleporterVars { - u8 pad_0[0x4]; - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - char *unk14; - u8 pad_18[0x8]; - f32 unk20; - f32 unk24; + s32 destination; + s32 alternate_destination; + s32 mission; + s32 alternate_destination_mission; + s32 help_message_index; + char *parts[3]; + f32 part_extension; + f32 part_tilt; s32 unk28; s32 unk2C; s32 unk30; s32 unk34; u8 pad_38[0x4]; - f32 unk3C; + f32 ring_radius; } TeleporterVars; /* Moby class 318 */ @@ -79,7 +78,7 @@ void teleporter_update(struct Moby *moby) { switch (moby->state) { case TELEPORTER_INITIALIZE: { - char **slots = &teleporter_instance_vars->unk14; + char **slots = teleporter_instance_vars->parts; int i; int j; moby->state = TELEPORTER_WAIT_FOR_ACTIVATION; @@ -97,8 +96,8 @@ void teleporter_update(struct Moby *moby) { *(float *)(slots[i] + 0x48) = fast_add_rotations(MOBY(child_moby)->rot.z, (float)i * 2.0943952f); } - if (teleporter_instance_vars->unk8 >= 0 && - visited52[teleporter_instance_vars->unk8 + current_level_index * 16] != 0xFF) { + if (teleporter_instance_vars->mission >= 0 && + visited52[teleporter_instance_vars->mission + current_level_index * 16] != 0xFF) { moby->visible = 0; moby->flags |= 1; moby->collision = 0; @@ -113,10 +112,10 @@ void teleporter_update(struct Moby *moby) { } case TELEPORTER_WAIT_FOR_ACTIVATION: { struct Hero *g; - if (*(int *)teleporter_instance_vars == -1) + if (teleporter_instance_vars->destination == -1) break; - if ((moby->flags & 1) && teleporter_instance_vars->unk8 >= 0 && - visited52[teleporter_instance_vars->unk8 + current_level_index * 16] == 0xFF) + if ((moby->flags & 1) && teleporter_instance_vars->mission >= 0 && + visited52[teleporter_instance_vars->mission + current_level_index * 16] == 0xFF) FUN_L11_002f3040_2518(moby); g = &hero; if (((char *)g->ground_moby) != moby) @@ -138,23 +137,23 @@ void teleporter_update(struct Moby *moby) { } case TELEPORTER_OPEN_PARTS: { int teleport_transition_status = get_hero_target_pose_status(); - if (teleporter_instance_vars->unk20 < 1.0f) { - advance_accelerated_scalar(&teleporter_instance_vars->unk20, + if (teleporter_instance_vars->part_extension < 1.0f) { + advance_accelerated_scalar(&teleporter_instance_vars->part_extension, (float *)&teleporter_instance_vars->unk28, 1.0f, teleporter_parts_acceleration_gp * frame_time_sq, teleporter_parts_deceleration_gp * frame_time_sq, teleporter_parts_max_speed_gp * frame_time); - } else if (teleporter_instance_vars->unk24 < 1.0f) { - advance_accelerated_scalar(&teleporter_instance_vars->unk24, + } else if (teleporter_instance_vars->part_tilt < 1.0f) { + advance_accelerated_scalar(&teleporter_instance_vars->part_tilt, (float *)&teleporter_instance_vars->unk2C, 1.0f, teleporter_parts_acceleration_gp * frame_time_sq, teleporter_parts_deceleration_gp * frame_time_sq, teleporter_parts_max_speed_gp * frame_time); - } else if (D_L11_0015F594 != 0xB || !(teleporter_instance_vars->unk20 > 0.25f)) { + } else if (D_L11_0015F594 != 0xB || !(teleporter_instance_vars->part_extension > 0.25f)) { if (teleport_transition_status == 2) { - teleporter_instance_vars->unk3C = 1.95f; + teleporter_instance_vars->ring_radius = 1.95f; moby->state = TELEPORTER_CONTRACT_RING; } else if (teleport_transition_status == HERO_TARGET_POSE_INACTIVE) { moby->state = TELEPORTER_RESET; @@ -164,16 +163,19 @@ void teleporter_update(struct Moby *moby) { break; } case TELEPORTER_CONTRACT_RING: - if (teleporter_instance_vars->unk3C != 0.0f) { + if (teleporter_instance_vars->ring_radius != 0.0f) { add_draw_callback(FUN_L11_002f2d58_2518, moby); - approach_value(&teleporter_instance_vars->unk3C, 0.0f, frame_time * 4.0f); + approach_value(&teleporter_instance_vars->ring_radius, 0.0f, frame_time * 4.0f); } else { - char *destination_moby = D_L11_0015FFD8_2518 + (*(int *)teleporter_instance_vars << 8); + char *destination_moby = + D_L11_0015FFD8_2518 + (teleporter_instance_vars->destination << 8); char *td; float destination_position[4]; - if (teleporter_instance_vars->unk4 != -1 && - visited52[teleporter_instance_vars->unkC + current_level_index * 16] == 0xFF) - destination_moby = D_L11_0015FFD8_2518 + (teleporter_instance_vars->unk4 << 8); + if (teleporter_instance_vars->alternate_destination != -1 && + visited52[teleporter_instance_vars->alternate_destination_mission + + current_level_index * 16] == 0xFF) + destination_moby = + D_L11_0015FFD8_2518 + (teleporter_instance_vars->alternate_destination << 8); td = ((char *)MOBY(destination_moby)->pvars); qcopy(destination_position, destination_moby + 0x10); destination_position[2] += 0.2f; @@ -192,29 +194,29 @@ void teleporter_update(struct Moby *moby) { *(float *)(td + 0x24) = 1.0f; allocate_voice_for_target_entry(1, 0, (void *)destination_moby); moby->state = TELEPORTER_WAIT_FOR_ACTIVATION; - teleporter_instance_vars->unk20 = 0.0f; - teleporter_instance_vars->unk24 = 0.0f; + teleporter_instance_vars->part_extension = 0.0f; + teleporter_instance_vars->part_tilt = 0.0f; *(float *)&teleporter_instance_vars->unk28 = 0.0f; *(float *)&teleporter_instance_vars->unk2C = 0.0f; - teleporter_instance_vars->unk3C = 1.95f; + teleporter_instance_vars->ring_radius = 1.95f; update_teleporter_child_transforms(moby); } break; case TELEPORTER_RESET: if (D_0013F3D8_lui < 138.0f) D_0013D3DD = 1; - if (teleporter_instance_vars->unk3C < 1.95f) { + if (teleporter_instance_vars->ring_radius < 1.95f) { add_draw_callback(FUN_L11_002f2d58_2518, moby); - approach_value(&teleporter_instance_vars->unk3C, 1.95f, frame_time * 4.0f); - } else if (0.0f < teleporter_instance_vars->unk24) { - advance_accelerated_scalar(&teleporter_instance_vars->unk24, + approach_value(&teleporter_instance_vars->ring_radius, 1.95f, frame_time * 4.0f); + } else if (0.0f < teleporter_instance_vars->part_tilt) { + advance_accelerated_scalar(&teleporter_instance_vars->part_tilt, (float *)&teleporter_instance_vars->unk28, 0.0f, teleporter_parts_acceleration_gp * frame_time_sq, teleporter_parts_deceleration_gp * frame_time_sq, teleporter_parts_max_speed_gp * frame_time); - } else if (0.0f < teleporter_instance_vars->unk20) { - advance_accelerated_scalar(&teleporter_instance_vars->unk20, + } else if (0.0f < teleporter_instance_vars->part_extension) { + advance_accelerated_scalar(&teleporter_instance_vars->part_extension, (float *)&teleporter_instance_vars->unk2C, 0.0f, teleporter_parts_acceleration_gp * frame_time_sq, @@ -234,7 +236,7 @@ void request_teleporter_help_message(struct Moby *moby) __asm__("FUN_L11_002f2cd void request_teleporter_help_message(struct Moby *moby) { TeleporterVars *teleporter_private_vars = (TeleporterVars *)moby->pvars; - switch (teleporter_private_vars->unk10) { + switch (teleporter_private_vars->help_message_index) { case 0: try_set_help_message(0xB, 0x2B0D); break; @@ -310,14 +312,15 @@ void draw_teleporter_ring(struct Moby *moby) { } while (k >= 0); } width = 0.1f; - if (teleporter_ring_vars->unk3C < 1.15f) { - float v = (1.15f - teleporter_ring_vars->unk3C) + (1.15f - teleporter_ring_vars->unk3C); + if (teleporter_ring_vars->ring_radius < 1.15f) { + float v = (1.15f - teleporter_ring_vars->ring_radius) + + (1.15f - teleporter_ring_vars->ring_radius); if (v > 1.0f) v = 1.0f; else if (v < 0.0f) v = 0.0f; width = v + 0.1f; - if (teleporter_ring_vars->unk3C < 0.65f) + if (teleporter_ring_vars->ring_radius < 0.65f) D_001413F5_lui = 1; else D_001413F5_lui = 0; @@ -328,8 +331,8 @@ void draw_teleporter_ring(struct Moby *moby) { do { float *corner = quad.corner[j]; angle = (float)(i + j / 2) * 6.28318f * 0.03125f - 3.14159f; - corner[0] = fast_cos(angle) * teleporter_ring_vars->unk3C; - corner[1] = fast_sin(angle) * teleporter_ring_vars->unk3C; + corner[0] = fast_cos(angle) * teleporter_ring_vars->ring_radius; + corner[1] = fast_sin(angle) * teleporter_ring_vars->ring_radius; corner[2] = 0.0f; if (j & 1) corner[2] = teleporter_ring_local_z_center_gp + width + 0.0f; @@ -348,7 +351,7 @@ void restore_teleporter_visibility_and_collision(struct Moby *moby) __asm__("FUN void restore_teleporter_visibility_and_collision(struct Moby *moby) { TeleporterVars *teleporter_vars = (TeleporterVars *)moby->pvars; - char **child = &teleporter_vars->unk14; + char **child = teleporter_vars->parts; int count; int on; moby->visible = 1; diff --git a/src/overlays/l11/mobys/two_door_gate.c b/src/overlays/l11/mobys/two_door_gate.c index 350bdce39d..7ec57f65a7 100644 --- a/src/overlays/l11/mobys/two_door_gate.c +++ b/src/overlays/l11/mobys/two_door_gate.c @@ -23,11 +23,11 @@ extern f32 advance_accelerated_scalar(f32 *, f32 *, f32, f32, f32, f32) __asm__( /* Private variables of the two-door moby FUN_L11_00316320 runs. */ struct L11GateVars { - struct Moby *left; /* 0x0 */ - struct Moby *right; /* 0x4 */ - f32 t; /* 0x8 */ - f32 speed; /* 0xC */ - s32 unk10; /* 0x10 */ + struct Moby *left; /* 0x0 */ + struct Moby *right; /* 0x4 */ + f32 t; /* 0x8 */ + f32 speed; /* 0xC */ + s32 trigger_volume; /* 0x10 */ }; /* Two-door gate: spawns both 0x4DF doors, then once the hero is close lifts, swings and tilts them open. */ @@ -88,7 +88,7 @@ void two_door_gate_update(struct Moby *moby) { } case GATE_WAIT_FOR_HERO_TRIGGER: if (vector_distance_xy(&moby->pos.x, &hero.motion.pos.f[0]) < 12.0f && - is_point_inside_clip_volume(&hero.motion.pos, gate_vars->unk10) != 0) { + is_point_inside_clip_volume(&hero.motion.pos, gate_vars->trigger_volume) != 0) { gate_vars->t = 0.0f; moby->state = GATE_RAISE_DOORS; FUN_0022da68(0, 4, gate_vars->left); diff --git a/src/overlays/l11/mobys/water_tile.c b/src/overlays/l11/mobys/water_tile.c index 65a139b7b5..d73a20304d 100644 --- a/src/overlays/l11/mobys/water_tile.c +++ b/src/overlays/l11/mobys/water_tile.c @@ -37,9 +37,9 @@ typedef struct { f32 unk24; s32 unk28; s32 unk2C; - f32 unk30; - f32 unk34; - f32 unk38; + f32 light_dir_x; + f32 light_dir_y; + f32 light_dir_z; u8 unk3C; u8 unk3D; } Light_e088; @@ -113,9 +113,9 @@ void water_tile_update(struct Moby *water_tile_moby) { water_tile_light->unk20 = 0.1f; light_direction_angle = fast_arc_tan(water_light_heading_reference[4], water_light_heading_reference[5]); - water_tile_light->unk30 = fast_cos(light_direction_angle) * 0.57735f; - water_tile_light->unk34 = fast_sin(light_direction_angle) * 0.57735f; - water_tile_light->unk38 = -0.57735f; + water_tile_light->light_dir_x = fast_cos(light_direction_angle) * 0.57735f; + water_tile_light->light_dir_y = fast_sin(light_direction_angle) * 0.57735f; + water_tile_light->light_dir_z = -0.57735f; water_tile_light->unk28 = 0x38; water_tile_light->unk2C = 0x39; water_tile_light->unk3C = 0x1C; From 1abfedeea467666eb6b8abfd118c1135eae68faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 10:40:21 +0000 Subject: [PATCH 010/213] decomp: name enemy fields in levels 0, 4, 5, 7, 12 and 14 Veldin robot (ElectroidVars and its moby view), blarg trooper, extermitank, snagglebeast, blarg helicopter and blarg heavy interceptor pvars: knockback block, hit response class, manipulators, paths, velocities, voices and child mobys. --- src/overlays/l00/mobys/veldin_robot_enemy.c | 128 ++++----- src/overlays/l04/mobys/blarg_trooper.c | 82 +++--- src/overlays/l05/mobys/extermitank.c | 156 ++++++----- src/overlays/l07/mobys/snagglebeast.c | 262 +++++++++--------- src/overlays/l12/mobys/blarg_helicopter.c | 260 ++++++++--------- .../l14/mobys/blarg_heavy_interceptor.c | 124 +++++---- 6 files changed, 518 insertions(+), 494 deletions(-) diff --git a/src/overlays/l00/mobys/veldin_robot_enemy.c b/src/overlays/l00/mobys/veldin_robot_enemy.c index 8f74569e06..690d597dff 100644 --- a/src/overlays/l00/mobys/veldin_robot_enemy.c +++ b/src/overlays/l00/mobys/veldin_robot_enemy.c @@ -56,39 +56,39 @@ typedef struct { f32 health; s16 unk24; s16 unk26; - u8 unk28; + u8 hit_response_class; u8 unk29; u8 pad2A[0x38 - 0x2A]; - s32 unk38; + s32 retimer; u8 pad3C[0x58 - 0x3C]; u8 unk58; u8 pad59; u8 unk5A; u8 pad5B[0x60 - 0x5B]; - u8 unk60[7]; + u8 move[7]; u8 damage_secondary_red; u8 pad68[8]; - u8 unk70[0x10]; - f32 unk80; + u8 motion[0x10]; + f32 knockback_gravity; f32 knockback_xy_speed_step; - f32 unk88; - f32 unk8C; - s32 unk90; + f32 knockback_speed; + f32 knockback_vertical_speed; + s32 knockback_collision_radius; s32 unk94; - f32 unk98; + f32 knockback_collision_z_offset; u8 pad9C[0xAD - 0x9C]; u8 unkAD; u8 padAE[0xBC - 0xAE]; f32 unkBC; - f32 unkC0; - f32 unkC4; + f32 knockback_apex_animation_frame; + f32 knockback_landing_animation_frame; u8 padC8[8]; ElectroidVec targetPos; u8 padE0[0x110 - 0xE0]; ElectroidMoby *target; s32 target_selection_status; u8 pad118[0x120 - 0x118]; - u8 unk120[0x1A0 - 0x120]; + u8 manipulator[0x1A0 - 0x120]; u128 spawnPos; u8 pad1B0[4]; s32 targeting_path_index; @@ -98,7 +98,7 @@ typedef struct { f32 turnVel; f32 speed; s16 timer; - s16 unk1DA; + s16 extended_range_timer; s32 pathPt; } ElectroidVars; @@ -107,28 +107,28 @@ struct ElectroidMoby { ElectroidVec pos; u8 state; u8 pad21[0x31 - 0x21]; - u8 unk31; + u8 visible; u8 pad32[2]; u16 flags; u8 pad36[0x40 - 0x36]; - ElectroidVec unk40; + ElectroidVec rot; u8 pad50[2]; u8 blend_source_animation; u8 anim; u8 pad54[0x70 - 0x54]; - u8 unk70; + u8 anim_flags; u8 pad71[0x78 - 0x71]; ElectroidVars *vars; u8 pad7C[3]; - s8 unk7F; + s8 shadow_range; u8 pad80[0x94 - 0x80]; - s32 unk94; + s32 collision; u8 pad98[0xA4 - 0x98]; - u8 unkA4; + u8 hit_slot; u8 padA5; - u16 unkA6; + u16 oclass; u8 padA8[0xC0 - 0xA8]; - ElectroidVec unkC0; + ElectroidVec rot_row0; }; typedef struct { @@ -168,7 +168,7 @@ FUN_L00_00263fd8(ElectroidMoby *, s32, void *, void *, s32, s32, f32, void *, vo extern void update_veldin_robot_effects() __asm__("FUN_L00_002e1aa8"); #define ELECTROID_TURN(m, v, ang, k) \ - approach_angle(&(m)->unk40.f[2], \ + approach_angle(&(m)->rot.f[2], \ ang, \ &(v)->turnVel, \ frame_time_sq *(k), \ @@ -200,21 +200,21 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { vars = moby->vars; update_veldin_robot_damage_and_targeting(moby); target = vars->target; - manipulator_set_scale(vars->unk120, 2.5f); + manipulator_set_scale(vars->manipulator, 2.5f); if (*(u8 *)0x15EDB7 != 0) { update_joint_animation( - moby, vars->unk120, 2, frame_scale_sq_gp * 0.03f, frame_scale_sq_gp * 0.3f); + moby, vars->manipulator, 2, frame_scale_sq_gp * 0.03f, frame_scale_sq_gp * 0.3f); } - if (moby->unk31 != 0 && fast_vec_dist(&moby->pos, &D_L00_00166DC0) < 27.0f) { + if (moby->visible != 0 && fast_vec_dist(&moby->pos, &D_L00_00166DC0) < 27.0f) { FUN_L00_0025a120(moby); - moby->unk7F = 0x15; + moby->shadow_range = 0x15; } switch (moby->state) { case VELDIN_ROBOT_STATE_INITIALIZE: qcopy(&vars->spawnPos, &moby->pos); vars->unk29 = 0; vars->health = 2.0f; - vars->unk28 = 1; + vars->hit_response_class = 1; vars->unk24 = 2; vars->unk58 = truncate_float_to_s32(14.0f); vars->unk5A = truncate_float_to_s32(8.0f); @@ -236,7 +236,7 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { } break; case VELDIN_ROBOT_STATE_WAIT_TO_FOLLOW_PATH: - if (moby->unk70 & 2) { + if (moby->anim_flags & 2) { if (moby->anim == 1 && random_integer_below(4) == 0) { ELECTROID_ANIM(moby, 2, scale_game_frames_s32(20)); } else { @@ -281,7 +281,7 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { 12.566371f); if (vector_distance_xy(&moby->pos, &hero.motion.pos) < 20.0f) { ELECTROID_ANIM(moby, 4, scale_game_frames_s32(20)); - } else if (moby->unk70 & 2) { + } else if (moby->anim_flags & 2) { ELECTROID_ANIM(moby, random_integer_below(2) + 1, scale_game_frames_s32(20)); } if (vars->target_selection_status != VELDIN_ROBOT_TARGET_SELECTION_UNAVAILABLE && @@ -296,7 +296,7 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { vars, fast_arc_tan(target->pos.f[0] - moby->pos.f[0], target->pos.f[1] - moby->pos.f[1]), 12.566371f); - if (moby->unk70 & 2) { + if (moby->anim_flags & 2) { vars->timer = 0; moby->state = VELDIN_ROBOT_STATE_PROCESS_COLLISION_PROBES; ELECTROID_ANIM(moby, 6, scale_game_frames_s32(10)); @@ -316,7 +316,7 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { } ELECTROID_TURN(moby, vars, desired_heading, 1.5707964f); build_moby_bone_transform(moby, 0, mtx); - qcopy(&delta, &moby->unkC0); + qcopy(&delta, &moby->rot_row0); delta.f[2] = 0.0f; fast_vec_normalize(&delta, &delta, veldin_robot_probe_length_gp); fast_vec_add(&dir, &mtx[3], &delta); @@ -325,11 +325,11 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { query.moby = moby; query.unk90 = 1; query.unk8C = 1.0f; - query.dir[0] = fast_cos(moby->unk40.f[2]); - query.dir[1] = fast_sin(moby->unk40.f[2]); + query.dir[0] = fast_cos(moby->rot.f[2]); + query.dir[1] = fast_sin(moby->rot.f[2]); query.dir[3] = 5627.925f; query.unk89 = 1; - query.unk8A = moby->unkA6; + query.unk8A = moby->oclass; query.dir[2] = 1.0f; query.unk88 = 0; if (moby->blend_source_animation == moby->anim && @@ -354,7 +354,7 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { } } set_beam_origin_transform_and_endpoint(moby, mtx, &dir); - if (moby->unk70 & 2) { + if (moby->anim_flags & 2) { if (vars->timer++ == veldin_robot_beam_hit_frames) { release_beam_slot_by_id(moby); moby->state = VELDIN_ROBOT_STATE_WAIT_TO_RETURN_TO_FACE_TARGET; @@ -369,25 +369,25 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { vars, fast_arc_tan(target->pos.f[0] - moby->pos.f[0], target->pos.f[1] - moby->pos.f[1]), 12.566371f); - if (moby->unk70 & 2) { + if (moby->anim_flags & 2) { moby->state = VELDIN_ROBOT_STATE_FACE_TARGET; ELECTROID_ANIM(moby, 1, scale_game_frames_s32(10)); } break; case VELDIN_ROBOT_STATE_DAMAGE_KNOCKBACK: - if (step_moby_motion(moby, vars->unk70) & 0x140) { + if (step_moby_motion(moby, vars->motion) & 0x140) { moby->state = VELDIN_ROBOT_STATE_FACE_TARGET; ELECTROID_ANIM(moby, 1, scale_game_frames_s32(10)); } break; case VELDIN_ROBOT_STATE_DEATH_KNOCKBACK: - if (step_moby_motion(moby, vars->unk70) & 0x140) { + if (step_moby_motion(moby, vars->motion) & 0x140) { cart_burst(moby, &moby->pos, -1, 0.75f, 13.0f); spawn_moby_break_fragments(moby, 0x7AB, 1, 0x7AB, 1, 4, 0); FUN_L00_00263fd8(moby, 0x78D, &moby->pos, - &moby->unk40, + &moby->rot, 0, 0, 0.0f, @@ -397,7 +397,7 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { FUN_L00_00263fd8(moby, 0x78E, &moby->pos, - &moby->unk40, + &moby->rot, 0, 0, 0.0f, @@ -407,7 +407,7 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { FUN_L00_00263fd8(moby, 0x78F, &moby->pos, - &moby->unk40, + &moby->rot, 0, 0, 0.0f, @@ -465,47 +465,49 @@ void update_veldin_robot_damage_and_targeting(ElectroidMoby *moby) { if (moby->state == VELDIN_ROBOT_STATE_INITIALIZE) { return; } - if (vars->unk38 != 0) { - vars->unk38 = 0; - vars->unk1DA = scale_game_frames(random_int_between(0xB4, 0x12C)); + if (vars->retimer != 0) { + vars->retimer = 0; + vars->extended_range_timer = scale_game_frames(random_int_between(0xB4, 0x12C)); } - fast_dec_timer_s16(&vars->unk1DA); - anim = vars->unk60; + fast_dec_timer_s16(&vars->extended_range_timer); + anim = vars->move; dmg = 0.0f; coll = find_moby_hit(moby, 0x330000, 0); hit_reaction(moby, coll, &vars->health, 0, &hit, &dmg, 0, 4); if (hit != 1 && moby->state != VELDIN_ROBOT_STATE_DEATH_KNOCKBACK && dmg != 0.0f) { vars->health -= dmg; - vars->unk90 = 0x200; - vars->unk80 = veldin_robot_knockback_gravity_gp * frame_time_sq; + vars->knockback_collision_radius = 0x200; + vars->knockback_gravity = veldin_robot_knockback_gravity_gp * frame_time_sq; vars->knockback_xy_speed_step = veldin_robot_knockback_xy_speed_step_gp * frame_time_sq; - vars->unk88 = veldin_robot_knockback_xy_scale_gp * frame_time; - vars->unk8C = veldin_robot_knockback_z_scale_gp * frame_time; + vars->knockback_speed = veldin_robot_knockback_xy_scale_gp * frame_time; + vars->knockback_vertical_speed = veldin_robot_knockback_z_scale_gp * frame_time; vars->unkAD = 0; vars->unk94 = 9; vars->unkBC = frame_time + frame_time; - vars->unk98 = 0.5f; + vars->knockback_collision_z_offset = 0.5f; if (vars->health <= 0.0f) { vars->unk94 = 0x29; moby->flags &= ~0x1000; hit_position.q = coll->pos.q; - trooper_knockback_arc(&hit_position, &angle, &vars->unk88, &vars->unk8C); - trooper_start_knockback(moby, vars->unk70, 0xB, 1, 0, angle); - vars->unkC0 = 7.0f; - vars->unkC4 = 16.0f; + trooper_knockback_arc( + &hit_position, &angle, &vars->knockback_speed, &vars->knockback_vertical_speed); + trooper_start_knockback(moby, vars->motion, 0xB, 1, 0, angle); + vars->knockback_apex_animation_frame = 7.0f; + vars->knockback_landing_animation_frame = 16.0f; moby->state = VELDIN_ROBOT_STATE_DEATH_KNOCKBACK; - moby->unk94 = 0; + moby->collision = 0; vars->damage_secondary_red = 0x78; trooper_anim_update(moby, anim); FUN_L00_00257470(moby, 0, -1); } else { - vars->unk88 = veldin_robot_knockback_xy_scale_gp * frame_time * 0.35f; - vars->unk8C = veldin_robot_knockback_z_scale_gp * frame_time * 0.5f; + vars->knockback_speed = veldin_robot_knockback_xy_scale_gp * frame_time * 0.35f; + vars->knockback_vertical_speed = veldin_robot_knockback_z_scale_gp * frame_time * 0.5f; hit_position.q = coll->pos.q; - trooper_knockback_arc(&hit_position, &unused, &vars->unk88, &vars->unk8C); + trooper_knockback_arc( + &hit_position, &unused, &vars->knockback_speed, &vars->knockback_vertical_speed); trooper_start_knockback( - moby, vars->unk70, 8, 1, 0, fast_arc_tan(coll->pos.f[0], coll->pos.f[1])); - vars->unkC4 = vars->unkC0 = -1.0f; + moby, vars->motion, 8, 1, 0, fast_arc_tan(coll->pos.f[0], coll->pos.f[1])); + vars->knockback_landing_animation_frame = vars->knockback_apex_animation_frame = -1.0f; moby->state = VELDIN_ROBOT_STATE_DAMAGE_KNOCKBACK; vars->damage_secondary_red = 0xFA; vars->unk26 = scale_game_frames(0x3C); @@ -513,14 +515,14 @@ void update_veldin_robot_damage_and_targeting(ElectroidMoby *moby) { } release_beam_slot_by_id(moby); } - moby->unkA4 = 0xFF; + moby->hit_slot = 0xFF; trooper_anim_finish(moby, anim); if (moby->state == VELDIN_ROBOT_STATE_WAIT_TO_FOLLOW_PATH) { path = toad_paths[vars->targeting_path_index]; FUN_L00_0025ff38(moby, &vars->targetPos, 0, 0, path->pts, path->count, 64.0f); } else if (moby->state != VELDIN_ROBOT_STATE_PROCESS_COLLISION_PROBES) { range = veldin_robot_default_target_range_gp; - if (vars->unk1DA != 0) { + if (vars->extended_range_timer != 0) { range = 37.0f; } if (select_moby_combat_target(moby, range, &vars->targetPos) != 2 && diff --git a/src/overlays/l04/mobys/blarg_trooper.c b/src/overlays/l04/mobys/blarg_trooper.c index a794183bbc..4423ee4c93 100644 --- a/src/overlays/l04/mobys/blarg_trooper.c +++ b/src/overlays/l04/mobys/blarg_trooper.c @@ -21,12 +21,12 @@ typedef struct BlargTrooperVars { f32 health; s16 max_health; u8 pad_26[0x2]; - u8 unk28; + u8 hit_response_class; u8 unk29; u8 pad_2A[0x4]; u8 unk2E; u8 pad_2F[0x9]; - s32 unk38; + s32 retimer; u8 pad_3C[0x1C]; u8 unk58; u8 pad_59[0x1]; @@ -34,7 +34,7 @@ typedef struct BlargTrooperVars { u8 pad_5B[0x5]; s16 anim_state; u8 pad_62[0x5]; - u8 unk67; + u8 hit_flash_target_red; u8 pad_68[0x8]; f32 motion[4]; f32 unk80[4]; @@ -45,10 +45,10 @@ typedef struct BlargTrooperVars { s32 path_when_unselected; s16 path_selector; u8 pad_EA[0x2]; - f32 unkEC; + f32 yaw_turn_velocity; s16 timer_F0; s16 timer_F2; - f32 unkF4; + f32 recoil_speed; char *gun_moby; u8 unkFC; u8 unkFD; @@ -57,11 +57,11 @@ typedef struct BlargTrooperVars { u8 pad_100[0x8]; s32 timer_108; u8 pad_10C[0x4]; - f32 unk110[4]; + f32 manipulator0[4]; u8 pad_120[0x58]; f32 unk178; u8 pad_17C[0x14]; - f32 unk190[4]; + f32 manipulator1[4]; u8 pad_1A0[0x58]; f32 unk1F8; } BlargTrooperVars; @@ -221,11 +221,11 @@ void blarg_trooper_update(struct Moby *moby) { flag = 0; blarg_trooper_pvars = (char *)moby->pvars; - if (blarg_trooper_pvars->unk38 != 0 || blarg_trooper_pvars->unkFE != 0) { + if (blarg_trooper_pvars->retimer != 0 || blarg_trooper_pvars->unkFE != 0) { flag = 1; } pos = (float *)&moby->pos; - manipulator_set_scale(blarg_trooper_pvars->unk110, 3.0f); + manipulator_set_scale(blarg_trooper_pvars->manipulator0, 3.0f); if (moby->visible != 0) { if (fast_vec_dist(pos, D_L04_00166F40) < 27.0f) { FUN_L00_0025a120(moby); @@ -315,7 +315,7 @@ void blarg_trooper_update(struct Moby *moby) { case BLARG_TROOPER_HIT_REACTION_FATAL: case BLARG_TROOPER_HIT_REACTION_FATAL_KNOCKBACK: moby->flags &= 0xEFFF; - blarg_trooper_pvars->unk67 = 0xFA; + blarg_trooper_pvars->hit_flash_target_red = 0xFA; { float a = frame_time_sq * 37.0f; float b = frame_time * 17.0f; @@ -341,30 +341,34 @@ void blarg_trooper_update(struct Moby *moby) { case BLARG_TROOPER_HIT_REACTION_START_HIT_RECOVERY: case BLARG_TROOPER_HIT_REACTION_RECOIL_RECOVERY: { int attacker_class; - blarg_trooper_pvars->unk67 = 0x96; + blarg_trooper_pvars->hit_flash_target_red = 0x96; blend_moby_animation(moby, (void *)8, 0, (void *)scale_game_frames(5)); moby->state = BLARG_TROOPER_STATE_HIT_RECOVERY; attacker_class = *(short *)(*(char **)(hit + 0x20) + 0xA6); if (attacker_class == 0x131 || attacker_class == 0xB0) { - blarg_trooper_pvars->unkF4 = 2.0f / scale_time(15.0f) * 0.5f; + blarg_trooper_pvars->recoil_speed = 2.0f / scale_time(15.0f) * 0.5f; } else { - blarg_trooper_pvars->unkF4 = 2.0f / scale_time(15.0f); + blarg_trooper_pvars->recoil_speed = 2.0f / scale_time(15.0f); } *(OvlQuad *)update_scratch.w.p.v70 = *(OvlQuad *)(hit + 0x10); - trooper_knockback_arc( - update_scratch.w.p.v70, &recovery_knockback_yaw, &blarg_trooper_pvars->unkF4, &one); + trooper_knockback_arc(update_scratch.w.p.v70, + &recovery_knockback_yaw, + &blarg_trooper_pvars->recoil_speed, + &one); moby->rot.z = fast_add_rotations(3.1415927f, recovery_knockback_yaw); break; } case BLARG_TROOPER_HIT_REACTION_START_KNOCKBACK_RECOVERY: case BLARG_TROOPER_HIT_REACTION_KNOCKBACK_RECOVERY: - blarg_trooper_pvars->unk67 = 0xFA; + blarg_trooper_pvars->hit_flash_target_red = 0xFA; blend_moby_animation(moby, (void *)0xC, 0, (void *)scale_game_frames(5)); moby->state = BLARG_TROOPER_STATE_KNOCKBACK_RECOVERY; - blarg_trooper_pvars->unkF4 = 2.0f / scale_time(15.0f); + blarg_trooper_pvars->recoil_speed = 2.0f / scale_time(15.0f); *(OvlQuad *)update_scratch.w.p.v70 = *(OvlQuad *)(hit + 0x10); - trooper_knockback_arc( - update_scratch.w.p.v70, &recovery_knockback_yaw, &blarg_trooper_pvars->unkF4, &one); + trooper_knockback_arc(update_scratch.w.p.v70, + &recovery_knockback_yaw, + &blarg_trooper_pvars->recoil_speed, + &one); moby->rot.z = fast_add_rotations(3.1415927f, recovery_knockback_yaw); break; case BLARG_TROOPER_HIT_REACTION_NO_ADDITIONAL_RESPONSE: @@ -377,10 +381,10 @@ void blarg_trooper_update(struct Moby *moby) { trooper_anim_update(moby, &blarg_trooper_pvars->anim_state); } moby->hit_slot = 0xFF; - if (blarg_trooper_pvars->unk38 != 0) { + if (blarg_trooper_pvars->retimer != 0) { blarg_trooper_pvars->unkFE = scale_game_frames(0xF0); } - blarg_trooper_pvars->unk38 = 0; + blarg_trooper_pvars->retimer = 0; FUN_L00_001fefc8(&blarg_trooper_pvars->unkFE); fast_dec_timer(&blarg_trooper_pvars->timer_108); switch (moby->state) { @@ -388,7 +392,7 @@ void blarg_trooper_update(struct Moby *moby) { moby->flags |= 0x1000; blarg_trooper_pvars->health = 2.0f; blarg_trooper_pvars->max_health = 2; - blarg_trooper_pvars->unk28 = 1; + blarg_trooper_pvars->hit_response_class = 1; blarg_trooper_pvars->unk2E = 1; blarg_trooper_pvars->unk29 = 1; blarg_trooper_pvars->timer_F0 = 0; @@ -422,7 +426,7 @@ void blarg_trooper_update(struct Moby *moby) { float a = fast_arc_tan(update_scratch.v50[0] - moby->pos.x, update_scratch.v50[1] - moby->pos.y); FUN_L00_00258278(moby, - &blarg_trooper_pvars->unkEC, + &blarg_trooper_pvars->yaw_turn_velocity, a, frame_scale_sq * 0.04f, frame_scale_sq * 0.3f, @@ -479,13 +483,13 @@ void blarg_trooper_update(struct Moby *moby) { float a = fast_arc_tan(update_scratch.v60[0] - moby->pos.x, update_scratch.v60[1] - moby->pos.y); FUN_L00_00258278(moby, - &blarg_trooper_pvars->unkEC, + &blarg_trooper_pvars->yaw_turn_velocity, a, frame_scale_sq * 0.03f, frame_scale_sq * 0.3f, frame_time * 4.712389f); } - f = blarg_trooper_pvars->unkEC * 30.0f; + f = blarg_trooper_pvars->yaw_turn_velocity * 30.0f; if (f > 0.7853982f) { f = 0.7853982f; } else if (f < -0.7853982f) { @@ -509,7 +513,7 @@ void blarg_trooper_update(struct Moby *moby) { float a = fast_arc_tan(update_scratch.v50[0] - moby->pos.x, update_scratch.v50[1] - moby->pos.y); FUN_L00_00258278(moby, - &blarg_trooper_pvars->unkEC, + &blarg_trooper_pvars->yaw_turn_velocity, a, frame_scale_sq * 0.04f, frame_scale_sq * 0.3f, @@ -573,7 +577,7 @@ void blarg_trooper_update(struct Moby *moby) { float a = fast_arc_tan(update_scratch.v60[0] - moby->pos.x, update_scratch.v60[1] - moby->pos.y); FUN_L00_00258278(moby, - &blarg_trooper_pvars->unkEC, + &blarg_trooper_pvars->yaw_turn_velocity, a, frame_scale_sq * 0.035f, frame_scale_sq * 0.3f, @@ -601,7 +605,7 @@ void blarg_trooper_update(struct Moby *moby) { float a = fast_arc_tan(update_scratch.v50[0] - moby->pos.x, update_scratch.v50[1] - moby->pos.y); FUN_L00_00258278(moby, - &blarg_trooper_pvars->unkEC, + &blarg_trooper_pvars->yaw_turn_velocity, a, frame_scale_sq * 0.03f, frame_scale_sq * 0.3f, @@ -657,7 +661,7 @@ void blarg_trooper_update(struct Moby *moby) { float a = fast_arc_tan(update_scratch.tgt[8] - moby->pos.x, update_scratch.tgt[9] - moby->pos.y); FUN_L00_00258278(moby, - &blarg_trooper_pvars->unkEC, + &blarg_trooper_pvars->yaw_turn_velocity, a, frame_scale_sq * 0.04f, frame_scale_sq * 0.3f, @@ -697,7 +701,7 @@ void blarg_trooper_update(struct Moby *moby) { float a = fast_arc_tan(update_scratch.v50[0] - moby->pos.x, update_scratch.v50[1] - moby->pos.y); FUN_L00_00258278(moby, - &blarg_trooper_pvars->unkEC, + &blarg_trooper_pvars->yaw_turn_velocity, a, frame_scale_sq * 0.04f, frame_scale_sq * 0.3f, @@ -736,15 +740,15 @@ void blarg_trooper_update(struct Moby *moby) { case BLARG_TROOPER_STATE_HIT_RECOVERY: case BLARG_TROOPER_STATE_BACKWARD_RECOVERY: case BLARG_TROOPER_STATE_KNOCKBACK_RECOVERY: - if (blarg_trooper_pvars->unkF4 > 0.0f) { - update_scratch.w.p.v70[0] = - fast_cos(fast_add_rotations(moby->rot.z, 3.1415927f)) * blarg_trooper_pvars->unkF4; - update_scratch.w.p.v70[1] = - fast_sin(fast_add_rotations(moby->rot.z, 3.1415927f)) * blarg_trooper_pvars->unkF4; + if (blarg_trooper_pvars->recoil_speed > 0.0f) { + update_scratch.w.p.v70[0] = fast_cos(fast_add_rotations(moby->rot.z, 3.1415927f)) * + blarg_trooper_pvars->recoil_speed; + update_scratch.w.p.v70[1] = fast_sin(fast_add_rotations(moby->rot.z, 3.1415927f)) * + blarg_trooper_pvars->recoil_speed; update_scratch.w.p.v70[2] = 0.0f; fast_vec_add(update_scratch.w.p.v70, update_scratch.w.p.v70, pos); - blarg_trooper_pvars->unkF4 = - blarg_trooper_pvars->unkF4 + -2.0f / (scale_time(15.0f) * scale_time(15.0f)); + blarg_trooper_pvars->recoil_speed = + blarg_trooper_pvars->recoil_speed + -2.0f / (scale_time(15.0f) * scale_time(15.0f)); move_moby_xy_with_collision_constraints( moby, pos, update_scratch.w.p.v70, 0.5f, 1.0f, 0.5f, 0.5235988f, 1); } @@ -796,9 +800,9 @@ void blarg_trooper_update(struct Moby *moby) { blarg_trooper_pvars->unk1F8 = -blarg_trooper_pvars->unk1F8; } update_joint_animation( - moby, blarg_trooper_pvars->unk110, 5, frame_scale_sq * 0.018f, frame_scale_sq * 0.3f); + moby, blarg_trooper_pvars->manipulator0, 5, frame_scale_sq * 0.018f, frame_scale_sq * 0.3f); update_joint_animation( - moby, blarg_trooper_pvars->unk190, 6, frame_scale_sq * 0.024f, frame_scale_sq * 0.3f); + moby, blarg_trooper_pvars->manipulator1, 6, frame_scale_sq * 0.024f, frame_scale_sq * 0.3f); if (blarg_trooper_pvars->gun_moby != 0) { char *o; build_moby_bone_transform(moby, 1, (char *)update_scratch.w.m); diff --git a/src/overlays/l05/mobys/extermitank.c b/src/overlays/l05/mobys/extermitank.c index a66659a6d8..1e79878e18 100644 --- a/src/overlays/l05/mobys/extermitank.c +++ b/src/overlays/l05/mobys/extermitank.c @@ -101,22 +101,22 @@ typedef struct ExtermitankVars { f32 health; s16 max_health; u8 pad_26[0x2]; - u8 unk28; + u8 hit_response_class; u8 unk29; u8 pad_2A[0x4]; u8 lifecycle_state; u8 pad_2F[0x9]; - s32 unk38; + s32 retimer; u8 pad_3C[0x2]; u16 unk3E; - f32 unk40[4]; + f32 velocity[4]; u8 pad_50[0x8]; u8 unk58; u8 pad_59[0x1]; u8 unk5A; u8 pad_5B[0x5]; f32 motion[4]; - s32 unk70; + s32 mover; u8 pad_74[0x4]; f32 unk78; f32 unk7C; @@ -129,25 +129,25 @@ typedef struct ExtermitankVars { f32 unkB0; f32 unkB4; u8 pad_B8[0x8]; - s32 unkC0; + s32 path_point; u8 pad_C4[0xC]; - char *unkD0; - s32 unkD4; + char *path; + s32 path_index; u8 pad_D8[0x18]; u8 manipulator0; u8 pad_F1[0xF]; - f32 unk100[4]; + f32 manipulator0_rotation[4]; u8 pad_110[0x20]; u8 manipulator1; u8 pad_131[0xF]; - f32 unk140[4]; + f32 manipulator1_rotation[4]; u8 pad_150[0x24]; f32 firing_range_xy; s32 firing_range_timer; u8 pad_17C[0x4]; s32 unk180; - char *unk184; - char *unk188; + char *tread_moby0; + char *tread_moby1; u8 pad_18C[0x4]; s32 path_190; f32 turret_yaw; @@ -168,10 +168,10 @@ void extermitank_update(unsigned char *moby) { handle_extermitank_hits_and_sync_children((char *)moby); process_extermitank_particle_hits((char *)moby); if (extermitank_vars->lifecycle_state == 2) { - if (extermitank_vars->unk184 != 0) - mark_moby_for_removal_c3(extermitank_vars->unk184); - if (extermitank_vars->unk188 != 0) - mark_moby_for_removal_c3(extermitank_vars->unk188); + if (extermitank_vars->tread_moby0 != 0) + mark_moby_for_removal_c3(extermitank_vars->tread_moby0); + if (extermitank_vars->tread_moby1 != 0) + mark_moby_for_removal_c3(extermitank_vars->tread_moby1); mark_moby_for_removal_c3(moby); return; } @@ -185,63 +185,63 @@ void extermitank_update(unsigned char *moby) { case EXTERMITANK_INITIALIZE: { char *child_moby; char *g; - if (extermitank_vars->unk184 == 0) { - extermitank_vars->unk184 = create_moby(0x368); - (extermitank_vars->unk184)[0x30] = 0x40; - *(short *)(extermitank_vars->unk184 + 0x32) = 0x40; - (extermitank_vars->unk184)[0x31] = 1; + if (extermitank_vars->tread_moby0 == 0) { + extermitank_vars->tread_moby0 = create_moby(0x368); + (extermitank_vars->tread_moby0)[0x30] = 0x40; + *(short *)(extermitank_vars->tread_moby0 + 0x32) = 0x40; + (extermitank_vars->tread_moby0)[0x31] = 1; { char *g2 = ((char *)&D_0013F350); - *(long *)(extermitank_vars->unk184 + 0x38) = + *(long *)(extermitank_vars->tread_moby0 + 0x38) = *(long *)(*(char **)(g2 + 0x2080) + 0x38); } - *(short *)(extermitank_vars->unk184 + 0x34) = 0x4000; - child_moby = extermitank_vars->unk184; + *(short *)(extermitank_vars->tread_moby0 + 0x34) = 0x4000; + child_moby = extermitank_vars->tread_moby0; qcopy(child_moby + 0x10, moby + 0x10); MOBY(child_moby)->collision = 0; - update_entity(extermitank_vars->unk184); + update_entity(extermitank_vars->tread_moby0); } - if (extermitank_vars->unk188 == 0) { - extermitank_vars->unk188 = create_moby(0x369); - (extermitank_vars->unk188)[0x30] = 0x40; - *(short *)(extermitank_vars->unk188 + 0x32) = 0x40; - (extermitank_vars->unk188)[0x31] = 1; + if (extermitank_vars->tread_moby1 == 0) { + extermitank_vars->tread_moby1 = create_moby(0x369); + (extermitank_vars->tread_moby1)[0x30] = 0x40; + *(short *)(extermitank_vars->tread_moby1 + 0x32) = 0x40; + (extermitank_vars->tread_moby1)[0x31] = 1; { char *g2 = ((char *)&D_0013F350); - *(long *)(extermitank_vars->unk188 + 0x38) = + *(long *)(extermitank_vars->tread_moby1 + 0x38) = *(long *)(*(char **)(g2 + 0x2080) + 0x38); } - *(short *)(extermitank_vars->unk188 + 0x34) = 0x4000; - child_moby = extermitank_vars->unk188; + *(short *)(extermitank_vars->tread_moby1 + 0x34) = 0x4000; + child_moby = extermitank_vars->tread_moby1; qcopy(child_moby + 0x10, moby + 0x10); MOBY(child_moby)->collision = 0; - update_entity(extermitank_vars->unk188); + update_entity(extermitank_vars->tread_moby1); } attach_manipulator((char *)moby, 0, &extermitank_vars->manipulator0); attach_manipulator((char *)moby, 1, &extermitank_vars->manipulator1); MOBY(moby)->flags |= 0x1000; g = ((char *)&D_0013F350); MOBY(moby)->spawn_frame = *(long *)(*(char **)(g + 0x2080) + 0x38); - FUN_L01_0026d930(&extermitank_vars->unk70); + FUN_L01_0026d930(&extermitank_vars->mover); extermitank_vars->unk7C = 2.0f; extermitank_vars->unk78 = 4.0f; - extermitank_vars->unk70 = 0x38D; + extermitank_vars->mover = 0x38D; extermitank_vars->unkAC = 0.01f; extermitank_vars->unkB0 = 0.3f; extermitank_vars->unkB4 = 0.1f; - extermitank_vars->unkD0 = ((char *)l05_paths[extermitank_vars->unkD4]); - extermitank_vars->unkC0 = 1; - qcopy(moby + 0x10, extermitank_vars->unkD0 + 0x10); + extermitank_vars->path = ((char *)l05_paths[extermitank_vars->path_index]); + extermitank_vars->path_point = 1; + qcopy(moby + 0x10, extermitank_vars->path + 0x10); MOBY(moby)->state = EXTERMITANK_FOLLOW_PATH; if (MOBY(moby)->prev_seq != 0) blend_moby_animation(moby, 0, 0, 0); extermitank_vars->unk94 = D_L05_00161AF8 * D_0015ED6C_gp; - clear_u64_value(extermitank_vars->unk40); + clear_u64_value(extermitank_vars->velocity); extermitank_vars->unk3E |= 2; extermitank_vars->lifecycle_state = 1; extermitank_vars->unk29 = 0; extermitank_vars->max_health = 6; - extermitank_vars->unk28 = 3; + extermitank_vars->hit_response_class = 3; extermitank_vars->health = 6.0f; extermitank_vars->unk180 = scale_game_frames(0x3C); *(int *)&extermitank_vars->turret_pitch = 0; @@ -254,7 +254,7 @@ void extermitank_update(unsigned char *moby) { break; } case EXTERMITANK_FOLLOW_PATH: { - char *pp = &extermitank_vars->unkC0; + char *pp = &extermitank_vars->path_point; char *path = *(char **)(pp + 0x10); int n = *(int *)path; signed char dir = *(signed char *)(pp + 4); @@ -263,11 +263,11 @@ void extermitank_update(unsigned char *moby) { char *h; if (dir >= 0) last = n - 1; - idx = (extermitank_vars->unkC0 + n + dir) % n; + idx = (extermitank_vars->path_point + n + dir) % n; step_mover_2e3f20((char *)moby, - &extermitank_vars->unk70, + &extermitank_vars->mover, (float *)(path + (idx * 16 + 0x10)), - extermitank_vars->unk40); + extermitank_vars->velocity); if (vector_distance_xy(moby + 0x10, *(char **)(pp + 0x10) + (idx * 16 + 0x10)) < 1.0f) { if (idx == last) { char *q = *(char **)(pp + 0x10); @@ -309,15 +309,16 @@ void extermitank_update(unsigned char *moby) { step_angle_toward_target( &extermitank_vars->turret_pitch, 0, 0.0f, D_0015ED6C_gp * 1.5707964f); } - build_axis_rotation_quaternion(extermitank_vars->unk140, 1, extermitank_vars->turret_pitch); build_axis_rotation_quaternion( - extermitank_vars->unk100, + extermitank_vars->manipulator1_rotation, 1, extermitank_vars->turret_pitch); + build_axis_rotation_quaternion( + extermitank_vars->manipulator0_rotation, 2, fast_subtract_rotations(extermitank_vars->turret_yaw, MOBY(moby)->rot.z)); break; } case EXTERMITANK_FIRE_PARTICLES: { - char *pp = &extermitank_vars->unkC0; + char *pp = &extermitank_vars->path_point; char *path = *(char **)(pp + 0x10); int n = *(int *)path; signed char dir = *(signed char *)(pp + 4); @@ -328,11 +329,11 @@ void extermitank_update(unsigned char *moby) { char *h; if (dir >= 0) last = n - 1; - idx = (extermitank_vars->unkC0 + n + dir) % n; + idx = (extermitank_vars->path_point + n + dir) % n; step_mover_2e3f20((char *)moby, - &extermitank_vars->unk70, + &extermitank_vars->mover, (float *)(path + (idx * 16 + 0x10)), - extermitank_vars->unk40); + extermitank_vars->velocity); if (vector_distance_xy(moby + 0x10, *(char **)(pp + 0x10) + (idx * 16 + 0x10)) < 1.0f) { if (idx == last) { char *q = *(char **)(pp + 0x10); @@ -484,18 +485,19 @@ void extermitank_update(unsigned char *moby) { step_angle_toward_target( &extermitank_vars->turret_pitch, 0, 0.08726646f, D_0015ED6C_gp * 1.5707964f); } - build_axis_rotation_quaternion(extermitank_vars->unk140, 1, extermitank_vars->turret_pitch); build_axis_rotation_quaternion( - extermitank_vars->unk100, + extermitank_vars->manipulator1_rotation, 1, extermitank_vars->turret_pitch); + build_axis_rotation_quaternion( + extermitank_vars->manipulator0_rotation, 2, fast_subtract_rotations(extermitank_vars->turret_yaw, MOBY(moby)->rot.z)); break; } case EXTERMITANK_REMOVE: - if (extermitank_vars->unk184 != 0) - mark_moby_for_removal_c3(extermitank_vars->unk184); - if (extermitank_vars->unk188 != 0) - mark_moby_for_removal_c3(extermitank_vars->unk188); + if (extermitank_vars->tread_moby0 != 0) + mark_moby_for_removal_c3(extermitank_vars->tread_moby0); + if (extermitank_vars->tread_moby1 != 0) + mark_moby_for_removal_c3(extermitank_vars->tread_moby1); mark_moby_for_removal_c3(moby); break; } @@ -560,9 +562,9 @@ void handle_extermitank_hits_and_sync_children(char *moby) { struct Hero *hero_turn_reference; part0 = find_moby_hit(moby, 0x210000, 0); - first = extermitank_hit_sync_vars->unk184; + first = extermitank_hit_sync_vars->tread_moby0; part1 = first ? find_moby_hit(first, 0x210000, 0) : 0; - second = extermitank_hit_sync_vars->unk188; + second = extermitank_hit_sync_vars->tread_moby1; part2 = second ? find_moby_hit(second, 0x210000, 0) : 0; part0 = select_candidate_by_max_float_2c(part0, part1, part2, 0); if (part0 != 0) { @@ -591,7 +593,7 @@ void handle_extermitank_hits_and_sync_children(char *moby) { qcopy(position, moby + 0x10); position[2] += 3.0f; spawn_explosion(moby, - extermitank_hit_sync_vars->unk40, + extermitank_hit_sync_vars->velocity, position, 0.0f, 0.0f, @@ -612,7 +614,7 @@ void handle_extermitank_hits_and_sync_children(char *moby) { position[0] += 2.0f * fast_cos(MOBY(moby)->rot.z); position[1] += 2.0f * fast_sin(MOBY(moby)->rot.z); spawn_explosion(moby, - extermitank_hit_sync_vars->unk40, + extermitank_hit_sync_vars->velocity, position, 0.0f, 0.0f, @@ -635,7 +637,7 @@ void handle_extermitank_hits_and_sync_children(char *moby) { angle = fast_add_rotations(MOBY(moby)->rot.z, 3.14159274f); position[1] += 2.0f * fast_sin(angle); spawn_explosion(moby, - extermitank_hit_sync_vars->unk40, + extermitank_hit_sync_vars->velocity, position, 0.0f, 0.0f, @@ -744,14 +746,14 @@ void handle_extermitank_hits_and_sync_children(char *moby) { update_motion_305178(moby, extermitank_hit_sync_vars->motion); mark_children: ((unsigned char *)moby)[0xa4] = 0xff; - if (extermitank_hit_sync_vars->unk184 != 0) - ((unsigned char *)extermitank_hit_sync_vars->unk184)[0xa4] = 0xff; - if (extermitank_hit_sync_vars->unk188 != 0) - ((unsigned char *)extermitank_hit_sync_vars->unk188)[0xa4] = 0xff; - if (extermitank_hit_sync_vars->unk38 != 0 && + if (extermitank_hit_sync_vars->tread_moby0 != 0) + ((unsigned char *)extermitank_hit_sync_vars->tread_moby0)[0xa4] = 0xff; + if (extermitank_hit_sync_vars->tread_moby1 != 0) + ((unsigned char *)extermitank_hit_sync_vars->tread_moby1)[0xa4] = 0xff; + if (extermitank_hit_sync_vars->retimer != 0 && extermitank_hit_sync_vars->firing_range_timer == 0) { extermitank_hit_sync_vars->firing_range_timer = scale_game_frames(0xf0); - extermitank_hit_sync_vars->unk38 = 0; + extermitank_hit_sync_vars->retimer = 0; hero_turn_reference = &hero; angle = fast_arc_tan(hero_turn_reference->motion.pos.f[0] - MOBY(moby)->pos.x, hero_turn_reference->motion.pos.f[1] - MOBY(moby)->pos.y); @@ -762,29 +764,29 @@ void handle_extermitank_hits_and_sync_children(char *moby) { extermitank_hit_sync_vars->firing_range_xy = 20.0f; else extermitank_hit_sync_vars->firing_range_xy = 14.0f; - if (extermitank_hit_sync_vars->unk184 != 0) { + if (extermitank_hit_sync_vars->tread_moby0 != 0) { char *first; float offset_scale; - speed = fast_vec_length(extermitank_hit_sync_vars->unk40); + speed = fast_vec_length(extermitank_hit_sync_vars->velocity); speed /= extermitank_child_animation_speed_divisor_gp * frame_time; offset_scale = extermitank_child_animation_speed_offset_scale_gp; - *(float *)(extermitank_hit_sync_vars->unk184 + 0x58) = speed; - *(float *)(extermitank_hit_sync_vars->unk184 + 0x58) += + *(float *)(extermitank_hit_sync_vars->tread_moby0 + 0x58) = speed; + *(float *)(extermitank_hit_sync_vars->tread_moby0 + 0x58) += extermitank_hit_sync_vars->child_animation_speed_bias * offset_scale; - first = extermitank_hit_sync_vars->unk184; + first = extermitank_hit_sync_vars->tread_moby0; qcopy(first + 0x40, moby + 0x40); qcopy(first + 0x10, moby + 0x10); } - if (extermitank_hit_sync_vars->unk188 != 0) { + if (extermitank_hit_sync_vars->tread_moby1 != 0) { char *second; float offset_scale; - speed = fast_vec_length(extermitank_hit_sync_vars->unk40); + speed = fast_vec_length(extermitank_hit_sync_vars->velocity); speed /= extermitank_child_animation_speed_divisor_gp * frame_time; offset_scale = extermitank_child_animation_speed_offset_scale_gp; - *(float *)(extermitank_hit_sync_vars->unk188 + 0x58) = speed; - *(float *)(extermitank_hit_sync_vars->unk188 + 0x58) -= + *(float *)(extermitank_hit_sync_vars->tread_moby1 + 0x58) = speed; + *(float *)(extermitank_hit_sync_vars->tread_moby1 + 0x58) -= extermitank_hit_sync_vars->child_animation_speed_bias * offset_scale; - second = extermitank_hit_sync_vars->unk188; + second = extermitank_hit_sync_vars->tread_moby1; qcopy(second + 0x40, moby + 0x40); qcopy(second + 0x10, moby + 0x10); } diff --git a/src/overlays/l07/mobys/snagglebeast.c b/src/overlays/l07/mobys/snagglebeast.c index 4d8f4bc463..9f411e3fe5 100644 --- a/src/overlays/l07/mobys/snagglebeast.c +++ b/src/overlays/l07/mobys/snagglebeast.c @@ -82,7 +82,7 @@ typedef struct SnagglebeastVars { u8 pad_59[0x1]; u8 unk5A; u8 pad_5B[0x5]; - s16 unk60; + s16 move; u8 pad_62[0x5]; u8 damage_flash; u8 pad_68[0x1C]; @@ -95,14 +95,14 @@ typedef struct SnagglebeastVars { u8 pad_AC[0x14]; f32 turn_target[4]; u8 pad_D0[0x30]; - f32 unk100[4]; + f32 velocity[4]; f32 rope_start_position[4]; - f32 unk120[4]; - f32 unk130[4]; - f32 unk140[4]; + f32 rope_end_position[4]; + f32 rope_tip_velocity[4]; + f32 rope_tip_position[4]; f32 unk150[4]; s32 timer; - s32 unk164; + s32 substate; s32 turn_controller_state; f32 rope_extension_length; s32 navigation_ids[6]; @@ -115,17 +115,17 @@ typedef struct SnagglebeastVars { s16 timer_19A; u8 navigation_mask; u8 unk19D; - s16 unk19E; + s16 ammo_drain_step; s32 path_1A0; s32 unk1A4; s32 unk1A8; - f32 unk1AC; - s32 unk1B0; + f32 drop_path_distance; + s32 health_hud_handle; s32 health_display; f32 unk1B8; u8 pad_1BC[0x4]; s32 nav_point; - u8 unk1C4; + u8 hero_captured; u8 sphere_fade_direction; u8 sphere_shade; u8 hero_capture_attack_enabled; @@ -150,7 +150,7 @@ typedef struct SnagglebeastVars { s32 unk294; s32 unk298; s32 unk29C; - u8 unk2A0[1]; + u8 manipulator[1]; } SnagglebeastVars; static inline int tint_color(int color) { @@ -294,7 +294,7 @@ void draw_snagglebeast_rope_attack_layer( u64 texture; spin = convert_integer_to_float(level_frame_count + phase) * speed; - if (rope_layer_moby_vars->unk164 == 4) { + if (rope_layer_moby_vars->substate == 4) { float alpha = convert_integer_to_float(color >> 24); float fade = convert_integer_to_float(rope_layer_moby_vars->timer); fade = fade / scale_game_frames(20); @@ -303,7 +303,7 @@ void draw_snagglebeast_rope_attack_layer( alpha = 0.0f; color &= 0xFFFFFF; color |= truncate_float_to_s32(alpha) << 24; - } else if (rope_layer_moby_vars->unk164 > 4) { + } else if (rope_layer_moby_vars->substate > 4) { return; } step = 0.5235988f; @@ -331,10 +331,10 @@ void draw_snagglebeast_rope_attack_layer( quad.texture_coordinates[3][1] = half; } qcopy(&quad.positions[1], rope_layer_moby_vars->rope_start_position); - qcopy(&quad.positions[3], rope_layer_moby_vars->unk140); + qcopy(&quad.positions[3], rope_layer_moby_vars->rope_tip_position); inner = quad; - qcopy(&inner.positions[0], rope_layer_moby_vars->unk120); - qcopy(&inner.positions[1], rope_layer_moby_vars->unk120); + qcopy(&inner.positions[0], rope_layer_moby_vars->rope_end_position); + qcopy(&inner.positions[1], rope_layer_moby_vars->rope_end_position); for (angle = -3.1415927f; angle < step + 3.1415927f; angle += step) { qcopy(&quad.positions[0], &quad.positions[1]); qcopy(&quad.positions[2], &quad.positions[3]); @@ -343,7 +343,7 @@ void draw_snagglebeast_rope_attack_layer( offset[2] = radius * fast_sin(wrapped); offset[0] = 0.0f; transform_vector_by_basis(offset, offset, moby + 0xC0); - fast_vec_add(&quad.positions[3], rope_layer_moby_vars->unk140, offset); + fast_vec_add(&quad.positions[3], rope_layer_moby_vars->rope_tip_position, offset); if (angle != -3.1415927f) { draw_geometry_quad(&quad, 0, 1); qcopy(&inner.positions[2], &quad.positions[2]); @@ -381,26 +381,29 @@ void draw_and_probe_snagglebeast_rope_attack(char *moby) { qzero(&rope_offset); one = 1.0f; fast_vec_normalize(&rope_offset, - rope_attack_moby_vars->unk130, + rope_attack_moby_vars->rope_tip_velocity, rope_attack_moby_vars->rope_extension_length * 0.8f); - fast_vec_add( - rope_attack_moby_vars->unk140, &rope_offset, rope_attack_moby_vars->rope_start_position); + fast_vec_add(rope_attack_moby_vars->rope_tip_position, + &rope_offset, + rope_attack_moby_vars->rope_start_position); fast_vec_normalize(&rope_offset, &rope_offset, rope_attack_moby_vars->rope_extension_length); - fast_vec_add( - rope_attack_moby_vars->unk120, &rope_offset, rope_attack_moby_vars->rope_start_position); + fast_vec_add(rope_attack_moby_vars->rope_end_position, + &rope_offset, + rope_attack_moby_vars->rope_start_position); draw_snagglebeast_rope_attack_layer(moby, one, 0, one, 0x20000080); draw_snagglebeast_rope_attack_layer(moby, 0.7f, 10, 2.0f, 0x28008080); draw_snagglebeast_rope_attack_layer(moby, 0.4f, 20, 3.0f, 0x30B0FFFF); - fast_vec_sub( - rope_direction, rope_attack_moby_vars->unk120, rope_attack_moby_vars->rope_start_position); + fast_vec_sub(rope_direction, + rope_attack_moby_vars->rope_end_position, + rope_attack_moby_vars->rope_start_position); fast_vec_normalize(rope_direction, rope_direction, one); make_hit_descriptor(blk, moby, 0x30000, 1.00012302f, rope_direction); if (collision_line(rope_attack_moby_vars->rope_start_position, - rope_attack_moby_vars->unk120, + rope_attack_moby_vars->rope_end_position, 0, moby, blk) == 0) { - collect_mobies_in_sphere(0.5f, rope_attack_moby_vars->unk120, 0, moby, blk); + collect_mobies_in_sphere(0.5f, rope_attack_moby_vars->rope_end_position, 0, moby, blk); } } @@ -518,7 +521,7 @@ void process_snagglebeast_damage(char *moby, MOBY(moby)->flags &= 0xefff; FUN_L00_00257470(moby, 0, -1); snagglebeast_instance_vars->damage_flash = 0x78; - trooper_anim_update(moby, &snagglebeast_instance_vars->unk60); + trooper_anim_update(moby, &snagglebeast_instance_vars->move); if ((u8)moby[0x53] != 2) FUN_00212f90(moby, 2, 0, random_int_between(10, 13)); if (camera_secondary_mode_lui == 0x78) @@ -546,7 +549,7 @@ void process_snagglebeast_damage(char *moby, *health -= *(float *)(hit + 0x2c); snagglebeast_instance_vars->damage_flash = 0xfa; snagglebeast_instance_vars->unk26 = scale_game_frames(0); - trooper_anim_update(moby, &snagglebeast_instance_vars->unk60); + trooper_anim_update(moby, &snagglebeast_instance_vars->move); if ((u8)moby[0x20] < 10 && *health < scratch.threshold) { int slot; if (camera_secondary_mode_lui == 0x78) @@ -586,7 +589,7 @@ void process_snagglebeast_damage(char *moby, snagglebeast_instance_vars->sphere_shade = 0; MOBY(moby)->hit_slot = 0xff; } - trooper_anim_finish(moby, &snagglebeast_instance_vars->unk60); + trooper_anim_finish(moby, &snagglebeast_instance_vars->move); output = snagglebeast_instance_vars->damage_reaction_amount + 0.3f; snagglebeast_instance_vars->damage_reaction_amount = output; if (output > 0.0f) @@ -1024,7 +1027,7 @@ void snagglebeast_update(unsigned char *moby) { int i; float *health; - FUN_L00_00263ac8(2.5f, (int)moby, 0xB, snagglebeast_instance_state->unk2A0); + FUN_L00_00263ac8(2.5f, (int)moby, 0xB, snagglebeast_instance_state->manipulator); apply_snagglebeast_big_head_cheat((char *)moby); if (scene_state == 2) return; @@ -1190,7 +1193,7 @@ void snagglebeast_update(unsigned char *moby) { if (MOBY(moby)->state != SNAGGLEBEAST_INITIALIZE && MOBY(moby)->state != SNAGGLEBEAST_DEATH_EXPLOSION && MOBY(moby)->state != SNAGGLEBEAST_POST_DEATH_CLEANUP) { - snagglebeast_instance_state->unk1B0 = + snagglebeast_instance_state->health_hud_handle = queue_animation_update(0x16, 0xFFFF, (int)reset_numeric_hud_element, @@ -1253,7 +1256,7 @@ void snagglebeast_update(unsigned char *moby) { MOBY(moby)->update_dist = 0xFF; MOBY(moby)->draw_dist = 0xFF; snagglebeast_instance_state->unk1A8 = -1; - snagglebeast_instance_state->unk1B0 = -1; + snagglebeast_instance_state->health_hud_handle = -1; snagglebeast_instance_state->nav_point = select_point_index_by_distance( moby + 0x10, D_L07_001B0530[snagglebeast_instance_state->nav_path], 0.0f); suck_reset(moby); @@ -1274,7 +1277,7 @@ void snagglebeast_update(unsigned char *moby) { } if (fast_dec_timer(&snagglebeast_instance_state->timer)) { if (timer19a) { - snagglebeast_instance_state->unk164 = 0; + snagglebeast_instance_state->substate = 0; snagglebeast_instance_state->timer = 0; if (MOBY(moby)->prev_seq != 5) { int r = random_int_between(0, 2); @@ -1284,7 +1287,7 @@ void snagglebeast_update(unsigned char *moby) { } if (timer194) { if (MOBY(moby)->state != SNAGGLEBEAST_CHASE_TARGET || FUN_00213260(4) == 0) { - snagglebeast_instance_state->unk164 = 0; + snagglebeast_instance_state->substate = 0; if (MOBY(moby)->prev_seq != 4) { int r = random_int_between(0, 9); FUN_00212f90(moby, 4, r, random_int_between(0x14, 0x28)); @@ -1298,9 +1301,9 @@ void snagglebeast_update(unsigned char *moby) { int r = random_int_between(0, 2); FUN_00212f90(moby, 6, r, random_int_between(0xF, 0x19)); } - snagglebeast_instance_state->unk164 = 0; + snagglebeast_instance_state->substate = 0; snagglebeast_instance_state->rope_extension_length = 0.0f; - snagglebeast_instance_state->unk1C4 = 0; + snagglebeast_instance_state->hero_captured = 0; MOBY(moby)->state = SNAGGLEBEAST_CAPTURE_HERO_AND_DRAIN_AMMO; snagglebeast_instance_state->unk294 = 0; snagglebeast_instance_state->voice = FUN_0022da68(9, 4, (int)moby); @@ -1372,12 +1375,12 @@ void snagglebeast_update(unsigned char *moby) { is_value_within_interpolated_window(moby, 67.0f) || is_value_within_interpolated_window(moby, 101.0f)) { float speed; - snagglebeast_instance_state->unk164 += 1; + snagglebeast_instance_state->substate += 1; qcopy(&position, moby + 0x10); speed = frame_time * 8.0f; snagglebeast_instance_state->turn_controller_state = 0; spawn_fading_ring_effect((int)moby, &position, 0x3A, 1.0f, 25.0f, 2.0f, speed, 1.0f); - FUN_L00_0024f7c8(moby, (snagglebeast_instance_state->unk164 & 1) + 5, &position); + FUN_L00_0024f7c8(moby, (snagglebeast_instance_state->substate & 1) + 5, &position); configure_timed_point_light(moby, snagglebeast_instance_state, 1, @@ -1399,7 +1402,7 @@ void snagglebeast_update(unsigned char *moby) { } rumble_by_distance((char *)moby); } - if (snagglebeast_instance_state->unk164 >= 3 && + if (snagglebeast_instance_state->substate >= 3 && is_value_within_interpolated_window(moby, 51.0f)) { if (timer19a) { snagglebeast_instance_state->timer_194 = 0xC0; @@ -1442,7 +1445,7 @@ void snagglebeast_update(unsigned char *moby) { qcopy(&position, &sight); position.f[2] = probe_ground_height(&position, 0, 0.5f); snagglebeast_instance_state->timer += 1; - if (snagglebeast_instance_state->unk164 == 0) { + if (snagglebeast_instance_state->substate == 0) { fast_vec_sub(&velocity, moby + 0x10, &position); velocity.f[2] = 0.0f; fast_vec_normalize(&velocity, &velocity, 1.0f); @@ -1476,24 +1479,25 @@ void snagglebeast_update(unsigned char *moby) { fast_vec_add(&start, &start, &velocity); fast_vec_add(&direction, &direction, &velocity); qcopy(snagglebeast_instance_state->rope_start_position, &start); - qcopy(snagglebeast_instance_state->unk120, &direction); - qcopy(snagglebeast_instance_state->unk140, &start); - fast_vec_sub(snagglebeast_instance_state->unk130, &direction, &start); - fast_vec_scale(snagglebeast_instance_state->unk130, - snagglebeast_instance_state->unk130, + qcopy(snagglebeast_instance_state->rope_end_position, &direction); + qcopy(snagglebeast_instance_state->rope_tip_position, &start); + fast_vec_sub(snagglebeast_instance_state->rope_tip_velocity, &direction, &start); + fast_vec_scale(snagglebeast_instance_state->rope_tip_velocity, + snagglebeast_instance_state->rope_tip_velocity, 1.0f / (float)scale_game_frames(0x3C)); - qcopy(snagglebeast_instance_state->unk150, snagglebeast_instance_state->unk140); + qcopy(snagglebeast_instance_state->unk150, + snagglebeast_instance_state->rope_tip_position); *(int *)&snagglebeast_instance_state->unk150[3] = 0; - snagglebeast_instance_state->unk164 = 1; + snagglebeast_instance_state->substate = 1; } else { if (snagglebeast_instance_state->timer < scale_game_frames(0x3C)) { - fast_vec_add(snagglebeast_instance_state->unk140, - snagglebeast_instance_state->unk140, - snagglebeast_instance_state->unk130); + fast_vec_add(snagglebeast_instance_state->rope_tip_position, + snagglebeast_instance_state->rope_tip_position, + snagglebeast_instance_state->rope_tip_velocity); add_draw_callback(draw_collision_clipped_moby_beam, moby); - snagglebeast_instance_state->unk164 = 2; + snagglebeast_instance_state->substate = 2; } else { - snagglebeast_instance_state->unk164 = 0; + snagglebeast_instance_state->substate = 0; snagglebeast_instance_state->timer_19A = scale_game_frames(0xF0); snagglebeast_instance_state->timer = scale_game_frames(0xC8); MOBY(moby)->state = SNAGGLEBEAST_IDLE; @@ -1548,8 +1552,8 @@ void snagglebeast_update(unsigned char *moby) { select_snagglebeast_chase_waypoint((char *)moby, snagglebeast_instance_state, &velocity, - snagglebeast_instance_state->unk140); - qcopy(&position, snagglebeast_instance_state->unk140); + snagglebeast_instance_state->rope_tip_position); + qcopy(&position, snagglebeast_instance_state->rope_tip_position); snagglebeast_instance_state->unk298 += 1; if (snagglebeast_instance_state->turn_start_angle < fast_difference_between_rotations(MOBY(moby)->rot.z, @@ -1577,7 +1581,7 @@ void snagglebeast_update(unsigned char *moby) { int moving; int four; fast_difference_between_rotations(MOBY(moby)->rot.z, rot); - spd = fast_vec_length(snagglebeast_instance_state->unk100); + spd = fast_vec_length(snagglebeast_instance_state->velocity); near = 0; if (!path_point_ready && target_distance < 20.0f) near = 1; @@ -1614,7 +1618,7 @@ void snagglebeast_update(unsigned char *moby) { } if (fast_dec_timer(&snagglebeast_instance_state->timer)) { if (timer19a) { - snagglebeast_instance_state->unk164 = 0; + snagglebeast_instance_state->substate = 0; snagglebeast_instance_state->timer = 0; MOBY(moby)->anim_speed = 1.0f; if (MOBY(moby)->prev_seq != 5) { @@ -1624,7 +1628,7 @@ void snagglebeast_update(unsigned char *moby) { MOBY(moby)->state = SNAGGLEBEAST_SWEEP_BEAM_ATTACK; } if (timer194) { - snagglebeast_instance_state->unk164 = 0; + snagglebeast_instance_state->substate = 0; if (MOBY(moby)->prev_seq != 4) { int r = random_int_between(0, 5); FUN_00212f90(moby, 4, r, random_int_between(0x14, 0x28)); @@ -1633,7 +1637,7 @@ void snagglebeast_update(unsigned char *moby) { MOBY(moby)->anim_speed = 1.0f; } if (target_above) { - snagglebeast_instance_state->unk164 = 0; + snagglebeast_instance_state->substate = 0; { char *g = ((char *)&hero); qcopy(snagglebeast_instance_state->unk150, *(char **)(g + 0x2FC) + 0x10); @@ -1647,9 +1651,9 @@ void snagglebeast_update(unsigned char *moby) { int r = random_int_between(0, 2); FUN_00212f90(moby, 6, r, random_int_between(0x14, 0x19)); } - snagglebeast_instance_state->unk164 = 0; + snagglebeast_instance_state->substate = 0; snagglebeast_instance_state->rope_extension_length = 0.0f; - snagglebeast_instance_state->unk1C4 = 0; + snagglebeast_instance_state->hero_captured = 0; snagglebeast_instance_state->unk294 = 0; MOBY(moby)->state = SNAGGLEBEAST_CAPTURE_HERO_AND_DRAIN_AMMO; snagglebeast_instance_state->voice = FUN_0022da68(9, 4, (int)moby); @@ -1718,7 +1722,7 @@ void snagglebeast_update(unsigned char *moby) { fast_arc_tan(snagglebeast_instance_state->turn_target[0] - MOBY(moby)->pos.x, snagglebeast_instance_state->turn_target[1] - MOBY(moby)->pos.y)) < snagglebeast_instance_state->turn_start_angle * 0.25f) { - qzero(snagglebeast_instance_state->unk100); + qzero(snagglebeast_instance_state->velocity); if (MOBY(moby)->prev_seq != snagglebeast_instance_state->turn_resume_animation) { int anim = snagglebeast_instance_state->turn_resume_animation; int r = random_int_between(0, 2); @@ -1750,7 +1754,7 @@ void snagglebeast_update(unsigned char *moby) { FUN_00212f90(moby, 0xB, 0x3D, 1); } MOBY(moby)->state = SNAGGLEBEAST_WAIT_BEFORE_TIMED_DAMAGE; - snagglebeast_instance_state->unk100[2] = 0.0f; + snagglebeast_instance_state->velocity[2] = 0.0f; if (MOBY(moby)->command % 3U < 2) MOBY(moby)->command += 1; if (MOBY(moby)->command % 3U < 2) @@ -1810,12 +1814,12 @@ void snagglebeast_update(unsigned char *moby) { &position, 0, 0x40103080, 1.6f, 14700.0f); } if (MOBY(moby)->command == 8) { - float z = snagglebeast_instance_state->unk100[2]; + float z = snagglebeast_instance_state->velocity[2]; fast_vec_scale( - snagglebeast_instance_state->unk100, snagglebeast_instance_state->unk100, 0.7f); - (snagglebeast_instance_state->unk100)[2] = z; - (snagglebeast_instance_state->unk100)[2] -= frame_time * 9.8f; - fast_vec_add(moby + 0x10, moby + 0x10, snagglebeast_instance_state->unk100); + snagglebeast_instance_state->velocity, snagglebeast_instance_state->velocity, 0.7f); + (snagglebeast_instance_state->velocity)[2] = z; + (snagglebeast_instance_state->velocity)[2] -= frame_time * 9.8f; + fast_vec_add(moby + 0x10, moby + 0x10, snagglebeast_instance_state->velocity); if (MOBY(moby)->pos.z < snagglebeast_instance_state->unk1B8) done = 1; } else { @@ -1826,14 +1830,14 @@ void snagglebeast_update(unsigned char *moby) { snagglebeast_instance_state->timer = scale_game_frames(0xA); snagglebeast_instance_state->sphere_fade_direction = 2; MOBY(moby)->state = SNAGGLEBEAST_APPLY_TIMED_DAMAGE_AND_SELECT_PATH; - snagglebeast_instance_state->unk164 = snagglebeast_instance_state->max_health / 6; + snagglebeast_instance_state->substate = snagglebeast_instance_state->max_health / 6; } break; } case SNAGGLEBEAST_APPLY_TIMED_DAMAGE_AND_SELECT_PATH: fast_vec_scale( - snagglebeast_instance_state->unk100, snagglebeast_instance_state->unk100, 0.4f); - fast_vec_add(moby + 0x10, moby + 0x10, snagglebeast_instance_state->unk100); + snagglebeast_instance_state->velocity, snagglebeast_instance_state->velocity, 0.4f); + fast_vec_add(moby + 0x10, moby + 0x10, snagglebeast_instance_state->velocity); if (compute_interpolated_record_value(moby) < 168.0f) { FUN_L00_0024f7c8(moby, 0xA, &position); position.f[2] = 34.6f; @@ -1852,12 +1856,12 @@ void snagglebeast_update(unsigned char *moby) { (int)moby, &position, 0x3A, 1.0f, 25.0f, 2.0f, frame_time * 8.0f, 1.0f); rumble_by_distance((char *)moby); } - if (snagglebeast_instance_state->unk164 > 0) { + if (snagglebeast_instance_state->substate > 0) { if (fast_dec_timer(&snagglebeast_instance_state->timer)) { - snagglebeast_instance_state->unk164 -= 1; + snagglebeast_instance_state->substate -= 1; *health -= 1.0f; snagglebeast_instance_state->damage_flash = 0xFA; - trooper_anim_update(moby, &snagglebeast_instance_state->unk60); + trooper_anim_update(moby, &snagglebeast_instance_state->move); if (*health <= 0.0f) { *health = 0.0f; if (MOBY(moby)->prev_seq != 8) @@ -1873,7 +1877,7 @@ void snagglebeast_update(unsigned char *moby) { } MOBY(moby)->state = SNAGGLEBEAST_DEATH_EXPLOSION; } else { - if (snagglebeast_instance_state->unk164 > 0) { + if (snagglebeast_instance_state->substate > 0) { snagglebeast_instance_state->timer = scale_game_frames(0xA); } else { snagglebeast_instance_state->timer = scale_game_frames(0x14); @@ -1884,12 +1888,12 @@ void snagglebeast_update(unsigned char *moby) { if (fast_dec_timer(&snagglebeast_instance_state->timer)) { switch (snagglebeast_instance_state->unk19D) { case SNAGGLEBEAST_PATH_SELECT_FIRST_POINT: - qcopy(snagglebeast_instance_state->unk120, + qcopy(snagglebeast_instance_state->rope_end_position, D_L07_001B0530[snagglebeast_instance_state->path_1A0] + 0x10); snagglebeast_instance_state->navigation_mask &= 0xFE; break; case SNAGGLEBEAST_PATH_SELECT_SECOND_POINT: - qcopy(snagglebeast_instance_state->unk120, + qcopy(snagglebeast_instance_state->rope_end_position, D_L07_001B0530[snagglebeast_instance_state->path_1A0] + 0x20); snagglebeast_instance_state->navigation_mask &= 0xFD; break; @@ -1900,10 +1904,10 @@ void snagglebeast_update(unsigned char *moby) { if (vector_distance_xy(((char *)&hero) + 0x80, D_L07_001B0530[snagglebeast_instance_state->path_1A0] + 0x40) < hero_to_first_paired_path_point_distance) { - qcopy(snagglebeast_instance_state->unk120, + qcopy(snagglebeast_instance_state->rope_end_position, D_L07_001B0530[snagglebeast_instance_state->path_1A0] + 0x30); } else { - qcopy(snagglebeast_instance_state->unk120, + qcopy(snagglebeast_instance_state->rope_end_position, D_L07_001B0530[snagglebeast_instance_state->path_1A0] + 0x40); } snagglebeast_instance_state->navigation_mask &= 0xFB; @@ -1928,7 +1932,8 @@ void snagglebeast_update(unsigned char *moby) { FUN_00212f90(moby, 0xA, 0, 0); FUN_L00_0024f7c8(moby, 0xA, &position); qcopy(snagglebeast_instance_state->turn_target, &position); - snagglebeast_instance_state->turn_target[2] = snagglebeast_instance_state->unk120[2]; + snagglebeast_instance_state->turn_target[2] = + snagglebeast_instance_state->rope_end_position[2]; point = 0xA; get_moby_joint_matrices(moby, 1, &point, &velocity); matrix_to_euler(&velocity, &step); @@ -1972,33 +1977,35 @@ void snagglebeast_update(unsigned char *moby) { fr = update_snagglebeast_rope(moby, &position); if (MOBY(moby)->seq != 6) break; - qcopy(snagglebeast_instance_state->unk140, ((char *)&hero) + 0x80); - snagglebeast_instance_state->unk140[2] += 0.6f; + qcopy(snagglebeast_instance_state->rope_tip_position, ((char *)&hero) + 0x80); + snagglebeast_instance_state->rope_tip_position[2] += 0.6f; if (snagglebeast_instance_state->rope_extension_length < hero_distance) { float step_time = frame_time * 15.0f; snagglebeast_instance_state->timer = 0; snagglebeast_instance_state->rope_extension_length += step_time; } else { - if (snagglebeast_instance_state->unk1C4 != 0 || + if (snagglebeast_instance_state->hero_captured != 0 || (fast_dec_timer(&snagglebeast_instance_state->timer) && fr < 0.6f)) { int slot; char *g = ((char *)&hero); - snagglebeast_instance_state->unk1C4 = 1; + snagglebeast_instance_state->hero_captured = 1; if (*(int *)(g + 0x2084) != 0x78) { qcopy(snagglebeast_instance_state->rope_start_position, ((char *)&hero) + 0x80); - qcopy(snagglebeast_instance_state->unk120, ((char *)&hero) + 0x80); + qcopy(snagglebeast_instance_state->rope_end_position, ((char *)&hero) + 0x80); if (MOBY(moby)->pos.z < *(float *)(g + 0x88)) { - snagglebeast_instance_state->unk120[2] = *(float *)(g + 0x88) + 2.0f; + snagglebeast_instance_state->rope_end_position[2] = + *(float *)(g + 0x88) + 2.0f; } else { - snagglebeast_instance_state->unk120[2] = MOBY(moby)->pos.z + 2.0f; + snagglebeast_instance_state->rope_end_position[2] = + MOBY(moby)->pos.z + 2.0f; } hero_set_state(0x78, 1); - snagglebeast_instance_state->unk164 = 0; - snagglebeast_instance_state->unk1AC = 20.0f; - snagglebeast_instance_state->unk19E = 0; + snagglebeast_instance_state->substate = 0; + snagglebeast_instance_state->drop_path_distance = 20.0f; + snagglebeast_instance_state->ammo_drain_step = 0; } fast_vec_sub(&velocity, - snagglebeast_instance_state->unk120, + snagglebeast_instance_state->rope_end_position, snagglebeast_instance_state->rope_start_position); fast_vec_scale(&velocity, &velocity, frame_scale * 0.1f); fast_vec_add(snagglebeast_instance_state->rope_start_position, @@ -2014,9 +2021,9 @@ void snagglebeast_update(unsigned char *moby) { *(float *)(captured_hero + 0x1D48), frame_time * 25.132742f); } snagglebeast_instance_state->rope_extension_length = hero_distance; - slot = snagglebeast_ammo_drain_entries[snagglebeast_instance_state->unk164][0]; + slot = snagglebeast_ammo_drain_entries[snagglebeast_instance_state->substate][0]; if (slot == -1) { - snagglebeast_instance_state->unk164 = 0; + snagglebeast_instance_state->substate = 0; snagglebeast_instance_state->timer_196 = scale_game_frames(0x320); snagglebeast_instance_state->timer = scale_game_frames(0xF0); detach_snagglebeast_rope_particles((int)moby); @@ -2039,20 +2046,20 @@ void snagglebeast_update(unsigned char *moby) { int ammo_transfer_count = (l07_ammo_transfer_records + slot)->count; int rem; int pos; - if (snagglebeast_instance_state->unk19E == 0) { - snagglebeast_instance_state->unk19E = + if (snagglebeast_instance_state->ammo_drain_step == 0) { + snagglebeast_instance_state->ammo_drain_step = ((int *)&weapon_ammo_counts)[slot] / 8; - if (snagglebeast_instance_state->unk19E < ammo_transfer_count) - snagglebeast_instance_state->unk19E = ammo_transfer_count; - snagglebeast_instance_state->unk1AC = - random_float_between(snagglebeast_instance_state->unk1AC + 20.0f, - snagglebeast_instance_state->unk1AC + 100.0f); + if (snagglebeast_instance_state->ammo_drain_step < ammo_transfer_count) + snagglebeast_instance_state->ammo_drain_step = ammo_transfer_count; + snagglebeast_instance_state->drop_path_distance = random_float_between( + snagglebeast_instance_state->drop_path_distance + 20.0f, + snagglebeast_instance_state->drop_path_distance + 100.0f); } - ammo_transfer_count = snagglebeast_instance_state->unk19E; + ammo_transfer_count = snagglebeast_instance_state->ammo_drain_step; if (((int *)&weapon_ammo_counts)[slot] < ammo_transfer_count) { ammo_transfer_count = ((int *)&weapon_ammo_counts)[slot]; - snagglebeast_instance_state->unk19E = 0; - snagglebeast_instance_state->unk164 += 1; + snagglebeast_instance_state->ammo_drain_step = 0; + snagglebeast_instance_state->substate += 1; } rem = ((int *)&weapon_ammo_counts)[slot] - ammo_transfer_count * 8; pos = rem > 0; @@ -2076,12 +2083,12 @@ void snagglebeast_update(unsigned char *moby) { pidx = select_point_index_by_distance(((char *)&hero) + 0x80, path, 0.0f); do { - snagglebeast_instance_state->unk1AC += 10.0f; + snagglebeast_instance_state->drop_path_distance += 10.0f; sample_path(path, &start, &pidx, &pfrac, - snagglebeast_instance_state->unk1AC, + snagglebeast_instance_state->drop_path_distance, 1); hero_to_sample_distance = vector_distance_xy(((char *)&hero) + 0x80, &start); @@ -2098,7 +2105,8 @@ void snagglebeast_update(unsigned char *moby) { fast_vec_add(&direction, &direction, ((char *)&hero) + 0x80); velocity.f[2] = FUN_L00_0025abf0( &direction, &start, 0, frame_time * 15.0f, frame_time_sq * -9.8f); - snagglebeast_instance_state->unk1AC += random_float_between(0.7f, 2.0f); + snagglebeast_instance_state->drop_path_distance += + random_float_between(0.7f, 2.0f); } FUN_0022da68(0xB, 0, (int)moby); { @@ -2116,7 +2124,7 @@ void snagglebeast_update(unsigned char *moby) { } } if (!sight_ready) { - snagglebeast_instance_state->unk164 = 0; + snagglebeast_instance_state->substate = 0; snagglebeast_instance_state->timer_196 = scale_game_frames(0xF); detach_snagglebeast_rope_particles((int)moby); { @@ -2161,7 +2169,7 @@ void snagglebeast_update(unsigned char *moby) { break; } case SNAGGLEBEAST_ROPE_ATTACK: - if (snagglebeast_instance_state->unk164 <= 0) { + if (snagglebeast_instance_state->substate <= 0) { if (start_snagglebeast_turn_toward_target( moby, snagglebeast_instance_state, snagglebeast_instance_state->unk150, 7, 1)) break; @@ -2173,12 +2181,12 @@ void snagglebeast_update(unsigned char *moby) { frame_time_sq * 2.0943952f, frame_time_sq * 0.6981317f, frame_time * 2.0943952f); - switch (snagglebeast_instance_state->unk164) { + switch (snagglebeast_instance_state->substate) { case SNAGGLEBEAST_ROPE_START_ATTACK_ANIMATION: if (MOBY(moby)->prev_seq != 7) FUN_00212f90(moby, 7, 0, random_int_between(0xA, 0xD)); snagglebeast_instance_state->timer = 0; - snagglebeast_instance_state->unk164 = 1; + snagglebeast_instance_state->substate = 1; break; case SNAGGLEBEAST_ROPE_WAIT_FOR_ORIGIN_FRAME: if ((*(u64 *)(moby + 0x50) & 0xFFFF0000) != 0x07070000 && MOBY(moby)->prev_seq != 7) { @@ -2191,13 +2199,13 @@ void snagglebeast_update(unsigned char *moby) { fast_vec_add(&position, &velocity, &direction); fast_vec_scale(&position, &position, 0.5f); qcopy(snagglebeast_instance_state->rope_start_position, &position); - fast_vec_sub(snagglebeast_instance_state->unk130, + fast_vec_sub(snagglebeast_instance_state->rope_tip_velocity, snagglebeast_instance_state->unk150, snagglebeast_instance_state->rope_start_position); - fast_vec_normalize(snagglebeast_instance_state->unk130, - snagglebeast_instance_state->unk130, + fast_vec_normalize(snagglebeast_instance_state->rope_tip_velocity, + snagglebeast_instance_state->rope_tip_velocity, frame_scale); - snagglebeast_instance_state->unk164 = 2; + snagglebeast_instance_state->substate = 2; } } break; @@ -2212,7 +2220,7 @@ void snagglebeast_update(unsigned char *moby) { } if (compute_interpolated_record_value(moby) >= 31.5f) { snagglebeast_instance_state->rope_extension_length = 0.0f; - snagglebeast_instance_state->unk164 = 3; + snagglebeast_instance_state->substate = 3; *(int *)&snagglebeast_instance_state->rope_start_position[3] = 0; } break; @@ -2220,7 +2228,7 @@ void snagglebeast_update(unsigned char *moby) { float r = vector_distance_xy(moby + 0x10, &sight.position30); snagglebeast_instance_state->rope_extension_length += frame_scale; if (r <= snagglebeast_instance_state->rope_extension_length) - snagglebeast_instance_state->unk164 = 4; + snagglebeast_instance_state->substate = 4; if (fast_dec_timer(&snagglebeast_instance_state->timer)) snagglebeast_instance_state->timer = scale_game_frames(0x14); add_draw_callback(draw_and_probe_snagglebeast_rope_attack, moby); @@ -2228,7 +2236,7 @@ void snagglebeast_update(unsigned char *moby) { } case SNAGGLEBEAST_ROPE_RETRACT: fast_vec_sub(&position, - snagglebeast_instance_state->unk120, + snagglebeast_instance_state->rope_end_position, snagglebeast_instance_state->rope_start_position); fast_vec_normalize(&position, &position, frame_scale); fast_vec_add(snagglebeast_instance_state->rope_start_position, @@ -2242,15 +2250,15 @@ void snagglebeast_update(unsigned char *moby) { 0x800060FF, 0, 10.0f); - if (snagglebeast_instance_state->unk164 != 0) { + if (snagglebeast_instance_state->substate != 0) { if (fast_dec_timer(&snagglebeast_instance_state->timer)) - snagglebeast_instance_state->unk164 = 5; + snagglebeast_instance_state->substate = 5; } add_draw_callback(draw_and_probe_snagglebeast_rope_attack, moby); break; case SNAGGLEBEAST_ROPE_RETURN_TO_IDLE: MOBY(moby)->anim_speed = 1.0f; - snagglebeast_instance_state->unk164 = 0; + snagglebeast_instance_state->substate = 0; snagglebeast_instance_state->timer = 0; if (MOBY(moby)->prev_seq != (rand() & 1)) { int r1 = rand() & 1; @@ -2262,18 +2270,18 @@ void snagglebeast_update(unsigned char *moby) { } break; case SNAGGLEBEAST_DEATH_EXPLOSION: - if (snagglebeast_instance_state->unk1B0 != -1) { - set_animation_parameter(snagglebeast_instance_state->unk1B0, 0); - snagglebeast_instance_state->unk1B0 = -1; + if (snagglebeast_instance_state->health_hud_handle != -1) { + set_animation_parameter(snagglebeast_instance_state->health_hud_handle, 0); + snagglebeast_instance_state->health_hud_handle = -1; } if (MOBY(moby)->anim_flags & 2) { fast_vec_normalize( - snagglebeast_instance_state->unk100, snagglebeast_instance_state->unk100, 1.0f); - snagglebeast_instance_state->unk100[2] = 1.0f; + snagglebeast_instance_state->velocity, snagglebeast_instance_state->velocity, 1.0f); + snagglebeast_instance_state->velocity[2] = 1.0f; qcopy(&position, moby + 0x10); position.f[2] = snagglebeast_instance_state->unk1B8 + 1.0f; spawn_explosion(moby, - snagglebeast_instance_state->unk100, + snagglebeast_instance_state->velocity, &position, 0.0f, 0.0f, @@ -2301,7 +2309,7 @@ void snagglebeast_update(unsigned char *moby) { case SNAGGLEBEAST_WAIT_AFTER_HEALTH_THRESHOLD_HIT: if (MOBY(moby)->anim_flags & 2) { if (target_above) { - snagglebeast_instance_state->unk164 = 0; + snagglebeast_instance_state->substate = 0; { char *g = ((char *)&hero); qcopy(snagglebeast_instance_state->unk150, *(char **)(g + 0x2FC) + 0x10); @@ -2329,7 +2337,7 @@ void snagglebeast_update(unsigned char *moby) { case 17: break; } - fast_vec_sub(snagglebeast_instance_state->unk100, moby + 0x10, &oldpos); + fast_vec_sub(snagglebeast_instance_state->velocity, moby + 0x10, &oldpos); if (MOBY(moby)->state < SNAGGLEBEAST_DEATH_EXPLOSION) jet_animate((struct Moby *)moby, 2.5f); update_timed_point_light_color((char *)snagglebeast_instance_state); diff --git a/src/overlays/l12/mobys/blarg_helicopter.c b/src/overlays/l12/mobys/blarg_helicopter.c index e5c5f3eb8e..72f318cc34 100644 --- a/src/overlays/l12/mobys/blarg_helicopter.c +++ b/src/overlays/l12/mobys/blarg_helicopter.c @@ -128,45 +128,44 @@ void cache_consecutive_point_distances(int point_data_index) { extern float spring_turn(float *vel, float cur, float target, float k, float d, float max) __asm__("FUN_L00_00258110"); typedef struct BlargHelicopterVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 unk28; - u8 unk29; - u8 pad_2A[0x2E]; - u8 unk58; - u8 unk59; - u8 unk5A; - u8 pad_5B[0x5]; - u8 anim_state; - u8 pad_61[0x6]; - u8 hit_flash_target_red; - u8 pad_68[0x8]; - f32 unk70[4]; - s32 unk80; - u8 pad_84[0x4]; - f32 yaw_turn_velocity; - s16 rocket_fire_timer_frames; - s16 knockback_timer_frames; - f32 bob_angle; - f32 unk94; - f32 unk98; - f32 unk9C; - s32 unkA0; - s32 unkA4; - u8 pad_A8[0x4]; - u8 unkAC; - u8 pad_AD[0x3]; - s32 unkB0; - s32 unkB4; - s32 unkB8; - s16 unkBC; - s16 target_first_path_endpoint; - s32 unkC0; - s32 unkC4; - u8 pad_C8[0x8]; - u8 unkD0; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 unk29; + u8 pad_2A[0x2E]; + u8 unk58; + u8 unk59; + u8 unk5A; + u8 pad_5B[0x5]; + u8 anim_state; + u8 pad_61[0x6]; + u8 hit_flash_target_red; + u8 pad_68[0x8]; + f32 velocity[4]; + s32 trigger_volume; + u8 pad_84[0x4]; + f32 yaw_turn_velocity; + s16 rocket_fire_timer_frames; + s16 knockback_timer_frames; + f32 bob_angle; + f32 speed; + f32 roll_turn_velocity; + f32 pitch_turn_velocity; + s32 initial_path_index; + s32 endpoint_path_index; + u8 pad_A8[0x4]; + struct Moby *commander; + s32 voice; + s32 path_point; + s32 muzzle_index; + s16 rockets_fired; + s16 target_first_path_endpoint; + s32 unkC0; + s32 activation_timer; + u8 pad_C8[0x8]; + u8 manipulator; } BlargHelicopterVars; /* Moby class 326 */ @@ -180,35 +179,35 @@ void blarg_helicopter_update(struct Moby *moby) { if (D_L12_0015F5C4 == 2) return; find_point_ahead(moby, target, 70.0f); - child = *(struct Moby **)(&blarg_helicopter_vars->unkAC); + child = blarg_helicopter_vars->commander; if (child != 0 && (signed char)child->state >= 0) - FUN_L00_00263ac8(child, 0, &blarg_helicopter_vars->unkD0, 2.7f); + FUN_L00_00263ac8(child, 0, &blarg_helicopter_vars->manipulator, 2.7f); process_blarg_helicopter_hits(moby); if (D_001413F4 == 2) { moby->scale = moby->pclass->scale * 0.5f; { - struct Moby *child = *(struct Moby **)(&blarg_helicopter_vars->unkAC); + struct Moby *child = blarg_helicopter_vars->commander; if (child != 0) child->scale = child->pclass->scale * 0.5f; } } else { moby->scale = moby->pclass->scale; { - struct Moby *child = *(struct Moby **)(&blarg_helicopter_vars->unkAC); + struct Moby *child = blarg_helicopter_vars->commander; if (child != 0) child->scale = child->pclass->scale; } } if ((unsigned int)(moby->state - 2) < 4) { - if (blarg_helicopter_vars->unkB0 == -1) - blarg_helicopter_vars->unkB0 = allocate_voice_for_target_entry(3, 4, moby); + if (blarg_helicopter_vars->voice == -1) + blarg_helicopter_vars->voice = allocate_voice_for_target_entry(3, 4, moby); } else { - int index = blarg_helicopter_vars->unkB0; + int index = blarg_helicopter_vars->voice; if (index != -1 && (void *)((VoicePoolWindow *)(D_0013E550 + index * 0x70))->voice.owner == (void *)moby && ((VoicePoolWindow *)(D_0013E550 + index * 0x70))->voice.state) release_voice_slot(index); - blarg_helicopter_vars->unkB0 = -1; + blarg_helicopter_vars->voice = -1; } index = blarg_helicopter_vars->unkC0; if (current_level_index == LEVEL_HOVEN && D_L12_00161F00 != 0) { @@ -216,9 +215,9 @@ void blarg_helicopter_update(struct Moby *moby) { if (l12_camera.focus_moby == moby) l12_camera.focus_moby = 0; if (!moby->visible) { - if (*(struct Moby **)(&blarg_helicopter_vars->unkAC)) { - mark_moby_for_removal(*(struct Moby **)(&blarg_helicopter_vars->unkAC)); - *(struct Moby **)(&blarg_helicopter_vars->unkAC) = 0; + if (blarg_helicopter_vars->commander) { + mark_moby_for_removal(blarg_helicopter_vars->commander); + blarg_helicopter_vars->commander = 0; } mark_moby_for_removal(moby); return; @@ -232,9 +231,9 @@ void blarg_helicopter_update(struct Moby *moby) { goto update_state; } if (visited52[moby->mission + current_level_index * 16] == 255) { - if (*(struct Moby **)(&blarg_helicopter_vars->unkAC)) { - mark_moby_for_removal(*(struct Moby **)(&blarg_helicopter_vars->unkAC)); - *(struct Moby **)(&blarg_helicopter_vars->unkAC) = 0; + if (blarg_helicopter_vars->commander) { + mark_moby_for_removal(blarg_helicopter_vars->commander); + blarg_helicopter_vars->commander = 0; } mark_moby_for_removal(moby); return; @@ -242,9 +241,9 @@ void blarg_helicopter_update(struct Moby *moby) { if (index == 0) goto update_state; if (D_L12_001619A0 != 0) { - if (*(struct Moby **)(&blarg_helicopter_vars->unkAC)) { - start_blarg_commander_knockback(moby, *(struct Moby **)(&blarg_helicopter_vars->unkAC)); - *(struct Moby **)(&blarg_helicopter_vars->unkAC) = 0; + if (blarg_helicopter_vars->commander) { + start_blarg_commander_knockback(moby, blarg_helicopter_vars->commander); + blarg_helicopter_vars->commander = 0; } mark_moby_for_removal(moby); return; @@ -255,40 +254,39 @@ void blarg_helicopter_update(struct Moby *moby) { int a, b, limit; blarg_helicopter_vars->max_health = 6; blarg_helicopter_vars->health = 6.0f; - blarg_helicopter_vars->unk28 = 2; + blarg_helicopter_vars->hit_response_class = 2; blarg_helicopter_vars->unk29 = 0; - blarg_helicopter_vars->unk94 = 0.0f; - blarg_helicopter_vars->unk98 = 0.0f; - blarg_helicopter_vars->unk9C = 0.0f; + blarg_helicopter_vars->speed = 0.0f; + blarg_helicopter_vars->roll_turn_velocity = 0.0f; + blarg_helicopter_vars->pitch_turn_velocity = 0.0f; moby->collision = 0; moby->flags = (moby->flags | 0x41) & 0xefff; - cache_consecutive_point_distances(blarg_helicopter_vars->unkA0); - cache_consecutive_point_distances(blarg_helicopter_vars->unkA0); - cache_consecutive_point_distances(blarg_helicopter_vars->unkA4); + cache_consecutive_point_distances(blarg_helicopter_vars->initial_path_index); + cache_consecutive_point_distances(blarg_helicopter_vars->initial_path_index); + cache_consecutive_point_distances(blarg_helicopter_vars->endpoint_path_index); if (moby->draw_dist < 128) moby->draw_dist = 128; - if (*(struct Moby **)(&blarg_helicopter_vars->unkAC) == 0) { - *(struct Moby **)(&blarg_helicopter_vars->unkAC) = - create_class_55b_moby_from_source(moby); - (*(struct Moby **)(&blarg_helicopter_vars->unkAC))->update_dist = 0; - (*(struct Moby **)(&blarg_helicopter_vars->unkAC))->flags |= 0x41; + if (blarg_helicopter_vars->commander == 0) { + blarg_helicopter_vars->commander = create_class_55b_moby_from_source(moby); + blarg_helicopter_vars->commander->update_dist = 0; + blarg_helicopter_vars->commander->flags |= 0x41; } - qcopy(&moby->pos, ((char *)l12_paths[blarg_helicopter_vars->unkA0]) + 0x10); - if (blarg_helicopter_vars->unkC0 != 0 && blarg_helicopter_vars->unkC4 == 0) { + qcopy(&moby->pos, ((char *)l12_paths[blarg_helicopter_vars->initial_path_index]) + 0x10); + if (blarg_helicopter_vars->unkC0 != 0 && blarg_helicopter_vars->activation_timer == 0) { a = scale_game_frames(240); b = scale_game_frames(400); a = FUN_L00_00257b90(a, b); { int limit = D_L12_00161F20 - 1; - blarg_helicopter_vars->unkC4 = a; + blarg_helicopter_vars->activation_timer = a; if (limit > 10) limit = 10; if (limit < 0) limit = 0; - blarg_helicopter_vars->unkC4 += limit * scale_game_frames(35); + blarg_helicopter_vars->activation_timer += limit * scale_game_frames(35); } } - blarg_helicopter_vars->unkB4 = 0; + blarg_helicopter_vars->path_point = 0; moby->state = BLARG_HELICOPTER_WAIT_FOR_ACTIVATION; break; } @@ -297,16 +295,17 @@ void blarg_helicopter_update(struct Moby *moby) { struct Moby *child; triggered = 0; if (blarg_helicopter_vars->unkC0 && D_L12_00161F00) - triggered = fast_dec_timer(&blarg_helicopter_vars->unkC4) != 0; - if ((blarg_helicopter_vars->unk80 != -1 && - is_point_inside_clip_volume(&hero.motion.pos, blarg_helicopter_vars->unk80)) || + triggered = fast_dec_timer(&blarg_helicopter_vars->activation_timer) != 0; + if ((blarg_helicopter_vars->trigger_volume != -1 && + is_point_inside_clip_volume(&hero.motion.pos, + blarg_helicopter_vars->trigger_volume)) || triggered) { blarg_helicopter_vars->unk58 = 22; blarg_helicopter_vars->unk59 = 1; blarg_helicopter_vars->unk5A = 7; moby->hit_slot = 255; moby->flags &= 0xffbe; - child = *(struct Moby **)(&blarg_helicopter_vars->unkAC); + child = blarg_helicopter_vars->commander; if (child) child->flags &= 0xffbe; moby->flags |= 0x1000; @@ -331,7 +330,7 @@ void blarg_helicopter_update(struct Moby *moby) { if (count < limit * scale_game_frames(15)) blarg_helicopter_vars->rocket_fire_timer_frames = limit * scale_game_frames(15); } - if (follow_blarg_helicopter_path(moby, blarg_helicopter_vars->unkA0)) + if (follow_blarg_helicopter_path(moby, blarg_helicopter_vars->initial_path_index)) moby->state = BLARG_HELICOPTER_AIM_AND_FIRE; break; case BLARG_HELICOPTER_AIM_AND_FIRE: { @@ -360,18 +359,18 @@ void blarg_helicopter_update(struct Moby *moby) { frame_time * 0.7853982f); value = vector_distance_xy(target, &moby->pos); angle = fast_arc_tan(value, moby->pos.z - target[2]); - moby->rot.y = spring_turn(&blarg_helicopter_vars->unk9C, + moby->rot.y = spring_turn(&blarg_helicopter_vars->pitch_turn_velocity, moby->rot.y, angle, 0.004f, 0.3f, frame_time * 0.7853982f); - clear_u64_value(blarg_helicopter_vars->unk70); + clear_u64_value(blarg_helicopter_vars->velocity); update_blarg_helicopter_motion_tilt(moby); if (fast_dec_timer_s16(&blarg_helicopter_vars->rocket_fire_timer_frames)) { - ++blarg_helicopter_vars->unkBC; - moby_point_position(moby, blarg_helicopter_vars->unkB8, &position); - blarg_helicopter_vars->unkB8 = blarg_helicopter_vars->unkB8 == 0; + ++blarg_helicopter_vars->rockets_fired; + moby_point_position(moby, blarg_helicopter_vars->muzzle_index, &position); + blarg_helicopter_vars->muzzle_index = blarg_helicopter_vars->muzzle_index == 0; qcopy(&aim, target + 8); if (blarg_helicopter_vars->unkC0) { qcopy(&aim, D_L12_00167240); @@ -409,8 +408,9 @@ void blarg_helicopter_update(struct Moby *moby) { if (D_L12_00161F20 > 6) limit = 3; } - if (blarg_helicopter_vars->unkBC >= limit && blarg_helicopter_vars->unkA4 != -1) { - blarg_helicopter_vars->unkBC = 0; + if (blarg_helicopter_vars->rockets_fired >= limit && + blarg_helicopter_vars->endpoint_path_index != -1) { + blarg_helicopter_vars->rockets_fired = 0; moby->state = BLARG_HELICOPTER_MOVE_BETWEEN_PATH_ENDPOINTS; } else blarg_helicopter_vars->rocket_fire_timer_frames = scale_game_frames(40); @@ -427,7 +427,7 @@ void blarg_helicopter_update(struct Moby *moby) { 0.3f, frame_time * 0.7853982f); { - char *path = ((char *)l12_paths[blarg_helicopter_vars->unkA4]); + char *path = ((char *)l12_paths[blarg_helicopter_vars->endpoint_path_index]); if (blarg_helicopter_vars->target_first_path_endpoint != 0) fast_vec_sub(&position, path + 16, &moby->pos); else @@ -435,8 +435,8 @@ void blarg_helicopter_update(struct Moby *moby) { } distance = fast_vec_length(&position); if (!(distance > 5.5f)) { - approach_value(&blarg_helicopter_vars->unk94, 0.0f, frame_time_sq * 9.0f); - if (blarg_helicopter_vars->unk94 == 0.0f) { + approach_value(&blarg_helicopter_vars->speed, 0.0f, frame_time_sq * 9.0f); + if (blarg_helicopter_vars->speed == 0.0f) { blarg_helicopter_vars->rocket_fire_timer_frames = scale_game_frames(50); blarg_helicopter_vars->target_first_path_endpoint = blarg_helicopter_vars->target_first_path_endpoint == 0; @@ -444,23 +444,24 @@ void blarg_helicopter_update(struct Moby *moby) { break; } } else - approach_value(&blarg_helicopter_vars->unk94, frame_time * 10.0f, frame_time_sq * 7.0f); - fast_vec_normalize(blarg_helicopter_vars->unk70, &position, blarg_helicopter_vars->unk94); - fast_vec_add(&moby->pos, &moby->pos, blarg_helicopter_vars->unk70); + approach_value(&blarg_helicopter_vars->speed, frame_time * 10.0f, frame_time_sq * 7.0f); + fast_vec_normalize( + blarg_helicopter_vars->velocity, &position, blarg_helicopter_vars->speed); + fast_vec_add(&moby->pos, &moby->pos, blarg_helicopter_vars->velocity); update_blarg_helicopter_motion_tilt(moby); break; case BLARG_HELICOPTER_KNOCKBACK: if (fast_dec_timer_s16(&blarg_helicopter_vars->knockback_timer_frames)) { moby->state = moby->command; } else { - value = blarg_helicopter_vars->unk94 - frame_time_sq * 4.0f; - blarg_helicopter_vars->unk94 = value; + value = blarg_helicopter_vars->speed - frame_time_sq * 4.0f; + blarg_helicopter_vars->speed = value; if (value < 0.0f) - blarg_helicopter_vars->unk94 = 0.0f; + blarg_helicopter_vars->speed = 0.0f; value = fast_cos(moby->rot.z); - position.f[0] = value * -blarg_helicopter_vars->unk94; + position.f[0] = value * -blarg_helicopter_vars->speed; value = fast_sin(moby->rot.z); - position.f[1] = value * -blarg_helicopter_vars->unk94; + position.f[1] = value * -blarg_helicopter_vars->speed; position.f[2] = 0.0f; fast_vec_add(&moby->pos, &moby->pos, &position); } @@ -469,9 +470,9 @@ void blarg_helicopter_update(struct Moby *moby) { int index; if (l12_camera.focus_moby == moby) l12_camera.focus_moby = 0; - if (*(struct Moby **)(&blarg_helicopter_vars->unkAC)) { - start_blarg_commander_knockback(moby, *(struct Moby **)(&blarg_helicopter_vars->unkAC)); - *(struct Moby **)(&blarg_helicopter_vars->unkAC) = 0; + if (blarg_helicopter_vars->commander) { + start_blarg_commander_knockback(moby, blarg_helicopter_vars->commander); + blarg_helicopter_vars->commander = 0; } spawn_explosion(moby, ((char *)&D_L12_0015F580_gp), @@ -493,12 +494,12 @@ void blarg_helicopter_update(struct Moby *moby) { 0); if (blarg_helicopter_vars->unkC0 == 0) FUN_L00_00257470(moby, 0, -1); - index = blarg_helicopter_vars->unkB0; + index = blarg_helicopter_vars->voice; if (index != -1 && (void *)((VoicePoolWindow *)(D_0013E550 + index * 0x70))->voice.owner == (void *)moby && ((VoicePoolWindow *)(D_0013E550 + index * 0x70))->voice.state) release_voice_slot(index); - blarg_helicopter_vars->unkB0 = -1; + blarg_helicopter_vars->voice = -1; if (blarg_helicopter_vars->unkC0 == 0) { remove: mark_moby_for_removal(moby); @@ -506,7 +507,7 @@ void blarg_helicopter_update(struct Moby *moby) { } a = scale_game_frames(240); b = scale_game_frames(400); - blarg_helicopter_vars->unkC4 = FUN_L00_00257b90(a, b); + blarg_helicopter_vars->activation_timer = FUN_L00_00257b90(a, b); moby->collision = 0; moby->state = BLARG_HELICOPTER_INITIALIZE; moby->flags = (moby->flags | 0x41) & 0xefff; @@ -519,14 +520,14 @@ void blarg_helicopter_update(struct Moby *moby) { blarg_helicopter_vars->bob_angle = angle; moby->pos.z += fast_cos(angle) * 0.17f; { - struct Moby *child = *(struct Moby **)(&blarg_helicopter_vars->unkAC); + struct Moby *child = blarg_helicopter_vars->commander; if (child) { *(OvlQuad *)&child->pos = *(OvlQuad *)&moby->pos; - child = *(struct Moby **)(&blarg_helicopter_vars->unkAC); + child = blarg_helicopter_vars->commander; *(OvlQuad *)&child->rot = *(OvlQuad *)&moby->rot; - advance_moby_animation(*(struct Moby **)(&blarg_helicopter_vars->unkAC)); - FUN_L00_00250df8_x(*(struct Moby **)(&blarg_helicopter_vars->unkAC)); - (*(struct Moby **)(&blarg_helicopter_vars->unkAC))->flags |= 6; + advance_moby_animation(blarg_helicopter_vars->commander); + FUN_L00_00250df8_x(blarg_helicopter_vars->commander); + blarg_helicopter_vars->commander->flags |= 6; } } if (blarg_helicopter_vars->unkC0 == 0 && moby->state > BLARG_HELICOPTER_WAIT_FOR_ACTIVATION && @@ -538,19 +539,19 @@ void blarg_helicopter_update(struct Moby *moby) { void update_blarg_helicopter_motion_tilt(struct Moby *moby) { BlargHelicopterVars *blarg_helicopter_motion_vars = (BlargHelicopterVars *)moby->pvars; - float ang = fast_subtract_rotations(fast_arc_tan(blarg_helicopter_motion_vars->unk70[0], - blarg_helicopter_motion_vars->unk70[1]), + float ang = fast_subtract_rotations(fast_arc_tan(blarg_helicopter_motion_vars->velocity[0], + blarg_helicopter_motion_vars->velocity[1]), moby->rot.z); float target_rotation_y = - blarg_helicopter_motion_vars->unk94 * 0.2268928f * fast_cos(ang) / (frame_time * 10.0f); + blarg_helicopter_motion_vars->speed * 0.2268928f * fast_cos(ang) / (frame_time * 10.0f); float target_rotation_x = - blarg_helicopter_motion_vars->unk94 * -0.2268928f * fast_sin(ang) / (frame_time * 10.0f); + blarg_helicopter_motion_vars->speed * -0.2268928f * fast_sin(ang) / (frame_time * 10.0f); float updated_rotation_y, k0, rotation_y_damping, rotation_y_step_limit, k1, rotation_x_damping, rotation_x_step_limit; k0 = frame_time_sq * 0.5235988f; rotation_y_damping = frame_time_sq * 1.0471976f; rotation_y_step_limit = frame_time * 0.7853982f; - updated_rotation_y = spring_turn(&blarg_helicopter_motion_vars->unk9C, + updated_rotation_y = spring_turn(&blarg_helicopter_motion_vars->pitch_turn_velocity, moby->rot.y, target_rotation_y, k0, @@ -560,7 +561,7 @@ void update_blarg_helicopter_motion_tilt(struct Moby *moby) { rotation_x_damping = frame_time_sq * 2.0943952f; rotation_x_step_limit = frame_time * 1.2217305f; moby->rot.y = updated_rotation_y; - moby->rot.x = spring_turn(&blarg_helicopter_motion_vars->unk98, + moby->rot.x = spring_turn(&blarg_helicopter_motion_vars->roll_turn_velocity, moby->rot.x, target_rotation_x, k1, @@ -588,19 +589,19 @@ int follow_blarg_helicopter_path(struct Moby *moby, int path_index) { target_record_or_node_offset[20]; /* target record from the finder; also the step vector */ int i; float target_heading; - for (i = moby_vars->unkB4; i < *(int *)path - 1; i++) + for (i = moby_vars->path_point; i < *(int *)path - 1; i++) sum += *(float *)(path + i * 16 + 0x1C); if (sum > 5.0f) { target_heading = - fast_arc_tan(*(float *)((moby_vars->unkB4 << 4) + path + 0x10) - moby->pos.x, - *(float *)((moby_vars->unkB4 << 4) + path + 0x14) - moby->pos.y); + fast_arc_tan(*(float *)((moby_vars->path_point << 4) + path + 0x10) - moby->pos.x, + *(float *)((moby_vars->path_point << 4) + path + 0x14) - moby->pos.y); ((M_af68 *)moby)->rz = spring_turn(&moby_vars->yaw_turn_velocity, ((M_af68 *)moby)->rz, target_heading, 0.004f, 0.3f, frame_time * 0.7853982f); - approach_value(&moby_vars->unk94, frame_time * 10.0f, frame_time_sq * 7.0f); + approach_value(&moby_vars->speed, frame_time * 10.0f, frame_time_sq * 7.0f); } else { ahead_f(moby, target_record_or_node_offset, 48.0f); target_heading = fast_arc_tan(target_record_or_node_offset[0] - moby->pos.x, @@ -611,18 +612,19 @@ int follow_blarg_helicopter_path(struct Moby *moby, int path_index) { 0.004f, 0.3f, frame_time * 0.7853982f); - approach_value(&moby_vars->unk94, 0.0f, frame_time_sq * 9.0f); - sum = moby_vars->unk94; + approach_value(&moby_vars->speed, 0.0f, frame_time_sq * 9.0f); + sum = moby_vars->speed; if (sum == 0.0f) return 1; } - fast_vec_sub(target_record_or_node_offset, &((N_af68 *)path)[moby_vars->unkB4 + 1], &moby->pos); - fast_vec_normalize(moby_vars->unk70, target_record_or_node_offset, moby_vars->unk94); - fast_vec_add(&moby->pos, &moby->pos, moby_vars->unk70); - if (fast_vec_dist(&moby->pos, &((N_af68 *)path)[moby_vars->unkB4 + 1]) < 2.0f) { - (moby_vars->unkB4)++; - if (*(int *)path - 1 < moby_vars->unkB4) - moby_vars->unkB4 = *(int *)path - 1; + fast_vec_sub( + target_record_or_node_offset, &((N_af68 *)path)[moby_vars->path_point + 1], &moby->pos); + fast_vec_normalize(moby_vars->velocity, target_record_or_node_offset, moby_vars->speed); + fast_vec_add(&moby->pos, &moby->pos, moby_vars->velocity); + if (fast_vec_dist(&moby->pos, &((N_af68 *)path)[moby_vars->path_point + 1]) < 2.0f) { + (moby_vars->path_point)++; + if (*(int *)path - 1 < moby_vars->path_point) + moby_vars->path_point = *(int *)path - 1; } update_blarg_helicopter_motion_tilt(moby); return 0; @@ -674,13 +676,13 @@ void process_blarg_helicopter_hits(struct Moby *moby) { knockback_rotation_x = fast_sin(hit_yaw_offset) * -0.34906584f; if (absolute_float(moby->rot.x) < absolute_float(knockback_rotation_x)) { moby->rot.x = knockback_rotation_x; - blarg_helicopter_hit_vars->unk98 = 0.0f; + blarg_helicopter_hit_vars->roll_turn_velocity = 0.0f; } if (absolute_float(moby->rot.y) < absolute_float(knockback_rotation_y)) { moby->rot.y = knockback_rotation_y; - blarg_helicopter_hit_vars->unk9C = 0.0f; + blarg_helicopter_hit_vars->pitch_turn_velocity = 0.0f; } - blarg_helicopter_hit_vars->unk94 = frame_time * 4.0f; + blarg_helicopter_hit_vars->speed = frame_time * 4.0f; blarg_helicopter_hit_vars->knockback_timer_frames = scale_game_frames(0x3C); moby->command = moby->state; moby->state = BLARG_HELICOPTER_KNOCKBACK; diff --git a/src/overlays/l14/mobys/blarg_heavy_interceptor.c b/src/overlays/l14/mobys/blarg_heavy_interceptor.c index 7b63ded96d..8b56a899f5 100644 --- a/src/overlays/l14/mobys/blarg_heavy_interceptor.c +++ b/src/overlays/l14/mobys/blarg_heavy_interceptor.c @@ -199,7 +199,7 @@ typedef struct BlargHeavyInterceptorVars { f32 health; s16 max_health; u8 pad_26[0x2]; - u8 unk28; + u8 hit_response_class; u8 pad_29[0x5]; u8 removal_status; u8 pad_2F[0x11]; @@ -215,7 +215,7 @@ typedef struct BlargHeavyInterceptorVars { u8 pad_68[0x8]; s32 turret_group; s32 spawn_path; - s32 unk78; + s32 path_index; u8 pad_7C[0x4]; s32 path_point; s32 path_segment; @@ -223,15 +223,12 @@ typedef struct BlargHeavyInterceptorVars { s16 rejoin_path_loop; f32 path_point_segment_distance; f32 cached_aim_point_position[4]; - f32 unkA0[4]; - f32 unkB0[4]; - f32 unkC0[4]; - f32 unkD0[4]; - f32 unkE0[4]; - f32 unkF0[4]; + f32 bone_transform[4][4]; + f32 manipulator0[4]; + f32 manipulator0_rotation[4]; u8 pad_100[0x20]; - f32 unk120[4]; - f32 unk130[4]; + f32 manipulator1[4]; + f32 manipulator1_rotation[4]; f32 unk140[4]; u8 pad_150[0x10]; f32 beam_rotation_blink_and_aim_path_state[4]; @@ -242,7 +239,7 @@ typedef struct BlargHeavyInterceptorVars { f32 unk1B0[4]; f32 unk1C0[4]; f32 unk1D0[4]; - f32 unk1E0[4]; + f32 death_velocity[4]; s16 timer_1F0; s16 timer_1F2; f32 unk1F4; @@ -319,7 +316,7 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { return; } if (moby_vars->spawn_path == -1 || *((int *)l14_paths[moby_vars->spawn_path]) == 0 || - moby_vars->unk78 == -1 || *((int *)l14_paths[moby_vars->unk78]) == 0 || + moby_vars->path_index == -1 || *((int *)l14_paths[moby_vars->path_index]) == 0 || moby_vars->turret_group < 0 || moby_vars->patrol_path == -1 || *((int *)l14_paths[moby_vars->patrol_path]) == 0) { FUN_0020c828(moby); @@ -328,9 +325,9 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { moby->shadow_range = 0x20; moby_vars->health = 4.0f; moby_vars->max_health = 4; - moby_vars->unk28 = 3; + moby_vars->hit_response_class = 3; qcopy(&moby->pos, (char *)l14_paths[moby_vars->spawn_path] + 0x10); - qcopy(moby_vars->aim_point_position, (char *)l14_paths[moby_vars->unk78] + 0x10); + qcopy(moby_vars->aim_point_position, (char *)l14_paths[moby_vars->path_index] + 0x10); initialize_blarg_heavy_interceptor_paths(moby); moby_vars->unk88 = 1; moby_vars->unk21C = -1.0f; @@ -346,10 +343,10 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { moby_vars->unk1B0[0] = moby->rot.z; *(s16 *)&moby_vars->unk1B0[1] = 0; moby_vars->unk1B0[2] = 0.0f; - fill_transfer_words(moby_vars->unkE0, 0, 0x40); - fill_transfer_words(moby_vars->unk120, 0, 0x40); - attach_manipulator_c618(moby, 0, moby_vars->unkE0); - attach_manipulator_c618(moby, 1, moby_vars->unk120); + fill_transfer_words(moby_vars->manipulator0, 0, 0x40); + fill_transfer_words(moby_vars->manipulator1, 0, 0x40); + attach_manipulator_c618(moby, 0, moby_vars->manipulator0); + attach_manipulator_c618(moby, 1, moby_vars->manipulator1); moby_vars->unk1C0[2] = moby_vars->unk1C0[1] = 0.0f; *(int *)&moby_vars->unk180[3] = 0; moby->state = INTERCEPTOR_STATE_PATROL_AND_SCAN; @@ -375,8 +372,10 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { update_blarg_heavy_interceptor_patrol_path_position(moby); FUN_L14_002aea08_c618(moby); if (hit) { - lerp_vector( - vector_scratch, moby_vars->cached_aim_point_position, moby_vars->unkD0, 0.5f); + lerp_vector(vector_scratch, + moby_vars->cached_aim_point_position, + moby_vars->bone_transform[3], + 0.5f); qcopy(secondary_vector_scratch, moby_vars->cached_aim_point_position); noop_main_callback(secondary_vector_scratch, moby_vars->aim_point_glow_quad_scale * 0.8f); @@ -505,8 +504,10 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { if (absolute_float(moby_vars->unk1B0[3]) < 0.0001f) { moby_vars->unk1B0[3] = 0.0f; } - build_axis_rotation_quaternion(moby_vars->unkF0, 2, moby_vars->unk1B0[3]); - build_axis_rotation_quaternion(moby_vars->unk130, 1, moby_vars->unk1C0[0]); + build_axis_rotation_quaternion( + moby_vars->manipulator0_rotation, 2, moby_vars->unk1B0[3]); + build_axis_rotation_quaternion( + moby_vars->manipulator1_rotation, 1, moby_vars->unk1C0[0]); } if (try_retract_turret_group(moby_vars->turret_group)) { LevelPath *p = l14_paths[moby_vars->patrol_path]; @@ -524,7 +525,7 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { FUN_L14_002aea08_c618(moby); update_blarg_heavy_interceptor_return_path_position(moby, 0.01f, 5.0f, -1.0f); if (moby_vars->return_path_complete != 0) { - int *tab = ((int *)l14_paths[moby_vars->unk78]); + int *tab = ((int *)l14_paths[moby_vars->path_index]); near_seg = 0; near_t = 0.0f; @@ -547,7 +548,7 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { FUN_L14_002aea08_c618(moby); source_segment_index = moby_vars->path_segment; - seg = (char *)l14_paths[moby_vars->unk78]; + seg = (char *)l14_paths[moby_vars->path_index]; source_path_distance = 0.0f; for (i = 0; i < source_segment_index; i++) { source_path_distance += *(float *)(seg + i * 16 + 0x1C); @@ -582,7 +583,7 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { if (fast_vec_dist(&moby->pos, vector_scratch) < 0.5f) { moby->state = INTERCEPTOR_STATE_PATROL_AND_SCAN; } - FUN_L00_0025d808_c618(((int *)l14_paths[moby_vars->unk78]), + FUN_L00_0025d808_c618(((int *)l14_paths[moby_vars->path_index]), vector_scratch, &moby_vars->path_segment, &moby_vars->unk1C0[3], @@ -653,8 +654,8 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { fast_vec_cross(secondary_vector_scratch, &hero.gravity_dir, vector_scratch); death_launch_angle = randf_sym(0.6981317f, 1.2217305f); build_look_at_matrix( - moby_vars->unk1E0, vector_scratch, &hero.gravity_dir, death_launch_angle); - moby_vars->unk1E0[2] = random_float_between( + moby_vars->death_velocity, vector_scratch, &hero.gravity_dir, death_launch_angle); + moby_vars->death_velocity[2] = random_float_between( blarg_heavy_interceptor_death_launch_vertical_velocity_range_start_gp * frame_scale, blarg_heavy_interceptor_death_launch_vertical_velocity_range_end_gp * frame_scale); moby->scale *= 0.1f; @@ -673,28 +674,29 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { case INTERCEPTOR_STATE_DEATH_FALL: { int i; - fast_vec_add(&moby->pos, &moby->pos, moby_vars->unk1E0); - if (absolute_float(moby_vars->unk1E0[0]) > + fast_vec_add(&moby->pos, &moby->pos, moby_vars->death_velocity); + if (absolute_float(moby_vars->death_velocity[0]) > blarg_heavy_interceptor_death_fall_horizontal_drag_speed_threshold_gp * frame_scale) { - moby_vars->unk1E0[0] *= + moby_vars->death_velocity[0] *= (blarg_heavy_interceptor_death_fall_velocity_retention_factor_gp - 1.0f) * frame_scale + 1.0f; } - if (absolute_float(moby_vars->unk1E0[1]) > + if (absolute_float(moby_vars->death_velocity[1]) > blarg_heavy_interceptor_death_fall_horizontal_drag_speed_threshold_gp * frame_scale) { - moby_vars->unk1E0[1] *= + moby_vars->death_velocity[1] *= (blarg_heavy_interceptor_death_fall_velocity_retention_factor_gp - 1.0f) * frame_scale + 1.0f; } - if (moby_vars->unk1E0[2] > 0.0f) { - moby_vars->unk1E0[2] *= + if (moby_vars->death_velocity[2] > 0.0f) { + moby_vars->death_velocity[2] *= (blarg_heavy_interceptor_death_fall_velocity_retention_factor_gp - 1.0f) * frame_scale + 1.0f; } - moby_vars->unk1E0[2] -= blarg_heavy_interceptor_death_fall_gravity_gp * frame_scale_sq; + moby_vars->death_velocity[2] -= + blarg_heavy_interceptor_death_fall_gravity_gp * frame_scale_sq; moby->rot.z = fast_add_rotations(moby->rot.z, moby_vars->yaw_drift); moby_vars->unk140[0] = 10.0f; moby_vars->unk140[1] = 10.0f; @@ -1095,12 +1097,12 @@ void draw_blarg_heavy_interceptor_light_ring(char *moby) { int j; draw_blarg_heavy_interceptor_camera_facing_glow((struct Moby *)moby); - qcopy(f.mat[0], moby_vars->unkA0); - fast_vec_sub(f.mat[2], moby_vars->unkD0, D_L14_001674C0_r); + qcopy(f.mat[0], moby_vars->bone_transform[0]); + fast_vec_sub(f.mat[2], moby_vars->bone_transform[3], D_L14_001674C0_r); fast_vec_cross(f.mat[1], f.mat[0], f.mat[2]); normalize_r(f.mat[1], f.mat[1], 1.0f); fast_vec_cross(f.mat[2], f.mat[1], f.mat[0]); - qcopy(f.mat[3], moby_vars->unkD0); + qcopy(f.mat[3], moby_vars->bone_transform[3]); f.mat[3][3] = 1.0f; sreg_r(6, tex_r(0x16)); sreg_r(0x42, 0x8000000048); @@ -1352,10 +1354,11 @@ void draw_blarg_heavy_interceptor_camera_facing_glow(struct Moby *m) { float camera_facing_angles[4]; u32 col; int i; - qcopy(glow_quad_transform[3], d->unkD0); + qcopy(glow_quad_transform[3], d->bone_transform[3]); glow_quad_transform[3][3] = 1.0f; - fast_vec_scale( - glow_position_offset, d->unkA0, blarg_heavy_interceptor_glow_position_offset_scale_gp); + fast_vec_scale(glow_position_offset, + d->bone_transform[0], + blarg_heavy_interceptor_glow_position_offset_scale_gp); fast_vec_add(glow_quad_transform[3], glow_quad_transform[3], glow_position_offset); pk.b = tex_e(0xB); pk.c = 0x0000FF9000000260ULL; @@ -1495,7 +1498,7 @@ void initialize_blarg_heavy_interceptor_paths(struct Moby *moby) { int *path; int i; float segment_length; - path = ((int *)l14_paths[moby_vars->unk78]); + path = ((int *)l14_paths[moby_vars->path_index]); *(int *)&moby_vars->beam_rotation_blink_and_aim_path_state[3] = 0; for (i = 0; i < path[0]; i++) { segment_length = fast_vec_dist((char *)path + (i * 16 + 0x10), @@ -1521,7 +1524,7 @@ void initialize_blarg_heavy_interceptor_paths(struct Moby *moby) { (char *)path + (i * 16 + 0x10), (char *)path + (((i + 1) % path[0]) * 16 + 0x10)); } if (moby_vars->initial_path_distance_fraction != 0.0f) { - int *sampling_path = ((int *)l14_paths[moby_vars->unk78]); + int *sampling_path = ((int *)l14_paths[moby_vars->path_index]); moby_vars->path_segment = 0; moby_vars->unk1C0[3] = 0.0f; FUN_L00_0025d808_2af688(sampling_path, @@ -1557,7 +1560,7 @@ void update_blarg_heavy_interceptor_patrol_aim_point(struct Moby *moby) { float save = interceptor_instance_vars->unk1C0[3]; int save2 = interceptor_instance_vars->path_segment; int r = FUN_L00_0025d808_2af918( - ((int *)l14_paths[interceptor_instance_vars->unk78]), + ((int *)l14_paths[interceptor_instance_vars->path_index]), path_target_position, &interceptor_instance_vars->path_segment, &interceptor_instance_vars->unk1C0[3], @@ -1593,7 +1596,7 @@ void update_blarg_heavy_interceptor_patrol_aim_point(struct Moby *moby) { void update_blarg_heavy_interceptor_patrol_path_position(struct Moby *moby) { BlargHeavyInterceptorVars *heavy_interceptor_vars = (BlargHeavyInterceptorVars *)moby->pvars; - char *seg = (char *)l14_paths[heavy_interceptor_vars->unk78]; + char *seg = (char *)l14_paths[heavy_interceptor_vars->path_index]; int source_segment_index = heavy_interceptor_vars->path_segment; float source_path_distance = 0.0f; float destination_path_target_position[4]; @@ -1778,11 +1781,13 @@ void prepare_blarg_heavy_interceptor_light_ring_transform(u8 *moby) { bounding_sphere[3] = blarg_heavy_interceptor_culling_sphere_radius_gp; if (fast_bsphere_check((u8 *)bounding_sphere, convert_integer_to_float(MOBY(moby)->draw_dist)) >= 0) { - bone_transform = interceptor_vars->unkA0; + bone_transform = interceptor_vars->bone_transform[0]; build_moby_bone_transform(moby, 1, bone_transform); fast_vec_normalize(bone_transform, bone_transform, 1.0f); - fast_vec_normalize(interceptor_vars->unkB0, interceptor_vars->unkB0, 1.0f); - fast_vec_normalize(interceptor_vars->unkC0, interceptor_vars->unkC0, 1.0f); + fast_vec_normalize( + interceptor_vars->bone_transform[1], interceptor_vars->bone_transform[1], 1.0f); + fast_vec_normalize( + interceptor_vars->bone_transform[2], interceptor_vars->bone_transform[2], 1.0f); interceptor_vars->flags = 2; } } @@ -1799,31 +1804,32 @@ int update_blarg_heavy_interceptor_aim_transforms(struct Moby *moby, int flag) { float rotation_angle; fast_vec_sub(half_span_vector, blarg_heavy_interceptor_private_vars->aim_point_position, - blarg_heavy_interceptor_private_vars->unkD0); + blarg_heavy_interceptor_private_vars->bone_transform[3]); fast_vec_scale(half_span_vector, half_span_vector, 0.5f); - fast_vec_add(bounding_sphere, blarg_heavy_interceptor_private_vars->unkD0, half_span_vector); + fast_vec_add( + bounding_sphere, blarg_heavy_interceptor_private_vars->bone_transform[3], half_span_vector); bounding_sphere[3] = fast_vec_length(half_span_vector) + 2.0f; if (fast_bsphere_check((char *)bounding_sphere, convert_integer_to_float(moby->draw_dist)) >= 0) { - build_moby_bone_transform(moby, 1, blarg_heavy_interceptor_private_vars->unkA0); + build_moby_bone_transform(moby, 1, blarg_heavy_interceptor_private_vars->bone_transform[0]); ok = 1; - fast_vec_normalize(blarg_heavy_interceptor_private_vars->unkA0, - blarg_heavy_interceptor_private_vars->unkA0, + fast_vec_normalize(blarg_heavy_interceptor_private_vars->bone_transform[0], + blarg_heavy_interceptor_private_vars->bone_transform[0], 1.0f); - fast_vec_normalize(blarg_heavy_interceptor_private_vars->unkB0, - blarg_heavy_interceptor_private_vars->unkB0, + fast_vec_normalize(blarg_heavy_interceptor_private_vars->bone_transform[1], + blarg_heavy_interceptor_private_vars->bone_transform[1], 1.0f); - fast_vec_normalize(blarg_heavy_interceptor_private_vars->unkC0, - blarg_heavy_interceptor_private_vars->unkC0, + fast_vec_normalize(blarg_heavy_interceptor_private_vars->bone_transform[2], + blarg_heavy_interceptor_private_vars->bone_transform[2], 1.0f); rotation_angle = fast_subtract_rotations( fast_arc_tan(half_span_vector[0], half_span_vector[1]), moby->rot.z); build_axis_rotation_quaternion( - blarg_heavy_interceptor_private_vars->unkF0, 2, rotation_angle); + blarg_heavy_interceptor_private_vars->manipulator0_rotation, 2, rotation_angle); blarg_heavy_interceptor_private_vars->unk1B0[3] = rotation_angle; rotation_angle = -fast_arc_tan(vector_length_xy(half_span_vector), half_span_vector[2]); build_axis_rotation_quaternion( - blarg_heavy_interceptor_private_vars->unk130, 1, rotation_angle); + blarg_heavy_interceptor_private_vars->manipulator1_rotation, 1, rotation_angle); blarg_heavy_interceptor_private_vars->unk1C0[0] = rotation_angle; qcopy(blarg_heavy_interceptor_private_vars->cached_aim_point_position, blarg_heavy_interceptor_private_vars->aim_point_position); From 29ae82552c61e413e3f01e21825012c1240f7b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:33:01 +0000 Subject: [PATCH 011/213] decomp: use the new hero and moby field names in level code --- src/overlays/l01/hero/hero_set_state.c | 238 ++++++------ .../update_hero_motion_for_current_state.c | 30 +- .../l01/hero/update_hero_state_machine.c | 51 +-- src/overlays/l02/hero/hero_set_state.c | 260 ++++++------- .../l02/hero/update_hero_state_motion.c | 66 ++-- src/overlays/l03/hero/hero_set_state.c | 244 ++++++------ .../update_hero_motion_for_current_state.c | 40 +- .../l03/hero/update_hero_state_machine.c | 55 +-- src/overlays/l03/hero_relative_camera.c | 5 +- .../l03/mobys/metropolis_train_locomotive.c | 2 +- src/overlays/l03/mobys/rail_lift.c | 2 +- src/overlays/l03/mobys/taxi.c | 2 +- src/overlays/l04/mobys/eudora_bridge.c | 4 +- .../hero/apply_hero_ground_material_effects.c | 30 +- src/overlays/l05/hero/hero_set_state.c | 290 +++++++-------- .../l05/hero/update_hero_motion_by_state.c | 42 +-- .../l05/hero/update_hero_state_machine.c | 55 +-- src/overlays/l05/mobys/sharkigator.c | 4 +- src/overlays/l05/mobys/taxi.c | 2 +- src/overlays/l06/hero/hero_set_state.c | 253 ++++++------- .../update_hero_motion_for_current_state.c | 78 ++-- .../l06/hero/update_hero_state_machine.c | 62 ++-- src/overlays/l06/mobys/alien_snapper.c | 2 +- src/overlays/l07/mobys/mine_group.c | 2 +- src/overlays/l08/hero/hero_set_state.c | 264 ++++++------- .../update_hero_motion_for_current_state.c | 46 +-- .../l08/hero/update_hero_state_transitions.c | 65 ++-- src/overlays/l08/mobys/shuttle.c | 2 +- src/overlays/l08/mobys/water_surface.c | 6 +- src/overlays/l10/mobys/toxic_crab.c | 2 +- src/overlays/l11/hero/hero_set_state.c | 246 ++++++------ .../l11/hero/update_hero_motion_by_state.c | 44 +-- .../l11/hero/update_hero_state_transitions.c | 53 +-- src/overlays/l11/mobys/jet_fighter.c | 6 +- src/overlays/l12/hero/hero_set_state.c | 252 ++++++------- .../update_hero_motion_for_current_state.c | 70 ++-- .../l12/hero/update_hero_state_transitions.c | 55 +-- src/overlays/l12/mobys/homing_mine_spawner.c | 2 +- src/overlays/l12/mobys/hoven_turret.c | 2 +- src/overlays/l13/mobys/asteroid.c | 6 +- src/overlays/l14/hero/hero_set_state.c | 219 +++++------ .../l14/hero/process_hero_state_transitions.c | 57 +-- .../l14/hero/update_hero_motion_by_state.c | 44 +-- src/overlays/l14/mobys/path_mover.c | 2 +- src/overlays/l14/mobys/taxi.c | 2 +- src/overlays/l14/mobys/wind_control.c | 4 +- src/overlays/l15/hero/hero_set_state.c | 256 ++++++------- .../update_hero_motion_for_current_state.c | 46 +-- .../l15/hero/update_hero_state_machine.c | 57 +-- .../hero/apply_hero_ground_material_effects.c | 30 +- src/overlays/l16/hero/hero_set_state.c | 294 +++++++-------- .../update_hero_motion_for_current_state.c | 42 +-- .../l16/hero/update_hero_state_transitions.c | 65 ++-- src/overlays/l16/mobys/taxi.c | 2 +- src/overlays/l17/hero/hero_set_state.c | 320 ++++++++-------- .../l17/hero/process_hero_hit_response.c | 6 +- .../update_hero_motion_for_current_state.c | 44 +-- .../l17/hero/update_hero_state_transitions.c | 72 ++-- src/overlays/l17/mobys/door.c | 2 +- src/overlays/l17/mobys/dreks_fleet_turret.c | 4 +- .../l17/mobys/dreks_fleet_turret_shot.c | 4 +- src/overlays/l17/mobys/fighter_jet.c | 6 +- src/overlays/l17/mobys/floating_mine.c | 2 +- src/overlays/l17/mobys/magnet_elevator.c | 2 +- .../l18/hero/apply_hero_ground_type_effects.c | 6 +- src/overlays/l18/hero/hero_set_state.c | 284 +++++++------- .../l18/hero/process_hero_state_transitions.c | 67 ++-- .../update_hero_motion_for_current_state.c | 44 +-- src/overlays/l18/mobys/gadgebot.c | 2 +- src/overlays/l18/mobys/mine.c | 2 +- .../shared/camera/follow_camera_setup.c | 4 +- src/overlays/shared/camera/grindrail_camera.c | 2 +- .../shared/camera/hero_aligned_camera.c | 8 +- .../shared/camera/swing_volume_camera.c | 2 +- .../shared/camera/target_tracking_camera.c | 3 +- .../cutscenes/update_cutscene_playback.c | 4 +- .../shared/enemies/bomb_spawner_bomb.c | 2 +- src/overlays/shared/enemies/spawner_egg.c | 2 +- .../shared/hero/advance_hero_animation.c | 6 +- src/overlays/shared/hero/handle_hero_hit.c | 2 +- src/overlays/shared/hero/hero_frame_update.c | 52 +-- .../shared/hero/hero_handle_jump_press.c | 3 +- src/overlays/shared/hero/hero_idle_sequence.c | 41 +- .../shared/hero/hero_move_state_velocity.c | 12 +- src/overlays/shared/hero/hero_set_state.c | 349 +++++++++--------- src/overlays/shared/hero/hero_switch_item.c | 93 ++--- .../shared/hero/hero_update_hop_movement.c | 8 +- .../shared/hero/hero_update_movement.c | 46 +-- .../shared/hero/hero_update_transitions.c | 74 ++-- src/overlays/shared/hero/initialize_hero.c | 2 +- .../hero/process_hero_item_action_input.c | 16 +- .../hero/process_hero_primary_item_input.c | 10 +- src/overlays/shared/hero/set_hero_animation.c | 6 +- .../update_hero_and_vehicle_mode_effects.c | 8 +- .../shared/hero/update_hero_ground_contact.c | 30 +- ...ate_hero_vehicle_attachments_and_effects.c | 12 +- src/overlays/shared/pickups/bolt.c | 2 +- src/overlays/shared/pickups/crate.c | 4 +- src/overlays/shared/pickups/gold_bolt.c | 2 +- src/overlays/shared/props/grindrail.c | 4 +- src/overlays/shared/props/novalis_elevator.c | 2 +- src/overlays/shared/props/teleporter.c | 2 +- .../rendering/debug/update_debug_menu.c | 2 +- .../ui/hud/draw_hud_item_selector_panel.c | 2 +- .../ui/map/reveal_map_around_position.c | 2 +- .../shared/vendor/initialize_vendor_screen.c | 2 +- src/overlays/shared/vendor/vendor_menu.c | 4 +- src/overlays/shared/vendor/vendor_orb.c | 2 +- src/overlays/shared/weapons/blaster.c | 2 +- src/overlays/shared/weapons/decoy.c | 4 +- src/overlays/shared/weapons/devastator.c | 2 +- src/overlays/shared/weapons/glove_of_doom.c | 2 +- .../shared/weapons/glove_of_doom_bomb.c | 4 +- src/overlays/shared/weapons/mine.c | 3 +- src/overlays/shared/weapons/morphoray.c | 2 +- src/overlays/shared/weapons/suckcannon.c | 4 +- src/overlays/shared/weapons/swingshot.c | 2 +- src/overlays/shared/weapons/tesla_claw.c | 2 +- src/overlays/shared/weapons/visibomb.c | 2 +- .../shared/weapons/visibomb_missile.c | 2 +- 120 files changed, 2931 insertions(+), 2854 deletions(-) diff --git a/src/overlays/l01/hero/hero_set_state.c b/src/overlays/l01/hero/hero_set_state.c index 2ac4e2dc90..cadd78c561 100644 --- a/src/overlays/l01/hero/hero_set_state.c +++ b/src/overlays/l01/hero/hero_set_state.c @@ -110,14 +110,14 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); } @@ -137,8 +137,8 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { request_hero_idle_state_for_vehicle_mode(); @@ -166,7 +166,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (animation_setup_mode) { @@ -193,7 +193,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_setup_mode) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -202,7 +202,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_DYING_SPEED_LIMITED: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.momentum, frame_time * 3.5f); @@ -213,15 +213,15 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_SINK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; - p->unk694 = p->motion.displacement.f[2] * 0.2f; - p->unk69C = p->water_surface_z - 0.37f; - if (p->unk694 < frame_time * -7.0f) - p->unk694 = frame_time * -7.0f; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.2f; + p->swim_water_level = p->water_surface_z - 0.37f; + if (p->swim_bob_velocity < frame_time * -7.0f) + p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (animation_setup_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); break; @@ -229,7 +229,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_SWIM: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; *(int *)&p->drown_sink_speed = 0; if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -253,7 +253,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; p->unk8F4 = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -273,7 +273,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); p->rand_timer.range = 0x68; @@ -288,7 +288,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->splash_effect_timer = 0; if (p->state.prev_control_mode == HERO_MODE_SWIM) { emit_hero_surface_effect_burst(3, 0xA, 0); @@ -317,7 +317,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { } { struct Hero *q = &hero; - q->unk698 = 0; + q->swim_stroke_timer = 0; if (q->state.prev_control_mode == HERO_MODE_SWIM) { if ((float)q->underwater_air < 2500.0f) { help_queue_add(8, scale_game_frames(0x1E), 0); @@ -338,12 +338,12 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { } { struct Hero *s = &hero; - s->unk694 = s->motion.displacement.f[2] * 0.37f; - if (s->unk694 < frame_time * -7.0f) - s->unk694 = frame_time * -7.0f; - s->unk69C = s->water_surface_z; + s->swim_bob_velocity = s->motion.displacement.f[2] * 0.37f; + if (s->swim_bob_velocity < frame_time * -7.0f) + s->swim_bob_velocity = frame_time * -7.0f; + s->swim_water_level = s->water_surface_z; s->unk6A0 = 0; - s->unk690 = s->motion.pos.f[2] - s->unk69C - -0.12f; + s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; FUN_L00_0025f730(&s->motion.momentum, frame_time * 5.5f); @@ -358,7 +358,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); p->item_select_blocked = 1; qcopy(&p->motion.velocity, &p->motion.displacement); @@ -392,9 +392,9 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; *(int *)&p->drown_sink_speed = 0; - p->unk698 = scale_game_frames(0x2D); + p->swim_stroke_timer = scale_game_frames(0x2D); p->rand_timer.range = 0x68; if (animation_setup_mode) set_hero_animation(0x65, 0, (float)scale_game_frames(0x11)); @@ -404,7 +404,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; if (p->jump_button_frames > scale_game_frames(0x32)) { struct UsageStat *h = usage_stats.stat; @@ -446,7 +446,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_setup_mode) @@ -457,9 +457,9 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L01_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = get_hero_idle_animation_index(1); if (p->moby->prev_seq != t && animation_setup_mode) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -470,7 +470,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -479,7 +479,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -488,7 +488,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -501,7 +501,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -510,7 +510,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(1.0f, 0); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -563,7 +563,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -583,7 +583,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_VOICE_SLOT_CLEANUP_IDLE_EXIT: { struct Hero *p = &hero; p->state.control_mode = 0x10; - p->unk2284 = 3; + p->camera_mode = 3; p->item_select_blocked = 1; fill_transfer_words((char *)p + 0x9D0, 0, 0x20); qcopy(&p->motion.momentum, &p->motion.displacement); @@ -594,7 +594,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { l01_hero_set_state(HERO_STATE_SLIP, 1); @@ -623,7 +623,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; char *v = (char *)&p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (animation_setup_mode) { @@ -638,7 +638,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -668,7 +668,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -679,7 +679,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -699,7 +699,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (animation_setup_mode) @@ -709,7 +709,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_setup_mode) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -718,7 +718,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_setup_mode) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -727,7 +727,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_setup_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -737,12 +737,12 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -772,9 +772,9 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; int animation_timing_override = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -789,7 +789,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { int animation_timing_override = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -828,9 +828,9 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)&hero.motion.velocity; @@ -848,7 +848,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *u = &hero; u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -871,7 +871,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -879,13 +879,13 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -893,29 +893,30 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; u->unk48C = 1.98f; - u->unk430 = 1.95f; + u->jump_height = 1.95f; } else { gravity_set_z( (float *)(&u->motion.velocity), (float *)(&u->motion.velocity), 0.0f); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(2); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(2); + u->velocity_keys_end_frame = + scale_game_frames(0x23) + u->velocity_keys_start_frame; u->keyed_move_target_frame = 0.0f; u->unk3DC = 18.0f; u->keyed_anim_target_frame = scale_game_frames(0x28); - u->unk3E4 = level_01_water_surface_jump_velocity_keys; + u->velocity_keys = level_01_water_surface_jump_velocity_keys; } { struct Hero *w = &hero; w->item_select_blocked = 1; } } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -923,13 +924,13 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -937,7 +938,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -945,7 +946,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -953,8 +954,8 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(((int)u->moby), x); @@ -969,7 +970,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -977,14 +978,14 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; *(int *)&u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -992,16 +993,16 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -1009,7 +1010,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -1017,15 +1018,15 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - u->unk3E4 = level_01_transform_trail_jump_velocity_keys; + u->velocity_keys = level_01_transform_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -1033,7 +1034,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -1041,17 +1042,18 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != FALSE) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L01_0015F6E8; + w->velocity_keys = D_L01_0015F6E8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -1063,15 +1065,15 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1079,7 +1081,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -1102,7 +1104,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (animation_setup_mode) { int s = q->state.current; if (s == 7) { @@ -1171,10 +1173,10 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; *(int *)&p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1187,7 +1189,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1326,7 +1328,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (animation_setup_mode) { char *m; @@ -1346,7 +1348,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (animation_setup_mode) @@ -1357,9 +1359,9 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1382,7 +1384,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_setup_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -1390,7 +1392,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_setup_mode) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -1400,7 +1402,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_setup_mode) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -1409,7 +1411,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1420,7 +1422,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { char *v = (char *)&p->motion.resolved_velocity; struct Hero *hero_base; @@ -1438,7 +1440,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_setup_mode) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -1447,7 +1449,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -1463,7 +1465,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -1482,13 +1484,13 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != get_hero_idle_animation_index(1)) { @@ -1499,7 +1501,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } @@ -1507,7 +1509,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; @@ -1515,14 +1517,14 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -1533,7 +1535,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -1574,7 +1576,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } @@ -1642,7 +1644,7 @@ int handle_hero_gadget_button(void) { HeroTableRow2C *row; struct HeldGadgetVars *equipped_gadget_vars; - if (hero.item_use_locked != 0 && (hero.items[0].item_id != 8 || hero.unk308 != 1)) + if (hero.item_use_locked != 0 && (hero.items[0].item_id != 8 || hero.magnetic_floor != 1)) return 0; if (hero.vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) return 0; @@ -1672,7 +1674,7 @@ int handle_hero_gadget_button(void) { } else { l01_hero_set_state(0x15, 1); } - } else if (hero.unk308 == 1) { + } else if (hero.magnetic_floor == 1) { l01_hero_set_state(0x70, 1); } else { l01_hero_set_state(0x13, 1); @@ -1714,7 +1716,7 @@ int handle_hero_gadget_button(void) { if (hero.on_slip_ground == 0 && pad_pressed_within(buttons, frames, 0) != 0) { if ((controller_state.held & 0xa) != 0) l01_hero_set_state(0x15, 1); - else if (hero.unk308 == 1) + else if (hero.magnetic_floor == 1) l01_hero_set_state(0x70, 1); else l01_hero_set_state(0x13, 1); @@ -1822,7 +1824,7 @@ int handle_hero_gadget_button(void) { } if (hero.state_timer == saved) { if (FUN_L00_0020d498(3) == 3 && hero.state.current != 0x81 && - (hero.unk308 == 0 || D_0013D4DC[0] == 0) && hero.pack_disabled == 0) { + (hero.magnetic_floor == 0 || D_0013D4DC[0] == 0) && hero.pack_disabled == 0) { fast_dec_timer(&r1_double_tap_timer); if (r1_double_tap_timer != 0 && ((unsigned int)hero.state.control_mode < 2 || @@ -1836,7 +1838,7 @@ int handle_hero_gadget_button(void) { r1_double_tap_timer = scale_game_frames(0x1e); } else if (hero.state.current != 0x13 && hero.state.current != 0x81 && hero.state.current != 0x15 && hero.state.current != 0x16) { - hero.unk22CA = 0; + hero.hover_latch = 0; } } return hero.state_timer < saved; diff --git a/src/overlays/l01/hero/update_hero_motion_for_current_state.c b/src/overlays/l01/hero/update_hero_motion_for_current_state.c index 6bfeff6851..908dceee90 100644 --- a/src/overlays/l01/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l01/hero/update_hero_motion_for_current_state.c @@ -273,13 +273,13 @@ void update_hero_airborne_planar_motion(void) { build_scaled_hero_move_impulse(0.7f, frame_time * 0.0f); qcopy(&hero.motion.momentum, &hero.move_impulse); } else if (state == HERO_STATE_REPEATABLE_JUMP) { - hero.motion.move_yaw = hero.unk470.f[3]; - qcopy(&hero.motion.move_dir, &hero.unk470); + hero.motion.move_yaw = hero.wall_jump_normal.f[3]; + qcopy(&hero.motion.move_dir, &hero.wall_jump_normal); if (scale_game_frames(9) < hero.state_timer) { turn_to(-1, frame_scale_sq * 0.042f, frame_scale_sq * 0.2f, frame_time * 11.868238f); } if (scale_game_frames(9) <= hero.state_timer) { - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { hero.motion.velocity.f[0] = fast_cos(hero.motion.move_yaw) * (frame_time * 4.9f); hero.motion.velocity.f[1] = fast_sin(hero.motion.move_yaw) * (frame_time * 4.9f); } else { @@ -485,7 +485,7 @@ void update_hero_motion_for_current_state(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { *(OvlQuad *)vector_and_hit_scratch[0] = 0; vector_and_hit_scratch[0][0] = 1.0f; transform_vector_by_basis( @@ -1092,11 +1092,11 @@ void update_hero_motion_for_current_state(void) { } } turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - fast_dec_timer(&hero.unk698); + fast_dec_timer(&hero.swim_stroke_timer); if (hero.state.current == 0x36) { float v; - if (controller_state.no_direction != 0 && hero.unk698 != 0) { + if (controller_state.no_direction != 0 && hero.swim_stroke_timer != 0) { hero.target_speed = frame_time * 3.0f; } if (absolute_float(hero.motion.yaw_error) > 0.7853982f) { @@ -1292,7 +1292,7 @@ void update_hero_motion_for_current_state(void) { int near; near = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { float d; float e; @@ -1616,9 +1616,9 @@ void update_hero_motion_for_current_state(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { if (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } } hero_speed_from_table(); @@ -1632,7 +1632,7 @@ void update_hero_motion_for_current_state(void) { clear_u64_value(hero.move_impulse.f); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { float sp; @@ -1666,7 +1666,7 @@ void update_hero_motion_for_current_state(void) { update_hero_lean_and_sway_parameters(); up = frame_time_sq * 7.5f * k; down = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { float s; s = 2.6179938f - hero.motion.yaw_error; @@ -1680,13 +1680,13 @@ void update_hero_motion_for_current_state(void) { down = frame_time_sq * 17.0f; } speed_step(up, down); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } clip_hero_horizontal_velocity(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -2048,7 +2048,7 @@ void update_hero_motion_for_current_state(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -2308,7 +2308,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * t, frame_scale_sq * 0.1f, frame_time * 2.268928f * t); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l01/hero/update_hero_state_machine.c b/src/overlays/l01/hero/update_hero_state_machine.c index 3fe3b68ffa..361eb9b50a 100644 --- a/src/overlays/l01/hero/update_hero_state_machine.c +++ b/src/overlays/l01/hero/update_hero_state_machine.c @@ -242,8 +242,8 @@ void update_hero_state_machine(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || item_available[0x1C] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || item_available[0x1C] == 0) { l01_hero_set_state(0x81, 1); break; } @@ -300,7 +300,7 @@ void update_hero_state_machine(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (((unsigned char *)hero.moby)[0x53] == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -332,7 +332,7 @@ void update_hero_state_machine(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -376,7 +376,7 @@ void update_hero_state_machine(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -387,7 +387,7 @@ void update_hero_state_machine(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { l01_hero_set_state(0x71, 1); break; @@ -403,7 +403,8 @@ void update_hero_state_machine(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L01_00167258_lui) > 1.2217305f) { @@ -549,7 +550,7 @@ void update_hero_state_machine(void) { } } hero.item_select_blocked = 1; - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0) || (item_available[4] != 0 && pad_pressed_within(0xA, scale_game_frames(7), 0))) { @@ -580,7 +581,7 @@ void update_hero_state_machine(void) { break; } } - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { if (item_available[4] != 0 && (controller_state.held & 0xA)) { l01_hero_set_state(0x35, 1); @@ -597,7 +598,7 @@ void update_hero_state_machine(void) { hero.motion.displacement.f[2] = 0.0f; } if (0.1f > hero.stick_magnitude && hero.ground_speed == 0.0f && - hero.unk698 == 0) { + hero.swim_stroke_timer == 0) { l01_hero_set_state(0x37, 1); } break; @@ -632,7 +633,7 @@ void update_hero_state_machine(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -734,7 +735,8 @@ void update_hero_state_machine(void) { HeroTableRow2C *rec = &D_L01_0017C0A8[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -845,13 +847,13 @@ void update_hero_state_machine(void) { if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (l01_hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -941,7 +943,7 @@ void update_hero_state_machine(void) { if (hero.selector_4 != 0) { break; } - if (hero.unk1E0 != 0) { + if (hero.sinking_floor_hold != 0) { break; } if (hero.voice_slot2 != -1) { @@ -1016,7 +1018,7 @@ void update_hero_state_machine(void) { l01_hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { l01_hero_set_state(0x71, 1); break; @@ -1197,9 +1199,9 @@ void update_hero_state_machine(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -1337,7 +1339,7 @@ void update_hero_state_machine(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (l01_hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -1559,7 +1561,7 @@ void update_hero_state_machine(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -1586,9 +1588,10 @@ void update_hero_state_machine(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -1941,7 +1944,7 @@ void update_hero_state_machine(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l02/hero/hero_set_state.c b/src/overlays/l02/hero/hero_set_state.c index 42a7285fec..405291b747 100644 --- a/src/overlays/l02/hero/hero_set_state.c +++ b/src/overlays/l02/hero/hero_set_state.c @@ -111,14 +111,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); } @@ -138,8 +138,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { request_hero_idle_state_for_vehicle_mode(); @@ -167,7 +167,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (entry_animation_mode) { @@ -194,7 +194,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -203,7 +203,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DYING_SPEED_LIMITED: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.momentum, frame_time * 3.5f); @@ -214,15 +214,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SINK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; - p->unk694 = p->motion.displacement.f[2] * 0.2f; - p->unk69C = p->water_surface_z - 0.37f; - if (p->unk694 < frame_time * -7.0f) - p->unk694 = frame_time * -7.0f; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.2f; + p->swim_water_level = p->water_surface_z - 0.37f; + if (p->swim_bob_velocity < frame_time * -7.0f) + p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (entry_animation_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); break; @@ -231,9 +231,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L02_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = get_hero_idle_animation_index(1); if (p->moby->prev_seq != t && entry_animation_mode) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -244,7 +244,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -253,7 +253,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -262,7 +262,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -275,7 +275,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -284,7 +284,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(1.0f, 0); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -305,7 +305,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 1 || t->state.current == 0x3F) { + if (t->magnetic_floor == 1 || t->state.current == 0x3F) { t->state.current = 0x3F; set_hero_animation(0x5B, 0, (float)scale_game_frames(8)); } else { @@ -337,7 +337,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ANIMATION_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) { if (p->state.prev == 4) { set_hero_animation(0x5E, 2, (float)scale_game_frames(5)); @@ -350,7 +350,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -370,7 +370,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { hero_set_state(HERO_STATE_SLIP, 1); @@ -399,7 +399,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *v = (char *)&p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (entry_animation_mode) { @@ -414,7 +414,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -443,7 +443,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -465,7 +465,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -476,7 +476,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -489,7 +489,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -504,7 +504,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; *(char **)&p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -530,7 +530,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], q->swing_target_moby->pos.y - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); + q->swing_rope_length = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -550,7 +550,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) @@ -561,7 +561,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -572,7 +572,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -592,7 +592,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (entry_animation_mode) @@ -602,7 +602,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (entry_animation_mode) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -611,7 +611,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (entry_animation_mode) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -620,7 +620,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -630,12 +630,12 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -665,9 +665,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int animation_timing_selector = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -682,7 +682,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { int animation_timing_selector = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -721,9 +721,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)&hero.motion.velocity; @@ -743,7 +743,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { allocate_hero_voice_for_entry(0xA, 0); u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -766,7 +766,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -774,7 +774,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; @@ -789,7 +789,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *w = &hero; - w->unk430 = v + 1.7f; + w->jump_height = v + 1.7f; w->takeoff_frame = scale_game_frames(5); w->unk434 = 0.6f; w->apex_anim_frame = 18.0f; @@ -797,10 +797,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { w->jump_land_anim_frame = 12.0f; w->unk48C = v + 1.75f; w->jump_height_start = v + 1.7f; - w->unk498 = scale_game_frames(0x13); + w->jump_ramp_frames = scale_game_frames(0x13); } } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -808,13 +808,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -822,7 +822,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -830,7 +830,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = (char *)&u->trail; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -838,8 +838,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(*(int *)&u->moby, x); @@ -854,7 +854,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -862,14 +862,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -877,16 +877,16 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = (char *)&u->trail; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -894,7 +894,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -902,15 +902,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - *(char **)&u->unk3E4 = level02_hero_transform_trail_jump_velocity_keys; + *(char **)&u->velocity_keys = level02_hero_transform_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -918,7 +918,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -926,17 +926,18 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L02_0015F6E8; + w->velocity_keys = D_L02_0015F6E8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -948,15 +949,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -964,7 +965,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -987,7 +988,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (entry_animation_mode) { int s = q->state.current; if (s == 7) { @@ -1056,10 +1057,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; *(int *)&p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1072,7 +1073,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1211,7 +1212,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ATTACK_RECORD_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x70) { int v = 5; if (D_L02_0017C228[p->attack_record].kind == 0) @@ -1238,7 +1239,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (entry_animation_mode) { char *m; @@ -1258,7 +1259,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (entry_animation_mode) @@ -1269,9 +1270,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1304,7 +1305,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *r = &hero; r->state.control_mode = HERO_MODE_RESPAWN_WAIT; - r->unk2284 = 0; + r->camera_mode = 0; allocate_hero_voice_for_entry(9, 0); r->rand_timer.range = 0x68; r->target_speed = 0.0f; @@ -1317,7 +1318,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_HEIGHT_OR_TIMEOUT_RESPAWN_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RESPAWN_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; if (current_level_index == LEVEL_QUARTU) spawn_hero_radial_particle_burst(); p->collision_off_frames = 0x2710; @@ -1330,7 +1331,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -1338,7 +1339,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -1348,7 +1349,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -1357,7 +1358,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1368,7 +1369,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { char *v = (char *)&p->motion.resolved_velocity; struct Hero *hero_base; @@ -1386,7 +1387,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -1395,7 +1396,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -1411,7 +1412,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -1430,13 +1431,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != get_hero_idle_animation_index(1)) { @@ -1447,7 +1448,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } @@ -1455,7 +1456,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; @@ -1463,14 +1464,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -1481,7 +1482,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -1508,7 +1509,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } @@ -1956,8 +1957,8 @@ void update_hero_state_transitions(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || D_0013D4DC[0] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || D_0013D4DC[0] == 0) { hero_set_state(0x81, 1); break; } @@ -2013,7 +2014,7 @@ void update_hero_state_transitions(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (((unsigned char *)hero.moby)[0x53] == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -2045,7 +2046,7 @@ void update_hero_state_transitions(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -2089,7 +2090,7 @@ void update_hero_state_transitions(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -2100,7 +2101,7 @@ void update_hero_state_transitions(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -2116,7 +2117,8 @@ void update_hero_state_transitions(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(1.0f, 0); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L02_001673D8) > 1.2217305f) { @@ -2203,7 +2205,7 @@ void update_hero_state_transitions(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -2305,7 +2307,8 @@ void update_hero_state_transitions(void) { HeroTableRow2C *rec = &D_L02_0017C2A8_rec[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -2404,19 +2407,19 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_CROUCH, 1); break; } - if (hero.state.current == HERO_STATE_RUN && hero.unk308 != 0) { + if (hero.state.current == HERO_STATE_RUN && hero.magnetic_floor != 0) { hero_set_state(0x3F, 1); } if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -2615,7 +2618,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -2682,7 +2685,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -2699,7 +2702,7 @@ void update_hero_state_transitions(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -2873,9 +2876,9 @@ void update_hero_state_transitions(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -3013,7 +3016,7 @@ void update_hero_state_transitions(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -3235,7 +3238,7 @@ void update_hero_state_transitions(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -3262,9 +3265,10 @@ void update_hero_state_transitions(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -3615,7 +3619,7 @@ void update_hero_state_transitions(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l02/hero/update_hero_state_motion.c b/src/overlays/l02/hero/update_hero_state_motion.c index e2a3d1befd..e6bc77b165 100644 --- a/src/overlays/l02/hero/update_hero_state_motion.c +++ b/src/overlays/l02/hero/update_hero_state_motion.c @@ -53,7 +53,7 @@ void process_hero_ground_material_effects(void) { hero_state->ground_sound_class = keep; hero_state->ground_type = -1; hero_state->wading = 0; - hero_state->unk308 = 0; + hero_state->magnetic_floor = 0; if (saved_ground_type == -1) return; if (saved_ground_type == GROUND_MATERIAL_MAGNETIC) { @@ -62,7 +62,7 @@ void process_hero_ground_material_effects(void) { if (hero_state->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { char *slot_one_moby = (char *)hero_state->items[1].moby; if (slot_one_moby != 0 && *(short *)(slot_one_moby + 0xA6) == 0xAD) - hero_state->unk308 = 1; + hero_state->magnetic_floor = 1; } } } @@ -479,12 +479,12 @@ void update_hero_ground_contact(void) { } hero.ground_pitch.i = 0; hero.unk2E8.i = 0; - hero.unk2D0.i[0] = 0; - hero.unk2D0.i[1] = 0; - hero.unk2C8.i[0] = 0; - hero.unk2C8.i[1] = 0; - hero.unk2C0.i[0] = 0; - hero.unk2C0.i[1] = 0; + hero.side_probe_roll.i[0] = 0; + hero.side_probe_roll.i[1] = 0; + hero.side_probe_pitch.i[0] = 0; + hero.side_probe_pitch.i[1] = 0; + hero.side_probe_drop.i[0] = 0; + hero.side_probe_drop.i[1] = 0; if (hero.state.control_mode == HERO_MODE_GRIND || hero.state.control_mode == 0x15 || hero.state.control_mode == HERO_MODE_ATTACK || hero.state.control_mode == HERO_MODE_JUMP || hero.state.control_mode == HERO_MODE_LAND || hero.state.control_mode == HERO_MODE_LEDGE) { @@ -509,24 +509,24 @@ void update_hero_ground_contact(void) { transform_hero_polar_offset_to_world(&unused_probe_point, 0.2f, probe_angle, -0.45f); if (collision_line(&probe_ray_start, &collision_ray_end, 0x22, (s32)hero.moby, 0)) { f = HH.point.f[2] - hero.ground_z.f; - hero.unk2C0.f[i] = f; + hero.side_probe_drop.f[i] = f; if (0.4f < absolute_float(f)) { - hero.unk2C0.f[i] = 0.0f; + hero.side_probe_drop.f[i] = 0.0f; } sceVu0Normalize(&normalized_probe_hit_normal, (u8 *)&HH.normal_x); compute_rotated_vector_angles(&normalized_probe_hit_normal, &probe_surface_angles); if (-0.78539819f < probe_surface_angles.f[1] && probe_surface_angles.f[1] < 0.78539819f) { - hero.unk2C8.f[i] = probe_surface_angles.f[1]; + hero.side_probe_pitch.f[i] = probe_surface_angles.f[1]; } if (-0.78539819f < probe_surface_angles.f[0] && probe_surface_angles.f[0] < 0.78539819f) { - hero.unk2D0.f[i] = probe_surface_angles.f[0]; + hero.side_probe_roll.f[i] = probe_surface_angles.f[0]; } } else { - hero.unk2C0.i[i] = 0; - hero.unk2C8.f[i] = hero.ground_pitch.f; - hero.unk2D0.f[i] = hero.unk2E8.f; + hero.side_probe_drop.i[i] = 0; + hero.side_probe_pitch.f[i] = hero.ground_pitch.f; + hero.side_probe_roll.f[i] = hero.unk2E8.f; } } } @@ -807,7 +807,7 @@ void update_hero_state_motion(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { *(OvlQuad *)motion_geometry_scratch[0] = 0; motion_geometry_scratch[0][0] = 1.0f; transform_vector_by_basis( @@ -1168,7 +1168,7 @@ void update_hero_state_motion(void) { if (!(hero.motion.pos.f[2] < hero.swing_target_moby->pos.z)) { below = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (below && hero.state_timer > scale_game_frames(0x28) && hero.stick_magnitude > 0.25f) { float s; @@ -1185,7 +1185,7 @@ void update_hero_state_motion(void) { hero.motion.velocity.f, hero.motion.velocity.f, motion_geometry_scratch[3]); } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { float k; if (vector_distance_xy(hero.motion.pos.f, &hero.swing_target_moby->pos) < @@ -1240,7 +1240,7 @@ void update_hero_state_motion(void) { motion_geometry_scratch[3], &hero.swing_target_moby->pos); fast_vec_normalize( - motion_geometry_scratch[12], motion_geometry_scratch[12], hero.unk9A4); + motion_geometry_scratch[12], motion_geometry_scratch[12], hero.swing_rope_length); fast_vec_add(motion_geometry_scratch[3], &hero.swing_target_moby->pos, motion_geometry_scratch[12]); @@ -1250,15 +1250,15 @@ void update_hero_state_motion(void) { { float d; - d = hero.unk9A4; - vendor_spring(&hero.unk9A4, + d = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - d; - if (hero.unk9A4 < fast_vec_length(motion_geometry_scratch[12])) { + d = hero.swing_rope_length - d; + if (hero.swing_rope_length < fast_vec_length(motion_geometry_scratch[12])) { fast_vec_normalize(motion_geometry_scratch[12], motion_geometry_scratch[12], d); fast_vec_add(hero.motion.pos.f, hero.motion.pos.f, motion_geometry_scratch[12]); } @@ -1283,7 +1283,7 @@ void update_hero_state_motion(void) { hero.motion.velocity.f, hero.motion.velocity.f, motion_geometry_scratch[3]); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0 && + if (hero.swing_hooked != 0 && hero.air_frames.s != 0 && ((oldz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0)) { float a; int up; @@ -1459,7 +1459,7 @@ void update_hero_state_motion(void) { int near; near = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { float d; float e; @@ -1814,9 +1814,9 @@ void update_hero_state_motion(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { if (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } } update_hero_stick_target_magnitude(); @@ -1830,7 +1830,7 @@ void update_hero_state_motion(void) { clear_u64_value(hero.move_impulse.f); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { float sp; @@ -1864,7 +1864,7 @@ void update_hero_state_motion(void) { update_hero_lean_and_sway_parameters(); up = frame_time_sq * 7.5f * k; down = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { float s; s = 2.6179938f - hero.motion.yaw_error; @@ -1878,13 +1878,13 @@ void update_hero_state_motion(void) { down = frame_time_sq * 17.0f; } speed_step(up, down); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } clip_hero_horizontal_velocity(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -2185,7 +2185,7 @@ void update_hero_state_motion(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -2446,7 +2446,7 @@ void update_hero_state_motion(void) { } turn_to(0, frame_scale_sq * 0.035f * t, frame_scale_sq * 0.1f, frame_time * 2.268928f * t); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l03/hero/hero_set_state.c b/src/overlays/l03/hero/hero_set_state.c index f0fa191cbf..d3e9498e14 100644 --- a/src/overlays/l03/hero/hero_set_state.c +++ b/src/overlays/l03/hero/hero_set_state.c @@ -110,14 +110,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); } @@ -137,8 +137,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { request_hero_idle_state_for_vehicle_mode(); @@ -166,7 +166,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (entry_animation_mode) { @@ -193,7 +193,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -202,7 +202,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DYING_SPEED_LIMITED: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.momentum, frame_time * 3.5f); @@ -213,15 +213,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SINK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; - p->unk694 = p->motion.displacement.f[2] * 0.2f; - p->unk69C = p->water_surface_z - 0.37f; - if (p->unk694 < frame_time * -7.0f) - p->unk694 = frame_time * -7.0f; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.2f; + p->swim_water_level = p->water_surface_z - 0.37f; + if (p->swim_bob_velocity < frame_time * -7.0f) + p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (entry_animation_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); break; @@ -229,7 +229,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SWIM: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; *(int *)&p->drown_sink_speed = 0; if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -253,7 +253,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; p->unk8F4 = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -274,7 +274,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { int n; int t; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); p->rand_timer.range = 0x68; @@ -290,7 +290,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->splash_effect_timer = 0; if (p->state.prev_control_mode == HERO_MODE_SWIM) { emit_hero_surface_effect_burst(3, 0xA, 0); @@ -322,7 +322,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *q = &hero; - q->unk698 = 0; + q->swim_stroke_timer = 0; if (q->state.prev_control_mode == HERO_MODE_SWIM) { float d = (float)q->underwater_air; if (d < 2500.0f) { @@ -345,12 +345,12 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *s = &hero; - s->unk694 = s->motion.displacement.f[2] * 0.37f; - if (s->unk694 < frame_time * -7.0f) - s->unk694 = frame_time * -7.0f; - s->unk69C = s->water_surface_z; + s->swim_bob_velocity = s->motion.displacement.f[2] * 0.37f; + if (s->swim_bob_velocity < frame_time * -7.0f) + s->swim_bob_velocity = frame_time * -7.0f; + s->swim_water_level = s->water_surface_z; s->unk6A0 = 0; - s->unk690 = s->motion.pos.f[2] - s->unk69C - -0.12f; + s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; FUN_L00_0025f730(&s->motion.momentum, frame_time * 5.5f); @@ -365,7 +365,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); p->item_select_blocked = 1; qcopy(&p->motion.velocity, &p->motion.displacement); @@ -399,9 +399,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; *(int *)&p->drown_sink_speed = 0; - p->unk698 = scale_game_frames(0x2D); + p->swim_stroke_timer = scale_game_frames(0x2D); p->rand_timer.range = 0x68; if (entry_animation_mode) set_hero_animation(0x65, 0, (float)scale_game_frames(0x11)); @@ -411,7 +411,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; if (p->jump_button_frames > scale_game_frames(0x32)) { struct UsageStat *h = usage_stats.stat; @@ -451,7 +451,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) @@ -462,9 +462,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L03_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = get_hero_idle_animation_index(1); if (p->moby->prev_seq != t && entry_animation_mode) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -475,7 +475,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -484,7 +484,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -493,7 +493,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -506,7 +506,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -515,7 +515,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(1.0f, 0); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -568,7 +568,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -588,7 +588,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VOICE_SLOT_CLEANUP_IDLE_EXIT: { struct Hero *p = &hero; p->state.control_mode = 0x10; - p->unk2284 = 3; + p->camera_mode = 3; p->item_select_blocked = 1; fill_transfer_words((char *)p + 0x9D0, 0, 0x20); qcopy(&p->motion.momentum, &p->motion.displacement); @@ -599,7 +599,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { hero_set_state(HERO_STATE_SLIP, 1); @@ -628,7 +628,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *v = (char *)&p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (entry_animation_mode) { @@ -643,7 +643,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -672,7 +672,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -694,7 +694,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -705,7 +705,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -718,7 +718,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -733,7 +733,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; *(char **)&p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -759,7 +759,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], q->swing_target_moby->pos.y - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); + q->swing_rope_length = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -779,7 +779,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) @@ -790,7 +790,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -805,7 +805,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { int seg; float t; p->state.control_mode = HERO_MODE_FOLLOW_PATH; - p->unk2284 = 3; + p->camera_mode = 3; p->item_select_blocked = 1; p->rand_timer.range = 0x68; p->follow_path_end_frames = 0; @@ -827,7 +827,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -847,7 +847,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (entry_animation_mode) @@ -857,7 +857,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (entry_animation_mode) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -866,7 +866,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (entry_animation_mode) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -875,7 +875,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -885,12 +885,12 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -920,9 +920,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int animation_timing_value = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -937,7 +937,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { int animation_timing = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -976,9 +976,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)&hero.motion.velocity; @@ -996,7 +996,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *u = &hero; u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -1019,7 +1019,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1027,13 +1027,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1041,29 +1041,30 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; u->unk48C = 1.98f; - u->unk430 = 1.95f; + u->jump_height = 1.95f; } else { gravity_set_z( (float *)(&u->motion.velocity), (float *)(&u->motion.velocity), 0.0f); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(2); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(2); + u->velocity_keys_end_frame = + scale_game_frames(0x23) + u->velocity_keys_start_frame; u->keyed_move_target_frame = 0.0f; u->unk3DC = 18.0f; u->keyed_anim_target_frame = scale_game_frames(0x28); - u->unk3E4 = level03_hero_water_surface_jump_velocity_keys; + u->velocity_keys = level03_hero_water_surface_jump_velocity_keys; } { struct Hero *w = &hero; w->item_select_blocked = 1; } } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1071,13 +1072,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1085,7 +1086,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -1093,7 +1094,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1101,8 +1102,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(((int)u->moby), x); @@ -1117,7 +1118,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -1125,14 +1126,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; *(int *)&u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -1140,16 +1141,16 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -1157,7 +1158,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -1165,15 +1166,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - u->unk3E4 = level03_hero_trail_jump_velocity_keys; + u->velocity_keys = level03_hero_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -1181,7 +1182,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -1189,17 +1190,18 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != FALSE) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L03_0015F6E8; + w->velocity_keys = D_L03_0015F6E8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -1211,15 +1213,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1227,7 +1229,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -1250,7 +1252,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (entry_animation_mode) { int s = q->state.current; if (s == 7) { @@ -1319,10 +1321,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; *(int *)&p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1335,7 +1337,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1473,7 +1475,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (entry_animation_mode) { char *m; @@ -1493,7 +1495,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (entry_animation_mode) @@ -1504,9 +1506,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1529,7 +1531,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -1537,7 +1539,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -1547,7 +1549,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -1556,7 +1558,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1567,7 +1569,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { char *v = (char *)&p->motion.resolved_velocity; struct Hero *hero_base; @@ -1585,7 +1587,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -1594,7 +1596,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -1610,7 +1612,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -1629,13 +1631,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != get_hero_idle_animation_index(1)) { @@ -1646,7 +1648,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } @@ -1654,7 +1656,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; @@ -1662,14 +1664,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -1680,7 +1682,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -1721,7 +1723,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } diff --git a/src/overlays/l03/hero/update_hero_motion_for_current_state.c b/src/overlays/l03/hero/update_hero_motion_for_current_state.c index 204195c503..3fd0010395 100644 --- a/src/overlays/l03/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l03/hero/update_hero_motion_for_current_state.c @@ -349,7 +349,7 @@ void update_hero_motion_for_current_state(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { spatial_scratch_or_hit_descriptor.q = 0; spatial_scratch_or_hit_descriptor.f[0] = 1.0f; transform_vector_by_basis(&hero.motion.move_dir, @@ -890,9 +890,9 @@ void update_hero_motion_for_current_state(void) { } } turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - fast_dec_timer(&hero.unk698); + fast_dec_timer(&hero.swim_stroke_timer); if (hero.state.current == 0x36) { - if (PD.no_direction != 0 && hero.unk698 != 0) { + if (PD.no_direction != 0 && hero.swim_stroke_timer != 0) { hero.target_speed = frame_time * 3.0f; } if (absolute_float(hero.motion.yaw_error) > 0.7853982f) { @@ -1110,7 +1110,7 @@ void update_hero_motion_for_current_state(void) { if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->u10.f18.v)) { above = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (above && scale_game_frames(40) < hero.state_timer) { if (hero.stick_magnitude > 0.25f) { f32 s; @@ -1127,7 +1127,7 @@ void update_hero_motion_for_current_state(void) { } } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < hero.unk9A0 * 1.57f || @@ -1168,18 +1168,18 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&vD0, &vD0, &hero.motion.pos); fast_vec_add(&motion_offset_or_position, &vD0, &hero.motion.velocity); fast_vec_sub(&vC0, &motion_offset_or_position, &MV(hero.swing_target_moby)->u10.v10); - fast_vec_normalize(&vC0, &vC0, hero.unk9A4); + fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&motion_offset_or_position, &MV(hero.swing_target_moby)->u10.v10, &vC0); fast_vec_sub(&hero.motion.velocity, &motion_offset_or_position, &vD0); - old = hero.unk9A4; - vendor_spring(&hero.unk9A4, + old = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - old; - if (fast_vec_length(&vC0) > hero.unk9A4) { + d = hero.swing_rope_length - old; + if (fast_vec_length(&vC0) > hero.swing_rope_length) { fast_vec_normalize(&vC0, &vC0, d); fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vC0); } @@ -1201,7 +1201,7 @@ void update_hero_motion_for_current_state(void) { &hero.motion.velocity, &hero.motion.velocity, &motion_offset_or_position); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0) { + if (hero.swing_hooked != 0 && hero.air_frames.s != 0) { if ((vz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0) { f32 t; s32 up; @@ -1359,7 +1359,7 @@ void update_hero_motion_for_current_state(void) { if (!jumping) { if (hero.heading_locked != 0 || MV(hero.melee_target) != NULL) { s32 ok = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { f32 d = fast_subtract_rotations(hero.attack_target_yaw, hero.motion.rot.f[2]); f32 a = compute_directed_angle_delta( 1, hero.attack_target_yaw, hero.motion.rot.f[2]); @@ -1666,9 +1666,9 @@ void update_hero_motion_for_current_state(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0 && + if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } hero_speed_from_table(); if (hero.unk930 > 0.0f) { @@ -1682,7 +1682,7 @@ void update_hero_motion_for_current_state(void) { clear_u64_value(move_impulse_ptr); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { f32 movement_scale = hero.stick_magnitude; @@ -1710,7 +1710,7 @@ void update_hero_motion_for_current_state(void) { { f32 a = frame_time_sq * 7.5f * k; f32 b = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { f32 m = 2.6179938f - hero.motion.yaw_error; if (m > 1.0f) { m = 1.0f; @@ -1723,13 +1723,13 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } clip_hero_horizontal_velocity(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -2198,7 +2198,7 @@ void update_hero_motion_for_current_state(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -2442,7 +2442,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l03/hero/update_hero_state_machine.c b/src/overlays/l03/hero/update_hero_state_machine.c index 5a3d764efb..5cf6221803 100644 --- a/src/overlays/l03/hero/update_hero_state_machine.c +++ b/src/overlays/l03/hero/update_hero_state_machine.c @@ -245,8 +245,8 @@ void update_hero_state_machine(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || item_available[0x1C] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || item_available[0x1C] == 0) { hero_set_state(0x81, 1); break; } @@ -303,7 +303,7 @@ void update_hero_state_machine(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (((unsigned char *)hero.moby)[0x53] == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -335,7 +335,7 @@ void update_hero_state_machine(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -379,7 +379,7 @@ void update_hero_state_machine(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -390,7 +390,7 @@ void update_hero_state_machine(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -406,7 +406,8 @@ void update_hero_state_machine(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L03_00166ED8) > 1.2217305f) { @@ -552,7 +553,7 @@ void update_hero_state_machine(void) { } } hero.item_select_blocked = 1; - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0) || (item_available[4] != 0 && pad_pressed_within(0xA, scale_game_frames(7), 0))) { @@ -583,7 +584,7 @@ void update_hero_state_machine(void) { break; } } - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { if (item_available[4] != 0 && (controller_state.held & 0xA)) { hero_set_state(0x35, 1); @@ -600,7 +601,7 @@ void update_hero_state_machine(void) { hero.motion.displacement.f[2] = 0.0f; } if (0.1f > hero.stick_magnitude && hero.ground_speed == 0.0f && - hero.unk698 == 0) { + hero.swim_stroke_timer == 0) { hero_set_state(0x37, 1); } break; @@ -635,7 +636,7 @@ void update_hero_state_machine(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -737,7 +738,8 @@ void update_hero_state_machine(void) { HeroTableRow2C *rec = &D_L03_0017BD28[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -848,13 +850,13 @@ void update_hero_state_machine(void) { if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -944,7 +946,7 @@ void update_hero_state_machine(void) { if (hero.selector_4 != 0) { break; } - if (hero.unk1E0 != 0) { + if (hero.sinking_floor_hold != 0) { break; } if (hero.voice_slot2 != -1) { @@ -1019,7 +1021,7 @@ void update_hero_state_machine(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -1086,7 +1088,7 @@ void update_hero_state_machine(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -1103,7 +1105,7 @@ void update_hero_state_machine(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -1289,9 +1291,9 @@ void update_hero_state_machine(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -1433,7 +1435,7 @@ void update_hero_state_machine(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -1659,7 +1661,7 @@ void update_hero_state_machine(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -1686,9 +1688,10 @@ void update_hero_state_machine(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -2041,7 +2044,7 @@ void update_hero_state_machine(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l03/hero_relative_camera.c b/src/overlays/l03/hero_relative_camera.c index f3cb0cfed1..073fd908ee 100644 --- a/src/overlays/l03/hero_relative_camera.c +++ b/src/overlays/l03/hero_relative_camera.c @@ -112,7 +112,8 @@ void update_smoothed_hero_relative_camera_position(void *camera_instance) { float gravity_offset[4]; float camera_position[4]; struct Hero *hero_ptr; - if (hero_for_height_update->unk2284 != 0x50 || hero_for_height_update->state.current == 0x11) { + if (hero_for_height_update->camera_mode != 0x50 || + hero_for_height_update->state.current == 0x11) { *(float *)(camera_back_direction_data + 0x34) = hero_for_height_update->motion.pos.f[2]; } fast_vec_normalize(gravity_offset, &hero.gravity_dir, -*(float *)(camera_offset_params + 0x10)); @@ -182,7 +183,7 @@ void rebuild_camera_orientation_axes(void *camera_instance) { int FUN_L03_002ebd70(void) { struct Hero *hero_ptr = &hero; - if ((hero_ptr->unk2284 == 0x50 && hero_ptr->state.current != 0x11) || + if ((hero_ptr->camera_mode == 0x50 && hero_ptr->state.current != 0x11) || hero_ptr->state.current == 6) { return -1; } diff --git a/src/overlays/l03/mobys/metropolis_train_locomotive.c b/src/overlays/l03/mobys/metropolis_train_locomotive.c index 7526de1ae6..a995ef2b7e 100644 --- a/src/overlays/l03/mobys/metropolis_train_locomotive.c +++ b/src/overlays/l03/mobys/metropolis_train_locomotive.c @@ -268,7 +268,7 @@ void update_metropolis_train_idle_motion(struct Moby *moby) { char *motion; locomotive_pvars = (char *)moby->pvars; - moby->unk72 = 0x40; + moby->lod_dist = 0x40; moby_position = &moby->pos; qcopy(old_pos, moby_position); moby_rotation = &moby->rot; diff --git a/src/overlays/l03/mobys/rail_lift.c b/src/overlays/l03/mobys/rail_lift.c index 543dd820c1..9bb08d6377 100644 --- a/src/overlays/l03/mobys/rail_lift.c +++ b/src/overlays/l03/mobys/rail_lift.c @@ -178,7 +178,7 @@ void rail_lift_update(struct Moby *lift_moby) { case LIFT_FOLLOW_PATH: if (is_hero_on_moby(lift_moby)) { hero.jump_lock_timer = 4; - hero.unk1F4 = 4; + hero.edge_brake_lock_timer = 4; } if (advance_moby_along_rail_path( lift_moby, lift_vars->path[lift_moby->command], &lift_vars->snd)) { diff --git a/src/overlays/l03/mobys/taxi.c b/src/overlays/l03/mobys/taxi.c index 352d021c02..612b205d46 100644 --- a/src/overlays/l03/mobys/taxi.c +++ b/src/overlays/l03/mobys/taxi.c @@ -233,7 +233,7 @@ void rail_taxi_update(struct Moby *taxi_moby) { case TAXI_FOLLOW_RETURN_PATH: if (is_hero_on_moby(taxi_moby)) { hero.jump_lock_timer = 4; - hero.unk1F4 = 4; + hero.edge_brake_lock_timer = 4; } if (advance_moby_along_rail_path( taxi_moby, taxi_vars->back[taxi_moby->command], &taxi_vars->snd)) { diff --git a/src/overlays/l04/mobys/eudora_bridge.c b/src/overlays/l04/mobys/eudora_bridge.c index 6ce8a0b31d..cf61568959 100644 --- a/src/overlays/l04/mobys/eudora_bridge.c +++ b/src/overlays/l04/mobys/eudora_bridge.c @@ -64,7 +64,7 @@ void eudora_bridge_update(struct Moby *moby) { moby->unk71 = 0xFF; moby->scale = ((MobyClassHeader *)moby->pclass)->scale; update_moby_animation_state(moby); - moby->unk72 = ((MobyClassHeader *)moby->pclass)->unkE; + moby->lod_dist = ((MobyClassHeader *)moby->pclass)->unkE; moby->collision = ((MobyClassHeader *)moby->pclass)->unk10; refresh_moby_spatial_bounds_from_basis(moby); } @@ -97,7 +97,7 @@ void eudora_bridge_update(struct Moby *moby) { moby->unk71 = 0xFF; moby->scale = ((MobyClassHeader *)moby->pclass)->scale; update_moby_animation_state(moby); - moby->unk72 = ((MobyClassHeader *)moby->pclass)->unkE; + moby->lod_dist = ((MobyClassHeader *)moby->pclass)->unkE; moby->collision = ((MobyClassHeader *)moby->pclass)->unk10; refresh_moby_spatial_bounds_from_basis(moby); moby->state = EUDORA_BRIDGE_STATE_RELEASE_MOVEMENT_VOICE; diff --git a/src/overlays/l05/hero/apply_hero_ground_material_effects.c b/src/overlays/l05/hero/apply_hero_ground_material_effects.c index cd68da8b22..9c71f691f9 100644 --- a/src/overlays/l05/hero/apply_hero_ground_material_effects.c +++ b/src/overlays/l05/hero/apply_hero_ground_material_effects.c @@ -42,7 +42,7 @@ void apply_hero_ground_material_effects(void) { hero.ground_sound_class = save; hero.ground_type = -1; hero.wading = 0; - hero.unk308 = 0; + hero.magnetic_floor = 0; if (saved_ground_type == -1) return; if (saved_ground_type == GROUND_MATERIAL_MAGNET) { @@ -50,7 +50,7 @@ void apply_hero_ground_material_effects(void) { hero.on_magnet_ground = 1; if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT && ((u8 *)hero.items[1].moby) != 0 && *(s16 *)(((u8 *)hero.items[1].moby) + 0xA6) == 0xAD) - hero.unk308 = 1; + hero.magnetic_floor = 1; } } if (saved_ground_type == GROUND_MATERIAL_FIXED_SHALLOW_WATER) { @@ -324,12 +324,12 @@ void update_hero_ground_contact(void) { } hero.ground_pitch.i = 0; hero.unk2E8.i = 0; - hero.unk2D0.i[0] = 0; - hero.unk2D0.i[1] = 0; - hero.unk2C8.i[0] = 0; - hero.unk2C8.i[1] = 0; - hero.unk2C0.i[0] = 0; - hero.unk2C0.i[1] = 0; + hero.side_probe_roll.i[0] = 0; + hero.side_probe_roll.i[1] = 0; + hero.side_probe_pitch.i[0] = 0; + hero.side_probe_pitch.i[1] = 0; + hero.side_probe_drop.i[0] = 0; + hero.side_probe_drop.i[1] = 0; if (hero.state.control_mode == HERO_MODE_GRIND || hero.state.control_mode == 0x15 || hero.state.control_mode == HERO_MODE_ATTACK || hero.state.control_mode == HERO_MODE_JUMP || hero.state.control_mode == HERO_MODE_LAND || hero.state.control_mode == HERO_MODE_LEDGE) { @@ -354,22 +354,22 @@ void update_hero_ground_contact(void) { transform_hero_polar_offset_to_world(&unused_probe_vector, 0.2f, side_probe_angle, -0.45f); if (collision_line(&side_probe_endpoint, &shared_probe_endpoint, 0x22, (s32)hero.moby, 0)) { f = HH.point.f[2] - hero.ground_z.f; - hero.unk2C0.f[i] = f; + hero.side_probe_drop.f[i] = f; if (0.4f < absolute_float(f)) { - hero.unk2C0.f[i] = 0.0f; + hero.side_probe_drop.f[i] = 0.0f; } sceVu0Normalize(&normalized_hit_normal, (u8 *)&HH.normal_x); compute_rotated_vector_angles(&normalized_hit_normal, &hit_normal_angles); if (-0.78539819f < hit_normal_angles.f[1] && hit_normal_angles.f[1] < 0.78539819f) { - hero.unk2C8.f[i] = hit_normal_angles.f[1]; + hero.side_probe_pitch.f[i] = hit_normal_angles.f[1]; } if (-0.78539819f < hit_normal_angles.f[0] && hit_normal_angles.f[0] < 0.78539819f) { - hero.unk2D0.f[i] = hit_normal_angles.f[0]; + hero.side_probe_roll.f[i] = hit_normal_angles.f[0]; } } else { - hero.unk2C0.i[i] = 0; - hero.unk2C8.f[i] = hero.ground_pitch.f; - hero.unk2D0.f[i] = hero.unk2E8.f; + hero.side_probe_drop.i[i] = 0; + hero.side_probe_pitch.f[i] = hero.ground_pitch.f; + hero.side_probe_roll.f[i] = hero.unk2E8.f; } } } diff --git a/src/overlays/l05/hero/hero_set_state.c b/src/overlays/l05/hero/hero_set_state.c index d53d1e3d92..7046e05b9b 100644 --- a/src/overlays/l05/hero/hero_set_state.c +++ b/src/overlays/l05/hero/hero_set_state.c @@ -123,14 +123,14 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); } @@ -150,8 +150,8 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { request_hero_idle_state_for_vehicle_mode(); @@ -179,7 +179,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (animation_request_mode) { @@ -206,7 +206,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_request_mode) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -215,7 +215,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_DYING_SPEED_LIMITED: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.momentum, frame_time * 3.5f); @@ -226,15 +226,15 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_SINK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; - p->unk694 = p->motion.displacement.f[2] * 0.2f; - p->unk69C = p->water_surface_z - 0.37f; - if (p->unk694 < frame_time * -7.0f) - p->unk694 = frame_time * -7.0f; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.2f; + p->swim_water_level = p->water_surface_z - 0.37f; + if (p->swim_bob_velocity < frame_time * -7.0f) + p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (animation_request_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); break; @@ -242,7 +242,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_SWIM: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; *(int *)&p->drown_sink_speed = 0; if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -266,7 +266,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; p->unk8F4 = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -287,7 +287,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { int n; int t; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); p->rand_timer.range = 0x68; @@ -303,7 +303,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->splash_effect_timer = 0; if (p->state.prev_control_mode == HERO_MODE_SWIM) { emit_hero_surface_effect_burst(3, 0xA, 0); @@ -335,7 +335,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { } { struct Hero *q = &hero; - q->unk698 = 0; + q->swim_stroke_timer = 0; if (q->state.prev_control_mode == HERO_MODE_SWIM) { float d = (float)q->underwater_air; if (d < 2500.0f) { @@ -358,12 +358,12 @@ int hero_set_state(int requested_state, int animation_request_mode) { } { struct Hero *s = &hero; - s->unk694 = s->motion.displacement.f[2] * 0.37f; - if (s->unk694 < frame_time * -7.0f) - s->unk694 = frame_time * -7.0f; - s->unk69C = s->water_surface_z; + s->swim_bob_velocity = s->motion.displacement.f[2] * 0.37f; + if (s->swim_bob_velocity < frame_time * -7.0f) + s->swim_bob_velocity = frame_time * -7.0f; + s->swim_water_level = s->water_surface_z; s->unk6A0 = 0; - s->unk690 = s->motion.pos.f[2] - s->unk69C - -0.12f; + s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; FUN_L00_0025f730(&s->motion.momentum, frame_time * 5.5f); @@ -378,7 +378,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); p->item_select_blocked = 1; qcopy(&p->motion.velocity, &p->motion.displacement); @@ -412,9 +412,9 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; *(int *)&p->drown_sink_speed = 0; - p->unk698 = scale_game_frames(0x2D); + p->swim_stroke_timer = scale_game_frames(0x2D); p->rand_timer.range = 0x68; if (animation_request_mode) set_hero_animation(0x65, 0, (float)scale_game_frames(0x11)); @@ -424,7 +424,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; if (p->jump_button_frames > scale_game_frames(0x32)) { struct UsageStat *h = usage_stats.stat; @@ -464,7 +464,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_request_mode) @@ -474,7 +474,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_HOVERBOARD_RIDE: { struct Hero *p = &hero; p->state.control_mode = 0x16; - p->unk2284 = 8; + p->camera_mode = 8; p->item_select_blocked = 1; p->unk20B2 = 1; p->board_jump_frames = 0; @@ -557,7 +557,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_HOVERBOARD_ANIMATION_VARIANT: { struct Hero *p = &hero; p->state.control_mode = 0x16; - p->unk2284 = 8; + p->camera_mode = 8; p->item_select_blocked = 1; p->unk870 = 0; if (animation_request_mode) @@ -568,7 +568,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_HOVERBOARD_RESPAWN_HEIGHT_OR_ANIMATION_WAIT: { struct Hero *p = &hero; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; release_and_clear_hero_voice_slots(); p->boost_pad_timer = 0; fast_vec_scale(&p->motion.velocity, &p->motion.resolved_velocity, 0.7f); @@ -581,7 +581,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { int n; int v; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; release_and_clear_hero_voice_slots(); p->boost_pad_timer = 0; p->board_respawn_delay = scale_game_frames(0x46); @@ -593,16 +593,16 @@ int hero_set_state(int requested_state, int animation_request_mode) { emit_hero_surface_effect_burst(3, v, 1); allocate_hero_voice_for_entry(3, 0); p->splash_effect_timer = scale_game_frames(0x4B); - p->unk694 = p->motion.displacement.f[2] * 0.3f; - if (p->unk694 < frame_time * -5.7f) - p->unk694 = frame_time * -5.7f; - p->unk69C = p->board_floor_z; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.3f; + if (p->swim_bob_velocity < frame_time * -5.7f) + p->swim_bob_velocity = frame_time * -5.7f; + p->swim_water_level = p->board_floor_z; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C - -0.12f; - if (0.2f < p->unk690) { - p->unk690 = 0.2f; - } else if (p->unk690 < -0.2f) { - p->unk690 = -0.2f; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level - -0.12f; + if (0.2f < p->swim_bob_offset) { + p->swim_bob_offset = 0.2f; + } else if (p->swim_bob_offset < -0.2f) { + p->swim_bob_offset = -0.2f; } { char *hero_velocity_bytes = (char *)&hero.motion.velocity; @@ -621,7 +621,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_HOVERBOARD_RESPAWN_ANIMATION_WAIT: { struct Hero *p = &hero; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; release_and_clear_hero_voice_slots(); p->boost_pad_timer = 0; p->rand_timer.range = 0x68; @@ -632,7 +632,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case 0x38: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_request_mode) set_hero_animation(0x46, 0, (float)scale_game_frames(8)); break; @@ -640,7 +640,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case 0x39: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_request_mode) set_hero_animation(0x47, 0, (float)scale_game_frames(8)); break; @@ -648,7 +648,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_ANIMATION_WAIT_TO_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_request_mode) set_hero_animation(0x48, 0, (float)scale_game_frames(8)); break; @@ -657,9 +657,9 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L05_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = get_hero_idle_animation_index(1); if (p->moby->prev_seq != t && animation_request_mode) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -670,7 +670,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -679,7 +679,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -688,7 +688,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -701,7 +701,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -710,7 +710,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(1.0f, 0); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -763,7 +763,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -783,7 +783,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VOICE_SLOT_CLEANUP_IDLE_EXIT: { struct Hero *p = &hero; p->state.control_mode = 0x10; - p->unk2284 = 3; + p->camera_mode = 3; p->item_select_blocked = 1; fill_transfer_words((char *)p + 0x9D0, 0, 0x20); qcopy(&p->motion.momentum, &p->motion.displacement); @@ -794,7 +794,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { hero_set_state(HERO_STATE_SLIP, 1); @@ -823,7 +823,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; char *v = (char *)&p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (animation_request_mode) { @@ -838,7 +838,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -867,7 +867,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -889,7 +889,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -900,7 +900,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -913,7 +913,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -928,7 +928,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; *(char **)&p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -954,7 +954,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], q->swing_target_moby->pos.y - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); + q->swing_rope_length = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -974,7 +974,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_request_mode) @@ -985,7 +985,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -996,7 +996,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -1016,7 +1016,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (animation_request_mode) @@ -1026,7 +1026,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_request_mode) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -1035,7 +1035,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_request_mode) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -1044,7 +1044,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_request_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -1054,12 +1054,12 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -1089,9 +1089,9 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; int animation_timing_parameter = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -1106,7 +1106,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { int animation_timing_setting = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -1145,9 +1145,9 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)&hero.motion.velocity; @@ -1167,7 +1167,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { allocate_hero_voice_for_entry(0xA, 0); u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -1190,7 +1190,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1198,13 +1198,13 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1212,29 +1212,30 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; u->unk48C = 1.98f; - u->unk430 = 1.95f; + u->jump_height = 1.95f; } else { gravity_set_z( (float *)(&u->motion.velocity), (float *)(&u->motion.velocity), 0.0f); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(2); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(2); + u->velocity_keys_end_frame = + scale_game_frames(0x23) + u->velocity_keys_start_frame; u->keyed_move_target_frame = 0.0f; u->unk3DC = 18.0f; u->keyed_anim_target_frame = scale_game_frames(0x28); - u->unk3E4 = level05_hero_water_surface_jump_velocity_keys; + u->velocity_keys = level05_hero_water_surface_jump_velocity_keys; } { struct Hero *w = &hero; w->item_select_blocked = 1; } } else if (u->state.current == 0x3C) { - u->unk430 = 5.5f; + u->jump_height = 5.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1242,7 +1243,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 13.0f; u->unk48C = 5.55f; u->jump_height_start = 5.5f; - u->unk498 = scale_game_frames(2); + u->jump_ramp_frames = scale_game_frames(2); u->jump_max_frames = scale_game_frames(0x78); hero_change_health(1); if (current_level_index == LEVEL_ORXON) { @@ -1278,7 +1279,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { } { struct Hero *w = &hero; - w->unk430 = v + 1.7f; + w->jump_height = v + 1.7f; w->takeoff_frame = scale_game_frames(5); w->unk434 = 0.6f; w->apex_anim_frame = 18.0f; @@ -1286,10 +1287,10 @@ int hero_set_state(int requested_state, int animation_request_mode) { w->jump_land_anim_frame = 12.0f; w->unk48C = v + 1.75f; w->jump_height_start = v + 1.7f; - w->unk498 = scale_game_frames(0x13); + w->jump_ramp_frames = scale_game_frames(0x13); } } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1297,13 +1298,13 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1311,7 +1312,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -1319,7 +1320,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1327,8 +1328,8 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(((int)u->moby), x); @@ -1343,7 +1344,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -1351,14 +1352,14 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; *(int *)&u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -1366,16 +1367,16 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -1383,7 +1384,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -1391,15 +1392,15 @@ int hero_set_state(int requested_state, int animation_request_mode) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - u->unk3E4 = D_L05_0017C380_e; + u->velocity_keys = D_L05_0017C380_e; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -1407,7 +1408,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -1415,17 +1416,18 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L05_0015F6F8; + w->velocity_keys = D_L05_0015F6F8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -1437,15 +1439,15 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1453,7 +1455,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -1476,7 +1478,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (animation_request_mode) { int s = q->state.current; if (s == 7) { @@ -1549,10 +1551,10 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; *(int *)&p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1565,7 +1567,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1703,7 +1705,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (animation_request_mode) { char *m; @@ -1723,7 +1725,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (animation_request_mode) @@ -1734,9 +1736,9 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1769,7 +1771,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { { struct Hero *r = &hero; r->state.control_mode = HERO_MODE_RESPAWN_WAIT; - r->unk2284 = 0; + r->camera_mode = 0; allocate_hero_voice_for_entry(9, 0); r->rand_timer.range = 0x68; r->target_speed = 0.0f; @@ -1782,7 +1784,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_HEIGHT_OR_TIMEOUT_RESPAWN_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RESPAWN_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; if (current_level_index == LEVEL_QUARTU) spawn_hero_radial_particle_burst(); p->collision_off_frames = 0x2710; @@ -1809,7 +1811,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; p->collision_off_frames = 0x2710; p->sink_surface_z = p->ground_z.f; @@ -1822,7 +1824,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_request_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -1830,7 +1832,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_request_mode) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -1840,7 +1842,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_request_mode) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -1849,7 +1851,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1860,7 +1862,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { char *v = (char *)&p->motion.resolved_velocity; struct Hero *hero_base; @@ -1878,7 +1880,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_request_mode) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -1887,7 +1889,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -1903,7 +1905,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -1922,13 +1924,13 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != get_hero_idle_animation_index(1)) { @@ -1939,7 +1941,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } @@ -1947,7 +1949,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; @@ -1955,14 +1957,14 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -1973,7 +1975,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -2000,7 +2002,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } diff --git a/src/overlays/l05/hero/update_hero_motion_by_state.c b/src/overlays/l05/hero/update_hero_motion_by_state.c index bdc9a9673a..15c2c1db0a 100644 --- a/src/overlays/l05/hero/update_hero_motion_by_state.c +++ b/src/overlays/l05/hero/update_hero_motion_by_state.c @@ -305,7 +305,7 @@ void update_hero_motion_by_state(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { vector_and_hit_scratch.q = 0; vector_and_hit_scratch.f[0] = 1.0f; transform_vector_by_basis( @@ -847,9 +847,9 @@ void update_hero_motion_by_state(void) { } } turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - fast_dec_timer(&hero.unk698); + fast_dec_timer(&hero.swim_stroke_timer); if (hero.state.current == 0x36) { - if (PD.no_direction != 0 && hero.unk698 != 0) { + if (PD.no_direction != 0 && hero.swim_stroke_timer != 0) { hero.target_speed = frame_time * 3.0f; } if (absolute_float(hero.motion.yaw_error) > 0.7853982f) { @@ -1378,7 +1378,7 @@ void update_hero_motion_by_state(void) { if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { above = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (above && scale_game_frames(40) < hero.state_timer) { if (hero.stick_magnitude > 0.25f) { f32 s; @@ -1396,7 +1396,7 @@ void update_hero_motion_by_state(void) { } } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < @@ -1441,20 +1441,20 @@ void update_hero_motion_by_state(void) { fast_vec_sub(&vC0, &rotation_and_motion_scratch[3], &((struct MobyView *)hero.swing_target_moby)->u10.v10); - fast_vec_normalize(&vC0, &vC0, hero.unk9A4); + fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&rotation_and_motion_scratch[3], &((struct MobyView *)hero.swing_target_moby)->u10.v10, &vC0); fast_vec_sub(&hero.motion.velocity, &rotation_and_motion_scratch[3], &vD0); - old = hero.unk9A4; - vendor_spring(&hero.unk9A4, + old = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - old; - if (fast_vec_length(&vC0) > hero.unk9A4) { + d = hero.swing_rope_length - old; + if (fast_vec_length(&vC0) > hero.swing_rope_length) { fast_vec_normalize(&vC0, &vC0, d); fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vC0); } @@ -1478,7 +1478,7 @@ void update_hero_motion_by_state(void) { &hero.motion.velocity, &hero.motion.velocity, &rotation_and_motion_scratch[3]); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0) { + if (hero.swing_hooked != 0 && hero.air_frames.s != 0) { if ((vz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0) { f32 t; s32 up; @@ -1645,7 +1645,7 @@ void update_hero_motion_by_state(void) { if (!jumping) { if (hero.heading_locked != 0 || (struct MobyView *)hero.melee_target != NULL) { s32 ok = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { f32 d = fast_subtract_rotations(hero.attack_target_yaw, hero.motion.rot.f[2]); f32 a = compute_directed_angle_delta( 1, hero.attack_target_yaw, hero.motion.rot.f[2]); @@ -1949,9 +1949,9 @@ void update_hero_motion_by_state(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0 && + if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } hero_speed_from_table(); if (hero.unk930 > 0.0f) { @@ -1965,7 +1965,7 @@ void update_hero_motion_by_state(void) { clear_u64_value(move_impulse); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { f32 c = hero.stick_magnitude; @@ -1993,7 +1993,7 @@ void update_hero_motion_by_state(void) { { f32 a = frame_time_sq * 7.5f * k; f32 b = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { f32 m = 2.6179938f - hero.motion.yaw_error; if (m > 1.0f) { m = 1.0f; @@ -2006,13 +2006,13 @@ void update_hero_motion_by_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } clip_hero_horizontal_velocity(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -2201,7 +2201,7 @@ void update_hero_motion_by_state(void) { } flag = 0; if (has) { - flag = hero.unk20AA != 0; + flag = hero.weapon_up != 0; } moby_point_position((struct MobyView *)hero.moby, 9, &hero.joint9_world_pos); moby_point_position((struct MobyView *)hero.moby, 0xE, &hero.joint14_world_pos); @@ -2796,7 +2796,7 @@ void update_hero_motion_by_state(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -3060,7 +3060,7 @@ void update_hero_motion_by_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l05/hero/update_hero_state_machine.c b/src/overlays/l05/hero/update_hero_state_machine.c index e86e0bd346..2d2e24e40e 100644 --- a/src/overlays/l05/hero/update_hero_state_machine.c +++ b/src/overlays/l05/hero/update_hero_state_machine.c @@ -250,8 +250,8 @@ void update_hero_state_machine(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || item_available[0x1C] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || item_available[0x1C] == 0) { hero_set_state(0x81, 1); break; } @@ -310,7 +310,7 @@ void update_hero_state_machine(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (((unsigned char *)hero.moby)[0x53] == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -342,7 +342,7 @@ void update_hero_state_machine(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -386,7 +386,7 @@ void update_hero_state_machine(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -397,7 +397,7 @@ void update_hero_state_machine(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -413,7 +413,8 @@ void update_hero_state_machine(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L05_001671D8) > 1.2217305f) { @@ -559,7 +560,7 @@ void update_hero_state_machine(void) { } } hero.item_select_blocked = 1; - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0) || (item_available[4] != 0 && pad_pressed_within(0xA, scale_game_frames(7), 0))) { @@ -590,7 +591,7 @@ void update_hero_state_machine(void) { break; } } - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { if (item_available[4] != 0 && (controller_state.held & 0xA)) { hero_set_state(0x35, 1); @@ -607,7 +608,7 @@ void update_hero_state_machine(void) { hero.motion.displacement.f[2] = 0.0f; } if (0.1f > hero.stick_magnitude && hero.ground_speed == 0.0f && - hero.unk698 == 0) { + hero.swim_stroke_timer == 0) { hero_set_state(0x37, 1); } break; @@ -653,7 +654,7 @@ void update_hero_state_machine(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -755,7 +756,8 @@ void update_hero_state_machine(void) { HeroTableRow2C *rec = &D_L05_0017C088[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -866,13 +868,13 @@ void update_hero_state_machine(void) { if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -993,7 +995,7 @@ void update_hero_state_machine(void) { if (hero.selector_4 != 0) { break; } - if (hero.unk1E0 != 0) { + if (hero.sinking_floor_hold != 0) { break; } if (hero.voice_slot2 != -1) { @@ -1068,7 +1070,7 @@ void update_hero_state_machine(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -1135,7 +1137,7 @@ void update_hero_state_machine(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -1152,7 +1154,7 @@ void update_hero_state_machine(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -1325,9 +1327,9 @@ void update_hero_state_machine(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -1465,7 +1467,7 @@ void update_hero_state_machine(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -1688,7 +1690,7 @@ void update_hero_state_machine(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -1715,9 +1717,10 @@ void update_hero_state_machine(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -2301,7 +2304,7 @@ void update_hero_state_machine(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l05/mobys/sharkigator.c b/src/overlays/l05/mobys/sharkigator.c index 1b4c085e72..46eaf270d2 100644 --- a/src/overlays/l05/mobys/sharkigator.c +++ b/src/overlays/l05/mobys/sharkigator.c @@ -221,11 +221,11 @@ state_three: { store for the 2-wide issue and the store takes the jal delay slot; retail has a0 in the slot. Sibling rocket.c FUN_L18_002a7220 gets the same order from a real intermediate call. */ - hero_actor->unk20A5 = one; + hero_actor->hidden = one; hero_actor->motion.pos.f[2] += 20.0f; } else { qcopy(&hero_actor->motion.pos, moby + 0x10); - hero_actor->unk20A5 = one; + hero_actor->hidden = one; hero_actor->motion.pos.f[2] += 20.0f; } /* Fakematch: a gcse-time set of moby so PRE does not hoist the diff --git a/src/overlays/l05/mobys/taxi.c b/src/overlays/l05/mobys/taxi.c index 1f673e23da..2719428be0 100644 --- a/src/overlays/l05/mobys/taxi.c +++ b/src/overlays/l05/mobys/taxi.c @@ -220,7 +220,7 @@ void taxi_update(struct Moby *moby) { if (moby->state >= TAXI_BLEND_TO_PATH_START && moby->state <= TAXI_BLEND_TO_DESTINATION) { travel_hero = &hero; travel_hero->jump_lock_timer = 2; - travel_hero->unk1F4 = 2; + travel_hero->edge_brake_lock_timer = 2; transform_moby_vector_table_to_world_space(moby); if (voice_is_playing(moby, taxi_data->voice) == 0) { taxi_data->voice = allocate_voice_for_target_entry(0, 4, moby); diff --git a/src/overlays/l06/hero/hero_set_state.c b/src/overlays/l06/hero/hero_set_state.c index db2c688a0e..f960b544a4 100644 --- a/src/overlays/l06/hero/hero_set_state.c +++ b/src/overlays/l06/hero/hero_set_state.c @@ -115,14 +115,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); } @@ -142,8 +142,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { enter_hero_idle_state_for_current_vehicle_mode(); @@ -170,7 +170,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (entry_animation_mode) { @@ -196,7 +196,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -205,7 +205,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DYING_SPEED_LIMITED: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.momentum, frame_time * 3.5f); @@ -216,15 +216,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SINK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; - p->unk694 = p->motion.displacement.f[2] * 0.2f; - p->unk69C = p->water_surface_z - 0.37f; - if (p->unk694 < frame_time * -7.0f) - p->unk694 = frame_time * -7.0f; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.2f; + p->swim_water_level = p->water_surface_z - 0.37f; + if (p->swim_bob_velocity < frame_time * -7.0f) + p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (entry_animation_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); break; @@ -233,9 +233,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L06_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = get_hero_help_value(1); if (p->moby->prev_seq != t && entry_animation_mode) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -246,7 +246,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -255,7 +255,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -264,7 +264,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -277,7 +277,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -286,7 +286,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(1.0f, 0); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -334,7 +334,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -354,7 +354,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { hero_set_state(HERO_STATE_SLIP, 1); @@ -382,7 +382,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *v = (char *)&p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (entry_animation_mode) { @@ -397,7 +397,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -426,7 +426,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -448,7 +448,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -459,7 +459,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -472,7 +472,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -487,7 +487,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; *(char **)&p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -513,7 +513,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], q->swing_target_moby->pos.y - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); + q->swing_rope_length = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -533,7 +533,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) @@ -544,7 +544,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -559,7 +559,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { float f; float t; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 3; + p->camera_mode = 3; p->rand_timer.range = 0x68; p->grind_direction = 1; p->grind_yaw_offset = -1.5707964f; @@ -612,7 +612,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -632,7 +632,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (entry_animation_mode) @@ -642,7 +642,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (entry_animation_mode) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -651,7 +651,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (entry_animation_mode) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -660,7 +660,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -670,12 +670,12 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -709,9 +709,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int animation_blend_spec = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -726,7 +726,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { int landing_animation_blend_spec = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -765,9 +765,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)&hero.motion.velocity; @@ -785,7 +785,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *u = &hero; u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -808,7 +808,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -816,13 +816,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x3C) { - u->unk430 = 5.5f; + u->jump_height = 5.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -830,7 +830,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 13.0f; u->unk48C = 5.55f; u->jump_height_start = 5.5f; - u->unk498 = scale_game_frames(2); + u->jump_ramp_frames = scale_game_frames(2); u->jump_max_frames = scale_game_frames(0x78); hero_change_health(1); if (current_level_index == LEVEL_ORXON) { @@ -857,7 +857,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { w->unk49E = scale_game_frames(4); } } else if (u->state.current == 0x29) { - u->unk430 = 2.4f; + u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -865,13 +865,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.45f; u->jump_height_start = 2.4f; - u->unk498 = scale_game_frames(0x11); + u->jump_ramp_frames = scale_game_frames(0x11); u->jump_gravity = frame_time_sq * 27.0f; u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; if (u->selector_5 != 0) { float h = 4.7f; - u->unk430 += h; + u->jump_height += h; u->jump_height_start += h; u->unk48C += h; u->jump_gravity = frame_time_sq * 14.0f; @@ -882,14 +882,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { d.v.z = 145.0f; if (fast_vec_dist(&u->motion.pos, &d.v) < 10.0f) { h = 0.7f; - u->unk430 += h; + u->jump_height += h; u->jump_height_start += h; u->unk48C += h; } } } } else if (u->state.current == 0x2A) { - u->unk430 = 2.5f; + u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -897,12 +897,12 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.55f; u->jump_height_start = 2.5f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); u->jump_gravity = frame_time_sq * 24.0f; u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -910,13 +910,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0x49) { - u->unk430 = 1.3f; + u->jump_height = 1.3f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -924,12 +924,12 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 27.0f; u->unk48C = 1.35f; u->jump_height_start = 1.3f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_gravity = frame_time_sq * 25.0f; u->air_stick_speed = frame_time * 2.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -937,7 +937,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -945,7 +945,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = (char *)&u->trail; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -953,8 +953,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(*(int *)&u->moby, x); @@ -969,7 +969,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -977,14 +977,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x4C) { - u->unk430 = 1.55f; + u->jump_height = 1.55f; u->takeoff_frame = scale_game_frames(0xD); u->unk434 = 0.85f; u->apex_anim_frame = 10.0f; @@ -992,11 +992,11 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 1.59f; u->jump_height_start = 1.55f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_gravity = frame_time_sq * 28.0f; u->ledge_jump_speed = 0; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -1004,16 +1004,16 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = (char *)&u->trail; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -1021,7 +1021,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -1029,15 +1029,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - *(char **)&u->unk3E4 = level06_hero_transform_trail_jump_velocity_keys; + *(char **)&u->velocity_keys = level06_hero_transform_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -1045,7 +1045,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -1053,17 +1053,18 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L06_0015F6E8; + w->velocity_keys = D_L06_0015F6E8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -1075,15 +1076,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1091,7 +1092,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -1114,7 +1115,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (entry_animation_mode) { int s = q->state.current; if (s == 7) { @@ -1198,10 +1199,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; *(int *)&p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1214,7 +1215,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1378,7 +1379,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_GRIND_ATTACK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x2B) { p->attack_record = p->attack_record == 0; } else { @@ -1398,7 +1399,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (entry_animation_mode) { char *m; @@ -1418,7 +1419,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (entry_animation_mode) @@ -1429,9 +1430,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1468,7 +1469,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; p->collision_off_frames = 0x2710; p->sink_surface_z = p->ground_z.f; @@ -1482,7 +1483,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *m; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; p->collision_off_frames = 0x2710; p->sink_surface_z = p->ground_z.f; @@ -1496,7 +1497,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_1_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { hero_set_state(0x52, 1); return 0; @@ -1508,7 +1509,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_1_LAND: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LAND; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -1520,7 +1521,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_1_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) @@ -1530,7 +1531,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_1_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(4, 0, (float)scale_game_frames(0xC)); @@ -1539,12 +1540,12 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_1_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); hero_change_health(1); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); p->invulnerable_frames = scale_game_frames(0x32); if (entry_animation_mode) { set_hero_animation(6, 3, -3.0f); @@ -1562,7 +1563,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *q = &hero; q->state.control_mode = HERO_MODE_RUN; - q->unk2284 = 0; + q->camera_mode = 0; q->ground_speed = vector_length_xy(&q->motion.resolved_velocity); if (q->state.prev == 3) q->ground_speed = 0.0f; @@ -1577,7 +1578,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_1_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) @@ -1587,7 +1588,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ALT_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 12.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -1601,7 +1602,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ALT_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; if (entry_animation_mode) set_hero_animation(0xA, 0, (float)scale_game_frames(6)); break; @@ -1609,7 +1610,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ALT_LEDGE_SHIMMY_YAW_PLUS_90: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; if (entry_animation_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(6)); break; @@ -1617,7 +1618,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ALT_LEDGE_SHIMMY_YAW_MINUS_90: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; if (entry_animation_mode) set_hero_animation(0xC, 0, (float)scale_game_frames(6)); break; @@ -1625,7 +1626,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -1633,7 +1634,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -1643,7 +1644,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -1652,7 +1653,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1663,7 +1664,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { char *v = (char *)&p->motion.resolved_velocity; struct Hero *hero_base; @@ -1681,7 +1682,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -1690,7 +1691,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -1706,7 +1707,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -1725,13 +1726,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != get_hero_help_value(1)) { set_hero_animation(get_hero_help_value(1), 0, (float)scale_game_frames(5)); @@ -1741,7 +1742,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; } @@ -1749,7 +1750,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; @@ -1757,14 +1758,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -1775,7 +1776,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -1802,7 +1803,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } diff --git a/src/overlays/l06/hero/update_hero_motion_for_current_state.c b/src/overlays/l06/hero/update_hero_motion_for_current_state.c index 9d9a13aeff..2271866d6a 100644 --- a/src/overlays/l06/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l06/hero/update_hero_motion_for_current_state.c @@ -53,7 +53,7 @@ void apply_hero_ground_material_response(void) { hero_state->ground_sound_class = saved_ground_sound_class; hero_state->ground_type = -1; hero_state->wading = 0; - hero_state->unk308 = 0; + hero_state->magnetic_floor = 0; if (previous_ground_type == -1) return; if (previous_ground_type == HERO_GROUND_MATERIAL_MAGNETIC) { @@ -62,7 +62,7 @@ void apply_hero_ground_material_response(void) { if (hero_state->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { char *item_slot_1_moby = ((char *)hero_state->items[1].moby); if (item_slot_1_moby != 0 && MOBY(item_slot_1_moby)->oclass == 0xAD) - hero_state->unk308 = 1; + hero_state->magnetic_floor = 1; } } } @@ -186,7 +186,7 @@ s32 process_hero_hit_response(s32 apply_hurt_response) { G.damage_source_moby = (struct Moby *)hero_hit_entry->target; D_0015EEA8++; if (G.state.control_mode == HERO_MODE_GRIND) { - G.unk5BE = 1; + G.grind_hit = 1; return 0; } if (apply_hurt_response == 0) { @@ -554,12 +554,12 @@ void update_hero_ground_contact(void) { } hero_lui.ground_pitch.i = 0; hero_lui.unk2E8.i = 0; - hero_lui.unk2D0.i[0] = 0; - hero_lui.unk2D0.i[1] = 0; - hero_lui.unk2C8.i[0] = 0; - hero_lui.unk2C8.i[1] = 0; - hero_lui.unk2C0.i[0] = 0; - hero_lui.unk2C0.i[1] = 0; + hero_lui.side_probe_roll.i[0] = 0; + hero_lui.side_probe_roll.i[1] = 0; + hero_lui.side_probe_pitch.i[0] = 0; + hero_lui.side_probe_pitch.i[1] = 0; + hero_lui.side_probe_drop.i[0] = 0; + hero_lui.side_probe_drop.i[1] = 0; if (hero_lui.state.control_mode == HERO_MODE_GRIND || hero_lui.state.control_mode == 0x15 || hero_lui.state.control_mode == HERO_MODE_ATTACK || hero_lui.state.control_mode == HERO_MODE_JUMP || @@ -588,22 +588,22 @@ void update_hero_ground_contact(void) { &unused_surface_probe_point, 0.2f, surface_probe_angle, -0.45f); if (collision_line(&surface_probe_start, &collision_ray_end, 0x22, hero_lui.moby, 0)) { f = HH.point.f[2] - hero_lui.ground_z.f; - hero_lui.unk2C0.f[i] = f; + hero_lui.side_probe_drop.f[i] = f; if (0.4f < absolute_float(f)) { - hero_lui.unk2C0.f[i] = 0.0f; + hero_lui.side_probe_drop.f[i] = 0.0f; } sceVu0Normalize(&normalized_hit_normal, (u8 *)&HH.normal_x); compute_rotated_vector_angles(&normalized_hit_normal, &hit_surface_angles); if (-0.78539819f < hit_surface_angles.f[1] && hit_surface_angles.f[1] < 0.78539819f) { - hero_lui.unk2C8.f[i] = hit_surface_angles.f[1]; + hero_lui.side_probe_pitch.f[i] = hit_surface_angles.f[1]; } if (-0.78539819f < hit_surface_angles.f[0] && hit_surface_angles.f[0] < 0.78539819f) { - hero_lui.unk2D0.f[i] = hit_surface_angles.f[0]; + hero_lui.side_probe_roll.f[i] = hit_surface_angles.f[0]; } } else { - hero_lui.unk2C0.f[i] = 0; - hero_lui.unk2C8.f[i] = hero_lui.ground_pitch.f; - hero_lui.unk2D0.f[i] = hero_lui.unk2E8.f; + hero_lui.side_probe_drop.f[i] = 0; + hero_lui.side_probe_pitch.f[i] = hero_lui.ground_pitch.f; + hero_lui.side_probe_roll.f[i] = hero_lui.unk2E8.f; } } } @@ -723,13 +723,13 @@ void update_hero_airborne_planar_velocity(void) { build_scaled_hero_move_impulse(0.7f, ED6C * 0.0f); qcopy(&hero.motion.momentum, &hero.move_impulse); } else if (state == HERO_STATE_REPEATABLE_JUMP) { - hero.motion.move_yaw = hero.unk470.f[3]; - qcopy(&hero.motion.move_dir, &hero.unk470); + hero.motion.move_yaw = hero.wall_jump_normal.f[3]; + qcopy(&hero.motion.move_dir, &hero.wall_jump_normal); if (FUN_001f96f8_2b438(9) < hero.state_timer) { turn_to(-1, ED64 * 0.042f, ED64 * 0.2f, ED6C * 11.868238f); } if (FUN_001f96f8_2b438(9) <= hero.state_timer) { - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { hero.motion.velocity.f[0] = FUN_001f9dc8_2b438(hero.motion.move_yaw) * (ED6C * 4.9f); hero.motion.velocity.f[1] = @@ -1048,7 +1048,7 @@ void update_hero_motion_for_current_state(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); FUN_L00_002118c8_c(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { vector_or_hit_descriptor_scratch.q = 0; vector_or_hit_descriptor_scratch.f[0] = 1.0f; transform_vector_by_basis(&hero.motion.move_dir, @@ -1405,7 +1405,7 @@ void update_hero_motion_for_current_state(void) { if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { above = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (above && scale_game_frames(40) < hero.state_timer) { if (hero.stick_magnitude > 0.25f) { f32 s; @@ -1422,7 +1422,7 @@ void update_hero_motion_for_current_state(void) { } } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < @@ -1466,20 +1466,20 @@ void update_hero_motion_for_current_state(void) { FUN_001f9a28_c(&vC0, &position_or_delta_scratch, &((struct MobyView *)hero.swing_target_moby)->u10.v10); - fast_vec_normalize(&vC0, &vC0, hero.unk9A4); + fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&position_or_delta_scratch, &((struct MobyView *)hero.swing_target_moby)->u10.v10, &vC0); FUN_001f9a28_c(&hero.motion.velocity, &position_or_delta_scratch, &vD0); - previous_swing_radius = hero.unk9A4; - vendor_spring(&hero.unk9A4, + previous_swing_radius = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - previous_swing_radius; - if (fast_vec_length(&vC0) > hero.unk9A4) { + d = hero.swing_rope_length - previous_swing_radius; + if (fast_vec_length(&vC0) > hero.swing_rope_length) { fast_vec_normalize(&vC0, &vC0, d); fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vC0); } @@ -1501,7 +1501,7 @@ void update_hero_motion_for_current_state(void) { &hero.motion.velocity, &hero.motion.velocity, &position_or_delta_scratch); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0) { + if (hero.swing_hooked != 0 && hero.air_frames.s != 0) { if ((vz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0) { f32 t; s32 up; @@ -1662,7 +1662,7 @@ void update_hero_motion_for_current_state(void) { if (!jumping) { if (hero.heading_locked != 0 || (struct MobyView *)hero.melee_target != NULL) { s32 ok = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { f32 d = fast_subtract_rotations(hero.attack_target_yaw, hero.motion.rot.f[2]); f32 a = compute_directed_angle_delta( 1, hero.attack_target_yaw, hero.motion.rot.f[2]); @@ -1960,9 +1960,9 @@ void update_hero_motion_for_current_state(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0 && + if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } quantize_hero_input_target_speed(); if (hero.unk930 > 0.0f) { @@ -1976,7 +1976,7 @@ void update_hero_motion_for_current_state(void) { clear_u64_value(move_impulse_ptr); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, D_0015ED6C_c * 9.948377f); } else { f32 turn_control_value = hero.stick_magnitude; @@ -2004,7 +2004,7 @@ void update_hero_motion_for_current_state(void) { { f32 a = frame_time_sq * 7.5f * k; f32 b = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { f32 m = 2.6179938f - hero.motion.yaw_error; if (m > 1.0f) { m = 1.0f; @@ -2017,13 +2017,13 @@ void update_hero_motion_for_current_state(void) { } FUN_L00_00212088(a, b); } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } adjust_hero_velocity_from_collision_probes(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -2081,7 +2081,7 @@ void update_hero_motion_for_current_state(void) { } flag = 0; if (has) { - flag = hero.unk20AA != 0; + flag = hero.weapon_up != 0; } moby_point_position((struct MobyView *)hero.moby, 9, &hero.joint9_world_pos); moby_point_position((struct MobyView *)hero.moby, 0xE, &hero.joint14_world_pos); @@ -2736,7 +2736,7 @@ void update_hero_motion_for_current_state(void) { if (hero.rail_land_frames != 1) { FUN_L00_00212088(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -3072,7 +3072,7 @@ void update_hero_motion_for_current_state(void) { D_0015ED6C_c * 9.948377f * g); } FUN_L00_00212088(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -3220,7 +3220,7 @@ void update_hero_motion_for_current_state(void) { turn_to( 0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, D_0015ED6C_c * 2.268928f * g); FUN_L00_00212088(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l06/hero/update_hero_state_machine.c b/src/overlays/l06/hero/update_hero_state_machine.c index 03cae11232..b05d6a25f9 100644 --- a/src/overlays/l06/hero/update_hero_state_machine.c +++ b/src/overlays/l06/hero/update_hero_state_machine.c @@ -271,8 +271,8 @@ void update_hero_state_machine(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || D_0013D4DC[0] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || D_0013D4DC[0] == 0) { hero_set_state(0x81, 1); break; } @@ -328,7 +328,7 @@ void update_hero_state_machine(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (((unsigned char *)hero.moby)[0x53] == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -359,7 +359,7 @@ void update_hero_state_machine(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -403,7 +403,7 @@ void update_hero_state_machine(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -414,7 +414,7 @@ void update_hero_state_machine(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -434,7 +434,8 @@ void update_hero_state_machine(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L06_00167558_lui) > 1.2217305f) { @@ -521,7 +522,7 @@ void update_hero_state_machine(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -623,7 +624,8 @@ void update_hero_state_machine(void) { HeroTableRow2C *rec = &D_L06_0017C3A8[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -729,13 +731,13 @@ void update_hero_state_machine(void) { if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -876,7 +878,7 @@ void update_hero_state_machine(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -942,7 +944,7 @@ void update_hero_state_machine(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -959,7 +961,7 @@ void update_hero_state_machine(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -1012,7 +1014,7 @@ void update_hero_state_machine(void) { case HERO_STATE_GRIND_ATTACK: case HERO_STATE_GRIND_COLLISION_RECOVERY: if (hero.state.current == 0x42) { - hero.unk5BE = 0; + hero.grind_hit = 0; } else { int ice = 0; @@ -1024,7 +1026,7 @@ void update_hero_state_machine(void) { } if (vector_length_xy(hero.motion.displacement.f) < vector_length_xy(hero.motion.velocity.f) * 0.5f || - ice || hero.unk5BE != 0) { + ice || hero.grind_hit != 0) { int ok = 1; if (current_level_index != LEVEL_KALEBO3) { @@ -1040,7 +1042,7 @@ void update_hero_state_machine(void) { ok = 0; } } - hero.unk5BE = 0; + hero.grind_hit = 0; if (hero.health.hp >= 2 && ok) { hero_set_state(0x42, 1); if (ice) { @@ -1140,7 +1142,7 @@ void update_hero_state_machine(void) { t = calculate_triangular_corrected_scalar( scratch_position, scratch_motion_vector, 0, hero.jump_gravity); hero.unk48C = t + 0.05f; - hero.unk430 = t; + hero.jump_height = t; hero.jump_gravity = hero.rail_jump_gravity; hero.jump_height_start = t; } @@ -1479,9 +1481,9 @@ void update_hero_state_machine(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -1624,7 +1626,7 @@ void update_hero_state_machine(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -1851,7 +1853,7 @@ void update_hero_state_machine(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -1878,9 +1880,10 @@ void update_hero_state_machine(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -2207,9 +2210,10 @@ void update_hero_state_machine(void) { hero.apex_anim_frame, trajectory_prediction_steps, 0.5f, -1.0f); break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, 0.5f, -1.0f); @@ -2270,7 +2274,7 @@ void update_hero_state_machine(void) { } } if (scale_game_frames(1) < hero.rail_land_frames) { - hero.unk2284 = 0; + hero.camera_mode = 0; stick_target(0, 1.0f); if (hero.target_speed > D_L06_0017C538.fC && hero.stick_magnitude > 0.5f && hero.on_slip_ground == 0 && hero.move_lock_timer == 0 && @@ -2663,7 +2667,7 @@ void update_hero_state_machine(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l06/mobys/alien_snapper.c b/src/overlays/l06/mobys/alien_snapper.c index 6ba008e36b..0fee5f0d22 100644 --- a/src/overlays/l06/mobys/alien_snapper.c +++ b/src/overlays/l06/mobys/alien_snapper.c @@ -875,7 +875,7 @@ void update_alien_snapper_hit_response_and_targeting(Moby *moby) { if (snapper_vars->f1AC != 0) { snapper_vars->f1A0 = l06_alien_snapper_base_targeting_radius + 6.0f; } else if (moby->state == ALIEN_SNAPPER_STATE_WAIT_FOR_ACTIVATION) { - if (moby == ((Moby *)hero.unk240) || moby == ((Moby *)hero.coll_hit_moby)) { + if (moby == ((Moby *)hero.wall_moby) || moby == ((Moby *)hero.coll_hit_moby)) { snapper_vars->f1A0 = 6.0f; } else { snapper_vars->f1A0 = 0.0f; diff --git a/src/overlays/l07/mobys/mine_group.c b/src/overlays/l07/mobys/mine_group.c index 59bf2821f5..67b58e1880 100644 --- a/src/overlays/l07/mobys/mine_group.c +++ b/src/overlays/l07/mobys/mine_group.c @@ -174,7 +174,7 @@ void reset_moby_from_class_defaults(struct Moby *moby) { moby->visible = 1; update_moby_grids(moby, 0x80807F7F); ((struct SpawnMobyView *)moby)->unk36 = 0x7F80; - moby->unk72 = 0xFF; + moby->lod_dist = 0xFF; moby->hit_slot = 0xFF; ((struct SpawnMobyView *)moby)->unk71 = 0xFF; moby->collision = ((struct SpawnClassView *)moby->pclass)->unk10; diff --git a/src/overlays/l08/hero/hero_set_state.c b/src/overlays/l08/hero/hero_set_state.c index 103e4fe361..640d129106 100644 --- a/src/overlays/l08/hero/hero_set_state.c +++ b/src/overlays/l08/hero/hero_set_state.c @@ -111,14 +111,14 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); } @@ -138,8 +138,8 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { request_hero_idle_state_for_vehicle_mode(); @@ -167,7 +167,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (animation_request_mode) { @@ -194,7 +194,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_request_mode) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -203,7 +203,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_DYING_SPEED_LIMITED: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.momentum, frame_time * 3.5f); @@ -214,15 +214,15 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_SINK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; - p->unk694 = p->motion.displacement.f[2] * 0.2f; - p->unk69C = p->water_surface_z - 0.37f; - if (p->unk694 < frame_time * -7.0f) - p->unk694 = frame_time * -7.0f; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.2f; + p->swim_water_level = p->water_surface_z - 0.37f; + if (p->swim_bob_velocity < frame_time * -7.0f) + p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (animation_request_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); break; @@ -230,7 +230,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_SWIM: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; *(int *)&p->drown_sink_speed = 0; if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -254,7 +254,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; p->unk8F4 = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -275,7 +275,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { int n; int t; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); p->rand_timer.range = 0x68; @@ -291,7 +291,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->splash_effect_timer = 0; if (p->state.prev_control_mode == HERO_MODE_SWIM) { emit_hero_surface_effect_burst(3, 0xA, 0); @@ -323,7 +323,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { } { struct Hero *q = &hero; - q->unk698 = 0; + q->swim_stroke_timer = 0; if (q->state.prev_control_mode == HERO_MODE_SWIM) { float d = (float)q->underwater_air; if (d < 2500.0f) { @@ -346,12 +346,12 @@ int hero_set_state(int requested_state, int animation_request_mode) { } { struct Hero *s = &hero; - s->unk694 = s->motion.displacement.f[2] * 0.37f; - if (s->unk694 < frame_time * -7.0f) - s->unk694 = frame_time * -7.0f; - s->unk69C = s->water_surface_z; + s->swim_bob_velocity = s->motion.displacement.f[2] * 0.37f; + if (s->swim_bob_velocity < frame_time * -7.0f) + s->swim_bob_velocity = frame_time * -7.0f; + s->swim_water_level = s->water_surface_z; s->unk6A0 = 0; - s->unk690 = s->motion.pos.f[2] - s->unk69C - -0.12f; + s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; FUN_L00_0025f730(&s->motion.momentum, frame_time * 5.5f); @@ -366,7 +366,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); p->item_select_blocked = 1; qcopy(&p->motion.velocity, &p->motion.displacement); @@ -399,9 +399,9 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; *(int *)&p->drown_sink_speed = 0; - p->unk698 = scale_game_frames(0x2D); + p->swim_stroke_timer = scale_game_frames(0x2D); p->rand_timer.range = 0x68; if (animation_request_mode) set_hero_animation(0x65, 0, (float)scale_game_frames(0x11)); @@ -411,7 +411,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; if (p->jump_button_frames > scale_game_frames(0x32)) { struct UsageStat *h = usage_stats.stat; @@ -451,7 +451,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_request_mode) @@ -462,9 +462,9 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L08_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = get_hero_idle_animation_index(1); if (p->moby->prev_seq != t && animation_request_mode) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -475,7 +475,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -484,7 +484,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -493,7 +493,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -506,7 +506,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -515,7 +515,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(1.0f, 0); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -539,7 +539,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { if (t->wading != 0 || t->state.current == 0x73) { t->state.current = 0x73; set_hero_animation(0x60, 0, (float)scale_game_frames(8)); - } else if (t->unk308 == 1 || t->state.current == 0x3F) { + } else if (t->magnetic_floor == 1 || t->state.current == 0x3F) { t->state.current = 0x3F; set_hero_animation(0x5B, 0, (float)scale_game_frames(8)); } else { @@ -571,7 +571,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_ANIMATION_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_request_mode) { if (p->state.prev == 4) { set_hero_animation(0x5E, 2, (float)scale_game_frames(5)); @@ -584,7 +584,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -604,7 +604,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VOICE_SLOT_CLEANUP_IDLE_EXIT: { struct Hero *p = &hero; p->state.control_mode = 0x10; - p->unk2284 = 3; + p->camera_mode = 3; p->item_select_blocked = 1; fill_transfer_words((char *)p + 0x9D0, 0, 0x20); qcopy(&p->motion.momentum, &p->motion.displacement); @@ -615,7 +615,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { hero_set_state(HERO_STATE_SLIP, 1); @@ -644,7 +644,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; char *v = (char *)&p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (animation_request_mode) { @@ -659,7 +659,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -688,7 +688,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -710,7 +710,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -721,7 +721,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -734,7 +734,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -749,7 +749,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; *(char **)&p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -775,7 +775,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], q->swing_target_moby->pos.y - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); + q->swing_rope_length = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -795,7 +795,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_request_mode) @@ -806,7 +806,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -820,7 +820,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { int seg; float t; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 3; + p->camera_mode = 3; p->rand_timer.range = 0x68; p->rail_off_frames = 0; p->grind_direction = 1; @@ -869,7 +869,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -889,7 +889,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (animation_request_mode) @@ -899,7 +899,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_request_mode) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -908,7 +908,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_request_mode) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -917,7 +917,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_request_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -927,12 +927,12 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -962,9 +962,9 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; int animation_timing_profile_selector = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -979,7 +979,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { int animation_timing_selector = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -1018,9 +1018,9 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)&hero.motion.velocity; @@ -1038,7 +1038,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *u = &hero; u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -1061,7 +1061,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1069,13 +1069,13 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1083,29 +1083,30 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; u->unk48C = 1.98f; - u->unk430 = 1.95f; + u->jump_height = 1.95f; } else { gravity_set_z( (float *)(&u->motion.velocity), (float *)(&u->motion.velocity), 0.0f); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(2); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(2); + u->velocity_keys_end_frame = + scale_game_frames(0x23) + u->velocity_keys_start_frame; u->keyed_move_target_frame = 0.0f; u->unk3DC = 18.0f; u->keyed_anim_target_frame = scale_game_frames(0x28); - u->unk3E4 = hero_water_surface_jump_velocity_keys; + u->velocity_keys = hero_water_surface_jump_velocity_keys; } { struct Hero *w = &hero; w->item_select_blocked = 1; } } else if (u->state.current == 0x29) { - u->unk430 = 2.4f; + u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1113,14 +1114,14 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.45f; u->jump_height_start = 2.4f; - u->unk498 = scale_game_frames(0x11); + u->jump_ramp_frames = scale_game_frames(0x11); u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; u->jump_gravity = frame_time_sq * 27.0f; if (u->selector_5 != 0) { float k = 4.7f; *(u128 *)grind_vector_scratch = 0; - u->unk430 = u->unk430 + k; + u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; u->unk48C = u->unk48C + k; u->jump_gravity = frame_time_sq * 14.0f; @@ -1129,13 +1130,13 @@ int hero_set_state(int requested_state, int animation_request_mode) { grind_vector_scratch[2] = 145.0f; if (fast_vec_dist(&u->motion.pos, grind_vector_scratch) < 10.0f) { k = 0.7f; - u->unk430 = u->unk430 + k; + u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; u->unk48C = u->unk48C + k; } } } else if (u->state.current == 0x2A) { - u->unk430 = 2.5f; + u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1143,12 +1144,12 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.55f; u->jump_height_start = 2.5f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; u->jump_gravity = frame_time_sq * 24.0f; } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1156,13 +1157,13 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1170,7 +1171,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -1178,7 +1179,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1186,8 +1187,8 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(((int)u->moby), x); @@ -1202,7 +1203,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -1210,14 +1211,14 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; *(int *)&u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -1225,16 +1226,16 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -1242,7 +1243,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -1250,15 +1251,15 @@ int hero_set_state(int requested_state, int animation_request_mode) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - u->unk3E4 = hero_transform_trail_jump_velocity_keys; + u->velocity_keys = hero_transform_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -1266,7 +1267,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -1274,17 +1275,18 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != FALSE) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L08_0015F6E8; + w->velocity_keys = D_L08_0015F6E8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -1296,15 +1298,15 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1312,7 +1314,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -1335,7 +1337,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (animation_request_mode) { int s = q->state.current; if (s == 7) { @@ -1415,10 +1417,10 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; *(int *)&p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1431,7 +1433,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1569,7 +1571,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_ATTACK_RECORD_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x70) { int v = 5; if (D_L08_0017C428[p->attack_record].kind == 0) @@ -1596,7 +1598,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_GRIND_ATTACK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x2B) { p->attack_record = p->attack_record == 0; } else { @@ -1616,7 +1618,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (animation_request_mode) { char *m; @@ -1636,7 +1638,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (animation_request_mode) @@ -1647,9 +1649,9 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1672,7 +1674,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_request_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -1680,7 +1682,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_request_mode) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -1690,7 +1692,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_request_mode) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -1699,7 +1701,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1710,7 +1712,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { char *v = (char *)&p->motion.resolved_velocity; struct Hero *hero_base; @@ -1728,7 +1730,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_request_mode) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -1737,7 +1739,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -1753,7 +1755,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -1772,13 +1774,13 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != get_hero_idle_animation_index(1)) { @@ -1789,7 +1791,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } @@ -1797,7 +1799,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; @@ -1805,14 +1807,14 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -1823,7 +1825,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -1864,7 +1866,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } diff --git a/src/overlays/l08/hero/update_hero_motion_for_current_state.c b/src/overlays/l08/hero/update_hero_motion_for_current_state.c index e84f5ff86f..479e9c17cd 100644 --- a/src/overlays/l08/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l08/hero/update_hero_motion_for_current_state.c @@ -50,7 +50,7 @@ void apply_hero_ground_type_effects(void) { hero_ptr->ground_sound_class = saved; hero_ptr->ground_type = -1; hero_ptr->wading = 0; - hero_ptr->unk308 = 0; + hero_ptr->magnetic_floor = 0; if (saved_ground_type == -1) return; if (saved_ground_type == HERO_GROUND_TYPE_MAGNET) { @@ -59,7 +59,7 @@ void apply_hero_ground_type_effects(void) { if (hero_ptr->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { char *item_moby = ((char *)hero_ptr->items[1].moby); if (item_moby != 0 && MOBY(item_moby)->oclass == 0xAD) - hero_ptr->unk308 = 1; + hero_ptr->magnetic_floor = 1; } } } @@ -418,7 +418,7 @@ void update_hero_motion_for_current_state(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { vector_and_attack_descriptor_scratch.q = 0; vector_and_attack_descriptor_scratch.f[0] = 1.0f; transform_vector_by_basis(&hero.motion.move_dir, @@ -961,9 +961,9 @@ void update_hero_motion_for_current_state(void) { } } turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - fast_dec_timer(&hero.unk698); + fast_dec_timer(&hero.swim_stroke_timer); if (hero.state.current == 0x36) { - if (PD.no_direction != 0 && hero.unk698 != 0) { + if (PD.no_direction != 0 && hero.swim_stroke_timer != 0) { hero.target_speed = frame_time * 3.0f; } if (absolute_float(hero.motion.yaw_error) > 0.7853982f) { @@ -1178,7 +1178,7 @@ void update_hero_motion_for_current_state(void) { if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->u10.f18.v)) { above = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (above && scale_game_frames(40) < hero.state_timer) { if (hero.stick_magnitude > 0.25f) { f32 s; @@ -1195,7 +1195,7 @@ void update_hero_motion_for_current_state(void) { } } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < hero.unk9A0 * 1.57f || @@ -1236,18 +1236,18 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&vD0, &vD0, &hero.motion.pos); fast_vec_add(&movement_vector_scratch, &vD0, &hero.motion.velocity); fast_vec_sub(&vC0, &movement_vector_scratch, &MV(hero.swing_target_moby)->u10.v10); - fast_vec_normalize(&vC0, &vC0, hero.unk9A4); + fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&movement_vector_scratch, &MV(hero.swing_target_moby)->u10.v10, &vC0); fast_vec_sub(&hero.motion.velocity, &movement_vector_scratch, &vD0); - old = hero.unk9A4; - vendor_spring(&hero.unk9A4, + old = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - old; - if (fast_vec_length(&vC0) > hero.unk9A4) { + d = hero.swing_rope_length - old; + if (fast_vec_length(&vC0) > hero.swing_rope_length) { fast_vec_normalize(&vC0, &vC0, d); fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vC0); } @@ -1269,7 +1269,7 @@ void update_hero_motion_for_current_state(void) { &hero.motion.velocity, &hero.motion.velocity, &movement_vector_scratch); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0) { + if (hero.swing_hooked != 0 && hero.air_frames.s != 0) { if ((vz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0) { f32 t; s32 up; @@ -1428,7 +1428,7 @@ void update_hero_motion_for_current_state(void) { if (!jumping) { if (hero.heading_locked != 0 || MV(hero.melee_target) != NULL) { s32 ok = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { f32 d = fast_subtract_rotations(hero.attack_target_yaw, hero.motion.rot.f[2]); f32 a = compute_directed_angle_delta( 1, hero.attack_target_yaw, hero.motion.rot.f[2]); @@ -1780,9 +1780,9 @@ void update_hero_motion_for_current_state(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0 && + if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } update_hero_target_speed_from_stick(); if (hero.unk930 > 0.0f) { @@ -1796,7 +1796,7 @@ void update_hero_motion_for_current_state(void) { clear_u64_value(move_impulse_ptr); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { f32 turn_response_level = hero.stick_magnitude; @@ -1824,7 +1824,7 @@ void update_hero_motion_for_current_state(void) { { f32 a = frame_time_sq * 7.5f * k; f32 b = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { f32 m = 2.6179938f - hero.motion.yaw_error; if (m > 1.0f) { m = 1.0f; @@ -1837,13 +1837,13 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } clip_hero_horizontal_velocity(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -1970,7 +1970,7 @@ void update_hero_motion_for_current_state(void) { } flag = 0; if (has) { - flag = hero.unk20AA != 0; + flag = hero.weapon_up != 0; } moby_point_position(MV(hero.moby), 9, &hero.joint9_world_pos); moby_point_position(MV(hero.moby), 0xE, &hero.joint14_world_pos); @@ -2633,7 +2633,7 @@ void update_hero_motion_for_current_state(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -2878,7 +2878,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l08/hero/update_hero_state_transitions.c b/src/overlays/l08/hero/update_hero_state_transitions.c index f80d3811f4..46c0bb021f 100644 --- a/src/overlays/l08/hero/update_hero_state_transitions.c +++ b/src/overlays/l08/hero/update_hero_state_transitions.c @@ -266,8 +266,8 @@ void update_hero_state_transitions(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || item_available[0x1C] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || item_available[0x1C] == 0) { hero_set_state(0x81, 1); break; } @@ -325,7 +325,7 @@ void update_hero_state_transitions(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (((unsigned char *)hero.moby)[0x53] == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -357,7 +357,7 @@ void update_hero_state_transitions(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -401,7 +401,7 @@ void update_hero_state_transitions(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -412,7 +412,7 @@ void update_hero_state_transitions(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -432,7 +432,8 @@ void update_hero_state_transitions(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L08_001675D8) > 1.2217305f) { @@ -578,7 +579,7 @@ void update_hero_state_transitions(void) { } } hero.item_select_blocked = 1; - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0) || (item_available[4] != 0 && pad_pressed_within(0xA, scale_game_frames(7), 0))) { @@ -609,7 +610,7 @@ void update_hero_state_transitions(void) { break; } } - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { if (item_available[4] != 0 && (controller_state.held & 0xA)) { hero_set_state(0x35, 1); @@ -626,7 +627,7 @@ void update_hero_state_transitions(void) { hero.motion.displacement.f[2] = 0.0f; } if (0.1f > hero.stick_magnitude && hero.ground_speed == 0.0f && - hero.unk698 == 0) { + hero.swim_stroke_timer == 0) { hero_set_state(0x37, 1); } break; @@ -661,7 +662,7 @@ void update_hero_state_transitions(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -763,7 +764,8 @@ void update_hero_state_transitions(void) { HeroTableRow2C *rec = &D_L08_0017C428[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -871,7 +873,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_RUN, 1); } } - if (hero.state.current == HERO_STATE_RUN && hero.unk308 != 0) { + if (hero.state.current == HERO_STATE_RUN && hero.magnetic_floor != 0) { hero_set_state(0x3F, 1); } if (hero.grind_rail != 0) { @@ -881,13 +883,13 @@ void update_hero_state_transitions(void) { if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -1027,7 +1029,7 @@ void update_hero_state_transitions(void) { if (hero.selector_4 != 0) { break; } - if (hero.unk1E0 != 0) { + if (hero.sinking_floor_hold != 0) { break; } if (hero.voice_slot2 != -1) { @@ -1106,7 +1108,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -1173,7 +1175,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -1190,7 +1192,7 @@ void update_hero_state_transitions(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -1243,7 +1245,7 @@ void update_hero_state_transitions(void) { case HERO_STATE_GRIND_ATTACK: case HERO_STATE_GRIND_COLLISION_RECOVERY: if (hero.state.current == 0x42) { - hero.unk5BE = 0; + hero.grind_hit = 0; } else { int ice = 0; @@ -1255,7 +1257,7 @@ void update_hero_state_transitions(void) { } if (vector_length_xy(hero.motion.displacement.f) < vector_length_xy(hero.motion.velocity.f) * 0.5f || - ice || hero.unk5BE != 0) { + ice || hero.grind_hit != 0) { int ok = 1; if (current_level_index != LEVEL_KALEBO3) { @@ -1272,7 +1274,7 @@ void update_hero_state_transitions(void) { ok = 0; } } - hero.unk5BE = 0; + hero.grind_hit = 0; if (hero.health.hp >= 2 && ok) { hero_set_state(0x42, 1); if (ice) { @@ -1372,7 +1374,7 @@ void update_hero_state_transitions(void) { t = calculate_triangular_corrected_scalar( position_scratch, movement_query_scratch, 0, hero.jump_gravity); hero.unk48C = t + 0.05f; - hero.unk430 = t; + hero.jump_height = t; hero.jump_gravity = hero.rail_jump_gravity; hero.jump_height_start = t; } @@ -1711,9 +1713,9 @@ void update_hero_state_transitions(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -1855,7 +1857,7 @@ void update_hero_state_transitions(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -2082,7 +2084,7 @@ void update_hero_state_transitions(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -2109,9 +2111,10 @@ void update_hero_state_transitions(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -2469,7 +2472,7 @@ void update_hero_state_transitions(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l08/mobys/shuttle.c b/src/overlays/l08/mobys/shuttle.c index 5004e8a382..c5eb407f76 100644 --- a/src/overlays/l08/mobys/shuttle.c +++ b/src/overlays/l08/mobys/shuttle.c @@ -154,7 +154,7 @@ void shuttle_update(struct Moby *moby) { break; case SHUTTLE_STATE_TRAVEL: hero.jump_lock_timer = 5; - hero.unk1F4 = 5; + hero.edge_brake_lock_timer = 5; hero.path_constrain_pending = shuttle_vars->stop; if (advance_shuttle_path_travel((char *)moby)) { select_shuttle_route_for_hero((char *)moby); diff --git a/src/overlays/l08/mobys/water_surface.c b/src/overlays/l08/mobys/water_surface.c index a214c8fc23..013b72862a 100644 --- a/src/overlays/l08/mobys/water_surface.c +++ b/src/overlays/l08/mobys/water_surface.c @@ -54,9 +54,9 @@ void water_surface_update(struct Moby *moby) { return; if (!(water_entry_plane_data[2] <= hero.motion.pos.f[2] - hero.motion.displacement.f[2])) return; - if (voice_is_playing(hero.moby, hero.health.unk22B2)) { - release_voice_slot(hero.health.unk22B2); - hero.health.unk22B2 = -1; + if (voice_is_playing(hero.moby, hero.health.fall_voice_slot)) { + release_voice_slot(hero.health.fall_voice_slot); + hero.health.fall_voice_slot = -1; } qcopy(&pos, &hero.motion.pos); pos.f[2] = water_entry_plane_data[2]; diff --git a/src/overlays/l10/mobys/toxic_crab.c b/src/overlays/l10/mobys/toxic_crab.c index 88548bc59c..d2394a1f50 100644 --- a/src/overlays/l10/mobys/toxic_crab.c +++ b/src/overlays/l10/mobys/toxic_crab.c @@ -1248,7 +1248,7 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { if (moby_data->target_range_boost_timer_frames != 0) { moby_data->f1A0 = D_L10_00161E40_gp + 6.0f; } else if (moby->state == TOXIC_CRAB_STATE_WAIT_FOR_ACTIVATION) { - if (moby == ((Moby *)((Hero *)(((char *)&hero)))->unk240) || + if (moby == ((Moby *)((Hero *)(((char *)&hero)))->wall_moby) || moby == ((Moby *)((Hero *)(((char *)&hero)))->coll_hit_moby)) { moby_data->f1A0 = 6.0f; } else { diff --git a/src/overlays/l11/hero/hero_set_state.c b/src/overlays/l11/hero/hero_set_state.c index f7208da3b1..1466f6720a 100644 --- a/src/overlays/l11/hero/hero_set_state.c +++ b/src/overlays/l11/hero/hero_set_state.c @@ -107,14 +107,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); } @@ -134,8 +134,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { request_hero_idle_state_for_vehicle_mode(); @@ -163,7 +163,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (animation_update_mode) { @@ -190,7 +190,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -199,7 +199,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_DYING_SPEED_LIMITED: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.momentum, frame_time * 3.5f); @@ -210,15 +210,15 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SINK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; - p->unk694 = p->motion.displacement.f[2] * 0.2f; - p->unk69C = p->water_surface_z - 0.37f; - if (p->unk694 < frame_time * -7.0f) - p->unk694 = frame_time * -7.0f; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.2f; + p->swim_water_level = p->water_surface_z - 0.37f; + if (p->swim_bob_velocity < frame_time * -7.0f) + p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (animation_update_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); break; @@ -226,7 +226,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SWIM: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; *(int *)&p->drown_sink_speed = 0; if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -250,7 +250,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; p->unk8F4 = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -270,7 +270,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); p->rand_timer.range = 0x68; @@ -285,7 +285,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->splash_effect_timer = 0; if (p->state.prev_control_mode == HERO_MODE_SWIM) { emit_hero_surface_effect_burst(3, 0xA, 0); @@ -314,7 +314,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } { struct Hero *q = &hero; - q->unk698 = 0; + q->swim_stroke_timer = 0; if (q->state.prev_control_mode == HERO_MODE_SWIM) { if ((float)q->underwater_air < 2500.0f) { help_queue_add(8, scale_game_frames(0x1E), 0); @@ -335,12 +335,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { } { struct Hero *s = &hero; - s->unk694 = s->motion.displacement.f[2] * 0.37f; - if (s->unk694 < frame_time * -7.0f) - s->unk694 = frame_time * -7.0f; - s->unk69C = s->water_surface_z; + s->swim_bob_velocity = s->motion.displacement.f[2] * 0.37f; + if (s->swim_bob_velocity < frame_time * -7.0f) + s->swim_bob_velocity = frame_time * -7.0f; + s->swim_water_level = s->water_surface_z; s->unk6A0 = 0; - s->unk690 = s->motion.pos.f[2] - s->unk69C - -0.12f; + s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; FUN_L00_0025f730(&s->motion.momentum, frame_time * 5.5f); @@ -355,7 +355,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); p->item_select_blocked = 1; qcopy(&p->motion.velocity, &p->motion.displacement); @@ -389,9 +389,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; *(int *)&p->drown_sink_speed = 0; - p->unk698 = scale_game_frames(0x2D); + p->swim_stroke_timer = scale_game_frames(0x2D); p->rand_timer.range = 0x68; if (animation_update_mode) set_hero_animation(0x65, 0, (float)scale_game_frames(0x11)); @@ -401,7 +401,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; if (p->jump_button_frames > scale_game_frames(0x32)) { struct UsageStat *h = usage_stats.stat; @@ -443,7 +443,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_update_mode) @@ -453,7 +453,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case 0x38: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(0x46, 0, (float)scale_game_frames(8)); break; @@ -461,7 +461,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case 0x39: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(0x47, 0, (float)scale_game_frames(8)); break; @@ -469,7 +469,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ANIMATION_WAIT_TO_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(0x48, 0, (float)scale_game_frames(8)); break; @@ -478,9 +478,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L11_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = get_hero_idle_animation_index(1); if (p->moby->prev_seq != t && animation_update_mode) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -491,7 +491,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -500,7 +500,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -509,7 +509,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -522,7 +522,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -531,7 +531,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(1.0f, 0); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -584,7 +584,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -604,7 +604,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { hero_set_state(HERO_STATE_SLIP, 1); @@ -633,7 +633,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *v = (char *)&p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (animation_update_mode) { @@ -648,7 +648,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -677,7 +677,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -699,7 +699,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -710,7 +710,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -723,7 +723,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -738,7 +738,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; *(char **)&p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -764,7 +764,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], q->swing_target_moby->pos.y - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); + q->swing_rope_length = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -784,7 +784,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_update_mode) @@ -795,7 +795,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -806,7 +806,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -826,7 +826,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (animation_update_mode) @@ -836,7 +836,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_update_mode) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -845,7 +845,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_update_mode) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -854,7 +854,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -864,12 +864,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -899,9 +899,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; int state_81_animation_timing_override = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -916,7 +916,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { int animation_timing_override = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -955,9 +955,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)&hero.motion.velocity; @@ -975,7 +975,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *u = &hero; u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -998,7 +998,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1006,13 +1006,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1020,29 +1020,30 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; u->unk48C = 1.98f; - u->unk430 = 1.95f; + u->jump_height = 1.95f; } else { gravity_set_z( (float *)(&u->motion.velocity), (float *)(&u->motion.velocity), 0.0f); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(2); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(2); + u->velocity_keys_end_frame = + scale_game_frames(0x23) + u->velocity_keys_start_frame; u->keyed_move_target_frame = 0.0f; u->unk3DC = 18.0f; u->keyed_anim_target_frame = scale_game_frames(0x28); - u->unk3E4 = level_11_water_surface_jump_velocity_keys; + u->velocity_keys = level_11_water_surface_jump_velocity_keys; } { struct Hero *w = &hero; w->item_select_blocked = 1; } } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1050,13 +1051,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1064,7 +1065,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -1072,7 +1073,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1080,8 +1081,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(((int)u->moby), x); @@ -1096,7 +1097,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -1104,14 +1105,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; *(int *)&u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -1119,16 +1120,16 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -1136,7 +1137,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -1144,15 +1145,15 @@ int hero_set_state(int requested_state, int animation_update_mode) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - u->unk3E4 = level_11_trail_jump_velocity_keys; + u->velocity_keys = level_11_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -1160,7 +1161,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -1168,17 +1169,18 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L11_0015F6E8; + w->velocity_keys = D_L11_0015F6E8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -1190,15 +1192,15 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1206,7 +1208,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -1229,7 +1231,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (animation_update_mode) { int s = q->state.current; if (s == 7) { @@ -1298,10 +1300,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; *(int *)&p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1314,7 +1316,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1452,7 +1454,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (animation_update_mode) { char *m; @@ -1472,7 +1474,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (animation_update_mode) @@ -1483,9 +1485,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1508,7 +1510,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -1516,7 +1518,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -1526,7 +1528,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -1535,7 +1537,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1546,7 +1548,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { char *v = (char *)&p->motion.resolved_velocity; struct Hero *hero_base; @@ -1564,7 +1566,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -1573,7 +1575,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -1589,7 +1591,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -1608,13 +1610,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != get_hero_idle_animation_index(1)) { @@ -1625,7 +1627,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } @@ -1633,7 +1635,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; @@ -1641,14 +1643,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -1659,7 +1661,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -1686,7 +1688,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } diff --git a/src/overlays/l11/hero/update_hero_motion_by_state.c b/src/overlays/l11/hero/update_hero_motion_by_state.c index e1a6fc78b8..c133e3e98d 100644 --- a/src/overlays/l11/hero/update_hero_motion_by_state.c +++ b/src/overlays/l11/hero/update_hero_motion_by_state.c @@ -47,7 +47,7 @@ void update_hero_surface_condition_flags(void) { hero_object_ptr->ground_sound_class = saved; hero_object_ptr->ground_type = -1; hero_object_ptr->wading = 0; - hero_object_ptr->unk308 = 0; + hero_object_ptr->magnetic_floor = 0; if (state == -1) return; if (state == HERO_GROUND_TYPE_MAGNETIC) { @@ -56,7 +56,7 @@ void update_hero_surface_condition_flags(void) { if (hero_object_ptr->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { if (((int)hero_object_ptr->items[1].moby) != 0 && *(short *)(((int)hero_object_ptr->items[1].moby) + 0xA6) == 0xAD) - hero_object_ptr->unk308 = 1; + hero_object_ptr->magnetic_floor = 1; } } } @@ -401,7 +401,7 @@ void update_hero_motion_by_state(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { vector_and_hit_descriptor_head_scratch.q = 0; vector_and_hit_descriptor_head_scratch.f[0] = 1.0f; transform_vector_by_basis(&hero.motion.move_dir, @@ -945,9 +945,9 @@ void update_hero_motion_by_state(void) { } } turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - fast_dec_timer(&hero.unk698); + fast_dec_timer(&hero.swim_stroke_timer); if (hero.state.current == 0x36) { - if (PD.no_direction != 0 && hero.unk698 != 0) { + if (PD.no_direction != 0 && hero.swim_stroke_timer != 0) { hero.target_speed = frame_time * 3.0f; } if (absolute_float(hero.motion.yaw_error) > 0.7853982f) { @@ -1184,7 +1184,7 @@ void update_hero_motion_by_state(void) { if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->u10.f18.v)) { above = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (above && scale_game_frames(40) < hero.state_timer) { if (hero.stick_magnitude > 0.25f) { f32 s; @@ -1201,7 +1201,7 @@ void update_hero_motion_by_state(void) { } } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < hero.unk9A0 * 1.57f || @@ -1242,18 +1242,18 @@ void update_hero_motion_by_state(void) { fast_vec_add(&vD0, &vD0, &hero.motion.pos); fast_vec_add(&motion_vector_scratch, &vD0, &hero.motion.velocity); fast_vec_sub(&vC0, &motion_vector_scratch, &MV(hero.swing_target_moby)->u10.v10); - fast_vec_normalize(&vC0, &vC0, hero.unk9A4); + fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&motion_vector_scratch, &MV(hero.swing_target_moby)->u10.v10, &vC0); fast_vec_sub(&hero.motion.velocity, &motion_vector_scratch, &vD0); - old = hero.unk9A4; - vendor_spring(&hero.unk9A4, + old = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - old; - if (fast_vec_length(&vC0) > hero.unk9A4) { + d = hero.swing_rope_length - old; + if (fast_vec_length(&vC0) > hero.swing_rope_length) { fast_vec_normalize(&vC0, &vC0, d); fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vC0); } @@ -1274,7 +1274,7 @@ void update_hero_motion_by_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &motion_vector_scratch); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0) { + if (hero.swing_hooked != 0 && hero.air_frames.s != 0) { if ((vz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0) { f32 t; s32 up; @@ -1431,7 +1431,7 @@ void update_hero_motion_by_state(void) { if (!jumping) { if (hero.heading_locked != 0 || MV(hero.melee_target) != NULL) { s32 ok = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { f32 d = fast_subtract_rotations(hero.attack_target_yaw, hero.motion.rot.f[2]); f32 a = compute_directed_angle_delta( 1, hero.attack_target_yaw, hero.motion.rot.f[2]); @@ -1735,9 +1735,9 @@ void update_hero_motion_by_state(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0 && + if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } hero_speed_from_table(); if (hero.unk930 > 0.0f) { @@ -1751,7 +1751,7 @@ void update_hero_motion_by_state(void) { clear_u64_value(move_impulse_ptr); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { f32 turn_response_factor = hero.stick_magnitude; @@ -1779,7 +1779,7 @@ void update_hero_motion_by_state(void) { { f32 a = frame_time_sq * 7.5f * k; f32 b = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { f32 m = 2.6179938f - hero.motion.yaw_error; if (m > 1.0f) { m = 1.0f; @@ -1792,13 +1792,13 @@ void update_hero_motion_by_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } clip_hero_horizontal_velocity(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -2104,7 +2104,7 @@ void update_hero_motion_by_state(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -2349,7 +2349,7 @@ void update_hero_motion_by_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l11/hero/update_hero_state_transitions.c b/src/overlays/l11/hero/update_hero_state_transitions.c index 7048f89ff5..36f8c79bba 100644 --- a/src/overlays/l11/hero/update_hero_state_transitions.c +++ b/src/overlays/l11/hero/update_hero_state_transitions.c @@ -234,8 +234,8 @@ void update_hero_state_transitions(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || item_available[0x1C] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || item_available[0x1C] == 0) { hero_set_state(0x81, 1); break; } @@ -292,7 +292,7 @@ void update_hero_state_transitions(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (hero.moby->prev_seq == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -323,7 +323,7 @@ void update_hero_state_transitions(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -367,7 +367,7 @@ void update_hero_state_transitions(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -378,7 +378,7 @@ void update_hero_state_transitions(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -393,7 +393,8 @@ void update_hero_state_transitions(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L11_001677D8) > 1.2217305f) { @@ -539,7 +540,7 @@ void update_hero_state_transitions(void) { } } hero.item_select_blocked = 1; - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0) || (item_available[4] != 0 && pad_pressed_within(0xA, scale_game_frames(7), 0))) { @@ -570,7 +571,7 @@ void update_hero_state_transitions(void) { break; } } - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { if (item_available[4] != 0 && (controller_state.held & 0xA)) { hero_set_state(0x35, 1); @@ -587,7 +588,7 @@ void update_hero_state_transitions(void) { hero.motion.displacement.f[2] = 0.0f; } if (0.1f > hero.stick_magnitude && hero.ground_speed == 0.0f && - hero.unk698 == 0) { + hero.swim_stroke_timer == 0) { hero_set_state(0x37, 1); } break; @@ -633,7 +634,7 @@ void update_hero_state_transitions(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (hero.moby->prev_seq != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -735,7 +736,8 @@ void update_hero_state_transitions(void) { HeroTableRow2C *rec = &D_L11_0017C628[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -846,13 +848,13 @@ void update_hero_state_transitions(void) { if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -994,7 +996,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -1061,7 +1063,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -1078,7 +1080,7 @@ void update_hero_state_transitions(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -1247,9 +1249,9 @@ void update_hero_state_transitions(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -1387,7 +1389,7 @@ void update_hero_state_transitions(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -1609,7 +1611,7 @@ void update_hero_state_transitions(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -1636,9 +1638,10 @@ void update_hero_state_transitions(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -1991,7 +1994,7 @@ void update_hero_state_transitions(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (hero.moby->prev_seq != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l11/mobys/jet_fighter.c b/src/overlays/l11/mobys/jet_fighter.c index 18982c3264..73e89ed8d3 100644 --- a/src/overlays/l11/mobys/jet_fighter.c +++ b/src/overlays/l11/mobys/jet_fighter.c @@ -1452,7 +1452,7 @@ void jet_fighter_update(struct Moby *moby) { ship_vars->fB8 = 0.0f; g->moby->collision_disable = -1; moby->scale = moby->pclass->scale * D_L11_0016208C; - g->unk20A5 = 1; + g->hidden = 1; } break; case JET_FIGHTER_STATE_FLIGHT: @@ -1482,7 +1482,7 @@ void jet_fighter_update(struct Moby *moby) { case JET_FIGHTER_STATE_DISMOUNT: { char *p; struct Hero *g = &hero; - g->unk20A5 = 0; + g->hidden = 0; g->moby->collision_disable = 0; FUN_L11_0024db50(0, 1); jet_end_mount(0); @@ -1532,7 +1532,7 @@ void jet_fighter_update(struct Moby *moby) { if (ship_vars->fade >= 1.0f) { char *p; struct Hero *g = &hero; - g->unk20A5 = 0; + g->hidden = 0; g->moby->collision_disable = 0; FUN_L11_0024db50(0, 1); jet_end_mount(0); diff --git a/src/overlays/l12/hero/hero_set_state.c b/src/overlays/l12/hero/hero_set_state.c index ed3f293383..59ea5cddef 100644 --- a/src/overlays/l12/hero/hero_set_state.c +++ b/src/overlays/l12/hero/hero_set_state.c @@ -108,14 +108,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); } @@ -135,8 +135,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { request_hero_idle_state_for_vehicle_mode(); @@ -170,7 +170,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (entry_animation_mode) { @@ -196,7 +196,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -205,7 +205,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DYING_SPEED_LIMITED: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.momentum, frame_time * 3.5f); @@ -216,15 +216,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SINK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; - p->unk694 = p->motion.displacement.f[2] * 0.2f; - p->unk69C = p->water_surface_z - 0.37f; - if (p->unk694 < frame_time * -7.0f) - p->unk694 = frame_time * -7.0f; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.2f; + p->swim_water_level = p->water_surface_z - 0.37f; + if (p->swim_bob_velocity < frame_time * -7.0f) + p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (entry_animation_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); break; @@ -232,7 +232,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SWIM: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; *(int *)&p->drown_sink_speed = 0; if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -256,7 +256,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; p->unk8F4 = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -276,7 +276,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); p->rand_timer.range = 0x68; @@ -291,7 +291,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->splash_effect_timer = 0; if (p->state.prev_control_mode == HERO_MODE_SWIM) { emit_hero_surface_effect_burst(3, 0xA, 0); @@ -320,7 +320,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *q = &hero; - q->unk698 = 0; + q->swim_stroke_timer = 0; if (q->state.prev_control_mode == HERO_MODE_SWIM) { if ((float)q->underwater_air < 2500.0f) { help_queue_add(8, scale_game_frames(0x1E), 0); @@ -341,12 +341,12 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *s = &hero; - s->unk694 = s->motion.displacement.f[2] * 0.37f; - if (s->unk694 < frame_time * -7.0f) - s->unk694 = frame_time * -7.0f; - s->unk69C = s->water_surface_z; + s->swim_bob_velocity = s->motion.displacement.f[2] * 0.37f; + if (s->swim_bob_velocity < frame_time * -7.0f) + s->swim_bob_velocity = frame_time * -7.0f; + s->swim_water_level = s->water_surface_z; s->unk6A0 = 0; - s->unk690 = s->motion.pos.f[2] - s->unk69C - -0.12f; + s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; FUN_L00_0025f730(&s->motion.momentum, frame_time * 5.5f); @@ -361,7 +361,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); p->item_select_blocked = 1; qcopy(&p->motion.velocity, &p->motion.displacement); @@ -395,9 +395,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; *(int *)&p->drown_sink_speed = 0; - p->unk698 = scale_game_frames(0x2D); + p->swim_stroke_timer = scale_game_frames(0x2D); p->rand_timer.range = 0x68; if (entry_animation_mode) set_hero_animation(0x65, 0, (float)scale_game_frames(0x11)); @@ -407,7 +407,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; if (p->jump_button_frames > scale_game_frames(0x32)) { struct UsageStat *h = usage_stats.stat; @@ -449,7 +449,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) @@ -459,7 +459,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case 0x38: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) set_hero_animation(0x46, 0, (float)scale_game_frames(8)); break; @@ -467,7 +467,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case 0x39: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) set_hero_animation(0x47, 0, (float)scale_game_frames(8)); break; @@ -475,7 +475,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ANIMATION_WAIT_TO_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) set_hero_animation(0x48, 0, (float)scale_game_frames(8)); break; @@ -484,9 +484,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L12_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = hero_get_gadget_anim_id(1); if (p->moby->prev_seq != t && entry_animation_mode) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -497,7 +497,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -506,7 +506,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -515,7 +515,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -529,7 +529,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -538,7 +538,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(1.0f, 0); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -570,7 +570,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (t->wading != 0 || t->state.current == 0x73) { t->state.current = 0x73; set_hero_animation(0x60, 0, (float)scale_game_frames(8)); - } else if (t->unk308 == 1 || t->state.current == 0x3F) { + } else if (t->magnetic_floor == 1 || t->state.current == 0x3F) { t->state.current = 0x3F; set_hero_animation(0x5B, 0, (float)scale_game_frames(8)); } else { @@ -602,7 +602,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ANIMATION_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) { if (p->state.prev == 4) { set_hero_animation(0x5E, 2, (float)scale_game_frames(5)); @@ -615,7 +615,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -635,7 +635,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_ice_ground != 0) { hero_set_state(0x2F, 1); @@ -667,7 +667,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *v = (char *)&p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (entry_animation_mode) { @@ -682,7 +682,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -711,7 +711,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -733,7 +733,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -744,7 +744,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -757,7 +757,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -772,7 +772,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; *(char **)&p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -798,7 +798,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], q->swing_target_moby->pos.y - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); + q->swing_rope_length = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -818,7 +818,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) @@ -829,7 +829,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -840,7 +840,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -860,7 +860,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (entry_animation_mode) @@ -870,7 +870,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (entry_animation_mode) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -879,7 +879,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (entry_animation_mode) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -888,7 +888,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -898,12 +898,12 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -933,9 +933,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int animation_blend_selector = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -950,7 +950,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { int animation_blend_selector = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -989,9 +989,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)&hero.motion.velocity; @@ -1009,7 +1009,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *u = &hero; u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -1032,7 +1032,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1040,13 +1040,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1054,29 +1054,30 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; u->unk48C = 1.98f; - u->unk430 = 1.95f; + u->jump_height = 1.95f; } else { gravity_set_z( (float *)(&u->motion.velocity), (float *)(&u->motion.velocity), 0.0f); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(2); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(2); + u->velocity_keys_end_frame = + scale_game_frames(0x23) + u->velocity_keys_start_frame; u->keyed_move_target_frame = 0.0f; u->unk3DC = 18.0f; u->keyed_anim_target_frame = scale_game_frames(0x28); - u->unk3E4 = level12_water_surface_jump_velocity_key_profile; + u->velocity_keys = level12_water_surface_jump_velocity_key_profile; } { struct Hero *w = &hero; w->item_select_blocked = 1; } } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1084,13 +1085,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1098,7 +1099,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -1106,7 +1107,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1114,8 +1115,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(((int)u->moby), x); @@ -1130,7 +1131,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -1138,14 +1139,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; *(int *)&u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -1153,16 +1154,16 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -1170,7 +1171,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -1178,15 +1179,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - u->unk3E4 = level12_transform_trail_jump_velocity_key_profile; + u->velocity_keys = level12_transform_trail_jump_velocity_key_profile; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -1194,7 +1195,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -1202,17 +1203,18 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L12_0015F6E8; + w->velocity_keys = D_L12_0015F6E8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -1224,15 +1226,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1240,7 +1242,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -1263,7 +1265,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (entry_animation_mode) { int s = q->state.current; if (s == 7) { @@ -1332,10 +1334,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; *(int *)&p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1348,7 +1350,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1486,7 +1488,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ATTACK_RECORD_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x70) { int v = 5; if (D_L12_0017C0A8[p->attack_record].kind == 0) @@ -1513,7 +1515,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (entry_animation_mode) { char *m; @@ -1533,7 +1535,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (entry_animation_mode) @@ -1544,9 +1546,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1569,7 +1571,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -1577,7 +1579,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -1587,7 +1589,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -1596,7 +1598,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1607,7 +1609,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { char *v = (char *)&p->motion.resolved_velocity; struct Hero *hero_base; @@ -1625,7 +1627,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -1634,7 +1636,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -1650,7 +1652,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -1669,13 +1671,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != hero_get_gadget_anim_id(1)) { set_hero_animation(hero_get_gadget_anim_id(1), 0, (float)scale_game_frames(5)); @@ -1685,7 +1687,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(0xA)); break; } @@ -1693,7 +1695,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(0xA)); break; @@ -1701,14 +1703,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -1719,7 +1721,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -1746,7 +1748,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } diff --git a/src/overlays/l12/hero/update_hero_motion_for_current_state.c b/src/overlays/l12/hero/update_hero_motion_for_current_state.c index 57900a5085..9a3cd7b526 100644 --- a/src/overlays/l12/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l12/hero/update_hero_motion_for_current_state.c @@ -50,7 +50,7 @@ void update_hero_ground_material_flags(void) { hero_for_ground_flags_update->ground_sound_class = saved; hero_for_ground_flags_update->ground_type = -1; hero_for_ground_flags_update->wading = 0; - hero_for_ground_flags_update->unk308 = 0; + hero_for_ground_flags_update->magnetic_floor = 0; if (state == -1) return; if (state == GROUND_MATERIAL_MAGNET) { @@ -60,7 +60,7 @@ void update_hero_ground_material_flags(void) { if (hero_for_ground_flags_update->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { if ((s32)hero_for_ground_flags_update->items[1].moby != 0 && *(short *)((s32)hero_for_ground_flags_update->items[1].moby + 0xA6) == 0xAD) - hero_for_ground_flags_update->unk308 = 1; + hero_for_ground_flags_update->magnetic_floor = 1; } } } @@ -354,12 +354,12 @@ void update_hero_ground_contact_and_gravity(void) { } hero.ground_pitch.i = 0; hero.unk2E8.i = 0; - hero.unk2D0.i[0] = 0; - hero.unk2D0.i[1] = 0; - hero.unk2C8.i[0] = 0; - hero.unk2C8.i[1] = 0; - hero.unk2C0.i[0] = 0; - hero.unk2C0.i[1] = 0; + hero.side_probe_roll.i[0] = 0; + hero.side_probe_roll.i[1] = 0; + hero.side_probe_pitch.i[0] = 0; + hero.side_probe_pitch.i[1] = 0; + hero.side_probe_drop.i[0] = 0; + hero.side_probe_drop.i[1] = 0; if (hero.state.control_mode == HERO_MODE_GRIND || hero.state.control_mode == 0x15 || hero.state.control_mode == HERO_MODE_ATTACK || hero.state.control_mode == HERO_MODE_JUMP || hero.state.control_mode == HERO_MODE_LAND || hero.state.control_mode == HERO_MODE_LEDGE) { @@ -390,22 +390,22 @@ void update_hero_ground_contact_and_gravity(void) { (s32)hero.moby, 0)) { f = D_L12_001742C0_lui.point.f[2] - hero.ground_z.f; - hero.unk2C0.f[i] = f; + hero.side_probe_drop.f[i] = f; if (0.4f < absolute_float(f)) { - hero.unk2C0.f[i] = 0.0f; + hero.side_probe_drop.f[i] = 0.0f; } sceVu0Normalize(&normalized_hit_normal, (u8 *)&D_L12_001742C0_lui.normal_x); compute_rotated_vector_angles(&normalized_hit_normal, &hit_surface_angles); if (-0.78539819f < hit_surface_angles.f[1] && hit_surface_angles.f[1] < 0.78539819f) { - hero.unk2C8.f[i] = hit_surface_angles.f[1]; + hero.side_probe_pitch.f[i] = hit_surface_angles.f[1]; } if (-0.78539819f < hit_surface_angles.f[0] && hit_surface_angles.f[0] < 0.78539819f) { - hero.unk2D0.f[i] = hit_surface_angles.f[0]; + hero.side_probe_roll.f[i] = hit_surface_angles.f[0]; } } else { - hero.unk2C0.i[i] = 0; - hero.unk2C8.f[i] = hero.ground_pitch.f; - hero.unk2D0.f[i] = hero.unk2E8.f; + hero.side_probe_drop.i[i] = 0; + hero.side_probe_pitch.f[i] = hero.ground_pitch.f; + hero.side_probe_roll.f[i] = hero.unk2E8.f; } } } @@ -693,7 +693,7 @@ void update_hero_motion_for_current_state(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { geometry_and_hit_descriptor_scratch.q = 0; geometry_and_hit_descriptor_scratch.f[0] = 1.0f; transform_vector_by_basis(&hero.motion.move_dir, @@ -1241,9 +1241,9 @@ void update_hero_motion_for_current_state(void) { } } turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - fast_dec_timer(&hero.unk698); + fast_dec_timer(&hero.swim_stroke_timer); if (hero.state.current == 0x36) { - if (PD.no_direction != 0 && hero.unk698 != 0) { + if (PD.no_direction != 0 && hero.swim_stroke_timer != 0) { hero.target_speed = frame_time * 3.0f; } if (absolute_float(hero.motion.yaw_error) > 0.7853982f) { @@ -1483,7 +1483,7 @@ void update_hero_motion_for_current_state(void) { if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->u10.f18.v)) { above = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (above && scale_game_frames(40) < hero.state_timer) { if (hero.stick_magnitude > 0.25f) { f32 s; @@ -1500,7 +1500,7 @@ void update_hero_motion_for_current_state(void) { } } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < hero.unk9A0 * 1.57f || @@ -1541,18 +1541,18 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&vD0, &vD0, &hero.motion.pos); fast_vec_add(&movement_vector_scratch, &vD0, &hero.motion.velocity); fast_vec_sub(&vC0, &movement_vector_scratch, &MV(hero.swing_target_moby)->u10.v10); - fast_vec_normalize(&vC0, &vC0, hero.unk9A4); + fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&movement_vector_scratch, &MV(hero.swing_target_moby)->u10.v10, &vC0); fast_vec_sub(&hero.motion.velocity, &movement_vector_scratch, &vD0); - old = hero.unk9A4; - vendor_spring(&hero.unk9A4, + old = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - old; - if (fast_vec_length(&vC0) > hero.unk9A4) { + d = hero.swing_rope_length - old; + if (fast_vec_length(&vC0) > hero.swing_rope_length) { fast_vec_normalize(&vC0, &vC0, d); fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vC0); } @@ -1574,7 +1574,7 @@ void update_hero_motion_for_current_state(void) { &hero.motion.velocity, &hero.motion.velocity, &movement_vector_scratch); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0) { + if (hero.swing_hooked != 0 && hero.air_frames.s != 0) { if ((vz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0) { f32 t; s32 up; @@ -1748,7 +1748,7 @@ void update_hero_motion_for_current_state(void) { if (!jumping) { if (hero.heading_locked != 0 || MV(hero.melee_target) != NULL) { s32 ok = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { f32 d = fast_subtract_rotations(hero.attack_target_yaw, hero.motion.rot.f[2]); f32 a = compute_directed_angle_delta( 1, hero.attack_target_yaw, hero.motion.rot.f[2]); @@ -2129,9 +2129,9 @@ void update_hero_motion_for_current_state(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0 && + if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } update_hero_target_speed_from_stick(); if (hero.unk930 > 0.0f) { @@ -2145,7 +2145,7 @@ void update_hero_motion_for_current_state(void) { clear_u64_value(move_impulse_ptr); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { f32 c = hero.stick_magnitude; @@ -2173,7 +2173,7 @@ void update_hero_motion_for_current_state(void) { { f32 a = frame_time_sq * 7.5f * k; f32 b = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { f32 m = 2.6179938f - hero.motion.yaw_error; if (m > 1.0f) { m = 1.0f; @@ -2186,13 +2186,13 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } clip_hero_horizontal_velocity(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -2567,7 +2567,7 @@ void update_hero_motion_for_current_state(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -2813,7 +2813,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l12/hero/update_hero_state_transitions.c b/src/overlays/l12/hero/update_hero_state_transitions.c index afac43eb6b..31a671ded1 100644 --- a/src/overlays/l12/hero/update_hero_state_transitions.c +++ b/src/overlays/l12/hero/update_hero_state_transitions.c @@ -234,8 +234,8 @@ void update_hero_state_transitions(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || item_available[0x1C] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || item_available[0x1C] == 0) { hero_set_state(0x81, 1); break; } @@ -293,7 +293,7 @@ void update_hero_state_transitions(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (hero.moby->prev_seq == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -323,7 +323,7 @@ void update_hero_state_transitions(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -367,7 +367,7 @@ void update_hero_state_transitions(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -378,7 +378,7 @@ void update_hero_state_transitions(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -397,7 +397,8 @@ void update_hero_state_transitions(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L12_00167258) > 1.2217305f) { @@ -543,7 +544,7 @@ void update_hero_state_transitions(void) { } } hero.item_select_blocked = 1; - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0) || (item_available[4] != 0 && pad_pressed_within(0xA, scale_game_frames(7), 0))) { @@ -574,7 +575,7 @@ void update_hero_state_transitions(void) { break; } } - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { if (item_available[4] != 0 && (controller_state.held & 0xA)) { hero_set_state(0x35, 1); @@ -591,7 +592,7 @@ void update_hero_state_transitions(void) { hero.motion.displacement.f[2] = 0.0f; } if (0.1f > hero.stick_magnitude && hero.ground_speed == 0.0f && - hero.unk698 == 0) { + hero.swim_stroke_timer == 0) { hero_set_state(0x37, 1); } break; @@ -637,7 +638,7 @@ void update_hero_state_transitions(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (hero.moby->prev_seq != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -739,7 +740,8 @@ void update_hero_state_transitions(void) { HeroTableRow2C *rec = &D_L12_0017C0A8[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -875,19 +877,19 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_RUN, 1); } } - if (hero.state.current == HERO_STATE_RUN && hero.unk308 != 0) { + if (hero.state.current == HERO_STATE_RUN && hero.magnetic_floor != 0) { hero_set_state(0x3F, 1); } if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -1104,7 +1106,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -1170,7 +1172,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -1187,7 +1189,7 @@ void update_hero_state_transitions(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -1358,9 +1360,9 @@ void update_hero_state_transitions(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -1500,7 +1502,7 @@ void update_hero_state_transitions(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -1721,7 +1723,7 @@ void update_hero_state_transitions(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -1748,9 +1750,10 @@ void update_hero_state_transitions(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -2103,7 +2106,7 @@ void update_hero_state_transitions(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (hero.moby->prev_seq != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l12/mobys/homing_mine_spawner.c b/src/overlays/l12/mobys/homing_mine_spawner.c index fb7c63d285..3f3b508306 100644 --- a/src/overlays/l12/mobys/homing_mine_spawner.c +++ b/src/overlays/l12/mobys/homing_mine_spawner.c @@ -77,7 +77,7 @@ void spawn_next_linked_moby(struct Moby *spawner) { spawned_moby->occlusion = 0x7F80; spawned_moby->draw_dist = 0xFF; spawned_moby->unk71 = 0xFF; - spawned_moby->unk72 = 0xFF; + spawned_moby->lod_dist = 0xFF; spawned_moby->hit_slot = 0xFF; spawned_moby->collision = moby_class->collision; spawned_moby->spawn_frame = spawner->spawn_frame; diff --git a/src/overlays/l12/mobys/hoven_turret.c b/src/overlays/l12/mobys/hoven_turret.c index 933e883d2e..cc92ec58a1 100644 --- a/src/overlays/l12/mobys/hoven_turret.c +++ b/src/overlays/l12/mobys/hoven_turret.c @@ -291,7 +291,7 @@ void hoven_turret_update(struct Moby *moby) { } case HOVEN_TURRET_STATE_MANNED: D_L12_00161F00 = 1; - ((Hero *)(D_0013E533 + 0xE1D))->unk20A5 = 1; + ((Hero *)(D_0013E533 + 0xE1D))->hidden = 1; ((Hero *)(D_0013E533 + 0xE1D))->collision_off_frames = scale_game_frames(0x78); ((Hero *)(D_0013E533 + 0xE1D))->invulnerable_frames = scale_game_frames(0x78); if (D_L12_0015F5C4_macro != 2 && D_L12_001619A0 == 0) { diff --git a/src/overlays/l13/mobys/asteroid.c b/src/overlays/l13/mobys/asteroid.c index e65df333d0..eded1ef2d5 100644 --- a/src/overlays/l13/mobys/asteroid.c +++ b/src/overlays/l13/mobys/asteroid.c @@ -182,7 +182,7 @@ void process_asteroid_hit(struct Moby *moby, char *blob_data, float scale_ratio) -1, 0); } - moby->unk72 = 0; + moby->lod_dist = 0; if (*(short *)(blob_data + 0x4E) > 0) { for (i = 0; i < random_int_between(1, 2); i++) { float part = moby->scale * random_float_between(0.25f, 0.75f); @@ -260,7 +260,7 @@ void asteroid_update(struct Moby *moby) { asteroid_vars->start_scale = moby->scale; asteroid_vars->pieces = random_int_between(2, 3); if (moby->scale < moby->pclass->scale) { - moby->unk72 = 0; + moby->lod_dist = 0; } moby->state = ASTEROID_RESET_AT_HOME; break; @@ -352,7 +352,7 @@ void asteroid_update(struct Moby *moby) { qzero(&asteroid_vars->vel); moby->scale = asteroid_vars->start_scale; if (moby->pclass->scale < moby->scale) { - moby->unk72 = 100; + moby->lod_dist = 100; } moby->state = ASTEROID_WAIT_TO_LAUNCH; break; diff --git a/src/overlays/l14/hero/hero_set_state.c b/src/overlays/l14/hero/hero_set_state.c index df321e0416..9d65c51260 100644 --- a/src/overlays/l14/hero/hero_set_state.c +++ b/src/overlays/l14/hero/hero_set_state.c @@ -107,14 +107,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); } @@ -134,8 +134,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { request_hero_idle_state_for_vehicle_mode(); @@ -169,7 +169,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (animation_update_mode) { @@ -195,7 +195,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -204,7 +204,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_DYING_SPEED_LIMITED: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.momentum, frame_time * 3.5f); @@ -215,15 +215,15 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SINK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; - p->unk694 = p->motion.displacement.f[2] * 0.2f; - p->unk69C = p->water_surface_z - 0.37f; - if (p->unk694 < frame_time * -7.0f) - p->unk694 = frame_time * -7.0f; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.2f; + p->swim_water_level = p->water_surface_z - 0.37f; + if (p->swim_bob_velocity < frame_time * -7.0f) + p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (animation_update_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); break; @@ -232,9 +232,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L14_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = hero_get_gadget_anim_id(1); if (p->moby->prev_seq != t && animation_update_mode) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -245,7 +245,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -254,7 +254,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -263,7 +263,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -277,7 +277,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -286,7 +286,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(1.0f, 0); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -315,7 +315,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { t->unk3B4.i = 0; t->state.current = 0x2F; set_hero_animation(0x37, 0, (float)scale_game_frames(8)); - } else if (t->unk308 == 1 || t->state.current == 0x3F) { + } else if (t->magnetic_floor == 1 || t->state.current == 0x3F) { t->state.current = 0x3F; set_hero_animation(0x5B, 0, (float)scale_game_frames(8)); } else { @@ -347,7 +347,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ANIMATION_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) { if (p->state.prev == 4) { set_hero_animation(0x5E, 2, (float)scale_game_frames(5)); @@ -360,7 +360,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -380,7 +380,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_ice_ground != 0) { hero_set_state(0x2F, 1); @@ -412,7 +412,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *v = (char *)&p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (animation_update_mode) { @@ -427,7 +427,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -456,7 +456,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -478,7 +478,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -489,7 +489,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -502,7 +502,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -517,7 +517,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; *(char **)&p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -543,7 +543,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], q->swing_target_moby->pos.y - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); + q->swing_rope_length = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -563,7 +563,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_update_mode) @@ -574,7 +574,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -588,7 +588,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { int seg; float t; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 3; + p->camera_mode = 3; p->rand_timer.range = 0x68; p->rail_off_frames = 0; p->grind_direction = 1; @@ -642,7 +642,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -662,7 +662,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (animation_update_mode) @@ -672,7 +672,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_update_mode) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -681,7 +681,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_update_mode) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -690,7 +690,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -700,12 +700,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -735,9 +735,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; int animation_timing_preset_selector = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -752,7 +752,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { int animation_timing_selector = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -791,9 +791,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)&hero.motion.velocity; @@ -811,7 +811,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *u = &hero; u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -834,7 +834,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -842,13 +842,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x29) { - u->unk430 = 2.4f; + u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -856,14 +856,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.45f; u->jump_height_start = 2.4f; - u->unk498 = scale_game_frames(0x11); + u->jump_ramp_frames = scale_game_frames(0x11); u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; u->jump_gravity = frame_time_sq * 27.0f; if (u->selector_5 != 0) { float k = 4.7f; *(u128 *)grind_direction_or_jump_reference_position = 0; - u->unk430 = u->unk430 + k; + u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; u->unk48C = u->unk48C + k; u->jump_gravity = frame_time_sq * 14.0f; @@ -873,13 +873,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (fast_vec_dist(&u->motion.pos, grind_direction_or_jump_reference_position) < 10.0f) { k = 0.7f; - u->unk430 = u->unk430 + k; + u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; u->unk48C = u->unk48C + k; } } } else if (u->state.current == 0x2A) { - u->unk430 = 2.5f; + u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -887,12 +887,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.55f; u->jump_height_start = 2.5f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; u->jump_gravity = frame_time_sq * 24.0f; } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -900,13 +900,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -914,7 +914,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -922,7 +922,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = (char *)&u->trail; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -930,8 +930,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(*(int *)&u->moby, x); @@ -946,7 +946,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -954,14 +954,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -969,16 +969,16 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = (char *)&u->trail; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -986,7 +986,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -994,15 +994,15 @@ int hero_set_state(int requested_state, int animation_update_mode) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - *(char **)&u->unk3E4 = level14_transform_trail_jump_velocity_keys; + *(char **)&u->velocity_keys = level14_transform_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -1010,7 +1010,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -1018,17 +1018,18 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L14_0015F6E8; + w->velocity_keys = D_L14_0015F6E8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -1040,15 +1041,15 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1056,7 +1057,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -1079,7 +1080,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (animation_update_mode) { int s = q->state.current; if (s == 7) { @@ -1157,10 +1158,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; *(int *)&p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1173,7 +1174,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1312,7 +1313,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ATTACK_RECORD_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x70) { int v = 5; if (D_L14_0017C328[p->attack_record].kind == 0) @@ -1339,7 +1340,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_GRIND_ATTACK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x2B) { p->attack_record = p->attack_record == 0; } else { @@ -1359,7 +1360,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (animation_update_mode) { char *m; @@ -1379,7 +1380,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (animation_update_mode) @@ -1390,9 +1391,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1415,7 +1416,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -1423,7 +1424,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -1433,7 +1434,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -1442,7 +1443,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1453,7 +1454,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { char *v = (char *)&p->motion.resolved_velocity; struct Hero *hero_base; @@ -1471,7 +1472,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -1480,7 +1481,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -1496,7 +1497,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -1515,13 +1516,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != hero_get_gadget_anim_id(1)) { set_hero_animation(hero_get_gadget_anim_id(1), 0, (float)scale_game_frames(5)); @@ -1531,7 +1532,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(0xA)); break; } @@ -1539,7 +1540,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(0xA)); break; @@ -1547,14 +1548,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -1565,7 +1566,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -1592,7 +1593,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } diff --git a/src/overlays/l14/hero/process_hero_state_transitions.c b/src/overlays/l14/hero/process_hero_state_transitions.c index af7631353a..f1d480849c 100644 --- a/src/overlays/l14/hero/process_hero_state_transitions.c +++ b/src/overlays/l14/hero/process_hero_state_transitions.c @@ -252,8 +252,8 @@ void process_hero_state_transitions(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || D_0013D4DC[0] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || D_0013D4DC[0] == 0) { hero_set_state(0x81, 1); break; } @@ -312,7 +312,7 @@ void process_hero_state_transitions(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (((unsigned char *)hero.moby)[0x53] == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -343,7 +343,7 @@ void process_hero_state_transitions(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -387,7 +387,7 @@ void process_hero_state_transitions(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -398,7 +398,7 @@ void process_hero_state_transitions(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -422,7 +422,8 @@ void process_hero_state_transitions(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L14_001674D8) > 1.2217305f) { @@ -509,7 +510,7 @@ void process_hero_state_transitions(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -611,7 +612,8 @@ void process_hero_state_transitions(void) { HeroTableRow2C *rec = &D_L14_0017C328[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -739,7 +741,7 @@ void process_hero_state_transitions(void) { hero_set_state(HERO_STATE_RUN, 1); } } - if (hero.state.current == HERO_STATE_RUN && hero.unk308 != 0) { + if (hero.state.current == HERO_STATE_RUN && hero.magnetic_floor != 0) { hero_set_state(0x3F, 1); } if (hero.grind_rail != 0) { @@ -749,13 +751,13 @@ void process_hero_state_transitions(void) { if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -960,7 +962,7 @@ void process_hero_state_transitions(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -1026,7 +1028,7 @@ void process_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -1043,7 +1045,7 @@ void process_hero_state_transitions(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -1096,7 +1098,7 @@ void process_hero_state_transitions(void) { case HERO_STATE_GRIND_ATTACK: case HERO_STATE_GRIND_COLLISION_RECOVERY: if (hero.state.current == 0x42) { - hero.unk5BE = 0; + hero.grind_hit = 0; } else { int grab; float len; @@ -1111,7 +1113,7 @@ void process_hero_state_transitions(void) { } len = vector_length_xy(hero.motion.displacement.f); if (len < vector_length_xy(hero.motion.velocity.f) * 0.5f || grab || - hero.unk5BE != 0) { + hero.grind_hit != 0) { int ok = 1; if (current_level_index != LEVEL_KALEBO3) { @@ -1126,7 +1128,7 @@ void process_hero_state_transitions(void) { ok = 0; } } - hero.unk5BE = 0; + hero.grind_hit = 0; if (hero.health.hp >= 2 && ok) { hero_set_state(0x42, 1); if (grab) { @@ -1226,7 +1228,7 @@ void process_hero_state_transitions(void) { query_position, motion_query_vector, 0, hero.jump_gravity); hero.jump_height_start = t; hero.jump_gravity = hero.rail_jump_gravity; - hero.unk430 = t; + hero.jump_height = t; hero.unk48C = t + 0.05f; } } @@ -1559,9 +1561,9 @@ void process_hero_state_transitions(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -1705,7 +1707,7 @@ void process_hero_state_transitions(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -1930,7 +1932,7 @@ void process_hero_state_transitions(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -1957,9 +1959,10 @@ void process_hero_state_transitions(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -2317,7 +2320,7 @@ void process_hero_state_transitions(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l14/hero/update_hero_motion_by_state.c b/src/overlays/l14/hero/update_hero_motion_by_state.c index 20bca8aec9..826ccfde7f 100644 --- a/src/overlays/l14/hero/update_hero_motion_by_state.c +++ b/src/overlays/l14/hero/update_hero_motion_by_state.c @@ -51,7 +51,7 @@ void resolve_hero_surface_reactions(void) { hero_data->ground_sound_class = keep; hero_data->ground_type = -1; hero_data->wading = 0; - hero_data->unk308 = 0; + hero_data->magnetic_floor = 0; if (saved_ground_type == -1) return; if (saved_ground_type == HERO_GROUND_TYPE_MAGNET) { @@ -60,7 +60,7 @@ void resolve_hero_surface_reactions(void) { if (hero_data->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { char *item_moby_bytes = ((char *)hero_data->items[1].moby); if (item_moby_bytes != 0 && *(short *)(item_moby_bytes + 0xA6) == 0xAD) { - hero_data->unk308 = 1; + hero_data->magnetic_floor = 1; } } } @@ -179,7 +179,7 @@ s32 process_hero_hit_reaction(s32 apply_hit_reaction) { G.damage_source_moby = (struct Moby *)hero_hit_entry->target; D_0015EEA8++; if (G.state.control_mode == HERO_MODE_GRIND) { - G.unk5BE = 1; + G.grind_hit = 1; return 0; } if (apply_hit_reaction == 0) { @@ -560,7 +560,7 @@ void update_hero_motion_by_state(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { vector_and_descriptor_scratch.q = 0; vector_and_descriptor_scratch.f[0] = 1.0f; transform_vector_by_basis( @@ -902,7 +902,7 @@ void update_hero_motion_by_state(void) { if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->u10.f18.v)) { above = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (above && scale_game_frames(40) < hero.state_timer) { if (hero.stick_magnitude > 0.25f) { f32 s; @@ -919,7 +919,7 @@ void update_hero_motion_by_state(void) { } } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < hero.unk9A0 * 1.57f || @@ -960,18 +960,18 @@ void update_hero_motion_by_state(void) { fast_vec_add(&vD0, &vD0, &hero.motion.pos); fast_vec_add(&motion_vector_scratch, &vD0, &hero.motion.velocity); fast_vec_sub(&vC0, &motion_vector_scratch, &MV(hero.swing_target_moby)->u10.v10); - fast_vec_normalize(&vC0, &vC0, hero.unk9A4); + fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&motion_vector_scratch, &MV(hero.swing_target_moby)->u10.v10, &vC0); fast_vec_sub(&hero.motion.velocity, &motion_vector_scratch, &vD0); - swing_radius_before_spring = hero.unk9A4; - vendor_spring(&hero.unk9A4, + swing_radius_before_spring = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - swing_radius_before_spring; - if (fast_vec_length(&vC0) > hero.unk9A4) { + d = hero.swing_rope_length - swing_radius_before_spring; + if (fast_vec_length(&vC0) > hero.swing_rope_length) { fast_vec_normalize(&vC0, &vC0, d); fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vC0); } @@ -992,7 +992,7 @@ void update_hero_motion_by_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &motion_vector_scratch); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0) { + if (hero.swing_hooked != 0 && hero.air_frames.s != 0) { if ((vz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0) { f32 t; s32 up; @@ -1164,7 +1164,7 @@ void update_hero_motion_by_state(void) { if (!jumping) { if (hero.heading_locked != 0 || MV(hero.melee_target) != NULL) { s32 ok = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { f32 d = fast_subtract_rotations(hero.attack_target_yaw, hero.motion.rot.f[2]); f32 a = compute_directed_angle_delta( 1, hero.attack_target_yaw, hero.motion.rot.f[2]); @@ -1522,9 +1522,9 @@ void update_hero_motion_by_state(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0 && + if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } update_hero_stick_target_magnitude(); if (hero.unk930 > 0.0f) { @@ -1538,7 +1538,7 @@ void update_hero_motion_by_state(void) { clear_u64_value(move_impulse_ptr); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { f32 c = hero.stick_magnitude; @@ -1566,7 +1566,7 @@ void update_hero_motion_by_state(void) { { f32 a = frame_time_sq * 7.5f * k; f32 b = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { f32 m = 2.6179938f - hero.motion.yaw_error; if (m > 1.0f) { m = 1.0f; @@ -1579,13 +1579,13 @@ void update_hero_motion_by_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } clip_hero_horizontal_velocity(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -1690,7 +1690,7 @@ void update_hero_motion_by_state(void) { } flag = 0; if (has) { - flag = hero.unk20AA != 0; + flag = hero.weapon_up != 0; } moby_point_position(MV(hero.moby), 9, &hero.joint9_world_pos); moby_point_position(MV(hero.moby), 0xE, &hero.joint14_world_pos); @@ -2351,7 +2351,7 @@ void update_hero_motion_by_state(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -2588,7 +2588,7 @@ void update_hero_motion_by_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l14/mobys/path_mover.c b/src/overlays/l14/mobys/path_mover.c index 5ac5ea2cfd..329fa89a06 100644 --- a/src/overlays/l14/mobys/path_mover.c +++ b/src/overlays/l14/mobys/path_mover.c @@ -172,7 +172,7 @@ void path_mover_update(struct Moby *moby) { case PATH_MOVER_COMMAND_TRAVERSE_PATH: if (path_mover_vars->silent == 0 && is_hero_on_moby(moby)) { hero.jump_lock_timer = 4; - hero.unk1F4 = 4; + hero.edge_brake_lock_timer = 4; } if (path_mover_vars->wait != 0 || (path_mover_vars->rise < 0.0f && diff --git a/src/overlays/l14/mobys/taxi.c b/src/overlays/l14/mobys/taxi.c index 9799fc2f82..bfee57e08b 100644 --- a/src/overlays/l14/mobys/taxi.c +++ b/src/overlays/l14/mobys/taxi.c @@ -355,7 +355,7 @@ void taxi_update(struct Moby *moby) { struct Hero *g = &hero; if (g->ground_moby == moby && g->air_frames.s == 0) { g->jump_lock_timer = 2; - g->unk1F4 = 2; + g->edge_brake_lock_timer = 2; transform_moby_vector_table_to_world_space((char *)moby); } if (voice_is_playing(moby, taxi_vars->sound) == 0) { diff --git a/src/overlays/l14/mobys/wind_control.c b/src/overlays/l14/mobys/wind_control.c index 32e77ca9bb..af737d2e6d 100644 --- a/src/overlays/l14/mobys/wind_control.c +++ b/src/overlays/l14/mobys/wind_control.c @@ -129,7 +129,7 @@ void wind_control_update(struct Moby *wind_control_moby) { } update_wind_sparks(wind_control_moby); hero_base = (struct Hero *)(pos - 0x80); - if (hero_base->unk308 == 0 && hero_base->unk2284 != 13 && + if (hero_base->magnetic_floor == 0 && hero_base->camera_mode != 13 && (hero_base->on_ice_ground != 0 || hero_base->frames_off_ground.s != 0) && is_point_inside_clip_volume(pos, wind_vars->clip_push) != 0) { float t; @@ -156,7 +156,7 @@ void wind_control_update(struct Moby *wind_control_moby) { wind_vars->period_timer = scale_game_frames(wind_vars->period); wind_vars->period_inv = 1.0f / convert_integer_to_float(wind_vars->period_timer); } - if (hero.unk308 != 0 || hero.on_ice_ground == 0) { + if (hero.magnetic_floor != 0 || hero.on_ice_ground == 0) { if (wind_vars->push_timer > scale_game_frames(15)) { wind_vars->push_timer = scale_game_frames(15); wind_vars->push_inv = 1.0f / (float)wind_vars->push_timer; diff --git a/src/overlays/l15/hero/hero_set_state.c b/src/overlays/l15/hero/hero_set_state.c index 3479dc4d68..d8826ce061 100644 --- a/src/overlays/l15/hero/hero_set_state.c +++ b/src/overlays/l15/hero/hero_set_state.c @@ -110,14 +110,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); } @@ -137,8 +137,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { set_hero_state_for_vehicle_mode(); @@ -165,7 +165,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (entry_animation_mode) { @@ -191,7 +191,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -200,7 +200,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SWIM: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; *(int *)&p->drown_sink_speed = 0; if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -224,7 +224,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; p->unk8F4 = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -245,7 +245,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { int n; int t; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); p->rand_timer.range = 0x68; @@ -261,7 +261,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->splash_effect_timer = 0; if (p->state.prev_control_mode == HERO_MODE_SWIM) { emit_hero_surface_effect_burst(3, 0xA, 0); @@ -293,7 +293,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *q = &hero; - q->unk698 = 0; + q->swim_stroke_timer = 0; if (q->state.prev_control_mode == HERO_MODE_SWIM) { float d = (float)q->underwater_air; if (d < 2500.0f) { @@ -316,12 +316,12 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *s = &hero; - s->unk694 = s->motion.displacement.f[2] * 0.37f; - if (s->unk694 < frame_time * -7.0f) - s->unk694 = frame_time * -7.0f; - s->unk69C = s->water_surface_z; + s->swim_bob_velocity = s->motion.displacement.f[2] * 0.37f; + if (s->swim_bob_velocity < frame_time * -7.0f) + s->swim_bob_velocity = frame_time * -7.0f; + s->swim_water_level = s->water_surface_z; s->unk6A0 = 0; - s->unk690 = s->motion.pos.f[2] - s->unk69C - -0.12f; + s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; FUN_L00_0025f730(&s->motion.momentum, frame_time * 5.5f); @@ -336,7 +336,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); p->item_select_blocked = 1; qcopy(&p->motion.velocity, &p->motion.displacement); @@ -369,9 +369,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; *(int *)&p->drown_sink_speed = 0; - p->unk698 = scale_game_frames(0x2D); + p->swim_stroke_timer = scale_game_frames(0x2D); p->rand_timer.range = 0x68; if (entry_animation_mode) set_hero_animation(0x65, 0, (float)scale_game_frames(0x11)); @@ -381,7 +381,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; if (p->jump_button_frames > scale_game_frames(0x32)) { struct UsageStat *h = usage_stats.stat; @@ -421,7 +421,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) @@ -432,9 +432,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L15_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = get_hero_help_value(1); if (p->moby->prev_seq != t && entry_animation_mode) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -445,7 +445,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -454,7 +454,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -463,7 +463,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -476,7 +476,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -485,7 +485,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(1.0f, 0); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -538,7 +538,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -558,7 +558,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VOICE_SLOT_CLEANUP_IDLE_EXIT: { struct Hero *p = &hero; p->state.control_mode = 0x10; - p->unk2284 = 3; + p->camera_mode = 3; p->item_select_blocked = 1; fill_transfer_words((char *)p + 0x9D0, 0, 0x20); qcopy(&p->motion.momentum, &p->motion.displacement); @@ -569,7 +569,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { hero_set_state(HERO_STATE_SLIP, 1); @@ -597,7 +597,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *v = (char *)&p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (entry_animation_mode) { @@ -612,7 +612,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -641,7 +641,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -663,7 +663,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -674,7 +674,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -687,7 +687,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -702,7 +702,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; *(char **)&p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -728,7 +728,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], q->swing_target_moby->pos.y - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); + q->swing_rope_length = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -748,7 +748,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) @@ -759,7 +759,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -770,7 +770,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -790,7 +790,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (entry_animation_mode) @@ -800,7 +800,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (entry_animation_mode) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -809,7 +809,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (entry_animation_mode) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -818,7 +818,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -828,12 +828,12 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -863,9 +863,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; int animation_blend_selector = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -880,7 +880,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { int animation_blend_selector = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -919,9 +919,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)&hero.motion.velocity; @@ -941,7 +941,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { allocate_hero_voice_for_entry(0xA, 0); u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -964,7 +964,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -972,13 +972,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -986,22 +986,23 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; u->unk48C = 1.98f; - u->unk430 = 1.95f; + u->jump_height = 1.95f; } else { gravity_set_z( (float *)(&u->motion.velocity), (float *)(&u->motion.velocity), 0.0f); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(2); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(2); + u->velocity_keys_end_frame = + scale_game_frames(0x23) + u->velocity_keys_start_frame; u->keyed_move_target_frame = 0.0f; u->unk3DC = 18.0f; u->keyed_anim_target_frame = scale_game_frames(0x28); - u->unk3E4 = hero_deep_water_jump_velocity_keys; + u->velocity_keys = hero_deep_water_jump_velocity_keys; } { struct Hero *w = &hero; @@ -1017,7 +1018,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *w = &hero; - w->unk430 = v + 1.7f; + w->jump_height = v + 1.7f; w->takeoff_frame = scale_game_frames(5); w->unk434 = 0.6f; w->apex_anim_frame = 18.0f; @@ -1025,10 +1026,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { w->jump_land_anim_frame = 12.0f; w->unk48C = v + 1.75f; w->jump_height_start = v + 1.7f; - w->unk498 = scale_game_frames(0x13); + w->jump_ramp_frames = scale_game_frames(0x13); } } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1036,13 +1037,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0x5E) { - u->unk430 = 4.2f; + u->jump_height = 4.2f; u->takeoff_frame = scale_game_frames(0x13); u->unk434 = 0.6f; u->apex_anim_frame = 17.0f; @@ -1050,14 +1051,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 40.0f; u->unk48C = 4.3f; u->jump_height_start = 4.2f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->jump_gravity = frame_time_sq * 30.0f; u->air_turn_rate = frame_time * 4.3633232f; u->fall_gravity = frame_time_sq * 50.0f; u->jump_anim_retime_scale = 2.0f; u->air_stick_speed = frame_time * 4.0f; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1065,7 +1066,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -1073,7 +1074,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1081,8 +1082,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(((int)u->moby), x); @@ -1097,7 +1098,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -1105,14 +1106,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; *(int *)&u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -1120,16 +1121,16 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -1137,7 +1138,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -1145,15 +1146,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - u->unk3E4 = hero_trail_jump_velocity_keys; + u->velocity_keys = hero_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -1161,7 +1162,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -1169,17 +1170,18 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L15_0015F6E8; + w->velocity_keys = D_L15_0015F6E8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -1191,15 +1193,15 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1207,7 +1209,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -1230,7 +1232,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (entry_animation_mode) { int s = q->state.current; if (s == 7) { @@ -1303,10 +1305,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; *(int *)&p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1319,7 +1321,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1457,7 +1459,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (entry_animation_mode) { char *m; @@ -1477,7 +1479,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (entry_animation_mode) @@ -1488,9 +1490,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1523,7 +1525,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *r = &hero; r->state.control_mode = HERO_MODE_RESPAWN_WAIT; - r->unk2284 = 0; + r->camera_mode = 0; allocate_hero_voice_for_entry(9, 0); r->rand_timer.range = 0x68; r->target_speed = 0.0f; @@ -1536,7 +1538,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_HEIGHT_OR_TIMEOUT_RESPAWN_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RESPAWN_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; if (current_level_index == LEVEL_QUARTU) spawn_hero_radial_particle_burst(); p->collision_off_frames = 0x2710; @@ -1549,7 +1551,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_2_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xF)); break; @@ -1557,7 +1559,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_2_REPEATABLE_SQUARE_ACTION: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev == 0x60 || (p->state.prev2 == 0x60 && scale_game_frames(0xA) > p->state.prev_timer)) { p->attack_record = (p->attack_record + 1) % 3; @@ -1578,7 +1580,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_2_COOLDOWN_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) set_hero_animation(0xC, 0, (float)scale_game_frames(8)); break; @@ -1586,7 +1588,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_WAIT_FOR_CIRCLE_RELEASE_AND_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) set_hero_animation(8, 0, (float)scale_game_frames(8)); break; @@ -1594,7 +1596,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_2_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1610,7 +1612,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_2_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->unk3B8 = 0; if (entry_animation_mode) @@ -1620,7 +1622,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_2_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(7, 0, (float)scale_game_frames(0xC)); @@ -1629,7 +1631,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_2_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); @@ -1644,7 +1646,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -1652,7 +1654,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (entry_animation_mode) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -1662,7 +1664,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -1671,7 +1673,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1682,7 +1684,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { char *v = (char *)&p->motion.resolved_velocity; struct Hero *hero_base; @@ -1700,7 +1702,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (entry_animation_mode) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -1709,7 +1711,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -1725,7 +1727,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -1744,13 +1746,13 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != get_hero_help_value(1)) { set_hero_animation(get_hero_help_value(1), 0, (float)scale_game_frames(5)); @@ -1760,7 +1762,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; } @@ -1768,7 +1770,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; @@ -1776,14 +1778,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -1794,7 +1796,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -1835,7 +1837,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } diff --git a/src/overlays/l15/hero/update_hero_motion_for_current_state.c b/src/overlays/l15/hero/update_hero_motion_for_current_state.c index edaba9fac9..d93b03032f 100644 --- a/src/overlays/l15/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l15/hero/update_hero_motion_for_current_state.c @@ -46,7 +46,7 @@ void apply_hero_ground_type_effects(void) { hero_state->ground_sound_class = keep; hero_state->ground_type = -1; hero_state->wading = 0; - hero_state->unk308 = 0; + hero_state->magnetic_floor = 0; if (saved_ground_type == -1) return; if (saved_ground_type == HERO_GROUND_TYPE_MAGNET) { @@ -55,7 +55,7 @@ void apply_hero_ground_type_effects(void) { if (hero_state->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { char *item_slot_one_moby = ((char *)hero_state->items[1].moby); if (item_slot_one_moby != 0 && MOBY(item_slot_one_moby)->oclass == 0xAD) - hero_state->unk308 = 1; + hero_state->magnetic_floor = 1; } } } @@ -625,7 +625,7 @@ void update_hero_motion_for_current_state(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { spatial_or_hit_descriptor_work.q = 0; spatial_or_hit_descriptor_work.f[0] = 1.0f; transform_vector_by_basis( @@ -1127,9 +1127,9 @@ void update_hero_motion_for_current_state(void) { } } turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - fast_dec_timer(&hero.unk698); + fast_dec_timer(&hero.swim_stroke_timer); if (hero.state.current == 0x36) { - if (PD.no_direction != 0 && hero.unk698 != 0) { + if (PD.no_direction != 0 && hero.swim_stroke_timer != 0) { hero.target_speed = frame_time * 3.0f; } if (absolute_float(hero.motion.yaw_error) > 0.7853982f) { @@ -1344,7 +1344,7 @@ void update_hero_motion_for_current_state(void) { if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { above = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (above && scale_game_frames(40) < hero.state_timer) { if (hero.stick_magnitude > 0.25f) { f32 s; @@ -1360,7 +1360,7 @@ void update_hero_motion_for_current_state(void) { } } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < @@ -1403,19 +1403,19 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&motion_work_vector, &vD0, &hero.motion.velocity); fast_vec_sub( &vC0, &motion_work_vector, &((struct MobyView *)hero.swing_target_moby)->u10.v10); - fast_vec_normalize(&vC0, &vC0, hero.unk9A4); + fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add( &motion_work_vector, &((struct MobyView *)hero.swing_target_moby)->u10.v10, &vC0); fast_vec_sub(&hero.motion.velocity, &motion_work_vector, &vD0); - old = hero.unk9A4; - vendor_spring(&hero.unk9A4, + old = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - old; - if (fast_vec_length(&vC0) > hero.unk9A4) { + d = hero.swing_rope_length - old; + if (fast_vec_length(&vC0) > hero.swing_rope_length) { fast_vec_normalize(&vC0, &vC0, d); fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vC0); } @@ -1436,7 +1436,7 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &motion_work_vector); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0) { + if (hero.swing_hooked != 0 && hero.air_frames.s != 0) { if ((vz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0) { f32 t; s32 up; @@ -1603,7 +1603,7 @@ void update_hero_motion_for_current_state(void) { if (!jumping) { if (hero.heading_locked != 0 || (struct MobyView *)hero.melee_target != NULL) { s32 ok = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { f32 d = fast_subtract_rotations(hero.attack_target_yaw, hero.motion.rot.f[2]); f32 a = compute_directed_angle_delta( 1, hero.attack_target_yaw, hero.motion.rot.f[2]); @@ -1913,9 +1913,9 @@ void update_hero_motion_for_current_state(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0 && + if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } hero_speed_from_table(); if (hero.unk930 > 0.0f) { @@ -1929,7 +1929,7 @@ void update_hero_motion_for_current_state(void) { clear_u64_value(move_impulse_ptr); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { f32 turn_response_input = hero.stick_magnitude; @@ -1957,7 +1957,7 @@ void update_hero_motion_for_current_state(void) { { f32 a = frame_time_sq * 7.5f * k; f32 b = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { f32 m = 2.6179938f - hero.motion.yaw_error; if (m > 1.0f) { m = 1.0f; @@ -1970,13 +1970,13 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } adjust_hero_planar_velocity_from_probes(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -2354,7 +2354,7 @@ void update_hero_motion_for_current_state(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -2827,7 +2827,7 @@ void update_hero_motion_for_current_state(void) { AN.f12F8 = a * 0.25f; AN.f13A8 = a * 0.57f; } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -2915,7 +2915,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l15/hero/update_hero_state_machine.c b/src/overlays/l15/hero/update_hero_state_machine.c index 3916d38904..e500fdfced 100644 --- a/src/overlays/l15/hero/update_hero_state_machine.c +++ b/src/overlays/l15/hero/update_hero_state_machine.c @@ -250,8 +250,8 @@ void update_hero_state_machine(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || item_available[0x1C] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || item_available[0x1C] == 0) { hero_set_state(0x81, 1); break; } @@ -306,7 +306,7 @@ void update_hero_state_machine(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (((unsigned char *)hero.moby)[0x53] == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -337,7 +337,7 @@ void update_hero_state_machine(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -381,7 +381,7 @@ void update_hero_state_machine(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -392,7 +392,7 @@ void update_hero_state_machine(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -408,7 +408,8 @@ void update_hero_state_machine(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L15_001673D8) > 1.2217305f) { @@ -548,7 +549,7 @@ void update_hero_state_machine(void) { } } hero.item_select_blocked = 1; - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0) || (item_available[4] != 0 && pad_pressed_within(0xA, scale_game_frames(7), 0))) { @@ -578,7 +579,7 @@ void update_hero_state_machine(void) { break; } } - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { if (item_available[4] != 0 && (controller_state.held & 0xA)) { hero_set_state(0x35, 1); @@ -595,7 +596,7 @@ void update_hero_state_machine(void) { hero.motion.displacement.f[2] = 0.0f; } if (0.1f > hero.stick_magnitude && hero.ground_speed == 0.0f && - hero.unk698 == 0) { + hero.swim_stroke_timer == 0) { hero_set_state(0x37, 1); } break; @@ -630,7 +631,7 @@ void update_hero_state_machine(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -729,7 +730,8 @@ void update_hero_state_machine(void) { HeroTableRow2C *rec = &D_L15_0017C228[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -840,13 +842,13 @@ void update_hero_state_machine(void) { if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -959,7 +961,7 @@ void update_hero_state_machine(void) { if (hero.selector_4 != 0) { break; } - if (hero.unk1E0 != 0) { + if (hero.sinking_floor_hold != 0) { break; } if (hero.voice_slot2 != -1) { @@ -1032,7 +1034,7 @@ void update_hero_state_machine(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -1098,7 +1100,7 @@ void update_hero_state_machine(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -1115,7 +1117,7 @@ void update_hero_state_machine(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -1282,9 +1284,9 @@ void update_hero_state_machine(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -1422,7 +1424,7 @@ void update_hero_state_machine(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -1644,7 +1646,7 @@ void update_hero_state_machine(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -1671,9 +1673,10 @@ void update_hero_state_machine(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -2036,7 +2039,7 @@ void update_hero_state_machine(void) { } } if (scale_game_frames(1) < hero.rail_land_frames) { - hero.unk2284 = 0; + hero.camera_mode = 0; stick_target(0, 1.0f); if (hero.target_speed > D_L15_0017C3B8.fC && hero.stick_magnitude > 0.5f && hero.move_lock_timer == 0 && @@ -2287,7 +2290,7 @@ void update_hero_state_machine(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l16/hero/apply_hero_ground_material_effects.c b/src/overlays/l16/hero/apply_hero_ground_material_effects.c index 3c63a0f132..9041866ef0 100644 --- a/src/overlays/l16/hero/apply_hero_ground_material_effects.c +++ b/src/overlays/l16/hero/apply_hero_ground_material_effects.c @@ -47,7 +47,7 @@ void apply_hero_ground_material_effects(void) { hero_data->ground_sound_class = keep; hero_data->ground_type = -1; hero_data->wading = 0; - hero_data->unk308 = 0; + hero_data->magnetic_floor = 0; if (saved_ground_type == -1) return; if (saved_ground_type == GROUND_MATERIAL_MAGNET) { @@ -56,7 +56,7 @@ void apply_hero_ground_material_effects(void) { if (hero_data->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { char *item_moby = (char *)hero_data->items[1].moby; if (item_moby != 0 && MOBY(item_moby)->oclass == 0xAD) - hero_data->unk308 = 1; + hero_data->magnetic_floor = 1; } } } @@ -335,12 +335,12 @@ void update_hero_ground_contact(void) { } hero.ground_pitch.i = 0; hero.unk2E8.i = 0; - hero.unk2D0.i[0] = 0; - hero.unk2D0.i[1] = 0; - hero.unk2C8.i[0] = 0; - hero.unk2C8.i[1] = 0; - hero.unk2C0.i[0] = 0; - hero.unk2C0.i[1] = 0; + hero.side_probe_roll.i[0] = 0; + hero.side_probe_roll.i[1] = 0; + hero.side_probe_pitch.i[0] = 0; + hero.side_probe_pitch.i[1] = 0; + hero.side_probe_drop.i[0] = 0; + hero.side_probe_drop.i[1] = 0; if (hero.state.control_mode == HERO_MODE_GRIND || hero.state.control_mode == 0x15 || hero.state.control_mode == HERO_MODE_ATTACK || hero.state.control_mode == HERO_MODE_JUMP || hero.state.control_mode == HERO_MODE_LAND || hero.state.control_mode == HERO_MODE_LEDGE) { @@ -367,24 +367,24 @@ void update_hero_ground_contact(void) { if (collision_line( &side_probe_endpoint, &collision_ray_endpoint, 0x22, (s32)hero.moby, 0)) { f = HH.point.f[2] - hero.ground_z.f; - hero.unk2C0.f[i] = f; + hero.side_probe_drop.f[i] = f; if (0.4f < absolute_float(f)) { - hero.unk2C0.f[i] = 0.0f; + hero.side_probe_drop.f[i] = 0.0f; } sceVu0Normalize(&normalized_hit_normal, (u8 *)&HH.normal_x); compute_rotated_vector_angles(&normalized_hit_normal, &probe_surface_angles); if (-0.78539819f < probe_surface_angles.f[1] && probe_surface_angles.f[1] < 0.78539819f) { - hero.unk2C8.f[i] = probe_surface_angles.f[1]; + hero.side_probe_pitch.f[i] = probe_surface_angles.f[1]; } if (-0.78539819f < probe_surface_angles.f[0] && probe_surface_angles.f[0] < 0.78539819f) { - hero.unk2D0.f[i] = probe_surface_angles.f[0]; + hero.side_probe_roll.f[i] = probe_surface_angles.f[0]; } } else { - hero.unk2C0.i[i] = 0; - hero.unk2C8.f[i] = hero.ground_pitch.f; - hero.unk2D0.f[i] = hero.unk2E8.f; + hero.side_probe_drop.i[i] = 0; + hero.side_probe_pitch.f[i] = hero.ground_pitch.f; + hero.side_probe_roll.f[i] = hero.unk2E8.f; } } } diff --git a/src/overlays/l16/hero/hero_set_state.c b/src/overlays/l16/hero/hero_set_state.c index 1a2f98af5f..0bf560f7f1 100644 --- a/src/overlays/l16/hero/hero_set_state.c +++ b/src/overlays/l16/hero/hero_set_state.c @@ -125,14 +125,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); } @@ -152,8 +152,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { request_hero_idle_state_for_vehicle_mode(); @@ -181,7 +181,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (animation_update_mode) { @@ -208,7 +208,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -217,7 +217,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_DYING_SPEED_LIMITED: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.momentum, frame_time * 3.5f); @@ -228,15 +228,15 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SINK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; - p->unk694 = p->motion.displacement.f[2] * 0.2f; - p->unk69C = p->water_surface_z - 0.37f; - if (p->unk694 < frame_time * -7.0f) - p->unk694 = frame_time * -7.0f; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.2f; + p->swim_water_level = p->water_surface_z - 0.37f; + if (p->swim_bob_velocity < frame_time * -7.0f) + p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (animation_update_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); break; @@ -244,7 +244,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SWIM: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; *(int *)&p->drown_sink_speed = 0; if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -268,7 +268,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; p->unk8F4 = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -289,7 +289,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { int n; int t; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); p->rand_timer.range = 0x68; @@ -305,7 +305,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->splash_effect_timer = 0; if (p->state.prev_control_mode == HERO_MODE_SWIM) { emit_hero_surface_effect_burst(3, 0xA, 0); @@ -337,7 +337,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } { struct Hero *q = &hero; - q->unk698 = 0; + q->swim_stroke_timer = 0; if (q->state.prev_control_mode == HERO_MODE_SWIM) { float d = (float)q->underwater_air; if (d < 2500.0f) { @@ -360,12 +360,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { } { struct Hero *s = &hero; - s->unk694 = s->motion.displacement.f[2] * 0.37f; - if (s->unk694 < frame_time * -7.0f) - s->unk694 = frame_time * -7.0f; - s->unk69C = s->water_surface_z; + s->swim_bob_velocity = s->motion.displacement.f[2] * 0.37f; + if (s->swim_bob_velocity < frame_time * -7.0f) + s->swim_bob_velocity = frame_time * -7.0f; + s->swim_water_level = s->water_surface_z; s->unk6A0 = 0; - s->unk690 = s->motion.pos.f[2] - s->unk69C - -0.12f; + s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; FUN_L00_0025f730(&s->motion.momentum, frame_time * 5.5f); @@ -380,7 +380,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); p->item_select_blocked = 1; qcopy(&p->motion.velocity, &p->motion.displacement); @@ -414,9 +414,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; *(int *)&p->drown_sink_speed = 0; - p->unk698 = scale_game_frames(0x2D); + p->swim_stroke_timer = scale_game_frames(0x2D); p->rand_timer.range = 0x68; if (animation_update_mode) set_hero_animation(0x65, 0, (float)scale_game_frames(0x11)); @@ -426,7 +426,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; if (p->jump_button_frames > scale_game_frames(0x32)) { struct UsageStat *h = usage_stats.stat; @@ -466,7 +466,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_update_mode) @@ -476,7 +476,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_HOVERBOARD_MOVE_WITH_RAMP_LAUNCH: { struct Hero *p = &hero; p->state.control_mode = 0x15; - p->unk2284 = 8; + p->camera_mode = 8; p->item_select_blocked = 1; qcopy(&p->unk770, p->rot_matrix); p->board_gravity = frame_time_sq * 18.0f; @@ -487,7 +487,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_HOVERBOARD_RIDE: { struct Hero *p = &hero; p->state.control_mode = 0x16; - p->unk2284 = 8; + p->camera_mode = 8; p->item_select_blocked = 1; p->unk20B2 = 1; p->board_jump_frames = 0; @@ -570,7 +570,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_HOVERBOARD_ANIMATION_VARIANT: { struct Hero *p = &hero; p->state.control_mode = 0x16; - p->unk2284 = 8; + p->camera_mode = 8; p->item_select_blocked = 1; p->unk870 = 0; if (animation_update_mode) @@ -581,7 +581,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_HOVERBOARD_RESPAWN_HEIGHT_OR_ANIMATION_WAIT: { struct Hero *p = &hero; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; release_and_clear_hero_voice_slots(); p->boost_pad_timer = 0; fast_vec_scale(&p->motion.velocity, &p->motion.resolved_velocity, 0.7f); @@ -594,7 +594,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { int n; int v; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; release_and_clear_hero_voice_slots(); p->boost_pad_timer = 0; p->board_respawn_delay = scale_game_frames(0x46); @@ -606,16 +606,16 @@ int hero_set_state(int requested_state, int animation_update_mode) { emit_hero_surface_effect_burst(3, v, 1); allocate_hero_voice_for_entry(3, 0); p->splash_effect_timer = scale_game_frames(0x4B); - p->unk694 = p->motion.displacement.f[2] * 0.3f; - if (p->unk694 < frame_time * -5.7f) - p->unk694 = frame_time * -5.7f; - p->unk69C = p->board_floor_z; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.3f; + if (p->swim_bob_velocity < frame_time * -5.7f) + p->swim_bob_velocity = frame_time * -5.7f; + p->swim_water_level = p->board_floor_z; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C - -0.12f; - if (0.2f < p->unk690) { - p->unk690 = 0.2f; - } else if (p->unk690 < -0.2f) { - p->unk690 = -0.2f; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level - -0.12f; + if (0.2f < p->swim_bob_offset) { + p->swim_bob_offset = 0.2f; + } else if (p->swim_bob_offset < -0.2f) { + p->swim_bob_offset = -0.2f; } { char *velocity_bytes = (char *)&hero.motion.velocity; @@ -634,7 +634,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_HOVERBOARD_RESPAWN_ANIMATION_WAIT: { struct Hero *p = &hero; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; release_and_clear_hero_voice_slots(); p->boost_pad_timer = 0; p->rand_timer.range = 0x68; @@ -646,9 +646,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L16_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = get_hero_idle_animation_index(1); if (p->moby->prev_seq != t && animation_update_mode) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -659,7 +659,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -668,7 +668,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -677,7 +677,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -690,7 +690,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -699,7 +699,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(1.0f, 0); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -723,7 +723,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (t->wading != 0 || t->state.current == 0x73) { t->state.current = 0x73; set_hero_animation(0x60, 0, (float)scale_game_frames(8)); - } else if (t->unk308 == 1 || t->state.current == 0x3F) { + } else if (t->magnetic_floor == 1 || t->state.current == 0x3F) { t->state.current = 0x3F; set_hero_animation(0x5B, 0, (float)scale_game_frames(8)); } else { @@ -755,7 +755,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ANIMATION_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) { if (p->state.prev == 4) { set_hero_animation(0x5E, 2, (float)scale_game_frames(5)); @@ -768,7 +768,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -788,7 +788,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VOICE_SLOT_CLEANUP_IDLE_EXIT: { struct Hero *p = &hero; p->state.control_mode = 0x10; - p->unk2284 = 3; + p->camera_mode = 3; p->item_select_blocked = 1; fill_transfer_words((char *)p + 0x9D0, 0, 0x20); qcopy(&p->motion.momentum, &p->motion.displacement); @@ -799,7 +799,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { hero_set_state(HERO_STATE_SLIP, 1); @@ -828,7 +828,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *v = (char *)&p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (animation_update_mode) { @@ -843,7 +843,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -872,7 +872,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -894,7 +894,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -905,7 +905,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -918,7 +918,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -933,7 +933,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; *(char **)&p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -959,7 +959,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], q->swing_target_moby->pos.y - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); + q->swing_rope_length = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -979,7 +979,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_update_mode) @@ -990,7 +990,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -1004,7 +1004,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { int seg; float t; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 3; + p->camera_mode = 3; p->rand_timer.range = 0x68; p->rail_off_frames = 0; p->grind_direction = 1; @@ -1052,7 +1052,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -1072,7 +1072,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (animation_update_mode) @@ -1082,7 +1082,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_update_mode) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -1091,7 +1091,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_update_mode) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -1100,7 +1100,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -1110,12 +1110,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -1145,9 +1145,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; int animation_timing_value = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -1162,7 +1162,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { int animation_timing_arg = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -1201,9 +1201,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)&hero.motion.velocity; @@ -1221,7 +1221,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *u = &hero; u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -1244,7 +1244,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1252,13 +1252,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1266,29 +1266,30 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; u->unk48C = 1.98f; - u->unk430 = 1.95f; + u->jump_height = 1.95f; } else { gravity_set_z( (float *)(&u->motion.velocity), (float *)(&u->motion.velocity), 0.0f); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(2); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(2); + u->velocity_keys_end_frame = + scale_game_frames(0x23) + u->velocity_keys_start_frame; u->keyed_move_target_frame = 0.0f; u->unk3DC = 18.0f; u->keyed_anim_target_frame = scale_game_frames(0x28); - u->unk3E4 = level16_hero_water_surface_jump_velocity_keys; + u->velocity_keys = level16_hero_water_surface_jump_velocity_keys; } { struct Hero *w = &hero; w->item_select_blocked = 1; } } else if (u->state.current == 0x29) { - u->unk430 = 2.4f; + u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1296,14 +1297,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.45f; u->jump_height_start = 2.4f; - u->unk498 = scale_game_frames(0x11); + u->jump_ramp_frames = scale_game_frames(0x11); u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; u->jump_gravity = frame_time_sq * 27.0f; if (u->selector_5 != 0) { float k = 4.7f; *(u128 *)vec = 0; - u->unk430 = u->unk430 + k; + u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; u->unk48C = u->unk48C + k; u->jump_gravity = frame_time_sq * 14.0f; @@ -1312,13 +1313,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { vec[2] = 145.0f; if (fast_vec_dist(&u->motion.pos, vec) < 10.0f) { k = 0.7f; - u->unk430 = u->unk430 + k; + u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; u->unk48C = u->unk48C + k; } } } else if (u->state.current == 0x2A) { - u->unk430 = 2.5f; + u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1326,12 +1327,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.55f; u->jump_height_start = 2.5f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; u->jump_gravity = frame_time_sq * 24.0f; } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1339,13 +1340,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1353,7 +1354,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -1361,7 +1362,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1369,8 +1370,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(((int)u->moby), x); @@ -1385,7 +1386,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -1393,14 +1394,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; *(int *)&u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -1408,16 +1409,16 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -1425,7 +1426,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -1433,15 +1434,15 @@ int hero_set_state(int requested_state, int animation_update_mode) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - u->unk3E4 = level16_hero_jump_velocity_keys; + u->velocity_keys = level16_hero_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -1449,7 +1450,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -1457,17 +1458,18 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L16_0015F6F8; + w->velocity_keys = D_L16_0015F6F8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -1479,15 +1481,15 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1495,7 +1497,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -1518,7 +1520,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (animation_update_mode) { int s = q->state.current; if (s == 7) { @@ -1598,10 +1600,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; *(int *)&p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1614,7 +1616,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1753,7 +1755,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ATTACK_RECORD_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x70) { int v = 5; if (D_L16_0017C088[p->attack_record].kind == 0) @@ -1780,7 +1782,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_GRIND_ATTACK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x2B) { p->attack_record = p->attack_record == 0; } else { @@ -1800,7 +1802,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (animation_update_mode) { char *m; @@ -1820,7 +1822,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (animation_update_mode) @@ -1831,9 +1833,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1856,7 +1858,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -1864,7 +1866,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -1874,7 +1876,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -1883,7 +1885,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1894,7 +1896,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { char *v = (char *)&p->motion.resolved_velocity; struct Hero *hero_base; @@ -1912,7 +1914,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -1921,7 +1923,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -1937,7 +1939,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -1956,13 +1958,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != get_hero_idle_animation_index(1)) { @@ -1973,7 +1975,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } @@ -1981,7 +1983,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; @@ -1989,14 +1991,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -2007,7 +2009,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -2048,7 +2050,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } diff --git a/src/overlays/l16/hero/update_hero_motion_for_current_state.c b/src/overlays/l16/hero/update_hero_motion_for_current_state.c index 7a788539eb..1b618e6589 100644 --- a/src/overlays/l16/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l16/hero/update_hero_motion_for_current_state.c @@ -308,7 +308,7 @@ void update_hero_motion_for_current_state(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { primary_vector_scratch.q = 0; primary_vector_scratch.f[0] = 1.0f; transform_vector_by_basis( @@ -845,9 +845,9 @@ void update_hero_motion_for_current_state(void) { } } turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - fast_dec_timer(&hero.unk698); + fast_dec_timer(&hero.swim_stroke_timer); if (hero.state.current == 0x36) { - if (PD.no_direction != 0 && hero.unk698 != 0) { + if (PD.no_direction != 0 && hero.swim_stroke_timer != 0) { hero.target_speed = frame_time * 3.0f; } if (absolute_float(hero.motion.yaw_error) > 0.7853982f) { @@ -1504,7 +1504,7 @@ void update_hero_motion_for_current_state(void) { if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { above = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (above && scale_game_frames(40) < hero.state_timer) { if (hero.stick_magnitude > 0.25f) { f32 s; @@ -1521,7 +1521,7 @@ void update_hero_motion_for_current_state(void) { } } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < @@ -1565,20 +1565,20 @@ void update_hero_motion_for_current_state(void) { fast_vec_sub(&vC0, &matrix_vector_workspace[3], &((struct MobyView *)hero.swing_target_moby)->u10.v10); - fast_vec_normalize(&vC0, &vC0, hero.unk9A4); + fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&matrix_vector_workspace[3], &((struct MobyView *)hero.swing_target_moby)->u10.v10, &vC0); fast_vec_sub(&hero.motion.velocity, &matrix_vector_workspace[3], &vD0); - old = hero.unk9A4; - vendor_spring(&hero.unk9A4, + old = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - old; - if (fast_vec_length(&vC0) > hero.unk9A4) { + d = hero.swing_rope_length - old; + if (fast_vec_length(&vC0) > hero.swing_rope_length) { fast_vec_normalize(&vC0, &vC0, d); fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vC0); } @@ -1600,7 +1600,7 @@ void update_hero_motion_for_current_state(void) { &hero.motion.velocity, &hero.motion.velocity, &matrix_vector_workspace[3]); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0) { + if (hero.swing_hooked != 0 && hero.air_frames.s != 0) { if ((vz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0) { f32 t; s32 up; @@ -1761,7 +1761,7 @@ void update_hero_motion_for_current_state(void) { if (!jumping) { if (hero.heading_locked != 0 || (struct MobyView *)hero.melee_target != NULL) { s32 ok = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { f32 d = fast_subtract_rotations(hero.attack_target_yaw, hero.motion.rot.f[2]); f32 a = compute_directed_angle_delta( 1, hero.attack_target_yaw, hero.motion.rot.f[2]); @@ -2104,9 +2104,9 @@ void update_hero_motion_for_current_state(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0 && + if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } update_hero_target_speed_from_stick(); if (hero.unk930 > 0.0f) { @@ -2120,7 +2120,7 @@ void update_hero_motion_for_current_state(void) { clear_u64_value(move_impulse_ptr); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { f32 c = hero.stick_magnitude; @@ -2148,7 +2148,7 @@ void update_hero_motion_for_current_state(void) { { f32 a = frame_time_sq * 7.5f * k; f32 b = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { f32 m = 2.6179938f - hero.motion.yaw_error; if (m > 1.0f) { m = 1.0f; @@ -2161,13 +2161,13 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } clip_hero_horizontal_velocity(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -2293,7 +2293,7 @@ void update_hero_motion_for_current_state(void) { } flag = 0; if (has) { - flag = hero.unk20AA != 0; + flag = hero.weapon_up != 0; } moby_point_position((struct MobyView *)hero.moby, 9, &hero.joint9_world_pos); moby_point_position((struct MobyView *)hero.moby, 0xE, &hero.joint14_world_pos); @@ -2934,7 +2934,7 @@ void update_hero_motion_for_current_state(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -3176,7 +3176,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l16/hero/update_hero_state_transitions.c b/src/overlays/l16/hero/update_hero_state_transitions.c index 74d8adb321..3ccb3e38e0 100644 --- a/src/overlays/l16/hero/update_hero_state_transitions.c +++ b/src/overlays/l16/hero/update_hero_state_transitions.c @@ -272,8 +272,8 @@ void update_hero_state_transitions(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || item_available[0x1C] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || item_available[0x1C] == 0) { hero_set_state(0x81, 1); break; } @@ -330,7 +330,7 @@ void update_hero_state_transitions(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (((unsigned char *)hero.moby)[0x53] == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -362,7 +362,7 @@ void update_hero_state_transitions(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -406,7 +406,7 @@ void update_hero_state_transitions(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -417,7 +417,7 @@ void update_hero_state_transitions(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -437,7 +437,8 @@ void update_hero_state_transitions(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L16_001671D8) > 1.2217305f) { @@ -583,7 +584,7 @@ void update_hero_state_transitions(void) { } } hero.item_select_blocked = 1; - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0) || (item_available[4] != 0 && pad_pressed_within(0xA, scale_game_frames(7), 0))) { @@ -614,7 +615,7 @@ void update_hero_state_transitions(void) { break; } } - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { if (item_available[4] != 0 && (controller_state.held & 0xA)) { hero_set_state(0x35, 1); @@ -631,7 +632,7 @@ void update_hero_state_transitions(void) { hero.motion.displacement.f[2] = 0.0f; } if (0.1f > hero.stick_magnitude && hero.ground_speed == 0.0f && - hero.unk698 == 0) { + hero.swim_stroke_timer == 0) { hero_set_state(0x37, 1); } break; @@ -666,7 +667,7 @@ void update_hero_state_transitions(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -768,7 +769,8 @@ void update_hero_state_transitions(void) { HeroTableRow2C *rec = &D_L16_0017C088[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -876,7 +878,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_RUN, 1); } } - if (hero.state.current == HERO_STATE_RUN && hero.unk308 != 0) { + if (hero.state.current == HERO_STATE_RUN && hero.magnetic_floor != 0) { hero_set_state(0x3F, 1); } if (hero.grind_rail != 0) { @@ -886,13 +888,13 @@ void update_hero_state_transitions(void) { if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -1032,7 +1034,7 @@ void update_hero_state_transitions(void) { if (hero.selector_4 != 0) { break; } - if (hero.unk1E0 != 0) { + if (hero.sinking_floor_hold != 0) { break; } if (hero.voice_slot2 != -1) { @@ -1111,7 +1113,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -1178,7 +1180,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -1195,7 +1197,7 @@ void update_hero_state_transitions(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -1248,7 +1250,7 @@ void update_hero_state_transitions(void) { case HERO_STATE_GRIND_ATTACK: case HERO_STATE_GRIND_COLLISION_RECOVERY: if (hero.state.current == 0x42) { - hero.unk5BE = 0; + hero.grind_hit = 0; } else { int ice = 0; @@ -1260,7 +1262,7 @@ void update_hero_state_transitions(void) { } if (vector_length_xy(hero.motion.displacement.f) < vector_length_xy(hero.motion.velocity.f) * 0.5f || - ice || hero.unk5BE != 0) { + ice || hero.grind_hit != 0) { int ok = 1; if (current_level_index != LEVEL_KALEBO3) { @@ -1274,7 +1276,7 @@ void update_hero_state_transitions(void) { ok = 0; } } - hero.unk5BE = 0; + hero.grind_hit = 0; if (hero.health.hp >= 2 && ok) { hero_set_state(0x42, 1); if (ice) { @@ -1374,7 +1376,7 @@ void update_hero_state_transitions(void) { t = calculate_triangular_corrected_scalar( v0, v1, 0, hero.jump_gravity); hero.unk48C = t + 0.05f; - hero.unk430 = t; + hero.jump_height = t; hero.jump_gravity = hero.rail_jump_gravity; hero.jump_height_start = t; } @@ -1706,9 +1708,9 @@ void update_hero_state_transitions(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -1850,7 +1852,7 @@ void update_hero_state_transitions(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -2077,7 +2079,7 @@ void update_hero_state_transitions(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -2104,9 +2106,10 @@ void update_hero_state_transitions(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -2673,7 +2676,7 @@ void update_hero_state_transitions(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l16/mobys/taxi.c b/src/overlays/l16/mobys/taxi.c index ae5822f65e..aff03c24a1 100644 --- a/src/overlays/l16/mobys/taxi.c +++ b/src/overlays/l16/mobys/taxi.c @@ -227,7 +227,7 @@ void taxi_update(struct Moby *moby) { if (moby->state >= TAXI_BLEND_TO_PATH_START && moby->state <= TAXI_BLEND_TO_DESTINATION_POSE) { travel_player = &hero; travel_player->jump_lock_timer = 2; - travel_player->unk1F4 = 2; + travel_player->edge_brake_lock_timer = 2; transform_moby_table_entry_vectors(moby); if (voice_is_playing(moby, *(short *)(taxi_data + 0xAA)) == 0) { *(short *)(taxi_data + 0xAA) = allocate_voice_for_target_entry(0, 4, moby); diff --git a/src/overlays/l17/hero/hero_set_state.c b/src/overlays/l17/hero/hero_set_state.c index e769a2f37d..878bd1becf 100644 --- a/src/overlays/l17/hero/hero_set_state.c +++ b/src/overlays/l17/hero/hero_set_state.c @@ -137,14 +137,14 @@ int hero_set_state(int requested_state, int b) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail.pos[0]); } @@ -164,8 +164,8 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { enter_hero_idle_state_for_current_vehicle_mode(); @@ -199,7 +199,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (b) { @@ -225,7 +225,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (b) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -234,7 +234,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_DYING_SPEED_LIMITED: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.momentum, frame_time * 3.5f); @@ -245,15 +245,15 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_SINK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; - p->unk694 = p->motion.displacement.f[2] * 0.2f; - p->unk69C = p->water_surface_z - 0.37f; - if (p->unk694 < frame_time * -7.0f) - p->unk694 = frame_time * -7.0f; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.2f; + p->swim_water_level = p->water_surface_z - 0.37f; + if (p->swim_bob_velocity < frame_time * -7.0f) + p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (b) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); break; @@ -261,7 +261,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_SWIM: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; *(int *)&p->drown_sink_speed = 0; if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -285,7 +285,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; p->unk8F4 = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -305,7 +305,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); p->rand_timer.range = 0x68; @@ -320,7 +320,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->splash_effect_timer = 0; if (p->state.prev_control_mode == HERO_MODE_SWIM) { emit_hero_surface_effect_burst(3, 0xA, 0); @@ -349,7 +349,7 @@ int hero_set_state(int requested_state, int b) { } { struct Hero *q = &hero; - q->unk698 = 0; + q->swim_stroke_timer = 0; if (q->state.prev_control_mode == HERO_MODE_SWIM) { if ((float)q->underwater_air < 2500.0f) { help_queue_add(8, scale_game_frames(0x1E), 0); @@ -370,12 +370,12 @@ int hero_set_state(int requested_state, int b) { } { struct Hero *s = &hero; - s->unk694 = s->motion.displacement.f[2] * 0.37f; - if (s->unk694 < frame_time * -7.0f) - s->unk694 = frame_time * -7.0f; - s->unk69C = s->water_surface_z; + s->swim_bob_velocity = s->motion.displacement.f[2] * 0.37f; + if (s->swim_bob_velocity < frame_time * -7.0f) + s->swim_bob_velocity = frame_time * -7.0f; + s->swim_water_level = s->water_surface_z; s->unk6A0 = 0; - s->unk690 = s->motion.pos.f[2] - s->unk69C - -0.12f; + s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; FUN_L00_0025f730(&s->motion.momentum, frame_time * 5.5f); @@ -390,7 +390,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); p->item_select_blocked = 1; qcopy(&p->motion.velocity, &p->motion.displacement); @@ -424,9 +424,9 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; *(int *)&p->drown_sink_speed = 0; - p->unk698 = scale_game_frames(0x2D); + p->swim_stroke_timer = scale_game_frames(0x2D); p->rand_timer.range = 0x68; if (b) set_hero_animation(0x65, 0, (float)scale_game_frames(0x11)); @@ -436,7 +436,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; if (p->jump_button_frames > scale_game_frames(0x32)) { struct UsageStat *h = usage_stats.stat; @@ -478,7 +478,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (b) @@ -488,7 +488,7 @@ int hero_set_state(int requested_state, int b) { case 0x38: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (b) set_hero_animation(0x46, 0, (float)scale_game_frames(8)); break; @@ -496,7 +496,7 @@ int hero_set_state(int requested_state, int b) { case 0x39: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (b) set_hero_animation(0x47, 0, (float)scale_game_frames(8)); break; @@ -504,7 +504,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ANIMATION_WAIT_TO_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (b) set_hero_animation(0x48, 0, (float)scale_game_frames(8)); break; @@ -513,9 +513,9 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L17_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = select_hero_help_value(1); if (p->moby->prev_seq != t && b) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -526,7 +526,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(select_hero_help_value(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -535,7 +535,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(select_hero_help_value(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -544,7 +544,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -558,7 +558,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -567,7 +567,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(0, 1.0f); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -599,7 +599,7 @@ int hero_set_state(int requested_state, int b) { } else if (t->wading != 0 || t->state.current == 0x73) { t->state.current = 0x73; set_hero_animation(0x60, 0, (float)scale_game_frames(8)); - } else if (t->unk308 == 1 || t->state.current == 0x3F) { + } else if (t->magnetic_floor == 1 || t->state.current == 0x3F) { t->state.current = 0x3F; set_hero_animation(0x5B, 0, (float)scale_game_frames(8)); } else { @@ -631,7 +631,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ANIMATION_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (b) { if (p->state.prev == 4) { set_hero_animation(0x5E, 2, (float)scale_game_frames(5)); @@ -644,7 +644,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -664,7 +664,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VOICE_SLOT_CLEANUP_IDLE_EXIT: { struct Hero *p = &hero; p->state.control_mode = 0x10; - p->unk2284 = 3; + p->camera_mode = 3; p->item_select_blocked = 1; fill_transfer_words(&p->rail_yaw, 0, 0x20); qcopy(&p->motion.momentum, &p->motion.displacement); @@ -675,7 +675,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_ice_ground != 0) { hero_set_state(0x2F, 1); @@ -707,7 +707,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; char *v = &p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (b) { @@ -722,7 +722,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -751,7 +751,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -773,7 +773,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -784,7 +784,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -797,7 +797,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -812,7 +812,7 @@ int hero_set_state(int requested_state, int b) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -838,7 +838,7 @@ int hero_set_state(int requested_state, int b) { q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], q->swing_target_moby->pos.y - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); + q->swing_rope_length = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -858,7 +858,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (b) @@ -869,7 +869,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -883,7 +883,7 @@ int hero_set_state(int requested_state, int b) { float f; float t; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 3; + p->camera_mode = 3; p->rand_timer.range = 0x68; p->grind_direction = 1; p->grind_yaw_offset = -1.5707964f; @@ -939,7 +939,7 @@ int hero_set_state(int requested_state, int b) { float f; float t; p->state.control_mode = HERO_MODE_FOLLOW_PATH; - p->unk2284 = 3; + p->camera_mode = 3; p->item_select_blocked = 1; p->rand_timer.range = 0x68; p->follow_path_end_frames = 0; @@ -967,7 +967,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -987,7 +987,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (b) @@ -997,7 +997,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (b) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -1006,7 +1006,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (b) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -1015,7 +1015,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (b) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -1025,12 +1025,12 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -1064,9 +1064,9 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; int animation_transition = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -1081,7 +1081,7 @@ int hero_set_state(int requested_state, int b) { int landing_animation_transition = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -1120,9 +1120,9 @@ int hero_set_state(int requested_state, int b) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)(&hero.motion.velocity); @@ -1142,7 +1142,7 @@ int hero_set_state(int requested_state, int b) { allocate_hero_voice_for_entry(0xA, 0); u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -1165,7 +1165,7 @@ int hero_set_state(int requested_state, int b) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1173,13 +1173,13 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1187,29 +1187,30 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 14.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; u->unk48C = 1.98f; - u->unk430 = 1.95f; + u->jump_height = 1.95f; } else { gravity_set_z( (float *)(&u->motion.velocity), (float *)(&u->motion.velocity), 0.0f); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(2); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(2); + u->velocity_keys_end_frame = + scale_game_frames(0x23) + u->velocity_keys_start_frame; u->keyed_move_target_frame = 0.0f; u->unk3DC = 18.0f; u->keyed_anim_target_frame = scale_game_frames(0x28); - u->unk3E4 = level17_hero_water_surface_jump_velocity_keys; + u->velocity_keys = level17_hero_water_surface_jump_velocity_keys; } { struct Hero *w = &hero; w->item_select_blocked = 1; } } else if (u->state.current == 0x3C) { - u->unk430 = 5.5f; + u->jump_height = 5.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1217,7 +1218,7 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 13.0f; u->unk48C = 5.55f; u->jump_height_start = 5.5f; - u->unk498 = scale_game_frames(2); + u->jump_ramp_frames = scale_game_frames(2); u->jump_max_frames = scale_game_frames(0x78); hero_change_health(1); if (current_level_index == LEVEL_ORXON) { @@ -1253,7 +1254,7 @@ int hero_set_state(int requested_state, int b) { } { struct Hero *w = &hero; - w->unk430 = v + 1.7f; + w->jump_height = v + 1.7f; w->takeoff_frame = scale_game_frames(5); w->unk434 = 0.6f; w->apex_anim_frame = 18.0f; @@ -1261,10 +1262,10 @@ int hero_set_state(int requested_state, int b) { w->jump_land_anim_frame = 12.0f; w->unk48C = v + 1.75f; w->jump_height_start = v + 1.7f; - w->unk498 = scale_game_frames(0x13); + w->jump_ramp_frames = scale_game_frames(0x13); } } else if (u->state.current == 0x29) { - u->unk430 = 2.4f; + u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1272,13 +1273,13 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.45f; u->jump_height_start = 2.4f; - u->unk498 = scale_game_frames(0x11); + u->jump_ramp_frames = scale_game_frames(0x11); u->jump_gravity = frame_time_sq * 27.0f; u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; if (u->selector_5 != 0) { float h = 4.7f; - u->unk430 += h; + u->jump_height += h; u->jump_height_start += h; u->unk48C += h; u->jump_gravity = frame_time_sq * 14.0f; @@ -1288,13 +1289,13 @@ int hero_set_state(int requested_state, int b) { d.v.z = 145.0f; if (fast_vec_dist(&u->motion.pos, &d.v) < 10.0f) { h = 0.7f; - u->unk430 += h; + u->jump_height += h; u->jump_height_start += h; u->unk48C += h; } } } else if (u->state.current == 0x2A) { - u->unk430 = 2.5f; + u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1302,12 +1303,12 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.55f; u->jump_height_start = 2.5f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); u->jump_gravity = frame_time_sq * 24.0f; u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1315,13 +1316,13 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0x49) { - u->unk430 = 1.3f; + u->jump_height = 1.3f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1329,12 +1330,12 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 27.0f; u->unk48C = 1.35f; u->jump_height_start = 1.3f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_gravity = frame_time_sq * 25.0f; u->air_stick_speed = frame_time * 2.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1342,7 +1343,7 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -1350,7 +1351,7 @@ int hero_set_state(int requested_state, int b) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1358,8 +1359,8 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(((int)u->moby), x); @@ -1374,7 +1375,7 @@ int hero_set_state(int requested_state, int b) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -1382,14 +1383,14 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; *(int *)&u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x4C) { - u->unk430 = 1.55f; + u->jump_height = 1.55f; u->takeoff_frame = scale_game_frames(0xD); u->unk434 = 0.85f; u->apex_anim_frame = 10.0f; @@ -1397,11 +1398,11 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 18.0f; u->unk48C = 1.59f; u->jump_height_start = 1.55f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_gravity = frame_time_sq * 28.0f; *(int *)&u->ledge_jump_speed = 0; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -1409,16 +1410,16 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -1426,7 +1427,7 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -1434,15 +1435,15 @@ int hero_set_state(int requested_state, int b) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - u->unk3E4 = level17_hero_trail_jump_velocity_keys; + u->velocity_keys = level17_hero_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -1450,7 +1451,7 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -1458,17 +1459,18 @@ int hero_set_state(int requested_state, int b) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L17_0015F6E8; + w->velocity_keys = D_L17_0015F6E8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -1480,15 +1482,15 @@ int hero_set_state(int requested_state, int b) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1496,7 +1498,7 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -1519,7 +1521,7 @@ int hero_set_state(int requested_state, int b) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (b) { int s = q->state.current; if (s == 7) { @@ -1607,10 +1609,10 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1623,7 +1625,7 @@ int hero_set_state(int requested_state, int b) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1787,7 +1789,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ATTACK_RECORD_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x70) { int v = 5; if (D_L17_0017C528[p->attack_record].kind == 0) @@ -1814,7 +1816,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_GRIND_ATTACK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x2B) { p->attack_record = p->attack_record == 0; } else { @@ -1834,7 +1836,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (b) { char *m; @@ -1854,7 +1856,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (b) @@ -1865,9 +1867,9 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1900,7 +1902,7 @@ int hero_set_state(int requested_state, int b) { { struct Hero *r = &hero; r->state.control_mode = HERO_MODE_RESPAWN_WAIT; - r->unk2284 = 0; + r->camera_mode = 0; allocate_hero_voice_for_entry(9, 0); r->rand_timer.range = 0x68; r->target_speed = 0.0f; @@ -1913,7 +1915,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_HEIGHT_OR_TIMEOUT_RESPAWN_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RESPAWN_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; if (current_level_index == LEVEL_QUARTU) spawn_hero_radial_particle_burst(); p->collision_off_frames = 0x2710; @@ -1940,7 +1942,7 @@ int hero_set_state(int requested_state, int b) { { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; p->collision_off_frames = 0x2710; p->sink_surface_z = p->ground_z.f; @@ -1954,7 +1956,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; char *m; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; p->collision_off_frames = 0x2710; p->sink_surface_z = p->ground_z.f; @@ -1968,7 +1970,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_1_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { hero_set_state(0x52, 1); return 0; @@ -1980,7 +1982,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_1_LAND: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LAND; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -1992,7 +1994,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_1_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (b) @@ -2002,7 +2004,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_1_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (b) set_hero_animation(4, 0, (float)scale_game_frames(0xC)); @@ -2011,12 +2013,12 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_1_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); hero_change_health(1); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); p->invulnerable_frames = scale_game_frames(0x32); if (b) { set_hero_animation(6, 3, -3.0f); @@ -2034,7 +2036,7 @@ int hero_set_state(int requested_state, int b) { { struct Hero *q = &hero; q->state.control_mode = HERO_MODE_RUN; - q->unk2284 = 0; + q->camera_mode = 0; q->ground_speed = vector_length_xy(&q->motion.resolved_velocity); if (q->state.prev == 3) q->ground_speed = 0.0f; @@ -2049,7 +2051,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_1_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (b) @@ -2059,7 +2061,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ALT_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 12.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -2073,7 +2075,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ALT_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; if (b) set_hero_animation(0xA, 0, (float)scale_game_frames(6)); break; @@ -2081,7 +2083,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ALT_LEDGE_SHIMMY_YAW_PLUS_90: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; if (b) set_hero_animation(0xB, 0, (float)scale_game_frames(6)); break; @@ -2089,7 +2091,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ALT_LEDGE_SHIMMY_YAW_MINUS_90: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; if (b) set_hero_animation(0xC, 0, (float)scale_game_frames(6)); break; @@ -2097,7 +2099,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (b) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -2105,7 +2107,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (b) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -2115,7 +2117,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (b) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -2124,7 +2126,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -2135,7 +2137,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { Vec4 *v = &p->motion.resolved_velocity; struct Hero *g; @@ -2153,7 +2155,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (b) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -2162,7 +2164,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -2178,7 +2180,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -2197,13 +2199,13 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(select_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != select_hero_help_value(1)) { set_hero_animation(select_hero_help_value(1), 0, (float)scale_game_frames(5)); @@ -2213,7 +2215,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(select_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; } @@ -2221,7 +2223,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(select_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; @@ -2229,14 +2231,14 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(select_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -2247,7 +2249,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -2288,7 +2290,7 @@ int hero_set_state(int requested_state, int b) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } diff --git a/src/overlays/l17/hero/process_hero_hit_response.c b/src/overlays/l17/hero/process_hero_hit_response.c index 76b4ecdd68..27af9300af 100644 --- a/src/overlays/l17/hero/process_hero_hit_response.c +++ b/src/overlays/l17/hero/process_hero_hit_response.c @@ -48,10 +48,10 @@ int select_hero_help_value(int allow_slot_item_help) { if (hero_for_help_checks->item_anim_active == 0) { return 0; } - if (hero_for_help_checks->unk20AA == 0) { + if (hero_for_help_checks->weapon_up == 0) { return 0; } - if (hero_for_help_checks->unk22C8 != 0) { + if (hero_for_help_checks->weapon_lowered != 0) { return 0; } } @@ -116,7 +116,7 @@ s32 process_hero_hit_response(s32 apply_state_and_motion_response) { G.damage_source_moby = (struct Moby *)hero_moby_entry->target; D_0015EEA8++; if (G.state.control_mode == HERO_MODE_GRIND) { - G.unk5BE = 1; + G.grind_hit = 1; return 0; } if (apply_state_and_motion_response == 0) { diff --git a/src/overlays/l17/hero/update_hero_motion_for_current_state.c b/src/overlays/l17/hero/update_hero_motion_for_current_state.c index 073520bed8..97a50d290a 100644 --- a/src/overlays/l17/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l17/hero/update_hero_motion_for_current_state.c @@ -298,7 +298,7 @@ void update_hero_motion_for_current_state(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { scratch_vector.q = 0; scratch_vector.f[0] = 1.0f; transform_vector_by_basis( @@ -833,9 +833,9 @@ void update_hero_motion_for_current_state(void) { } } turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - fast_dec_timer(&hero.unk698); + fast_dec_timer(&hero.swim_stroke_timer); if (hero.state.current == 0x36) { - if (PD.no_direction != 0 && hero.unk698 != 0) { + if (PD.no_direction != 0 && hero.swim_stroke_timer != 0) { hero.target_speed = frame_time * 3.0f; } if (absolute_float(hero.motion.yaw_error) > 0.7853982f) { @@ -1063,7 +1063,7 @@ void update_hero_motion_for_current_state(void) { if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { above = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (above && scale_game_frames(40) < hero.state_timer) { if (hero.stick_magnitude > 0.25f) { f32 s; @@ -1079,7 +1079,7 @@ void update_hero_motion_for_current_state(void) { } } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < @@ -1122,19 +1122,19 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&temporary_vector, &vD0, &hero.motion.velocity); fast_vec_sub( &vC0, &temporary_vector, &((struct MobyView *)hero.swing_target_moby)->u10.v10); - fast_vec_normalize(&vC0, &vC0, hero.unk9A4); + fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add( &temporary_vector, &((struct MobyView *)hero.swing_target_moby)->u10.v10, &vC0); fast_vec_sub(&hero.motion.velocity, &temporary_vector, &vD0); - old = hero.unk9A4; - vendor_spring(&hero.unk9A4, + old = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - old; - if (fast_vec_length(&vC0) > hero.unk9A4) { + d = hero.swing_rope_length - old; + if (fast_vec_length(&vC0) > hero.swing_rope_length) { fast_vec_normalize(&vC0, &vC0, d); fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vC0); } @@ -1155,7 +1155,7 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &temporary_vector); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0) { + if (hero.swing_hooked != 0 && hero.air_frames.s != 0) { if ((vz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0) { f32 t; s32 up; @@ -1332,7 +1332,7 @@ void update_hero_motion_for_current_state(void) { if (!jumping) { if (hero.heading_locked != 0 || (struct MobyView *)hero.melee_target != NULL) { s32 ok = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { f32 d = fast_subtract_rotations(hero.attack_target_yaw, hero.motion.rot.f[2]); f32 a = compute_directed_angle_delta( 1, hero.attack_target_yaw, hero.motion.rot.f[2]); @@ -1703,9 +1703,9 @@ void update_hero_motion_for_current_state(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0 && + if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } update_hero_target_speed_from_stick(); if (hero.unk930 > 0.0f) { @@ -1719,7 +1719,7 @@ void update_hero_motion_for_current_state(void) { clear_u64_value(move_impulse); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { f32 c = hero.stick_magnitude; @@ -1747,7 +1747,7 @@ void update_hero_motion_for_current_state(void) { { f32 a = frame_time_sq * 7.5f * k; f32 b = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { f32 m = 2.6179938f - hero.motion.yaw_error; if (m > 1.0f) { m = 1.0f; @@ -1760,13 +1760,13 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } adjust_hero_velocity_from_collision_probes(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -1937,7 +1937,7 @@ void update_hero_motion_for_current_state(void) { } flag = 0; if (has) { - flag = hero.unk20AA != 0; + flag = hero.weapon_up != 0; } moby_point_position((struct MobyView *)hero.moby, 9, &hero.joint9_world_pos); moby_point_position((struct MobyView *)hero.moby, 0xE, &hero.joint14_world_pos); @@ -2676,7 +2676,7 @@ void update_hero_motion_for_current_state(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -3013,7 +3013,7 @@ void update_hero_motion_for_current_state(void) { 0, frame_scale_sq * 0.008f * g, frame_scale_sq * 0.15f, frame_time * 9.948377f * g); } speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -3157,7 +3157,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l17/hero/update_hero_state_transitions.c b/src/overlays/l17/hero/update_hero_state_transitions.c index 3f83f43b24..840b3ad45a 100644 --- a/src/overlays/l17/hero/update_hero_state_transitions.c +++ b/src/overlays/l17/hero/update_hero_state_transitions.c @@ -291,8 +291,8 @@ void update_hero_state_transitions(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || item_available[0x1C] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || item_available[0x1C] == 0) { hero_set_state(0x81, 1); break; } @@ -351,7 +351,7 @@ void update_hero_state_transitions(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (((unsigned char *)hero.moby)[0x53] == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -382,7 +382,7 @@ void update_hero_state_transitions(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -426,7 +426,7 @@ void update_hero_state_transitions(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -437,7 +437,7 @@ void update_hero_state_transitions(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -461,7 +461,8 @@ void update_hero_state_transitions(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L17_001676D8) > 1.2217305f) { @@ -607,7 +608,7 @@ void update_hero_state_transitions(void) { } } hero.item_select_blocked = 1; - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0) || (item_available[4] != 0 && pad_pressed_within(0xA, scale_game_frames(7), 0))) { @@ -638,7 +639,7 @@ void update_hero_state_transitions(void) { break; } } - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { if (item_available[4] != 0 && (controller_state.held & 0xA)) { hero_set_state(0x35, 1); @@ -655,7 +656,7 @@ void update_hero_state_transitions(void) { hero.motion.displacement.f[2] = 0.0f; } if (0.1f > hero.stick_magnitude && hero.ground_speed == 0.0f && - hero.unk698 == 0) { + hero.swim_stroke_timer == 0) { hero_set_state(0x37, 1); } break; @@ -701,7 +702,7 @@ void update_hero_state_transitions(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -803,7 +804,8 @@ void update_hero_state_transitions(void) { HeroTableRow2C *rec = &D_L17_0017C528[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -940,7 +942,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_RUN, 1); } } - if (hero.state.current == HERO_STATE_RUN && hero.unk308 != 0) { + if (hero.state.current == HERO_STATE_RUN && hero.magnetic_floor != 0) { hero_set_state(0x3F, 1); } if (hero.grind_rail != 0) { @@ -950,13 +952,13 @@ void update_hero_state_transitions(void) { if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -1159,7 +1161,7 @@ void update_hero_state_transitions(void) { if (hero.selector_4 != 0) { break; } - if (hero.unk1E0 != 0) { + if (hero.sinking_floor_hold != 0) { break; } if (hero.voice_slot2 != -1) { @@ -1237,7 +1239,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -1303,7 +1305,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -1320,7 +1322,7 @@ void update_hero_state_transitions(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -1373,7 +1375,7 @@ void update_hero_state_transitions(void) { case HERO_STATE_GRIND_ATTACK: case HERO_STATE_GRIND_COLLISION_RECOVERY: if (hero.state.current == 0x42) { - hero.unk5BE = 0; + hero.grind_hit = 0; } else { int grab; float len; @@ -1388,7 +1390,7 @@ void update_hero_state_transitions(void) { } len = vector_length_xy(hero.motion.displacement.f); if (len < vector_length_xy(hero.motion.velocity.f) * 0.5f || grab || - hero.unk5BE != 0) { + hero.grind_hit != 0) { int ok = 1; if (current_level_index != LEVEL_KALEBO3) { @@ -1403,7 +1405,7 @@ void update_hero_state_transitions(void) { ok = 0; } } - hero.unk5BE = 0; + hero.grind_hit = 0; if (hero.health.hp >= 2 && ok) { hero_set_state(0x42, 1); if (grab) { @@ -1503,7 +1505,7 @@ void update_hero_state_transitions(void) { query_position, spatial_query_vector, 0, hero.jump_gravity); hero.jump_height_start = t; hero.jump_gravity = hero.rail_jump_gravity; - hero.unk430 = t; + hero.jump_height = t; hero.unk48C = t + 0.05f; } } @@ -1853,9 +1855,9 @@ void update_hero_state_transitions(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -2004,7 +2006,7 @@ void update_hero_state_transitions(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -2233,7 +2235,7 @@ void update_hero_state_transitions(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -2260,9 +2262,10 @@ void update_hero_state_transitions(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -2589,9 +2592,10 @@ void update_hero_state_transitions(void) { hero.apex_anim_frame, predicted_apex_steps, 0.5f, -1.0f); break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, 0.5f, -1.0f); @@ -2652,7 +2656,7 @@ void update_hero_state_transitions(void) { } } if (scale_game_frames(1) < hero.rail_land_frames) { - hero.unk2284 = 0; + hero.camera_mode = 0; stick_target(0, 1.0f); if (hero.target_speed > D_L17_0017C6B8.fC && hero.stick_magnitude > 0.5f && hero.on_slip_ground == 0 && hero.move_lock_timer == 0 && @@ -3045,7 +3049,7 @@ void update_hero_state_transitions(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l17/mobys/door.c b/src/overlays/l17/mobys/door.c index f8c1617e8e..e2766e9a04 100644 --- a/src/overlays/l17/mobys/door.c +++ b/src/overlays/l17/mobys/door.c @@ -128,7 +128,7 @@ void door_update(struct Moby *door_moby) { } } (*(int *)(door_vars + ((0x20)))) = -1; - if (absolute_float(door_moby->rot.x) < 0.7853982f || hero.unk308 != 0) { + if (absolute_float(door_moby->rot.x) < 0.7853982f || hero.magnetic_floor != 0) { if (is_point_inside_clip_volume(&hero.motion.pos, (*(int *)(door_vars + ((0x18))))) == 0) { if ((*(int *)(door_vars + ((0x10)))) == -1) diff --git a/src/overlays/l17/mobys/dreks_fleet_turret.c b/src/overlays/l17/mobys/dreks_fleet_turret.c index 2f7ef06cad..bf1e2145d9 100644 --- a/src/overlays/l17/mobys/dreks_fleet_turret.c +++ b/src/overlays/l17/mobys/dreks_fleet_turret.c @@ -115,7 +115,7 @@ void dreks_fleet_turret_update(struct Moby *turret_moby) { break; case FLEET_TURRET_WAIT_FOR_TARGET: { struct Hero *g = &hero; - if (g->unk308 != 0) { + if (g->magnetic_floor != 0) { qcopy(targeting_vector_scratch, &turret_moby->pos); targeting_vector_scratch[2] += 10.0f; fast_vec_sub( @@ -137,7 +137,7 @@ void dreks_fleet_turret_update(struct Moby *turret_moby) { break; } case FLEET_TURRET_AIM_AND_FIRE_AT_ZONE: { - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { turret_moby->state = FLEET_TURRET_WAIT_FOR_TARGET; } { diff --git a/src/overlays/l17/mobys/dreks_fleet_turret_shot.c b/src/overlays/l17/mobys/dreks_fleet_turret_shot.c index 4d0f453861..26ef1da3a3 100644 --- a/src/overlays/l17/mobys/dreks_fleet_turret_shot.c +++ b/src/overlays/l17/mobys/dreks_fleet_turret_shot.c @@ -196,7 +196,7 @@ void fleet_turret_shot_update(struct Moby *moby) { if (hit != 0) { if (hit != drone_vars->unk3C) { g = &hero; - if (g->unk308 != 0 && hit == ((int)g->moby)) { + if (g->magnetic_floor != 0 && hit == ((int)g->moby)) { unsigned char *rec = D_00141968_x_q; if (*(unsigned short *)(rec + 0x458) == 0) { (*(unsigned short *)(rec + 0x458))++; @@ -212,7 +212,7 @@ void fleet_turret_shot_update(struct Moby *moby) { qcopy(&moby->pos, D_L17_00174760_lui); FUN_L00_002598b0_q((int)moby, 0.75f, &moby->pos, 1, 6.0f, 0.0f, 0, 1, 0); hero_state = &hero; - if (hero_state->unk308 != 0 && + if (hero_state->magnetic_floor != 0 && *(int *)(D_L17_00174760_lui - 8) == ((int)hero_state->moby)) { unsigned char *rec = D_00141968_x_q; if (*(unsigned short *)(rec + 0x458) == 0) { diff --git a/src/overlays/l17/mobys/fighter_jet.c b/src/overlays/l17/mobys/fighter_jet.c index b8a7b5946b..d19d346f91 100644 --- a/src/overlays/l17/mobys/fighter_jet.c +++ b/src/overlays/l17/mobys/fighter_jet.c @@ -1951,7 +1951,7 @@ void fighter_jet_update(ShipMoby *moby) { set_class_mobys_flags_and_collision(0x325, 0, 0, -1); moby->pos[2] += 3.0f; moby->scale = *(float *)(moby->pclass + 0x24) * D_L17_0016209C; - g->unk20A5 = 1; + g->hidden = 1; if (ship_vars->voice == -1) { ship_vars->voice = allocate_voice_for_target_entry(0, 4, moby); } @@ -1988,7 +1988,7 @@ void fighter_jet_update(ShipMoby *moby) { case FIGHTER_JET_STATE_DISMOUNT: { char *p; struct Hero *g = &hero; - g->unk20A5 = 0; + g->hidden = 0; ((ShipCamera *)g->moby)->unk98 = 0; FUN_L17_0021e530(0, 1); jet_end_mount(0); @@ -2064,7 +2064,7 @@ void fighter_jet_update(ShipMoby *moby) { if (ship_vars->fade >= 1.0f) { char *p; struct Hero *g = &hero; - g->unk20A5 = 0; + g->hidden = 0; ((ShipCamera *)g->moby)->unk98 = 0; FUN_L17_0021e530(0, 1); jet_end_mount(0); diff --git a/src/overlays/l17/mobys/floating_mine.c b/src/overlays/l17/mobys/floating_mine.c index 73f4ff0479..73980450af 100644 --- a/src/overlays/l17/mobys/floating_mine.c +++ b/src/overlays/l17/mobys/floating_mine.c @@ -111,7 +111,7 @@ void floating_mine_update(struct Moby *moby) { pos[2] = pos[2] + 0.75f; hero_contact_context = &hero; if (((char *)hero_contact_context->coll_hit_moby) == moby || - ((char *)hero_contact_context->unk240) == moby || + ((char *)hero_contact_context->wall_moby) == moby || func_L00_001F2BE8_alt(1.0f, pos, 0x10, moby, hit_descriptor)) { if (D_L17_00174758 != 0 && *(short *)(D_L17_00174758 + 0xA6) != 0x343) { spawn_explosion(moby, diff --git a/src/overlays/l17/mobys/magnet_elevator.c b/src/overlays/l17/mobys/magnet_elevator.c index 2dd13bf6ec..d18d97e8c4 100644 --- a/src/overlays/l17/mobys/magnet_elevator.c +++ b/src/overlays/l17/mobys/magnet_elevator.c @@ -303,7 +303,7 @@ void rebuild_magnet_elevator_world_path(struct Moby *moby) __asm__("FUN_L17_002e void rebuild_magnet_elevator_world_path(struct Moby *moby) { char *state = (char *)moby->pvars; - if (hero.unk308 && hero.ground_moby == moby) { + if (hero.magnetic_floor && hero.ground_moby == moby) { char *world_path_point = *(char **)(D_L17_001B0DB0 + *(int *)(state + 0x80) * 4) + 0x10; char *point = &moby->rot_row0; int i; diff --git a/src/overlays/l18/hero/apply_hero_ground_type_effects.c b/src/overlays/l18/hero/apply_hero_ground_type_effects.c index 6d706260a5..c6d7d5f7e1 100644 --- a/src/overlays/l18/hero/apply_hero_ground_type_effects.c +++ b/src/overlays/l18/hero/apply_hero_ground_type_effects.c @@ -37,7 +37,7 @@ void apply_hero_ground_type_effects(void) { hero_state->ground_sound_class = keep; hero_state->ground_type = -1; hero_state->wading = 0; - hero_state->unk308 = 0; + hero_state->magnetic_floor = 0; if (saved_ground_type == -1) return; if (saved_ground_type == GROUND_TYPE_MAGNETIC) { @@ -46,7 +46,7 @@ void apply_hero_ground_type_effects(void) { if (hero_state->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { char *item_moby = ((char *)hero_state->items[1].moby); if (item_moby != 0 && MOBY(item_moby)->oclass == 0xAD) - hero_state->unk308 = 1; + hero_state->magnetic_floor = 1; } } } @@ -228,7 +228,7 @@ s32 process_hero_hurt_response(s32 apply_hurt_response) { hero.damage_source_moby = (struct Moby *)response_record->p20; D_0015EEA8++; if (hero.state.control_mode == HERO_MODE_GRIND) { - hero.unk5BE = 1; + hero.grind_hit = 1; return 0; } if (hero.vehicle_mode == HERO_VEHICLE_MODE_GIANT_CLANK) { diff --git a/src/overlays/l18/hero/hero_set_state.c b/src/overlays/l18/hero/hero_set_state.c index 7c8a8be7c7..a1ab7bc816 100644 --- a/src/overlays/l18/hero/hero_set_state.c +++ b/src/overlays/l18/hero/hero_set_state.c @@ -111,14 +111,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); } @@ -138,8 +138,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { set_hero_state_for_vehicle_mode(); @@ -166,7 +166,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (animation_update_mode) { @@ -192,7 +192,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -201,7 +201,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SWIM: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; *(int *)&p->drown_sink_speed = 0; if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -225,7 +225,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; p->unk8F4 = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -246,7 +246,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { int n; int t; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); p->rand_timer.range = 0x68; @@ -262,7 +262,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->splash_effect_timer = 0; if (p->state.prev_control_mode == HERO_MODE_SWIM) { emit_hero_surface_effect_burst(3, 0xA, 0); @@ -294,7 +294,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } { struct Hero *q = &hero; - q->unk698 = 0; + q->swim_stroke_timer = 0; if (q->state.prev_control_mode == HERO_MODE_SWIM) { float d = (float)q->underwater_air; if (d < 2500.0f) { @@ -317,12 +317,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { } { struct Hero *s = &hero; - s->unk694 = s->motion.displacement.f[2] * 0.37f; - if (s->unk694 < frame_time * -7.0f) - s->unk694 = frame_time * -7.0f; - s->unk69C = s->water_surface_z; + s->swim_bob_velocity = s->motion.displacement.f[2] * 0.37f; + if (s->swim_bob_velocity < frame_time * -7.0f) + s->swim_bob_velocity = frame_time * -7.0f; + s->swim_water_level = s->water_surface_z; s->unk6A0 = 0; - s->unk690 = s->motion.pos.f[2] - s->unk69C - -0.12f; + s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; FUN_L00_0025f730(&s->motion.momentum, frame_time * 5.5f); @@ -337,7 +337,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); p->item_select_blocked = 1; qcopy(&p->motion.velocity, &p->motion.displacement); @@ -370,9 +370,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; *(int *)&p->drown_sink_speed = 0; - p->unk698 = scale_game_frames(0x2D); + p->swim_stroke_timer = scale_game_frames(0x2D); p->rand_timer.range = 0x68; if (animation_update_mode) set_hero_animation(0x65, 0, (float)scale_game_frames(0x11)); @@ -382,7 +382,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; if (p->jump_button_frames > scale_game_frames(0x32)) { struct UsageStat *h = usage_stats.stat; @@ -422,7 +422,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_update_mode) @@ -432,7 +432,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case 0x38: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(0x46, 0, (float)scale_game_frames(8)); break; @@ -440,7 +440,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case 0x39: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(0x47, 0, (float)scale_game_frames(8)); break; @@ -448,7 +448,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ANIMATION_WAIT_TO_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(0x48, 0, (float)scale_game_frames(8)); break; @@ -457,9 +457,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L18_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = get_hero_help_value(1); if (p->moby->prev_seq != t && animation_update_mode) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -470,7 +470,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -479,7 +479,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -488,7 +488,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -501,7 +501,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -510,7 +510,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(1.0f, 0); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -534,7 +534,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (t->wading != 0 || t->state.current == 0x73) { t->state.current = 0x73; set_hero_animation(0x60, 0, (float)scale_game_frames(8)); - } else if (t->unk308 == 1 || t->state.current == 0x3F) { + } else if (t->magnetic_floor == 1 || t->state.current == 0x3F) { t->state.current = 0x3F; set_hero_animation(0x5B, 0, (float)scale_game_frames(8)); } else { @@ -566,7 +566,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ANIMATION_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) { if (p->state.prev == 4) { set_hero_animation(0x5E, 2, (float)scale_game_frames(5)); @@ -579,7 +579,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -599,7 +599,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VOICE_SLOT_CLEANUP_IDLE_EXIT: { struct Hero *p = &hero; p->state.control_mode = 0x10; - p->unk2284 = 3; + p->camera_mode = 3; p->item_select_blocked = 1; fill_transfer_words((char *)p + 0x9D0, 0, 0x20); qcopy(&p->motion.momentum, &p->motion.displacement); @@ -610,7 +610,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { hero_set_state(HERO_STATE_SLIP, 1); @@ -638,7 +638,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *v = (char *)&p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (animation_update_mode) { @@ -653,7 +653,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -682,7 +682,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -704,7 +704,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -715,7 +715,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -728,7 +728,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { struct UsageStat *h = (struct UsageStat *)item_usage; if (h[12].count <= 0xFFFE) { @@ -743,7 +743,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; *(char **)&p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -769,7 +769,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], q->swing_target_moby->pos.y - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); + q->swing_rope_length = fast_vec_dist(&q->motion.pos, &q->swing_target_moby->pos); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -789,7 +789,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_update_mode) @@ -800,7 +800,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -814,7 +814,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { int seg; float t; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 3; + p->camera_mode = 3; p->rand_timer.range = 0x68; p->rail_off_frames = 0; p->grind_direction = 1; @@ -868,7 +868,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -888,7 +888,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (animation_update_mode) @@ -898,7 +898,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_update_mode) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -907,7 +907,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (animation_update_mode) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -916,7 +916,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -926,12 +926,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -961,9 +961,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; int animation_transition_code = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -978,7 +978,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { int animation_transition_code = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -1017,9 +1017,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)&hero.motion.velocity; @@ -1039,7 +1039,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { allocate_hero_voice_for_entry(0xA, 0); u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -1062,7 +1062,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1070,13 +1070,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1084,22 +1084,23 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; u->unk48C = 1.98f; - u->unk430 = 1.95f; + u->jump_height = 1.95f; } else { gravity_set_z( (float *)(&u->motion.velocity), (float *)(&u->motion.velocity), 0.0f); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(2); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(2); + u->velocity_keys_end_frame = + scale_game_frames(0x23) + u->velocity_keys_start_frame; u->keyed_move_target_frame = 0.0f; u->unk3DC = 18.0f; u->keyed_anim_target_frame = scale_game_frames(0x28); - u->unk3E4 = hero_water_surface_jump_velocity_key_profile; + u->velocity_keys = hero_water_surface_jump_velocity_key_profile; } { struct Hero *w = &hero; @@ -1115,7 +1116,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } { struct Hero *w = &hero; - w->unk430 = v + 1.7f; + w->jump_height = v + 1.7f; w->takeoff_frame = scale_game_frames(5); w->unk434 = 0.6f; w->apex_anim_frame = 18.0f; @@ -1123,10 +1124,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { w->jump_land_anim_frame = 12.0f; w->unk48C = v + 1.75f; w->jump_height_start = v + 1.7f; - w->unk498 = scale_game_frames(0x13); + w->jump_ramp_frames = scale_game_frames(0x13); } } else if (u->state.current == 0x29) { - u->unk430 = 2.4f; + u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1134,14 +1135,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.45f; u->jump_height_start = 2.4f; - u->unk498 = scale_game_frames(0x11); + u->jump_ramp_frames = scale_game_frames(0x11); u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; u->jump_gravity = frame_time_sq * 27.0f; if (u->selector_5 != 0) { float k = 4.7f; *(u128 *)grind_direction_or_jump_probe_position = 0; - u->unk430 = u->unk430 + k; + u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; u->unk48C = u->unk48C + k; u->jump_gravity = frame_time_sq * 14.0f; @@ -1151,13 +1152,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (fast_vec_dist(&u->motion.pos, grind_direction_or_jump_probe_position) < 10.0f) { k = 0.7f; - u->unk430 = u->unk430 + k; + u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; u->unk48C = u->unk48C + k; } } } else if (u->state.current == 0x2A) { - u->unk430 = 2.5f; + u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1165,12 +1166,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.55f; u->jump_height_start = 2.5f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; u->jump_gravity = frame_time_sq * 24.0f; } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1178,13 +1179,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0x5E) { - u->unk430 = 4.2f; + u->jump_height = 4.2f; u->takeoff_frame = scale_game_frames(0x13); u->unk434 = 0.6f; u->apex_anim_frame = 17.0f; @@ -1192,14 +1193,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 40.0f; u->unk48C = 4.3f; u->jump_height_start = 4.2f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->jump_gravity = frame_time_sq * 30.0f; u->air_turn_rate = frame_time * 4.3633232f; u->fall_gravity = frame_time_sq * 50.0f; u->jump_anim_retime_scale = 2.0f; u->air_stick_speed = frame_time * 4.0f; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1207,7 +1208,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -1215,7 +1216,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1223,8 +1224,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(((int)u->moby), x); @@ -1239,7 +1240,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -1247,14 +1248,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; *(int *)&u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -1262,16 +1263,16 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -1279,7 +1280,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -1287,15 +1288,15 @@ int hero_set_state(int requested_state, int animation_update_mode) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - u->unk3E4 = hero_trail_jump_velocity_key_profile; + u->velocity_keys = hero_trail_jump_velocity_key_profile; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -1303,7 +1304,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -1311,17 +1312,18 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = D_L18_0015F6E8; + w->velocity_keys = D_L18_0015F6E8; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -1333,15 +1335,15 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1349,7 +1351,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -1372,7 +1374,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (animation_update_mode) { int s = q->state.current; if (s == 7) { @@ -1456,10 +1458,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; *(int *)&p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -1472,7 +1474,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -1611,7 +1613,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_ATTACK_RECORD_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x70) { int v = 5; if (D_L18_0017C628[p->attack_record].kind == 0) @@ -1638,7 +1640,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_GRIND_ATTACK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x2B) { p->attack_record = p->attack_record == 0; } else { @@ -1658,7 +1660,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (animation_update_mode) { char *m; @@ -1678,7 +1680,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (animation_update_mode) @@ -1689,9 +1691,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -1724,7 +1726,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *r = &hero; r->state.control_mode = HERO_MODE_RESPAWN_WAIT; - r->unk2284 = 0; + r->camera_mode = 0; allocate_hero_voice_for_entry(9, 0); r->rand_timer.range = 0x68; r->target_speed = 0.0f; @@ -1737,7 +1739,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_HEIGHT_OR_TIMEOUT_RESPAWN_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RESPAWN_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; if (current_level_index == LEVEL_QUARTU) spawn_hero_radial_particle_burst(); p->collision_off_frames = 0x2710; @@ -1750,7 +1752,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_2_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xF)); break; @@ -1758,7 +1760,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_2_REPEATABLE_SQUARE_ACTION: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev == 0x60 || (p->state.prev2 == 0x60 && scale_game_frames(0xA) > p->state.prev_timer)) { p->attack_record = (p->attack_record + 1) % 3; @@ -1779,7 +1781,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_2_COOLDOWN_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(0xC, 0, (float)scale_game_frames(8)); break; @@ -1787,7 +1789,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_WAIT_FOR_CIRCLE_RELEASE_AND_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(8, 0, (float)scale_game_frames(8)); break; @@ -1795,7 +1797,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_2_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1811,7 +1813,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_2_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->unk3B8 = 0; if (animation_update_mode) @@ -1821,7 +1823,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_2_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(7, 0, (float)scale_game_frames(0xC)); @@ -1830,7 +1832,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_2_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); @@ -1845,7 +1847,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -1853,7 +1855,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (animation_update_mode) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -1863,7 +1865,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -1872,7 +1874,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -1883,7 +1885,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { char *v = (char *)&p->motion.resolved_velocity; struct Hero *hero_base; @@ -1901,7 +1903,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (animation_update_mode) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -1910,7 +1912,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -1926,7 +1928,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -1945,13 +1947,13 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != get_hero_help_value(1)) { set_hero_animation(get_hero_help_value(1), 0, (float)scale_game_frames(5)); @@ -1961,7 +1963,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; } @@ -1969,7 +1971,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; @@ -1977,14 +1979,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -1995,7 +1997,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -2036,7 +2038,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } diff --git a/src/overlays/l18/hero/process_hero_state_transitions.c b/src/overlays/l18/hero/process_hero_state_transitions.c index b0dc3e798d..ab86455b75 100644 --- a/src/overlays/l18/hero/process_hero_state_transitions.c +++ b/src/overlays/l18/hero/process_hero_state_transitions.c @@ -273,8 +273,8 @@ void process_hero_state_transitions(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || item_available[0x1C] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || item_available[0x1C] == 0) { hero_set_state(0x81, 1); break; } @@ -329,7 +329,7 @@ void process_hero_state_transitions(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (((unsigned char *)hero.moby)[0x53] == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -360,7 +360,7 @@ void process_hero_state_transitions(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -404,7 +404,7 @@ void process_hero_state_transitions(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -415,7 +415,7 @@ void process_hero_state_transitions(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -435,7 +435,8 @@ void process_hero_state_transitions(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L18_001677D8) > 1.2217305f) { @@ -575,7 +576,7 @@ void process_hero_state_transitions(void) { } } hero.item_select_blocked = 1; - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0) || (item_available[4] != 0 && pad_pressed_within(0xA, scale_game_frames(7), 0))) { @@ -605,7 +606,7 @@ void process_hero_state_transitions(void) { break; } } - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { if (item_available[4] != 0 && (controller_state.held & 0xA)) { hero_set_state(0x35, 1); @@ -622,7 +623,7 @@ void process_hero_state_transitions(void) { hero.motion.displacement.f[2] = 0.0f; } if (0.1f > hero.stick_magnitude && hero.ground_speed == 0.0f && - hero.unk698 == 0) { + hero.swim_stroke_timer == 0) { hero_set_state(0x37, 1); } break; @@ -668,7 +669,7 @@ void process_hero_state_transitions(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -767,7 +768,8 @@ void process_hero_state_transitions(void) { HeroTableRow2C *rec = &D_L18_0017C628[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -875,7 +877,7 @@ void process_hero_state_transitions(void) { hero_set_state(HERO_STATE_RUN, 1); } } - if (hero.state.current == HERO_STATE_RUN && hero.unk308 != 0) { + if (hero.state.current == HERO_STATE_RUN && hero.magnetic_floor != 0) { hero_set_state(0x3F, 1); } if (hero.grind_rail != 0) { @@ -885,13 +887,13 @@ void process_hero_state_transitions(void) { if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -1052,7 +1054,7 @@ void process_hero_state_transitions(void) { if (hero.selector_4 != 0) { break; } - if (hero.unk1E0 != 0) { + if (hero.sinking_floor_hold != 0) { break; } if (hero.voice_slot2 != -1) { @@ -1129,7 +1131,7 @@ void process_hero_state_transitions(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -1195,7 +1197,7 @@ void process_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -1212,7 +1214,7 @@ void process_hero_state_transitions(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -1263,7 +1265,7 @@ void process_hero_state_transitions(void) { case HERO_STATE_GRIND_ATTACK: case HERO_STATE_GRIND_COLLISION_RECOVERY: if (hero.state.current == 0x42) { - hero.unk5BE = 0; + hero.grind_hit = 0; } else { int ice = 0; @@ -1275,7 +1277,7 @@ void process_hero_state_transitions(void) { } if (vector_length_xy(hero.motion.displacement.f) < vector_length_xy(hero.motion.velocity.f) * 0.5f || - ice || hero.unk5BE != 0) { + ice || hero.grind_hit != 0) { int ok = 1; if (current_level_index != LEVEL_KALEBO3) { @@ -1297,7 +1299,7 @@ void process_hero_state_transitions(void) { ok = 0; } } - hero.unk5BE = 0; + hero.grind_hit = 0; if (hero.health.hp >= 2 && ok) { hero_set_state(0x42, 1); if (ice) { @@ -1400,7 +1402,7 @@ void process_hero_state_transitions(void) { 0, hero.jump_gravity); hero.unk48C = t + 0.05f; - hero.unk430 = t; + hero.jump_height = t; hero.jump_gravity = hero.rail_jump_gravity; hero.jump_height_start = t; } @@ -1738,9 +1740,9 @@ void process_hero_state_transitions(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -1882,7 +1884,7 @@ void process_hero_state_transitions(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -2108,7 +2110,7 @@ void process_hero_state_transitions(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -2135,9 +2137,10 @@ void process_hero_state_transitions(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -2505,7 +2508,7 @@ void process_hero_state_transitions(void) { } } if (scale_game_frames(1) < hero.rail_land_frames) { - hero.unk2284 = 0; + hero.camera_mode = 0; stick_target(0, 1.0f); if (hero.target_speed > D_L18_0017C7B8.fC && hero.stick_magnitude > 0.5f && hero.move_lock_timer == 0 && @@ -2756,7 +2759,7 @@ void process_hero_state_transitions(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (((unsigned char *)hero.moby)[0x53] != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/l18/hero/update_hero_motion_for_current_state.c b/src/overlays/l18/hero/update_hero_motion_for_current_state.c index df86458614..c1d954880e 100644 --- a/src/overlays/l18/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l18/hero/update_hero_motion_for_current_state.c @@ -298,7 +298,7 @@ void update_hero_motion_for_current_state(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { general_vector_or_hit_descriptor_scratch.q = 0; general_vector_or_hit_descriptor_scratch.f[0] = 1.0f; transform_vector_by_basis(&hero.motion.move_dir, @@ -804,9 +804,9 @@ void update_hero_motion_for_current_state(void) { } } turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - fast_dec_timer(&hero.unk698); + fast_dec_timer(&hero.swim_stroke_timer); if (hero.state.current == 0x36) { - if (PD.no_direction != 0 && hero.unk698 != 0) { + if (PD.no_direction != 0 && hero.swim_stroke_timer != 0) { hero.target_speed = frame_time * 3.0f; } if (absolute_float(hero.motion.yaw_error) > 0.7853982f) { @@ -1054,7 +1054,7 @@ void update_hero_motion_for_current_state(void) { if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { above = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (above && scale_game_frames(40) < hero.state_timer) { if (hero.stick_magnitude > 0.25f) { f32 s; @@ -1072,7 +1072,7 @@ void update_hero_motion_for_current_state(void) { } } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < @@ -1118,20 +1118,20 @@ void update_hero_motion_for_current_state(void) { fast_vec_sub(&vC0, &position_or_displacement_scratch, &((struct MobyView *)hero.swing_target_moby)->u10.v10); - fast_vec_normalize(&vC0, &vC0, hero.unk9A4); + fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&position_or_displacement_scratch, &((struct MobyView *)hero.swing_target_moby)->u10.v10, &vC0); fast_vec_sub(&hero.motion.velocity, &position_or_displacement_scratch, &vD0); - old = hero.unk9A4; - vendor_spring(&hero.unk9A4, + old = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - old; - if (fast_vec_length(&vC0) > hero.unk9A4) { + d = hero.swing_rope_length - old; + if (fast_vec_length(&vC0) > hero.swing_rope_length) { fast_vec_normalize(&vC0, &vC0, d); fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vC0); } @@ -1156,7 +1156,7 @@ void update_hero_motion_for_current_state(void) { &position_or_displacement_scratch); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0) { + if (hero.swing_hooked != 0 && hero.air_frames.s != 0) { if ((vz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0) { f32 t; s32 up; @@ -1330,7 +1330,7 @@ void update_hero_motion_for_current_state(void) { if (!jumping) { if (hero.heading_locked != 0 || (struct MobyView *)hero.melee_target != NULL) { s32 ok = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { f32 d = fast_subtract_rotations(hero.attack_target_yaw, hero.motion.rot.f[2]); f32 a = compute_directed_angle_delta( 1, hero.attack_target_yaw, hero.motion.rot.f[2]); @@ -1685,9 +1685,9 @@ void update_hero_motion_for_current_state(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0 && + if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } update_hero_target_speed_from_stick(); if (hero.unk930 > 0.0f) { @@ -1701,7 +1701,7 @@ void update_hero_motion_for_current_state(void) { clear_u64_value(move_impulse_ptr); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { f32 turn_control_scale = hero.stick_magnitude; @@ -1729,7 +1729,7 @@ void update_hero_motion_for_current_state(void) { { f32 a = frame_time_sq * 7.5f * k; f32 b = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { f32 m = 2.6179938f - hero.motion.yaw_error; if (m > 1.0f) { m = 1.0f; @@ -1742,13 +1742,13 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } adjust_hero_planar_velocity_from_probes(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -1876,7 +1876,7 @@ void update_hero_motion_for_current_state(void) { } flag = 0; if (has) { - flag = hero.unk20AA != 0; + flag = hero.weapon_up != 0; } moby_point_position((struct MobyView *)hero.moby, 9, &hero.joint9_world_pos); moby_point_position((struct MobyView *)hero.moby, 0xE, &hero.joint14_world_pos); @@ -2545,7 +2545,7 @@ void update_hero_motion_for_current_state(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -3028,7 +3028,7 @@ void update_hero_motion_for_current_state(void) { AN.f12F8 = a * 0.25f; AN.f13A8 = a * 0.57f; } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -3116,7 +3116,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l18/mobys/gadgebot.c b/src/overlays/l18/mobys/gadgebot.c index c45ca337d8..8b228044c3 100644 --- a/src/overlays/l18/mobys/gadgebot.c +++ b/src/overlays/l18/mobys/gadgebot.c @@ -98,7 +98,7 @@ void gadgebot_update(unsigned char *moby) { else MOBY(moby)->flags &= 0x7FFF; MOBY(moby)->flags |= 0x100; - MOBY(moby)->unk73 = D_L18_00162608; + MOBY(moby)->metal_alpha = D_L18_00162608; *(void **)(moby_vars + 0x140) = &D_L18_001625F0; *(float *)(moby_vars + 0x20) = 1.0f; moby_vars[0x58] = 8; diff --git a/src/overlays/l18/mobys/mine.c b/src/overlays/l18/mobys/mine.c index b9b045524e..c20c1f8247 100644 --- a/src/overlays/l18/mobys/mine.c +++ b/src/overlays/l18/mobys/mine.c @@ -316,7 +316,7 @@ void update_mine_detonation(unsigned char *moby) { hit = find_moby_hit(moby, 0x330000, 0); moby[0xA4] = 0xFF; if (((unsigned char *)hero_ptr->coll_hit_moby) == moby || - ((unsigned char *)hero_ptr->unk240) == moby || *(int *)(moby_vars + 0x19C) != 0) { + ((unsigned char *)hero_ptr->wall_moby) == moby || *(int *)(moby_vars + 0x19C) != 0) { explode_h(moby, D_L18_0015F580_h, 0, diff --git a/src/overlays/shared/camera/follow_camera_setup.c b/src/overlays/shared/camera/follow_camera_setup.c index f4a39825a0..ff72f51c54 100644 --- a/src/overlays/shared/camera/follow_camera_setup.c +++ b/src/overlays/shared/camera/follow_camera_setup.c @@ -268,7 +268,7 @@ void follow_camera_apply_overrides(O_2e6000 *camera_moby) { u8 *aim_height_data; camera_override_state = (S220 *)((u8 *)camera_moby->m + 0x220); - if (hero.unk2284 == 0xD && camera_override_state->i10 != 0x14D) { + if (hero.camera_mode == 0xD && camera_override_state->i10 != 0x14D) { rotation_or_blend_value = fast_add_rotations(hero.ledge_normal_yaw, 3.14159265f); direction_or_rotation_deltas[0] = fast_cos(rotation_or_blend_value); direction_or_rotation_deltas[1] = fast_sin(rotation_or_blend_value); @@ -318,7 +318,7 @@ void follow_camera_apply_overrides(O_2e6000 *camera_moby) { camera_spring_state->f3C = follow_camera_vehicle_collision_probe_scale_gp; camera_spring_state->f44 = follow_camera_vehicle_collision_probe_step_growth_factor_gp; } - if (hero.unk20AA != 0 && hero.state.control_mode != HERO_MODE_GRIND) { + if (hero.weapon_up != 0 && hero.state.control_mode != HERO_MODE_GRIND) { set_follow_camera_orbit_clamp_mode(0); follow_camera_start_slide(); follow_camera_set_lateral_spring(0.04f, 0.2f); diff --git a/src/overlays/shared/camera/grindrail_camera.c b/src/overlays/shared/camera/grindrail_camera.c index eb480e9a95..2cd77cb317 100644 --- a/src/overlays/shared/camera/grindrail_camera.c +++ b/src/overlays/shared/camera/grindrail_camera.c @@ -611,7 +611,7 @@ void update_camera_mode_from_preset(CamUser *camera_user) __asm__("FUN_L01_00316 void update_camera_mode_from_preset(CamUser *camera_user) { CameraPreset *camera_preset = l01_camera_preset_rows[camera_user->slot].preset; - if (hero.unk2284 == camera_user->unk86) { + if (hero.camera_mode == camera_user->unk86) { if (camera_preset->target < 0) { return; } diff --git a/src/overlays/shared/camera/hero_aligned_camera.c b/src/overlays/shared/camera/hero_aligned_camera.c index d400f85ec6..4094a69402 100644 --- a/src/overlays/shared/camera/hero_aligned_camera.c +++ b/src/overlays/shared/camera/hero_aligned_camera.c @@ -312,8 +312,8 @@ void update_hero_aligned_camera_from_input(u8 *camera_object) { camera_rotation_state = *(S_9f38 **)(camera_object + 0x70); update_hero_aligned_camera_position(camera_object); FUN_001f9bf8_c(&up, ((u8 *)hero.moby) + 0xE0, 1.0f); - if (l00_camera.transition_mode == 0 && hero.unk20A5 == 0) - hero.unk20A5 = 1; + if (l00_camera.transition_mode == 0 && hero.hidden == 0) + hero.hidden = 1; rotation_input_target = -controller_state.analog[2]; if (rotation_input_target == 0.0f) rotation_input_target = -controller_state.analog[0]; @@ -335,7 +335,7 @@ void update_hero_aligned_camera_from_input(u8 *camera_object) { &camera_rotation_state->va); if (rotation_input_scratch != 0.0f) build_look_at_matrix(camera_object, camera_object, &up, k * rotation_input_scratch); - if (hero.motion.platform_carry.f[3] != 0.0f && hero.unk308 == 0) + if (hero.motion.platform_carry.f[3] != 0.0f && hero.magnetic_floor == 0) build_look_at_matrix(camera_object, camera_object, &up, hero.motion.platform_carry.f[3]); rotation_input_target = -controller_state.analog[3]; if (rotation_input_target == 0.0f) @@ -546,7 +546,7 @@ void select_camera_mode_by_hero_vector_alignment(A_2ea810 *camera_object) { float residual_length_product; float dot_product_or_asin_result; - if (hero.unk2284 == 0x51 || hero.unk2284 == 4) { + if (hero.camera_mode == 0x51 || hero.camera_mode == 4) { return; } if (Q.transition_mode == 0) { diff --git a/src/overlays/shared/camera/swing_volume_camera.c b/src/overlays/shared/camera/swing_volume_camera.c index 524416d657..c5287d0213 100644 --- a/src/overlays/shared/camera/swing_volume_camera.c +++ b/src/overlays/shared/camera/swing_volume_camera.c @@ -393,7 +393,7 @@ s32 volume_camera_swing_check(struct UpdateCam *swing_camera_record) { if (hero_data->frames_off_ground.s != 0) { if (current_level_index != LEVEL_OLTANIS) return 0; - if (hero_data->unk2284 != 13) + if (hero_data->camera_mode != 13) return 0; } } diff --git a/src/overlays/shared/camera/target_tracking_camera.c b/src/overlays/shared/camera/target_tracking_camera.c index 5aac1dcb80..1cb8fe2241 100644 --- a/src/overlays/shared/camera/target_tracking_camera.c +++ b/src/overlays/shared/camera/target_tracking_camera.c @@ -360,7 +360,8 @@ void conditionally_set_camera_state_three(char *camera_object) __asm__("FUN_L00_ void conditionally_set_camera_state_three(char *camera_object) { struct Hero *hero_data = &hero; - if (hero_data->unk2284 != *(short *)(camera_object + 0x86) && hero_data->state.current != 6) { + if (hero_data->camera_mode != *(short *)(camera_object + 0x86) && + hero_data->state.current != 6) { *(char *)(camera_object + 0x7D) = 0; *(short *)(camera_object + 0x7E) = 3; } diff --git a/src/overlays/shared/cutscenes/update_cutscene_playback.c b/src/overlays/shared/cutscenes/update_cutscene_playback.c index c6eb55456d..c9b6869412 100644 --- a/src/overlays/shared/cutscenes/update_cutscene_playback.c +++ b/src/overlays/shared/cutscenes/update_cutscene_playback.c @@ -435,7 +435,7 @@ void start_scene(int scene_id) { D_L00_0015F5C0_macro[1] = 2; D_L00_0015F400 = 0; hero_set_state(100, 2); - hero.unk20A5 = 1; + hero.hidden = 1; set_hero_item_moby_flag_bit0(); if (active_scene_trigger.moby) active_scene_trigger.moby->flags |= 1; @@ -536,7 +536,7 @@ void finish_cutscene(void) { hero_candidate_z = probe_ground_height(&hero.motion.pos, 0, 0.5f); if (2.0f < hero_candidate_z && absolute_float(hero.motion.pos.f[2] - hero_candidate_z) < 4.5f) hero.motion.pos.f[2] = hero_candidate_z; - hero.unk20A5 = 0; + hero.hidden = 0; update_hero_item_moby_flags(); if (D_L00_0016C860_298b18.x46) { f = probe_ground_height(D_L00_0016C860_298b18.v, 0, 0.5f); diff --git a/src/overlays/shared/enemies/bomb_spawner_bomb.c b/src/overlays/shared/enemies/bomb_spawner_bomb.c index 1009325561..aa23a0d2d8 100644 --- a/src/overlays/shared/enemies/bomb_spawner_bomb.c +++ b/src/overlays/shared/enemies/bomb_spawner_bomb.c @@ -145,7 +145,7 @@ struct Moby *revive_spawner_pooled_child(struct Moby *spawner_moby, Vec4 *at, s3 } current_moby->unk71 = 0xFF; current_moby->occlusion = 0x7F80; - current_moby->unk72 = 0xFF; + current_moby->lod_dist = 0xFF; current_moby->hit_slot = 0xFF; if (spawner_data->options & 2) { current_moby->scale = ((SpawnClass *)current_moby->pclass)->scale * 0.1f; diff --git a/src/overlays/shared/enemies/spawner_egg.c b/src/overlays/shared/enemies/spawner_egg.c index 830b9f19f8..c8c46460d2 100644 --- a/src/overlays/shared/enemies/spawner_egg.c +++ b/src/overlays/shared/enemies/spawner_egg.c @@ -114,7 +114,7 @@ struct Moby *respawn_spawner_child(struct Moby *parent_spawner_moby, Vec4 *pos) spawned_moby->flags |= 0x400; spawned_moby->occlusion = 0x7f80; spawned_moby->unk71 = 0xff; - spawned_moby->unk72 = 0xff; + spawned_moby->lod_dist = 0xff; spawned_moby->hit_slot = 0xff; if (owner_vars[0x93] != 0) spawned_moby->scale = spawned_moby->pclass->scale * 0.1f; diff --git a/src/overlays/shared/hero/advance_hero_animation.c b/src/overlays/shared/hero/advance_hero_animation.c index 3f02dd45ee..96634abde6 100644 --- a/src/overlays/shared/hero/advance_hero_animation.c +++ b/src/overlays/shared/hero/advance_hero_animation.c @@ -132,12 +132,12 @@ void advance_hero_animation(void) { (struct VoiceSlot670 *)(((u8 *)&voice_pool) + hero_moby->sound_slot * 0x70); if (active_voice_slot->owner != hero_moby) { hero_moby->sound_slot = 0xFF; - } else if (active_voice_slot->sound != hero_moby->unk7C) { + } else if (active_voice_slot->sound != hero_moby->seq_sound) { release_voice_slot(hero_moby->sound_slot); hero_moby->sound_slot = 0xFF; } - } else if (hero_moby->unk7C != 0xFF && D_L00_0015F5C4 != 2 && D_L00_0015F5C4 != 6) { - hero_moby->sound_slot = allocate_voice_for_target_entry(hero_moby->unk7C, 4, hero_moby); + } else if (hero_moby->seq_sound != 0xFF && D_L00_0015F5C4 != 2 && D_L00_0015F5C4 != 6) { + hero_moby->sound_slot = allocate_voice_for_target_entry(hero_moby->seq_sound, 4, hero_moby); } sync_hero_slot3_animation_speed(); sync_hero_mapped_moby_animation_speed(); diff --git a/src/overlays/shared/hero/handle_hero_hit.c b/src/overlays/shared/hero/handle_hero_hit.c index 3605db62c2..452fad73a4 100644 --- a/src/overlays/shared/hero/handle_hero_hit.c +++ b/src/overlays/shared/hero/handle_hero_hit.c @@ -64,7 +64,7 @@ s32 handle_hero_hit(s32 apply_response) { G.damage_source_moby = (struct Moby *)hero_moby_entry->target; D_0015EEA8++; if (G.state.control_mode == HERO_MODE_GRIND) { - G.unk5BE = 1; + G.grind_hit = 1; return 0; } if (apply_response == 0) { diff --git a/src/overlays/shared/hero/hero_frame_update.c b/src/overlays/shared/hero/hero_frame_update.c index 4645e75d61..3575980665 100644 --- a/src/overlays/shared/hero/hero_frame_update.c +++ b/src/overlays/shared/hero/hero_frame_update.c @@ -55,9 +55,9 @@ int get_hero_idle_animation_index(int item_lookup_enabled) { return 0; if (hero_state_base->item_anim_active == 0) return 0; - if (hero_state_base->unk20AA == 0) + if (hero_state_base->weapon_up == 0) return 0; - if (hero_state_base->unk22C8 != 0) + if (hero_state_base->weapon_lowered != 0) return 0; item_id = hero_slot_item_id(0); item_record = D_L01_00179F40 - (-(item_id * 0x4C)); @@ -352,7 +352,7 @@ void update_hero_ground_material_effects(void) { hero_ptr->ground_sound_class = saved; hero_ptr->ground_type = -1; hero_ptr->wading = 0; - hero_ptr->unk308 = 0; + hero_ptr->magnetic_floor = 0; if (saved_ground_type == -1) return; if (saved_ground_type == GROUND_MATERIAL_MAGNETIC) { @@ -361,7 +361,7 @@ void update_hero_ground_material_effects(void) { if (hero_ptr->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { char *item_slot_1_moby = (char *)hero_ptr->items[1].moby; if (item_slot_1_moby != 0 && MOBY(item_slot_1_moby)->oclass == 0xAD) - hero_ptr->unk308 = 1; + hero_ptr->magnetic_floor = 1; } } } @@ -461,7 +461,7 @@ void update_hero_ledge_probe(void) { u8 *moby_record; char *moby_data; - if (hero.unk308 == 2) + if (hero.magnetic_floor == 2) return; hero.ledge_found = 0; if (hero.ledge_probe_cooldown != 0) @@ -628,7 +628,7 @@ int test_hero_ledge_ahead(Vec4 *ledge_probe_origin, f32 *facing_yaw) { inc, limit; int found, hit, i, j, material; - if (hero.unk308 == 2) + if (hero.magnetic_floor == 2) return 0; drop = -0.7f; @@ -1054,7 +1054,7 @@ void clip_hero_horizontal_velocity(int flag) { char *slope_hit, *slide_hit; float *slide_normal; - if (hero_ptr->unk308 != 0) { + if (hero_ptr->magnetic_floor != 0) { return; } if (gravity_length_xy((float *)(&hero_ptr->motion.velocity)) < frame_time * 0.1f) { @@ -1112,7 +1112,7 @@ void clip_hero_horizontal_velocity(int flag) { slide_hit = D_L01_001742C0_lui; slide_normal = (float *)(slide_hit + 0x40); *(int *)(slide_hit + 0x48) = 0; - slide_hero->unk240 = *(int *)(slide_hit + 0x18); + slide_hero->wall_moby = *(int *)(slide_hit + 0x18); sceVu0Normalize(slide_normal, slide_normal); { float c = -slide_hero->motion.velocity.f[0] * *(float *)(slide_hit + 0x40) - @@ -1279,12 +1279,12 @@ void update_hero_ground_contact_and_gravity(void) { } hero.ground_pitch.i = 0; hero.unk2E8.i = 0; - hero.unk2D0.i[0] = 0; - hero.unk2D0.i[1] = 0; - hero.unk2C8.i[0] = 0; - hero.unk2C8.i[1] = 0; - hero.unk2C0.i[0] = 0; - hero.unk2C0.i[1] = 0; + hero.side_probe_roll.i[0] = 0; + hero.side_probe_roll.i[1] = 0; + hero.side_probe_pitch.i[0] = 0; + hero.side_probe_pitch.i[1] = 0; + hero.side_probe_drop.i[0] = 0; + hero.side_probe_drop.i[1] = 0; if (hero.state.control_mode == HERO_MODE_GRIND || hero.state.control_mode == 0x15 || hero.state.control_mode == HERO_MODE_ATTACK || hero.state.control_mode == HERO_MODE_JUMP || hero.state.control_mode == HERO_MODE_LAND || hero.state.control_mode == HERO_MODE_LEDGE) { @@ -1310,22 +1310,22 @@ void update_hero_ground_contact_and_gravity(void) { &unused_side_probe_point, 0.2f, side_probe_angle, -0.45f); if (FUN_001efa68_c(&side_ray_start, &collision_ray_end, 0x22, (s32)hero.moby, 0)) { f = HH.point.f[2] - hero.ground_z.f; - hero.unk2C0.f[i] = f; + hero.side_probe_drop.f[i] = f; if (0.4f < absolute_float(f)) { - hero.unk2C0.f[i] = 0.0f; + hero.side_probe_drop.f[i] = 0.0f; } FUN_00125180_c(&normalized_side_hit_normal, (u8 *)&HH.normal_x); compute_rotated_vector_angles(&normalized_side_hit_normal, &side_hit_angles); if (-0.78539819f < side_hit_angles.f[1] && side_hit_angles.f[1] < 0.78539819f) { - hero.unk2C8.f[i] = side_hit_angles.f[1]; + hero.side_probe_pitch.f[i] = side_hit_angles.f[1]; } if (-0.78539819f < side_hit_angles.f[0] && side_hit_angles.f[0] < 0.78539819f) { - hero.unk2D0.f[i] = side_hit_angles.f[0]; + hero.side_probe_roll.f[i] = side_hit_angles.f[0]; } } else { - hero.unk2C0.i[i] = 0; - hero.unk2C8.f[i] = hero.ground_pitch.f; - hero.unk2D0.f[i] = hero.unk2E8.f; + hero.side_probe_drop.i[i] = 0; + hero.side_probe_pitch.f[i] = hero.ground_pitch.f; + hero.side_probe_roll.f[i] = hero.unk2E8.f; } } } @@ -1474,7 +1474,7 @@ void update_hero_timers_and_vehicle_transitions(void) { fast_dec_timer_s16(&hero.unk1B2); fast_dec_timer(&hero.long_jump_lockout); fast_dec_timer_s16(&hero.jump_lockout_timer); - fast_dec_timer_s16(&hero.unk1DE); + fast_dec_timer_s16(&hero.dive_lock); fast_dec_timer(&hero.wall_jump_window); fast_dec_timer_s16(&hero.unk1F0); fast_dec_timer_s16(&hero.ledge_probe_cooldown); @@ -1486,10 +1486,10 @@ void update_hero_timers_and_vehicle_transitions(void) { fast_dec_timer(&hero.unk1D0); fast_dec_timer(&hero.jump_buffer_lockout); fast_dec_timer_s16(&hero.fidget_cooldown); - fast_dec_timer_s16(&hero.unk1E0); - fast_dec_timer_s16(&hero.unk1EE); + fast_dec_timer_s16(&hero.sinking_floor_hold); + fast_dec_timer_s16(&hero.hit_flash_timer); fast_dec_timer_s16(&hero.unk1EA); - fast_dec_timer_s16(&hero.unk1F4); + fast_dec_timer_s16(&hero.edge_brake_lock_timer); fast_dec_timer_s16(&hero.jump_lock_timer); fast_dec_timer_s16(&hero.unk1DC); fast_dec_timer_s16(&hero.unk1F6); @@ -1608,7 +1608,7 @@ void select_hero_locomotion_state(void) { struct Hero *hero_ptr, *run_hero, *stop_idle_hero; s32 run_frames_or_idle_selector; hero_ptr = &hero; - hero_ptr->unk2284 = 0; + hero_ptr->camera_mode = 0; stick_target(0, 1.0f); if (pad_held_lui & 0xA) { l01_hero_set_state(HERO_STATE_CROUCH, 0); diff --git a/src/overlays/shared/hero/hero_handle_jump_press.c b/src/overlays/shared/hero/hero_handle_jump_press.c index f53de599e8..678d738167 100644 --- a/src/overlays/shared/hero/hero_handle_jump_press.c +++ b/src/overlays/shared/hero/hero_handle_jump_press.c @@ -285,7 +285,8 @@ s32 try_start_hero_item_idle_animation(void) __asm__("FUN_L00_00229a98"); s32 try_start_hero_item_idle_animation(void) { struct Hero *hero_ptr = &hero; s32 id, k; - if (hero_ptr->item_anim_active == 0 || hero_ptr->unk20AA == 0 || hero_ptr->unk22C8 != 0) + if (hero_ptr->item_anim_active == 0 || hero_ptr->weapon_up == 0 || + hero_ptr->weapon_lowered != 0) return 0; id = hero_slot_item_id(0); if (id != hero_ptr->item_anim_item_id) { diff --git a/src/overlays/shared/hero/hero_idle_sequence.c b/src/overlays/shared/hero/hero_idle_sequence.c index 5ba41d78f3..8242d137f5 100644 --- a/src/overlays/shared/hero/hero_idle_sequence.c +++ b/src/overlays/shared/hero/hero_idle_sequence.c @@ -111,10 +111,10 @@ int hero_idle_sequence(int allow_item_idle_sequence) { if (idle_sequence_state->item_anim_active == 0) { return 0; } - if (idle_sequence_state->unk20AA == 0) { + if (idle_sequence_state->weapon_up == 0) { return 0; } - if (idle_sequence_state->unk22C8 != 0) { + if (idle_sequence_state->weapon_lowered != 0) { return 0; } } @@ -484,18 +484,18 @@ void update_hero_glow_and_extra_manipulators(void) { green = green_swing + 0xA0; blue_pulse = blue_swing + 0xC; blue = blue_swing + 0x4C; - if (glow_owner->unk1EE != 0) { + if (glow_owner->hit_flash_timer != 0) { f32 fade = 1.0f; s32 fade_in = scale_game_frames(5); s32 fade_out = scale_game_frames(20); - s32 remaining = glow_owner->unk1EE; + s32 remaining = glow_owner->hit_flash_timer; if (scale_game_frames(45) - fade_in < remaining) { - fade = convert_integer_to_float(scale_game_frames(45) - glow_owner->unk1EE); + fade = convert_integer_to_float(scale_game_frames(45) - glow_owner->hit_flash_timer); fade = fade / convert_integer_to_float(fade_in); } - if (glow_owner->unk1EE < fade_out) { - fade = convert_integer_to_float(glow_owner->unk1EE); + if (glow_owner->hit_flash_timer < fade_out) { + fade = convert_integer_to_float(glow_owner->hit_flash_timer); fade = fade / convert_integer_to_float(fade_out); } red = red - truncate_float_to_s32((f32)red_pulse * fade); @@ -1032,7 +1032,7 @@ void release_and_clear_hero_voice_slots(void) { struct Moby **mobys; hero_state = &hero; - mobys = hero_state->unk2238; + mobys = hero_state->sound_slot_moby; slot = &hero_state->grind_voice; expected_owner_byte_offset = 0; for (i = 7; i >= 0; i--) { @@ -1938,7 +1938,7 @@ void update_hero_moby(void) { struct Moby *hero_moby; hero.moby->hit_slot = 0xFF; - if (hero.unk20A5) { + if (hero.hidden) { set_hero_item_moby_flag_bit0(); } else { update_hero_item_moby_flags(); @@ -1993,7 +1993,7 @@ void update_hero_vehicle_moby(void) { u128 position_scratch; float second_position_offset; unsigned char *hero_moby; - if (hero.unk20A5) { + if (hero.hidden) { set_hero_moby_flag_bit0(); } else { clear_hero_moby_flag_bit0(); @@ -2477,7 +2477,7 @@ void fast_sin_cf(int seed, int limit) { int i; struct Hero *hero_state; - if (limit < ++hero.unk908) { + if (limit < ++hero.bow_ring_counter) { for (i = 0; i < 2; i++) { if (i == 0) { planar_effect_angle_radians = fast_add_rotations(hero.motion.rot.f[2], 0.785398f); @@ -2506,9 +2506,9 @@ void fast_sin_cf(int seed, int limit) { effect_side_value); } if (seed) { - hero_state->unk908 = random_integer_below(seed); + hero_state->bow_ring_counter = random_integer_below(seed); } else { - hero_state->unk908 = 0; + hero_state->bow_ring_counter = 0; } } } @@ -2526,7 +2526,7 @@ void emit_hero_periodic_surface_particles(int counter_reset_range, int effect_spawn_counter_threshold) { struct Hero *P = &hero; - if (effect_spawn_counter_threshold < ++P->unk906) { + if (effect_spawn_counter_threshold < ++P->spray_counter) { V_209848 spawn_position, outgoing_motion; float planar_angle, planar_motion_scale; int k; @@ -2553,7 +2553,7 @@ void emit_hero_periodic_surface_particles(int counter_reset_range, { short h = random_integer_below(counter_reset_range); struct Hero *Q = &hero; - Q->unk906 = h; + Q->spray_counter = h; } } } @@ -2795,7 +2795,7 @@ void update_hero_collision_ease_target(void) { struct Hero *hit_hero_state_base; float probe_z_offset, probe_end_radius, distance_based_ease_value, state_frame_scale_squared, frame_scale_squared; - hero_state_base->unk22C8 = 0; + hero_state_base->weapon_lowered = 0; if (hero_state_base->item_slot_anim_count == 0) return; if (hero_slot_item_id(0) == 0x1A) @@ -2808,7 +2808,7 @@ void update_hero_collision_ease_target(void) { state_ease_table[9].max_speed = state_frame_scale_squared * 0.3f; } probe_end_radius = 1.29999995f; - if (hero_state_base->unk22C8 != 0) + if (hero_state_base->weapon_lowered != 0) probe_end_radius = 1.5999999f; probe_z_offset = 0.569999993f; if (hero_state_base->item_anim_active != 0) @@ -2837,7 +2837,7 @@ void update_hero_collision_ease_target(void) { if (distance_based_ease_value < -1.22173047f) distance_based_ease_value = -1.22173047f; hit_ease_table[9].rot_target.f[1] = distance_based_ease_value; - hit_hero_state_base->unk22C8 = 1; + hit_hero_state_base->weapon_lowered = 1; } extern char D_0013F350_0020a500[] __asm__("D_0013F350"); @@ -3370,7 +3370,8 @@ void probe_hero_airborne_wall_contact(void) { } hero_state = &hero; if (hero_state->unk22B4 != 0) { - f = fast_difference_between_rotations(hero_state->unk470.f[3], hero_state->unk460.f[3]); + f = fast_difference_between_rotations(hero_state->wall_jump_normal.f[3], + hero_state->unk460.f[3]); if (f < 2.9670596f) { return; } @@ -3597,7 +3598,7 @@ void check_ledge_grab(void) { Obj *moby_info; Obj *moby_props; - if (((Hero *)D_0013F450_20C568)->unk308 == 2) + if (((Hero *)D_0013F450_20C568)->magnetic_floor == 2) return; ((Hero *)D_0013F450_20C568)->ledge_found = 0; if (((Hero *)D_0013F450_20C568)->ledge_probe_cooldown != 0) diff --git a/src/overlays/shared/hero/hero_move_state_velocity.c b/src/overlays/shared/hero/hero_move_state_velocity.c index a148774570..3251c5179a 100644 --- a/src/overlays/shared/hero/hero_move_state_velocity.c +++ b/src/overlays/shared/hero/hero_move_state_velocity.c @@ -132,13 +132,13 @@ void hero_move_state_velocity(void) { build_scaled_hero_move_impulse(0.7f, ED6C * 0.0f); qcopy(&hero.motion.momentum, &hero.move_impulse); } else if (state == HERO_STATE_REPEATABLE_JUMP) { - hero.motion.move_yaw = hero.unk470.f[3]; - qcopy(&hero.motion.move_dir, &hero.unk470); + hero.motion.move_yaw = hero.wall_jump_normal.f[3]; + qcopy(&hero.motion.move_dir, &hero.wall_jump_normal); if (FUN_001f96f8_214658(9) < hero.state_timer) { turn_to(-1, ED64 * 0.042f, ED64 * 0.2f, ED6C * 11.868238f); } if (FUN_001f96f8_214658(9) <= hero.state_timer) { - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { hero.motion.velocity.f[0] = FUN_001f9dc8_214658(hero.motion.move_yaw) * (ED6C * 4.9f); hero.motion.velocity.f[1] = @@ -257,7 +257,7 @@ void update_hero_transformed_negative_z_angle_parameters(void) { f32 *vector_components = transformed_negative_z_vector.f; f32 limit, x, y, pitch, z, lean; struct Hero *state = &hero; - if (state->unk308 == 0) + if (state->magnetic_floor == 0) return; transformed_negative_z_vector.q = 0; vector_components[2] = -1.0f; @@ -1137,9 +1137,9 @@ void emit_filtered_entry_sparkles(int voice_target, int entry_count) { if (entry_count != 0) { struct Hero *hero_base = (struct Hero *)(D_0013E533 + 0xE1D); int i; - if (hero_base->unkA64 == 0) { + if (hero_base->melee_hit == 0) { allocate_voice_for_target_entry(1, 0, voice_target); - hero_base->unkA64 = 1; + hero_base->melee_hit = 1; } for (i = 0; i < entry_count; i++) { int *entry_type_lookup_pointer = D_L00_00177F00[i]; diff --git a/src/overlays/shared/hero/hero_set_state.c b/src/overlays/shared/hero/hero_set_state.c index 6d04ac1ec7..c7946f54ed 100644 --- a/src/overlays/shared/hero/hero_set_state.c +++ b/src/overlays/shared/hero/hero_set_state.c @@ -152,7 +152,7 @@ void update_hero_timers_and_reach_state(void) { fast_dec_timer_s16(&hero.unk1B2); FUN_001f9740_2215c8(&hero.long_jump_lockout); fast_dec_timer_s16(&hero.jump_lockout_timer); - fast_dec_timer_s16(&hero.unk1DE); + fast_dec_timer_s16(&hero.dive_lock); FUN_001f9740_2215c8(&hero.wall_jump_window); fast_dec_timer_s16(&hero.unk1F0); fast_dec_timer_s16(&hero.ledge_probe_cooldown); @@ -164,10 +164,10 @@ void update_hero_timers_and_reach_state(void) { FUN_001f9740_2215c8(&hero.unk1D0); FUN_001f9740_2215c8(&hero.jump_buffer_lockout); fast_dec_timer_s16(&hero.fidget_cooldown); - fast_dec_timer_s16(&hero.unk1E0); - fast_dec_timer_s16(&hero.unk1EE); + fast_dec_timer_s16(&hero.sinking_floor_hold); + fast_dec_timer_s16(&hero.hit_flash_timer); fast_dec_timer_s16(&hero.unk1EA); - fast_dec_timer_s16(&hero.unk1F4); + fast_dec_timer_s16(&hero.edge_brake_lock_timer); fast_dec_timer_s16(&hero.jump_lock_timer); fast_dec_timer_s16(&hero.unk1DC); fast_dec_timer_s16(&hero.unk1F6); @@ -720,14 +720,14 @@ int hero_set_state(int requested_state, int b) { p->state.prev_control_mode = p->state.control_mode; p->state.current = requested_state; p->state.step = 0; - p->unk20A5 = 0; + p->hidden = 0; p->item_use_locked = 0; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; p->unk20B2 = 0; - p->unk20AF = 0; + p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail.pos[0]); } @@ -747,8 +747,8 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; - p->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); + p->camera_mode = 0; + p->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x64)); clear_hero_idle_rotation_targets(); if (p->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { set_hero_idle_state_for_vehicle_mode(); @@ -782,7 +782,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_AT_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; clear_u64_value(&p->motion.momentum); p->rand_timer.range = 0x68; if (b) { @@ -808,7 +808,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (b) set_hero_animation(0x45, 0, (float)scale_game_frames(0xC)); @@ -817,7 +817,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_DYING_SPEED_LIMITED: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.momentum, frame_time * 3.5f); @@ -828,15 +828,15 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_SINK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; - p->unk694 = p->motion.displacement.f[2] * 0.2f; - p->unk69C = p->water_surface_z - 0.37f; - if (p->unk694 < frame_time * -7.0f) - p->unk694 = frame_time * -7.0f; + p->swim_bob_velocity = p->motion.displacement.f[2] * 0.2f; + p->swim_water_level = p->water_surface_z - 0.37f; + if (p->swim_bob_velocity < frame_time * -7.0f) + p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; p->unk6A0 = 0; - p->unk690 = p->motion.pos.f[2] - p->unk69C; + p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (b) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); break; @@ -844,7 +844,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_SWIM: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; *(int *)&p->drown_sink_speed = 0; if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -868,7 +868,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; p->unk8F4 = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { @@ -888,7 +888,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; int n; p->state.control_mode = HERO_MODE_SWIM; - p->unk2284 = 0xB; + p->camera_mode = 0xB; p->item_select_blocked = 1; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); p->rand_timer.range = 0x68; @@ -903,7 +903,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->splash_effect_timer = 0; if (p->state.prev_control_mode == HERO_MODE_SWIM) { emit_hero_surface_effect_burst(3, 0xA, 0); @@ -932,7 +932,7 @@ int hero_set_state(int requested_state, int b) { } { struct Hero *q = &hero; - q->unk698 = 0; + q->swim_stroke_timer = 0; if (q->state.prev_control_mode == HERO_MODE_SWIM) { if ((float)q->underwater_air < 2500.0f) { help_queue_add(8, scale_game_frames(0x1E), 0); @@ -953,12 +953,12 @@ int hero_set_state(int requested_state, int b) { } { struct Hero *s = &hero; - s->unk694 = s->motion.displacement.f[2] * 0.37f; - if (s->unk694 < frame_time * -7.0f) - s->unk694 = frame_time * -7.0f; - s->unk69C = s->water_surface_z; + s->swim_bob_velocity = s->motion.displacement.f[2] * 0.37f; + if (s->swim_bob_velocity < frame_time * -7.0f) + s->swim_bob_velocity = frame_time * -7.0f; + s->swim_water_level = s->water_surface_z; s->unk6A0 = 0; - s->unk690 = s->motion.pos.f[2] - s->unk69C - -0.12f; + s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; FUN_L00_0025f730(&s->motion.momentum, frame_time * 5.5f); @@ -973,7 +973,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); p->item_select_blocked = 1; qcopy(&p->motion.velocity, &p->motion.displacement); @@ -1006,9 +1006,9 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_WATER_SURFACE; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; *(int *)&p->drown_sink_speed = 0; - p->unk698 = scale_game_frames(0x2D); + p->swim_stroke_timer = scale_game_frames(0x2D); p->rand_timer.range = 0x68; if (b) set_hero_animation(0x65, 0, (float)scale_game_frames(0x11)); @@ -1018,7 +1018,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; if (p->jump_button_frames > scale_game_frames(0x32)) { struct UsageStat *h = usage_stats.stat; @@ -1060,7 +1060,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; p->item_select_blocked = 1; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (b) @@ -1070,7 +1070,7 @@ int hero_set_state(int requested_state, int b) { case 0x38: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (b) set_hero_animation(0x46, 0, (float)scale_game_frames(8)); break; @@ -1078,7 +1078,7 @@ int hero_set_state(int requested_state, int b) { case 0x39: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (b) set_hero_animation(0x47, 0, (float)scale_game_frames(8)); break; @@ -1086,7 +1086,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ANIMATION_WAIT_TO_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0x13; - p->unk2284 = 0; + p->camera_mode = 0; if (b) set_hero_animation(0x48, 0, (float)scale_game_frames(8)); break; @@ -1095,9 +1095,9 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; int t; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 4; + p->camera_mode = 4; *(int *)&D_L00_0015F688 = scale_game_frames(0x3C); - if (p->unk20AA == 0) { + if (p->weapon_up == 0) { t = hero_idle_sequence(1); if (p->moby->prev_seq != t && b) { set_hero_animation(t, 0, (float)scale_game_frames(0x12)); @@ -1108,7 +1108,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ITEM_BUTTON_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(hero_idle_sequence(0), 0, (float)scale_game_frames(0xA)); p->unk1D0 = scale_game_frames(7); @@ -1117,7 +1117,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(hero_idle_sequence(0), 0, (float)scale_game_frames(5)); p->unk1D0 = scale_game_frames(7); @@ -1126,7 +1126,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; p->unk3B8 = 0; @@ -1140,7 +1140,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_SHALLOW_WATER_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev_control_mode != HERO_MODE_JUMP && p->state.prev2_control_mode != HERO_MODE_JUMP) { p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); @@ -1149,7 +1149,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *q = &hero; if (frame_time * 7.0f < q->ground_speed) q->ground_speed = frame_time * 7.0f; - q->unk3BE = 0; + q->sharp_turn = 0; stick_target(0, 1.0f); if (1.5707964f < fast_difference_between_rotations(q->motion.rot.f[2], q->motion.move_yaw)) { @@ -1181,7 +1181,7 @@ int hero_set_state(int requested_state, int b) { } else if (t->wading != 0 || t->state.current == 0x73) { t->state.current = 0x73; set_hero_animation(0x60, 0, (float)scale_game_frames(8)); - } else if (t->unk308 == 1 || t->state.current == 0x3F) { + } else if (t->magnetic_floor == 1 || t->state.current == 0x3F) { t->state.current = 0x3F; set_hero_animation(0x5B, 0, (float)scale_game_frames(8)); } else { @@ -1215,7 +1215,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ANIMATION_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; if (b) { if (p->state.prev == 4) { set_hero_animation(0x5E, 2, (float)scale_game_frames(5)); @@ -1228,7 +1228,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_APPROACH_TARGET_POSE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->item_use_locked = 1; if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) @@ -1249,7 +1249,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VOICE_SLOT_CLEANUP_IDLE_EXIT: { struct Hero *p = &hero; p->state.control_mode = 0x10; - p->unk2284 = 3; + p->camera_mode = 3; p->item_select_blocked = 1; fill_transfer_words(&p->rail_yaw, 0, 0x20); qcopy(&p->motion.momentum, &p->motion.displacement); @@ -1260,7 +1260,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_STOP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (p->on_ice_ground != 0) { hero_set_state(0x2F, 1); @@ -1292,7 +1292,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; char *v = &p->motion.resolved_velocity; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = gravity_length_xy((float *)v); qcopy(&p->motion.momentum, v); if (b) { @@ -1307,7 +1307,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_CROUCH: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_CROUCH; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); if (frame_time * 7.0f < p->ground_speed) p->ground_speed = frame_time * 7.0f; @@ -1336,7 +1336,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_GRAPPLE_TARGET_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; { char *h = ((char *)&item_usage); if (*(unsigned short *)(h + 0x60) <= 0xFFFE) { @@ -1360,7 +1360,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_APPROACH_TARGET_MOBY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; p->item_use_locked = 1; @@ -1371,7 +1371,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRAPPLE; - p->unk2284 = 7; + p->camera_mode = 7; p->item_use_locked = 1; *(int *)&p->grapple_pull_speed = 0; p->grapple_pull_ending = 0; @@ -1384,7 +1384,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; char *d; p->state.control_mode = HERO_MODE_GRAPPLE_SWING; - p->unk2284 = 7; + p->camera_mode = 7; { char *h = ((char *)&item_usage); if (*(unsigned short *)(h + 0x60) <= 0xFFFE) { @@ -1400,7 +1400,7 @@ int hero_set_state(int requested_state, int b) { p->swing_length_vel = 0.0f; p->item_use_locked = 1; p->swing_target_moby = ((char *)p->swing_target); - p->unk99C = 0; + p->swing_hooked = 0; p->swing_anim_dir = 0; *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; @@ -1427,7 +1427,8 @@ int hero_set_state(int requested_state, int b) { q->swing_yaw = fast_arc_tan( *(float *)(((char *)q->swing_target_moby) + 0x10) - q->motion.pos.f[0], *(float *)(((char *)q->swing_target_moby) + 0x14) - q->motion.pos.f[1]); - q->unk9A4 = fast_vec_dist(&q->motion.pos, ((char *)q->swing_target_moby) + 0x10); + q->swing_rope_length = + fast_vec_dist(&q->motion.pos, ((char *)q->swing_target_moby) + 0x10); q->swing_gravity = frame_time_sq * 27.0f; if (q->state.prev_control_mode == HERO_MODE_JUMP) { q->swing_gravity = q->jump_gravity; @@ -1447,7 +1448,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ITEM_RELEASE_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 7; + p->camera_mode = 7; clear_u64_value(&p->motion.rot_spring_vel); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (b) @@ -1458,7 +1459,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = 0xB; p->rise_fall_target_frame = 39.0f; - p->unk2284 = 0x50; + p->camera_mode = 0x50; *(int *)&p->past_apex = 0; p->rise_fall_land_frames = 0; p->rise_fall_gravity = frame_time_sq * 100.0f; @@ -1472,7 +1473,7 @@ int hero_set_state(int requested_state, int b) { float f; float t; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 3; + p->camera_mode = 3; p->rand_timer.range = 0x68; p->grind_direction = 1; p->grind_yaw_offset = -1.5707964f; @@ -1529,7 +1530,7 @@ int hero_set_state(int requested_state, int b) { float f; float t; p->state.control_mode = HERO_MODE_FOLLOW_PATH; - p->unk2284 = 3; + p->camera_mode = 3; p->item_select_blocked = 1; p->rand_timer.range = 0x68; p->follow_path_end_frames = 0; @@ -1557,7 +1558,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -1577,7 +1578,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; p->rand_timer.range = 0x68; if (b) @@ -1587,7 +1588,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (b) set_hero_animation(0x24, 0, (float)scale_game_frames(6)); @@ -1596,7 +1597,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->item_select_blocked = 1; if (b) set_hero_animation(0x25, 0, (float)scale_game_frames(6)); @@ -1605,7 +1606,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (b) set_hero_animation(0xB, 0, (float)scale_game_frames(0xC)); @@ -1615,12 +1616,12 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_FATAL_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; if (p->state.current == 0x77) { if (p->vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - p->health.unk22B2 = allocate_hero_voice_for_entry(0x17, 0x20); + p->health.fall_voice_slot = allocate_hero_voice_for_entry(0x17, 0x20); } p->pivot_rot_x_target = randf_sym(frame_time * 3.1415927f, frame_time * 4.3633232f); p->fatal_fall_tumble_target_y = @@ -1654,9 +1655,9 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; int animation_timing_preset = -2; p->state.control_mode = HERO_MODE_RUN; - p->unk22CA = 1; + p->hover_latch = 1; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -1671,7 +1672,7 @@ int hero_set_state(int requested_state, int b) { int animation_timing_selector = -2; p->state.control_mode = HERO_MODE_LAND; p->rand_timer.range = 0x68; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -1710,9 +1711,9 @@ int hero_set_state(int requested_state, int b) { p->state.control_mode = HERO_MODE_JUMP; if (requested_state >= HERO_STATE_GRIND_JUMP && requested_state <= HERO_STATE_GRIND_RAIL_TRANSFER) { - p->unk2284 = 3; + p->camera_mode = 3; } else { - p->unk2284 = 0x50; + p->camera_mode = 0x50; } { char *v = (char *)(&hero.motion.velocity); @@ -1732,7 +1733,7 @@ int hero_set_state(int requested_state, int b) { allocate_hero_voice_for_entry(0xA, 0); u->smoothed_ground_z = u->motion.pos.f[2]; u->jump_gravity = frame_time_sq * 29.7f; - u->unk3E8 = -1; + u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; u->unk4A8 = u->on_ice_ground; @@ -1755,7 +1756,7 @@ int hero_set_state(int requested_state, int b) { u->fall_gravity = 0.0f; u->unk22B4 = 0; if (u->state.current == 7) { - u->unk430 = 1.47f; + u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1763,13 +1764,13 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 12.0f; u->unk48C = 2.62f; u->jump_height_start = 1.47f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1777,29 +1778,30 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 14.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; u->unk48C = 1.98f; - u->unk430 = 1.95f; + u->jump_height = 1.95f; } else { gravity_set_z( (float *)(&u->motion.velocity), (float *)(&u->motion.velocity), 0.0f); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(2); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(2); + u->velocity_keys_end_frame = + scale_game_frames(0x23) + u->velocity_keys_start_frame; u->keyed_move_target_frame = 0.0f; u->unk3DC = 18.0f; u->keyed_anim_target_frame = scale_game_frames(0x28); - u->unk3E4 = D_L00_0017BF60_e; + u->velocity_keys = D_L00_0017BF60_e; } { struct Hero *w = &hero; w->item_select_blocked = 1; } } else if (u->state.current == 0x3C) { - u->unk430 = 5.5f; + u->jump_height = 5.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1807,7 +1809,7 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 13.0f; u->unk48C = 5.55f; u->jump_height_start = 5.5f; - u->unk498 = scale_game_frames(2); + u->jump_ramp_frames = scale_game_frames(2); u->jump_max_frames = scale_game_frames(0x78); hero_change_health(1); if (current_level_index == LEVEL_ORXON) { @@ -1843,7 +1845,7 @@ int hero_set_state(int requested_state, int b) { } { struct Hero *w = &hero; - w->unk430 = v + 1.7f; + w->jump_height = v + 1.7f; w->takeoff_frame = scale_game_frames(5); w->unk434 = 0.6f; w->apex_anim_frame = 18.0f; @@ -1851,10 +1853,10 @@ int hero_set_state(int requested_state, int b) { w->jump_land_anim_frame = 12.0f; w->unk48C = v + 1.75f; w->jump_height_start = v + 1.7f; - w->unk498 = scale_game_frames(0x13); + w->jump_ramp_frames = scale_game_frames(0x13); } } else if (u->state.current == 0x29) { - u->unk430 = 2.4f; + u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1862,13 +1864,13 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.45f; u->jump_height_start = 2.4f; - u->unk498 = scale_game_frames(0x11); + u->jump_ramp_frames = scale_game_frames(0x11); u->jump_gravity = frame_time_sq * 27.0f; u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; if (u->selector_5 != 0) { float h = 4.7f; - u->unk430 += h; + u->jump_height += h; u->jump_height_start += h; u->unk48C += h; u->jump_gravity = frame_time_sq * 14.0f; @@ -1878,13 +1880,13 @@ int hero_set_state(int requested_state, int b) { d.v.z = 145.0f; if (fast_vec_dist(&u->motion.pos, &d.v) < 10.0f) { h = 0.7f; - u->unk430 += h; + u->jump_height += h; u->jump_height_start += h; u->unk48C += h; } } } else if (u->state.current == 0x2A) { - u->unk430 = 2.5f; + u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1892,12 +1894,12 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 14.0f; u->unk48C = 2.55f; u->jump_height_start = 2.5f; - u->unk498 = scale_game_frames(0xA); + u->jump_ramp_frames = scale_game_frames(0xA); u->jump_gravity = frame_time_sq * 24.0f; u->state.control_mode = HERO_MODE_GRIND; u->rail_gap_jump = 0; } else if (u->state.current == 9) { - u->unk430 = 1.0f; + u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1905,13 +1907,13 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 11.0f; u->unk48C = 2.7f; u->jump_height_start = 1.0f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; u->unk4AC = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0x5E) { - u->unk430 = 4.2f; + u->jump_height = 4.2f; u->takeoff_frame = scale_game_frames(0x13); u->unk434 = 0.6f; u->apex_anim_frame = 17.0f; @@ -1919,14 +1921,14 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 40.0f; u->unk48C = 4.3f; u->jump_height_start = 4.2f; - u->unk498 = scale_game_frames(0xF); + u->jump_ramp_frames = scale_game_frames(0xF); u->jump_gravity = frame_time_sq * 30.0f; u->air_turn_rate = frame_time * 4.3633232f; u->fall_gravity = frame_time_sq * 50.0f; u->jump_anim_retime_scale = 2.0f; u->air_stick_speed = frame_time * 4.0f; } else if (u->state.current == 0x49) { - u->unk430 = 1.3f; + u->jump_height = 1.3f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1934,12 +1936,12 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 27.0f; u->unk48C = 1.35f; u->jump_height_start = 1.3f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_gravity = frame_time_sq * 25.0f; u->air_stick_speed = frame_time * 2.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0xA) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -1947,7 +1949,7 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 10.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); @@ -1955,7 +1957,7 @@ int hero_set_state(int requested_state, int b) { u->unk4A6 = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; - u->unk430 = 1.5f; + u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.8f; u->apex_anim_frame = 18.0f; @@ -1963,8 +1965,8 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 11.0f; u->unk48C = 1.55f; u->jump_height_start = 1.5f; - u->unk498 = scale_game_frames(1); - u->unk430 = 0.4f; + u->jump_ramp_frames = scale_game_frames(1); + u->jump_height = 0.4f; u->jump_height_start = 0.4f; u->unk48C = 0.9f; initialize_moby_transform_history(((int)u->moby), x); @@ -1979,7 +1981,7 @@ int hero_set_state(int requested_state, int b) { u->air_speed_step_up = frame_time_sq * 44.0f; u->jump_decel = frame_time_sq * 50.0f; } else if (u->state.current == 0x1C) { - u->unk430 = 2.0f; + u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); u->unk434 = 0.85f; u->apex_anim_frame = 20.0f; @@ -1987,14 +1989,14 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 19.0f; u->unk48C = 2.05f; u->jump_height_start = 2.0f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; u->jump_gravity = frame_time_sq * 25.0f; *(int *)&u->ledge_jump_speed = 0; u->item_select_blocked = 1; u->can_chain_high_jump = 1; } else if (u->state.current == 0x4C) { - u->unk430 = 1.55f; + u->jump_height = 1.55f; u->takeoff_frame = scale_game_frames(0xD); u->unk434 = 0.85f; u->apex_anim_frame = 10.0f; @@ -2002,11 +2004,11 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 18.0f; u->unk48C = 1.59f; u->jump_height_start = 1.55f; - u->unk498 = scale_game_frames(1); + u->jump_ramp_frames = scale_game_frames(1); u->jump_gravity = frame_time_sq * 28.0f; *(int *)&u->ledge_jump_speed = 0; } else if (u->state.current == 0x11) { - u->unk430 = 3.3f; + u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 12.0f; @@ -2014,16 +2016,16 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 10.0f; u->unk48C = 3.35f; u->jump_height_start = 3.3f; - u->unk498 = scale_game_frames(0xC); + u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->unk470, &u->unk460); + qcopy(&u->wall_jump_normal, &u->unk460); u->unk22B4 = 1; u->item_select_blocked = 1; u->unk4AC = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; - u->unk430 = 0.1f; + u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 26.0f; @@ -2031,7 +2033,7 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 18.0f; u->unk48C = 0.2f; u->jump_height_start = 0.1f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x78); u->air_stick_speed = frame_time * 1.9f; @@ -2039,15 +2041,15 @@ int hero_set_state(int requested_state, int b) { create_moby_transform_history_entry(x, 0x28, 3); create_moby_transform_history_entry(x, 0x14, 5); u->velocity_keys_active = 1; - u->unk3D0 = scale_game_frames(9); - u->velocity_keys_end_frame = scale_game_frames(0x23) + u->unk3D0; + u->velocity_keys_start_frame = scale_game_frames(9); + u->velocity_keys_end_frame = scale_game_frames(0x23) + u->velocity_keys_start_frame; u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - u->unk3E4 = hero_velocity_profile_jump_keys; + u->velocity_keys = hero_velocity_profile_jump_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { - u->unk430 = 1.9f; + u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); u->unk434 = 0.6f; u->apex_anim_frame = 50.0f; @@ -2055,7 +2057,7 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 28.0f; u->unk48C = 1.95f; u->jump_height_start = 1.9f; - u->unk498 = scale_game_frames(5); + u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; @@ -2063,17 +2065,18 @@ int hero_set_state(int requested_state, int b) { u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { - u->unk3D0 = scale_game_frames(0x22); + u->velocity_keys_start_frame = scale_game_frames(0x22); } else { - u->unk3D0 = scale_game_frames(0x23); + u->velocity_keys_start_frame = scale_game_frames(0x23); } { struct Hero *w = &hero; - w->velocity_keys_end_frame = scale_game_frames(0x24) + w->unk3D0; + w->velocity_keys_end_frame = + scale_game_frames(0x24) + w->velocity_keys_start_frame; w->keyed_move_target_frame = 29.0f; w->unk3DC = 50.0f; w->keyed_anim_target_frame = scale_game_frames(0x56); - w->unk3E4 = hero_pal_timed_jump_keys; + w->velocity_keys = hero_pal_timed_jump_keys; w->can_chain_high_jump = 1; } } else if (u->state.current == 0xE) { @@ -2085,15 +2088,15 @@ int hero_set_state(int requested_state, int b) { u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; u->unk48C = v + 0.05f; - u->unk430 = v; + u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; u->unk4A6 = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { - u->unk430 = 3.2f; + u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); u->unk434 = 0.6f; u->apex_anim_frame = 18.0f; @@ -2101,7 +2104,7 @@ int hero_set_state(int requested_state, int b) { u->jump_land_anim_frame = 24.0f; u->unk48C = 3.25f; u->jump_height_start = 3.2f; - u->unk498 = scale_game_frames(0xE); + u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; @@ -2124,7 +2127,7 @@ int hero_set_state(int requested_state, int b) { { struct Hero *q = &hero; if (q->fall_start_distance == 0.0f) - q->fall_start_distance = q->unk430 * 1.5f; + q->fall_start_distance = q->jump_height * 1.5f; if (b) { int s = q->state.current; if (s == 7) { @@ -2214,10 +2217,10 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; p->speed_scale = 1.0f; - p->unk2284 = 0; + p->camera_mode = 0; p->heading_locked = 0; p->melee_target = 0; - p->unkA64 = 0; + p->melee_hit = 0; switch (p->state.current) { case HERO_STATE_WRENCH_SLAM: { struct UsageStat *h = usage_stats.stat; @@ -2230,7 +2233,7 @@ int hero_set_state(int requested_state, int b) { } h[0].level_mask = h[0].level_mask | (1 << current_level_index) | 0x80000000; q = &hero; - q->unk2284 = 0x50; + q->camera_mode = 0x50; q->attack_record = 4; q->saved_item[0] = 0; update_hero_target_heading(8.0f, 1.0471976f, -1.0f); @@ -2399,7 +2402,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ATTACK_RECORD_FRAME_EXIT_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x70) { int v = 5; if (attack_records[p->attack_record].kind == 0) @@ -2426,7 +2429,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_GRIND_ATTACK: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unkA64 = 0; + p->melee_hit = 0; if (p->state.prev == 0x2B) { p->attack_record = p->attack_record == 0; } else { @@ -2446,7 +2449,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_WAIT_FOR_ANIMATION_THEN_IDLE: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = frame_time * 9.0f; if (b) { char *m; @@ -2466,7 +2469,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_WALL_BONK: { struct Hero *p = &hero; p->state.control_mode = 0xA; - p->unk2284 = 0; + p->camera_mode = 0; p->pushback_yaw = fast_add_rotations(p->motion.rot.f[2], 3.1415927f); p->ground_speed = frame_time * 9.0f; if (b) @@ -2477,9 +2480,9 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; char *r; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); r = find_moby_hit(((void *)p->moby), 1, 0); @@ -2511,7 +2514,7 @@ int hero_set_state(int requested_state, int b) { { struct Hero *r = &hero; r->state.control_mode = HERO_MODE_RESPAWN_WAIT; - r->unk2284 = 0; + r->camera_mode = 0; allocate_hero_voice_for_entry(9, 0); r->rand_timer.range = 0x68; r->target_speed = 0.0f; @@ -2524,7 +2527,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_HEIGHT_OR_TIMEOUT_RESPAWN_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RESPAWN_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; if (current_level_index == LEVEL_QUARTU) spawn_hero_radial_particle_burst(); p->collision_off_frames = 0x2710; @@ -2551,7 +2554,7 @@ int hero_set_state(int requested_state, int b) { { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; p->collision_off_frames = 0x2710; p->sink_surface_z = p->ground_z.f; @@ -2565,7 +2568,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; char *m; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; p->collision_off_frames = 0x2710; p->sink_surface_z = p->ground_z.f; @@ -2579,7 +2582,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_1_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (p->on_slip_ground != 0 && p->frames_off_ground.s == 0) { hero_set_state(0x52, 1); return 0; @@ -2591,7 +2594,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_1_LAND: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LAND; - p->unk2284 = 0; + p->camera_mode = 0; if (frame_time * 4.5f < p->motion.speed_xy) { scale_hero_motion(frame_time * 4.5f / p->motion.speed_xy); } @@ -2603,7 +2606,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_1_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (b) @@ -2613,7 +2616,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_1_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (b) set_hero_animation(4, 0, (float)scale_game_frames(0xC)); @@ -2622,12 +2625,12 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_1_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); hero_change_health(1); - p->unk1EE = scale_game_frames(0x2D); + p->hit_flash_timer = scale_game_frames(0x2D); p->invulnerable_frames = scale_game_frames(0x32); if (b) { set_hero_animation(6, 3, -3.0f); @@ -2644,7 +2647,7 @@ int hero_set_state(int requested_state, int b) { { struct Hero *q = &hero; q->state.control_mode = HERO_MODE_RUN; - q->unk2284 = 0; + q->camera_mode = 0; q->ground_speed = vector_length_xy(&q->motion.resolved_velocity); if (q->state.prev == 3) q->ground_speed = 0.0f; @@ -2659,7 +2662,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_1_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; p->health.hp = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (b) @@ -2669,7 +2672,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ALT_LEDGE_HANG_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 12.0f; p->unk4F0 = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { @@ -2683,7 +2686,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ALT_LEDGE_HANG: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; if (b) set_hero_animation(0xA, 0, (float)scale_game_frames(6)); break; @@ -2691,7 +2694,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ALT_LEDGE_SHIMMY_YAW_PLUS_90: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; if (b) set_hero_animation(0xB, 0, (float)scale_game_frames(6)); break; @@ -2699,7 +2702,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_ALT_LEDGE_SHIMMY_YAW_MINUS_90: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; - p->unk2284 = 0xD; + p->camera_mode = 0xD; if (b) set_hero_animation(0xC, 0, (float)scale_game_frames(6)); break; @@ -2707,7 +2710,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_2_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (b) set_hero_animation(0, 0, (float)scale_game_frames(0xF)); break; @@ -2715,7 +2718,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_2_REPEATABLE_SQUARE_ACTION: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unk2284 = 0; + p->camera_mode = 0; if (p->state.prev == 0x60 || (p->state.prev2 == 0x60 && scale_game_frames(0xA) > p->state.prev_timer)) { p->attack_record = (p->attack_record + 1) % 3; @@ -2736,7 +2739,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_2_COOLDOWN_ANIMATION_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unk2284 = 0; + p->camera_mode = 0; if (b) set_hero_animation(0xC, 0, (float)scale_game_frames(8)); break; @@ -2744,7 +2747,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_WAIT_FOR_CIRCLE_RELEASE_AND_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ATTACK; - p->unk2284 = 0; + p->camera_mode = 0; if (b) set_hero_animation(8, 0, (float)scale_game_frames(8)); break; @@ -2752,7 +2755,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_2_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -2768,7 +2771,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_2_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); p->unk3B8 = 0; if (b) @@ -2778,7 +2781,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_2_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (b) set_hero_animation(7, 0, (float)scale_game_frames(0xC)); @@ -2787,7 +2790,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_2_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 7.0f); @@ -2801,7 +2804,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_3_IDLE: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (b) set_hero_animation(0, 0, (float)scale_game_frames(0xE)); break; @@ -2809,7 +2812,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_DELAYED_CIRCLE_RELEASE_WAIT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_IDLE; - p->unk2284 = 0; + p->camera_mode = 0; if (b) { set_hero_animation(4, 0, (float)scale_game_frames(7)); hero_queue_sequence(0xE, 0x22); @@ -2819,7 +2822,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_3_SLIP: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); if (b) set_hero_animation(6, 0, (float)scale_game_frames(0xC)); @@ -2828,7 +2831,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_3_FALL: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_FALL; - p->unk2284 = 0; + p->camera_mode = 0; p->fall_state_gravity = frame_time_sq * 24.0f; p->stickless_decel = frame_time_sq * 7.0f; qcopy(&p->motion.velocity, &p->motion.resolved_velocity); @@ -2839,7 +2842,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_3_RUN: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_RUN; - p->unk2284 = 0; + p->camera_mode = 0; { Vec4 *v = &p->motion.resolved_velocity; struct Hero *g; @@ -2857,7 +2860,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_3_DYING: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_DYING; - p->unk2284 = 0; + p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.resolved_velocity); if (b) set_hero_animation(3, 0, (float)scale_game_frames(0xC)); @@ -2866,7 +2869,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_VEHICLE_MODE_3_HURT: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_HURT; - p->unk2284 = 0; + p->camera_mode = 0; scale_hero_motion(0.5f); qcopy(&p->motion.velocity, &p->motion.resolved_velocity); FUN_L00_0025f730(&p->motion.velocity, frame_time * 5.0f); @@ -2881,7 +2884,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_GRIND_COLLISION_RECOVERY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_GRIND; - p->unk2284 = 0; + p->camera_mode = 0; if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); @@ -2900,13 +2903,13 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(hero_idle_sequence(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_LOOK_RELEASE_WAIT: { struct Hero *p = &hero; - p->unk2284 = 0x51; + p->camera_mode = 0x51; p->state.control_mode = HERO_MODE_IDLE; if (return_hero_animation_id_unchanged(p->moby->prev_seq) != hero_idle_sequence(1)) { set_hero_animation(hero_idle_sequence(1), 0, (float)scale_game_frames(5)); @@ -2916,7 +2919,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_IDLE_ANIMATION_ENTRY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(hero_idle_sequence(0), 0, (float)scale_game_frames(0xA)); break; } @@ -2924,7 +2927,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = 9; p->item_use_locked = 1; - p->unk2284 = 0; + p->camera_mode = 0; cancel_hero_item_animation(); set_hero_animation(hero_idle_sequence(0), 0, (float)scale_game_frames(0xA)); break; @@ -2932,14 +2935,14 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_IDLE_ANIMATION_LONG_BLEND_ENTRY: { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_ITEM_RELEASE_WAIT; - p->unk2284 = 0; + p->camera_mode = 0; set_hero_animation(hero_idle_sequence(0), 0, (float)scale_game_frames(0xA)); break; } case HERO_STATE_OPTIONAL_IDLE_ANIMATION: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->tilt_disabled = 1; p->item_use_locked = 1; @@ -2950,7 +2953,7 @@ int hero_set_state(int requested_state, int b) { case HERO_STATE_CLEAR_VELOCITY: { struct Hero *p = &hero; p->state.control_mode = 9; - p->unk2284 = 0; + p->camera_mode = 0; p->item_select_blocked = 1; p->item_use_locked = 1; clear_u64_value(&p->motion.velocity); @@ -2991,7 +2994,7 @@ int hero_set_state(int requested_state, int b) { } { struct Hero *t = &hero; - if (t->unk308 == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { + if (t->magnetic_floor == 0 && t->items[1].item_id == 0x1C && t->saved_item[1] != 0) { t->restore_item[1] = 1; } } diff --git a/src/overlays/shared/hero/hero_switch_item.c b/src/overlays/shared/hero/hero_switch_item.c index 59fe63e82d..d1dab993a1 100644 --- a/src/overlays/shared/hero/hero_switch_item.c +++ b/src/overlays/shared/hero/hero_switch_item.c @@ -59,7 +59,7 @@ int probe_hero_ledge_edge(Vec4 *ledge_probe_origin, f32 *facing_yaw) { inc, limit; int found, hit, i, j, material; - if (hero.unk308 == 2) + if (hero.magnetic_floor == 2) return 0; drop = -0.7f; @@ -708,9 +708,9 @@ void update_hero_condition_animation(void) { anim = 0; spd = 1.0f; on = 0; - if (hero.unk2274) { + if (hero.look_target) { on = 1; - animation_selector_data = get_moby_target_info(hero.unk2274); + animation_selector_data = get_moby_target_info(hero.look_target); anim = 0x79; if (animation_selector_data && animation_selector_data[0x3C]) { anim = select_hero_condition_animation_id(animation_selector_data[0x3C]); @@ -816,7 +816,7 @@ void update_hero_item_slot_blends(void) { } { struct Hero *h = &hero; - if (h->unk20AF != 0) { + if (h->hand_item_hidden != 0) { u8 *cancelled; want = 0; cancelled = hero.item_slot_blends[i]; @@ -1001,7 +1001,7 @@ void create_missing_hero_item_slot_animations(s32 suppress_slot_animation_creati return; if (!hero.item_anim_active) return; - if (!hero.unk20AA) + if (!hero.weapon_up) return; if (suppress_slot_animation_creation) return; @@ -1055,12 +1055,12 @@ void start_equipped_item_animation(void) { P->item_anim_active = 1; { s32 k = item_defs[item_id].unk30; - P->unk20AA = k; + P->weapon_up = k; } animation_step_divisor = scale_game_frames(10); if (item_defs[item_id].slot_anim_count == 0) animation_step_divisor = scale_game_frames(11); - if (P->state.control_mode == HERO_MODE_IDLE && P->unk22C8 == 0) { + if (P->state.control_mode == HERO_MODE_IDLE && P->weapon_lowered == 0) { P->item_hold_anim = hero_animation_id; set_hero_animation(hero_animation_id, 0, (f32)animation_step_divisor); return; @@ -1107,7 +1107,7 @@ void cancel_hero_item_animation(void) { } } hero.item_anim_active = 0; - hero.unk20AA = 0; + hero.weapon_up = 0; } } /* Ported from rac1-decomp (src/overlays/shared/help_0020CDF0.c: func_L00_0020EDC0). */ @@ -1124,7 +1124,7 @@ void update_hero_held_items_and_orientation(void) { int slot_index; if (hero_item_animation_state->item_anim_active != 0 && - hero_item_animation_state->unk20AA != 0) { + hero_item_animation_state->weapon_up != 0) { if (get_ammo(-1) == 0) { cancel_hero_item_animation(); } @@ -1179,7 +1179,7 @@ void update_hero_held_items_and_orientation(void) { if (((*current)[5] & 2) == 0) { continue; } - if (pose_owner->unk20AA == 0) { + if (pose_owner->weapon_up == 0) { pose_owner->unkD14 = 1; *(int *)(*current + 0x28) = 0; pose_owner->item_anim_active = 0; @@ -1281,7 +1281,7 @@ void spawn_hero_item_mobies(void) { created_moby->visible = 1; created_moby->spawn_frame = hero.moby->spawn_frame; if (((u8 *)created_moby->pclass)[6] != 0) - created_moby->unk73 = 0x18; + created_moby->metal_alpha = 0x18; slot_owner->items[0].moby = created_moby; slot_owner->items[0].state = 2; if (id == 8) { @@ -1314,7 +1314,7 @@ void spawn_hero_item_mobies(void) { created_moby->visible = 1; created_moby->spawn_frame = hero.moby->spawn_frame; if (((u8 *)created_moby->pclass)[6] != 0) - created_moby->unk73 = 0x18; + created_moby->metal_alpha = 0x18; hero.items[3].state = 2; hero.items[3].moby = created_moby; if (hero.pack_disabled != 0) @@ -1333,7 +1333,7 @@ void spawn_hero_item_mobies(void) { created_moby->visible = 1; created_moby->spawn_frame = hero.moby->spawn_frame; if (((u8 *)created_moby->pclass)[6] != 0) - created_moby->unk73 = 0x18; + created_moby->metal_alpha = 0x18; hero.items[3].state = 2; hero.items[3].moby2 = created_moby; if (hero.pack_disabled != 0) @@ -1354,7 +1354,7 @@ void spawn_hero_item_mobies(void) { slot_two_moby->flags |= 2; slot_two_moby->update = 0; if (((u8 *)slot_two_moby->pclass)[6] != 0) - slot_two_moby->unk73 = 0x18; + slot_two_moby->metal_alpha = 0x18; slot_two_moby->flags |= 0x800; hero.items[2].moby = slot_two_moby; hero.items[2].state = 2; @@ -1369,7 +1369,7 @@ void spawn_hero_item_mobies(void) { created_moby->visible = 1; created_moby->spawn_frame = hero.moby->spawn_frame; if (((u8 *)created_moby->pclass)[6] != 0) - created_moby->unk73 = 0x18; + created_moby->metal_alpha = 0x18; hero.items[1].moby = created_moby; hero.items[1].state = 2; } @@ -1379,7 +1379,7 @@ void spawn_hero_item_mobies(void) { created_moby->visible = 1; created_moby->spawn_frame = hero.moby->spawn_frame; if (((u8 *)created_moby->pclass)[6] != 0) - created_moby->unk73 = 0x18; + created_moby->metal_alpha = 0x18; hero.items[1].moby2 = created_moby; hero.items[1].state = 2; } @@ -1393,7 +1393,7 @@ void spawn_hero_item_mobies(void) { slot_four_moby->visible = 1; slot_four_moby->spawn_frame = hero.moby->spawn_frame; if (((u8 *)slot_four_moby->pclass)[6] != 0) - slot_four_moby->unk73 = 0x18; + slot_four_moby->metal_alpha = 0x18; hero.items[4].moby = slot_four_moby; hero.items[4].state = 2; } @@ -2125,7 +2125,7 @@ void hero_switch_item(int i) { struct Hero *g = &hero; int *s; int *sb; - if (g->unk1FF5 != 0) { + if (g->launch_drones != 0) { replenish_hero_drones(); g->pending_item[i] = 0; } @@ -2202,7 +2202,7 @@ void hero_switch_item(int i) { struct Hero *g = &hero; *(int *)((char *)g + i * 0x50 + 0x10B0) = 3; clear_hero_idle_rotation_targets(); - g->unk1010 = random_int_between(scale_game_frames(0x32), scale_game_frames(0x5A)); + g->head_look_timer = random_int_between(scale_game_frames(0x32), scale_game_frames(0x5A)); set_hero_item_switch_timer_for_item(*(hero.selected_item + i)); set_hero_condition_animation_timer_for_item(*(hero.selected_item + i)); if (g->item_anim_active != 0) { @@ -2308,7 +2308,7 @@ void update_hero_and_equipped_item_glows() __asm__("FUN_L00_002080b0"); void update_hero_equipped_items(void) __asm__("FUN_L00_00210928"); void update_hero_equipped_items(void) { - if (hero.unk308 == 1 || (u32)(hero.state.control_mode - 0x15) < 2 || + if (hero.magnetic_floor == 1 || (u32)(hero.state.control_mode - 0x15) < 2 || hero_is_in_special_state()) { hero.item_select_blocked = 1; hero.item_use_locked = 1; @@ -2509,7 +2509,7 @@ s32 hero_check_damage(s32 apply_damage_response) { hero.damage_source_moby = (struct Moby *)hero_hit_entry->source_moby; D_0015EEA8++; if (hero.state.control_mode == HERO_MODE_GRIND) { - hero.unk5BE = 1; + hero.grind_hit = 1; return 0; } if (hero.vehicle_mode == HERO_VEHICLE_MODE_GIANT_CLANK) { @@ -2758,7 +2758,7 @@ void hero_update(void) { hero_state = &hero; hero_state->gravity_mode = mode; hero_state->stick_magnitude = get_capped_hero_stick_magnitude(); - hero_state->unk240 = 0; + hero_state->wall_moby = 0; source = (u8 *)&controller_state; hero_state->stick_x = *(f32 *)(source + 0x108); hero_state->stick_y = *(f32 *)(source + 0x10C); @@ -3063,7 +3063,7 @@ void turn_hero_toward_move_direction_with_stick_scale(void) { frame_scaled_turn_coefficient = frame_scale_sq * 0.019f * stick_turn_scale; frame_scaled_secondary_turn_coefficient = frame_scale_sq * 0.1f; scaled_turn_amount = D_0015ED6C_211f38 * 9.948377f * stick_turn_scale; - if (hero_state->unk3BE) { + if (hero_state->sharp_turn) { frame_scaled_turn_coefficient *= 1.1f; scaled_turn_amount *= 1.2f; } @@ -3215,7 +3215,7 @@ void clip_hero_velocity_against_probed_surfaces(int force) { inward_velocity_component; int r; - if (hero.unk308 != 0) + if (hero.magnetic_floor != 0) return; if (gravity_length_xy(&hero.motion.velocity) < frame_time * 0.1f) return; @@ -3267,7 +3267,7 @@ void clip_hero_velocity_against_probed_surfaces(int force) { X.i1C > 0) primary_hit_normal_angle = fast_arc_tan(X.v40.f[2], vector_length_xy(&X.v40)); if (0.8726646304130554f <= primary_hit_normal_angle || r == 8 || r == 12) { - hero.unk240 = X.hit_moby; + hero.wall_moby = X.hit_moby; *(s32 *)&X.v40.f[2] = 0; FUN_00125180_212318(&X.v40, &X.v40); inward_velocity_component = @@ -3474,12 +3474,12 @@ void update_hero_ground_contact_and_surface_slopes(void) { } hero.ground_pitch.i = 0; hero.unk2E8.i = 0; - hero.unk2D0.i[0] = 0; - hero.unk2D0.i[1] = 0; - hero.unk2C8.i[0] = 0; - hero.unk2C8.i[1] = 0; - hero.unk2C0.i[0] = 0; - hero.unk2C0.i[1] = 0; + hero.side_probe_roll.i[0] = 0; + hero.side_probe_roll.i[1] = 0; + hero.side_probe_pitch.i[0] = 0; + hero.side_probe_pitch.i[1] = 0; + hero.side_probe_drop.i[0] = 0; + hero.side_probe_drop.i[1] = 0; if (hero.state.control_mode == HERO_MODE_GRIND || hero.state.control_mode == 0x15 || hero.state.control_mode == HERO_MODE_ATTACK || hero.state.control_mode == HERO_MODE_JUMP || hero.state.control_mode == HERO_MODE_LAND || hero.state.control_mode == HERO_MODE_LEDGE) { @@ -3505,22 +3505,22 @@ void update_hero_ground_contact_and_surface_slopes(void) { &unused_side_probe_point, 0.2f, side_probe_angle, -0.45f); if (collision_line(&side_ray_start, &collision_ray_end, 0x22, hero.moby, 0)) { f = HH.point.f[2] - hero.ground_z.f; - hero.unk2C0.f[i] = f; + hero.side_probe_drop.f[i] = f; if (0.4f < absolute_float(f)) { - hero.unk2C0.f[i] = 0.0f; + hero.side_probe_drop.f[i] = 0.0f; } sceVu0Normalize(&side_hit_normal, (u8 *)&HH.normal_x); compute_rotated_vector_angles(&side_hit_normal, &side_hit_angles); if (-0.78539819f < side_hit_angles.f[1] && side_hit_angles.f[1] < 0.78539819f) { - hero.unk2C8.f[i] = side_hit_angles.f[1]; + hero.side_probe_pitch.f[i] = side_hit_angles.f[1]; } if (-0.78539819f < side_hit_angles.f[0] && side_hit_angles.f[0] < 0.78539819f) { - hero.unk2D0.f[i] = side_hit_angles.f[0]; + hero.side_probe_roll.f[i] = side_hit_angles.f[0]; } } else { - hero.unk2C0.i[i] = 0; - hero.unk2C8.f[i] = hero.ground_pitch.f; - hero.unk2D0.f[i] = hero.unk2E8.f; + hero.side_probe_drop.i[i] = 0; + hero.side_probe_pitch.f[i] = hero.ground_pitch.f; + hero.side_probe_roll.f[i] = hero.unk2E8.f; } } } @@ -4240,13 +4240,14 @@ void hero_integrate_velocity(void) { no_lift = 1; } if ((pad_held_lui & 0x40) || no_lift || hero.state.current == 0x12) { - if (hero.unk430 < hero.unk48C && !(scale_game_frames(15) < hero.state_timer)) { - hero.unk430 += (hero.unk48C - hero.jump_height_start) / hero.unk498; - if (hero.unk48C < hero.unk430) { - hero.unk430 = hero.unk48C; + if (hero.jump_height < hero.unk48C && !(scale_game_frames(15) < hero.state_timer)) { + hero.jump_height += (hero.unk48C - hero.jump_height_start) / hero.jump_ramp_frames; + if (hero.unk48C < hero.jump_height) { + hero.jump_height = hero.unk48C; } - hero.unk428 += square_root((hero.unk430 + hero.unk430) * hero.jump_gravity) - - hero.unk42C - hero.unk428; + hero.unk428 += + square_root((hero.jump_height + hero.jump_height) * hero.jump_gravity) - + hero.unk42C - hero.unk428; } } if (!(hero.state_timer < hero.takeoff_frame) && 0.0f < hero.unk428) { @@ -4255,11 +4256,11 @@ void hero_integrate_velocity(void) { hero.unk428 = 0.0f; } if (hero.velocity_keys_active != 0) { - if (hero.state_timer < hero.unk3D0) { + if (hero.state_timer < hero.velocity_keys_start_frame) { goto tail; } if (hero.state_timer < hero.velocity_keys_end_frame) { - velocity_curve = (struct Curve *)&hero.unk3D0; + velocity_curve = (struct Curve *)&hero.velocity_keys_start_frame; velocity_curve->frames++; while (velocity_curve->key == -1 || !(velocity_curve->frames < diff --git a/src/overlays/shared/hero/hero_update_hop_movement.c b/src/overlays/shared/hero/hero_update_hop_movement.c index b6d6c11c07..3f999d3808 100644 --- a/src/overlays/shared/hero/hero_update_hop_movement.c +++ b/src/overlays/shared/hero/hero_update_hop_movement.c @@ -37,7 +37,7 @@ int hero_get_gadget_anim_id(int allow_item_lookup) { if (((unsigned char *)animation_selection_state)[0x20AA] == 0) { return 0; } - if (animation_selection_state->unk22C8 != 0) { + if (animation_selection_state->weapon_lowered != 0) { return 0; } i = hero_slot_item_id(0) * 0x4C; @@ -136,13 +136,13 @@ void hero_update_hop_movement(void) { build_scaled_hero_move_impulse(0.7f, ED6C * 0.0f); qcopy(&hero.motion.momentum, &hero.move_impulse); } else if (state == HERO_STATE_REPEATABLE_JUMP) { - hero.motion.move_yaw = hero.unk470.f[3]; - qcopy(&hero.motion.move_dir, &hero.unk470); + hero.motion.move_yaw = hero.wall_jump_normal.f[3]; + qcopy(&hero.motion.move_dir, &hero.wall_jump_normal); if (scale_game_frames(9) < hero.state_timer) { turn_to(-1, ED64 * 0.042f, ED64 * 0.2f, ED6C * 11.868238f); } if (scale_game_frames(9) <= hero.state_timer) { - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { hero.motion.velocity.f[0] = fast_cos(hero.motion.move_yaw) * (ED6C * 4.9f); hero.motion.velocity.f[1] = fast_sin(hero.motion.move_yaw) * (ED6C * 4.9f); } else { diff --git a/src/overlays/shared/hero/hero_update_movement.c b/src/overlays/shared/hero/hero_update_movement.c index be71170abf..fe80c4836b 100644 --- a/src/overlays/shared/hero/hero_update_movement.c +++ b/src/overlays/shared/hero/hero_update_movement.c @@ -269,7 +269,7 @@ void hero_update_movement(void) { stop_hero_motion_without_forward_support(3.7f, 0.0f); stick_target(1.0f, 0); if (hero.state.current == HERO_STATE_LOOK || hero.state.current == 0x1E) { - if (hero.unk20A5 != 0) { + if (hero.hidden != 0) { movement_and_hit_descriptor_scratch.q = 0; movement_and_hit_descriptor_scratch.f[0] = 1.0f; transform_vector_by_basis(&hero.motion.move_dir, @@ -823,9 +823,9 @@ void hero_update_movement(void) { } } turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - fast_dec_timer(&hero.unk698); + fast_dec_timer(&hero.swim_stroke_timer); if (hero.state.current == 0x36) { - if (PD.no_direction != 0 && hero.unk698 != 0) { + if (PD.no_direction != 0 && hero.swim_stroke_timer != 0) { hero.target_speed = frame_time * 3.0f; } if (absolute_float(hero.motion.yaw_error) > 0.7853982f) { @@ -1070,7 +1070,7 @@ void hero_update_movement(void) { if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { above = 0; } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { if (above && scale_game_frames(40) < hero.state_timer) { if (hero.stick_magnitude > 0.25f) { f32 s; @@ -1087,7 +1087,7 @@ void hero_update_movement(void) { } } } - if (hero.unk99C != 0) { + if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < @@ -1131,20 +1131,20 @@ void hero_update_movement(void) { fast_vec_sub(&vC0, &movement_vector_scratch, &((struct MobyView *)hero.swing_target_moby)->u10.v10); - fast_vec_normalize(&vC0, &vC0, hero.unk9A4); + fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&movement_vector_scratch, &((struct MobyView *)hero.swing_target_moby)->u10.v10, &vC0); fast_vec_sub(&hero.motion.velocity, &movement_vector_scratch, &vD0); - old = hero.unk9A4; - vendor_spring(&hero.unk9A4, + old = hero.swing_rope_length; + vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, hero.unk9A0, hero.swing_rope_spring_k, hero.unk9C8, hero.swing_rope_max_speed); - d = hero.unk9A4 - old; - if (fast_vec_length(&vC0) > hero.unk9A4) { + d = hero.swing_rope_length - old; + if (fast_vec_length(&vC0) > hero.swing_rope_length) { fast_vec_normalize(&vC0, &vC0, d); fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vC0); } @@ -1166,7 +1166,7 @@ void hero_update_movement(void) { &hero.motion.velocity, &hero.motion.velocity, &movement_vector_scratch); } } - if (hero.unk99C != 0 && hero.air_frames.s != 0) { + if (hero.swing_hooked != 0 && hero.air_frames.s != 0) { if ((vz < 0.0f && hero.motion.velocity.f[2] > 0.0f) || hero.swing_anim_dir != 0) { f32 t; s32 up; @@ -1350,7 +1350,7 @@ void hero_update_movement(void) { if (!jumping) { if (hero.heading_locked != 0 || (struct MobyView *)hero.melee_target != NULL) { s32 ok = 1; - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { f32 d = fast_subtract_rotations(hero.attack_target_yaw, hero.motion.rot.f[2]); f32 a = compute_directed_angle_delta( 1, hero.attack_target_yaw, hero.motion.rot.f[2]); @@ -1732,9 +1732,9 @@ void hero_update_movement(void) { hero.state.step == 1) { hero.unk3B8 = 0; } - if (hero.unk3BE != 0 && + if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { - hero.unk3BE = 0; + hero.sharp_turn = 0; } update_hero_target_speed_from_stick(); if (hero.unk930 > 0.0f) { @@ -1748,7 +1748,7 @@ void hero_update_movement(void) { clear_u64_value(move_impulse_ptr); } k = 1.0f; - if (hero.state.step == 1 && hero.unk3BE == 0) { + if (hero.state.step == 1 && hero.sharp_turn == 0) { turn_to(0, frame_scale_sq * 0.008f, frame_scale_sq * 0.15f, frame_time * 9.948377f); } else { f32 c = hero.stick_magnitude; @@ -1776,7 +1776,7 @@ void hero_update_movement(void) { { f32 a = frame_time_sq * 7.5f * k; f32 b = frame_time_sq * 8.5f; - if (hero.unk3BE != 0) { + if (hero.sharp_turn != 0) { f32 m = 2.6179938f - hero.motion.yaw_error; if (m > 1.0f) { m = 1.0f; @@ -1789,13 +1789,13 @@ void hero_update_movement(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); } clip_hero_velocity_against_probed_surfaces(1); - if (hero.unk1F4 != 0) { + if (hero.edge_brake_lock_timer != 0) { stop_hero_motion_without_forward_support(5.0f, 0.2f); } if (hero.air_frames.s != 0) { @@ -1969,7 +1969,7 @@ void hero_update_movement(void) { } flag = 0; if (has) { - flag = hero.unk20AA != 0; + flag = hero.weapon_up != 0; } moby_point_position((struct MobyView *)hero.moby, 9, &hero.joint9_world_pos); moby_point_position((struct MobyView *)hero.moby, 0xE, &hero.joint14_world_pos); @@ -2751,7 +2751,7 @@ void hero_update_movement(void) { if (hero.rail_land_frames != 1) { speed_step(hero.air_speed_step_up, hero.jump_decel); } - if (hero.unk308 != 0) { + if (hero.magnetic_floor != 0) { hero.ground_speed = 0.0f; } if (hero.rail_land_frames != 0) { @@ -3106,7 +3106,7 @@ void hero_update_movement(void) { 0, frame_scale_sq * 0.008f * g, frame_scale_sq * 0.15f, frame_time * 9.948377f * g); } speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -3463,7 +3463,7 @@ void hero_update_movement(void) { hero_eases[27].rot_target.f[2] = a * 0.25f; hero_eases[28].rot_target.f[2] = a * 0.57f; } - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -3551,7 +3551,7 @@ void hero_update_movement(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.unk308 == 0) { + if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/shared/hero/hero_update_transitions.c b/src/overlays/shared/hero/hero_update_transitions.c index 1986736124..dd21eab5c4 100644 --- a/src/overlays/shared/hero/hero_update_transitions.c +++ b/src/overlays/shared/hero/hero_update_transitions.c @@ -292,8 +292,8 @@ void hero_update_transitions(void) { break; } clear_hero_queued_animation(); - if (hero.unk22CA != 0) { - if (hero.unk308 == 0 || item_available[0x1C] == 0) { + if (hero.hover_latch != 0) { + if (hero.magnetic_floor == 0 || item_available[0x1C] == 0) { hero_set_state(0x81, 1); break; } @@ -351,7 +351,7 @@ void hero_update_transitions(void) { } } else if (hero.anim_flags & 2) { int keep = 0; - if (hero.item_anim_active != 0 && hero.unk20AA != 0) { + if (hero.item_anim_active != 0 && hero.weapon_up != 0) { if (hero.moby->prev_seq == hero.item_hold_anim || hero.held_item_anim_blend[0] != 0) { keep = 1; @@ -383,7 +383,7 @@ void hero_update_transitions(void) { } } if (hero.item_anim_active != 0 && hero.anim_changing == 0 && - hero.unk20AA != 0 && hero.unk22C8 == 0) { + hero.weapon_up != 0 && hero.weapon_lowered == 0) { int id = hero_slot_item_id(0); if (id != hero.item_anim_item_id) { cancel_hero_item_animation(); @@ -427,7 +427,7 @@ void hero_update_transitions(void) { } } if (ok) { - if (hero.unk308 != 1) { + if (hero.magnetic_floor != 1) { int t = scale_game_frames(7); if (hero.jump_buffer_lockout != 0) { t = 1; @@ -438,7 +438,7 @@ void hero_update_transitions(void) { } } } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -461,7 +461,8 @@ void hero_update_transitions(void) { { int ok = 1; if (hero.state.prev == 1 || hero.state.prev == 0x1E) { - if (scale_game_frames(0x18) > hero.state_timer && hero.unk308 == 0) { + if (scale_game_frames(0x18) > hero.state_timer && + hero.magnetic_floor == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( hero.motion.move_yaw, D_L00_00166DD8) > 1.2217305f) { @@ -607,7 +608,7 @@ void hero_update_transitions(void) { } } hero.item_select_blocked = 1; - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0) || (item_available[4] != 0 && pad_pressed_within(0xA, scale_game_frames(7), 0))) { @@ -637,7 +638,7 @@ void hero_update_transitions(void) { break; } } - if (hero.unk1DE == 0) { + if (hero.dive_lock == 0) { if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { if (item_available[4] != 0 && (controller_state.held & 0xA)) { hero_set_state(0x35, 1); @@ -654,7 +655,7 @@ void hero_update_transitions(void) { hero.motion.displacement.f[2] = 0.0f; } if (0.1f > hero.stick_magnitude && hero.ground_speed == 0.0f && - hero.unk698 == 0) { + hero.swim_stroke_timer == 0) { hero_set_state(0x37, 1); } break; @@ -700,7 +701,7 @@ void hero_update_transitions(void) { break; case HERO_STATE_LOOK: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (hero.moby->prev_seq != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); @@ -799,7 +800,8 @@ void hero_update_transitions(void) { HeroTableRow2C *rec = &attack_records[hero.attack_record]; int t = (truncate_float_to_s32(hero.anim_frame) - rec->fC) * 2; if ((float)rec->f14 < hero.anim_frame && hero.anim_changing == 0 && - !(hero.state.current == HERO_STATE_CROUCH_SWING && hero.unk308 != 0)) { + !(hero.state.current == HERO_STATE_CROUCH_SWING && + hero.magnetic_floor != 0)) { if (pad_pressed_within(0x40, t, 0)) { if (controller_state.held & 0xA) { if (hero_handle_jump_press()) { @@ -934,7 +936,7 @@ void hero_update_transitions(void) { hero_set_state(HERO_STATE_RUN, 1); } } - if (hero.state.current == HERO_STATE_RUN && hero.unk308 != 0) { + if (hero.state.current == HERO_STATE_RUN && hero.magnetic_floor != 0) { hero_set_state(0x3F, 1); } if (hero.grind_rail != 0) { @@ -944,13 +946,13 @@ void hero_update_transitions(void) { if (hero.state_timer > scale_game_frames(0xF) || (hero.state.prev_control_mode != HERO_MODE_IDLE && hero.state.prev_control_mode != HERO_MODE_RUN)) { - if ((controller_state.pressed & 0x10000) && hero.unk20AA == 0) { - hero.unk3BE = 1; + if ((controller_state.pressed & 0x10000) && hero.weapon_up == 0) { + hero.sharp_turn = 1; } } if (hero.state.current == HERO_STATE_RUN) { if (hero.stick_magnitude < 0.17f) { - if (frame_time * 2.7f < hero.motion.speed_xy && hero.unk20AA == 0) { + if (frame_time * 2.7f < hero.motion.speed_xy && hero.weapon_up == 0) { if (hero.motion.speed_xy < frame_time * 4.4f || read_pad_float_history(4) < 0.8f) { if (hero_set_state(HERO_STATE_STOP, 0) == 0) { @@ -1153,7 +1155,7 @@ void hero_update_transitions(void) { if (hero.selector_4 != 0) { break; } - if (hero.unk1E0 != 0) { + if (hero.sinking_floor_hold != 0) { break; } if (hero.voice_slot2 != -1) { @@ -1230,7 +1232,7 @@ void hero_update_transitions(void) { hero_set_state(HERO_STATE_SLIP, 1); break; } - if (hero.unk308 == 1) { + if (hero.magnetic_floor == 1) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { hero_set_state(0x71, 1); break; @@ -1296,7 +1298,7 @@ void hero_update_transitions(void) { hero_set_state(HERO_STATE_FALL, 0); set_hero_animation(0xA, 0, scale_game_frames(0x11)); } - hero.unk2284 = 0; + hero.camera_mode = 0; hero.stickless_decel = frame_time_sq * 42.0f; hero.fall_state_gravity = frame_time_sq * 29.0f; break; @@ -1313,7 +1315,7 @@ void hero_update_transitions(void) { break; } hero_set_state(HERO_STATE_FALL, 1); - hero.unk2284 = 0; + hero.camera_mode = 0; break; case HERO_STATE_GRAPPLE_SWING_ENTRY: if (controller_state.held & hero.items[0].button_mask) { @@ -1364,7 +1366,7 @@ void hero_update_transitions(void) { case HERO_STATE_GRIND_ATTACK: case HERO_STATE_GRIND_COLLISION_RECOVERY: if (hero.state.current == 0x42) { - hero.unk5BE = 0; + hero.grind_hit = 0; } else { int grab; float len; @@ -1379,7 +1381,7 @@ void hero_update_transitions(void) { } len = vector_length_xy(hero.motion.displacement.f); if (len < vector_length_xy(hero.motion.velocity.f) * 0.5f || grab || - hero.unk5BE != 0) { + hero.grind_hit != 0) { int ok = 1; if (current_level_index != LEVEL_KALEBO3) { @@ -1396,7 +1398,7 @@ void hero_update_transitions(void) { ok = 0; } } - hero.unk5BE = 0; + hero.grind_hit = 0; if (hero.health.hp >= 2 && ok) { hero_set_state(0x42, 1); if (grab) { @@ -1496,7 +1498,7 @@ void hero_update_transitions(void) { position_scratch, spatial_vector_scratch, 0, hero.jump_gravity); hero.jump_height_start = t; hero.jump_gravity = hero.rail_jump_gravity; - hero.unk430 = t; + hero.jump_height = t; hero.unk48C = t + 0.05f; } } @@ -1847,9 +1849,9 @@ void hero_update_transitions(void) { set_hero_animation(0xB, 0, scale_game_frames(0x10)); hero.state.step = 1; if (hero.state.current == 0x2D) { - hero.unk2284 = 7; + hero.camera_mode = 7; } else { - hero.unk2284 = 0; + hero.camera_mode = 0; } } } @@ -1998,7 +2000,7 @@ void hero_update_transitions(void) { break; } } - hero.unk22CA = 0; + hero.hover_latch = 0; hero.move_lock_timer = scale_game_frames(0x19); if (hero.air_frames.s != 0) { if (hero_set_state(HERO_STATE_IDLE, 0) == 0) { @@ -2227,7 +2229,7 @@ void hero_update_transitions(void) { } if (hero.state_timer == hero.takeoff_frame + 1) { if (hero.velocity_keys_active != 0) { - float d = hero.unk3D0 - hero.state_timer; + float d = hero.velocity_keys_start_frame - hero.state_timer; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.keyed_move_target_frame, @@ -2254,9 +2256,10 @@ void hero_update_transitions(void) { } break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, hero.jump_anim_retime_scale, -1.0f); @@ -2584,9 +2587,10 @@ void hero_update_transitions(void) { hero.apex_anim_frame, alt_airborne_apex_steps, 0.5f, -1.0f); break; } - if (hero.velocity_keys_active != 0 && !(hero.state_timer < hero.unk3D0) && + if (hero.velocity_keys_active != 0 && + !(hero.state_timer < hero.velocity_keys_start_frame) && hero.state_timer < hero.velocity_keys_end_frame) { - float d = hero.keyed_anim_target_frame - hero.unk3D0; + float d = hero.keyed_anim_target_frame - hero.velocity_keys_start_frame; if (0.0f < d) { adjust_hero_animation_speed_for_target_frame( hero.apex_anim_frame, d, 0.5f, -1.0f); @@ -2643,7 +2647,7 @@ void hero_update_transitions(void) { } } if (scale_game_frames(1) < hero.rail_land_frames) { - hero.unk2284 = 0; + hero.camera_mode = 0; stick_target(0, 1.0f); if (hero.target_speed > hero_speed_steps[0].unkC && hero.stick_magnitude > 0.5f && hero.on_slip_ground == 0 && @@ -3048,7 +3052,7 @@ void hero_update_transitions(void) { } } if (scale_game_frames(1) < hero.rail_land_frames) { - hero.unk2284 = 0; + hero.camera_mode = 0; stick_target(0, 1.0f); if (hero.target_speed > hero_speed_steps[0].unkC && hero.stick_magnitude > 0.5f && hero.move_lock_timer == 0 && @@ -3299,7 +3303,7 @@ void hero_update_transitions(void) { break; case HERO_STATE_LOOK_RELEASE_WAIT: if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { - if (hero.unk20AA == 0 || hero.unk20A5 != 0) { + if (hero.weapon_up == 0 || hero.hidden != 0) { if (controller_state.held & 0xA) { if (hero.moby->prev_seq != 0xD) { set_hero_animation(0xD, 0, scale_game_frames(8)); diff --git a/src/overlays/shared/hero/initialize_hero.c b/src/overlays/shared/hero/initialize_hero.c index dc483865e9..802cdc8aee 100644 --- a/src/overlays/shared/hero/initialize_hero.c +++ b/src/overlays/shared/hero/initialize_hero.c @@ -88,7 +88,7 @@ void initialize_hero(void) { hero.reach_height = 1.25f; hero.health.vehicle_mode_hp = 4; hero.health.unk22B0 = hero.health.hp; - hero.unk1010 = random_int_between(scale_game_frames(0xB4), scale_game_frames(0x12C)); + hero.head_look_timer = random_int_between(scale_game_frames(0xB4), scale_game_frames(0x12C)); hero.idle_look_ease_rate = 0.007f; hero.unk1018 = 0.3f; hero.unkD20 = 0.97f; diff --git a/src/overlays/shared/hero/process_hero_item_action_input.c b/src/overlays/shared/hero/process_hero_item_action_input.c index 6e20cb162a..3a37e8f581 100644 --- a/src/overlays/shared/hero/process_hero_item_action_input.c +++ b/src/overlays/shared/hero/process_hero_item_action_input.c @@ -293,13 +293,13 @@ void hero_update_hop_velocity(void) { build_scaled_hero_move_impulse(0.7f, ED6C * 0.0f); qcopy(&hero.motion.momentum, &hero.move_impulse); } else if (state == HERO_STATE_REPEATABLE_JUMP) { - hero.motion.move_yaw = hero.unk470.f[3]; - qcopy(&hero.motion.move_dir, &hero.unk470); + hero.motion.move_yaw = hero.wall_jump_normal.f[3]; + qcopy(&hero.motion.move_dir, &hero.wall_jump_normal); if (scale_game_frames(9) < hero.state_timer) { turn_to(-1, ED64 * 0.042f, ED64 * 0.2f, ED6C * 11.868238f); } if (scale_game_frames(9) <= hero.state_timer) { - if (hero.unk308 == 0) { + if (hero.magnetic_floor == 0) { hero.motion.velocity.f[0] = fast_cos(hero.motion.move_yaw) * (ED6C * 4.9f); hero.motion.velocity.f[1] = fast_sin(hero.motion.move_yaw) * (ED6C * 4.9f); } else { @@ -412,7 +412,7 @@ s32 process_hero_item_action_input(void) { HeroTableRow2C *row; struct HeldGadgetVars *held_gadget_voice_state; - if (hero.item_use_locked != 0 && (hero.items[0].item_id != 8 || hero.unk308 != 1)) { + if (hero.item_use_locked != 0 && (hero.items[0].item_id != 8 || hero.magnetic_floor != 1)) { return 0; } if (hero.vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { @@ -444,7 +444,7 @@ s32 process_hero_item_action_input(void) { } else { hero_set_state(HERO_STATE_CROUCH_SWING, 1); } - } else if (hero.unk308 == 1) { + } else if (hero.magnetic_floor == 1) { hero_set_state(0x70, 1); } else { hero_set_state(HERO_STATE_WRENCH_COMBO, 1); @@ -493,7 +493,7 @@ s32 process_hero_item_action_input(void) { if (hero.on_slip_ground == 0 && pad_pressed_within(buttons, frames, NULL) != 0) { if (controller_state.held & 0xA) { hero_set_state(HERO_STATE_CROUCH_SWING, 1); - } else if (hero.unk308 == 1) { + } else if (hero.magnetic_floor == 1) { hero_set_state(0x70, 1); } else { hero_set_state(HERO_STATE_WRENCH_COMBO, 1); @@ -658,7 +658,7 @@ s32 process_hero_item_action_input(void) { if (hero.state_timer == saved) { if (hero_slot_item_id(3) == 3 && hero.state.current != 0x81 && - (hero.unk308 == 0 || D_0013D4DC[0] == 0) && hero.pack_disabled == 0) { + (hero.magnetic_floor == 0 || D_0013D4DC[0] == 0) && hero.pack_disabled == 0) { fast_dec_timer(&hero_button_8_double_press_countdown_gp); if (hero_button_8_double_press_countdown_gp != 0) { if (hero.state.control_mode == HERO_MODE_IDLE || @@ -678,7 +678,7 @@ s32 process_hero_item_action_input(void) { } else if (hero.state.current != HERO_STATE_WRENCH_COMBO && hero.state.current != 0x81 && hero.state.current != HERO_STATE_CROUCH_SWING && hero.state.current != HERO_STATE_HURT) { - hero.unk22CA = 0; + hero.hover_latch = 0; } } return hero.state_timer < saved; diff --git a/src/overlays/shared/hero/process_hero_primary_item_input.c b/src/overlays/shared/hero/process_hero_primary_item_input.c index d6ffd958c4..ac469ab4f2 100644 --- a/src/overlays/shared/hero/process_hero_primary_item_input.c +++ b/src/overlays/shared/hero/process_hero_primary_item_input.c @@ -699,7 +699,7 @@ int process_hero_primary_item_input(void) { if ((*(Hero *)((char *)&hero)).item_use_locked != 0 && (*(Hero *)((char *)&hero)).items[0].item_id != 0x24 && ((*(Hero *)((char *)&hero)).items[0].item_id != 8 || - (*(Hero *)((char *)&hero)).unk308 != 1)) { + (*(Hero *)((char *)&hero)).magnetic_floor != 1)) { return 0; } if ((*(Hero *)((char *)&hero)).vehicle_mode != 0) { @@ -749,7 +749,7 @@ int process_hero_primary_item_input(void) { hero_set_state(0x15, 1); break; } - if ((*(Hero *)((char *)&hero)).unk308 == 1) { + if ((*(Hero *)((char *)&hero)).magnetic_floor == 1) { hero_set_state(0x70, 1); } else { hero_set_state(0x13, 1); @@ -841,7 +841,7 @@ int process_hero_primary_item_input(void) { hero_set_state(0x15, 1); break; } - if ((*(Hero *)((char *)&hero)).unk308 == 1) { + if ((*(Hero *)((char *)&hero)).magnetic_floor == 1) { hero_set_state(0x70, 1); } else { hero_set_state(0x13, 1); @@ -1126,7 +1126,7 @@ int process_hero_primary_item_input(void) { } if ((*(Hero *)((char *)&hero)).state_timer == start_timer) { if (FUN_L00_0020d498(3) == 3 && (*(Hero *)((char *)&hero)).state.current != 0x81 && - ((*(Hero *)((char *)&hero)).unk308 == 0 || D_0013D5C8_2523C8[0] == 0) && + ((*(Hero *)((char *)&hero)).magnetic_floor == 0 || D_0013D5C8_2523C8[0] == 0) && (*(Hero *)((char *)&hero)).pack_disabled == 0) { fast_dec_timer(&hero_item_input_r1_double_press_timer_gp); if (hero_item_input_r1_double_press_timer_gp != 0) { @@ -1148,7 +1148,7 @@ int process_hero_primary_item_input(void) { (*(Hero *)((char *)&hero)).state.current != 0x81 && (*(Hero *)((char *)&hero)).state.current != 0x15 && (*(Hero *)((char *)&hero)).state.current != 0x16) { - (*(Hero *)((char *)&hero)).unk22CA = 0; + (*(Hero *)((char *)&hero)).hover_latch = 0; } } return (*(Hero *)((char *)&hero)).state_timer < start_timer; diff --git a/src/overlays/shared/hero/set_hero_animation.c b/src/overlays/shared/hero/set_hero_animation.c index f441aabad8..a25c7060b9 100644 --- a/src/overlays/shared/hero/set_hero_animation.c +++ b/src/overlays/shared/hero/set_hero_animation.c @@ -482,7 +482,7 @@ void set_hero_animation(int requested_animation_id, clear_hero_queued_animation(); hero_animation_dispatch_state = &hero; sequence_pointer_byte_offset = requested_animation_id * 4; - MOBY(hero_animation_moby)->unk7C = + MOBY(hero_animation_moby)->seq_sound = *(unsigned char *)(*(int *)(*(int *)(hero_animation_moby + 0x24) + sequence_pointer_byte_offset + 0x48) + 0x11); @@ -796,7 +796,7 @@ void update_hero_item_moby_flags(void) { } } blk4 = &hero; - if ((blk4->unk20AE != 0 && blk4->items[0].item_id == 8) || blk4->unk20AF != 0) { + if ((blk4->unk20AE != 0 && blk4->items[0].item_id == 8) || blk4->hand_item_hidden != 0) { struct Hero *blk5 = &hero; hero_flag_target = *(char **)&blk5->items[0].moby; @@ -918,7 +918,7 @@ int resolve_hero_gravity_mode(void) __asm__("FUN_L00_00233440"); int resolve_hero_gravity_mode(void) { struct Hero *hero_gravity_mode_state = &hero; int state = hero_gravity_mode_state->state.current; - int return_value = hero_gravity_mode_state->unk308; + int return_value = hero_gravity_mode_state->magnetic_floor; if (state == HERO_STATE_DIRECTION_LIMITED_GROUND_MOVE || state == HERO_STATE_ANIMATION_FRAME_EXIT_WAIT || diff --git a/src/overlays/shared/hero/update_hero_and_vehicle_mode_effects.c b/src/overlays/shared/hero/update_hero_and_vehicle_mode_effects.c index b13e89cf23..755e6f8499 100644 --- a/src/overlays/shared/hero/update_hero_and_vehicle_mode_effects.c +++ b/src/overlays/shared/hero/update_hero_and_vehicle_mode_effects.c @@ -478,7 +478,7 @@ void update_hero_timers_and_auxiliary_state(void) { fast_dec_timer_s16(&hero.unk1B2); fast_dec_timer(&hero.long_jump_lockout); fast_dec_timer_s16(&hero.jump_lockout_timer); - fast_dec_timer_s16(&hero.unk1DE); + fast_dec_timer_s16(&hero.dive_lock); fast_dec_timer(&hero.wall_jump_window); fast_dec_timer_s16(&hero.unk1F0); fast_dec_timer_s16(&hero.ledge_probe_cooldown); @@ -490,10 +490,10 @@ void update_hero_timers_and_auxiliary_state(void) { fast_dec_timer(&hero.unk1D0); fast_dec_timer(&hero.jump_buffer_lockout); fast_dec_timer_s16(&hero.fidget_cooldown); - fast_dec_timer_s16(&hero.unk1E0); - fast_dec_timer_s16(&hero.unk1EE); + fast_dec_timer_s16(&hero.sinking_floor_hold); + fast_dec_timer_s16(&hero.hit_flash_timer); fast_dec_timer_s16(&hero.unk1EA); - fast_dec_timer_s16(&hero.unk1F4); + fast_dec_timer_s16(&hero.edge_brake_lock_timer); fast_dec_timer_s16(&hero.jump_lock_timer); fast_dec_timer_s16(&hero.unk1DC); fast_dec_timer_s16(&hero.unk1F6); diff --git a/src/overlays/shared/hero/update_hero_ground_contact.c b/src/overlays/shared/hero/update_hero_ground_contact.c index 9557cadc6e..b2e20bb137 100644 --- a/src/overlays/shared/hero/update_hero_ground_contact.c +++ b/src/overlays/shared/hero/update_hero_ground_contact.c @@ -44,10 +44,10 @@ int FUN_L15_001fe778(int allow_item_lookup) { if (status_check_hero->item_anim_active == 0) { return 0; } - if (status_check_hero->unk20AA == 0) { + if (status_check_hero->weapon_up == 0) { return 0; } - if (status_check_hero->unk22C8 != 0) { + if (status_check_hero->weapon_lowered != 0) { return 0; } } @@ -223,12 +223,12 @@ void update_hero_ground_contact(void) { } hero.ground_pitch.i = 0; hero.unk2E8.i = 0; - hero.unk2D0.i[0] = 0; - hero.unk2D0.i[1] = 0; - hero.unk2C8.i[0] = 0; - hero.unk2C8.i[1] = 0; - hero.unk2C0.i[0] = 0; - hero.unk2C0.i[1] = 0; + hero.side_probe_roll.i[0] = 0; + hero.side_probe_roll.i[1] = 0; + hero.side_probe_pitch.i[0] = 0; + hero.side_probe_pitch.i[1] = 0; + hero.side_probe_drop.i[0] = 0; + hero.side_probe_drop.i[1] = 0; if (hero.state.control_mode == HERO_MODE_GRIND || hero.state.control_mode == 0x15 || hero.state.control_mode == HERO_MODE_ATTACK || hero.state.control_mode == HERO_MODE_JUMP || hero.state.control_mode == HERO_MODE_LAND || hero.state.control_mode == HERO_MODE_LEDGE) { @@ -257,24 +257,24 @@ void update_hero_ground_contact(void) { &unused_probe_vector, 0.2f, surface_probe_angle, -0.45f); if (collision_line(&surface_probe_endpoint, &shared_ray_endpoint, 0x22, hero.moby, 0)) { f = HH.point.f[2] - hero.ground_z.f; - hero.unk2C0.f[i] = f; + hero.side_probe_drop.f[i] = f; if (0.4f < absolute_float(f)) { - hero.unk2C0.f[i] = 0.0f; + hero.side_probe_drop.f[i] = 0.0f; } sceVu0Normalize(&probe_surface_normal, (u8 *)&HH.normal_x); compute_rotated_vector_angles(&probe_surface_normal, &probe_surface_angles); if (-0.78539819f < probe_surface_angles.f[1] && probe_surface_angles.f[1] < 0.78539819f) { - hero.unk2C8.f[i] = probe_surface_angles.f[1]; + hero.side_probe_pitch.f[i] = probe_surface_angles.f[1]; } if (-0.78539819f < probe_surface_angles.f[0] && probe_surface_angles.f[0] < 0.78539819f) { - hero.unk2D0.f[i] = probe_surface_angles.f[0]; + hero.side_probe_roll.f[i] = probe_surface_angles.f[0]; } } else { - hero.unk2C0.i[i] = 0; - hero.unk2C8.f[i] = hero.ground_pitch.f; - hero.unk2D0.f[i] = hero.unk2E8.f; + hero.side_probe_drop.i[i] = 0; + hero.side_probe_pitch.f[i] = hero.ground_pitch.f; + hero.side_probe_roll.f[i] = hero.unk2E8.f; } } } diff --git a/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c b/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c index b8809493dd..11d846e7a6 100644 --- a/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c +++ b/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c @@ -58,10 +58,10 @@ int get_hero_help_value(int allow_item_help) { if (hero_help_context->item_anim_active == 0) { return 0; } - if (hero_help_context->unk20AA == 0) { + if (hero_help_context->weapon_up == 0) { return 0; } - if (hero_help_context->unk22C8 != 0) { + if (hero_help_context->weapon_lowered != 0) { return 0; } } @@ -691,7 +691,7 @@ void update_hero_timers_and_spatial_state(void) { fast_dec_timer_s16(&hero.unk1B2); fast_dec_timer(&hero.long_jump_lockout); fast_dec_timer_s16(&hero.jump_lockout_timer); - fast_dec_timer_s16(&hero.unk1DE); + fast_dec_timer_s16(&hero.dive_lock); fast_dec_timer(&hero.wall_jump_window); fast_dec_timer_s16(&hero.unk1F0); fast_dec_timer_s16(&hero.ledge_probe_cooldown); @@ -703,10 +703,10 @@ void update_hero_timers_and_spatial_state(void) { fast_dec_timer(&hero.unk1D0); fast_dec_timer(&hero.jump_buffer_lockout); fast_dec_timer_s16(&hero.fidget_cooldown); - fast_dec_timer_s16(&hero.unk1E0); - fast_dec_timer_s16(&hero.unk1EE); + fast_dec_timer_s16(&hero.sinking_floor_hold); + fast_dec_timer_s16(&hero.hit_flash_timer); fast_dec_timer_s16(&hero.unk1EA); - fast_dec_timer_s16(&hero.unk1F4); + fast_dec_timer_s16(&hero.edge_brake_lock_timer); fast_dec_timer_s16(&hero.jump_lock_timer); fast_dec_timer_s16(&hero.unk1DC); fast_dec_timer_s16(&hero.unk1F6); diff --git a/src/overlays/shared/pickups/bolt.c b/src/overlays/shared/pickups/bolt.c index 2c9048d185..ac622fd3a0 100644 --- a/src/overlays/shared/pickups/bolt.c +++ b/src/overlays/shared/pickups/bolt.c @@ -775,7 +775,7 @@ struct Moby *spawn_bolt_by_value( root = root->parent; } spawned_bolt->parent = root; - spawned_bolt->unk73 = 20; + spawned_bolt->metal_alpha = 20; spawned_bolt->flags |= 0x100; spawned_bolt->update_dist = 0x40; spawned_bolt->draw_dist = 0x40; diff --git a/src/overlays/shared/pickups/crate.c b/src/overlays/shared/pickups/crate.c index be3eb8a194..8a15f1588a 100644 --- a/src/overlays/shared/pickups/crate.c +++ b/src/overlays/shared/pickups/crate.c @@ -327,7 +327,7 @@ void crate_update(struct Moby *moby) { case CRATE_STATE_PROCESS_HITS: if (moby->oclass == 0x1F9 && - (hero.unk240 == (s32)moby || hero.coll_hit_moby == (u8 *)moby || + (hero.wall_moby == (s32)moby || hero.coll_hit_moby == (u8 *)moby || (hero.ground_moby == moby && hero.air_frames.s == 0) || hero.ledge_moby == (s32)moby || touched)) { moby->command = 0; @@ -372,7 +372,7 @@ void crate_update(struct Moby *moby) { moby->class_slot = D_L00_00197BC0[moby->oclass]; moby->pclass = D_L00_00197300[moby->class_slot]; update_moby_animation_state(moby); - moby->unk72 = ((Part *)moby->pclass)->unkE; + moby->lod_dist = ((Part *)moby->pclass)->unkE; moby->state = CRATE_STATE_CLASS_CHANGE_COOLDOWN; moby->command = scale_game_frames(15); doHit = 0; diff --git a/src/overlays/shared/pickups/gold_bolt.c b/src/overlays/shared/pickups/gold_bolt.c index 567b16dfd3..3dba26b194 100644 --- a/src/overlays/shared/pickups/gold_bolt.c +++ b/src/overlays/shared/pickups/gold_bolt.c @@ -576,7 +576,7 @@ void gold_bolt_update(struct Moby *moby) { if (opt_mirror_anim) { moby->flags |= 0x8000; } - hero.unk20AF = 1; + hero.hand_item_hidden = 1; cutscene_active = 1; moby->state = GOLD_BOLT_PICKUP_CUTSCENE; gold_bolt_instance_vars->timer = scale_game_frames(60); diff --git a/src/overlays/shared/props/grindrail.c b/src/overlays/shared/props/grindrail.c index a65c58b81d..59b98e54cf 100644 --- a/src/overlays/shared/props/grindrail.c +++ b/src/overlays/shared/props/grindrail.c @@ -151,8 +151,8 @@ void rail_hero_motion_update(struct Moby *rail_moby) { fast_vec_add(&hero.motion.platform_delta, &hero.motion.platform_delta, &pull); hero.motion.platform_delta.f[3] = 0.0f; qcopy(&hero.motion.momentum, &hero.motion.platform_delta); - if (hero.unk1E0 < scale_game_frames(30)) { - hero.unk1E0 = scale_game_frames(30); + if (hero.sinking_floor_hold < scale_game_frames(30)) { + hero.sinking_floor_hold = scale_game_frames(30); } } else { fast_vec_scale( diff --git a/src/overlays/shared/props/novalis_elevator.c b/src/overlays/shared/props/novalis_elevator.c index 9bb1710463..721b3af230 100644 --- a/src/overlays/shared/props/novalis_elevator.c +++ b/src/overlays/shared/props/novalis_elevator.c @@ -126,7 +126,7 @@ void novalis_elevator_update(unsigned char *moby) { if (*(int *)(elevator_vars + 0xC8) == 0 && is_hero_on_moby(moby)) { struct Hero *player = &hero; player->jump_lock_timer = 4; - player->unk1F4 = 4; + player->edge_brake_lock_timer = 4; } if (*(short *)(elevator_vars + 0xBA) != 0 || (F(elevator_vars, 0xBC) < 0.0f && diff --git a/src/overlays/shared/props/teleporter.c b/src/overlays/shared/props/teleporter.c index 1d3c994096..0424fff21e 100644 --- a/src/overlays/shared/props/teleporter.c +++ b/src/overlays/shared/props/teleporter.c @@ -413,7 +413,7 @@ void teleporter_update(struct Moby *moby) { qcopy(destination_position, &MOBY(destination_moby)->pos); destination_position[2] += 0.2f; set_race_camera(destination_position, destination_moby + 0x40, 0, 1); - hero.unk20A5 = 1; + hero.hidden = 1; if (teleporter_vars->unk40 != -1 && teleporter_vars->unk44 != -1) { request_music_track(teleporter_vars->unk40, teleporter_vars->unk44); } diff --git a/src/overlays/shared/rendering/debug/update_debug_menu.c b/src/overlays/shared/rendering/debug/update_debug_menu.c index 5711c57622..ef7227560c 100644 --- a/src/overlays/shared/rendering/debug/update_debug_menu.c +++ b/src/overlays/shared/rendering/debug/update_debug_menu.c @@ -208,7 +208,7 @@ void update_debug_camera(void) { update_all_cameras(); if (pad->stick_moved) return; - free_look = hero.unk308 == 2; + free_look = hero.magnetic_floor == 2; { Vec4 step; if ((pad->buttons.held_pressed & 3) != 3) { diff --git a/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c b/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c index e7066835b8..a1d5c6e954 100644 --- a/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c +++ b/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c @@ -364,7 +364,7 @@ void update_hud_item_selector_selection_and_visibility(Obj *hud_element) { usage_stats.stat[20].level_mask = usage_stats.stat[20].level_mask | (1 << current_level_index) | 0x80000000; if (id == 0x18) - hero_lui.unk1FF5 = 1; + hero_lui.launch_drones = 1; else hero_lui.pending_item[0] = id; rr = &D_L00_001C40B0[ri]; diff --git a/src/overlays/shared/ui/map/reveal_map_around_position.c b/src/overlays/shared/ui/map/reveal_map_around_position.c index 959c2a0c55..267b039e1e 100644 --- a/src/overlays/shared/ui/map/reveal_map_around_position.c +++ b/src/overlays/shared/ui/map/reveal_map_around_position.c @@ -148,7 +148,7 @@ void reveal_map_around_position(f32 *position) { *filter = 0; continue; } - if ((flags & 0x40) && !hero.unk308) { + if ((flags & 0x40) && !hero.magnetic_floor) { *filter = 0; continue; } diff --git a/src/overlays/shared/vendor/initialize_vendor_screen.c b/src/overlays/shared/vendor/initialize_vendor_screen.c index a19df2d4e8..c03e845eee 100644 --- a/src/overlays/shared/vendor/initialize_vendor_screen.c +++ b/src/overlays/shared/vendor/initialize_vendor_screen.c @@ -83,7 +83,7 @@ void initialize_vendor_screen(char *vendor_moby, int lvl) { clear_active_help_record(); l01_hero_set_state(100, 1); *(char *)&hero_state->item_use_locked = 1; - *(char *)&hero_state->unk20A5 = 1; + *(char *)&hero_state->hidden = 1; set_hero_item_moby_flag_bit0(); transform_vector_by_basis(sc, &vendor_camera_local_position_offset, vendor_moby + 0xC0); fast_vec_add(sc, sc, &MOBY(vendor_moby)->pos); diff --git a/src/overlays/shared/vendor/vendor_menu.c b/src/overlays/shared/vendor/vendor_menu.c index e4a5f949f9..3ffc0f9cac 100644 --- a/src/overlays/shared/vendor/vendor_menu.c +++ b/src/overlays/shared/vendor/vendor_menu.c @@ -532,7 +532,7 @@ void close_vendor_menu(int exit_cutscene_completed) { D_L00_0015F5D8 = 1; D_L00_0015F5C4 = 0; hero_set_state(HERO_STATE_IDLE, 1); - hero.unk20A5 = 0; + hero.hidden = 0; update_hero_item_moby_flags(); if (*(int *)(vendor_state_base + 0x40) == 0) { transform_vector_by_basis(&world_position, @@ -652,7 +652,7 @@ void restore_hero_after_vendor_exit_cutscene(void) { D_L00_0015F5D8 = 1; D_L00_0015F5C4 = 0; hero_set_state(HERO_STATE_IDLE, 1); - hero.unk20A5 = 0; + hero.hidden = 0; update_hero_item_moby_flags(); vendor_state_base = (char *)&vendor_menu; transform_vector_by_basis(&world_position, diff --git a/src/overlays/shared/vendor/vendor_orb.c b/src/overlays/shared/vendor/vendor_orb.c index 9ea72e904b..6640208d00 100644 --- a/src/overlays/shared/vendor/vendor_orb.c +++ b/src/overlays/shared/vendor/vendor_orb.c @@ -44,7 +44,7 @@ void vendor_orb_update(unsigned char *moby) { switch (MOBY(moby)->state) { case VENDOR_ORB_INITIALIZE: MOBY(moby)->state = VENDOR_ORB_ROTATE; - MOBY(moby)->unk73 = 0x20; + MOBY(moby)->metal_alpha = 0x20; *(float *)(manipulator + 0x40) = random_angle_radians(); attach_manipulator(moby, 1, manipulator); break; diff --git a/src/overlays/shared/weapons/blaster.c b/src/overlays/shared/weapons/blaster.c index a81fe1584b..cc765873f9 100644 --- a/src/overlays/shared/weapons/blaster.c +++ b/src/overlays/shared/weapons/blaster.c @@ -286,7 +286,7 @@ void blaster_update(struct Moby *moby) { base_yaw = yaw; base_pitch = pitch; if (hero.state.current != 30) { - if (hero.unk22C8 == 1) { + if (hero.weapon_lowered == 1) { yaw = moby->rot.z; base_yaw = yaw; pitch = D_L00_0017ACF4; diff --git a/src/overlays/shared/weapons/decoy.c b/src/overlays/shared/weapons/decoy.c index b2d9e8256a..ee4d936ef2 100644 --- a/src/overlays/shared/weapons/decoy.c +++ b/src/overlays/shared/weapons/decoy.c @@ -278,7 +278,7 @@ u8 *spawn_decoy(s32 owner_moby, u128 *position, u128 *other_position) { *(u16 *)(decoy_vars + 0x0c) = 4; *(u16 *)(decoy_vars + 0x0e) = 0xf; append_unique_moby_index(spawned_moby, D_L00_001B0830_lui, 0x1f); - if (hero.unk20A5 != 0 || hero.unk20AF != 0) + if (hero.hidden != 0 || hero.hand_item_hidden != 0) MOBY(spawned_moby)->flags |= 0x41; } return spawned_moby; @@ -584,7 +584,7 @@ void decoy_update(char *moby) { return; } ++decoy_instance_vars->unk54; - if (hero.unk20A5 != 0 && (u8)MOBY(moby)->state < DECOY_THROWN_MOVEMENT) + if (hero.hidden != 0 && (u8)MOBY(moby)->state < DECOY_THROWN_MOVEMENT) MOBY(moby)->flags |= 0x41; else MOBY(moby)->flags &= 0xffbe; diff --git a/src/overlays/shared/weapons/devastator.c b/src/overlays/shared/weapons/devastator.c index 5d31143e22..354f081489 100644 --- a/src/overlays/shared/weapons/devastator.c +++ b/src/overlays/shared/weapons/devastator.c @@ -505,7 +505,7 @@ void devastator_update(struct Moby *devastator_moby) { if (scale_game_frames(D_0015EEA4) / 600 > stats->longest) stats->longest = scale_game_frames(D_0015EEA4) / 600; stats->levels = (stats->levels | (1 << current_level_index)) | 0x80000000; - if (hero.unk22C8 == 1 && hero.state.current != 30) { + if (hero.weapon_lowered == 1 && hero.state.current != 30) { pitch = D_L00_0017ACF4_lui; yaw = devastator_moby->rot.z; aim_info = get_moby_target_info(devastator_vars->target); diff --git a/src/overlays/shared/weapons/glove_of_doom.c b/src/overlays/shared/weapons/glove_of_doom.c index 3e276ab003..716b9b145f 100644 --- a/src/overlays/shared/weapons/glove_of_doom.c +++ b/src/overlays/shared/weapons/glove_of_doom.c @@ -441,7 +441,7 @@ spawn_glove_of_doom_held_moby(int spawning_moby, u128 *spawn_position, u128 *ini *(int *)(moby_vars + 0x34) = 0; *(short *)(moby_vars + 0x38) = 0; MOBY(spawned_moby)->scale = *(float *)(*(char **)(spawned_moby + 0x24) + 0x24) * 0.01f; - if (hero.unk20A5 || hero.unk20AF) + if (hero.hidden || hero.hand_item_hidden) MOBY(spawned_moby)->flags |= 0x41; } return spawned_moby; diff --git a/src/overlays/shared/weapons/glove_of_doom_bomb.c b/src/overlays/shared/weapons/glove_of_doom_bomb.c index 17c4db3ff1..84a9962b7e 100644 --- a/src/overlays/shared/weapons/glove_of_doom_bomb.c +++ b/src/overlays/shared/weapons/glove_of_doom_bomb.c @@ -216,7 +216,7 @@ void doom_bot_spawner_update(struct Moby *thrown_moby) { if (thrown_moby->pos.x < 2.0f || 1021.0f < thrown_moby->pos.x || thrown_moby->pos.y < 2.0f || 1021.0f < thrown_moby->pos.y || thrown_moby->pos.z < 2.0f || 1021.0f < thrown_moby->pos.z) goto remove; - if (hero.unk20A5 && thrown_moby->state < THROWN_MOBY_STATE_MOVE_WITH_COLLISION) + if (hero.hidden && thrown_moby->state < THROWN_MOBY_STATE_MOVE_WITH_COLLISION) thrown_moby->flags |= 0x41; else thrown_moby->flags &= 0xffbe; @@ -243,7 +243,7 @@ void doom_bot_spawner_update(struct Moby *thrown_moby) { } if (fast_dec_timer(&spawner_throw_vars->effect_timer)) { spawner_throw_vars->effect_timer = scale_game_frames(4); - if (!hero.unk20A5) + if (!hero.hidden) spawn_moby_bound_effect_particle(thrown_moby); } if (!hero.vehicle_mode && spawner_throw_vars->holder && diff --git a/src/overlays/shared/weapons/mine.c b/src/overlays/shared/weapons/mine.c index b0dcdbf5e8..302748179e 100644 --- a/src/overlays/shared/weapons/mine.c +++ b/src/overlays/shared/weapons/mine.c @@ -650,7 +650,8 @@ void mine_update(M910 *mine_moby) { up.f[2] = 1.0f; collision_response_velocity.q = mine_pre_motion_position.q; v = mine_moby->v; - if ((hero.unk20A5 != 0 || hero.unk20AF != 0) && mine_moby->state == MINE_STATE_OWNER_ATTACHED) { + if ((hero.hidden != 0 || hero.hand_item_hidden != 0) && + mine_moby->state == MINE_STATE_OWNER_ATTACHED) { mine_moby->flags |= 0x41; } else { mine_moby->flags &= 0xFFBE; diff --git a/src/overlays/shared/weapons/morphoray.c b/src/overlays/shared/weapons/morphoray.c index 692456a992..04fbecfaf3 100644 --- a/src/overlays/shared/weapons/morphoray.c +++ b/src/overlays/shared/weapons/morphoray.c @@ -1570,7 +1570,7 @@ void morphoray_update(Moby *moby) { func_001FA4A0_2BDAF0(matrix, points); direction.z = 1.0f; func_001F9EE8_2BDAF0(&direction, &direction, matrix); - } else if (((Hero *)((char *)&hero))->unk22C8 == 1) { + } else if (((Hero *)((char *)&hero))->weapon_lowered == 1) { func_001F9C30_2BDAF0(&direction, &moby->rot_row1, -1.0f); } else { direction.x = 1.0f; diff --git a/src/overlays/shared/weapons/suckcannon.c b/src/overlays/shared/weapons/suckcannon.c index 412440d217..7e320ed1d0 100644 --- a/src/overlays/shared/weapons/suckcannon.c +++ b/src/overlays/shared/weapons/suckcannon.c @@ -1299,7 +1299,7 @@ void compute_suck_cannon_suction_aim_and_origin(struct Moby *cannon_moby, out_suction_origin[2] = suction_origin_offset.z + cannon_moby->pos.z; out_suction_origin[0] = suction_origin_offset.x + hero.motion.pos.f[0]; out_suction_origin[1] = suction_origin_offset.y + hero.motion.pos.f[1]; - } else if (hero.unk22C8 == 1) { + } else if (hero.weapon_lowered == 1) { *out_suction_yaw = hero.held_pose_yaw; *out_suction_pitch = cannon_moby->rot.y; } else { @@ -2864,7 +2864,7 @@ void suck_beam_build(char *cannon_moby, char *suction_origin) { qcopy((char *)beam_initialization_vectors + 0x20, D_L00_00166FD0 + 0x20); orientation_up_vector = (char *)beam_initialization_vectors + 0x20; } else { - if (hero.unk22C8 == 1) { + if (hero.weapon_lowered == 1) { fast_vec_scale(beam_initialization_vectors, cannon_moby + 0xD0, -1.0f); qcopy((char *)beam_initialization_vectors + 0x10, cannon_moby + 0xC0); qcopy((char *)beam_initialization_vectors + 0x20, cannon_moby + 0xE0); diff --git a/src/overlays/shared/weapons/swingshot.c b/src/overlays/shared/weapons/swingshot.c index 25650de884..605ce655a9 100644 --- a/src/overlays/shared/weapons/swingshot.c +++ b/src/overlays/shared/weapons/swingshot.c @@ -408,7 +408,7 @@ void swingshot_update(Moby *m) { d->spin = d->spin + 0.69813168f; d->size = d->size * (frame_scale * -0.600000024f + 1.0f); if (d->size < 0.168000013f) { - hero.unk99C = 1; + hero.swing_hooked = 1; m->state = 12; } break; diff --git a/src/overlays/shared/weapons/tesla_claw.c b/src/overlays/shared/weapons/tesla_claw.c index d7e47e4517..2d9223a7a1 100644 --- a/src/overlays/shared/weapons/tesla_claw.c +++ b/src/overlays/shared/weapons/tesla_claw.c @@ -612,7 +612,7 @@ void tesla_claw_update(struct Moby *tesla_claw_moby) { transform_vector_by_basis( &transformed_offset, &transformed_offset, D_L00_00166FD0); fast_vec_add(&tesla_claw_vars->tip, &tesla_claw_vars->pos, &transformed_offset); - } else if (hero.unk22C8 == 1) { + } else if (hero.weapon_lowered == 1) { moby_point_position(tesla_claw_moby, 0, &tesla_claw_vars->pos); transformed_offset.f.x = 0.0f; transformed_offset.f.y = -tesla_claw_vars->reach; diff --git a/src/overlays/shared/weapons/visibomb.c b/src/overlays/shared/weapons/visibomb.c index b7ce8f85e1..e5f61be27a 100644 --- a/src/overlays/shared/weapons/visibomb.c +++ b/src/overlays/shared/weapons/visibomb.c @@ -118,7 +118,7 @@ void visibomb_update(O_b3058 *visibomb_moby) { fast_vec_normalize(u, &camera->rows[8], -0.35f); fast_vec_add(launch_position, launch_position, u); fast_vec_add(launch_position, launch_position, &camera->pos); - } else if (hero.unk22C8 == 1) { + } else if (hero.weapon_lowered == 1) { b = fast_arc_tan(vector_length_xy(visibomb_moby->launch_direction_xy), visibomb_moby->launch_direction_z); build_spherical_offset(launch_position, 0.6f, launch_yaw, -b); diff --git a/src/overlays/shared/weapons/visibomb_missile.c b/src/overlays/shared/weapons/visibomb_missile.c index 518c15fb79..3d2c2d859a 100644 --- a/src/overlays/shared/weapons/visibomb_missile.c +++ b/src/overlays/shared/weapons/visibomb_missile.c @@ -604,7 +604,7 @@ spawn_visibomb_missile(unsigned char *source_moby, V_2b58d8 *launch_position, fl unsigned char *spawned_moby_vars = ((unsigned char *)MOBY(spawned_moby)->pvars); struct Hero *G = &hero; V_2b58d8 collision_start; - G->unk1FE0 = spawned_moby; + G->visibomb_missile = spawned_moby; D_L00_0017E508 = 1; MOBY(spawned_moby)->update_dist = 0xFF; MOBY(spawned_moby)->draw_dist = 0xFF; From c1027cde3a24f6ca55882fbefef3916eea14d6d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:57:47 +0000 Subject: [PATCH 012/213] decomp: name 67 more hero fields from their use Grind speed and boost, rail jump arming, jump impulse and target height, swing rope spring, wall push-out, face expression, item swap timers, drone and suction slots, glow phases and more, each from what the code does with the field or the hero block notes by address. --- include/rnc/hero/hero.h | 321 +++++++++--------- include/rnc/overlay/shared/hero/item_defs.h | 2 +- src/check/hero_layout_check.c | 124 +++---- src/overlays/l01/hero/hero_set_state.c | 116 +++---- .../update_hero_motion_for_current_state.c | 20 +- .../l01/hero/update_hero_state_machine.c | 19 +- src/overlays/l02/hero/hero_set_state.c | 133 ++++---- .../l02/hero/update_hero_state_motion.c | 43 +-- src/overlays/l03/hero/hero_set_state.c | 116 +++---- .../update_hero_motion_for_current_state.c | 46 +-- .../l03/hero/update_hero_state_machine.c | 23 +- src/overlays/l03/mobys/help_hints.c | 4 +- .../hero/apply_hero_ground_material_effects.c | 14 +- src/overlays/l05/hero/hero_set_state.c | 124 +++---- .../l05/hero/update_hero_motion_by_state.c | 63 ++-- .../l05/hero/update_hero_state_machine.c | 23 +- src/overlays/l06/hero/hero_set_state.c | 144 ++++---- .../update_hero_motion_for_current_state.c | 72 ++-- .../l06/hero/update_hero_state_machine.c | 49 +-- src/overlays/l08/hero/hero_set_state.c | 134 ++++---- .../update_hero_motion_for_current_state.c | 64 ++-- .../l08/hero/update_hero_state_transitions.c | 51 +-- src/overlays/l11/hero/hero_set_state.c | 114 +++---- .../l11/hero/update_hero_motion_by_state.c | 38 ++- .../l11/hero/update_hero_state_transitions.c | 23 +- src/overlays/l11/mobys/jet_fighter.c | 2 +- src/overlays/l12/hero/hero_set_state.c | 116 +++---- .../update_hero_motion_for_current_state.c | 48 +-- .../l12/hero/update_hero_state_transitions.c | 27 +- src/overlays/l14/hero/hero_set_state.c | 126 +++---- .../l14/hero/process_hero_state_transitions.c | 53 +-- .../l14/hero/update_hero_motion_by_state.c | 60 ++-- src/overlays/l15/hero/hero_set_state.c | 124 +++---- .../update_hero_motion_for_current_state.c | 38 +-- .../l15/hero/update_hero_state_machine.c | 23 +- .../hero/apply_hero_ground_material_effects.c | 14 +- src/overlays/l16/hero/hero_set_state.c | 136 ++++---- .../update_hero_motion_for_current_state.c | 63 ++-- .../l16/hero/update_hero_state_transitions.c | 51 +-- src/overlays/l17/hero/hero_set_state.c | 162 ++++----- .../l17/hero/process_hero_hit_response.c | 2 +- .../update_hero_motion_for_current_state.c | 77 ++--- .../l17/hero/update_hero_state_transitions.c | 53 +-- src/overlays/l17/mobys/fighter_jet.c | 2 +- .../l18/hero/apply_hero_ground_type_effects.c | 2 +- src/overlays/l18/hero/hero_set_state.c | 144 ++++---- .../l18/hero/process_hero_state_transitions.c | 51 +-- .../update_hero_motion_for_current_state.c | 64 ++-- src/overlays/shared/camera/grindrail_camera.c | 2 +- .../shared/camera/target_tracking_camera.c | 8 +- .../shared/enemies/ground_melee_enemy.c | 2 +- .../game/restore_or_clear_level_state.c | 2 +- src/overlays/shared/hero/hero_frame_update.c | 47 +-- .../shared/hero/hero_handle_jump_press.c | 2 +- src/overlays/shared/hero/hero_idle_sequence.c | 22 +- .../shared/hero/hero_move_state_velocity.c | 17 +- src/overlays/shared/hero/hero_set_state.c | 200 +++++------ src/overlays/shared/hero/hero_switch_item.c | 108 +++--- .../shared/hero/hero_update_hop_movement.c | 4 +- .../shared/hero/hero_update_movement.c | 80 ++--- .../shared/hero/hero_update_transitions.c | 53 +-- src/overlays/shared/hero/initialize_hero.c | 4 +- .../hero/process_hero_item_action_input.c | 14 +- .../hero/process_hero_primary_item_input.c | 24 +- src/overlays/shared/hero/set_hero_animation.c | 56 +-- .../update_hero_and_vehicle_mode_effects.c | 34 +- .../shared/hero/update_hero_ground_contact.c | 6 +- ...ate_hero_vehicle_attachments_and_effects.c | 31 +- .../mobys/evaluate_moby_animation_pose.c | 2 +- .../shared/ui/hud/draw_trick_combo_hud.c | 8 +- .../ui/hud/draw_weapon_ammo_hud_panel.c | 14 +- src/overlays/shared/weapons/drone.c | 4 +- src/overlays/shared/weapons/pyrocitor.c | 4 +- src/overlays/shared/weapons/suckcannon.c | 4 +- src/overlays/shared/weapons/swingshot.c | 18 +- src/ui/text/draw_dialog_text.c | 1 - 76 files changed, 2067 insertions(+), 2022 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index 6ddbe038f1..13108b7d01 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -94,10 +94,10 @@ struct HeroItemSlot { s32 unk38; /* 0x38 */ s16 unk3C; /* 0x3C */ u16 unk3E; /* 0x3E */ - s32 locked_on; /* 0x40: on slot 6, nonzero makes the Ryno aim along unk4C */ + s32 locked_on; /* 0x40: on slot 6, nonzero makes the Ryno aim along lock_yaw */ u8 pad_44[0x4]; struct Moby - *lock_target; /* 0x48: on slot 6, the moby the weapons lock on to while unk40 is set */ + *lock_target; /* 0x48: on slot 6, the moby the weapons lock on to while locked_on is set */ f32 lock_yaw; /* 0x4C: yaw */ }; @@ -128,7 +128,7 @@ struct HeroMotion { Vec4 resolved_velocity_z; /* 0x120 */ Vec4 resolved_velocity_xy; /* 0x130 */ Vec4 platform_carry; /* 0x140 */ - Vec4 momentum; /* 0x150: copied from unk110/displacement on hero_set_state */ + Vec4 momentum; /* 0x150: copied from displacement on hero_set_state */ f32 speed_xy; /* 0x160: current horizontal speed per frame; eases toward ground_speed, capped at frame_time * 52 */ f32 flat_speed; /* 0x164 */ f32 forward_speed; /* 0x168 */ @@ -163,7 +163,7 @@ struct HeroState { struct HeroHealth { s32 hp; /* 0x22A8: hit points; 0 = dead */ s32 vehicle_mode_hp; /* 0x22AC: swapped with health.hp */ - s16 unk22B0; /* 0x22B0: s16 copy of health.hp */ + s16 saved_hp; /* 0x22B0: s16 copy of health.hp */ s16 fall_voice_slot; /* 0x22B2 */ }; @@ -187,41 +187,41 @@ struct Hero { struct HeroMotion motion; /* 0x80 */ f32 target_speed; /* 0x190: horizontal speed ground_speed eases toward; the stick handler writes it (0 with the stick centred) */ f32 ground_speed; /* 0x194: horizontal speed target this frame (0.095 running, i.e. 5.7 u/s at 60 fps; 0 idle) */ - s32 state_timer; /* 0x198: frames in the current state */ - s32 control_mode_timer; /* 0x19C */ - s32 step_frames; /* 0x1A0 */ - s32 anim_seq_frames; /* 0x1A4 */ - s32 stick_held_frames; /* 0x1A8 */ - s32 stick_idle_frames; /* 0x1AC */ - s16 ledge_probe_cooldown; /* 0x1B0 */ - s16 unk1B2; /* 0x1B2 */ - s32 wall_jump_window; /* 0x1B4 */ - s32 long_jump_lockout; /* 0x1B8 */ - s32 item_anim_frames; /* 0x1BC */ - s32 invulnerable_frames; /* 0x1C0 */ - s32 move_lock_timer; /* 0x1C4 */ - s16 unk1C8; /* 0x1C8 */ - s16 rail_catch_grace; /* 0x1CA */ - s32 collision_off_frames; /* 0x1CC */ - s32 unk1D0; /* 0x1D0 */ - s32 jump_buffer_lockout; /* 0x1D4 */ - s16 jump_lockout_timer; /* 0x1D8 */ - s16 unk1DA; /* 0x1DA */ - s16 unk1DC; /* 0x1DC */ - s16 dive_lock; /* 0x1DE */ - s16 sinking_floor_hold; /* 0x1E0 */ - s16 still_frames; /* 0x1E2 */ - s16 rail_grab_cooldown; /* 0x1E4 */ - s16 grapple_lockout_timer; /* 0x1E6 */ - s16 fidget_cooldown; /* 0x1E8 */ - s16 unk1EA; /* 0x1EA */ - s16 unk1EC; /* 0x1EC */ - s16 hit_flash_timer; /* 0x1EE */ - s16 unk1F0; /* 0x1F0 */ - s16 jump_lock_timer; /* 0x1F2 */ - s16 edge_brake_lock_timer; /* 0x1F4 */ - s16 unk1F6; /* 0x1F6 */ - s16 unk1F8; /* 0x1F8 */ + s32 state_timer; /* 0x198: frames in the current state */ + s32 control_mode_timer; /* 0x19C */ + s32 step_frames; /* 0x1A0 */ + s32 anim_seq_frames; /* 0x1A4 */ + s32 stick_held_frames; /* 0x1A8 */ + s32 stick_idle_frames; /* 0x1AC */ + s16 ledge_probe_cooldown; /* 0x1B0 */ + s16 item_select_override_timer; /* 0x1B2 */ + s32 wall_jump_window; /* 0x1B4 */ + s32 long_jump_lockout; /* 0x1B8 */ + s32 item_anim_frames; /* 0x1BC */ + s32 invulnerable_frames; /* 0x1C0 */ + s32 move_lock_timer; /* 0x1C4 */ + s16 grind_catch_lockout; /* 0x1C8 */ + s16 rail_catch_grace; /* 0x1CA */ + s32 collision_off_frames; /* 0x1CC */ + s32 idle_return_delay; /* 0x1D0 */ + s32 jump_buffer_lockout; /* 0x1D4 */ + s16 jump_lockout_timer; /* 0x1D8 */ + s16 item_swap_timer; /* 0x1DA */ + s16 face_expression_timer; /* 0x1DC */ + s16 dive_lock; /* 0x1DE */ + s16 sinking_floor_hold; /* 0x1E0 */ + s16 still_frames; /* 0x1E2 */ + s16 rail_grab_cooldown; /* 0x1E4 */ + s16 grapple_lockout_timer; /* 0x1E6 */ + s16 fidget_cooldown; /* 0x1E8 */ + s16 wall_push_out_timer; /* 0x1EA */ + s16 unk1EC; /* 0x1EC */ + s16 hit_flash_timer; /* 0x1EE */ + s16 ledge_ahead_timer; /* 0x1F0 */ + s16 jump_lock_timer; /* 0x1F2 */ + s16 edge_brake_lock_timer; /* 0x1F4 */ + s16 pushed_timer; /* 0x1F6 */ + s16 magnet_walk_timer; /* 0x1F8 */ u8 pad_1FA[0x6]; Vec4 wall_contact_normal; /* 0x200 */ Vec4 wall_contact_point; /* 0x210 */ @@ -231,13 +231,13 @@ struct Hero { f32 capsule_bottom_target; /* 0x22C */ f32 capsule_radius_target; /* 0x230 */ f32 capsule_radius; /* 0x234 */ - f32 unk238; /* 0x238: velocity of the unk234 spring (FUN_L00_00211380) */ - u8 *coll_hit_moby; /* 0x23C: moby of the last push-out collision hit */ - s32 wall_moby; /* 0x240 */ + f32 capsule_radius_speed; /* 0x238: velocity of the capsule_radius spring (FUN_L00_00211380) */ + u8 *coll_hit_moby; /* 0x23C: moby of the last push-out collision hit */ + s32 wall_moby; /* 0x240 */ union { f32 f; s32 i; - } unk244; /* 0x244: written as a float and zeroed as an int */ + } wall_push_out_speed; /* 0x244: written as a float and zeroed as an int */ f32 wall_probe_distance; /* 0x248 */ u8 pad_24C[0x4]; f32 wall_normal_pitch; /* 0x250 */ @@ -282,7 +282,7 @@ struct Hero { union { f32 f; s32 i; - } unk2E8; /* 0x2E8: written as a float and zeroed as an int */ + } ground_roll; /* 0x2E8: written as a float and zeroed as an int */ f32 downhill_yaw; /* 0x2EC */ f32 water_surface_z; /* 0x2F0 */ f32 sink_surface_z; /* 0x2F4 */ @@ -310,12 +310,12 @@ struct Hero { s32 platform_moby; /* 0x360: attached moby (FUN_L00_00233f80) */ s32 attach_flags; /* 0x364: attach flags, bits 0 and 1 */ u8 pad_368[0x48]; - f32 unk3B0; /* 0x3B0 */ + f32 run_speed_ratio; /* 0x3B0 */ union { f32 f; s32 i; - } unk3B4; /* 0x3B4: written as a float and zeroed as an int */ - s16 unk3B8; /* 0x3B8 */ + } prev_ground_pitch; /* 0x3B4: written as a float and zeroed as an int */ + s16 move_along_stick; /* 0x3B8 */ u8 pad_3BA[0x2]; s16 run_start_blending; /* 0x3BC */ s16 sharp_turn; /* 0x3BE */ @@ -336,31 +336,31 @@ struct Hero { Vec4 takeoff_pos; /* 0x400 */ f32 smoothed_ground_z; /* 0x410 */ f32 air_turn_rate; /* 0x414 */ - s32 rail_land_frames; /* 0x418: set when velocity.z clamps to unk500.z, counts up */ + s32 rail_land_frames; /* 0x418: set when velocity.z clamps to rail_point.z, counts up */ s16 velocity_keys_active; /* 0x41C */ s16 past_jump_apex; /* 0x41E: set to 1 when gravity_z(velocity) < 0.001 */ - s32 takeoff_frame; /* 0x420: per-state scale_game_frames(N), compared with state_timer */ - f32 air_stick_speed; /* 0x424 */ - f32 unk428; /* 0x428 */ - f32 unk42C; /* 0x42C */ - f32 jump_height; /* 0x430 */ - f32 unk434; /* 0x434 */ - f32 high_jump_drift_yaw; /* 0x438 */ - f32 takeoff_yaw; /* 0x43C */ - f32 apex_anim_frame; /* 0x440 */ - f32 target_anim_frame; /* 0x444 */ + s32 takeoff_frame; /* 0x420: per-state scale_game_frames(N), compared with state_timer */ + f32 air_stick_speed; /* 0x424 */ + f32 pending_jump_impulse; /* 0x428 */ + f32 jump_impulse_total; /* 0x42C */ + f32 jump_height; /* 0x430 */ + f32 air_capsule_bottom; /* 0x434 */ + f32 high_jump_drift_yaw; /* 0x438 */ + f32 takeoff_yaw; /* 0x43C */ + f32 apex_anim_frame; /* 0x440 */ + f32 target_anim_frame; /* 0x444 */ f32 jump_land_anim_frame; /* 0x448 */ s32 frames_to_land; /* 0x44C */ - s32 unk450; /* 0x450 */ + s32 jump_stick_direction; /* 0x450 */ f32 air_target_speed; /* 0x454 */ f32 high_jump_drift_speed; /* 0x458 */ f32 ledge_jump_speed; /* 0x45C */ - Vec4 unk460; /* 0x460 */ + Vec4 wall_hit_normal; /* 0x460 */ Vec4 wall_jump_normal; /* 0x470 */ f32 air_speed_step_up; /* 0x480 */ f32 jump_decel; /* 0x484 */ f32 jump_height_start; /* 0x488 */ - f32 unk48C; /* 0x48C */ + f32 jump_height_target; /* 0x48C */ f32 fall_start_distance; /* 0x490 */ f32 jump_anim_retime_scale; /* 0x494 */ s16 jump_ramp_frames; /* 0x498 */ @@ -369,10 +369,10 @@ struct Hero { s16 unk49E; /* 0x49E */ f32 jump_gravity; /* 0x4A0 */ s16 jump_blocked_ahead; /* 0x4A4 */ - s16 unk4A6; /* 0x4A6 */ - s16 unk4A8; /* 0x4A8 */ + s16 pack_glide_delay; /* 0x4A6 */ + s16 took_off_from_ice; /* 0x4A8 */ s16 fall_delay_frames; /* 0x4AA */ - s16 unk4AC; /* 0x4AC */ + s16 can_use_item_in_jump; /* 0x4AC */ u8 can_chain_high_jump; /* 0x4AE */ u8 can_double_jump; /* 0x4AF */ f32 rise_fall_gravity; /* 0x4B0 */ @@ -387,43 +387,43 @@ struct Hero { f32 ledge_normal_yaw; /* 0x4E4 */ s32 ledge_found; /* 0x4E8 */ f32 unk4EC; /* 0x4EC */ - f32 unk4F0; /* 0x4F0 */ + f32 smoothed_air_z; /* 0x4F0 */ u32 ledge_flags; /* 0x4F4: ledge flags, bit 0: no headroom above the ledge (FUN_L00_0020bed0) */ s32 ledge_moby; /* 0x4F8: first argument of FUN_L00_00233f80 (FUN_L01_00233de0) */ u8 pad_4FC[0x4]; - Vec4 rail_point; /* 0x500 */ - Vec4 joint9_world_pos; /* 0x510 */ - Vec4 joint14_world_pos; /* 0x520 */ - Vec4 root_joint_pos; /* 0x530 */ - Vec4 prev_rail_point; /* 0x540 */ - Vec4 jump_target_pos; /* 0x550 */ - s32 rail_spline; /* 0x560 */ - s32 rail_segment; /* 0x564 */ - f32 rail_seg_frac; /* 0x568 */ - s32 grind_rail; /* 0x56C */ - s32 rail_off_frames; /* 0x570 */ - f32 unk574; /* 0x574 */ - s32 grind_direction; /* 0x578 */ - f32 rail_dir_yaw; /* 0x57C */ - f32 rail_pitch; /* 0x580 */ - s32 rail_spline_loops; /* 0x584 */ - f32 grind_yaw_offset; /* 0x588 */ - s32 grind_anim_variant; /* 0x58C */ - s32 rail_switching; /* 0x590 */ - s32 transfer_from_spline; /* 0x594 */ - s32 prev_rail_segment; /* 0x598 */ - f32 prev_rail_seg_frac; /* 0x59C */ - s32 unk5A0; /* 0x5A0 */ - s32 rail_transfer_frames; /* 0x5A4 */ - s32 grind_pose; /* 0x5A8 */ + Vec4 rail_point; /* 0x500 */ + Vec4 joint9_world_pos; /* 0x510 */ + Vec4 joint14_world_pos; /* 0x520 */ + Vec4 root_joint_pos; /* 0x530 */ + Vec4 prev_rail_point; /* 0x540 */ + Vec4 jump_target_pos; /* 0x550 */ + s32 rail_spline; /* 0x560 */ + s32 rail_segment; /* 0x564 */ + f32 rail_seg_frac; /* 0x568 */ + s32 grind_rail; /* 0x56C */ + s32 rail_off_frames; /* 0x570 */ + f32 grind_speed; /* 0x574 */ + s32 grind_direction; /* 0x578 */ + f32 rail_dir_yaw; /* 0x57C */ + f32 rail_pitch; /* 0x580 */ + s32 rail_spline_loops; /* 0x584 */ + f32 grind_yaw_offset; /* 0x588 */ + s32 grind_anim_variant; /* 0x58C */ + s32 rail_switching; /* 0x590 */ + s32 transfer_from_spline; /* 0x594 */ + s32 prev_rail_segment; /* 0x598 */ + f32 prev_rail_seg_frac; /* 0x59C */ + s32 prev_rail_spline_loops; /* 0x5A0 */ + s32 rail_transfer_frames; /* 0x5A4 */ + s32 grind_pose; /* 0x5A8 */ union { f32 f; s32 i; - } unk5AC; /* 0x5AC: float approached toward a speed, zeroed as an int */ + } grind_speed_boost; /* 0x5AC: float approached toward a speed, zeroed as an int */ f32 grind_base_speed; /* 0x5B0 */ - s32 unk5B4; /* 0x5B4 */ - s32 unk5B8; /* 0x5B8 */ - s16 unk5BC; /* 0x5BC */ + s32 rail_swing_target; /* 0x5B4 */ + s32 rail_jump_armed; /* 0x5B8 */ + s16 rail_jump_trigger; /* 0x5BC */ s16 grind_hit; /* 0x5BE */ s32 rail_jump_queued; /* 0x5C0 */ s32 rail_gap_jump; /* 0x5C4 */ @@ -447,7 +447,7 @@ struct Hero { union { f32 f; s32 i; - } unk618; /* 0x618: float distance clamp, zeroed as an int */ + } follow_path_pull_speed; /* 0x618: float distance clamp, zeroed as an int */ u8 pad_61C[0x24]; Vec4 basis[3]; /* 0x640: rotation rows (transform_vector_by_basis) */ f32 facing_x; /* 0x670 */ @@ -462,20 +462,21 @@ struct Hero { f32 swim_water_level; /* 0x69C */ s32 unk6A0; /* 0x6A0 */ struct Moby *sink_effect_moby; /* 0x6A4 */ - f32 unk6A8; /* 0x6A8 */ - f32 unk6AC; /* 0x6AC */ - f32 unk6B0; /* 0x6B0 */ - f32 unk6B4; /* 0x6B4 */ + f32 bob_phase; /* 0x6A8 */ + f32 bob_offset; /* 0x6AC */ + f32 sway_phase; /* 0x6B0 */ + f32 sway_axis_phase; /* 0x6B4 */ u8 pad_6B8[0x8]; Vec4 smoothed_spin_stick; /* 0x6C0: 0x60 bytes cleared by fill_transfer_words */ f32 pivot_rot_x; /* 0x6D0 */ f32 trick_rot_y; /* 0x6D4 */ u8 pad_6D8[0x8]; - s32 tricks_landed[6]; /* 0x6E0: one flag per pose, indexed by unk88F */ - s32 unk6F8; /* 0x6F8: counts the flags set in unk6E0 */ + s32 tricks_landed[6]; /* 0x6E0: one flag per pose, indexed by air_pose_index */ + s32 tricks_landed_count; /* 0x6F8: counts the flags set in tricks_landed */ u8 pad_6FC[0x4]; - s32 unk700[3]; /* 0x700: cleared with unk6E0 when the HUD combo ends (FUN_L05_00262b58) */ - s32 unk70C; /* 0x70C: combo count the HUD keeps the best of (FUN_L05_00262b58) */ + s32 unk700 + [3]; /* 0x700: cleared with tricks_landed when the HUD combo ends (FUN_L05_00262b58) */ + s32 trick_combo_count; /* 0x70C: combo count the HUD keeps the best of (FUN_L05_00262b58) */ u8 pad_710[0x10]; Vec4 smoothed_steer_stick; /* 0x720 */ u8 pad_730[0x10]; @@ -517,7 +518,7 @@ struct Hero { s16 board_jump_frames; /* 0x89C */ s16 board_jump_cooldown; /* 0x89E */ f32 board_floor_z; /* 0x8A0 */ - f32 unk8A4; /* 0x8A4 */ + f32 wall_face_yaw; /* 0x8A4 */ s32 race_score; /* 0x8A8: count shown on the HUD (FUN_L05_00266710) */ s16 high_jump_window; /* 0x8AC */ u8 off_course_frames; /* 0x8AE */ @@ -542,9 +543,9 @@ struct Hero { s32 unk8E0; /* 0x8E0 */ f32 swim_lean_vel; /* 0x8E4 */ f32 swim_roll_velocity; /* 0x8E8 */ - f32 unk8EC; /* 0x8EC */ + f32 swim_yaw_rate; /* 0x8EC */ s32 puff_timer; /* 0x8F0 */ - s32 unk8F4; /* 0x8F4 */ + s32 swim_thrust_timer; /* 0x8F4 */ s16 pack_particle_timer; /* 0x8F8 */ u8 pad_8FA[0x2]; f32 drown_sink_speed; /* 0x8FC */ @@ -576,31 +577,31 @@ struct Hero { struct Moby *grapple_target; /* 0x964 */ s32 grapple_target_in_sight; /* 0x968 */ f32 target_arrival_frames; /* 0x96C */ - f32 unk970; /* 0x970 */ + f32 grapple_target_dist; /* 0x970 */ s32 grapple_pull_ending; /* 0x974 */ s32 unk978; /* 0x978 */ f32 tether_radius; /* 0x97C */ f32 grapple_target_radius; /* 0x980 */ - f32 unk984; /* 0x984 */ - s32 unk988; /* 0x988 */ + f32 swing_max_range; /* 0x984 */ + s32 swingshot_missed; /* 0x988 */ u8 pad_98C[0x4]; - struct Moby *swing_target; /* 0x990 */ - struct Moby *swing_target_moby; /* 0x994 */ - f32 swing_target_dist; /* 0x998 */ - s16 swing_hooked; /* 0x99C */ - s16 swing_target_in_sight; /* 0x99E */ - f32 unk9A0; /* 0x9A0 */ - f32 swing_rope_length; /* 0x9A4 */ - f32 swing_length_vel; /* 0x9A8 */ - f32 swing_yaw; /* 0x9AC */ - f32 swing_gravity; /* 0x9B0 */ - f32 swing_push_speed; /* 0x9B4 */ - f32 swing_yaw_vel; /* 0x9B8 */ - s16 swing_anim_dir; /* 0x9BC */ - s16 swing_entry_push; /* 0x9BE */ + struct Moby *swing_target; /* 0x990 */ + struct Moby *swing_target_moby; /* 0x994 */ + f32 swing_target_dist; /* 0x998 */ + s16 swing_hooked; /* 0x99C */ + s16 swing_target_in_sight; /* 0x99E */ + f32 swing_rope_target_length; /* 0x9A0 */ + f32 swing_rope_length; /* 0x9A4 */ + f32 swing_length_vel; /* 0x9A8 */ + f32 swing_yaw; /* 0x9AC */ + f32 swing_gravity; /* 0x9B0 */ + f32 swing_push_speed; /* 0x9B4 */ + f32 swing_yaw_vel; /* 0x9B8 */ + s16 swing_anim_dir; /* 0x9BC */ + s16 swing_entry_push; /* 0x9BE */ u8 pad_9C0[0x4]; f32 swing_rope_spring_k; /* 0x9C4 */ - f32 unk9C8; /* 0x9C8 */ + f32 swing_rope_damping; /* 0x9C8 */ f32 swing_rope_max_speed; /* 0x9CC */ f32 rail_yaw; /* 0x9D0: rail yaw (FUN_L01_002f6328) */ f32 rail_ride_pitch; /* 0x9D4 */ @@ -623,8 +624,8 @@ struct Hero { f32 aim_pitch; /* 0xA78: gadget aim pitch */ s32 unkA7C; /* 0xA7C */ s32 last_landed_moby; /* 0xA80 */ - u8 *unkA84; /* 0xA84 */ - u8 *unkA88; /* 0xA88 */ + u8 *replacement_moby; /* 0xA84 */ + u8 *base_moby; /* 0xA88 */ void *vehicle_mode3_moby; /* 0xA8C */ f32 anim_speed; /* 0xA90 */ f32 anim_frame_rate; /* 0xA94 */ @@ -643,8 +644,8 @@ struct Hero { u8 *item_slot_blends [2]; /* 0xD00: per item slot 0/1: blend from FUN_L00_0024f028, faded by update_hero_item_slot_blends */ u8 *held_item_anim_blend[2]; /* 0xD08: per item slot 0/1: moby from FUN_L00_0024f028 */ - u8 *unkD10; /* 0xD10 */ - s32 unkD14; /* 0xD14 */ + u8 *face_anim_layer; /* 0xD10 */ + s32 arm_layer_fade; /* 0xD14 */ u8 pad_D18[0x8]; f32 unkD20; /* 0xD20 */ u8 pad_D24[0xC]; @@ -687,7 +688,7 @@ struct Hero { u8 selector_11; /* 0x12EB */ u8 selector_13; /* 0x12EC */ u8 ground_sound_class; /* 0x12ED */ - u8 unk12EE; /* 0x12EE */ + u8 grind_jump_block; /* 0x12EE */ u8 pad_12EF[0x301]; struct Moby *ship_moby; /* 0x15F0: the ship the hero is flying (l17 fighter_jet_update) */ s16 ship_oclass; /* 0x15F4: its oclass, -1 when none */ @@ -701,7 +702,7 @@ struct Hero { f32 ship_hp_max; /* 0x1600: full ship_hp; the HUD bar shows ship_hp over it */ f32 unk1604; /* 0x1604 */ s32 ship_hp_percent; /* 0x1608: ship_hp as a percentage for the HUD */ - s16 unk160C; /* 0x160C */ + s16 ship_hud_handle; /* 0x160C */ u8 unk160E; /* 0x160E */ u8 ship_flags; /* 0x160F: 2 = being steered back from the edge or height limit of the space arena (FUN_L11_00313f60) */ u8 pad_1610[0x4]; @@ -712,11 +713,11 @@ struct Hero { f32 glow_phase; /* 0x1628: phase of the hero moby's colour pulse (FUN_L00_002080b0) */ u8 pad_162C[0x4]; s32 vehicle_hp; /* 0x1630 */ - s16 unk1634; /* 0x1634 */ + s16 vehicle_anim_handle; /* 0x1634 */ s16 vehicle_triangle_cooldown; /* 0x1636 */ u8 pad_1638[0x8]; - Vec4 target_pose; /* 0x1640 */ - s32 unk1650; /* 0x1650 */ + Vec4 target_pose; /* 0x1640 */ + s32 state_entry_option; /* 0x1650 */ u8 pad_1654[0xC]; s32 sink_jump_count; /* 0x1660 */ u8 pad_1664[0xC]; @@ -724,7 +725,7 @@ struct Hero { u8 unk17B0[0x140]; /* 0x17B0: buffer handed to FUN_L00_00262500 / FUN_L00_00262528 */ struct HeroEase item_eases [3]; /* 0x18F0: eased records, kind 5 set when an item slot is ready (FUN_L00_00210748) */ - Vec4 pos_history[32]; /* 0x1B00: ring of 32 quads indexed by unk21B0 */ + Vec4 pos_history[32]; /* 0x1B00: ring of 32 quads indexed by pos_history_index */ u8 saved_pos_rot[0x20]; /* 0x1D00 */ f32 stick_x; /* 0x1D20: stick vector (d-pad when the stick is idle) */ f32 stick_y; /* 0x1D24 */ @@ -759,14 +760,14 @@ struct Hero { u8 ammo_used; /* 0x1FF6 */ u8 ammo_capacity; /* 0x1FF7 */ u8 pad_1FF8[0x28]; - u8 *unk2020[6]; /* 0x2020: six moby slots, filled at the index a moby carries at +0x54 */ + u8 *drone_mobys[6]; /* 0x2020: six moby slots, filled at the index a moby carries at +0x54 */ u8 pad_2038[0x8]; struct Moby *metal_detector_target; /* 0x2040: nearest oclass 0x25D moby (metal_detector_update) */ - f32 detector_target_dist; /* 0x2044: distance to unk2040; 100000 when none */ + f32 detector_target_dist; /* 0x2044: distance to metal_detector_target; 100000 when none */ s32 nearby_moby_close; /* 0x2048 */ u8 pad_204C[0x4]; - struct Moby *unk2050[10]; /* 0x2050 */ + struct Moby *suction_mobys[10]; /* 0x2050 */ s32 sucked_moby_count; /* 0x2078 */ s32 suck_cannon_incoming; /* 0x207C */ struct Moby *moby; /* 0x2080: the hero's moby */ @@ -785,20 +786,20 @@ struct Hero { u8 hand_item_hidden; /* 0x20AF */ u8 hydro_tank_full; /* 0x20B0 */ u8 fall_fade_pending; /* 0x20B1 */ - u8 unk20B2; /* 0x20B2 */ + u8 on_hoverboard; /* 0x20B2 */ u8 gravity_mode; /* 0x20B3 */ - u8 unk20B4; /* 0x20B4 */ + u8 pyrocitor_tap_count; /* 0x20B4 */ u8 wrench_combo_step; /* 0x20B5 */ u8 pad_20B6[0x2]; s32 pending_item[7]; /* 0x20B8: per slot: item to switch to */ s32 selected_item[7]; /* 0x20D4: per slot: item after a switch */ s32 saved_item[7]; /* 0x20F0: per slot: item kept while another is forced in */ s32 restore_item[7]; /* 0x210C: per slot: 1 puts saved_item back */ - f32 yaw_history[32]; /* 0x2128: ring of 32 yaws (motion.rot.z) indexed by unk21A8 */ - s32 yaw_history_index; /* 0x21A8: unk2128 ring index */ - s32 yaw_ring_count; /* 0x21AC: unk2128 ring count */ - s32 pos_history_index; /* 0x21B0: unk1B00 ring index */ - s32 pos_history_count; /* 0x21B4: unk1B00 ring count */ + f32 yaw_history[32]; /* 0x2128: ring of 32 yaws (motion.rot.z) indexed by yaw_history_index */ + s32 yaw_history_index; /* 0x21A8: yaw_history ring index */ + s32 yaw_ring_count; /* 0x21AC: yaw_history ring count */ + s32 pos_history_index; /* 0x21B0: pos_history ring index */ + s32 pos_history_count; /* 0x21B4: pos_history ring count */ u8 pad_21B8[0x20]; s16 unk21D8[8][4]; /* 0x21D8: 8 slots of four s16 */ s32 grind_voice; /* 0x2218: voice of sound slot 0, -1 = none (slots 0-7 run to 0x2234, FUN_L00_00206c08) */ @@ -810,12 +811,12 @@ struct Hero { s32 voice_slot6; /* 0x2230 */ s32 board_boost_voice; /* 0x2234 */ struct Moby *sound_slot_moby - [8]; /* 0x2238: per sound slot (unk2218 + i * 4): moby the sound plays on, 0 = hero.moby */ + [8]; /* 0x2238: per sound slot (grind_voice + i * 4): moby the sound plays on, 0 = hero.moby */ u8 pad_2258[0x18]; s32 fidget_index; /* 0x2270 */ s32 look_target; /* 0x2274 */ - void *unk2278; /* 0x2278 */ - s32 unk227C; /* 0x227C */ + void *anim_link_moby; /* 0x2278 */ + s32 anim_link_table; /* 0x227C */ struct Moby *damage_source_moby; /* 0x2280 */ s32 camera_mode; /* 0x2284 */ f32 reach_distance; /* 0x2288 */ @@ -827,31 +828,31 @@ struct Hero { s32 underwater_air; /* 0x22A0 */ f32 water_depth; /* 0x22A4 */ struct HeroHealth health; /* 0x22A8 */ - s32 unk22B4; /* 0x22B4 */ + s32 wall_jumped; /* 0x22B4 */ f32 current_path_dist; /* 0x22B8: distance to the nearest carrying path this frame (water_current_update keeps the minimum) */ u8 pad_22BC[0x8]; s32 slot3_anim_timer; /* 0x22C4 */ s16 weapon_lowered; /* 0x22C8 */ u8 hover_latch; /* 0x22CA */ u8 vent_updraft; /* 0x22CB */ - s16 unk22CC; /* 0x22CC */ - s16 unk22CE; /* 0x22CE */ + s16 requested_state; /* 0x22CC */ + s16 face_expression; /* 0x22CE */ u8 pad_22D0[0x2]; - s16 item_selector_timer; /* 0x22D2 */ - s16 quick_swap_tap_timer; /* 0x22D4: countdown set on pad bit 0x10 press */ - s16 quick_swap_tap_window; /* 0x22D6: countdown; nonzero with unk22D4 switches pending_item[0] */ - s16 pack_disabled; /* 0x22D8 */ + s16 item_selector_timer; /* 0x22D2 */ + s16 quick_swap_tap_timer; /* 0x22D4: countdown set on pad bit 0x10 press */ + s16 quick_swap_tap_window; /* 0x22D6: countdown; nonzero with quick_swap_tap_timer switches pending_item[0] */ + s16 pack_disabled; /* 0x22D8 */ s16 path_constrain_pending; /* 0x22DA */ s16 unk22DC; /* 0x22DC */ s16 vehicle_toggle_timer; /* 0x22DE */ s16 glow_pulse_level; /* 0x22E0 */ u8 pad_22E2[0x6]; - f32 unk22E8; /* 0x22E8: phase for the items[4].moby colour */ - f32 unk22EC; /* 0x22EC: phase for the items[4].moby2 colour */ - f32 unk22F0; /* 0x22F0: phase for the items[5].moby colour */ - s32 color_fade_active; /* 0x22F4 */ - s32 tint_color; /* 0x22F8 */ - s16 unk22FC; /* 0x22FC */ + f32 item4_glow_phase; /* 0x22E8: phase for the items[4].moby colour */ + f32 item4_alt_glow_phase; /* 0x22EC: phase for the items[4].moby2 colour */ + f32 item5_glow_phase; /* 0x22F0: phase for the items[5].moby colour */ + s32 color_fade_active; /* 0x22F4 */ + s32 tint_color; /* 0x22F8 */ + s16 unk22FC; /* 0x22FC */ }; /* Offsets are checked in src/check/hero_layout_check.c (make check). */ diff --git a/include/rnc/overlay/shared/hero/item_defs.h b/include/rnc/overlay/shared/hero/item_defs.h index 22b1f09c57..27d8c07eb2 100644 --- a/include/rnc/overlay/shared/hero/item_defs.h +++ b/include/rnc/overlay/shared/hero/item_defs.h @@ -21,7 +21,7 @@ typedef struct ItemDef { s32 hero_animation; /* 0x24: animation the hero plays while holding the item */ s32 animation; /* 0x28: animation of the item's slot moby */ s32 animation_mode_12; /* 0x2C: used instead while state.control_mode is 12 */ - s32 unk30; /* 0x30: copied to hero.unk20AA */ + s32 unk30; /* 0x30: copied to hero.weapon_up */ s16 pickup_message_multiple; /* 0x34: dialogue message when more than one ammo is picked up */ s16 pickup_message_single; /* 0x36: dialogue message when one ammo is picked up */ u16 unk38; /* 0x38 */ diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index 6159224320..11007cdeb2 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -96,34 +96,34 @@ HERO_OFFSET_CHECK(anim_seq_frames, 0x1A4); HERO_OFFSET_CHECK(stick_held_frames, 0x1A8); HERO_OFFSET_CHECK(stick_idle_frames, 0x1AC); HERO_OFFSET_CHECK(ledge_probe_cooldown, 0x1B0); -HERO_OFFSET_CHECK(unk1B2, 0x1B2); +HERO_OFFSET_CHECK(item_select_override_timer, 0x1B2); HERO_OFFSET_CHECK(wall_jump_window, 0x1B4); HERO_OFFSET_CHECK(long_jump_lockout, 0x1B8); HERO_OFFSET_CHECK(item_anim_frames, 0x1BC); HERO_OFFSET_CHECK(invulnerable_frames, 0x1C0); HERO_OFFSET_CHECK(move_lock_timer, 0x1C4); -HERO_OFFSET_CHECK(unk1C8, 0x1C8); +HERO_OFFSET_CHECK(grind_catch_lockout, 0x1C8); HERO_OFFSET_CHECK(rail_catch_grace, 0x1CA); HERO_OFFSET_CHECK(collision_off_frames, 0x1CC); -HERO_OFFSET_CHECK(unk1D0, 0x1D0); +HERO_OFFSET_CHECK(idle_return_delay, 0x1D0); HERO_OFFSET_CHECK(jump_buffer_lockout, 0x1D4); HERO_OFFSET_CHECK(jump_lockout_timer, 0x1D8); -HERO_OFFSET_CHECK(unk1DA, 0x1DA); -HERO_OFFSET_CHECK(unk1DC, 0x1DC); +HERO_OFFSET_CHECK(item_swap_timer, 0x1DA); +HERO_OFFSET_CHECK(face_expression_timer, 0x1DC); HERO_OFFSET_CHECK(dive_lock, 0x1DE); HERO_OFFSET_CHECK(sinking_floor_hold, 0x1E0); HERO_OFFSET_CHECK(still_frames, 0x1E2); HERO_OFFSET_CHECK(rail_grab_cooldown, 0x1E4); HERO_OFFSET_CHECK(grapple_lockout_timer, 0x1E6); HERO_OFFSET_CHECK(fidget_cooldown, 0x1E8); -HERO_OFFSET_CHECK(unk1EA, 0x1EA); +HERO_OFFSET_CHECK(wall_push_out_timer, 0x1EA); HERO_OFFSET_CHECK(unk1EC, 0x1EC); HERO_OFFSET_CHECK(hit_flash_timer, 0x1EE); -HERO_OFFSET_CHECK(unk1F0, 0x1F0); +HERO_OFFSET_CHECK(ledge_ahead_timer, 0x1F0); HERO_OFFSET_CHECK(jump_lock_timer, 0x1F2); HERO_OFFSET_CHECK(edge_brake_lock_timer, 0x1F4); -HERO_OFFSET_CHECK(unk1F6, 0x1F6); -HERO_OFFSET_CHECK(unk1F8, 0x1F8); +HERO_OFFSET_CHECK(pushed_timer, 0x1F6); +HERO_OFFSET_CHECK(magnet_walk_timer, 0x1F8); HERO_OFFSET_CHECK(wall_contact_normal, 0x200); HERO_OFFSET_CHECK(wall_contact_point, 0x210); HERO_OFFSET_CHECK(capsule_top, 0x220); @@ -148,7 +148,7 @@ HERO_OFFSET_CHECK(ground_z, 0x2D8); HERO_OFFSET_CHECK(ground_distance, 0x2DC); HERO_OFFSET_CHECK(ground_slope, 0x2E0); HERO_OFFSET_CHECK(ground_pitch, 0x2E4); -HERO_OFFSET_CHECK(unk2E8, 0x2E8); +HERO_OFFSET_CHECK(ground_roll, 0x2E8); HERO_OFFSET_CHECK(last_landed_moby, 0xA80); HERO_OFFSET_CHECK(downhill_yaw, 0x2EC); HERO_OFFSET_CHECK(water_surface_z, 0x2F0); @@ -161,9 +161,9 @@ HERO_OFFSET_CHECK(magnetic_floor, 0x308); HERO_OFFSET_CHECK(on_flagged_ground_moby, 0x30A); HERO_OFFSET_CHECK(frames_off_ground, 0x30C); HERO_OFFSET_CHECK(air_frames, 0x30E); -HERO_OFFSET_CHECK(unk3B0, 0x3B0); -HERO_OFFSET_CHECK(unk3B4, 0x3B4); -HERO_OFFSET_CHECK(unk3B8, 0x3B8); +HERO_OFFSET_CHECK(run_speed_ratio, 0x3B0); +HERO_OFFSET_CHECK(prev_ground_pitch, 0x3B4); +HERO_OFFSET_CHECK(move_along_stick, 0x3B8); HERO_OFFSET_CHECK(run_start_blending, 0x3BC); HERO_OFFSET_CHECK(sharp_turn, 0x3BE); HERO_OFFSET_CHECK(velocity_keys_start_frame, 0x3D0); @@ -183,26 +183,26 @@ HERO_OFFSET_CHECK(velocity_keys_active, 0x41C); HERO_OFFSET_CHECK(past_jump_apex, 0x41E); HERO_OFFSET_CHECK(takeoff_frame, 0x420); HERO_OFFSET_CHECK(air_stick_speed, 0x424); -HERO_OFFSET_CHECK(unk428, 0x428); -HERO_OFFSET_CHECK(unk42C, 0x42C); +HERO_OFFSET_CHECK(pending_jump_impulse, 0x428); +HERO_OFFSET_CHECK(jump_impulse_total, 0x42C); HERO_OFFSET_CHECK(jump_height, 0x430); -HERO_OFFSET_CHECK(unk434, 0x434); +HERO_OFFSET_CHECK(air_capsule_bottom, 0x434); HERO_OFFSET_CHECK(high_jump_drift_yaw, 0x438); HERO_OFFSET_CHECK(takeoff_yaw, 0x43C); HERO_OFFSET_CHECK(apex_anim_frame, 0x440); HERO_OFFSET_CHECK(target_anim_frame, 0x444); HERO_OFFSET_CHECK(jump_land_anim_frame, 0x448); HERO_OFFSET_CHECK(frames_to_land, 0x44C); -HERO_OFFSET_CHECK(unk450, 0x450); +HERO_OFFSET_CHECK(jump_stick_direction, 0x450); HERO_OFFSET_CHECK(air_target_speed, 0x454); HERO_OFFSET_CHECK(high_jump_drift_speed, 0x458); HERO_OFFSET_CHECK(ledge_jump_speed, 0x45C); -HERO_OFFSET_CHECK(unk460, 0x460); +HERO_OFFSET_CHECK(wall_hit_normal, 0x460); HERO_OFFSET_CHECK(wall_jump_normal, 0x470); HERO_OFFSET_CHECK(air_speed_step_up, 0x480); HERO_OFFSET_CHECK(jump_decel, 0x484); HERO_OFFSET_CHECK(jump_height_start, 0x488); -HERO_OFFSET_CHECK(unk48C, 0x48C); +HERO_OFFSET_CHECK(jump_height_target, 0x48C); HERO_OFFSET_CHECK(fall_start_distance, 0x490); HERO_OFFSET_CHECK(jump_anim_retime_scale, 0x494); HERO_OFFSET_CHECK(jump_ramp_frames, 0x498); @@ -211,10 +211,10 @@ HERO_OFFSET_CHECK(unk49C, 0x49C); HERO_OFFSET_CHECK(unk49E, 0x49E); HERO_OFFSET_CHECK(jump_gravity, 0x4A0); HERO_OFFSET_CHECK(jump_blocked_ahead, 0x4A4); -HERO_OFFSET_CHECK(unk4A6, 0x4A6); -HERO_OFFSET_CHECK(unk4A8, 0x4A8); +HERO_OFFSET_CHECK(pack_glide_delay, 0x4A6); +HERO_OFFSET_CHECK(took_off_from_ice, 0x4A8); HERO_OFFSET_CHECK(fall_delay_frames, 0x4AA); -HERO_OFFSET_CHECK(unk4AC, 0x4AC); +HERO_OFFSET_CHECK(can_use_item_in_jump, 0x4AC); HERO_OFFSET_CHECK(can_chain_high_jump, 0x4AE); HERO_OFFSET_CHECK(can_double_jump, 0x4AF); HERO_OFFSET_CHECK(rise_fall_gravity, 0x4B0); @@ -226,7 +226,7 @@ HERO_OFFSET_CHECK(ledge_hang_pos, 0x4D0); HERO_OFFSET_CHECK(ledge_normal_yaw, 0x4E4); HERO_OFFSET_CHECK(ledge_found, 0x4E8); HERO_OFFSET_CHECK(unk4EC, 0x4EC); -HERO_OFFSET_CHECK(unk4F0, 0x4F0); +HERO_OFFSET_CHECK(smoothed_air_z, 0x4F0); HERO_OFFSET_CHECK(rail_point, 0x500); HERO_OFFSET_CHECK(prev_rail_point, 0x540); HERO_OFFSET_CHECK(jump_target_pos, 0x550); @@ -235,7 +235,7 @@ HERO_OFFSET_CHECK(rail_segment, 0x564); HERO_OFFSET_CHECK(rail_seg_frac, 0x568); HERO_OFFSET_CHECK(grind_rail, 0x56C); HERO_OFFSET_CHECK(rail_off_frames, 0x570); -HERO_OFFSET_CHECK(unk574, 0x574); +HERO_OFFSET_CHECK(grind_speed, 0x574); HERO_OFFSET_CHECK(grind_direction, 0x578); HERO_OFFSET_CHECK(rail_dir_yaw, 0x57C); HERO_OFFSET_CHECK(rail_spline_loops, 0x584); @@ -245,14 +245,14 @@ HERO_OFFSET_CHECK(rail_switching, 0x590); HERO_OFFSET_CHECK(transfer_from_spline, 0x594); HERO_OFFSET_CHECK(prev_rail_segment, 0x598); HERO_OFFSET_CHECK(prev_rail_seg_frac, 0x59C); -HERO_OFFSET_CHECK(unk5A0, 0x5A0); +HERO_OFFSET_CHECK(prev_rail_spline_loops, 0x5A0); HERO_OFFSET_CHECK(rail_transfer_frames, 0x5A4); HERO_OFFSET_CHECK(grind_pose, 0x5A8); -HERO_OFFSET_CHECK(unk5AC, 0x5AC); +HERO_OFFSET_CHECK(grind_speed_boost, 0x5AC); HERO_OFFSET_CHECK(grind_base_speed, 0x5B0); -HERO_OFFSET_CHECK(unk5B4, 0x5B4); -HERO_OFFSET_CHECK(unk5B8, 0x5B8); -HERO_OFFSET_CHECK(unk5BC, 0x5BC); +HERO_OFFSET_CHECK(rail_swing_target, 0x5B4); +HERO_OFFSET_CHECK(rail_jump_armed, 0x5B8); +HERO_OFFSET_CHECK(rail_jump_trigger, 0x5BC); HERO_OFFSET_CHECK(grind_hit, 0x5BE); HERO_OFFSET_CHECK(rail_jump_queued, 0x5C0); HERO_OFFSET_CHECK(rail_gap_jump, 0x5C4); @@ -267,7 +267,7 @@ HERO_OFFSET_CHECK(grab_rail_found, 0x5FC); HERO_OFFSET_CHECK(follow_path_end_frames, 0x600); HERO_OFFSET_CHECK(follow_path_speed, 0x604); HERO_OFFSET_CHECK(rail_candidate_kind, 0x60C); -HERO_OFFSET_CHECK(unk618, 0x618); +HERO_OFFSET_CHECK(follow_path_pull_speed, 0x618); HERO_OFFSET_CHECK(facing_x, 0x670); HERO_OFFSET_CHECK(facing_y, 0x674); HERO_OFFSET_CHECK(basis_pitch, 0x684); @@ -278,8 +278,8 @@ HERO_OFFSET_CHECK(swim_stroke_timer, 0x698); HERO_OFFSET_CHECK(swim_water_level, 0x69C); HERO_OFFSET_CHECK(unk6A0, 0x6A0); HERO_OFFSET_CHECK(sink_effect_moby, 0x6A4); -HERO_OFFSET_CHECK(unk6A8, 0x6A8); -HERO_OFFSET_CHECK(unk6AC, 0x6AC); +HERO_OFFSET_CHECK(bob_phase, 0x6A8); +HERO_OFFSET_CHECK(bob_offset, 0x6AC); HERO_OFFSET_CHECK(smoothed_spin_stick, 0x6C0); HERO_OFFSET_CHECK(ground_distance_history, 0x7D0); HERO_OFFSET_CHECK(board_gravity, 0x860); @@ -304,9 +304,9 @@ HERO_OFFSET_CHECK(race_ammo, 0x8CE); HERO_OFFSET_CHECK(unk8E0, 0x8E0); HERO_OFFSET_CHECK(swim_lean_vel, 0x8E4); HERO_OFFSET_CHECK(swim_roll_velocity, 0x8E8); -HERO_OFFSET_CHECK(unk8EC, 0x8EC); +HERO_OFFSET_CHECK(swim_yaw_rate, 0x8EC); HERO_OFFSET_CHECK(puff_timer, 0x8F0); -HERO_OFFSET_CHECK(unk8F4, 0x8F4); +HERO_OFFSET_CHECK(swim_thrust_timer, 0x8F4); HERO_OFFSET_CHECK(pack_particle_timer, 0x8F8); HERO_OFFSET_CHECK(drown_sink_speed, 0x8FC); HERO_OFFSET_CHECK(cw_turn_frames, 0x900); @@ -331,18 +331,18 @@ HERO_OFFSET_CHECK(grapple_pull_speed, 0x960); HERO_OFFSET_CHECK(grapple_target, 0x964); HERO_OFFSET_CHECK(grapple_target_in_sight, 0x968); HERO_OFFSET_CHECK(target_arrival_frames, 0x96C); -HERO_OFFSET_CHECK(unk970, 0x970); +HERO_OFFSET_CHECK(grapple_target_dist, 0x970); HERO_OFFSET_CHECK(grapple_pull_ending, 0x974); HERO_OFFSET_CHECK(tether_radius, 0x97C); HERO_OFFSET_CHECK(grapple_target_radius, 0x980); -HERO_OFFSET_CHECK(unk984, 0x984); -HERO_OFFSET_CHECK(unk988, 0x988); +HERO_OFFSET_CHECK(swing_max_range, 0x984); +HERO_OFFSET_CHECK(swingshot_missed, 0x988); HERO_OFFSET_CHECK(swing_target, 0x990); HERO_OFFSET_CHECK(swing_target_moby, 0x994); HERO_OFFSET_CHECK(swing_target_dist, 0x998); HERO_OFFSET_CHECK(swing_hooked, 0x99C); HERO_OFFSET_CHECK(swing_target_in_sight, 0x99E); -HERO_OFFSET_CHECK(unk9A0, 0x9A0); +HERO_OFFSET_CHECK(swing_rope_target_length, 0x9A0); HERO_OFFSET_CHECK(swing_rope_length, 0x9A4); HERO_OFFSET_CHECK(swing_length_vel, 0x9A8); HERO_OFFSET_CHECK(swing_yaw, 0x9AC); @@ -352,7 +352,7 @@ HERO_OFFSET_CHECK(swing_yaw_vel, 0x9B8); HERO_OFFSET_CHECK(swing_anim_dir, 0x9BC); HERO_OFFSET_CHECK(swing_entry_push, 0x9BE); HERO_OFFSET_CHECK(swing_rope_spring_k, 0x9C4); -HERO_OFFSET_CHECK(unk9C8, 0x9C8); +HERO_OFFSET_CHECK(swing_rope_damping, 0x9C8); HERO_OFFSET_CHECK(swing_rope_max_speed, 0x9CC); HERO_OFFSET_CHECK(rail_ride_pitch, 0x9D4); HERO_OFFSET_CHECK(roll_spring_velocity, 0x9E4); @@ -367,8 +367,8 @@ HERO_OFFSET_CHECK(pushback_yaw, 0xA68); HERO_OFFSET_CHECK(speed_scale, 0xA6C); HERO_OFFSET_CHECK(slam_descending, 0xA70); HERO_OFFSET_CHECK(unkA7C, 0xA7C); -HERO_OFFSET_CHECK(unkA84, 0xA84); -HERO_OFFSET_CHECK(unkA88, 0xA88); +HERO_OFFSET_CHECK(replacement_moby, 0xA84); +HERO_OFFSET_CHECK(base_moby, 0xA88); HERO_OFFSET_CHECK(vehicle_mode3_moby, 0xA8C); HERO_OFFSET_CHECK(anim_speed, 0xA90); HERO_OFFSET_CHECK(anim_frame_rate, 0xA94); @@ -384,8 +384,8 @@ HERO_OFFSET_CHECK(queued_frame_request, 0xAB8); HERO_OFFSET_CHECK(item_slot_blends, 0xD00); HERO_OFFSET_CHECK(held_item_anim_blend, 0xD08); HERO_OFFSET_CHECK(held_item_anim_blend[1], 0xD0C); -HERO_OFFSET_CHECK(unkD10, 0xD10); -HERO_OFFSET_CHECK(unkD14, 0xD14); +HERO_OFFSET_CHECK(face_anim_layer, 0xD10); +HERO_OFFSET_CHECK(arm_layer_fade, 0xD14); HERO_OFFSET_CHECK(unkD20, 0xD20); HERO_OFFSET_CHECK(manipulators, 0xD30); HERO_OFFSET_CHECK(rand_timer.fired, 0xFF0); @@ -410,15 +410,15 @@ HERO_OFFSET_CHECK(on_slip_ground, 0x12EA); HERO_OFFSET_CHECK(selector_11, 0x12EB); HERO_OFFSET_CHECK(selector_13, 0x12EC); HERO_OFFSET_CHECK(ground_sound_class, 0x12ED); -HERO_OFFSET_CHECK(unk12EE, 0x12EE); +HERO_OFFSET_CHECK(grind_jump_block, 0x12EE); HERO_OFFSET_CHECK(unk1614, 0x1614); HERO_OFFSET_CHECK(unk1620, 0x1620); HERO_OFFSET_CHECK(unk1624, 0x1624); HERO_OFFSET_CHECK(vehicle_hp, 0x1630); -HERO_OFFSET_CHECK(unk1634, 0x1634); +HERO_OFFSET_CHECK(vehicle_anim_handle, 0x1634); HERO_OFFSET_CHECK(vehicle_triangle_cooldown, 0x1636); HERO_OFFSET_CHECK(target_pose, 0x1640); -HERO_OFFSET_CHECK(unk1650, 0x1650); +HERO_OFFSET_CHECK(state_entry_option, 0x1650); HERO_OFFSET_CHECK(sink_jump_count, 0x1660); HERO_OFFSET_CHECK(trail, 0x1670); HERO_OFFSET_CHECK(pos_history, 0x1B00); @@ -445,7 +445,7 @@ HERO_OFFSET_CHECK(visibomb_missile, 0x1FE0); HERO_OFFSET_CHECK(launch_drones, 0x1FF5); HERO_OFFSET_CHECK(ammo_used, 0x1FF6); HERO_OFFSET_CHECK(ammo_capacity, 0x1FF7); -HERO_OFFSET_CHECK(unk2020, 0x2020); +HERO_OFFSET_CHECK(drone_mobys, 0x2020); HERO_OFFSET_CHECK(metal_detector_target, 0x2040); HERO_OFFSET_CHECK(detector_target_dist, 0x2044); HERO_OFFSET_CHECK(nearby_moby_close, 0x2048); @@ -471,9 +471,9 @@ HERO_OFFSET_CHECK(unk20AE, 0x20AE); HERO_OFFSET_CHECK(hand_item_hidden, 0x20AF); HERO_OFFSET_CHECK(hydro_tank_full, 0x20B0); HERO_OFFSET_CHECK(fall_fade_pending, 0x20B1); -HERO_OFFSET_CHECK(unk20B2, 0x20B2); +HERO_OFFSET_CHECK(on_hoverboard, 0x20B2); HERO_OFFSET_CHECK(gravity_mode, 0x20B3); -HERO_OFFSET_CHECK(unk20B4, 0x20B4); +HERO_OFFSET_CHECK(pyrocitor_tap_count, 0x20B4); HERO_OFFSET_CHECK(pending_item, 0x20B8); HERO_OFFSET_CHECK(selected_item, 0x20D4); HERO_OFFSET_CHECK(saved_item, 0x20F0); @@ -484,8 +484,8 @@ HERO_OFFSET_CHECK(voice_slot4, 0x2228); HERO_OFFSET_CHECK(pack_swim_voice, 0x222C); HERO_OFFSET_CHECK(fidget_index, 0x2270); HERO_OFFSET_CHECK(look_target, 0x2274); -HERO_OFFSET_CHECK(unk2278, 0x2278); -HERO_OFFSET_CHECK(unk227C, 0x227C); +HERO_OFFSET_CHECK(anim_link_moby, 0x2278); +HERO_OFFSET_CHECK(anim_link_table, 0x227C); HERO_OFFSET_CHECK(damage_source_moby, 0x2280); HERO_OFFSET_CHECK(camera_mode, 0x2284); HERO_OFFSET_CHECK(reach_distance, 0x2288); @@ -498,16 +498,16 @@ HERO_OFFSET_CHECK(underwater_air, 0x22A0); HERO_OFFSET_CHECK(water_depth, 0x22A4); HERO_OFFSET_CHECK(health.hp, 0x22A8); HERO_OFFSET_CHECK(health.vehicle_mode_hp, 0x22AC); -HERO_OFFSET_CHECK(health.unk22B0, 0x22B0); +HERO_OFFSET_CHECK(health.saved_hp, 0x22B0); HERO_OFFSET_CHECK(health.fall_voice_slot, 0x22B2); -HERO_OFFSET_CHECK(unk22B4, 0x22B4); +HERO_OFFSET_CHECK(wall_jumped, 0x22B4); HERO_OFFSET_CHECK(current_path_dist, 0x22B8); HERO_OFFSET_CHECK(slot3_anim_timer, 0x22C4); HERO_OFFSET_CHECK(weapon_lowered, 0x22C8); HERO_OFFSET_CHECK(hover_latch, 0x22CA); HERO_OFFSET_CHECK(vent_updraft, 0x22CB); -HERO_OFFSET_CHECK(unk22CC, 0x22CC); -HERO_OFFSET_CHECK(unk22CE, 0x22CE); +HERO_OFFSET_CHECK(requested_state, 0x22CC); +HERO_OFFSET_CHECK(face_expression, 0x22CE); HERO_OFFSET_CHECK(item_selector_timer, 0x22D2); HERO_OFFSET_CHECK(quick_swap_tap_timer, 0x22D4); HERO_OFFSET_CHECK(quick_swap_tap_window, 0x22D6); @@ -516,9 +516,9 @@ HERO_OFFSET_CHECK(path_constrain_pending, 0x22DA); HERO_OFFSET_CHECK(unk22DC, 0x22DC); HERO_OFFSET_CHECK(vehicle_toggle_timer, 0x22DE); HERO_OFFSET_CHECK(glow_pulse_level, 0x22E0); -HERO_OFFSET_CHECK(unk22E8, 0x22E8); -HERO_OFFSET_CHECK(unk22EC, 0x22EC); -HERO_OFFSET_CHECK(unk22F0, 0x22F0); +HERO_OFFSET_CHECK(item4_glow_phase, 0x22E8); +HERO_OFFSET_CHECK(item4_alt_glow_phase, 0x22EC); +HERO_OFFSET_CHECK(item5_glow_phase, 0x22F0); HERO_OFFSET_CHECK(color_fade_active, 0x22F4); HERO_OFFSET_CHECK(tint_color, 0x22F8); HERO_OFFSET_CHECK(unk22FC, 0x22FC); @@ -538,7 +538,7 @@ HERO_OFFSET_CHECK(grind_voice, 0x2218); HERO_OFFSET_CHECK(pivot_rot_x, 0x6D0); HERO_OFFSET_CHECK(trick_rot_y, 0x6D4); HERO_OFFSET_CHECK(tricks_landed, 0x6E0); -HERO_OFFSET_CHECK(unk6F8, 0x6F8); +HERO_OFFSET_CHECK(tricks_landed_count, 0x6F8); HERO_OFFSET_CHECK(smoothed_steer_stick, 0x720); HERO_OFFSET_CHECK(unk740, 0x740); HERO_OFFSET_CHECK(landing_displacement, 0x750); @@ -560,13 +560,13 @@ HERO_OFFSET_CHECK(steep_jump, 0x88C); HERO_OFFSET_CHECK(trick_input, 0x88D); HERO_OFFSET_CHECK(vert_ramp_launch, 0x88E); HERO_OFFSET_CHECK(air_pose_index, 0x88F); -HERO_OFFSET_CHECK(unk8A4, 0x8A4); +HERO_OFFSET_CHECK(wall_face_yaw, 0x8A4); HERO_OFFSET_CHECK(boost_min_frames, 0x8CC); HERO_OFFSET_CHECK(unk8D0, 0x8D0); HERO_OFFSET_CHECK(voice_slot6, 0x2230); HERO_OFFSET_CHECK(board_boost_voice, 0x2234); -HERO_OFFSET_CHECK(unk6B0, 0x6B0); -HERO_OFFSET_CHECK(unk6B4, 0x6B4); +HERO_OFFSET_CHECK(sway_phase, 0x6B0); +HERO_OFFSET_CHECK(sway_axis_phase, 0x6B4); HERO_OFFSET_CHECK(trick_hud_handle, 0x880); HERO_OFFSET_CHECK(unk890, 0x890); HERO_OFFSET_CHECK(unk17B0, 0x17B0); diff --git a/src/overlays/l01/hero/hero_set_state.c b/src/overlays/l01/hero/hero_set_state.c index cadd78c561..6d7d832348 100644 --- a/src/overlays/l01/hero/hero_set_state.c +++ b/src/overlays/l01/hero/hero_set_state.c @@ -116,7 +116,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); @@ -236,7 +236,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } else { - p->unk8F4 = scale_game_frames(0x2D); + p->swim_thrust_timer = scale_game_frames(0x2D); } { struct Hero *q = &hero; @@ -255,7 +255,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { p->state.control_mode = HERO_MODE_SWIM; p->camera_mode = 0xB; p->item_select_blocked = 1; - p->unk8F4 = scale_game_frames(0x3C); + p->swim_thrust_timer = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; @@ -473,7 +473,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -482,7 +482,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -491,7 +491,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -537,7 +537,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -681,10 +681,10 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (animation_setup_mode) { @@ -851,53 +851,53 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; - u->unk48C = 1.98f; + u->jump_height_target = 1.98f; u->jump_height = 1.95f; } else { gravity_set_z( @@ -918,46 +918,46 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(((int)u->moby), x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -972,11 +972,11 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -987,28 +987,28 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -1028,17 +1028,17 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != FALSE) { @@ -1060,33 +1060,33 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -1096,7 +1096,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { { struct Hero *w = &hero; w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1140,9 +1140,9 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1431,7 +1431,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { hero_base->ground_speed = planar_speed; if (frame_time * 1.5f < planar_speed) hero_base->ground_speed = frame_time * 1.5f; - hero_base->unk3B8 = 0; + hero_base->move_along_stick = 0; if (animation_setup_mode) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -1472,7 +1472,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; @@ -1684,8 +1684,10 @@ int handle_hero_gadget_button(void) { } else if ((hero.state.current == 7 || hero.state.current == 9 || hero.state.current == 8 || hero.state.current == 6 || (hero.state.current == 0xe && hero.anim_frame > 32.0f) || - (hero.state.current == 0xb && (hero.unk450 != 3 && hero.anim_frame > 18.0f) || - (hero.state.current == 0xb && hero.unk450 == 3 && hero.anim_frame > 20.0f)) || + (hero.state.current == 0xb && + (hero.jump_stick_direction != 3 && hero.anim_frame > 18.0f) || + (hero.state.current == 0xb && hero.jump_stick_direction == 3 && + hero.anim_frame > 20.0f)) || hero.state.current == 0x2d || hero.state.current == 0x11) && scale_game_frames(10) < hero.state_timer) { window = scale_game_frames(10); @@ -1774,7 +1776,7 @@ int handle_hero_gadget_button(void) { hero.state.control_mode == HERO_MODE_CROUCH || hero.state.control_mode == HERO_MODE_LAND || hero.state.control_mode == HERO_MODE_GRIND || - (hero.state.control_mode == HERO_MODE_JUMP && hero.unk4AC != 0) || + (hero.state.control_mode == HERO_MODE_JUMP && hero.can_use_item_in_jump != 0) || (hero.state.current == 0x23 && hero.anim_frame > 25.0f)) { if (hero.item_anim_active == 0) { int hold; diff --git a/src/overlays/l01/hero/update_hero_motion_for_current_state.c b/src/overlays/l01/hero/update_hero_motion_for_current_state.c index 908dceee90..44d0a62273 100644 --- a/src/overlays/l01/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l01/hero/update_hero_motion_for_current_state.c @@ -250,7 +250,7 @@ void update_hero_airborne_planar_motion(void) { } else if (state == HERO_STATE_HIGH_JUMP || state == HERO_STATE_STORED_HEADING_JUMP) { hero.motion.move_yaw = hero.takeoff_yaw; turn_to(0, frame_scale_sq * 0.04f, frame_scale_sq * 0.2f, frame_time * 6.981317f); - if (hero.unk450 != 3) { + if (hero.jump_stick_direction != 3) { hero.ground_speed = hero.air_target_speed; } else { hero.ground_speed = 0.0f; @@ -821,8 +821,8 @@ void update_hero_motion_for_current_state(void) { roll = fast_subtract_rotations(hero.motion.rot.f[1], old); stick_target(1.0f, 0); turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - hero.unk8EC = hero.motion.yaw_rate; - fast_dec_timer(&hero.unk8F4); + hero.swim_yaw_rate = hero.motion.yaw_rate; + fast_dec_timer(&hero.swim_thrust_timer); if (hero.state.step == 1) { hero.target_speed = frame_time * 6.0f; } else if (hero.state.current == 0x35) { @@ -956,7 +956,7 @@ void update_hero_motion_for_current_state(void) { qcopy(hero.motion.velocity.f, hero.motion.momentum.f); } clip_hero_horizontal_velocity(0); - lean = hero.unk8EC * fast_cos(swim_velocity_pitch) * -7.0f; + lean = hero.swim_yaw_rate * fast_cos(swim_velocity_pitch) * -7.0f; spring_angle(&hero.motion.rot.f[0], lean, &hero.swim_lean_vel, @@ -1610,11 +1610,11 @@ void update_hero_motion_for_current_state(void) { emit_hero_randomized_motion_effects(5, 2); } if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0) { if (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0) { @@ -1680,7 +1680,7 @@ void update_hero_motion_for_current_state(void) { down = frame_time_sq * 17.0f; } speed_step(up, down); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -1778,7 +1778,7 @@ void update_hero_motion_for_current_state(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0, 0.0f, frame_time * 4.712389f); fast_vec_sub(hero.motion.velocity.f, hero.ledge_hang_pos.f, hero.motion.pos.f); FUN_L00_0025f730(hero.motion.velocity.f, frame_time * 4.0f); - fast_cos_cf(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + fast_cos_cf(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -1997,7 +1997,7 @@ void update_hero_motion_for_current_state(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -2308,7 +2308,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * t, frame_scale_sq * 0.1f, frame_time * 2.268928f * t); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l01/hero/update_hero_state_machine.c b/src/overlays/l01/hero/update_hero_state_machine.c index 361eb9b50a..ffa1478ba7 100644 --- a/src/overlays/l01/hero/update_hero_state_machine.c +++ b/src/overlays/l01/hero/update_hero_state_machine.c @@ -166,9 +166,10 @@ void update_hero_state_machine(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && D_L01_0015F594 == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0) && + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0) && (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT || hero.vehicle_mode == 3)) { int id; @@ -340,7 +341,7 @@ void update_hero_state_machine(void) { int anim = D_L01_00179F40[id].anim; if (((unsigned char *)hero.moby)[0x53] != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -679,7 +680,7 @@ void update_hero_state_machine(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } l01_hero_set_state(HERO_STATE_IDLE, 1); @@ -688,7 +689,7 @@ void update_hero_state_machine(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (((unsigned char *)hero.moby)[0x53] == 0x36) { @@ -932,7 +933,7 @@ void update_hero_state_machine(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { l01_hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -1739,7 +1740,7 @@ void update_hero_state_machine(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -1755,7 +1756,7 @@ void update_hero_state_machine(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -1783,7 +1784,7 @@ void update_hero_state_machine(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l02/hero/hero_set_state.c b/src/overlays/l02/hero/hero_set_state.c index 405291b747..5379b07a0d 100644 --- a/src/overlays/l02/hero/hero_set_state.c +++ b/src/overlays/l02/hero/hero_set_state.c @@ -117,7 +117,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); @@ -247,7 +247,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -256,7 +256,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -265,7 +265,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -311,7 +311,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -509,7 +509,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -518,14 +518,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], @@ -574,10 +574,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (entry_animation_mode) { @@ -746,36 +746,36 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; @@ -791,57 +791,57 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *w = &hero; w->jump_height = v + 1.7f; w->takeoff_frame = scale_game_frames(5); - w->unk434 = 0.6f; + w->air_capsule_bottom = 0.6f; w->apex_anim_frame = 18.0f; w->target_anim_frame = 30.0f; w->jump_land_anim_frame = 12.0f; - w->unk48C = v + 1.75f; + w->jump_height_target = v + 1.75f; w->jump_height_start = v + 1.7f; w->jump_ramp_frames = scale_game_frames(0x13); } } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = (char *)&u->trail; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(*(int *)&u->moby, x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -856,11 +856,11 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -871,28 +871,28 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = (char *)&u->trail; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -912,17 +912,17 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { @@ -944,33 +944,33 @@ int hero_set_state(int requested_state, int entry_animation_mode) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -980,7 +980,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *w = &hero; w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1024,9 +1024,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1378,7 +1378,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { hero_base->ground_speed = planar_speed; if (frame_time * 1.5f < planar_speed) hero_base->ground_speed = frame_time * 1.5f; - hero_base->unk3B8 = 0; + hero_base->move_along_stick = 0; if (entry_animation_mode) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -1419,7 +1419,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; @@ -1881,9 +1881,10 @@ void update_hero_state_transitions(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && item_selector_hud_inhibit == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0) && + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0) && (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT || hero.vehicle_mode == 3)) { int id; @@ -2054,7 +2055,7 @@ void update_hero_state_transitions(void) { int anim = D_L02_0017A0C0[id].anim; if (((unsigned char *)hero.moby)[0x53] != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -2251,7 +2252,7 @@ void update_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -2260,7 +2261,7 @@ void update_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (((unsigned char *)hero.moby)[0x53] == 0x36) { @@ -2481,7 +2482,7 @@ void update_hero_state_transitions(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -2530,7 +2531,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 1); break; } - hero.unk1F8 = scale_game_frames(0x28); + hero.magnet_walk_timer = scale_game_frames(0x28); if (absolute_float(hero.motion.rot.f[1]) > 0.7853982f || absolute_float(hero.motion.rot.f[0]) > 0.7853982f) { hero.ledge_probe_cooldown = scale_game_frames(0x28); @@ -2658,7 +2659,7 @@ void update_hero_state_transitions(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -2710,7 +2711,7 @@ void update_hero_state_transitions(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -3414,7 +3415,7 @@ void update_hero_state_transitions(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -3430,7 +3431,7 @@ void update_hero_state_transitions(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale_gp * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -3458,7 +3459,7 @@ void update_hero_state_transitions(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float minimum_ground_clearance = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l02/hero/update_hero_state_motion.c b/src/overlays/l02/hero/update_hero_state_motion.c index e6bc77b165..ade43e7b98 100644 --- a/src/overlays/l02/hero/update_hero_state_motion.c +++ b/src/overlays/l02/hero/update_hero_state_motion.c @@ -101,7 +101,7 @@ void process_hero_ground_material_effects(void) { } if (saved_ground_type == 0x9) { struct Hero *q = &hero; - q->unk12EE = 1; + q->grind_jump_block = 1; } if (saved_ground_type == 0xC) { struct Hero *q = &hero; @@ -289,7 +289,7 @@ void update_hero_collision_dimensions(void) { } if (hero.state.control_mode == HERO_MODE_JUMP) { if (hero.state_timer > hero.takeoff_frame && hero.past_jump_apex == 0) - hero.capsule_bottom_target = hero.unk434; + hero.capsule_bottom_target = hero.air_capsule_bottom; } else if (hero.state.current == HERO_STATE_FALL) { hero.capsule_bottom_target = 0.5f; } else if (hero.state.current == HERO_STATE_CROUCH) { @@ -478,7 +478,7 @@ void update_hero_ground_contact(void) { break; } hero.ground_pitch.i = 0; - hero.unk2E8.i = 0; + hero.ground_roll.i = 0; hero.side_probe_roll.i[0] = 0; hero.side_probe_roll.i[1] = 0; hero.side_probe_pitch.i[0] = 0; @@ -498,7 +498,7 @@ void update_hero_ground_contact(void) { hero.ground_pitch.f = ground_geometry_scratch.f[1]; } if (-0.78539819f < ground_geometry_scratch.f[0] && ground_geometry_scratch.f[0] < 0.78539819f) { - hero.unk2E8.f = ground_geometry_scratch.f[0]; + hero.ground_roll.f = ground_geometry_scratch.f[0]; } for (i = 0; i < 2; i++) { probe_angle = 1.5707964f; @@ -526,7 +526,7 @@ void update_hero_ground_contact(void) { } else { hero.side_probe_drop.i[i] = 0; hero.side_probe_pitch.f[i] = hero.ground_pitch.f; - hero.side_probe_roll.f[i] = hero.unk2E8.f; + hero.side_probe_roll.f[i] = hero.ground_roll.f; } } } @@ -594,8 +594,9 @@ s32 resolve_hero_position_collisions(s32 mode) { hero.path_constrain_pending = 0; } if (hero.state.control_mode != HERO_MODE_SWIM) { - if (hero.gravity_mode != HERO_GRAVITY_WORLD_DOWN || hero.unk1F8 != 0) { - if (hero.gravity_mode == HERO_GRAVITY_OPPOSITE_GROUND_NORMAL || hero.unk1F8 != 0) { + if (hero.gravity_mode != HERO_GRAVITY_WORLD_DOWN || hero.magnet_walk_timer != 0) { + if (hero.gravity_mode == HERO_GRAVITY_OPPOSITE_GROUND_NORMAL || + hero.magnet_walk_timer != 0) { add_hero_up_offset(&collision_probe_offset, &collision_probe_offset, 0.6f); } else { add_hero_gravity_offset( @@ -1037,10 +1038,10 @@ void update_hero_state_motion(void) { float root1; qcopy(motion_geometry_scratch[0], &hero.grapple_target->pos); - hero.unk970 = fast_vec_dist(hero.motion.pos.f, motion_geometry_scratch[0]); + hero.grapple_target_dist = fast_vec_dist(hero.motion.pos.f, motion_geometry_scratch[0]); hero.target_arrival_frames = scale_game_frames(0x3C); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); @@ -1054,7 +1055,7 @@ void update_hero_state_motion(void) { &root1, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && root0 > 0.0f) { hero.target_arrival_frames = root0; hero.state.step = 1; @@ -1096,7 +1097,7 @@ void update_hero_state_motion(void) { fast_vec_scale(hero.motion.velocity.f, hero.motion.velocity.f, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(motion_geometry_scratch[0], &hero.grapple_target->pos); - hero.unk970 = fast_vec_dist(hero.motion.pos.f, motion_geometry_scratch[0]); + hero.grapple_target_dist = fast_vec_dist(hero.motion.pos.f, motion_geometry_scratch[0]); fast_vec_add(motion_geometry_scratch[1], hero.motion.pos.f, hero.motion.velocity.f); fast_vec_sub( motion_geometry_scratch[3], motion_geometry_scratch[1], motion_geometry_scratch[0]); @@ -1189,7 +1190,7 @@ void update_hero_state_motion(void) { float k; if (vector_distance_xy(hero.motion.pos.f, &hero.swing_target_moby->pos) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( hero.motion.velocity.f, hero.motion.displacement.f, frame_time_sq * 40.0f); @@ -1253,9 +1254,9 @@ void update_hero_state_motion(void) { d = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - d; if (hero.swing_rope_length < fast_vec_length(motion_geometry_scratch[12])) { @@ -1289,7 +1290,7 @@ void update_hero_state_motion(void) { int up; hero.swing_entry_push = 0; - a = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + a = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -1808,11 +1809,11 @@ void update_hero_state_motion(void) { float down; if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0) { if (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0) { @@ -1878,7 +1879,7 @@ void update_hero_state_motion(void) { down = frame_time_sq * 17.0f; } speed_step(up, down); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -1903,7 +1904,7 @@ void update_hero_state_motion(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0, 0.0f, frame_time * 4.712389f); fast_vec_sub(hero.motion.velocity.f, hero.ledge_hang_pos.f, hero.motion.pos.f); FUN_L00_0025f730(hero.motion.velocity.f, frame_time * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2151,7 +2152,7 @@ void update_hero_state_motion(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -2446,7 +2447,7 @@ void update_hero_state_motion(void) { } turn_to(0, frame_scale_sq * 0.035f * t, frame_scale_sq * 0.1f, frame_time * 2.268928f * t); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l03/hero/hero_set_state.c b/src/overlays/l03/hero/hero_set_state.c index d3e9498e14..b64d8796c4 100644 --- a/src/overlays/l03/hero/hero_set_state.c +++ b/src/overlays/l03/hero/hero_set_state.c @@ -116,7 +116,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); @@ -236,7 +236,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } else { - p->unk8F4 = scale_game_frames(0x2D); + p->swim_thrust_timer = scale_game_frames(0x2D); } { struct Hero *q = &hero; @@ -255,7 +255,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_SWIM; p->camera_mode = 0xB; p->item_select_blocked = 1; - p->unk8F4 = scale_game_frames(0x3C); + p->swim_thrust_timer = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; @@ -478,7 +478,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -487,7 +487,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -496,7 +496,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -542,7 +542,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -738,7 +738,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -747,14 +747,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], @@ -809,7 +809,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->item_select_blocked = 1; p->rand_timer.range = 0x68; p->follow_path_end_frames = 0; - p->unk618.i = 0; + p->follow_path_pull_speed.i = 0; seg = p->follow_path_segment; t = p->rail_candidate_frac; sample_path(((int *)p->follow_path_spline), pos, &seg, &t, p->rail_candidate_kind, 1.0f); @@ -829,10 +829,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (entry_animation_mode) { @@ -999,53 +999,53 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; - u->unk48C = 1.98f; + u->jump_height_target = 1.98f; u->jump_height = 1.95f; } else { gravity_set_z( @@ -1066,46 +1066,46 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(((int)u->moby), x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -1120,11 +1120,11 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -1135,28 +1135,28 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -1176,17 +1176,17 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != FALSE) { @@ -1208,33 +1208,33 @@ int hero_set_state(int requested_state, int entry_animation_mode) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -1244,7 +1244,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *w = &hero; w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1288,9 +1288,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1578,7 +1578,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { hero_base->ground_speed = planar_speed; if (frame_time * 1.5f < planar_speed) hero_base->ground_speed = frame_time * 1.5f; - hero_base->unk3B8 = 0; + hero_base->move_along_stick = 0; if (entry_animation_mode) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -1619,7 +1619,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; diff --git a/src/overlays/l03/hero/update_hero_motion_for_current_state.c b/src/overlays/l03/hero/update_hero_motion_for_current_state.c index 3fd0010395..d1eb34a2ab 100644 --- a/src/overlays/l03/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l03/hero/update_hero_motion_for_current_state.c @@ -666,8 +666,8 @@ void update_hero_motion_for_current_state(void) { diff = fast_subtract_rotations(hero.motion.rot.f[1], old); stick_target(1.0f, 0); turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - hero.unk8EC = hero.motion.yaw_rate; - fast_dec_timer(&hero.unk8F4); + hero.swim_yaw_rate = hero.motion.yaw_rate; + fast_dec_timer(&hero.swim_thrust_timer); if (hero.state.step == 1) { hero.target_speed = frame_time * 6.0f; } else if (hero.state.current == 0x35) { @@ -788,7 +788,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.momentum); } clip_hero_horizontal_velocity(0); - t = hero.unk8EC * fast_cos(yaw) * -7.0f; + t = hero.swim_yaw_rate * fast_cos(yaw) * -7.0f; spring_angle(&hero.motion.rot.f[0], t, &hero.swim_lean_vel, @@ -974,10 +974,11 @@ void update_hero_motion_for_current_state(void) { f32 hit; f32 hit2; qcopy(&spatial_scratch_or_hit_descriptor, &MV(hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &spatial_scratch_or_hit_descriptor); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &spatial_scratch_or_hit_descriptor); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); @@ -992,7 +993,7 @@ void update_hero_motion_for_current_state(void) { &hit2, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && hit > 0.0f) { hero.target_arrival_frames = hit; hero.state.step = 1; @@ -1033,7 +1034,8 @@ void update_hero_motion_for_current_state(void) { fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&spatial_scratch_or_hit_descriptor, &MV(hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &spatial_scratch_or_hit_descriptor); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &spatial_scratch_or_hit_descriptor); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&motion_offset_or_position, &v10, &spatial_scratch_or_hit_descriptor); fast_vec_normalize( @@ -1130,7 +1132,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.displacement, frame_time_sq * 40.0f); @@ -1174,9 +1176,9 @@ void update_hero_motion_for_current_state(void) { old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - old; if (fast_vec_length(&vC0) > hero.swing_rope_length) { @@ -1206,7 +1208,7 @@ void update_hero_motion_for_current_state(void) { f32 t; s32 up; hero.swing_entry_push = 0; - t = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + t = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -1660,11 +1662,11 @@ void update_hero_motion_for_current_state(void) { emit_hero_randomized_motion_effects(5, 2); } if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { @@ -1723,7 +1725,7 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -1885,19 +1887,19 @@ void update_hero_motion_for_current_state(void) { f32 len; fl = -fast_vec_length(&spatial_scratch_or_hit_descriptor_tail); vendor_spring(&fl, - &hero.unk618.f, + &hero.follow_path_pull_speed.f, 0.0f, frame_scale_sq * 0.05f, frame_scale_sq * 0.3f, frame_time * 10.0f); len = fast_vec_length(&spatial_scratch_or_hit_descriptor_tail); - if (len < hero.unk618.f) { - hero.unk618.f = len; + if (len < hero.follow_path_pull_speed.f) { + hero.follow_path_pull_speed.f = len; } - if (hero.unk618.f < len) { + if (hero.follow_path_pull_speed.f < len) { fast_vec_normalize(&spatial_scratch_or_hit_descriptor_tail, &spatial_scratch_or_hit_descriptor_tail, - hero.unk618.f); + hero.follow_path_pull_speed.f); } fast_vec_add( &hero.motion.pos, &hero.motion.pos, &spatial_scratch_or_hit_descriptor_tail); @@ -1911,7 +1913,7 @@ void update_hero_motion_for_current_state(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0, 0.0f, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2151,7 +2153,7 @@ void update_hero_motion_for_current_state(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -2442,7 +2444,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l03/hero/update_hero_state_machine.c b/src/overlays/l03/hero/update_hero_state_machine.c index 5cf6221803..da3cf8b852 100644 --- a/src/overlays/l03/hero/update_hero_state_machine.c +++ b/src/overlays/l03/hero/update_hero_state_machine.c @@ -169,9 +169,10 @@ void update_hero_state_machine(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && D_L03_0015F594 == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0) && + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0) && (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT || hero.vehicle_mode == 3)) { int id; @@ -343,7 +344,7 @@ void update_hero_state_machine(void) { int anim = D_L03_00179BC0[id].anim; if (((unsigned char *)hero.moby)[0x53] != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -682,7 +683,7 @@ void update_hero_state_machine(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -691,7 +692,7 @@ void update_hero_state_machine(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (((unsigned char *)hero.moby)[0x53] == 0x36) { @@ -935,7 +936,7 @@ void update_hero_state_machine(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -1061,7 +1062,7 @@ void update_hero_state_machine(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -1113,7 +1114,7 @@ void update_hero_state_machine(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -1839,7 +1840,7 @@ void update_hero_state_machine(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -1855,7 +1856,7 @@ void update_hero_state_machine(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -1883,7 +1884,7 @@ void update_hero_state_machine(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l03/mobys/help_hints.c b/src/overlays/l03/mobys/help_hints.c index 7fa76cfe43..5bc4cc7c58 100644 --- a/src/overlays/l03/mobys/help_hints.c +++ b/src/overlays/l03/mobys/help_hints.c @@ -188,8 +188,8 @@ void help_hints_update(struct Moby *moby) { usage_stats.stat[15].level_mask = usage_stats.stat[15].level_mask | (1 << current_level_index) | 0x80000000; } - if (hero.unk988 != 0 && usage_stats.stat[15].count == 0) { - hero.unk988 = 0; + if (hero.swingshot_missed != 0 && usage_stats.stat[15].count == 0) { + hero.swingshot_missed = 0; tutorial_hint_state[21]++; } if (usage_stats.stat[15].count == 0 && diff --git a/src/overlays/l05/hero/apply_hero_ground_material_effects.c b/src/overlays/l05/hero/apply_hero_ground_material_effects.c index 9c71f691f9..ef0c0c8330 100644 --- a/src/overlays/l05/hero/apply_hero_ground_material_effects.c +++ b/src/overlays/l05/hero/apply_hero_ground_material_effects.c @@ -88,7 +88,7 @@ void apply_hero_ground_material_effects(void) { if (saved_ground_type == 8) hero.on_slip_ground = 1; if (saved_ground_type == 9) - hero.unk12EE = 1; + hero.grind_jump_block = 1; if (saved_ground_type == 12) hero.on_slip_ground = 1; if (hero.selector_4 && hero.grounded_frames && hero.state.control_mode != 0x10 && @@ -323,7 +323,7 @@ void update_hero_ground_contact(void) { break; } hero.ground_pitch.i = 0; - hero.unk2E8.i = 0; + hero.ground_roll.i = 0; hero.side_probe_roll.i[0] = 0; hero.side_probe_roll.i[1] = 0; hero.side_probe_pitch.i[0] = 0; @@ -343,7 +343,7 @@ void update_hero_ground_contact(void) { hero.ground_pitch.f = ground_vector_scratch.f[1]; } if (-0.78539819f < ground_vector_scratch.f[0] && ground_vector_scratch.f[0] < 0.78539819f) { - hero.unk2E8.f = ground_vector_scratch.f[0]; + hero.ground_roll.f = ground_vector_scratch.f[0]; } for (i = 0; i < 2; i++) { side_probe_angle = 1.5707964f; @@ -369,7 +369,7 @@ void update_hero_ground_contact(void) { } else { hero.side_probe_drop.i[i] = 0; hero.side_probe_pitch.f[i] = hero.ground_pitch.f; - hero.side_probe_roll.f[i] = hero.unk2E8.f; + hero.side_probe_roll.f[i] = hero.ground_roll.f; } } } @@ -416,9 +416,9 @@ s32 resolve_hero_position_collisions(s32 mode) { if (hero.state.control_mode == 0x16) { transform_hero_local_offset_to_world(&collision_query_offset, 0.0f, 0.0f, 0.7f); fast_vec_sub(&collision_query_offset, &collision_query_offset, &hero.motion.pos.q); - } else if (hero.gravity_mode != HERO_GRAVITY_WORLD_DOWN || hero.unk1F8 != 0) { - if (hero.gravity_mode == HERO_GRAVITY_OPPOSITE_GROUND_NORMAL || hero.unk1F8 != 0 || - (unsigned)(hero.state.control_mode - 0x15) < 2) { + } else if (hero.gravity_mode != HERO_GRAVITY_WORLD_DOWN || hero.magnet_walk_timer != 0) { + if (hero.gravity_mode == HERO_GRAVITY_OPPOSITE_GROUND_NORMAL || + hero.magnet_walk_timer != 0 || (unsigned)(hero.state.control_mode - 0x15) < 2) { add_hero_up_offset(&collision_query_offset, &collision_query_offset, 0.6f); } else { add_hero_gravity_offset( diff --git a/src/overlays/l05/hero/hero_set_state.c b/src/overlays/l05/hero/hero_set_state.c index 7046e05b9b..468124dd5d 100644 --- a/src/overlays/l05/hero/hero_set_state.c +++ b/src/overlays/l05/hero/hero_set_state.c @@ -129,7 +129,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); @@ -249,7 +249,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } else { - p->unk8F4 = scale_game_frames(0x2D); + p->swim_thrust_timer = scale_game_frames(0x2D); } { struct Hero *q = &hero; @@ -268,7 +268,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->state.control_mode = HERO_MODE_SWIM; p->camera_mode = 0xB; p->item_select_blocked = 1; - p->unk8F4 = scale_game_frames(0x3C); + p->swim_thrust_timer = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; @@ -476,7 +476,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->state.control_mode = 0x16; p->camera_mode = 8; p->item_select_blocked = 1; - p->unk20B2 = 1; + p->on_hoverboard = 1; p->board_jump_frames = 0; p->hoverboard_airborne = 0; if (p->state.prev == 0x6D || p->state.prev == 0x6F || p->state.prev == 0x6E) { @@ -673,7 +673,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -682,7 +682,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -691,7 +691,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -737,7 +737,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -933,7 +933,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -942,14 +942,14 @@ int hero_set_state(int requested_state, int animation_request_mode) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], @@ -998,10 +998,10 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (animation_request_mode) { @@ -1170,53 +1170,53 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; - u->unk48C = 1.98f; + u->jump_height_target = 1.98f; u->jump_height = 1.95f; } else { gravity_set_z( @@ -1237,11 +1237,11 @@ int hero_set_state(int requested_state, int animation_request_mode) { } else if (u->state.current == 0x3C) { u->jump_height = 5.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 26.0f; u->jump_land_anim_frame = 13.0f; - u->unk48C = 5.55f; + u->jump_height_target = 5.55f; u->jump_height_start = 5.5f; u->jump_ramp_frames = scale_game_frames(2); u->jump_max_frames = scale_game_frames(0x78); @@ -1281,57 +1281,57 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *w = &hero; w->jump_height = v + 1.7f; w->takeoff_frame = scale_game_frames(5); - w->unk434 = 0.6f; + w->air_capsule_bottom = 0.6f; w->apex_anim_frame = 18.0f; w->target_anim_frame = 30.0f; w->jump_land_anim_frame = 12.0f; - w->unk48C = v + 1.75f; + w->jump_height_target = v + 1.75f; w->jump_height_start = v + 1.7f; w->jump_ramp_frames = scale_game_frames(0x13); } } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(((int)u->moby), x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -1346,11 +1346,11 @@ int hero_set_state(int requested_state, int animation_request_mode) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -1361,28 +1361,28 @@ int hero_set_state(int requested_state, int animation_request_mode) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -1402,17 +1402,17 @@ int hero_set_state(int requested_state, int animation_request_mode) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { @@ -1434,33 +1434,33 @@ int hero_set_state(int requested_state, int animation_request_mode) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -1470,7 +1470,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { { struct Hero *w = &hero; w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1518,9 +1518,9 @@ int hero_set_state(int requested_state, int animation_request_mode) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1871,7 +1871,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { hero_base->ground_speed = planar_speed; if (frame_time * 1.5f < planar_speed) hero_base->ground_speed = frame_time * 1.5f; - hero_base->unk3B8 = 0; + hero_base->move_along_stick = 0; if (animation_request_mode) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -1912,7 +1912,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; diff --git a/src/overlays/l05/hero/update_hero_motion_by_state.c b/src/overlays/l05/hero/update_hero_motion_by_state.c index 15c2c1db0a..71dc540297 100644 --- a/src/overlays/l05/hero/update_hero_motion_by_state.c +++ b/src/overlays/l05/hero/update_hero_motion_by_state.c @@ -625,8 +625,8 @@ void update_hero_motion_by_state(void) { swim_pitch_delta = fast_subtract_rotations(hero.motion.rot.f[1], old); stick_target(1.0f, 0); turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - hero.unk8EC = hero.motion.yaw_rate; - fast_dec_timer(&hero.unk8F4); + hero.swim_yaw_rate = hero.motion.yaw_rate; + fast_dec_timer(&hero.swim_thrust_timer); if (hero.state.step == 1) { hero.target_speed = frame_time * 6.0f; } else if (hero.state.current == 0x35) { @@ -747,7 +747,7 @@ void update_hero_motion_by_state(void) { qcopy(&hero.motion.velocity, &hero.motion.momentum); } clip_hero_horizontal_velocity(0); - t = hero.unk8EC * fast_cos(yaw) * -7.0f; + t = hero.swim_yaw_rate * fast_cos(yaw) * -7.0f; spring_angle(&hero.motion.rot.f[0], t, &hero.swim_lean_vel, @@ -1165,7 +1165,8 @@ void update_hero_motion_by_state(void) { clear_u64_value(&hero.motion.velocity); step_angle_toward_target(&hero.motion.rot.f[1], 0.0f, 0, frame_time * 6.108652f); step_angle_toward_target(&hero.motion.rot.f[0], 0.0f, 0, frame_time * 6.108652f); - step_angle_toward_target(&hero.motion.rot.f[2], hero.unk8A4, 0, frame_time * 8.726646f); + step_angle_toward_target( + &hero.motion.rot.f[2], hero.wall_face_yaw, 0, frame_time * 8.726646f); break; case 0x38: case 0x39: @@ -1247,10 +1248,10 @@ void update_hero_motion_by_state(void) { f32 hit; f32 hit2; qcopy(&vector_and_hit_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &vector_and_hit_scratch); + hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_and_hit_scratch); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); @@ -1265,7 +1266,7 @@ void update_hero_motion_by_state(void) { &hit2, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && hit > 0.0f) { hero.target_arrival_frames = hit; hero.state.step = 1; @@ -1305,7 +1306,7 @@ void update_hero_motion_by_state(void) { fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&vector_and_hit_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &vector_and_hit_scratch); + hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_and_hit_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&vector_and_rotation_scratch, &v10, &vector_and_hit_scratch); fast_vec_normalize( @@ -1400,7 +1401,7 @@ void update_hero_motion_by_state(void) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.displacement, frame_time_sq * 40.0f); @@ -1449,9 +1450,9 @@ void update_hero_motion_by_state(void) { old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - old; if (fast_vec_length(&vC0) > hero.swing_rope_length) { @@ -1483,7 +1484,7 @@ void update_hero_motion_by_state(void) { f32 t; s32 up; hero.swing_entry_push = 0; - t = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + t = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -1943,11 +1944,11 @@ void update_hero_motion_by_state(void) { emit_hero_randomized_motion_effects(5, 2); } if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { @@ -2006,7 +2007,7 @@ void update_hero_motion_by_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -2100,7 +2101,7 @@ void update_hero_motion_by_state(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0.0f, 0, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2224,7 +2225,7 @@ void update_hero_motion_by_state(void) { &hero.prev_rail_point, &hero.prev_rail_segment, &hero.prev_rail_seg_frac, - hero.unk5A0, + hero.prev_rail_spline_loops, 999.0f, 2.0f, 2.5f); @@ -2244,7 +2245,7 @@ void update_hero_motion_by_state(void) { hero.rail_off_frames++; break; } - r = hero.unk574 * (f32)hero.grind_direction; + r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { r = hero.unk5CC * (f32)hero.grind_direction; } @@ -2260,7 +2261,7 @@ void update_hero_motion_by_state(void) { &hero.prev_rail_segment, &hero.prev_rail_seg_frac, r, - hero.unk5A0); + hero.prev_rail_spline_loops); } if (scale_game_frames(90) < hero.control_mode_timer) { s32 h; @@ -2504,20 +2505,20 @@ void update_hero_motion_by_state(void) { hero.grind_pose = -1; } } - if (hero.unk5AC.f < sp) { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 8.0f); + if (hero.grind_speed_boost.f < sp) { + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 8.0f); } else { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 2.0f); + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 2.0f); } - if (hero.unk5AC.f > frame_time * 12.0f) { - hero.unk5AC.f = frame_time * 12.0f; + if (hero.grind_speed_boost.f > frame_time * 12.0f) { + hero.grind_speed_boost.f = frame_time * 12.0f; } - if (hero.unk5AC.f < frame_time * -2.5f) { - hero.unk5AC.f = frame_time * -2.5f; + if (hero.grind_speed_boost.f < frame_time * -2.5f) { + hero.grind_speed_boost.f = frame_time * -2.5f; } - hero.unk574 = hero.grind_base_speed + hero.unk5AC.f; - if (hero.unk574 < 0.0f) { - hero.unk574 = 0.0f; + hero.grind_speed = hero.grind_base_speed + hero.grind_speed_boost.f; + if (hero.grind_speed < 0.0f) { + hero.grind_speed = 0.0f; } fast_vec_sub(&hero.motion.velocity, &vector_and_hit_scratch, &hero.rail_point); fast_vec_sub(&vector_matrix_and_hit_scratch, &hero.rail_point, &hero.motion.pos); @@ -2749,7 +2750,7 @@ void update_hero_motion_by_state(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -3060,7 +3061,7 @@ void update_hero_motion_by_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l05/hero/update_hero_state_machine.c b/src/overlays/l05/hero/update_hero_state_machine.c index 2d2e24e40e..90651efb0b 100644 --- a/src/overlays/l05/hero/update_hero_state_machine.c +++ b/src/overlays/l05/hero/update_hero_state_machine.c @@ -174,9 +174,10 @@ void update_hero_state_machine(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && item_selector_hud_open_blocker == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0) && + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0) && (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT || hero.vehicle_mode == 3)) { int id; @@ -350,7 +351,7 @@ void update_hero_state_machine(void) { int anim = D_L05_00179F20[id].anim; if (((unsigned char *)hero.moby)[0x53] != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -700,7 +701,7 @@ void update_hero_state_machine(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -709,7 +710,7 @@ void update_hero_state_machine(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (((unsigned char *)hero.moby)[0x53] == 0x36) { @@ -953,7 +954,7 @@ void update_hero_state_machine(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -1110,7 +1111,7 @@ void update_hero_state_machine(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -1162,7 +1163,7 @@ void update_hero_state_machine(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -1869,7 +1870,7 @@ void update_hero_state_machine(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -1885,7 +1886,7 @@ void update_hero_state_machine(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -1913,7 +1914,7 @@ void update_hero_state_machine(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l06/hero/hero_set_state.c b/src/overlays/l06/hero/hero_set_state.c index f960b544a4..f2aecac6df 100644 --- a/src/overlays/l06/hero/hero_set_state.c +++ b/src/overlays/l06/hero/hero_set_state.c @@ -121,7 +121,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); @@ -249,7 +249,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -258,7 +258,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -267,7 +267,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -309,7 +309,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *t = &hero; int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -492,7 +492,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -501,14 +501,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], @@ -566,16 +566,16 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->rail_off_frames = 0; p->grind_anim_variant = 0; if (p->state.prev_control_mode != HERO_MODE_GRIND) { - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; p->grind_pose = -1; p->grind_base_speed = 0.0f; } t = p->rail_seg_frac; i = p->rail_segment; f = t; - p->unk5B4 = 0; - p->unk5B8 = 0; - p->unk5BC = 0; + p->rail_swing_target = 0; + p->rail_jump_armed = 0; + p->rail_jump_trigger = 0; p->rail_jump_queued = 0; sample_path(p->rail_spline, (char *)&sampled_rail_position, @@ -614,10 +614,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (entry_animation_mode) { @@ -788,47 +788,47 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x3C) { u->jump_height = 5.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 26.0f; u->jump_land_anim_frame = 13.0f; - u->unk48C = 5.55f; + u->jump_height_target = 5.55f; u->jump_height_start = 5.5f; u->jump_ramp_frames = scale_game_frames(2); u->jump_max_frames = scale_game_frames(0x78); @@ -859,11 +859,11 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0x29) { u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.45f; + u->jump_height_target = 2.45f; u->jump_height_start = 2.4f; u->jump_ramp_frames = scale_game_frames(0x11); u->jump_gravity = frame_time_sq * 27.0f; @@ -873,7 +873,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { float h = 4.7f; u->jump_height += h; u->jump_height_start += h; - u->unk48C += h; + u->jump_height_target += h; u->jump_gravity = frame_time_sq * 14.0f; { d.q = 0; @@ -884,18 +884,18 @@ int hero_set_state(int requested_state, int entry_animation_mode) { h = 0.7f; u->jump_height += h; u->jump_height_start += h; - u->unk48C += h; + u->jump_height_target += h; } } } } else if (u->state.current == 0x2A) { u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.55f; + u->jump_height_target = 2.55f; u->jump_height_start = 2.5f; u->jump_ramp_frames = scale_game_frames(0xA); u->jump_gravity = frame_time_sq * 24.0f; @@ -904,25 +904,25 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0x49) { u->jump_height = 1.3f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 27.0f; u->jump_land_anim_frame = 27.0f; - u->unk48C = 1.35f; + u->jump_height_target = 1.35f; u->jump_height_start = 1.3f; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_gravity = frame_time_sq * 25.0f; @@ -931,32 +931,32 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = (char *)&u->trail; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(*(int *)&u->moby, x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -971,11 +971,11 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -986,11 +986,11 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0x4C) { u->jump_height = 1.55f; u->takeoff_frame = scale_game_frames(0xD); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 10.0f; u->target_anim_frame = 18.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 1.59f; + u->jump_height_target = 1.59f; u->jump_height_start = 1.55f; u->jump_ramp_frames = scale_game_frames(1); u->jump_gravity = frame_time_sq * 28.0f; @@ -998,28 +998,28 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = (char *)&u->trail; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -1039,17 +1039,17 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { @@ -1071,33 +1071,33 @@ int hero_set_state(int requested_state, int entry_animation_mode) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -1107,7 +1107,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *w = &hero; w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1166,9 +1166,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1487,7 +1487,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->health.hp = 0; p->collision_off_frames = 0x2710; p->sink_surface_z = p->ground_z.f; - m = ((char *)p->unkA88); + m = ((char *)p->base_moby); qcopy(m + 0x10, &p->motion.pos); allocate_voice_for_target_entry(9, 0, (int)m); if (entry_animation_mode) @@ -1569,7 +1569,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { q->ground_speed = 0.0f; if (q->state.prev_control_mode == HERO_MODE_IDLE) q->ground_speed = vector_length_xy(&q->motion.momentum); - q->unk3B8 = 0; + q->move_along_stick = 0; if (entry_animation_mode) set_hero_animation(2, 0, (float)scale_game_frames(8)); } @@ -1590,10 +1590,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 12.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } if (entry_animation_mode) set_hero_animation(8, 0x12, (float)(scale_game_frames(7) + 2)); @@ -1673,7 +1673,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { hero_base->ground_speed = planar_speed; if (frame_time * 1.5f < planar_speed) hero_base->ground_speed = frame_time * 1.5f; - hero_base->unk3B8 = 0; + hero_base->move_along_stick = 0; if (entry_animation_mode) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -1714,7 +1714,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; diff --git a/src/overlays/l06/hero/update_hero_motion_for_current_state.c b/src/overlays/l06/hero/update_hero_motion_for_current_state.c index 2271866d6a..980d5747a4 100644 --- a/src/overlays/l06/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l06/hero/update_hero_motion_for_current_state.c @@ -80,7 +80,7 @@ void apply_hero_ground_material_response(void) { } if (previous_ground_type == 9) { struct Hero *gx = &hero; - gx->unk12EE = 1; + gx->grind_jump_block = 1; } if (previous_ground_type == 0xC) { struct Hero *gx = &hero; @@ -274,7 +274,7 @@ void update_hero_smoothed_parameters(void) { } if (hero.state.control_mode == HERO_MODE_JUMP) { if (hero.state_timer > hero.takeoff_frame && hero.past_jump_apex == 0) - hero.capsule_bottom_target = hero.unk434; + hero.capsule_bottom_target = hero.air_capsule_bottom; } else if (hero.state.current == HERO_STATE_FALL) { hero.capsule_bottom_target = 0.5f; } else if (hero.state.current == HERO_STATE_CROUCH) { @@ -553,7 +553,7 @@ void update_hero_ground_contact(void) { break; } hero_lui.ground_pitch.i = 0; - hero_lui.unk2E8.i = 0; + hero_lui.ground_roll.i = 0; hero_lui.side_probe_roll.i[0] = 0; hero_lui.side_probe_roll.i[1] = 0; hero_lui.side_probe_pitch.i[0] = 0; @@ -575,7 +575,7 @@ void update_hero_ground_contact(void) { hero_lui.ground_pitch.f = ground_offset_or_angles.f[1]; } if (-0.78539819f < ground_offset_or_angles.f[0] && ground_offset_or_angles.f[0] < 0.78539819f) { - hero_lui.unk2E8.f = ground_offset_or_angles.f[0]; + hero_lui.ground_roll.f = ground_offset_or_angles.f[0]; } for (i = 0; i < 2; i++) { surface_probe_angle = 1.5707964f; @@ -603,7 +603,7 @@ void update_hero_ground_contact(void) { } else { hero_lui.side_probe_drop.f[i] = 0; hero_lui.side_probe_pitch.f[i] = hero_lui.ground_pitch.f; - hero_lui.side_probe_roll.f[i] = hero_lui.unk2E8.f; + hero_lui.side_probe_roll.f[i] = hero_lui.ground_roll.f; } } } @@ -697,7 +697,7 @@ void update_hero_airborne_planar_velocity(void) { } else if (state == HERO_STATE_HIGH_JUMP || state == HERO_STATE_STORED_HEADING_JUMP) { hero.motion.move_yaw = hero.takeoff_yaw; turn_to(0, ED64 * 0.04f, ED64 * 0.2f, ED6C * 6.981317f); - if (hero.unk450 != 3) { + if (hero.jump_stick_direction != 3) { hero.ground_speed = hero.air_target_speed; } else { hero.ground_speed = 0.0f; @@ -1269,10 +1269,11 @@ void update_hero_motion_for_current_state(void) { f32 hit2; qcopy(&vector_or_hit_descriptor_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &vector_or_hit_descriptor_scratch); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &vector_or_hit_descriptor_scratch); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, D_0015ED6C_c * 27.0f, frame_time_sq * 80.0f); @@ -1287,7 +1288,7 @@ void update_hero_motion_for_current_state(void) { &hit2, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && hit > 0.0f) { hero.target_arrival_frames = hit; hero.state.step = 1; @@ -1329,7 +1330,8 @@ void update_hero_motion_for_current_state(void) { hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&vector_or_hit_descriptor_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &vector_or_hit_descriptor_scratch); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &vector_or_hit_descriptor_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); FUN_001f9a28_c(&position_or_delta_scratch, &v10, &vector_or_hit_descriptor_scratch); fast_vec_normalize( @@ -1426,7 +1428,7 @@ void update_hero_motion_for_current_state(void) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.displacement, frame_time_sq * 40.0f); @@ -1474,9 +1476,9 @@ void update_hero_motion_for_current_state(void) { previous_swing_radius = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - previous_swing_radius; if (fast_vec_length(&vC0) > hero.swing_rope_length) { @@ -1506,7 +1508,7 @@ void update_hero_motion_for_current_state(void) { f32 t; s32 up; hero.swing_entry_push = 0; - t = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + t = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -1954,11 +1956,11 @@ void update_hero_motion_for_current_state(void) { case HERO_STATE_SHALLOW_WATER_RUN: { f32 k; if (hero.motion.flat_speed < D_0015ED6C_c * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { @@ -2017,7 +2019,7 @@ void update_hero_motion_for_current_state(void) { } FUN_L00_00212088(a, b); } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -2104,7 +2106,7 @@ void update_hero_motion_for_current_state(void) { &hero.prev_rail_point, &hero.prev_rail_segment, &hero.prev_rail_seg_frac, - hero.unk5A0, + hero.prev_rail_spline_loops, 999.0f, 2.0f, 2.5f); @@ -2124,7 +2126,7 @@ void update_hero_motion_for_current_state(void) { hero.rail_off_frames++; break; } - r = hero.unk574 * (f32)hero.grind_direction; + r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { r = hero.unk5CC * (f32)hero.grind_direction; } @@ -2140,7 +2142,7 @@ void update_hero_motion_for_current_state(void) { &hero.prev_rail_segment, &hero.prev_rail_seg_frac, r, - hero.unk5A0); + hero.prev_rail_spline_loops); } if (scale_game_frames(90) < hero.control_mode_timer) { s32 h; @@ -2384,20 +2386,20 @@ void update_hero_motion_for_current_state(void) { hero.grind_pose = -1; } } - if (hero.unk5AC.f < sp) { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 8.0f); + if (hero.grind_speed_boost.f < sp) { + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 8.0f); } else { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 2.0f); + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 2.0f); } - if (hero.unk5AC.f > D_0015ED6C_c * 12.0f) { - hero.unk5AC.f = D_0015ED6C_c * 12.0f; + if (hero.grind_speed_boost.f > D_0015ED6C_c * 12.0f) { + hero.grind_speed_boost.f = D_0015ED6C_c * 12.0f; } - if (hero.unk5AC.f < D_0015ED6C_a * -2.5f) { - hero.unk5AC.f = D_0015ED6C_a * -2.5f; + if (hero.grind_speed_boost.f < D_0015ED6C_a * -2.5f) { + hero.grind_speed_boost.f = D_0015ED6C_a * -2.5f; } - hero.unk574 = hero.grind_base_speed + hero.unk5AC.f; - if (hero.unk574 < 0.0f) { - hero.unk574 = 0.0f; + hero.grind_speed = hero.grind_base_speed + hero.grind_speed_boost.f; + if (hero.grind_speed < 0.0f) { + hero.grind_speed = 0.0f; } FUN_001f9a28_c( &hero.motion.velocity, &vector_or_hit_descriptor_scratch, &hero.rail_point); @@ -2456,7 +2458,7 @@ void update_hero_motion_for_current_state(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0, 0.0f, D_0015ED6C_c * 4.712389f); FUN_001f9a28_c(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, D_0015ED6C_c * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], D_0015ED6C_c * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], D_0015ED6C_c * 3.0f); break; case HERO_STATE_ALT_LEDGE_HANG_ENTRY: case HERO_STATE_ALT_LEDGE_HANG: @@ -2464,7 +2466,7 @@ void update_hero_motion_for_current_state(void) { turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.2f, D_0015ED6C_c * 4.712389f); FUN_001f9a28_c(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, D_0015ED6C_c * 1.7f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], D_0015ED6C_c * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], D_0015ED6C_c * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2706,7 +2708,7 @@ void update_hero_motion_for_current_state(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -3072,7 +3074,7 @@ void update_hero_motion_for_current_state(void) { D_0015ED6C_c * 9.948377f * g); } FUN_L00_00212088(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -3220,7 +3222,7 @@ void update_hero_motion_for_current_state(void) { turn_to( 0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, D_0015ED6C_c * 2.268928f * g); FUN_L00_00212088(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l06/hero/update_hero_state_machine.c b/src/overlays/l06/hero/update_hero_state_machine.c index b05d6a25f9..6a0974846d 100644 --- a/src/overlays/l06/hero/update_hero_state_machine.c +++ b/src/overlays/l06/hero/update_hero_state_machine.c @@ -180,9 +180,10 @@ void update_hero_state_machine(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && D_L06_0015F594 == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0)) { + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0)) { switch (hero.vehicle_mode) { case HERO_VEHICLE_MODE_ON_FOOT: case 3: { @@ -367,7 +368,7 @@ void update_hero_state_machine(void) { int anim = D_L06_0017A240[id].anim; if (((unsigned char *)hero.moby)[0x53] != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -568,7 +569,7 @@ void update_hero_state_machine(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -577,7 +578,7 @@ void update_hero_state_machine(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (((unsigned char *)hero.moby)[0x53] == 0x36) { @@ -798,7 +799,7 @@ void update_hero_state_machine(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -918,7 +919,7 @@ void update_hero_state_machine(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -969,7 +970,7 @@ void update_hero_state_machine(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -1064,9 +1065,9 @@ void update_hero_state_machine(void) { 3.1415927f); ang = fast_add_rotations(ang, randf_sym(0.5235988f, 0.61086524f)); hero.motion.resolved_velocity.f[0] = - fast_cos(ang) * hero.unk574 * 0.7f; + fast_cos(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[1] = - fast_sin(ang) * hero.unk574 * 0.7f; + fast_sin(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[2] = frame_time * 4.5f; } if (scale_game_frames(0xF) < hero.rail_off_frames && @@ -1074,7 +1075,7 @@ void update_hero_state_machine(void) { hero.health.hp = 2; } hero_set_state(HERO_STATE_HURT, 1); - hero.unk1C8 = scale_game_frames(0x46); + hero.grind_catch_lockout = scale_game_frames(0x46); break; } } @@ -1093,7 +1094,7 @@ void update_hero_state_machine(void) { } if (can) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { - if (hero.unk5B8 != 0) { + if (hero.rail_jump_armed != 0) { hero.rail_jump_queued = 1; break; } @@ -1106,7 +1107,7 @@ void update_hero_state_machine(void) { hero.move_lock_timer = scale_game_frames(0x46); } hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { @@ -1124,7 +1125,7 @@ void update_hero_state_machine(void) { set_hero_animation(a, 0, scale_game_frames(0xC)); } } - if (hero.unk5BC != 0) { + if (hero.rail_jump_trigger != 0) { if (hero.rail_jump_queued != 0) { float jump_velocity_z; float t; @@ -1141,14 +1142,14 @@ void update_hero_state_machine(void) { scratch_motion_vector[2] = jump_velocity_z; t = calculate_triangular_corrected_scalar( scratch_position, scratch_motion_vector, 0, hero.jump_gravity); - hero.unk48C = t + 0.05f; + hero.jump_height_target = t + 0.05f; hero.jump_height = t; hero.jump_gravity = hero.rail_jump_gravity; hero.jump_height_start = t; } } - hero.unk5B8 = 0; - hero.unk5BC = 0; + hero.rail_jump_armed = 0; + hero.rail_jump_trigger = 0; } else if (hero.state.current == 0x2B) { if (pad_pressed_within(0x40, scale_game_frames(5), 0) && hero.anim_frame >= (float)D_L06_0017C3A8[hero.attack_record].f14) { @@ -1174,7 +1175,7 @@ void update_hero_state_machine(void) { } if (scale_game_frames(5) < hero.rail_off_frames) { hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); } } else if (hero.state.current == 0x29 || hero.state.current == 0x2A) { if ((scale_game_frames(5) < hero.rail_off_frames || @@ -1186,7 +1187,7 @@ void update_hero_state_machine(void) { } if (hero.state.current == 0x29 && hero.state_timer < scale_game_frames(0xA) && hero.past_jump_apex == 0 && - hero.unk12EE == 0 && hero.stick_magnitude > 0.5f && + hero.grind_jump_block == 0 && hero.stick_magnitude > 0.5f && hero.rail_switching == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( @@ -1240,7 +1241,7 @@ void update_hero_state_machine(void) { hero.transfer_from_spline = hero.rail_spline; hero.prev_rail_segment = hero.rail_segment; hero.prev_rail_seg_frac = hero.rail_seg_frac; - hero.unk5A0 = hero.rail_spline_loops; + hero.prev_rail_spline_loops = hero.rail_spline_loops; qcopy(hero.prev_rail_point.f, hero.rail_point.f); hero.rail_spline = new_path; hero.rail_spline_loops = new_loop; @@ -1321,7 +1322,7 @@ void update_hero_state_machine(void) { if (-0.5f > hero.motion.pos.f[2] - hero.rail_point.f[2]) { hero_set_state(HERO_STATE_FALL, 1); hero.move_lock_timer = scale_game_frames(0x46); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } } @@ -2031,7 +2032,7 @@ void update_hero_state_machine(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -2047,7 +2048,7 @@ void update_hero_state_machine(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -2075,7 +2076,7 @@ void update_hero_state_machine(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l08/hero/hero_set_state.c b/src/overlays/l08/hero/hero_set_state.c index 640d129106..2278769797 100644 --- a/src/overlays/l08/hero/hero_set_state.c +++ b/src/overlays/l08/hero/hero_set_state.c @@ -117,7 +117,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); @@ -237,7 +237,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } else { - p->unk8F4 = scale_game_frames(0x2D); + p->swim_thrust_timer = scale_game_frames(0x2D); } { struct Hero *q = &hero; @@ -256,7 +256,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->state.control_mode = HERO_MODE_SWIM; p->camera_mode = 0xB; p->item_select_blocked = 1; - p->unk8F4 = scale_game_frames(0x3C); + p->swim_thrust_timer = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; @@ -478,7 +478,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -487,7 +487,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -496,7 +496,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -545,7 +545,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -754,7 +754,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -763,14 +763,14 @@ int hero_set_state(int requested_state, int animation_request_mode) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], @@ -828,12 +828,12 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->grind_anim_variant = 0; if (p->state.prev_control_mode != HERO_MODE_GRIND) { p->grind_pose = -1; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; p->grind_base_speed = 0.0f; } - p->unk5B4 = 0; - p->unk5B8 = 0; - p->unk5BC = 0; + p->rail_swing_target = 0; + p->rail_jump_armed = 0; + p->rail_jump_trigger = 0; p->rail_jump_queued = 0; seg = p->rail_segment; t = p->rail_seg_frac; @@ -871,10 +871,10 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (animation_request_mode) { @@ -1041,53 +1041,53 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; - u->unk48C = 1.98f; + u->jump_height_target = 1.98f; u->jump_height = 1.95f; } else { gravity_set_z( @@ -1108,11 +1108,11 @@ int hero_set_state(int requested_state, int animation_request_mode) { } else if (u->state.current == 0x29) { u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.45f; + u->jump_height_target = 2.45f; u->jump_height_start = 2.4f; u->jump_ramp_frames = scale_game_frames(0x11); u->state.control_mode = HERO_MODE_GRIND; @@ -1123,7 +1123,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { *(u128 *)grind_vector_scratch = 0; u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; - u->unk48C = u->unk48C + k; + u->jump_height_target = u->jump_height_target + k; u->jump_gravity = frame_time_sq * 14.0f; grind_vector_scratch[0] = 331.0f; grind_vector_scratch[1] = 104.0f; @@ -1132,17 +1132,17 @@ int hero_set_state(int requested_state, int animation_request_mode) { k = 0.7f; u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; - u->unk48C = u->unk48C + k; + u->jump_height_target = u->jump_height_target + k; } } } else if (u->state.current == 0x2A) { u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.55f; + u->jump_height_target = 2.55f; u->jump_height_start = 2.5f; u->jump_ramp_frames = scale_game_frames(0xA); u->state.control_mode = HERO_MODE_GRIND; @@ -1151,46 +1151,46 @@ int hero_set_state(int requested_state, int animation_request_mode) { } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(((int)u->moby), x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -1205,11 +1205,11 @@ int hero_set_state(int requested_state, int animation_request_mode) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -1220,28 +1220,28 @@ int hero_set_state(int requested_state, int animation_request_mode) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -1261,17 +1261,17 @@ int hero_set_state(int requested_state, int animation_request_mode) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != FALSE) { @@ -1293,33 +1293,33 @@ int hero_set_state(int requested_state, int animation_request_mode) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -1329,7 +1329,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { { struct Hero *w = &hero; w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1384,9 +1384,9 @@ int hero_set_state(int requested_state, int animation_request_mode) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1721,7 +1721,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { hero_base->ground_speed = planar_speed; if (frame_time * 1.5f < planar_speed) hero_base->ground_speed = frame_time * 1.5f; - hero_base->unk3B8 = 0; + hero_base->move_along_stick = 0; if (animation_request_mode) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -1762,7 +1762,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; diff --git a/src/overlays/l08/hero/update_hero_motion_for_current_state.c b/src/overlays/l08/hero/update_hero_motion_for_current_state.c index 479e9c17cd..875e038406 100644 --- a/src/overlays/l08/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l08/hero/update_hero_motion_for_current_state.c @@ -112,7 +112,7 @@ void apply_hero_ground_type_effects(void) { } if (saved_ground_type == 9) { struct Hero *q = &hero; - *(char *)&q->unk12EE = 1; + *(char *)&q->grind_jump_block = 1; } if (saved_ground_type == 0xC) { struct Hero *q = &hero; @@ -734,8 +734,8 @@ void update_hero_motion_for_current_state(void) { diff = fast_subtract_rotations(hero.motion.rot.f[1], old); stick_target(1.0f, 0); turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - hero.unk8EC = hero.motion.yaw_rate; - fast_dec_timer(&hero.unk8F4); + hero.swim_yaw_rate = hero.motion.yaw_rate; + fast_dec_timer(&hero.swim_thrust_timer); if (hero.state.step == 1) { hero.target_speed = frame_time * 6.0f; } else if (hero.state.current == 0x35) { @@ -859,7 +859,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.momentum); } clip_hero_horizontal_velocity(0); - t = hero.unk8EC * fast_cos(yaw) * -7.0f; + t = hero.swim_yaw_rate * fast_cos(yaw) * -7.0f; spring_angle(&hero.motion.rot.f[0], t, &hero.swim_lean_vel, @@ -1045,10 +1045,11 @@ void update_hero_motion_for_current_state(void) { f32 hit; f32 hit2; qcopy(&vector_and_attack_descriptor_scratch, &MV(hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &vector_and_attack_descriptor_scratch); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &vector_and_attack_descriptor_scratch); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); @@ -1063,7 +1064,7 @@ void update_hero_motion_for_current_state(void) { &hit2, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && hit > 0.0f) { hero.target_arrival_frames = hit; hero.state.step = 1; @@ -1103,7 +1104,8 @@ void update_hero_motion_for_current_state(void) { fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&vector_and_attack_descriptor_scratch, &MV(hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &vector_and_attack_descriptor_scratch); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &vector_and_attack_descriptor_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&movement_vector_scratch, &v10, &vector_and_attack_descriptor_scratch); fast_vec_normalize(&movement_vector_scratch, &movement_vector_scratch, hero.tether_radius); @@ -1198,7 +1200,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.displacement, frame_time_sq * 40.0f); @@ -1242,9 +1244,9 @@ void update_hero_motion_for_current_state(void) { old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - old; if (fast_vec_length(&vC0) > hero.swing_rope_length) { @@ -1274,7 +1276,7 @@ void update_hero_motion_for_current_state(void) { f32 t; s32 up; hero.swing_entry_push = 0; - t = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + t = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -1774,11 +1776,11 @@ void update_hero_motion_for_current_state(void) { emit_hero_randomized_motion_effects(5, 2); } if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { @@ -1837,7 +1839,7 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -1993,7 +1995,7 @@ void update_hero_motion_for_current_state(void) { &hero.prev_rail_point, &hero.prev_rail_segment, &hero.prev_rail_seg_frac, - hero.unk5A0, + hero.prev_rail_spline_loops, 999.0f, 2.0f, 2.5f); @@ -2013,7 +2015,7 @@ void update_hero_motion_for_current_state(void) { hero.rail_off_frames++; break; } - r = hero.unk574 * (f32)hero.grind_direction; + r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { r = hero.unk5CC * (f32)hero.grind_direction; } @@ -2029,7 +2031,7 @@ void update_hero_motion_for_current_state(void) { &hero.prev_rail_segment, &hero.prev_rail_seg_frac, r, - hero.unk5A0); + hero.prev_rail_spline_loops); } if (scale_game_frames(90) < hero.control_mode_timer) { s32 h; @@ -2271,20 +2273,20 @@ void update_hero_motion_for_current_state(void) { hero.grind_pose = -1; } } - if (hero.unk5AC.f < sp) { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 8.0f); + if (hero.grind_speed_boost.f < sp) { + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 8.0f); } else { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 2.0f); + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 2.0f); } - if (hero.unk5AC.f > frame_time * 12.0f) { - hero.unk5AC.f = frame_time * 12.0f; + if (hero.grind_speed_boost.f > frame_time * 12.0f) { + hero.grind_speed_boost.f = frame_time * 12.0f; } - if (hero.unk5AC.f < D_0015ED6C_a * -2.5f) { - hero.unk5AC.f = D_0015ED6C_a * -2.5f; + if (hero.grind_speed_boost.f < D_0015ED6C_a * -2.5f) { + hero.grind_speed_boost.f = D_0015ED6C_a * -2.5f; } - hero.unk574 = hero.grind_base_speed + hero.unk5AC.f; - if (hero.unk574 < 0.0f) { - hero.unk574 = 0.0f; + hero.grind_speed = hero.grind_base_speed + hero.grind_speed_boost.f; + if (hero.grind_speed < 0.0f) { + hero.grind_speed = 0.0f; } fast_vec_sub( &hero.motion.velocity, &vector_and_attack_descriptor_scratch, &hero.rail_point); @@ -2344,7 +2346,7 @@ void update_hero_motion_for_current_state(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0, 0.0f, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2586,7 +2588,7 @@ void update_hero_motion_for_current_state(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -2878,7 +2880,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l08/hero/update_hero_state_transitions.c b/src/overlays/l08/hero/update_hero_state_transitions.c index 46c0bb021f..59e4414657 100644 --- a/src/overlays/l08/hero/update_hero_state_transitions.c +++ b/src/overlays/l08/hero/update_hero_state_transitions.c @@ -190,9 +190,10 @@ void update_hero_state_transitions(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && D_L08_0015F594 == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0) && + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0) && (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT || hero.vehicle_mode == 3)) { int id; @@ -365,7 +366,7 @@ void update_hero_state_transitions(void) { int anim = D_L08_0017A2C0[id].anim; if (((unsigned char *)hero.moby)[0x53] != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -708,7 +709,7 @@ void update_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -717,7 +718,7 @@ void update_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (((unsigned char *)hero.moby)[0x53] == 0x36) { @@ -968,7 +969,7 @@ void update_hero_state_transitions(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -993,7 +994,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 1); break; } - hero.unk1F8 = scale_game_frames(0x28); + hero.magnet_walk_timer = scale_game_frames(0x28); if (absolute_float(hero.motion.rot.f[1]) > 0.7853982f || absolute_float(hero.motion.rot.f[0]) > 0.7853982f) { hero.ledge_probe_cooldown = scale_game_frames(0x28); @@ -1148,7 +1149,7 @@ void update_hero_state_transitions(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -1200,7 +1201,7 @@ void update_hero_state_transitions(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -1296,9 +1297,9 @@ void update_hero_state_transitions(void) { 3.1415927f); ang = fast_add_rotations(ang, randf_sym(0.5235988f, 0.61086524f)); hero.motion.resolved_velocity.f[0] = - fast_cos(ang) * hero.unk574 * 0.7f; + fast_cos(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[1] = - fast_sin(ang) * hero.unk574 * 0.7f; + fast_sin(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[2] = frame_time * 4.5f; } if (scale_game_frames(0xF) < hero.rail_off_frames && @@ -1306,7 +1307,7 @@ void update_hero_state_transitions(void) { hero.health.hp = 2; } hero_set_state(HERO_STATE_HURT, 1); - hero.unk1C8 = scale_game_frames(0x46); + hero.grind_catch_lockout = scale_game_frames(0x46); break; } } @@ -1325,7 +1326,7 @@ void update_hero_state_transitions(void) { } if (can) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { - if (hero.unk5B8 != 0) { + if (hero.rail_jump_armed != 0) { hero.rail_jump_queued = 1; break; } @@ -1338,7 +1339,7 @@ void update_hero_state_transitions(void) { hero.move_lock_timer = scale_game_frames(0x46); } hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { @@ -1356,7 +1357,7 @@ void update_hero_state_transitions(void) { set_hero_animation(a, 0, scale_game_frames(0xC)); } } - if (hero.unk5BC != 0) { + if (hero.rail_jump_trigger != 0) { if (hero.rail_jump_queued != 0) { float rail_jump_velocity_z; float t; @@ -1373,14 +1374,14 @@ void update_hero_state_transitions(void) { movement_query_scratch[2] = rail_jump_velocity_z; t = calculate_triangular_corrected_scalar( position_scratch, movement_query_scratch, 0, hero.jump_gravity); - hero.unk48C = t + 0.05f; + hero.jump_height_target = t + 0.05f; hero.jump_height = t; hero.jump_gravity = hero.rail_jump_gravity; hero.jump_height_start = t; } } - hero.unk5B8 = 0; - hero.unk5BC = 0; + hero.rail_jump_armed = 0; + hero.rail_jump_trigger = 0; } else if (hero.state.current == 0x2B) { if (pad_pressed_within(0x40, scale_game_frames(5), 0) && hero.anim_frame >= (float)D_L08_0017C428[hero.attack_record].f14) { @@ -1406,7 +1407,7 @@ void update_hero_state_transitions(void) { } if (scale_game_frames(5) < hero.rail_off_frames) { hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); } } else if (hero.state.current == 0x29 || hero.state.current == 0x2A) { if ((scale_game_frames(5) < hero.rail_off_frames || @@ -1418,7 +1419,7 @@ void update_hero_state_transitions(void) { } if (hero.state.current == 0x29 && hero.state_timer < scale_game_frames(0xA) && hero.past_jump_apex == 0 && - hero.unk12EE == 0 && hero.stick_magnitude > 0.5f && + hero.grind_jump_block == 0 && hero.stick_magnitude > 0.5f && hero.rail_switching == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( @@ -1472,7 +1473,7 @@ void update_hero_state_transitions(void) { hero.transfer_from_spline = hero.rail_spline; hero.prev_rail_segment = hero.rail_segment; hero.prev_rail_seg_frac = hero.rail_seg_frac; - hero.unk5A0 = hero.rail_spline_loops; + hero.prev_rail_spline_loops = hero.rail_spline_loops; qcopy(hero.prev_rail_point.f, hero.rail_point.f); hero.rail_spline = new_path; hero.rail_spline_loops = new_loop; @@ -1552,7 +1553,7 @@ void update_hero_state_transitions(void) { if (-0.5f > hero.motion.pos.f[2] - hero.rail_point.f[2]) { hero_set_state(HERO_STATE_FALL, 1); hero.move_lock_timer = scale_game_frames(0x46); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } } @@ -2262,7 +2263,7 @@ void update_hero_state_transitions(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -2278,7 +2279,7 @@ void update_hero_state_transitions(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -2306,7 +2307,7 @@ void update_hero_state_transitions(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l11/hero/hero_set_state.c b/src/overlays/l11/hero/hero_set_state.c index 1466f6720a..d2eba5b360 100644 --- a/src/overlays/l11/hero/hero_set_state.c +++ b/src/overlays/l11/hero/hero_set_state.c @@ -113,7 +113,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); @@ -233,7 +233,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } else { - p->unk8F4 = scale_game_frames(0x2D); + p->swim_thrust_timer = scale_game_frames(0x2D); } { struct Hero *q = &hero; @@ -252,7 +252,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = HERO_MODE_SWIM; p->camera_mode = 0xB; p->item_select_blocked = 1; - p->unk8F4 = scale_game_frames(0x3C); + p->swim_thrust_timer = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; @@ -494,7 +494,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -503,7 +503,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -512,7 +512,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -558,7 +558,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -743,7 +743,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -752,14 +752,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], @@ -808,10 +808,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (animation_update_mode) { @@ -978,53 +978,53 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; - u->unk48C = 1.98f; + u->jump_height_target = 1.98f; u->jump_height = 1.95f; } else { gravity_set_z( @@ -1045,46 +1045,46 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(((int)u->moby), x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -1099,11 +1099,11 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -1114,28 +1114,28 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -1155,17 +1155,17 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { @@ -1187,33 +1187,33 @@ int hero_set_state(int requested_state, int animation_update_mode) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -1223,7 +1223,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *w = &hero; w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1267,9 +1267,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1557,7 +1557,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { hero_base->ground_speed = planar_speed; if (frame_time * 1.5f < planar_speed) hero_base->ground_speed = frame_time * 1.5f; - hero_base->unk3B8 = 0; + hero_base->move_along_stick = 0; if (animation_update_mode) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -1598,7 +1598,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; diff --git a/src/overlays/l11/hero/update_hero_motion_by_state.c b/src/overlays/l11/hero/update_hero_motion_by_state.c index c133e3e98d..72b5697ef6 100644 --- a/src/overlays/l11/hero/update_hero_motion_by_state.c +++ b/src/overlays/l11/hero/update_hero_motion_by_state.c @@ -106,7 +106,7 @@ void update_hero_surface_condition_flags(void) { } if (state == 9) { struct Hero *d = &hero; - d->unk12EE = 1; + d->grind_jump_block = 1; } if (state == 0xC) { struct Hero *d = &hero; @@ -718,8 +718,8 @@ void update_hero_motion_by_state(void) { diff = fast_subtract_rotations(hero.motion.rot.f[1], old); stick_target(1.0f, 0); turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - hero.unk8EC = hero.motion.yaw_rate; - fast_dec_timer(&hero.unk8F4); + hero.swim_yaw_rate = hero.motion.yaw_rate; + fast_dec_timer(&hero.swim_thrust_timer); if (hero.state.step == 1) { hero.target_speed = frame_time * 6.0f; } else if (hero.state.current == 0x35) { @@ -843,7 +843,7 @@ void update_hero_motion_by_state(void) { qcopy(&hero.motion.velocity, &hero.motion.momentum); } clip_hero_horizontal_velocity(0); - t = hero.unk8EC * fast_cos(yaw) * -7.0f; + t = hero.swim_yaw_rate * fast_cos(yaw) * -7.0f; spring_angle(&hero.motion.rot.f[0], t, &hero.swim_lean_vel, @@ -1052,10 +1052,11 @@ void update_hero_motion_by_state(void) { f32 hit; f32 hit2; qcopy(&vector_and_hit_descriptor_head_scratch, &MV(hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &vector_and_hit_descriptor_head_scratch); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &vector_and_hit_descriptor_head_scratch); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); @@ -1070,7 +1071,7 @@ void update_hero_motion_by_state(void) { &hit2, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && hit > 0.0f) { hero.target_arrival_frames = hit; hero.state.step = 1; @@ -1110,7 +1111,8 @@ void update_hero_motion_by_state(void) { fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&vector_and_hit_descriptor_head_scratch, &MV(hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &vector_and_hit_descriptor_head_scratch); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &vector_and_hit_descriptor_head_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&motion_vector_scratch, &v10, &vector_and_hit_descriptor_head_scratch); fast_vec_normalize(&motion_vector_scratch, &motion_vector_scratch, hero.tether_radius); @@ -1204,7 +1206,7 @@ void update_hero_motion_by_state(void) { if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.displacement, frame_time_sq * 40.0f); @@ -1248,9 +1250,9 @@ void update_hero_motion_by_state(void) { old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - old; if (fast_vec_length(&vC0) > hero.swing_rope_length) { @@ -1279,7 +1281,7 @@ void update_hero_motion_by_state(void) { f32 t; s32 up; hero.swing_entry_push = 0; - t = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + t = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -1729,11 +1731,11 @@ void update_hero_motion_by_state(void) { emit_hero_randomized_motion_effects(5, 2); } if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { @@ -1792,7 +1794,7 @@ void update_hero_motion_by_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -1818,7 +1820,7 @@ void update_hero_motion_by_state(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0, 0.0f, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2057,7 +2059,7 @@ void update_hero_motion_by_state(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -2349,7 +2351,7 @@ void update_hero_motion_by_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l11/hero/update_hero_state_transitions.c b/src/overlays/l11/hero/update_hero_state_transitions.c index 36f8c79bba..3963d130d0 100644 --- a/src/overlays/l11/hero/update_hero_state_transitions.c +++ b/src/overlays/l11/hero/update_hero_state_transitions.c @@ -157,9 +157,10 @@ void update_hero_state_transitions(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && D_L11_0015F594_gp == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0) && + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0) && (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT || hero.vehicle_mode == 3)) { int id; @@ -331,7 +332,7 @@ void update_hero_state_transitions(void) { int anim = l11_hero_item_hold_animation_rows[id].anim; if (hero.moby->prev_seq != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -680,7 +681,7 @@ void update_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -689,7 +690,7 @@ void update_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (hero.moby->prev_seq == 0x36) { @@ -933,7 +934,7 @@ void update_hero_state_transitions(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -1036,7 +1037,7 @@ void update_hero_state_transitions(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -1088,7 +1089,7 @@ void update_hero_state_transitions(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -1789,7 +1790,7 @@ void update_hero_state_transitions(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -1805,7 +1806,7 @@ void update_hero_state_transitions(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -1833,7 +1834,7 @@ void update_hero_state_transitions(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l11/mobys/jet_fighter.c b/src/overlays/l11/mobys/jet_fighter.c index 73e89ed8d3..bc6d141881 100644 --- a/src/overlays/l11/mobys/jet_fighter.c +++ b/src/overlays/l11/mobys/jet_fighter.c @@ -1486,7 +1486,7 @@ void jet_fighter_update(struct Moby *moby) { g->moby->collision_disable = 0; FUN_L11_0024db50(0, 1); jet_end_mount(0); - set_animation_parameter(g->unk160C, 0); + set_animation_parameter(g->ship_hud_handle, 0); request_music_track(0, 8); qcopy_nc(&moby->pos, ship_vars->home_pos); qcopy_nc(&moby->rot, ship_vars->home_rot); diff --git a/src/overlays/l12/hero/hero_set_state.c b/src/overlays/l12/hero/hero_set_state.c index 59ea5cddef..6435867d08 100644 --- a/src/overlays/l12/hero/hero_set_state.c +++ b/src/overlays/l12/hero/hero_set_state.c @@ -114,7 +114,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); @@ -239,7 +239,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } else { - p->unk8F4 = scale_game_frames(0x2D); + p->swim_thrust_timer = scale_game_frames(0x2D); } { struct Hero *q = &hero; @@ -258,7 +258,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_SWIM; p->camera_mode = 0xB; p->item_select_blocked = 1; - p->unk8F4 = scale_game_frames(0x3C); + p->swim_thrust_timer = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; @@ -500,7 +500,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -509,7 +509,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -518,7 +518,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -564,7 +564,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { t->ground_speed = frame_time * 7.7f; t->motion.velocity.f[2] = 0.0f; FUN_L00_0025f730(&t->motion.velocity, frame_time * 7.7f); - t->unk3B4.i = 0; + t->prev_ground_pitch.i = 0; t->state.current = 0x2F; set_hero_animation(0x37, 0, (float)scale_game_frames(8)); } else if (t->wading != 0 || t->state.current == 0x73) { @@ -576,7 +576,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -777,7 +777,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -786,14 +786,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], @@ -842,10 +842,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (entry_animation_mode) { @@ -1012,53 +1012,53 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; - u->unk48C = 1.98f; + u->jump_height_target = 1.98f; u->jump_height = 1.95f; } else { gravity_set_z( @@ -1079,46 +1079,46 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(((int)u->moby), x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -1133,11 +1133,11 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -1148,28 +1148,28 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -1189,17 +1189,17 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { @@ -1221,33 +1221,33 @@ int hero_set_state(int requested_state, int entry_animation_mode) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -1257,7 +1257,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *w = &hero; w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1301,9 +1301,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1618,7 +1618,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { hero_base->ground_speed = planar_speed; if (frame_time * 1.5f < planar_speed) hero_base->ground_speed = frame_time * 1.5f; - hero_base->unk3B8 = 0; + hero_base->move_along_stick = 0; if (entry_animation_mode) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -1659,7 +1659,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; diff --git a/src/overlays/l12/hero/update_hero_motion_for_current_state.c b/src/overlays/l12/hero/update_hero_motion_for_current_state.c index 9a3cd7b526..4d0c424850 100644 --- a/src/overlays/l12/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l12/hero/update_hero_motion_for_current_state.c @@ -99,7 +99,7 @@ void update_hero_ground_material_flags(void) { } if (state == 9) { struct Hero *d = &hero; - d->unk12EE = 1; + d->grind_jump_block = 1; } if (state == 0xC) { struct Hero *d = &hero; @@ -152,7 +152,7 @@ void update_hero_smoothing_targets_and_values(void) { } if (hero.state.control_mode == HERO_MODE_JUMP) { if (hero.state_timer > hero.takeoff_frame && hero.past_jump_apex == 0) - hero.capsule_bottom_target = hero.unk434; + hero.capsule_bottom_target = hero.air_capsule_bottom; } else if (hero.state.current == HERO_STATE_FALL) { hero.capsule_bottom_target = 0.5f; } else if (hero.state.current == HERO_STATE_CROUCH) { @@ -353,7 +353,7 @@ void update_hero_ground_contact_and_gravity(void) { break; } hero.ground_pitch.i = 0; - hero.unk2E8.i = 0; + hero.ground_roll.i = 0; hero.side_probe_roll.i[0] = 0; hero.side_probe_roll.i[1] = 0; hero.side_probe_pitch.i[0] = 0; @@ -373,7 +373,7 @@ void update_hero_ground_contact_and_gravity(void) { hero.ground_pitch.f = ground_geometry_scratch.f[1]; } if (-0.78539819f < ground_geometry_scratch.f[0] && ground_geometry_scratch.f[0] < 0.78539819f) { - hero.unk2E8.f = ground_geometry_scratch.f[0]; + hero.ground_roll.f = ground_geometry_scratch.f[0]; } for (i = 0; i < 2; i++) { ground_probe_angle = 1.5707964f; @@ -405,7 +405,7 @@ void update_hero_ground_contact_and_gravity(void) { } else { hero.side_probe_drop.i[i] = 0; hero.side_probe_pitch.f[i] = hero.ground_pitch.f; - hero.side_probe_roll.f[i] = hero.unk2E8.f; + hero.side_probe_roll.f[i] = hero.ground_roll.f; } } } @@ -1014,8 +1014,8 @@ void update_hero_motion_for_current_state(void) { diff = fast_subtract_rotations(hero.motion.rot.f[1], old); stick_target(1.0f, 0); turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - hero.unk8EC = hero.motion.yaw_rate; - fast_dec_timer(&hero.unk8F4); + hero.swim_yaw_rate = hero.motion.yaw_rate; + fast_dec_timer(&hero.swim_thrust_timer); if (hero.state.step == 1) { hero.target_speed = frame_time * 6.0f; } else if (hero.state.current == 0x35) { @@ -1139,7 +1139,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.momentum); } clip_hero_horizontal_velocity(0); - t = hero.unk8EC * fast_cos(yaw) * -7.0f; + t = hero.swim_yaw_rate * fast_cos(yaw) * -7.0f; spring_angle(&hero.motion.rot.f[0], t, &hero.swim_lean_vel, @@ -1348,10 +1348,11 @@ void update_hero_motion_for_current_state(void) { f32 hit; f32 hit2; qcopy(&geometry_and_hit_descriptor_scratch, &MV(hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &geometry_and_hit_descriptor_scratch); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &geometry_and_hit_descriptor_scratch); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); @@ -1366,7 +1367,7 @@ void update_hero_motion_for_current_state(void) { &hit2, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && hit > 0.0f) { hero.target_arrival_frames = hit; hero.state.step = 1; @@ -1407,7 +1408,8 @@ void update_hero_motion_for_current_state(void) { fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&geometry_and_hit_descriptor_scratch, &MV(hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &geometry_and_hit_descriptor_scratch); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &geometry_and_hit_descriptor_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&movement_vector_scratch, &v10, &geometry_and_hit_descriptor_scratch); fast_vec_normalize(&movement_vector_scratch, &movement_vector_scratch, hero.tether_radius); @@ -1503,7 +1505,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.displacement, frame_time_sq * 40.0f); @@ -1547,9 +1549,9 @@ void update_hero_motion_for_current_state(void) { old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - old; if (fast_vec_length(&vC0) > hero.swing_rope_length) { @@ -1579,7 +1581,7 @@ void update_hero_motion_for_current_state(void) { f32 t; s32 up; hero.swing_entry_push = 0; - t = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + t = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -2123,11 +2125,11 @@ void update_hero_motion_for_current_state(void) { emit_hero_randomized_motion_effects(5, 2); } if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { @@ -2186,7 +2188,7 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -2259,7 +2261,7 @@ void update_hero_motion_for_current_state(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0, 0.0f, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2508,7 +2510,7 @@ void update_hero_motion_for_current_state(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -2544,7 +2546,7 @@ void update_hero_motion_for_current_state(void) { hero.state.current != HERO_STATE_PACK_LONG_JUMP && hero.state.current != 0xC && hero.state.current != 0x11 && hero.state.current != 0x1C && hero.state.current != 0x4C)) { - if (hero.unk4A8 != 0) { + if (hero.took_off_from_ice != 0) { update_hero_planar_movement_velocity(); if (hero.state.current == HERO_STATE_PACK_JUMP && hero.state_timer < scale_game_frames(10) && @@ -2813,7 +2815,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l12/hero/update_hero_state_transitions.c b/src/overlays/l12/hero/update_hero_state_transitions.c index 31a671ded1..54dfb7b3b7 100644 --- a/src/overlays/l12/hero/update_hero_state_transitions.c +++ b/src/overlays/l12/hero/update_hero_state_transitions.c @@ -158,9 +158,10 @@ void update_hero_state_transitions(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && item_selector_hud_activation_blocked == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0) && + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0) && (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT || hero.vehicle_mode == 3)) { int id; @@ -331,7 +332,7 @@ void update_hero_state_transitions(void) { int anim = D_L12_00179F40[id].anim; if (hero.moby->prev_seq != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -684,7 +685,7 @@ void update_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -693,7 +694,7 @@ void update_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (hero.moby->prev_seq == 0x36) { @@ -936,7 +937,7 @@ void update_hero_state_transitions(void) { } } if (moby->prev_seq == 0x37) { - hero.anim_speed = (1.0f - hero.unk3B0) * 2.0f; + hero.anim_speed = (1.0f - hero.run_speed_ratio) * 2.0f; if (hero.anim_speed > 1.7f) { hero.anim_speed = 1.7f; } @@ -993,7 +994,7 @@ void update_hero_state_transitions(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -1018,7 +1019,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 1); break; } - hero.unk1F8 = scale_game_frames(0x28); + hero.magnet_walk_timer = scale_game_frames(0x28); if (absolute_float(hero.motion.rot.f[1]) > 0.7853982f || absolute_float(hero.motion.rot.f[0]) > 0.7853982f) { hero.ledge_probe_cooldown = scale_game_frames(0x28); @@ -1146,7 +1147,7 @@ void update_hero_state_transitions(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -1197,7 +1198,7 @@ void update_hero_state_transitions(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -1901,7 +1902,7 @@ void update_hero_state_transitions(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -1917,7 +1918,7 @@ void update_hero_state_transitions(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -1945,7 +1946,7 @@ void update_hero_state_transitions(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l14/hero/hero_set_state.c b/src/overlays/l14/hero/hero_set_state.c index 9d65c51260..94d6dcc0ad 100644 --- a/src/overlays/l14/hero/hero_set_state.c +++ b/src/overlays/l14/hero/hero_set_state.c @@ -113,7 +113,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); @@ -248,7 +248,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -257,7 +257,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -266,7 +266,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -312,7 +312,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { t->ground_speed = frame_time * 7.7f; t->motion.velocity.f[2] = 0.0f; FUN_L00_0025f730(&t->motion.velocity, frame_time * 7.7f); - t->unk3B4.i = 0; + t->prev_ground_pitch.i = 0; t->state.current = 0x2F; set_hero_animation(0x37, 0, (float)scale_game_frames(8)); } else if (t->magnetic_floor == 1 || t->state.current == 0x3F) { @@ -321,7 +321,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -522,7 +522,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -531,14 +531,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], @@ -596,12 +596,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->grind_anim_variant = 0; if (p->state.prev_control_mode != HERO_MODE_GRIND) { p->grind_pose = -1; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; p->grind_base_speed = 0.0f; } - p->unk5B4 = 0; - p->unk5B8 = 0; - p->unk5BC = 0; + p->rail_swing_target = 0; + p->rail_jump_armed = 0; + p->rail_jump_trigger = 0; p->rail_jump_queued = 0; seg = p->rail_segment; t = p->rail_seg_frac; @@ -644,10 +644,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (animation_update_mode) { @@ -814,47 +814,47 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x29) { u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.45f; + u->jump_height_target = 2.45f; u->jump_height_start = 2.4f; u->jump_ramp_frames = scale_game_frames(0x11); u->state.control_mode = HERO_MODE_GRIND; @@ -865,7 +865,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { *(u128 *)grind_direction_or_jump_reference_position = 0; u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; - u->unk48C = u->unk48C + k; + u->jump_height_target = u->jump_height_target + k; u->jump_gravity = frame_time_sq * 14.0f; grind_direction_or_jump_reference_position[0] = 331.0f; grind_direction_or_jump_reference_position[1] = 104.0f; @@ -875,17 +875,17 @@ int hero_set_state(int requested_state, int animation_update_mode) { k = 0.7f; u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; - u->unk48C = u->unk48C + k; + u->jump_height_target = u->jump_height_target + k; } } } else if (u->state.current == 0x2A) { u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.55f; + u->jump_height_target = 2.55f; u->jump_height_start = 2.5f; u->jump_ramp_frames = scale_game_frames(0xA); u->state.control_mode = HERO_MODE_GRIND; @@ -894,46 +894,46 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = (char *)&u->trail; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(*(int *)&u->moby, x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -948,11 +948,11 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -963,28 +963,28 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = (char *)&u->trail; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -1004,17 +1004,17 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { @@ -1036,33 +1036,33 @@ int hero_set_state(int requested_state, int animation_update_mode) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -1072,7 +1072,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *w = &hero; w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1125,9 +1125,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1463,7 +1463,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { hero_base->ground_speed = planar_speed; if (frame_time * 1.5f < planar_speed) hero_base->ground_speed = frame_time * 1.5f; - hero_base->unk3B8 = 0; + hero_base->move_along_stick = 0; if (animation_update_mode) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -1504,7 +1504,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; diff --git a/src/overlays/l14/hero/process_hero_state_transitions.c b/src/overlays/l14/hero/process_hero_state_transitions.c index f1d480849c..29308a07bd 100644 --- a/src/overlays/l14/hero/process_hero_state_transitions.c +++ b/src/overlays/l14/hero/process_hero_state_transitions.c @@ -175,9 +175,10 @@ void process_hero_state_transitions(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && D_L14_0015F594 == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0) && + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0) && (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT || hero.vehicle_mode == 3)) { int id; @@ -351,7 +352,7 @@ void process_hero_state_transitions(void) { int anim = D_L14_0017A1C0[id].anim; if (((unsigned char *)hero.moby)[0x53] != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -556,7 +557,7 @@ void process_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -565,7 +566,7 @@ void process_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (((unsigned char *)hero.moby)[0x53] == 0x36) { @@ -804,7 +805,7 @@ void process_hero_state_transitions(void) { } } if (MOBY(moby)->prev_seq == 0x37) { - hero.anim_speed = (1.0f - hero.unk3B0) * 2.0f; + hero.anim_speed = (1.0f - hero.run_speed_ratio) * 2.0f; if (hero.anim_speed > 1.7f) { hero.anim_speed = 1.7f; } @@ -845,7 +846,7 @@ void process_hero_state_transitions(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -870,7 +871,7 @@ void process_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 1); break; } - hero.unk1F8 = scale_game_frames(0x28); + hero.magnet_walk_timer = scale_game_frames(0x28); if (absolute_float(hero.motion.rot.f[1]) > 0.7853982f || absolute_float(hero.motion.rot.f[0]) > 0.7853982f) { hero.ledge_probe_cooldown = scale_game_frames(0x28); @@ -1002,7 +1003,7 @@ void process_hero_state_transitions(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -1053,7 +1054,7 @@ void process_hero_state_transitions(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -1150,9 +1151,9 @@ void process_hero_state_transitions(void) { 3.1415927f); ang = fast_add_rotations(ang, randf_sym(0.5235988f, 0.61086524f)); hero.motion.resolved_velocity.f[0] = - fast_cos(ang) * hero.unk574 * 0.7f; + fast_cos(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[1] = - fast_sin(ang) * hero.unk574 * 0.7f; + fast_sin(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[2] = frame_time * 4.5f; } if (scale_game_frames(0xF) < hero.rail_off_frames && @@ -1160,7 +1161,7 @@ void process_hero_state_transitions(void) { hero.health.hp = 2; } hero_set_state(HERO_STATE_HURT, 1); - hero.unk1C8 = scale_game_frames(0x46); + hero.grind_catch_lockout = scale_game_frames(0x46); break; } } @@ -1179,7 +1180,7 @@ void process_hero_state_transitions(void) { } if (go) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { - if (hero.unk5B8 != 0) { + if (hero.rail_jump_armed != 0) { hero.rail_jump_queued = 1; break; } @@ -1192,7 +1193,7 @@ void process_hero_state_transitions(void) { hero.move_lock_timer = scale_game_frames(0x46); } hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { @@ -1210,7 +1211,7 @@ void process_hero_state_transitions(void) { set_hero_animation(a, 0, scale_game_frames(0xC)); } } - if (hero.unk5BC != 0) { + if (hero.rail_jump_trigger != 0) { if (hero.rail_jump_queued != 0) { float t; @@ -1229,11 +1230,11 @@ void process_hero_state_transitions(void) { hero.jump_height_start = t; hero.jump_gravity = hero.rail_jump_gravity; hero.jump_height = t; - hero.unk48C = t + 0.05f; + hero.jump_height_target = t + 0.05f; } } - hero.unk5B8 = 0; - hero.unk5BC = 0; + hero.rail_jump_armed = 0; + hero.rail_jump_trigger = 0; } else if (hero.state.current == 0x2B) { int n; @@ -1258,7 +1259,7 @@ void process_hero_state_transitions(void) { } if (scale_game_frames(5) < hero.rail_off_frames) { hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); } } else if (hero.state.current == 0x29 || hero.state.current == 0x2A) { if ((scale_game_frames(5) < hero.rail_off_frames || @@ -1270,7 +1271,7 @@ void process_hero_state_transitions(void) { } if (hero.state.current == 0x29 && hero.state_timer < scale_game_frames(0xA) && hero.past_jump_apex == 0 && - hero.unk12EE == 0 && hero.stick_magnitude > 0.5f && + hero.grind_jump_block == 0 && hero.stick_magnitude > 0.5f && hero.rail_switching == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( @@ -1320,7 +1321,7 @@ void process_hero_state_transitions(void) { hero.transfer_from_spline = hero.rail_spline; hero.prev_rail_segment = hero.rail_segment; hero.prev_rail_seg_frac = hero.rail_seg_frac; - hero.unk5A0 = hero.rail_spline_loops; + hero.prev_rail_spline_loops = hero.rail_spline_loops; qcopy(hero.prev_rail_point.f, hero.rail_point.f); hero.rail_spline = new_path; hero.rail_spline_loops = new_loop; @@ -1400,7 +1401,7 @@ void process_hero_state_transitions(void) { if (-0.5f > hero.motion.pos.f[2] - hero.rail_point.f[2]) { hero_set_state(HERO_STATE_FALL, 1); hero.move_lock_timer = scale_game_frames(0x46); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } } @@ -2110,7 +2111,7 @@ void process_hero_state_transitions(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -2126,7 +2127,7 @@ void process_hero_state_transitions(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -2154,7 +2155,7 @@ void process_hero_state_transitions(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l14/hero/update_hero_motion_by_state.c b/src/overlays/l14/hero/update_hero_motion_by_state.c index 826ccfde7f..daf2ce23be 100644 --- a/src/overlays/l14/hero/update_hero_motion_by_state.c +++ b/src/overlays/l14/hero/update_hero_motion_by_state.c @@ -98,7 +98,7 @@ void resolve_hero_surface_reactions(void) { } if (saved_ground_type == 9) { struct Hero *q = &hero; - q->unk12EE = 1; + q->grind_jump_block = 1; } if (saved_ground_type == 0xC) { struct Hero *q = &hero; @@ -259,7 +259,7 @@ void update_hero_smoothed_parameters(void) { } if (hero.state.control_mode == HERO_MODE_JUMP) { if (hero.state_timer > hero.takeoff_frame && hero.past_jump_apex == 0) - hero.capsule_bottom_target = hero.unk434; + hero.capsule_bottom_target = hero.air_capsule_bottom; } else if (hero.state.current == HERO_STATE_FALL) { hero.capsule_bottom_target = 0.5f; } else if (hero.state.current == HERO_STATE_CROUCH) { @@ -775,10 +775,10 @@ void update_hero_motion_by_state(void) { f32 hit; f32 hit2; qcopy(&vector_and_descriptor_scratch, &MV(hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &vector_and_descriptor_scratch); + hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_and_descriptor_scratch); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); @@ -793,7 +793,7 @@ void update_hero_motion_by_state(void) { &hit2, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && hit > 0.0f) { hero.target_arrival_frames = hit; hero.state.step = 1; @@ -832,7 +832,7 @@ void update_hero_motion_by_state(void) { fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&vector_and_descriptor_scratch, &MV(hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &vector_and_descriptor_scratch); + hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_and_descriptor_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&motion_vector_scratch, &v10, &vector_and_descriptor_scratch); fast_vec_normalize(&motion_vector_scratch, &motion_vector_scratch, hero.tether_radius); @@ -922,7 +922,7 @@ void update_hero_motion_by_state(void) { if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.displacement, frame_time_sq * 40.0f); @@ -966,9 +966,9 @@ void update_hero_motion_by_state(void) { swing_radius_before_spring = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - swing_radius_before_spring; if (fast_vec_length(&vC0) > hero.swing_rope_length) { @@ -997,7 +997,7 @@ void update_hero_motion_by_state(void) { f32 t; s32 up; hero.swing_entry_push = 0; - t = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + t = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -1516,11 +1516,11 @@ void update_hero_motion_by_state(void) { case HERO_STATE_SHALLOW_WATER_RUN: { f32 k; if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { @@ -1579,7 +1579,7 @@ void update_hero_motion_by_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -1713,7 +1713,7 @@ void update_hero_motion_by_state(void) { &hero.prev_rail_point, &hero.prev_rail_segment, &hero.prev_rail_seg_frac, - hero.unk5A0, + hero.prev_rail_spline_loops, 999.0f, 2.0f, 2.5f); @@ -1733,7 +1733,7 @@ void update_hero_motion_by_state(void) { hero.rail_off_frames++; break; } - r = hero.unk574 * (f32)hero.grind_direction; + r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { r = hero.unk5CC * (f32)hero.grind_direction; } @@ -1749,7 +1749,7 @@ void update_hero_motion_by_state(void) { &hero.prev_rail_segment, &hero.prev_rail_seg_frac, r, - hero.unk5A0); + hero.prev_rail_spline_loops); } if (scale_game_frames(90) < hero.control_mode_timer) { s32 h; @@ -1990,20 +1990,20 @@ void update_hero_motion_by_state(void) { hero.grind_pose = -1; } } - if (hero.unk5AC.f < sp) { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 8.0f); + if (hero.grind_speed_boost.f < sp) { + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 8.0f); } else { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 2.0f); + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 2.0f); } - if (hero.unk5AC.f > frame_time * 12.0f) { - hero.unk5AC.f = frame_time * 12.0f; + if (hero.grind_speed_boost.f > frame_time * 12.0f) { + hero.grind_speed_boost.f = frame_time * 12.0f; } - if (hero.unk5AC.f < D_0015ED6C_a * -2.5f) { - hero.unk5AC.f = D_0015ED6C_a * -2.5f; + if (hero.grind_speed_boost.f < D_0015ED6C_a * -2.5f) { + hero.grind_speed_boost.f = D_0015ED6C_a * -2.5f; } - hero.unk574 = hero.grind_base_speed + hero.unk5AC.f; - if (hero.unk574 < 0.0f) { - hero.unk574 = 0.0f; + hero.grind_speed = hero.grind_base_speed + hero.grind_speed_boost.f; + if (hero.grind_speed < 0.0f) { + hero.grind_speed = 0.0f; } fast_vec_sub(&hero.motion.velocity, &vector_and_descriptor_scratch, &hero.rail_point); fast_vec_sub(&vector_and_hit_descriptor_scratch, &hero.rail_point, &hero.motion.pos); @@ -2062,7 +2062,7 @@ void update_hero_motion_by_state(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0, 0.0f, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2309,7 +2309,7 @@ void update_hero_motion_by_state(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -2328,7 +2328,7 @@ void update_hero_motion_by_state(void) { hero.state.current != HERO_STATE_PACK_LONG_JUMP && hero.state.current != 0xC && hero.state.current != 0x11 && hero.state.current != 0x1C && hero.state.current != 0x4C)) { - if (hero.unk4A8 != 0) { + if (hero.took_off_from_ice != 0) { update_hero_planar_movement_velocity(); if (hero.state.current == HERO_STATE_PACK_JUMP && hero.state_timer < scale_game_frames(10) && @@ -2588,7 +2588,7 @@ void update_hero_motion_by_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l15/hero/hero_set_state.c b/src/overlays/l15/hero/hero_set_state.c index d8826ce061..26f78960f4 100644 --- a/src/overlays/l15/hero/hero_set_state.c +++ b/src/overlays/l15/hero/hero_set_state.c @@ -116,7 +116,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); @@ -207,7 +207,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } else { - p->unk8F4 = scale_game_frames(0x2D); + p->swim_thrust_timer = scale_game_frames(0x2D); } { struct Hero *q = &hero; @@ -226,7 +226,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_SWIM; p->camera_mode = 0xB; p->item_select_blocked = 1; - p->unk8F4 = scale_game_frames(0x3C); + p->swim_thrust_timer = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; @@ -448,7 +448,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -457,7 +457,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -466,7 +466,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -512,7 +512,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -707,7 +707,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -716,14 +716,14 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], @@ -772,10 +772,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (entry_animation_mode) { @@ -944,53 +944,53 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; - u->unk48C = 1.98f; + u->jump_height_target = 1.98f; u->jump_height = 1.95f; } else { gravity_set_z( @@ -1020,36 +1020,36 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *w = &hero; w->jump_height = v + 1.7f; w->takeoff_frame = scale_game_frames(5); - w->unk434 = 0.6f; + w->air_capsule_bottom = 0.6f; w->apex_anim_frame = 18.0f; w->target_anim_frame = 30.0f; w->jump_land_anim_frame = 12.0f; - w->unk48C = v + 1.75f; + w->jump_height_target = v + 1.75f; w->jump_height_start = v + 1.7f; w->jump_ramp_frames = scale_game_frames(0x13); } } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0x5E) { u->jump_height = 4.2f; u->takeoff_frame = scale_game_frames(0x13); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 17.0f; u->target_anim_frame = 22.0f; u->jump_land_anim_frame = 40.0f; - u->unk48C = 4.3f; + u->jump_height_target = 4.3f; u->jump_height_start = 4.2f; u->jump_ramp_frames = scale_game_frames(0xF); u->jump_gravity = frame_time_sq * 30.0f; @@ -1060,32 +1060,32 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(((int)u->moby), x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -1100,11 +1100,11 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -1115,28 +1115,28 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -1156,17 +1156,17 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { @@ -1188,33 +1188,33 @@ int hero_set_state(int requested_state, int entry_animation_mode) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -1224,7 +1224,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { { struct Hero *w = &hero; w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1272,9 +1272,9 @@ int hero_set_state(int requested_state, int entry_animation_mode) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1614,7 +1614,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->state.control_mode = HERO_MODE_RUN; p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); - p->unk3B8 = 0; + p->move_along_stick = 0; if (entry_animation_mode) set_hero_animation(3, 0x12, (float)scale_game_frames(8)); break; @@ -1693,7 +1693,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { hero_base->ground_speed = planar_speed; if (frame_time * 1.5f < planar_speed) hero_base->ground_speed = frame_time * 1.5f; - hero_base->unk3B8 = 0; + hero_base->move_along_stick = 0; if (entry_animation_mode) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -1734,7 +1734,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; diff --git a/src/overlays/l15/hero/update_hero_motion_for_current_state.c b/src/overlays/l15/hero/update_hero_motion_for_current_state.c index d93b03032f..052877e685 100644 --- a/src/overlays/l15/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l15/hero/update_hero_motion_for_current_state.c @@ -109,7 +109,7 @@ void apply_hero_ground_type_effects(void) { } if (saved_ground_type == 0x9) { struct Hero *q = &hero; - *(char *)&q->unk12EE = 1; + *(char *)&q->grind_jump_block = 1; } if (saved_ground_type == 0xC) { struct Hero *q = &hero; @@ -902,8 +902,8 @@ void update_hero_motion_for_current_state(void) { fast_subtract_rotations(hero.motion.rot.f[1], old); stick_target(1.0f, 0); turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - hero.unk8EC = hero.motion.yaw_rate; - fast_dec_timer(&hero.unk8F4); + hero.swim_yaw_rate = hero.motion.yaw_rate; + fast_dec_timer(&hero.swim_thrust_timer); if (hero.state.step == 1) { hero.target_speed = frame_time * 6.0f; } else if (hero.state.current == 0x35) { @@ -1025,7 +1025,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.momentum); } adjust_hero_planar_velocity_from_probes(0); - t = hero.unk8EC * fast_cos(yaw) * -7.0f; + t = hero.swim_yaw_rate * fast_cos(yaw) * -7.0f; spring_angle(&hero.motion.rot.f[0], t, &hero.swim_lean_vel, @@ -1212,10 +1212,10 @@ void update_hero_motion_for_current_state(void) { f32 hit; f32 hit2; qcopy(&spatial_or_hit_descriptor_work, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &spatial_or_hit_descriptor_work); + hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &spatial_or_hit_descriptor_work); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); @@ -1230,7 +1230,7 @@ void update_hero_motion_for_current_state(void) { &hit2, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && hit > 0.0f) { hero.target_arrival_frames = hit; hero.state.step = 1; @@ -1271,7 +1271,7 @@ void update_hero_motion_for_current_state(void) { fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&spatial_or_hit_descriptor_work, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &spatial_or_hit_descriptor_work); + hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &spatial_or_hit_descriptor_work); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&motion_work_vector, &v10, &spatial_or_hit_descriptor_work); fast_vec_normalize(&motion_work_vector, &motion_work_vector, hero.tether_radius); @@ -1364,7 +1364,7 @@ void update_hero_motion_for_current_state(void) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.displacement, frame_time_sq * 40.0f); @@ -1410,9 +1410,9 @@ void update_hero_motion_for_current_state(void) { old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - old; if (fast_vec_length(&vC0) > hero.swing_rope_length) { @@ -1441,7 +1441,7 @@ void update_hero_motion_for_current_state(void) { f32 t; s32 up; hero.swing_entry_push = 0; - t = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + t = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -1907,11 +1907,11 @@ void update_hero_motion_for_current_state(void) { emit_hero_randomized_motion_effects(5, 2); } if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { @@ -1970,7 +1970,7 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -2065,7 +2065,7 @@ void update_hero_motion_for_current_state(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0, 0.0f, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2307,7 +2307,7 @@ void update_hero_motion_for_current_state(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -2827,7 +2827,7 @@ void update_hero_motion_for_current_state(void) { AN.f12F8 = a * 0.25f; AN.f13A8 = a * 0.57f; } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -2915,7 +2915,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l15/hero/update_hero_state_machine.c b/src/overlays/l15/hero/update_hero_state_machine.c index e500fdfced..e493fced51 100644 --- a/src/overlays/l15/hero/update_hero_state_machine.c +++ b/src/overlays/l15/hero/update_hero_state_machine.c @@ -174,9 +174,10 @@ void update_hero_state_machine(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && D_L15_0015F594 == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0) && + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0) && (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT || hero.vehicle_mode == 3)) { int id; @@ -345,7 +346,7 @@ void update_hero_state_machine(void) { int anim = D_L15_0017A0C0[id].anim; if (((unsigned char *)hero.moby)[0x53] != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -677,7 +678,7 @@ void update_hero_state_machine(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -686,7 +687,7 @@ void update_hero_state_machine(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (((unsigned char *)hero.moby)[0x53] == 0x36) { @@ -925,7 +926,7 @@ void update_hero_state_machine(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -1074,7 +1075,7 @@ void update_hero_state_machine(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -1125,7 +1126,7 @@ void update_hero_state_machine(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -1824,7 +1825,7 @@ void update_hero_state_machine(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -1840,7 +1841,7 @@ void update_hero_state_machine(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -1868,7 +1869,7 @@ void update_hero_state_machine(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l16/hero/apply_hero_ground_material_effects.c b/src/overlays/l16/hero/apply_hero_ground_material_effects.c index 9041866ef0..49bfebe5db 100644 --- a/src/overlays/l16/hero/apply_hero_ground_material_effects.c +++ b/src/overlays/l16/hero/apply_hero_ground_material_effects.c @@ -121,7 +121,7 @@ void apply_hero_ground_material_effects(void) { } if (saved_ground_type == 0x9) { struct Hero *q = &hero; - q->unk12EE = 1; + q->grind_jump_block = 1; } if (saved_ground_type == 0xC) { struct Hero *q = &hero; @@ -334,7 +334,7 @@ void update_hero_ground_contact(void) { break; } hero.ground_pitch.i = 0; - hero.unk2E8.i = 0; + hero.ground_roll.i = 0; hero.side_probe_roll.i[0] = 0; hero.side_probe_roll.i[1] = 0; hero.side_probe_pitch.i[0] = 0; @@ -354,7 +354,7 @@ void update_hero_ground_contact(void) { hero.ground_pitch.f = ground_offset_or_angles.f[1]; } if (-0.78539819f < ground_offset_or_angles.f[0] && ground_offset_or_angles.f[0] < 0.78539819f) { - hero.unk2E8.f = ground_offset_or_angles.f[0]; + hero.ground_roll.f = ground_offset_or_angles.f[0]; } for (i = 0; i < 2; i++) { side_probe_angle = 1.5707964f; @@ -384,7 +384,7 @@ void update_hero_ground_contact(void) { } else { hero.side_probe_drop.i[i] = 0; hero.side_probe_pitch.f[i] = hero.ground_pitch.f; - hero.side_probe_roll.f[i] = hero.unk2E8.f; + hero.side_probe_roll.f[i] = hero.ground_roll.f; } } } @@ -429,9 +429,9 @@ s32 resolve_hero_position_collisions(s32 mode) { transform_hero_local_offset_to_world(&collision_position_offset, 0.0f, 0.0f, 0.7f); fast_vec_sub( &collision_position_offset, &collision_position_offset, &hero.motion.pos.q); - } else if (hero.gravity_mode != HERO_GRAVITY_WORLD_DOWN || hero.unk1F8 != 0) { - if (hero.gravity_mode == HERO_GRAVITY_OPPOSITE_GROUND_NORMAL || hero.unk1F8 != 0 || - (unsigned)(hero.state.control_mode - 0x15) < 2) { + } else if (hero.gravity_mode != HERO_GRAVITY_WORLD_DOWN || hero.magnet_walk_timer != 0) { + if (hero.gravity_mode == HERO_GRAVITY_OPPOSITE_GROUND_NORMAL || + hero.magnet_walk_timer != 0 || (unsigned)(hero.state.control_mode - 0x15) < 2) { add_hero_up_offset(&collision_position_offset, &collision_position_offset, 0.6f); } else { add_hero_gravity_offset( diff --git a/src/overlays/l16/hero/hero_set_state.c b/src/overlays/l16/hero/hero_set_state.c index 0bf560f7f1..b3148e3c17 100644 --- a/src/overlays/l16/hero/hero_set_state.c +++ b/src/overlays/l16/hero/hero_set_state.c @@ -131,7 +131,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); @@ -251,7 +251,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } else { - p->unk8F4 = scale_game_frames(0x2D); + p->swim_thrust_timer = scale_game_frames(0x2D); } { struct Hero *q = &hero; @@ -270,7 +270,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = HERO_MODE_SWIM; p->camera_mode = 0xB; p->item_select_blocked = 1; - p->unk8F4 = scale_game_frames(0x3C); + p->swim_thrust_timer = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; @@ -489,7 +489,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = 0x16; p->camera_mode = 8; p->item_select_blocked = 1; - p->unk20B2 = 1; + p->on_hoverboard = 1; p->board_jump_frames = 0; p->hoverboard_airborne = 0; if (p->state.prev == 0x6D || p->state.prev == 0x6F || p->state.prev == 0x6E) { @@ -662,7 +662,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -671,7 +671,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_idle_animation_index(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -680,7 +680,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -729,7 +729,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -938,7 +938,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -947,14 +947,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], @@ -1012,12 +1012,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->grind_anim_variant = 0; if (p->state.prev_control_mode != HERO_MODE_GRIND) { p->grind_pose = -1; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; p->grind_base_speed = 0.0f; } - p->unk5B4 = 0; - p->unk5B8 = 0; - p->unk5BC = 0; + p->rail_swing_target = 0; + p->rail_jump_armed = 0; + p->rail_jump_trigger = 0; p->rail_jump_queued = 0; seg = p->rail_segment; t = p->rail_seg_frac; @@ -1054,10 +1054,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (animation_update_mode) { @@ -1224,53 +1224,53 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; - u->unk48C = 1.98f; + u->jump_height_target = 1.98f; u->jump_height = 1.95f; } else { gravity_set_z( @@ -1291,11 +1291,11 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0x29) { u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.45f; + u->jump_height_target = 2.45f; u->jump_height_start = 2.4f; u->jump_ramp_frames = scale_game_frames(0x11); u->state.control_mode = HERO_MODE_GRIND; @@ -1306,7 +1306,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { *(u128 *)vec = 0; u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; - u->unk48C = u->unk48C + k; + u->jump_height_target = u->jump_height_target + k; u->jump_gravity = frame_time_sq * 14.0f; vec[0] = 331.0f; vec[1] = 104.0f; @@ -1315,17 +1315,17 @@ int hero_set_state(int requested_state, int animation_update_mode) { k = 0.7f; u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; - u->unk48C = u->unk48C + k; + u->jump_height_target = u->jump_height_target + k; } } } else if (u->state.current == 0x2A) { u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.55f; + u->jump_height_target = 2.55f; u->jump_height_start = 2.5f; u->jump_ramp_frames = scale_game_frames(0xA); u->state.control_mode = HERO_MODE_GRIND; @@ -1334,46 +1334,46 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(((int)u->moby), x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -1388,11 +1388,11 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -1403,28 +1403,28 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -1444,17 +1444,17 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { @@ -1476,33 +1476,33 @@ int hero_set_state(int requested_state, int animation_update_mode) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -1512,7 +1512,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *w = &hero; w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1567,9 +1567,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1905,7 +1905,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { hero_base->ground_speed = planar_speed; if (frame_time * 1.5f < planar_speed) hero_base->ground_speed = frame_time * 1.5f; - hero_base->unk3B8 = 0; + hero_base->move_along_stick = 0; if (animation_update_mode) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -1946,7 +1946,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; diff --git a/src/overlays/l16/hero/update_hero_motion_for_current_state.c b/src/overlays/l16/hero/update_hero_motion_for_current_state.c index 1b618e6589..8885e6de87 100644 --- a/src/overlays/l16/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l16/hero/update_hero_motion_for_current_state.c @@ -625,8 +625,8 @@ void update_hero_motion_for_current_state(void) { swim_roll_delta = fast_subtract_rotations(hero.motion.rot.f[1], old); stick_target(1.0f, 0); turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - hero.unk8EC = hero.motion.yaw_rate; - fast_dec_timer(&hero.unk8F4); + hero.swim_yaw_rate = hero.motion.yaw_rate; + fast_dec_timer(&hero.swim_thrust_timer); if (hero.state.step == 1) { hero.target_speed = frame_time * 6.0f; } else if (hero.state.current == 0x35) { @@ -745,7 +745,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.momentum); } clip_hero_horizontal_velocity(0); - t = hero.unk8EC * fast_cos(yaw) * -7.0f; + t = hero.swim_yaw_rate * fast_cos(yaw) * -7.0f; spring_angle(&hero.motion.rot.f[0], t, &hero.swim_lean_vel, @@ -1321,7 +1321,8 @@ void update_hero_motion_for_current_state(void) { clear_u64_value(&hero.motion.velocity); step_angle_toward_target(&hero.motion.rot.f[1], 0.0f, 0, frame_time * 6.108652f); step_angle_toward_target(&hero.motion.rot.f[0], 0.0f, 0, frame_time * 6.108652f); - step_angle_toward_target(&hero.motion.rot.f[2], hero.unk8A4, 0, frame_time * 8.726646f); + step_angle_toward_target( + &hero.motion.rot.f[2], hero.wall_face_yaw, 0, frame_time * 8.726646f); break; case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { s32 anim = -1; @@ -1379,10 +1380,10 @@ void update_hero_motion_for_current_state(void) { f32 hit; f32 hit2; qcopy(&primary_vector_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &primary_vector_scratch); + hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &primary_vector_scratch); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); @@ -1397,7 +1398,7 @@ void update_hero_motion_for_current_state(void) { &hit2, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && hit > 0.0f) { hero.target_arrival_frames = hit; hero.state.step = 1; @@ -1435,7 +1436,7 @@ void update_hero_motion_for_current_state(void) { fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&primary_vector_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &primary_vector_scratch); + hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &primary_vector_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&vector_scratch, &v10, &primary_vector_scratch); fast_vec_normalize(&vector_scratch, &vector_scratch, hero.tether_radius); @@ -1525,7 +1526,7 @@ void update_hero_motion_for_current_state(void) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.displacement, frame_time_sq * 40.0f); @@ -1573,9 +1574,9 @@ void update_hero_motion_for_current_state(void) { old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - old; if (fast_vec_length(&vC0) > hero.swing_rope_length) { @@ -1605,7 +1606,7 @@ void update_hero_motion_for_current_state(void) { f32 t; s32 up; hero.swing_entry_push = 0; - t = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + t = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -2098,11 +2099,11 @@ void update_hero_motion_for_current_state(void) { emit_hero_randomized_motion_effects(5, 2); } if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { @@ -2161,7 +2162,7 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -2316,7 +2317,7 @@ void update_hero_motion_for_current_state(void) { &hero.prev_rail_point, &hero.prev_rail_segment, &hero.prev_rail_seg_frac, - hero.unk5A0, + hero.prev_rail_spline_loops, 999.0f, 2.0f, 2.5f); @@ -2336,7 +2337,7 @@ void update_hero_motion_for_current_state(void) { hero.rail_off_frames++; break; } - r = hero.unk574 * (f32)hero.grind_direction; + r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { r = hero.unk5CC * (f32)hero.grind_direction; } @@ -2352,7 +2353,7 @@ void update_hero_motion_for_current_state(void) { &hero.prev_rail_segment, &hero.prev_rail_seg_frac, r, - hero.unk5A0); + hero.prev_rail_spline_loops); } if (scale_game_frames(90) < hero.control_mode_timer) { s32 h; @@ -2579,20 +2580,20 @@ void update_hero_motion_for_current_state(void) { hero.grind_pose = -1; } } - if (hero.unk5AC.f < sp) { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 8.0f); + if (hero.grind_speed_boost.f < sp) { + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 8.0f); } else { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 2.0f); + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 2.0f); } - if (hero.unk5AC.f > frame_time * 12.0f) { - hero.unk5AC.f = frame_time * 12.0f; + if (hero.grind_speed_boost.f > frame_time * 12.0f) { + hero.grind_speed_boost.f = frame_time * 12.0f; } - if (hero.unk5AC.f < D_0015ED6C_a * -2.5f) { - hero.unk5AC.f = D_0015ED6C_a * -2.5f; + if (hero.grind_speed_boost.f < D_0015ED6C_a * -2.5f) { + hero.grind_speed_boost.f = D_0015ED6C_a * -2.5f; } - hero.unk574 = hero.grind_base_speed + hero.unk5AC.f; - if (hero.unk574 < 0.0f) { - hero.unk574 = 0.0f; + hero.grind_speed = hero.grind_base_speed + hero.grind_speed_boost.f; + if (hero.grind_speed < 0.0f) { + hero.grind_speed = 0.0f; } fast_vec_sub(&hero.motion.velocity, &primary_vector_scratch, &hero.rail_point); fast_vec_sub(&auxiliary_vector_scratch, &hero.rail_point, &hero.motion.pos); @@ -2649,7 +2650,7 @@ void update_hero_motion_for_current_state(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0.0f, 0, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2887,7 +2888,7 @@ void update_hero_motion_for_current_state(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -3176,7 +3177,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l16/hero/update_hero_state_transitions.c b/src/overlays/l16/hero/update_hero_state_transitions.c index 3ccb3e38e0..3a047018dc 100644 --- a/src/overlays/l16/hero/update_hero_state_transitions.c +++ b/src/overlays/l16/hero/update_hero_state_transitions.c @@ -197,9 +197,10 @@ void update_hero_state_transitions(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && D_L16_0015F594 == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0) && + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0) && (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT || hero.vehicle_mode == 3)) { int id; @@ -370,7 +371,7 @@ void update_hero_state_transitions(void) { int anim = D_L16_00179F20[id].anim; if (((unsigned char *)hero.moby)[0x53] != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -713,7 +714,7 @@ void update_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -722,7 +723,7 @@ void update_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (((unsigned char *)hero.moby)[0x53] == 0x36) { @@ -973,7 +974,7 @@ void update_hero_state_transitions(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -998,7 +999,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 1); break; } - hero.unk1F8 = scale_game_frames(0x28); + hero.magnet_walk_timer = scale_game_frames(0x28); if (absolute_float(hero.motion.rot.f[1]) > 0.7853982f || absolute_float(hero.motion.rot.f[0]) > 0.7853982f) { hero.ledge_probe_cooldown = scale_game_frames(0x28); @@ -1153,7 +1154,7 @@ void update_hero_state_transitions(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -1205,7 +1206,7 @@ void update_hero_state_transitions(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -1298,9 +1299,9 @@ void update_hero_state_transitions(void) { 3.1415927f); ang = fast_add_rotations(ang, randf_sym(0.5235988f, 0.61086524f)); hero.motion.resolved_velocity.f[0] = - fast_cos(ang) * hero.unk574 * 0.7f; + fast_cos(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[1] = - fast_sin(ang) * hero.unk574 * 0.7f; + fast_sin(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[2] = frame_time * 4.5f; } if (scale_game_frames(0xF) < hero.rail_off_frames && @@ -1308,7 +1309,7 @@ void update_hero_state_transitions(void) { hero.health.hp = 2; } hero_set_state(HERO_STATE_HURT, 1); - hero.unk1C8 = scale_game_frames(0x46); + hero.grind_catch_lockout = scale_game_frames(0x46); break; } } @@ -1327,7 +1328,7 @@ void update_hero_state_transitions(void) { } if (can) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { - if (hero.unk5B8 != 0) { + if (hero.rail_jump_armed != 0) { hero.rail_jump_queued = 1; break; } @@ -1340,7 +1341,7 @@ void update_hero_state_transitions(void) { hero.move_lock_timer = scale_game_frames(0x46); } hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { @@ -1358,7 +1359,7 @@ void update_hero_state_transitions(void) { set_hero_animation(a, 0, scale_game_frames(0xC)); } } - if (hero.unk5BC != 0) { + if (hero.rail_jump_trigger != 0) { if (hero.rail_jump_queued != 0) { float rail_jump_solution_z; float t; @@ -1375,14 +1376,14 @@ void update_hero_state_transitions(void) { v1[2] = rail_jump_solution_z; t = calculate_triangular_corrected_scalar( v0, v1, 0, hero.jump_gravity); - hero.unk48C = t + 0.05f; + hero.jump_height_target = t + 0.05f; hero.jump_height = t; hero.jump_gravity = hero.rail_jump_gravity; hero.jump_height_start = t; } } - hero.unk5B8 = 0; - hero.unk5BC = 0; + hero.rail_jump_armed = 0; + hero.rail_jump_trigger = 0; } else if (hero.state.current == 0x2B) { if (pad_pressed_within(0x40, scale_game_frames(5), 0) && hero.anim_frame >= (float)D_L16_0017C088[hero.attack_record].f14) { @@ -1408,7 +1409,7 @@ void update_hero_state_transitions(void) { } if (scale_game_frames(5) < hero.rail_off_frames) { hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); } } else if (hero.state.current == 0x29 || hero.state.current == 0x2A) { if ((scale_game_frames(5) < hero.rail_off_frames || @@ -1420,7 +1421,7 @@ void update_hero_state_transitions(void) { } if (hero.state.current == 0x29 && hero.state_timer < scale_game_frames(0xA) && hero.past_jump_apex == 0 && - hero.unk12EE == 0 && hero.stick_magnitude > 0.5f && + hero.grind_jump_block == 0 && hero.stick_magnitude > 0.5f && hero.rail_switching == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( @@ -1472,7 +1473,7 @@ void update_hero_state_transitions(void) { hero.transfer_from_spline = hero.rail_spline; hero.prev_rail_segment = hero.rail_segment; hero.prev_rail_seg_frac = hero.rail_seg_frac; - hero.unk5A0 = hero.rail_spline_loops; + hero.prev_rail_spline_loops = hero.rail_spline_loops; qcopy(hero.prev_rail_point.f, hero.rail_point.f); hero.rail_spline = new_path; hero.rail_spline_loops = new_loop; @@ -1552,7 +1553,7 @@ void update_hero_state_transitions(void) { if (-0.5f > hero.motion.pos.f[2] - hero.rail_point.f[2]) { hero_set_state(HERO_STATE_FALL, 1); hero.move_lock_timer = scale_game_frames(0x46); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } } @@ -2257,7 +2258,7 @@ void update_hero_state_transitions(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -2273,7 +2274,7 @@ void update_hero_state_transitions(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -2301,7 +2302,7 @@ void update_hero_state_transitions(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l17/hero/hero_set_state.c b/src/overlays/l17/hero/hero_set_state.c index 878bd1becf..90f7219851 100644 --- a/src/overlays/l17/hero/hero_set_state.c +++ b/src/overlays/l17/hero/hero_set_state.c @@ -143,7 +143,7 @@ int hero_set_state(int requested_state, int b) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail.pos[0]); @@ -268,7 +268,7 @@ int hero_set_state(int requested_state, int b) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } else { - p->unk8F4 = scale_game_frames(0x2D); + p->swim_thrust_timer = scale_game_frames(0x2D); } { struct Hero *q = &hero; @@ -287,7 +287,7 @@ int hero_set_state(int requested_state, int b) { p->state.control_mode = HERO_MODE_SWIM; p->camera_mode = 0xB; p->item_select_blocked = 1; - p->unk8F4 = scale_game_frames(0x3C); + p->swim_thrust_timer = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; @@ -529,7 +529,7 @@ int hero_set_state(int requested_state, int b) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(select_hero_help_value(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -538,7 +538,7 @@ int hero_set_state(int requested_state, int b) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(select_hero_help_value(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -547,7 +547,7 @@ int hero_set_state(int requested_state, int b) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -593,7 +593,7 @@ int hero_set_state(int requested_state, int b) { t->ground_speed = frame_time * 7.7f; t->motion.velocity.f[2] = 0.0f; FUN_L00_0025f730(&t->motion.velocity, frame_time * 7.7f); - t->unk3B4.i = 0; + t->prev_ground_pitch.i = 0; t->state.current = 0x2F; set_hero_animation(0x37, 0, (float)scale_game_frames(8)); } else if (t->wading != 0 || t->state.current == 0x73) { @@ -605,7 +605,7 @@ int hero_set_state(int requested_state, int b) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -817,7 +817,7 @@ int hero_set_state(int requested_state, int b) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -826,14 +826,14 @@ int hero_set_state(int requested_state, int b) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], @@ -890,16 +890,16 @@ int hero_set_state(int requested_state, int b) { p->rail_off_frames = 0; p->grind_anim_variant = 0; if (p->state.prev_control_mode != HERO_MODE_GRIND) { - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; p->grind_pose = -1; p->grind_base_speed = 0.0f; } t = p->rail_seg_frac; i = p->rail_segment; f = t; - p->unk5B4 = 0; - p->unk5B8 = 0; - p->unk5BC = 0; + p->rail_swing_target = 0; + p->rail_jump_armed = 0; + p->rail_jump_trigger = 0; p->rail_jump_queued = 0; sample_path(p->rail_spline, (char *)&sampled_path_position, @@ -943,7 +943,7 @@ int hero_set_state(int requested_state, int b) { p->item_select_blocked = 1; p->rand_timer.range = 0x68; p->follow_path_end_frames = 0; - p->unk618.i = 0; + p->follow_path_pull_speed.i = 0; t = p->rail_candidate_frac; i = p->follow_path_segment; f = t; @@ -969,10 +969,10 @@ int hero_set_state(int requested_state, int b) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (b) { @@ -1145,53 +1145,53 @@ int hero_set_state(int requested_state, int b) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; - u->unk48C = 1.98f; + u->jump_height_target = 1.98f; u->jump_height = 1.95f; } else { gravity_set_z( @@ -1212,11 +1212,11 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0x3C) { u->jump_height = 5.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 26.0f; u->jump_land_anim_frame = 13.0f; - u->unk48C = 5.55f; + u->jump_height_target = 5.55f; u->jump_height_start = 5.5f; u->jump_ramp_frames = scale_game_frames(2); u->jump_max_frames = scale_game_frames(0x78); @@ -1256,22 +1256,22 @@ int hero_set_state(int requested_state, int b) { struct Hero *w = &hero; w->jump_height = v + 1.7f; w->takeoff_frame = scale_game_frames(5); - w->unk434 = 0.6f; + w->air_capsule_bottom = 0.6f; w->apex_anim_frame = 18.0f; w->target_anim_frame = 30.0f; w->jump_land_anim_frame = 12.0f; - w->unk48C = v + 1.75f; + w->jump_height_target = v + 1.75f; w->jump_height_start = v + 1.7f; w->jump_ramp_frames = scale_game_frames(0x13); } } else if (u->state.current == 0x29) { u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.45f; + u->jump_height_target = 2.45f; u->jump_height_start = 2.4f; u->jump_ramp_frames = scale_game_frames(0x11); u->jump_gravity = frame_time_sq * 27.0f; @@ -1281,7 +1281,7 @@ int hero_set_state(int requested_state, int b) { float h = 4.7f; u->jump_height += h; u->jump_height_start += h; - u->unk48C += h; + u->jump_height_target += h; u->jump_gravity = frame_time_sq * 14.0f; d.q = 0; d.v.x = 331.0f; @@ -1291,17 +1291,17 @@ int hero_set_state(int requested_state, int b) { h = 0.7f; u->jump_height += h; u->jump_height_start += h; - u->unk48C += h; + u->jump_height_target += h; } } } else if (u->state.current == 0x2A) { u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.55f; + u->jump_height_target = 2.55f; u->jump_height_start = 2.5f; u->jump_ramp_frames = scale_game_frames(0xA); u->jump_gravity = frame_time_sq * 24.0f; @@ -1310,25 +1310,25 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0x49) { u->jump_height = 1.3f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 27.0f; u->jump_land_anim_frame = 27.0f; - u->unk48C = 1.35f; + u->jump_height_target = 1.35f; u->jump_height_start = 1.3f; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_gravity = frame_time_sq * 25.0f; @@ -1337,32 +1337,32 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(((int)u->moby), x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -1377,11 +1377,11 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -1392,11 +1392,11 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0x4C) { u->jump_height = 1.55f; u->takeoff_frame = scale_game_frames(0xD); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 10.0f; u->target_anim_frame = 18.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 1.59f; + u->jump_height_target = 1.59f; u->jump_height_start = 1.55f; u->jump_ramp_frames = scale_game_frames(1); u->jump_gravity = frame_time_sq * 28.0f; @@ -1404,28 +1404,28 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -1445,17 +1445,17 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { @@ -1477,33 +1477,33 @@ int hero_set_state(int requested_state, int b) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -1513,7 +1513,7 @@ int hero_set_state(int requested_state, int b) { { struct Hero *w = &hero; *(int *)&w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1576,9 +1576,9 @@ int hero_set_state(int requested_state, int b) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1960,7 +1960,7 @@ int hero_set_state(int requested_state, int b) { p->health.hp = 0; p->collision_off_frames = 0x2710; p->sink_surface_z = p->ground_z.f; - m = ((char *)p->unkA88); + m = ((char *)p->base_moby); qcopy(m + 0x10, &p->motion.pos); allocate_voice_for_target_entry(9, 0, (int)m); if (b) @@ -2042,7 +2042,7 @@ int hero_set_state(int requested_state, int b) { q->ground_speed = 0.0f; if (q->state.prev_control_mode == HERO_MODE_IDLE) q->ground_speed = vector_length_xy(&q->motion.momentum); - q->unk3B8 = 0; + q->move_along_stick = 0; if (b) set_hero_animation(2, 0, (float)scale_game_frames(8)); } @@ -2063,10 +2063,10 @@ int hero_set_state(int requested_state, int b) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 12.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } if (b) set_hero_animation(8, 0x12, (float)(scale_game_frames(7) + 2)); @@ -2146,7 +2146,7 @@ int hero_set_state(int requested_state, int b) { g->ground_speed = r; if (frame_time * 1.5f < r) g->ground_speed = frame_time * 1.5f; - g->unk3B8 = 0; + g->move_along_stick = 0; if (b) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -2187,7 +2187,7 @@ int hero_set_state(int requested_state, int b) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; diff --git a/src/overlays/l17/hero/process_hero_hit_response.c b/src/overlays/l17/hero/process_hero_hit_response.c index 27af9300af..1522ad5ab9 100644 --- a/src/overlays/l17/hero/process_hero_hit_response.c +++ b/src/overlays/l17/hero/process_hero_hit_response.c @@ -234,7 +234,7 @@ void update_hero_smoothing(void) { } if (hero.state.control_mode == HERO_MODE_JUMP) { if (hero.state_timer > hero.takeoff_frame && hero.past_jump_apex == 0) - hero.capsule_bottom_target = hero.unk434; + hero.capsule_bottom_target = hero.air_capsule_bottom; } else if (hero.state.current == HERO_STATE_FALL) { hero.capsule_bottom_target = 0.5f; } else if (hero.state.current == HERO_STATE_CROUCH) { diff --git a/src/overlays/l17/hero/update_hero_motion_for_current_state.c b/src/overlays/l17/hero/update_hero_motion_for_current_state.c index 97a50d290a..dc3509562d 100644 --- a/src/overlays/l17/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l17/hero/update_hero_motion_for_current_state.c @@ -623,8 +623,8 @@ void update_hero_motion_for_current_state(void) { fast_subtract_rotations(hero.motion.rot.f[1], old); stick_target(1.0f, 0); turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - hero.unk8EC = hero.motion.yaw_rate; - fast_dec_timer(&hero.unk8F4); + hero.swim_yaw_rate = hero.motion.yaw_rate; + fast_dec_timer(&hero.swim_thrust_timer); if (hero.state.step == 1) { hero.target_speed = frame_time * 6.0f; } else if (hero.state.current == 0x35) { @@ -736,7 +736,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.momentum); } adjust_hero_velocity_from_collision_probes(0); - t = hero.unk8EC * fast_cos(yaw) * -7.0f; + t = hero.swim_yaw_rate * fast_cos(yaw) * -7.0f; spring_angle(&hero.motion.rot.f[0], t, &hero.swim_lean_vel, @@ -941,10 +941,10 @@ void update_hero_motion_for_current_state(void) { f32 hit; f32 hit2; qcopy(&scratch_vector, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &scratch_vector); + hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &scratch_vector); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); @@ -959,7 +959,7 @@ void update_hero_motion_for_current_state(void) { &hit2, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && hit > 0.0f) { hero.target_arrival_frames = hit; hero.state.step = 1; @@ -996,7 +996,7 @@ void update_hero_motion_for_current_state(void) { fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&scratch_vector, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &scratch_vector); + hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &scratch_vector); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&temporary_vector, &v10, &scratch_vector); fast_vec_normalize(&temporary_vector, &temporary_vector, hero.tether_radius); @@ -1083,7 +1083,7 @@ void update_hero_motion_for_current_state(void) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.displacement, frame_time_sq * 40.0f); @@ -1129,9 +1129,9 @@ void update_hero_motion_for_current_state(void) { old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - old; if (fast_vec_length(&vC0) > hero.swing_rope_length) { @@ -1160,7 +1160,7 @@ void update_hero_motion_for_current_state(void) { f32 t; s32 up; hero.swing_entry_push = 0; - t = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + t = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -1697,11 +1697,11 @@ void update_hero_motion_for_current_state(void) { emit_hero_randomized_motion_effects(5, 2); } if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { @@ -1760,7 +1760,7 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -1960,7 +1960,7 @@ void update_hero_motion_for_current_state(void) { &hero.prev_rail_point, &hero.prev_rail_segment, &hero.prev_rail_seg_frac, - hero.unk5A0, + hero.prev_rail_spline_loops, 999.0f, 2.0f, 2.5f); @@ -1980,7 +1980,7 @@ void update_hero_motion_for_current_state(void) { hero.rail_off_frames++; break; } - r = hero.unk574 * (f32)hero.grind_direction; + r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { r = hero.unk5CC * (f32)hero.grind_direction; } @@ -1996,7 +1996,7 @@ void update_hero_motion_for_current_state(void) { &hero.prev_rail_segment, &hero.prev_rail_seg_frac, r, - hero.unk5A0); + hero.prev_rail_spline_loops); } if (scale_game_frames(90) < hero.control_mode_timer) { s32 h; @@ -2216,20 +2216,20 @@ void update_hero_motion_for_current_state(void) { hero.grind_pose = -1; } } - if (hero.unk5AC.f < sp) { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 8.0f); + if (hero.grind_speed_boost.f < sp) { + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 8.0f); } else { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 2.0f); + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 2.0f); } - if (hero.unk5AC.f > frame_time * 12.0f) { - hero.unk5AC.f = frame_time * 12.0f; + if (hero.grind_speed_boost.f > frame_time * 12.0f) { + hero.grind_speed_boost.f = frame_time * 12.0f; } - if (hero.unk5AC.f < D_0015ED6C_a * -2.5f) { - hero.unk5AC.f = D_0015ED6C_a * -2.5f; + if (hero.grind_speed_boost.f < D_0015ED6C_a * -2.5f) { + hero.grind_speed_boost.f = D_0015ED6C_a * -2.5f; } - hero.unk574 = hero.grind_base_speed + hero.unk5AC.f; - if (hero.unk574 < 0.0f) { - hero.unk574 = 0.0f; + hero.grind_speed = hero.grind_base_speed + hero.grind_speed_boost.f; + if (hero.grind_speed < 0.0f) { + hero.grind_speed = 0.0f; } fast_vec_sub(&hero.motion.velocity, &scratch_vector, &hero.rail_point); fast_vec_sub(&vector_workspace, &hero.rail_point, &hero.motion.pos); @@ -2343,17 +2343,18 @@ void update_hero_motion_for_current_state(void) { f32 len; fl = -fast_vec_length(&vector_workspace); vendor_spring(&fl, - &hero.unk618.f, + &hero.follow_path_pull_speed.f, 0.0f, frame_scale_sq * 0.05f, frame_scale_sq * 0.3f, frame_time * 10.0f); len = fast_vec_length(&vector_workspace); - if (len < hero.unk618.f) { - hero.unk618.f = len; + if (len < hero.follow_path_pull_speed.f) { + hero.follow_path_pull_speed.f = len; } - if (hero.unk618.f < len) { - fast_vec_normalize(&vector_workspace, &vector_workspace, hero.unk618.f); + if (hero.follow_path_pull_speed.f < len) { + fast_vec_normalize( + &vector_workspace, &vector_workspace, hero.follow_path_pull_speed.f); } fast_vec_add(&hero.motion.pos, &hero.motion.pos, &vector_workspace); } @@ -2366,7 +2367,7 @@ void update_hero_motion_for_current_state(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0, 0.0f, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_ALT_LEDGE_HANG_ENTRY: case HERO_STATE_ALT_LEDGE_HANG: @@ -2374,7 +2375,7 @@ void update_hero_motion_for_current_state(void) { turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.2f, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 1.7f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2617,7 +2618,7 @@ void update_hero_motion_for_current_state(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -2653,7 +2654,7 @@ void update_hero_motion_for_current_state(void) { hero.state.current != HERO_STATE_PACK_LONG_JUMP && hero.state.current != 0xC && hero.state.current != 0x11 && hero.state.current != 0x1C && hero.state.current != 0x4C)) { - if (hero.unk4A8 != 0) { + if (hero.took_off_from_ice != 0) { update_hero_planar_movement_velocity(); if (hero.state.current == HERO_STATE_PACK_JUMP && hero.state_timer < scale_game_frames(10) && @@ -3013,7 +3014,7 @@ void update_hero_motion_for_current_state(void) { 0, frame_scale_sq * 0.008f * g, frame_scale_sq * 0.15f, frame_time * 9.948377f * g); } speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -3157,7 +3158,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/l17/hero/update_hero_state_transitions.c b/src/overlays/l17/hero/update_hero_state_transitions.c index 840b3ad45a..9b2fd30ea4 100644 --- a/src/overlays/l17/hero/update_hero_state_transitions.c +++ b/src/overlays/l17/hero/update_hero_state_transitions.c @@ -200,9 +200,10 @@ void update_hero_state_transitions(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && D_L17_0015F594 == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0)) { + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0)) { switch (hero.vehicle_mode) { case HERO_VEHICLE_MODE_ON_FOOT: case 3: { @@ -390,7 +391,7 @@ void update_hero_state_transitions(void) { int anim = D_L17_0017A3C0[id].anim; if (((unsigned char *)hero.moby)[0x53] != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -748,7 +749,7 @@ void update_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -757,7 +758,7 @@ void update_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (((unsigned char *)hero.moby)[0x53] == 0x36) { @@ -1005,7 +1006,7 @@ void update_hero_state_transitions(void) { } } if (MOBY(moby)->prev_seq == 0x37) { - hero.anim_speed = (1.0f - hero.unk3B0) * 2.0f; + hero.anim_speed = (1.0f - hero.run_speed_ratio) * 2.0f; if (hero.anim_speed > 1.7f) { hero.anim_speed = 1.7f; } @@ -1062,7 +1063,7 @@ void update_hero_state_transitions(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -1125,7 +1126,7 @@ void update_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 1); break; } - hero.unk1F8 = scale_game_frames(0x28); + hero.magnet_walk_timer = scale_game_frames(0x28); if (absolute_float(hero.motion.rot.f[1]) > 0.7853982f || absolute_float(hero.motion.rot.f[0]) > 0.7853982f) { hero.ledge_probe_cooldown = scale_game_frames(0x28); @@ -1279,7 +1280,7 @@ void update_hero_state_transitions(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -1330,7 +1331,7 @@ void update_hero_state_transitions(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -1427,9 +1428,9 @@ void update_hero_state_transitions(void) { 3.1415927f); ang = fast_add_rotations(ang, randf_sym(0.5235988f, 0.61086524f)); hero.motion.resolved_velocity.f[0] = - fast_cos(ang) * hero.unk574 * 0.7f; + fast_cos(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[1] = - fast_sin(ang) * hero.unk574 * 0.7f; + fast_sin(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[2] = frame_time * 4.5f; } if (scale_game_frames(0xF) < hero.rail_off_frames && @@ -1437,7 +1438,7 @@ void update_hero_state_transitions(void) { hero.health.hp = 2; } hero_set_state(HERO_STATE_HURT, 1); - hero.unk1C8 = scale_game_frames(0x46); + hero.grind_catch_lockout = scale_game_frames(0x46); break; } } @@ -1456,7 +1457,7 @@ void update_hero_state_transitions(void) { } if (go) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { - if (hero.unk5B8 != 0) { + if (hero.rail_jump_armed != 0) { hero.rail_jump_queued = 1; break; } @@ -1469,7 +1470,7 @@ void update_hero_state_transitions(void) { hero.move_lock_timer = scale_game_frames(0x46); } hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { @@ -1487,7 +1488,7 @@ void update_hero_state_transitions(void) { set_hero_animation(a, 0, scale_game_frames(0xC)); } } - if (hero.unk5BC != 0) { + if (hero.rail_jump_trigger != 0) { if (hero.rail_jump_queued != 0) { float t; @@ -1506,11 +1507,11 @@ void update_hero_state_transitions(void) { hero.jump_height_start = t; hero.jump_gravity = hero.rail_jump_gravity; hero.jump_height = t; - hero.unk48C = t + 0.05f; + hero.jump_height_target = t + 0.05f; } } - hero.unk5B8 = 0; - hero.unk5BC = 0; + hero.rail_jump_armed = 0; + hero.rail_jump_trigger = 0; } else if (hero.state.current == 0x2B) { int n; @@ -1535,7 +1536,7 @@ void update_hero_state_transitions(void) { } if (scale_game_frames(5) < hero.rail_off_frames) { hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); } } else if (hero.state.current == 0x29 || hero.state.current == 0x2A) { if ((scale_game_frames(5) < hero.rail_off_frames || @@ -1547,7 +1548,7 @@ void update_hero_state_transitions(void) { } if (hero.state.current == 0x29 && hero.state_timer < scale_game_frames(0xA) && hero.past_jump_apex == 0 && - hero.unk12EE == 0 && hero.stick_magnitude > 0.5f && + hero.grind_jump_block == 0 && hero.stick_magnitude > 0.5f && hero.rail_switching == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( @@ -1598,7 +1599,7 @@ void update_hero_state_transitions(void) { hero.transfer_from_spline = hero.rail_spline; hero.prev_rail_segment = hero.rail_segment; hero.prev_rail_seg_frac = hero.rail_seg_frac; - hero.unk5A0 = hero.rail_spline_loops; + hero.prev_rail_spline_loops = hero.rail_spline_loops; qcopy(hero.prev_rail_point.f, hero.rail_point.f); hero.rail_spline = new_path; hero.rail_spline_loops = new_loop; @@ -1677,7 +1678,7 @@ void update_hero_state_transitions(void) { if (-0.5f > hero.motion.pos.f[2] - hero.rail_point.f[2]) { hero_set_state(HERO_STATE_FALL, 1); hero.move_lock_timer = scale_game_frames(0x46); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } } @@ -2413,7 +2414,7 @@ void update_hero_state_transitions(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -2429,7 +2430,7 @@ void update_hero_state_transitions(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -2457,7 +2458,7 @@ void update_hero_state_transitions(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l17/mobys/fighter_jet.c b/src/overlays/l17/mobys/fighter_jet.c index d19d346f91..378693dcbf 100644 --- a/src/overlays/l17/mobys/fighter_jet.c +++ b/src/overlays/l17/mobys/fighter_jet.c @@ -1992,7 +1992,7 @@ void fighter_jet_update(ShipMoby *moby) { ((ShipCamera *)g->moby)->unk98 = 0; FUN_L17_0021e530(0, 1); jet_end_mount(0); - set_animation_parameter(g->unk160C, 0); + set_animation_parameter(g->ship_hud_handle, 0); qcopy_nc(moby->pos, ship_vars->home_pos); qcopy_nc(moby->rot, ship_vars->home_rot); moby->scale = *(float *)(moby->pclass + 0x24); diff --git a/src/overlays/l18/hero/apply_hero_ground_type_effects.c b/src/overlays/l18/hero/apply_hero_ground_type_effects.c index c6d7d5f7e1..ac21447ab1 100644 --- a/src/overlays/l18/hero/apply_hero_ground_type_effects.c +++ b/src/overlays/l18/hero/apply_hero_ground_type_effects.c @@ -104,7 +104,7 @@ void apply_hero_ground_type_effects(void) { } if (saved_ground_type == 0x9) { struct Hero *q = &hero; - *(char *)&q->unk12EE = 1; + *(char *)&q->grind_jump_block = 1; } if (saved_ground_type == 0xC) { struct Hero *q = &hero; diff --git a/src/overlays/l18/hero/hero_set_state.c b/src/overlays/l18/hero/hero_set_state.c index a1ab7bc816..ac1fd93a84 100644 --- a/src/overlays/l18/hero/hero_set_state.c +++ b/src/overlays/l18/hero/hero_set_state.c @@ -117,7 +117,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail); @@ -208,7 +208,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } else { - p->unk8F4 = scale_game_frames(0x2D); + p->swim_thrust_timer = scale_game_frames(0x2D); } { struct Hero *q = &hero; @@ -227,7 +227,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = HERO_MODE_SWIM; p->camera_mode = 0xB; p->item_select_blocked = 1; - p->unk8F4 = scale_game_frames(0x3C); + p->swim_thrust_timer = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; @@ -473,7 +473,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -482,7 +482,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(get_hero_help_value(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -491,7 +491,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -540,7 +540,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -748,7 +748,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -757,14 +757,14 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan(q->swing_target_moby->pos.x - q->motion.pos.f[0], @@ -822,12 +822,12 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->grind_anim_variant = 0; if (p->state.prev_control_mode != HERO_MODE_GRIND) { p->grind_pose = -1; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; p->grind_base_speed = 0.0f; } - p->unk5B4 = 0; - p->unk5B8 = 0; - p->unk5BC = 0; + p->rail_swing_target = 0; + p->rail_jump_armed = 0; + p->rail_jump_trigger = 0; p->rail_jump_queued = 0; seg = p->rail_segment; t = p->rail_seg_frac; @@ -870,10 +870,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (animation_update_mode) { @@ -1042,53 +1042,53 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; - u->unk48C = 1.98f; + u->jump_height_target = 1.98f; u->jump_height = 1.95f; } else { gravity_set_z( @@ -1118,22 +1118,22 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *w = &hero; w->jump_height = v + 1.7f; w->takeoff_frame = scale_game_frames(5); - w->unk434 = 0.6f; + w->air_capsule_bottom = 0.6f; w->apex_anim_frame = 18.0f; w->target_anim_frame = 30.0f; w->jump_land_anim_frame = 12.0f; - w->unk48C = v + 1.75f; + w->jump_height_target = v + 1.75f; w->jump_height_start = v + 1.7f; w->jump_ramp_frames = scale_game_frames(0x13); } } else if (u->state.current == 0x29) { u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.45f; + u->jump_height_target = 2.45f; u->jump_height_start = 2.4f; u->jump_ramp_frames = scale_game_frames(0x11); u->state.control_mode = HERO_MODE_GRIND; @@ -1144,7 +1144,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { *(u128 *)grind_direction_or_jump_probe_position = 0; u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; - u->unk48C = u->unk48C + k; + u->jump_height_target = u->jump_height_target + k; u->jump_gravity = frame_time_sq * 14.0f; grind_direction_or_jump_probe_position[0] = 331.0f; grind_direction_or_jump_probe_position[1] = 104.0f; @@ -1154,17 +1154,17 @@ int hero_set_state(int requested_state, int animation_update_mode) { k = 0.7f; u->jump_height = u->jump_height + k; u->jump_height_start = u->jump_height_start + k; - u->unk48C = u->unk48C + k; + u->jump_height_target = u->jump_height_target + k; } } } else if (u->state.current == 0x2A) { u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.55f; + u->jump_height_target = 2.55f; u->jump_height_start = 2.5f; u->jump_ramp_frames = scale_game_frames(0xA); u->state.control_mode = HERO_MODE_GRIND; @@ -1173,25 +1173,25 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0x5E) { u->jump_height = 4.2f; u->takeoff_frame = scale_game_frames(0x13); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 17.0f; u->target_anim_frame = 22.0f; u->jump_land_anim_frame = 40.0f; - u->unk48C = 4.3f; + u->jump_height_target = 4.3f; u->jump_height_start = 4.2f; u->jump_ramp_frames = scale_game_frames(0xF); u->jump_gravity = frame_time_sq * 30.0f; @@ -1202,32 +1202,32 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(((int)u->moby), x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -1242,11 +1242,11 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -1257,28 +1257,28 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -1298,17 +1298,17 @@ int hero_set_state(int requested_state, int animation_update_mode) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { @@ -1330,33 +1330,33 @@ int hero_set_state(int requested_state, int animation_update_mode) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -1366,7 +1366,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { { struct Hero *w = &hero; w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -1425,9 +1425,9 @@ int hero_set_state(int requested_state, int animation_update_mode) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -1815,7 +1815,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = HERO_MODE_RUN; p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); - p->unk3B8 = 0; + p->move_along_stick = 0; if (animation_update_mode) set_hero_animation(3, 0x12, (float)scale_game_frames(8)); break; @@ -1894,7 +1894,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { hero_base->ground_speed = planar_speed; if (frame_time * 1.5f < planar_speed) hero_base->ground_speed = frame_time * 1.5f; - hero_base->unk3B8 = 0; + hero_base->move_along_stick = 0; if (animation_update_mode) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -1935,7 +1935,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; diff --git a/src/overlays/l18/hero/process_hero_state_transitions.c b/src/overlays/l18/hero/process_hero_state_transitions.c index ab86455b75..d80f073226 100644 --- a/src/overlays/l18/hero/process_hero_state_transitions.c +++ b/src/overlays/l18/hero/process_hero_state_transitions.c @@ -197,9 +197,10 @@ void process_hero_state_transitions(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && hero_triangle_hud_activation_inhibit == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0) && + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0) && (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT || hero.vehicle_mode == 3)) { int id; @@ -368,7 +369,7 @@ void process_hero_state_transitions(void) { int anim = D_L18_0017A4C0[id].anim; if (((unsigned char *)hero.moby)[0x53] != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -715,7 +716,7 @@ void process_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -724,7 +725,7 @@ void process_hero_state_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (((unsigned char *)hero.moby)[0x53] == 0x36) { @@ -970,7 +971,7 @@ void process_hero_state_transitions(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -1019,7 +1020,7 @@ void process_hero_state_transitions(void) { hero_set_state(HERO_STATE_FALL, 1); break; } - hero.unk1F8 = scale_game_frames(0x28); + hero.magnet_walk_timer = scale_game_frames(0x28); if (absolute_float(hero.motion.rot.f[1]) > 0.7853982f || absolute_float(hero.motion.rot.f[0]) > 0.7853982f) { hero.ledge_probe_cooldown = scale_game_frames(0x28); @@ -1171,7 +1172,7 @@ void process_hero_state_transitions(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -1222,7 +1223,7 @@ void process_hero_state_transitions(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -1321,9 +1322,9 @@ void process_hero_state_transitions(void) { 3.1415927f); ang = fast_add_rotations(ang, randf_sym(0.5235988f, 0.61086524f)); hero.motion.resolved_velocity.f[0] = - fast_cos(ang) * hero.unk574 * 0.7f; + fast_cos(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[1] = - fast_sin(ang) * hero.unk574 * 0.7f; + fast_sin(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[2] = frame_time * 4.5f; } if (scale_game_frames(0xF) < hero.rail_off_frames && @@ -1331,7 +1332,7 @@ void process_hero_state_transitions(void) { hero.health.hp = 2; } hero_set_state(HERO_STATE_HURT, 1); - hero.unk1C8 = scale_game_frames(0x46); + hero.grind_catch_lockout = scale_game_frames(0x46); break; } } @@ -1350,7 +1351,7 @@ void process_hero_state_transitions(void) { } if (can) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { - if (hero.unk5B8 != 0) { + if (hero.rail_jump_armed != 0) { hero.rail_jump_queued = 1; break; } @@ -1363,7 +1364,7 @@ void process_hero_state_transitions(void) { hero.move_lock_timer = scale_game_frames(0x46); } hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { @@ -1381,7 +1382,7 @@ void process_hero_state_transitions(void) { set_hero_animation(a, 0, scale_game_frames(0xC)); } } - if (hero.unk5BC != 0) { + if (hero.rail_jump_trigger != 0) { if (hero.rail_jump_queued != 0) { float initial_jump_velocity_z; float t; @@ -1401,14 +1402,14 @@ void process_hero_state_transitions(void) { trajectory_and_probe_workspace, 0, hero.jump_gravity); - hero.unk48C = t + 0.05f; + hero.jump_height_target = t + 0.05f; hero.jump_height = t; hero.jump_gravity = hero.rail_jump_gravity; hero.jump_height_start = t; } } - hero.unk5B8 = 0; - hero.unk5BC = 0; + hero.rail_jump_armed = 0; + hero.rail_jump_trigger = 0; } else if (hero.state.current == 0x2B) { if (pad_pressed_within(0x40, scale_game_frames(5), 0) && hero.anim_frame >= (float)D_L18_0017C628[hero.attack_record].f14) { @@ -1434,7 +1435,7 @@ void process_hero_state_transitions(void) { } if (scale_game_frames(5) < hero.rail_off_frames) { hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); } } else if (hero.state.current == 0x29 || hero.state.current == 0x2A) { if ((scale_game_frames(5) < hero.rail_off_frames || @@ -1446,7 +1447,7 @@ void process_hero_state_transitions(void) { } if (hero.state.current == 0x29 && hero.state_timer < scale_game_frames(0xA) && hero.past_jump_apex == 0 && - hero.unk12EE == 0 && hero.stick_magnitude > 0.5f && + hero.grind_jump_block == 0 && hero.stick_magnitude > 0.5f && hero.rail_switching == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( @@ -1500,7 +1501,7 @@ void process_hero_state_transitions(void) { hero.transfer_from_spline = hero.rail_spline; hero.prev_rail_segment = hero.rail_segment; hero.prev_rail_seg_frac = hero.rail_seg_frac; - hero.unk5A0 = hero.rail_spline_loops; + hero.prev_rail_spline_loops = hero.rail_spline_loops; qcopy(hero.prev_rail_point.f, hero.rail_point.f); hero.rail_spline = new_path; hero.rail_spline_loops = new_loop; @@ -1580,7 +1581,7 @@ void process_hero_state_transitions(void) { if (-0.5f > hero.motion.pos.f[2] - hero.rail_point.f[2]) { hero_set_state(HERO_STATE_FALL, 1); hero.move_lock_timer = scale_game_frames(0x46); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } } @@ -2288,7 +2289,7 @@ void process_hero_state_transitions(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -2304,7 +2305,7 @@ void process_hero_state_transitions(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -2332,7 +2333,7 @@ void process_hero_state_transitions(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/l18/hero/update_hero_motion_for_current_state.c b/src/overlays/l18/hero/update_hero_motion_for_current_state.c index c1d954880e..398d991a7f 100644 --- a/src/overlays/l18/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l18/hero/update_hero_motion_for_current_state.c @@ -575,8 +575,8 @@ void update_hero_motion_for_current_state(void) { fast_subtract_rotations(hero.motion.rot.f[1], old); stick_target(1.0f, 0); turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - hero.unk8EC = hero.motion.yaw_rate; - fast_dec_timer(&hero.unk8F4); + hero.swim_yaw_rate = hero.motion.yaw_rate; + fast_dec_timer(&hero.swim_thrust_timer); if (hero.state.step == 1) { hero.target_speed = frame_time * 6.0f; } else if (hero.state.current == 0x35) { @@ -701,7 +701,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.momentum); } adjust_hero_planar_velocity_from_probes(0); - t = hero.unk8EC * fast_cos(yaw) * -7.0f; + t = hero.swim_yaw_rate * fast_cos(yaw) * -7.0f; spring_angle(&hero.motion.rot.f[0], t, &hero.swim_lean_vel, @@ -915,10 +915,11 @@ void update_hero_motion_for_current_state(void) { f32 hit2; qcopy(&general_vector_or_hit_descriptor_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &general_vector_or_hit_descriptor_scratch); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &general_vector_or_hit_descriptor_scratch); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); @@ -933,7 +934,7 @@ void update_hero_motion_for_current_state(void) { &hit2, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && hit > 0.0f) { hero.target_arrival_frames = hit; hero.state.step = 1; @@ -975,7 +976,8 @@ void update_hero_motion_for_current_state(void) { hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&general_vector_or_hit_descriptor_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &general_vector_or_hit_descriptor_scratch); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &general_vector_or_hit_descriptor_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub( &position_or_displacement_scratch, &v10, &general_vector_or_hit_descriptor_scratch); @@ -1076,7 +1078,7 @@ void update_hero_motion_for_current_state(void) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.displacement, frame_time_sq * 40.0f); @@ -1126,9 +1128,9 @@ void update_hero_motion_for_current_state(void) { old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - old; if (fast_vec_length(&vC0) > hero.swing_rope_length) { @@ -1161,7 +1163,7 @@ void update_hero_motion_for_current_state(void) { f32 t; s32 up; hero.swing_entry_push = 0; - t = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + t = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -1679,11 +1681,11 @@ void update_hero_motion_for_current_state(void) { emit_hero_randomized_motion_effects(5, 2); } if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { @@ -1742,7 +1744,7 @@ void update_hero_motion_for_current_state(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -1899,7 +1901,7 @@ void update_hero_motion_for_current_state(void) { &hero.prev_rail_point, &hero.prev_rail_segment, &hero.prev_rail_seg_frac, - hero.unk5A0, + hero.prev_rail_spline_loops, 999.0f, 2.0f, 2.5f); @@ -1919,7 +1921,7 @@ void update_hero_motion_for_current_state(void) { hero.rail_off_frames++; break; } - r = hero.unk574 * (f32)hero.grind_direction; + r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { r = hero.unk5CC * (f32)hero.grind_direction; } @@ -1935,7 +1937,7 @@ void update_hero_motion_for_current_state(void) { &hero.prev_rail_segment, &hero.prev_rail_seg_frac, r, - hero.unk5A0); + hero.prev_rail_spline_loops); } if (scale_game_frames(90) < hero.control_mode_timer) { s32 h; @@ -2184,20 +2186,20 @@ void update_hero_motion_for_current_state(void) { hero.grind_pose = -1; } } - if (hero.unk5AC.f < sp) { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 8.0f); + if (hero.grind_speed_boost.f < sp) { + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 8.0f); } else { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 2.0f); + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 2.0f); } - if (hero.unk5AC.f > frame_time * 12.0f) { - hero.unk5AC.f = frame_time * 12.0f; + if (hero.grind_speed_boost.f > frame_time * 12.0f) { + hero.grind_speed_boost.f = frame_time * 12.0f; } - if (hero.unk5AC.f < D_0015ED6C_a * -2.5f) { - hero.unk5AC.f = D_0015ED6C_a * -2.5f; + if (hero.grind_speed_boost.f < D_0015ED6C_a * -2.5f) { + hero.grind_speed_boost.f = D_0015ED6C_a * -2.5f; } - hero.unk574 = hero.grind_base_speed + hero.unk5AC.f; - if (hero.unk574 < 0.0f) { - hero.unk574 = 0.0f; + hero.grind_speed = hero.grind_base_speed + hero.grind_speed_boost.f; + if (hero.grind_speed < 0.0f) { + hero.grind_speed = 0.0f; } fast_vec_sub( &hero.motion.velocity, &general_vector_or_hit_descriptor_scratch, &hero.rail_point); @@ -2256,7 +2258,7 @@ void update_hero_motion_for_current_state(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0, 0.0f, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2498,7 +2500,7 @@ void update_hero_motion_for_current_state(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -3028,7 +3030,7 @@ void update_hero_motion_for_current_state(void) { AN.f12F8 = a * 0.25f; AN.f13A8 = a * 0.57f; } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -3116,7 +3118,7 @@ void update_hero_motion_for_current_state(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/shared/camera/grindrail_camera.c b/src/overlays/shared/camera/grindrail_camera.c index 2cd77cb317..a8547132a8 100644 --- a/src/overlays/shared/camera/grindrail_camera.c +++ b/src/overlays/shared/camera/grindrail_camera.c @@ -603,7 +603,7 @@ typedef struct { s16 mode; /* 0x7E: set to 3 or 5 */ u8 pad80[4]; s16 slot; /* 0x84: index into l01_camera_preset_rows */ - s16 unk86; /* 0x86: compared with hero.unk2284 */ + s16 unk86; /* 0x86: compared with hero.camera_mode */ } CamUser; void update_camera_mode_from_preset(CamUser *camera_user) __asm__("FUN_L01_00316030"); diff --git a/src/overlays/shared/camera/target_tracking_camera.c b/src/overlays/shared/camera/target_tracking_camera.c index 1cb8fe2241..d1a16e598a 100644 --- a/src/overlays/shared/camera/target_tracking_camera.c +++ b/src/overlays/shared/camera/target_tracking_camera.c @@ -158,11 +158,11 @@ void update_target_tracking_camera_position(char *camera_object) { if (hero.swing_target_moby != 0 && hero.state.current == 0x2c) { fraction = ((float *)hero.swing_target_moby)[6] - hero.motion.pos.f[2]; - if (fraction > hero.unk9A0) - fraction = hero.unk9A0; + if (fraction > hero.swing_rope_target_length) + fraction = hero.swing_rope_target_length; else if (fraction < 0.0f) fraction = 0.0f; - fraction /= hero.unk9A0; + fraction /= hero.swing_rope_target_length; target = fraction + 3.65f; rate = fraction + fraction; } else { @@ -355,7 +355,7 @@ void update_target_tracking_camera(char *camera_object) { /* Ported from rac1-decomp (src/overlays/shared/vendor_002EB0D8.c: func_L00_002EDC60), where it is exact; names translated to the US level program. */ -/* Resets moby bytes 0x7D/0x7E unless its id at 0x86 is &hero.unk2284 or 0x2084 is 6. */ +/* Resets moby bytes 0x7D/0x7E unless its id at 0x86 is &hero.camera_mode or 0x2084 is 6. */ void conditionally_set_camera_state_three(char *camera_object) __asm__("FUN_L00_002ec7b0"); void conditionally_set_camera_state_three(char *camera_object) { diff --git a/src/overlays/shared/enemies/ground_melee_enemy.c b/src/overlays/shared/enemies/ground_melee_enemy.c index 972dfe7d24..ed1789c3a4 100644 --- a/src/overlays/shared/enemies/ground_melee_enemy.c +++ b/src/overlays/shared/enemies/ground_melee_enemy.c @@ -308,7 +308,7 @@ void ground_melee_enemy_update(Moby *moby) { if (vector_distance_xy(&moby->pos, D_0013E633_2E39E0) > 40.0f) return; if (ground_enemy_vars->hidden != 0) { - if ((*(unsigned char *)&((Hero *)D_0013E633_2E39E0)->unk2020[1]) != 2) { + if ((*(unsigned char *)&((Hero *)D_0013E633_2E39E0)->drone_mobys[1]) != 2) { moby->update_dist = 0xFF; moby->collision = 0; moby->flags = (moby->flags | 0x41) & 0xEFFF; diff --git a/src/overlays/shared/game/restore_or_clear_level_state.c b/src/overlays/shared/game/restore_or_clear_level_state.c index 6920f4f66e..4b79340654 100644 --- a/src/overlays/shared/game/restore_or_clear_level_state.c +++ b/src/overlays/shared/game/restore_or_clear_level_state.c @@ -66,7 +66,7 @@ void jet_reset_camera(OvlQuad *saved_position, OvlQuad *saved_rotation) { *(int *)(saved_state + 0x38) = *(int *)(hero_moby + 0x80); *(int *)(saved_state + 0x44) = hero_state->vehicle_mode; *(char **)(saved_state + 0x48) = hero_moby; - *(int *)(saved_state + 0x4C) = hero_state->unk22CC; + *(int *)(saved_state + 0x4C) = hero_state->requested_state; *(int *)(saved_state + 0x3C) = *(int *)(saved_state_fields_source + 0x64); *(char *)(saved_state + 0x40) = *(unsigned char *)(saved_state_fields_source + 0x68); *(char *)(saved_state + 0x41) = *(unsigned char *)(saved_state_fields_source + 0x69); diff --git a/src/overlays/shared/hero/hero_frame_update.c b/src/overlays/shared/hero/hero_frame_update.c index 3575980665..2a80ca7925 100644 --- a/src/overlays/shared/hero/hero_frame_update.c +++ b/src/overlays/shared/hero/hero_frame_update.c @@ -410,7 +410,7 @@ void update_hero_ground_material_effects(void) { } if (saved_ground_type == 9) { struct Hero *q = &hero; - q->unk12EE = 1; + q->grind_jump_block = 1; } if (saved_ground_type == 0xC) { struct Hero *q = &hero; @@ -749,14 +749,14 @@ void enter_hero_vehicle_mode_and_set_moby(int vehicle_mode, int initial_state, i hero_state_base = (struct Hero *)((char *)D_0013E533 + 0xE1D); *(char *)&hero_state_base->force_slot0_item8 = 1; hero_update_items(); - *(int *)&hero_state_base->moby = *(int *)&hero_state_base->unkA88; + *(int *)&hero_state_base->moby = *(int *)&hero_state_base->base_moby; clear_moby_transform_history(&hero_state_base->trail.pos); hero_state_base->moby->collision_disable = -1; set_hero_item_moby_flag_bit0(); release_and_clear_hero_voice_slots(); reset_hero_easing_records(); *(char *)&hero_state_base->vehicle_mode = vehicle_mode; - *(int *)&hero_state_base->unkA84 = new_moby; + *(int *)&hero_state_base->replacement_moby = new_moby; *(int *)&hero_state_base->moby = new_moby; update_hero_collision_dimensions(); hero_state_base->capsule_top = hero_state_base->capsule_top_target; @@ -767,9 +767,9 @@ void enter_hero_vehicle_mode_and_set_moby(int vehicle_mode, int initial_state, i clear_hero_queued_animation(); FUN_L00_00257024(((void *)hero_state_base->moby)); apply_hero_and_item_scale_sequence(); - hero_state_base->unk22CC = initial_state; + hero_state_base->requested_state = initial_state; if (vehicle_mode == HERO_VEHICLE_MODE_CLANK) { - *(unsigned short *)&hero_state_base->health.unk22B0 = + *(unsigned short *)&hero_state_base->health.saved_hp = *(unsigned short *)&hero_state_base->health; hero_state_base->health.hp = hero_state_base->health.vehicle_mode_hp; } @@ -790,19 +790,19 @@ void exit_hero_vehicle_mode_and_restore_moby(void) { char *restored_moby; reset_hero_easing_records(); hero_state_base = (struct Hero *)((char *)D_0013E533 + 0xE1D); - previous_active_moby = ((char *)hero_state_base->unkA84); + previous_active_moby = ((char *)hero_state_base->replacement_moby); hero_state_base->vehicle_mode = HERO_VEHICLE_MODE_ON_FOOT; if (previous_active_moby != 0) { MOBY(previous_active_moby)->flags &= 0xFFF9; } - *(int *)&hero_state_base->unkA84 = 0; + *(int *)&hero_state_base->replacement_moby = 0; moby_to_remove = ((char *)hero_state_base->vehicle_mode3_moby); if (moby_to_remove != 0) { mark_moby_for_removal(moby_to_remove); *(int *)&hero_state_base->vehicle_mode3_moby = 0; } release_and_clear_hero_voice_slots(); - restored_moby = ((char *)hero_state_base->unkA88); + restored_moby = ((char *)hero_state_base->base_moby); hero_state_base->moby = restored_moby; qcopy(&MOBY(restored_moby)->pos, &hero_state_base->motion.pos); MOBY(restored_moby)->collision_disable = 0; @@ -975,7 +975,7 @@ void update_hero_collision_dimensions(void) { } if (hero.state.control_mode == HERO_MODE_JUMP) { if (hero.state_timer > hero.takeoff_frame && hero.past_jump_apex == 0) - hero.capsule_bottom_target = hero.unk434; + hero.capsule_bottom_target = hero.air_capsule_bottom; } else if (hero.state.current == HERO_STATE_FALL) { hero.capsule_bottom_target = 0.5f; } else if (hero.state.current == HERO_STATE_CROUCH) { @@ -1278,7 +1278,7 @@ void update_hero_ground_contact_and_gravity(void) { break; } hero.ground_pitch.i = 0; - hero.unk2E8.i = 0; + hero.ground_roll.i = 0; hero.side_probe_roll.i[0] = 0; hero.side_probe_roll.i[1] = 0; hero.side_probe_pitch.i[0] = 0; @@ -1298,7 +1298,7 @@ void update_hero_ground_contact_and_gravity(void) { hero.ground_pitch.f = ground_delta_or_angles.f[1]; } if (-0.78539819f < ground_delta_or_angles.f[0] && ground_delta_or_angles.f[0] < 0.78539819f) { - hero.unk2E8.f = ground_delta_or_angles.f[0]; + hero.ground_roll.f = ground_delta_or_angles.f[0]; } for (i = 0; i < 2; i++) { side_probe_angle = 1.5707964f; @@ -1325,7 +1325,7 @@ void update_hero_ground_contact_and_gravity(void) { } else { hero.side_probe_drop.i[i] = 0; hero.side_probe_pitch.f[i] = hero.ground_pitch.f; - hero.side_probe_roll.f[i] = hero.unk2E8.f; + hero.side_probe_roll.f[i] = hero.ground_roll.f; } } } @@ -1363,8 +1363,9 @@ s32 resolve_hero_position_with_collision_queries(s32 mode) { hero.path_constrain_pending = 0; } if (hero.state.control_mode != HERO_MODE_SWIM) { - if (hero.gravity_mode != HERO_GRAVITY_WORLD_DOWN || hero.unk1F8 != 0) { - if (hero.gravity_mode == HERO_GRAVITY_OPPOSITE_GROUND_NORMAL || hero.unk1F8 != 0) { + if (hero.gravity_mode != HERO_GRAVITY_WORLD_DOWN || hero.magnet_walk_timer != 0) { + if (hero.gravity_mode == HERO_GRAVITY_OPPOSITE_GROUND_NORMAL || + hero.magnet_walk_timer != 0) { add_hero_up_offset(&collision_query_offset, &collision_query_offset, 0.6f); } else { add_hero_gravity_offset( @@ -1471,30 +1472,30 @@ void update_hero_timers_and_vehicle_transitions(void) { hero.anim_seq_frames++; fast_dec_timer(&hero.move_lock_timer); fast_dec_timer(&hero.invulnerable_frames); - fast_dec_timer_s16(&hero.unk1B2); + fast_dec_timer_s16(&hero.item_select_override_timer); fast_dec_timer(&hero.long_jump_lockout); fast_dec_timer_s16(&hero.jump_lockout_timer); fast_dec_timer_s16(&hero.dive_lock); fast_dec_timer(&hero.wall_jump_window); - fast_dec_timer_s16(&hero.unk1F0); + fast_dec_timer_s16(&hero.ledge_ahead_timer); fast_dec_timer_s16(&hero.ledge_probe_cooldown); - fast_dec_timer_s16(&hero.unk1C8); + fast_dec_timer_s16(&hero.grind_catch_lockout); fast_dec_timer_s16(&hero.rail_catch_grace); fast_dec_timer_s16(&hero.rail_grab_cooldown); fast_dec_timer_s16(&hero.grapple_lockout_timer); fast_dec_timer(&hero.collision_off_frames); - fast_dec_timer(&hero.unk1D0); + fast_dec_timer(&hero.idle_return_delay); fast_dec_timer(&hero.jump_buffer_lockout); fast_dec_timer_s16(&hero.fidget_cooldown); fast_dec_timer_s16(&hero.sinking_floor_hold); fast_dec_timer_s16(&hero.hit_flash_timer); - fast_dec_timer_s16(&hero.unk1EA); + fast_dec_timer_s16(&hero.wall_push_out_timer); fast_dec_timer_s16(&hero.edge_brake_lock_timer); fast_dec_timer_s16(&hero.jump_lock_timer); - fast_dec_timer_s16(&hero.unk1DC); - fast_dec_timer_s16(&hero.unk1F6); - fast_dec_timer_s16(&hero.unk1DA); - fast_dec_timer_s16(&hero.unk1F8); + fast_dec_timer_s16(&hero.face_expression_timer); + fast_dec_timer_s16(&hero.pushed_timer); + fast_dec_timer_s16(&hero.item_swap_timer); + fast_dec_timer_s16(&hero.magnet_walk_timer); if (!(controller_state.held & 5)) { hero.unk1EC = 0; } diff --git a/src/overlays/shared/hero/hero_handle_jump_press.c b/src/overlays/shared/hero/hero_handle_jump_press.c index 678d738167..47a75dd1d6 100644 --- a/src/overlays/shared/hero/hero_handle_jump_press.c +++ b/src/overlays/shared/hero/hero_handle_jump_press.c @@ -298,7 +298,7 @@ s32 try_start_hero_item_idle_animation(void) { return 0; set_hero_animation(k, 0, (f32)scale_game_frames(0xB)); if (((s32)hero_ptr->held_item_anim_blend[0]) != 0) - hero_ptr->unkD14 = 1; + hero_ptr->arm_layer_fade = 1; hero_ptr->item_hold_anim = k; return 1; } diff --git a/src/overlays/shared/hero/hero_idle_sequence.c b/src/overlays/shared/hero/hero_idle_sequence.c index 8242d137f5..fe2728e8bc 100644 --- a/src/overlays/shared/hero/hero_idle_sequence.c +++ b/src/overlays/shared/hero/hero_idle_sequence.c @@ -681,7 +681,7 @@ void update_hero_bone_attachment(void) __asm__("FUN_L00_002061f0"); void update_hero_bone_attachment(void) { M4_2061f0 bone_transform; struct Hero *hero_state = &hero; - char *destination_moby = ((char *)hero_state->unkA88); + char *destination_moby = ((char *)hero_state->base_moby); struct Moby *hero_moby; MOBY(destination_moby)->shadow_range = 0; hero_moby = ((char *)hero_state->moby); @@ -1120,7 +1120,7 @@ void scan_hero_input_sequences(void) { if (g->state.control_mode == HERO_MODE_JUMP) { int b = g->state.current; if (b == 0xB) { - int token_variant_selector = g->unk450; + int token_variant_selector = g->jump_stick_direction; if (token_variant_selector == 0) { input_token = 1; if (D_0015EDB4[0]) @@ -1493,11 +1493,11 @@ void apply_hero_vertical_oscillation(void) { float position_offset_rotation_matrix[16] __attribute__((aligned(16))); if (P->state.current == 0x7F) { update_moby_vertical_oscillation( - P->moby, &P->unk6A8, &P->unk6AC, 0.3f, D_0015ED6C * 6.981317f); + P->moby, &P->bob_phase, &P->bob_offset, 0.3f, D_0015ED6C * 6.981317f); } if (P->state.current == 0x6B && P->hoverboard_airborne == 0) { update_moby_vertical_oscillation( - P->moby, &P->unk6A8, &P->unk6AC, 1.1f, D_0015ED6C * 5.2359877f); + P->moby, &P->bob_phase, &P->bob_offset, 1.1f, D_0015ED6C * 5.2359877f); if (P->hoverboard_moby) { char *hero_moby = P->moby; qcopy(((char *)P->hoverboard_moby) + 0x10, &MOBY(hero_moby)->pos); @@ -1523,8 +1523,8 @@ void apply_hero_rotation_oscillation(void) { struct Hero *hero_state = &hero; if (hero_state->state.current == 0x7F) { update_moby_rotation_oscillation(((int)hero_state->moby), - &hero_state->unk6B0, - &hero_state->unk6B4, + &hero_state->sway_phase, + &hero_state->sway_axis_phase, 0.1745329201221466f, frame_time * 1.5707963705062866f, frame_time * 2.094395160675049f); @@ -3313,7 +3313,7 @@ void probe_hero_airborne_wall_contact(void) { position_scratch.f[1] = position_scratch.f[1] + projected_y_displacement; if (probe_hero_ledge_edge(&position_scratch, &g->motion.rot.f[2]) != 0) { g->wall_jump_window = 0; - g->unk1F0 = prediction_frames + 2; + g->ledge_ahead_timer = prediction_frames + 2; return; } if (probe_hero_forward_collision(0, 0.3f, 1.0f) == 0) { @@ -3359,19 +3359,19 @@ void probe_hero_airborne_wall_contact(void) { } { S2 *collision_result; - k2->unk460.q = *(u128_20b5b8 *)pz; + k2->wall_hit_normal.q = *(u128_20b5b8 *)pz; collision_result = (S2 *)(pz - 0x40); f = fast_arc_tan(collision_result->x, collision_result->y); } - k2->unk460.f[3] = f; + k2->wall_hit_normal.f[3] = f; if (k2->state.control_mode != HERO_MODE_JUMP && k2->state.prev_control_mode != HERO_MODE_JUMP && k2->state.prev2_control_mode != HERO_MODE_JUMP) { return; } hero_state = &hero; - if (hero_state->unk22B4 != 0) { + if (hero_state->wall_jumped != 0) { f = fast_difference_between_rotations(hero_state->wall_jump_normal.f[3], - hero_state->unk460.f[3]); + hero_state->wall_hit_normal.f[3]); if (f < 2.9670596f) { return; } diff --git a/src/overlays/shared/hero/hero_move_state_velocity.c b/src/overlays/shared/hero/hero_move_state_velocity.c index 3251c5179a..605e3217ce 100644 --- a/src/overlays/shared/hero/hero_move_state_velocity.c +++ b/src/overlays/shared/hero/hero_move_state_velocity.c @@ -106,7 +106,7 @@ void hero_move_state_velocity(void) { } else if (state == HERO_STATE_HIGH_JUMP || state == HERO_STATE_STORED_HEADING_JUMP) { hero.motion.move_yaw = hero.takeoff_yaw; turn_to(0, ED64 * 0.04f, ED64 * 0.2f, ED6C * 6.981317f); - if (hero.unk450 != 3) { + if (hero.jump_stick_direction != 3) { hero.ground_speed = hero.air_target_speed; } else { hero.ground_speed = 0.0f; @@ -187,7 +187,7 @@ void hero_move_state_velocity(void) { base_planar_velocity_step = ED70 * 2.0f; } } - if (hero.unk4A8 && hero.on_ice_ground) { + if (hero.took_off_from_ice && hero.on_ice_ground) { base_planar_velocity_step = ED70 * 0.17f; if (hero.state.current == 15) { stick_target(0, ED6C * 2.5f); @@ -652,7 +652,7 @@ void update_hero_tilt(void) { float tilt_targets[2]; int effective_tilt_mode, current_hero_state, k; effective_tilt_mode = hero_state->gravity_mode; - if (hero_state->unk1F8) { + if (hero_state->magnet_walk_timer) { effective_tilt_mode = HERO_TILT_APPLY_REFERENCE_ORIENTATION; } switch (effective_tilt_mode) { @@ -877,17 +877,18 @@ void update_hero_planar_movement_velocity(void) { qcopy(&xy_velocity_scratch, &hero.motion.velocity); xy_velocity_scratch.f[2] = 0.0f; hero_state = &hero; - hero_state->unk3B0 = fast_vec_dot(&xy_velocity_scratch, &target_velocity); + hero_state->run_speed_ratio = fast_vec_dot(&xy_velocity_scratch, &target_velocity); k = fast_vec_length(&target_velocity); if (0.0f < k) { - hero_state->unk3B0 = hero_state->unk3B0 / (k * (frame_time * 5.9f)); + hero_state->run_speed_ratio = hero_state->run_speed_ratio / (k * (frame_time * 5.9f)); } clip_hero_velocity_against_probed_surfaces(0); - if (hero_state->unk3B4.f < DEG_TO_RAD && 0.0872664601f < hero_state->ground_pitch.f) { + if (hero_state->prev_ground_pitch.f < DEG_TO_RAD && + 0.0872664601f < hero_state->ground_pitch.f) { fast_vec_scale( &hero.motion.velocity, &hero.motion.velocity, fast_cos(hero_state->ground_pitch.f)); } - hero.unk3B4.f = hero.ground_pitch.f; + hero.prev_ground_pitch.f = hero.ground_pitch.f; if (absolute_float(hero.motion.pos.f[2] - hero.ground_z.f) < 0.15f) { hero.motion.pos.f[2] = hero.ground_z.f; } @@ -905,7 +906,7 @@ int allocate_hero_voice_for_entry(int entry_index, int voice_allocation_flags) { struct Hero *hero_base = (struct Hero *)(D_0013E533 + 0xE1D); int voice_target; if (hero_base->vehicle_mode == 3) { - voice_target = *(int *)&hero_base->unkA88; + voice_target = *(int *)&hero_base->base_moby; if (voice_target != 0) { qcopy((char *)voice_target + 0x10, &hero_base->motion.pos); return allocate_voice_for_target_entry( diff --git a/src/overlays/shared/hero/hero_set_state.c b/src/overlays/shared/hero/hero_set_state.c index c7946f54ed..c05cc3e812 100644 --- a/src/overlays/shared/hero/hero_set_state.c +++ b/src/overlays/shared/hero/hero_set_state.c @@ -149,30 +149,30 @@ void update_hero_timers_and_reach_state(void) { hero.anim_seq_frames++; FUN_001f9740_2215c8(&hero.move_lock_timer); FUN_001f9740_2215c8(&hero.invulnerable_frames); - fast_dec_timer_s16(&hero.unk1B2); + fast_dec_timer_s16(&hero.item_select_override_timer); FUN_001f9740_2215c8(&hero.long_jump_lockout); fast_dec_timer_s16(&hero.jump_lockout_timer); fast_dec_timer_s16(&hero.dive_lock); FUN_001f9740_2215c8(&hero.wall_jump_window); - fast_dec_timer_s16(&hero.unk1F0); + fast_dec_timer_s16(&hero.ledge_ahead_timer); fast_dec_timer_s16(&hero.ledge_probe_cooldown); - fast_dec_timer_s16(&hero.unk1C8); + fast_dec_timer_s16(&hero.grind_catch_lockout); fast_dec_timer_s16(&hero.rail_catch_grace); fast_dec_timer_s16(&hero.rail_grab_cooldown); fast_dec_timer_s16(&hero.grapple_lockout_timer); FUN_001f9740_2215c8(&hero.collision_off_frames); - FUN_001f9740_2215c8(&hero.unk1D0); + FUN_001f9740_2215c8(&hero.idle_return_delay); FUN_001f9740_2215c8(&hero.jump_buffer_lockout); fast_dec_timer_s16(&hero.fidget_cooldown); fast_dec_timer_s16(&hero.sinking_floor_hold); fast_dec_timer_s16(&hero.hit_flash_timer); - fast_dec_timer_s16(&hero.unk1EA); + fast_dec_timer_s16(&hero.wall_push_out_timer); fast_dec_timer_s16(&hero.edge_brake_lock_timer); fast_dec_timer_s16(&hero.jump_lock_timer); - fast_dec_timer_s16(&hero.unk1DC); - fast_dec_timer_s16(&hero.unk1F6); - fast_dec_timer_s16(&hero.unk1DA); - fast_dec_timer_s16(&hero.unk1F8); + fast_dec_timer_s16(&hero.face_expression_timer); + fast_dec_timer_s16(&hero.pushed_timer); + fast_dec_timer_s16(&hero.item_swap_timer); + fast_dec_timer_s16(&hero.magnet_walk_timer); if (!(controller_state.held & 5)) { hero.unk1EC = 0; } @@ -307,11 +307,11 @@ void update_hero_planar_distance_spring_motion(void) { control_mode_or_timer_frames == 1) { control_mode_or_timer_frames = scale_game_frames(5); hero_timer_base = (struct Hero *)((char *)D_0013E533 + 0xE1D); - hero_timer_base->unk1EA = control_mode_or_timer_frames; + hero_timer_base->wall_push_out_timer = control_mode_or_timer_frames; } } hero_base = (struct Hero *)((char *)D_0013E533 + 0xE1D); - if (hero_base->unk1EA != 0) { + if (hero_base->wall_push_out_timer != 0) { xy_distance = vector_distance_xy(&hero_base->motion.pos, &hero_base->wall_contact_point); xy_distance_threshold = hero_base->capsule_radius * 0.9f; if (xy_distance < xy_distance_threshold) { @@ -323,19 +323,19 @@ void update_hero_planar_distance_spring_motion(void) { } distance_error = xy_distance - xy_distance_threshold; vendor_spring(&distance_error, - (float *)(&hero_base->unk244), + (float *)(&hero_base->wall_push_out_speed), 0.0f, frame_scale_sq * 0.03f, frame_scale_sq * 0.3f, frame_time * 2.8f); hero_base->motion.platform_delta.f[0] = - fast_cos(spring_projection_yaw) * hero_base->unk244.f; + fast_cos(spring_projection_yaw) * hero_base->wall_push_out_speed.f; hero_base->motion.platform_delta.f[1] = - fast_sin(spring_projection_yaw) * hero_base->unk244.f; + fast_sin(spring_projection_yaw) * hero_base->wall_push_out_speed.f; hero_base->motion.platform_delta.f[2] = 0.0f; } } else { - hero_base->unk244.i = 0; + hero_base->wall_push_out_speed.i = 0; } } @@ -726,7 +726,7 @@ int hero_set_state(int requested_state, int b) { MOBY(moby)->collision_disable = 0; p->tilt_disabled = 0; p->item_select_blocked = 0; - p->unk20B2 = 0; + p->on_hoverboard = 0; p->hand_item_hidden = 0; p->glow_pulse_level = 0; clear_moby_transform_history(&p->trail.pos[0]); @@ -851,7 +851,7 @@ int hero_set_state(int requested_state, int b) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } else { - p->unk8F4 = scale_game_frames(0x2D); + p->swim_thrust_timer = scale_game_frames(0x2D); } { struct Hero *q = &hero; @@ -870,7 +870,7 @@ int hero_set_state(int requested_state, int b) { p->state.control_mode = HERO_MODE_SWIM; p->camera_mode = 0xB; p->item_select_blocked = 1; - p->unk8F4 = scale_game_frames(0x3C); + p->swim_thrust_timer = scale_game_frames(0x3C); if (p->state.prev_control_mode == HERO_MODE_WATER_SURFACE) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; @@ -1111,7 +1111,7 @@ int hero_set_state(int requested_state, int b) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(hero_idle_sequence(0), 0, (float)scale_game_frames(0xA)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_WAIT_FOR_ITEM_RELEASE_THEN_IDLE: { @@ -1120,7 +1120,7 @@ int hero_set_state(int requested_state, int b) { p->camera_mode = 0; qcopy(&p->motion.momentum, &p->motion.displacement); set_hero_animation(hero_idle_sequence(0), 0, (float)scale_game_frames(5)); - p->unk1D0 = scale_game_frames(7); + p->idle_return_delay = scale_game_frames(7); break; } case HERO_STATE_ITEM_BUTTON_HOLD_ANIMATION_WAIT: { @@ -1129,7 +1129,7 @@ int hero_set_state(int requested_state, int b) { p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.displacement); p->state.step = 0; - p->unk3B8 = 0; + p->move_along_stick = 0; p->run_start_blending = 0; set_hero_animation(0x2E, 0, (float)scale_game_frames(5)); break; @@ -1175,7 +1175,7 @@ int hero_set_state(int requested_state, int b) { t->ground_speed = frame_time * 7.7f; t->motion.velocity.f[2] = 0.0f; FUN_L00_0025f730(&t->motion.velocity, frame_time * 7.7f); - t->unk3B4.i = 0; + t->prev_ground_pitch.i = 0; t->state.current = 0x2F; set_hero_animation(0x37, 0, (float)scale_game_frames(8)); } else if (t->wading != 0 || t->state.current == 0x73) { @@ -1187,7 +1187,7 @@ int hero_set_state(int requested_state, int b) { } else { int n; t->state.step = 0; - t->unk3B8 = 0; + t->move_along_stick = 0; t->run_start_blending = 0; n = scale_game_frames(8); if (t->health.hp == 1) @@ -1405,7 +1405,7 @@ int hero_set_state(int requested_state, int b) { *(int *)&p->swing_push_speed = 0; *(int *)&p->swing_yaw_vel = 0; d = *(char **)(((char *)p->swing_target_moby) + 0x78); - p->unk9A0 = *(float *)(d + 4); + p->swing_rope_target_length = *(float *)(d + 4); if (*(float *)(d + 0x10) == p->swing_length_vel) { *(float *)(d + 0x14) = *(float *)(d + 0xC); } else { @@ -1414,14 +1414,14 @@ int hero_set_state(int requested_state, int b) { { struct Hero *q = &hero; q->swing_rope_spring_k = frame_scale_sq * 0.025f; - q->unk9C8 = frame_scale_sq * 0.33f; + q->swing_rope_damping = frame_scale_sq * 0.33f; q->swing_rope_max_speed = frame_time * 11.0f; clear_u64_value(&q->motion.rot_spring_vel); q->grapple_lockout_timer = scale_game_frames(0x28); if (*(float *)(d + 0x24) != 0.0f) q->swing_rope_spring_k = *(float *)(d + 0x24); if (*(float *)(d + 0x28) != 0.0f) - q->unk9C8 = *(float *)(d + 0x28); + q->swing_rope_damping = *(float *)(d + 0x28); if (*(float *)(d + 0x2C) != 0.0f) q->swing_rope_max_speed = *(float *)(d + 0x2C); q->swing_yaw = fast_arc_tan( @@ -1480,16 +1480,16 @@ int hero_set_state(int requested_state, int b) { p->rail_off_frames = 0; p->grind_anim_variant = 0; if (p->state.prev_control_mode != HERO_MODE_GRIND) { - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; p->grind_pose = -1; p->grind_base_speed = 0.0f; } t = p->rail_seg_frac; i = p->rail_segment; f = t; - p->unk5B4 = 0; - p->unk5B8 = 0; - p->unk5BC = 0; + p->rail_swing_target = 0; + p->rail_jump_armed = 0; + p->rail_jump_trigger = 0; p->rail_jump_queued = 0; sample_path(p->rail_spline, (char *)&sampled_path_position, @@ -1534,7 +1534,7 @@ int hero_set_state(int requested_state, int b) { p->item_select_blocked = 1; p->rand_timer.range = 0x68; p->follow_path_end_frames = 0; - p->unk618.i = 0; + p->follow_path_pull_speed.i = 0; t = p->rail_candidate_frac; i = p->follow_path_segment; f = t; @@ -1560,10 +1560,10 @@ int hero_set_state(int requested_state, int b) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 24.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; if (b) { @@ -1736,53 +1736,53 @@ int hero_set_state(int requested_state, int b) { u->velocity_key_index = -1; u->air_speed_step_up = frame_time_sq * 20.0f; u->jump_decel = frame_time_sq * 11.0f; - u->unk4A8 = u->on_ice_ground; + u->took_off_from_ice = u->on_ice_ground; u->past_jump_apex = 0; u->rail_land_frames = 0; - u->unk428 = 0.0f; - u->unk42C = 0.0f; + u->pending_jump_impulse = 0.0f; + u->jump_impulse_total = 0.0f; u->velocity_keys_active = 0; u->fall_start_distance = 2.5f; u->jump_blocked_ahead = 0; - u->unk4AC = 0; + u->can_use_item_in_jump = 0; u->can_chain_high_jump = 0; u->can_double_jump = 0; u->jump_max_frames = scale_game_frames(0x50); u->fall_delay_frames = scale_game_frames(0x46); - u->unk4A6 = 0; + u->pack_glide_delay = 0; u->jump_anim_retime_scale = 0.5f; u->air_stick_speed = frame_time * 5.7f; u->air_turn_rate = frame_time * 15.0098314f; u->fall_gravity = 0.0f; - u->unk22B4 = 0; + u->wall_jumped = 0; if (u->state.current == 7) { u->jump_height = 1.47f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 12.0f; - u->unk48C = 2.62f; + u->jump_height_target = 2.62f; u->jump_height_start = 1.47f; u->jump_ramp_frames = scale_game_frames(0xF); - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; u->fall_gravity = u->jump_gravity * 1.17f; } else if (u->state.current == 0x12) { u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xA); if (u->water_depth < 1.25f) { u->takeoff_frame = scale_game_frames(0xF); u->jump_height_start = 1.95f; - u->unk48C = 1.98f; + u->jump_height_target = 1.98f; u->jump_height = 1.95f; } else { gravity_set_z( @@ -1803,11 +1803,11 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0x3C) { u->jump_height = 5.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 26.0f; u->jump_land_anim_frame = 13.0f; - u->unk48C = 5.55f; + u->jump_height_target = 5.55f; u->jump_height_start = 5.5f; u->jump_ramp_frames = scale_game_frames(2); u->jump_max_frames = scale_game_frames(0x78); @@ -1847,22 +1847,22 @@ int hero_set_state(int requested_state, int b) { struct Hero *w = &hero; w->jump_height = v + 1.7f; w->takeoff_frame = scale_game_frames(5); - w->unk434 = 0.6f; + w->air_capsule_bottom = 0.6f; w->apex_anim_frame = 18.0f; w->target_anim_frame = 30.0f; w->jump_land_anim_frame = 12.0f; - w->unk48C = v + 1.75f; + w->jump_height_target = v + 1.75f; w->jump_height_start = v + 1.7f; w->jump_ramp_frames = scale_game_frames(0x13); } } else if (u->state.current == 0x29) { u->jump_height = 2.4f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 28.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.45f; + u->jump_height_target = 2.45f; u->jump_height_start = 2.4f; u->jump_ramp_frames = scale_game_frames(0x11); u->jump_gravity = frame_time_sq * 27.0f; @@ -1872,7 +1872,7 @@ int hero_set_state(int requested_state, int b) { float h = 4.7f; u->jump_height += h; u->jump_height_start += h; - u->unk48C += h; + u->jump_height_target += h; u->jump_gravity = frame_time_sq * 14.0f; d.q = 0; d.v.x = 331.0f; @@ -1882,17 +1882,17 @@ int hero_set_state(int requested_state, int b) { h = 0.7f; u->jump_height += h; u->jump_height_start += h; - u->unk48C += h; + u->jump_height_target += h; } } } else if (u->state.current == 0x2A) { u->jump_height = 2.5f; u->takeoff_frame = scale_game_frames(2); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 14.0f; - u->unk48C = 2.55f; + u->jump_height_target = 2.55f; u->jump_height_start = 2.5f; u->jump_ramp_frames = scale_game_frames(0xA); u->jump_gravity = frame_time_sq * 24.0f; @@ -1901,25 +1901,25 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 9) { u->jump_height = 1.0f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 2.7f; + u->jump_height_target = 2.7f; u->jump_height_start = 1.0f; u->jump_ramp_frames = scale_game_frames(0xF); u->air_stick_speed = frame_time * 5.7f; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; u->can_chain_high_jump = 1; u->can_double_jump = 1; } else if (u->state.current == 0x5E) { u->jump_height = 4.2f; u->takeoff_frame = scale_game_frames(0x13); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 17.0f; u->target_anim_frame = 22.0f; u->jump_land_anim_frame = 40.0f; - u->unk48C = 4.3f; + u->jump_height_target = 4.3f; u->jump_height_start = 4.2f; u->jump_ramp_frames = scale_game_frames(0xF); u->jump_gravity = frame_time_sq * 30.0f; @@ -1930,11 +1930,11 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0x49) { u->jump_height = 1.3f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 27.0f; u->jump_land_anim_frame = 27.0f; - u->unk48C = 1.35f; + u->jump_height_target = 1.35f; u->jump_height_start = 1.3f; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_gravity = frame_time_sq * 25.0f; @@ -1943,32 +1943,32 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0xA) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(0xE); u->can_chain_high_jump = 1; u->jump_gravity = frame_time_sq * 11.0f; u->jump_max_frames = scale_game_frames(0x78); u->fall_delay_frames = scale_game_frames(0x5A); - u->unk4A6 = scale_game_frames(0x46); + u->pack_glide_delay = scale_game_frames(0x46); } else if (u->state.current == 0x10) { char *x = &u->trail.pos[0]; u->jump_height = 1.5f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.8f; + u->air_capsule_bottom = 0.8f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 30.0f; u->jump_land_anim_frame = 11.0f; - u->unk48C = 1.55f; + u->jump_height_target = 1.55f; u->jump_height_start = 1.5f; u->jump_ramp_frames = scale_game_frames(1); u->jump_height = 0.4f; u->jump_height_start = 0.4f; - u->unk48C = 0.9f; + u->jump_height_target = 0.9f; initialize_moby_transform_history(((int)u->moby), x); create_moby_transform_history_entry(x, 0x28, 2); create_moby_transform_history_entry(x, 0x14, 4); @@ -1983,11 +1983,11 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0x1C) { u->jump_height = 2.0f; u->takeoff_frame = scale_game_frames(0xA); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 20.0f; u->target_anim_frame = 29.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = 2.05f; + u->jump_height_target = 2.05f; u->jump_height_start = 2.0f; u->jump_ramp_frames = scale_game_frames(1); u->jump_anim_retime_scale = 1.0f; @@ -1998,11 +1998,11 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0x4C) { u->jump_height = 1.55f; u->takeoff_frame = scale_game_frames(0xD); - u->unk434 = 0.85f; + u->air_capsule_bottom = 0.85f; u->apex_anim_frame = 10.0f; u->target_anim_frame = 18.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 1.59f; + u->jump_height_target = 1.59f; u->jump_height_start = 1.55f; u->jump_ramp_frames = scale_game_frames(1); u->jump_gravity = frame_time_sq * 28.0f; @@ -2010,28 +2010,28 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0x11) { u->jump_height = 3.3f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 12.0f; u->target_anim_frame = 20.0f; u->jump_land_anim_frame = 10.0f; - u->unk48C = 3.35f; + u->jump_height_target = 3.35f; u->jump_height_start = 3.3f; u->jump_ramp_frames = scale_game_frames(0xC); u->fall_delay_frames = scale_game_frames(0x50); u->jump_gravity = frame_time_sq * 29.0f; - qcopy(&u->wall_jump_normal, &u->unk460); - u->unk22B4 = 1; + qcopy(&u->wall_jump_normal, &u->wall_hit_normal); + u->wall_jumped = 1; u->item_select_blocked = 1; - u->unk4AC = 1; + u->can_use_item_in_jump = 1; } else if (u->state.current == 0xD) { char *x = &u->trail.pos[0]; u->jump_height = 0.1f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 26.0f; u->target_anim_frame = 38.0f; u->jump_land_anim_frame = 18.0f; - u->unk48C = 0.2f; + u->jump_height_target = 0.2f; u->jump_height_start = 0.1f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; @@ -2051,17 +2051,17 @@ int hero_set_state(int requested_state, int b) { } else if (u->state.current == 0xF) { u->jump_height = 1.9f; u->takeoff_frame = scale_game_frames(9); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 50.0f; u->target_anim_frame = 64.0f; u->jump_land_anim_frame = 28.0f; - u->unk48C = 1.95f; + u->jump_height_target = 1.95f; u->jump_height_start = 1.9f; u->jump_ramp_frames = scale_game_frames(5); u->fall_start_distance = 4.5f; u->jump_max_frames = scale_game_frames(0x82); u->air_stick_speed = frame_time * 3.3f; - u->unk4A6 = scale_game_frames(0x55); + u->pack_glide_delay = scale_game_frames(0x55); u->ledge_probe_cooldown = scale_game_frames(0x46); u->velocity_keys_active = 1; if (pal_mode != 0) { @@ -2083,33 +2083,33 @@ int hero_set_state(int requested_state, int b) { float v = 0.7f; if (u->ground_distance < 2.0f) v = (2.5f - u->ground_distance) * 0.5f + 0.7f; - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 32.0f; u->target_anim_frame = 43.0f; u->jump_land_anim_frame = 19.0f; - u->unk48C = v + 0.05f; + u->jump_height_target = v + 0.05f; u->jump_height = v; u->jump_height_start = v; u->takeoff_frame = -1; u->jump_ramp_frames = scale_game_frames(0xE); u->jump_anim_retime_scale = 1.0f; u->air_stick_speed = frame_time * 3.5f; - u->unk4A6 = scale_game_frames(0x1E); + u->pack_glide_delay = scale_game_frames(0x1E); } else if (u->state.current == 0xB) { u->jump_height = 3.2f; u->takeoff_frame = scale_game_frames(5); - u->unk434 = 0.6f; + u->air_capsule_bottom = 0.6f; u->apex_anim_frame = 18.0f; u->target_anim_frame = 31.0f; u->jump_land_anim_frame = 24.0f; - u->unk48C = 3.25f; + u->jump_height_target = 3.25f; u->jump_height_start = 3.2f; u->jump_ramp_frames = scale_game_frames(0xE); u->fall_start_distance = 4.5f; u->fall_delay_frames = scale_game_frames(0x32); u->jump_anim_retime_scale = 1.0f; u->takeoff_yaw = get_hero_yaw_history(scale_game_frames(0xA)); - u->unk450 = stick_direction_vs_facing(); + u->jump_stick_direction = stick_direction_vs_facing(); u->high_jump_drift_yaw = u->motion.move_yaw; if (frame_time * 1.5f < u->motion.flat_speed) { u->air_target_speed = u->motion.flat_speed; @@ -2119,7 +2119,7 @@ int hero_set_state(int requested_state, int b) { { struct Hero *w = &hero; *(int *)&w->high_jump_drift_speed = 0; - w->unk4AC = 1; + w->can_use_item_in_jump = 1; w->can_chain_high_jump = 1; } } @@ -2184,9 +2184,9 @@ int hero_set_state(int requested_state, int b) { set_hero_animation(0x15, 0, (float)scale_game_frames(5)); } else if (s == 0xB) { int id; - if (q->unk450 == 2) - q->unk450 = 0; - id = q->unk450 + 0x1C; + if (q->jump_stick_direction == 2) + q->jump_stick_direction = 0; + id = q->jump_stick_direction + 0x1C; if (opt_mirror_anim != 0) { if (id == 0x1C) { id = 0x1D; @@ -2572,7 +2572,7 @@ int hero_set_state(int requested_state, int b) { p->health.hp = 0; p->collision_off_frames = 0x2710; p->sink_surface_z = p->ground_z.f; - m = ((char *)p->unkA88); + m = ((char *)p->base_moby); qcopy(m + 0x10, &p->motion.pos); allocate_voice_for_target_entry(9, 0, (int)m); if (b) @@ -2653,7 +2653,7 @@ int hero_set_state(int requested_state, int b) { q->ground_speed = 0.0f; if (q->state.prev_control_mode == HERO_MODE_IDLE) q->ground_speed = vector_length_xy(&q->motion.momentum); - q->unk3B8 = 0; + q->move_along_stick = 0; if (b) set_hero_animation(2, 0, (float)scale_game_frames(8)); } @@ -2674,10 +2674,10 @@ int hero_set_state(int requested_state, int b) { p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; p->unk4EC = frame_time_sq * 12.0f; - p->unk4F0 = p->motion.pos.f[2]; + p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { p->unk4EC = p->jump_gravity; - p->unk4F0 = p->smoothed_ground_z; + p->smoothed_air_z = p->smoothed_ground_z; } if (b) set_hero_animation(8, 0x12, (float)(scale_game_frames(7) + 2)); @@ -2773,7 +2773,7 @@ int hero_set_state(int requested_state, int b) { p->state.control_mode = HERO_MODE_RUN; p->camera_mode = 0; p->ground_speed = vector_length_xy(&p->motion.resolved_velocity); - p->unk3B8 = 0; + p->move_along_stick = 0; if (b) set_hero_animation(3, 0x12, (float)scale_game_frames(8)); break; @@ -2851,7 +2851,7 @@ int hero_set_state(int requested_state, int b) { g->ground_speed = r; if (frame_time * 1.5f < r) g->ground_speed = frame_time * 1.5f; - g->unk3B8 = 0; + g->move_along_stick = 0; if (b) set_hero_animation(1, 0, (float)scale_game_frames(8)); } @@ -2891,7 +2891,7 @@ int hero_set_state(int requested_state, int b) { p->unk5CC = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; - p->unk5AC.i = 0; + p->grind_speed_boost.i = 0; clear_u64_value(&p->motion.velocity); clear_u64_value(&p->motion.displacement); p->motion.velocity.f[2] = frame_time * 10.0f; @@ -3062,7 +3062,7 @@ int try_start_hero_weapon_fire_state(void) { if (hero_base->stick_magnitude < 0.7f) { if (hero_base->item_slot_anim_count == 0) { cancel_hero_item_animation(); - hero_base->unkD14 = 2; + hero_base->arm_layer_fade = 2; hero_set_state(0x23, 1); return 1; } diff --git a/src/overlays/shared/hero/hero_switch_item.c b/src/overlays/shared/hero/hero_switch_item.c index d1dab993a1..1c68f0cd44 100644 --- a/src/overlays/shared/hero/hero_switch_item.c +++ b/src/overlays/shared/hero/hero_switch_item.c @@ -256,7 +256,7 @@ void find_grind_rail(void) { if (D_0013D4DD_lui == 0) return; hero.grind_rail = 0; - if (hero.unk1C8 != 0) + if (hero.grind_catch_lockout != 0) return; if (current_level_index == LEVEL_KALEBO3) { *(OvlQuad *)&proximity_or_rail_point = 0; @@ -718,9 +718,9 @@ void update_hero_condition_animation(void) { spd = 0.7f; } } - if (hero.unk1DC) { + if (hero.face_expression_timer) { on = 1; - anim = select_hero_condition_animation_id(hero.unk22CE); + anim = select_hero_condition_animation_id(hero.face_expression); } if (hero.health.hp == 1) { on = 1; @@ -751,24 +751,24 @@ void update_hero_condition_animation(void) { } } if (on) { - if (!hero.unkD10) { - hero.unkD10 = (u8 *)allocate_moby_animation_slot((char *)hero.moby, 0x18); - *(int *)(hero.unkD10 + 8) = 0; + if (!hero.face_anim_layer) { + hero.face_anim_layer = (u8 *)allocate_moby_animation_slot((char *)hero.moby, 0x18); + *(int *)(hero.face_anim_layer + 8) = 0; } } else { - if (!hero.unkD10) + if (!hero.face_anim_layer) return; - if (FUN_00213ed8_20da68(hero.unkD10 + 8, 0.0f, frame_scale * 0.05f) == 0.0f) { - release_moby_animation_slot((char *)hero.moby, (char **)&hero.unkD10); + if (FUN_00213ed8_20da68(hero.face_anim_layer + 8, 0.0f, frame_scale * 0.05f) == 0.0f) { + release_moby_animation_slot((char *)hero.moby, (char **)&hero.face_anim_layer); } } - animation_object = hero.unkD10; + animation_object = hero.face_anim_layer; if (animation_object && on) { FUN_00213ed8_20da68(animation_object + 8, spd, frame_scale * 0.05f); - reloaded_animation_object = hero.unkD10; + reloaded_animation_object = hero.face_anim_layer; if ((unsigned char)reloaded_animation_object[0x23] != anim) { initialize_moby_animation_blend( - (char *)hero.moby, hero.unkD10, anim, 0, scale_game_frames(8), 1); + (char *)hero.moby, hero.face_anim_layer, anim, 0, scale_game_frames(8), 1); } else { FUN_L00_0024f190_20da68((char *)hero.moby, reloaded_animation_object); } @@ -856,7 +856,7 @@ void update_hero_item_slot_blends(void) { } hr = (u8 *)h->moby; hero_animation_ids_differ = hr[0x52] != hr[0x53]; - if (h->held_item_anim_blend[0] != 0 && h->unkD14 == 0) { + if (h->held_item_anim_blend[0] != 0 && h->arm_layer_fade == 0) { approach_value((f32 *)(item_slot_blend + 8), 0.0f, frame_scale * 0.1f); } else if (*(s32 *)(item_slot_blend + 0x34) == 0) { approach_value((f32 *)(item_slot_blend + 8), 1.0f, frame_scale * 0.1f); @@ -1021,7 +1021,7 @@ void create_missing_hero_item_slot_animations(s32 suppress_slot_animation_creati allocate_moby_animation_slot((u8 *)hero.moby, l00_hero_item_animation_slot_ids[i]); hero.held_item_anim_blend[i] = slot_animation_object; if (slot_animation_object) { - hero.unkD14 = 0; + hero.arm_layer_fade = 0; *(s32 *)(slot_animation_object + 8) = 0; initialize_moby_animation_blend((u8 *)hero.moby, slot_animation_object, @@ -1076,7 +1076,7 @@ void start_equipped_item_animation(void) { hero.held_item_anim_blend[i] = slot_animation_object; if (slot_animation_object != 0) { hero.item_hold_anim = slot_animation_id; - hero.unkD14 = 0; + hero.arm_layer_fade = 0; *(f32 *)(slot_animation_object + 8) = 1.0f; initialize_moby_animation_blend((u8 *)hero.moby, slot_animation_object, @@ -1098,7 +1098,7 @@ void cancel_hero_item_animation(void) { struct Hero *hero_state = &hero; if (hero_state->item_anim_active != 0) { if (hero_state->held_item_anim_blend[0] != 0) { - hero_state->unkD14 = 1; + hero_state->arm_layer_fade = 1; } else if (hero_state->state.current == 0) { unsigned char *hero_moby = (unsigned char *)hero_state->moby; if (hero_moby[0x53] == hero_state->item_hold_anim) { @@ -1162,8 +1162,8 @@ void update_hero_held_items_and_orientation(void) { struct Hero *pose_owner = &hero; advance_moby_animation_blend(pose_owner->moby, *current); - if (pose_owner->unkD14 != 0) { - if (pose_owner->unkD14 == 2) { + if (pose_owner->arm_layer_fade != 0) { + if (pose_owner->arm_layer_fade == 2) { approach_value((float *)(*current + 8), 0.0f, frame_scale * 0.25f); } else { approach_value((float *)(*current + 8), 0.0f, frame_scale * 0.07f); @@ -1180,7 +1180,7 @@ void update_hero_held_items_and_orientation(void) { continue; } if (pose_owner->weapon_up == 0) { - pose_owner->unkD14 = 1; + pose_owner->arm_layer_fade = 1; *(int *)(*current + 0x28) = 0; pose_owner->item_anim_active = 0; return; @@ -1855,7 +1855,7 @@ void clear_hero_item_slot(int i, int respawn_threshold) { /* Ported from rac1-decomp (src/overlays/shared/help_0020CDF0.c: func_L00_00210418), where it is exact; names translated to the US level program. */ -/* For the listed ids sets hero.unk22CE to 3 and hero.unk1DC to scale_game_frames(0x46). */ +/* For the listed ids sets hero.face_expression to 3 and hero.face_expression_timer to scale_game_frames(0x46). */ void set_hero_condition_animation_timer_for_item(int id) __asm__("FUN_L00_0020fd80"); void set_hero_condition_animation_timer_for_item(int id) { @@ -1868,15 +1868,15 @@ void set_hero_condition_animation_timer_for_item(int id) { case 16: case 23: hero_condition_animation_state = &hero; - hero_condition_animation_state->unk22CE = 3; - hero_condition_animation_state->unk1DC = scale_game_frames(0x46); + hero_condition_animation_state->face_expression = 3; + hero_condition_animation_state->face_expression_timer = scale_game_frames(0x46); break; } } /* Ported from rac1-decomp (src/overlays/shared/help_0020CDF0.c: func_L00_00210478), where it is exact; names translated to the US level program. */ -/* Sets the short at hero.unk1DA to scale_game_frames(0x46) for the listed ids. */ +/* Sets the short at hero.item_swap_timer to scale_game_frames(0x46) for the listed ids. */ void set_hero_item_switch_timer_for_item(int id) __asm__("FUN_L00_0020fde0"); void set_hero_item_switch_timer_for_item(int id) { @@ -1892,7 +1892,7 @@ void set_hero_item_switch_timer_for_item(int id) { case 22: case 23: case 26: - hero.unk1DA = scale_game_frames(0x46); + hero.item_swap_timer = scale_game_frames(0x46); break; } } @@ -2344,14 +2344,14 @@ void enter_hero_vehicle_mode(int mode, int requested_state, char *vehicle_moby) hero_state = &hero; hero_state->force_slot0_item8 = 1; hero_update_items(); - hero_state->moby = (struct Moby *)hero_state->unkA88; + hero_state->moby = (struct Moby *)hero_state->base_moby; clear_moby_transform_history(&hero_state->trail); hero_state->moby->collision_disable = -1; set_hero_item_moby_flag_bit0(); release_and_clear_hero_voice_slots(); reset_hero_easing_records(); hero_state->vehicle_mode = mode; - hero_state->unkA84 = (u8 *)vehicle_moby; + hero_state->replacement_moby = (u8 *)vehicle_moby; hero_state->moby = (struct Moby *)vehicle_moby; update_hero_collision_capsule_dimensions(); hero_state->capsule_top = hero_state->capsule_top_target; @@ -2362,10 +2362,10 @@ void enter_hero_vehicle_mode(int mode, int requested_state, char *vehicle_moby) clear_hero_queued_animation(); FUN_L00_00257024_210a08((char *)hero_state->moby); apply_hero_and_item_scale_sequence(); - hero_state->unk22CC = requested_state; + hero_state->requested_state = requested_state; switch (mode) { case HERO_VEHICLE_MODE_CLANK: - hero_state->health.unk22B0 = *(unsigned short *)&hero_state->health.hp; + hero_state->health.saved_hp = *(unsigned short *)&hero_state->health.hp; hero_state->health.hp = hero_state->health.vehicle_mode_hp; break; case HERO_VEHICLE_MODE_GIANT_CLANK: @@ -2385,7 +2385,7 @@ void exit_hero_vehicle_mode(void) { unsigned char *vehicle_moby; if (hero_state->vehicle_mode == HERO_VEHICLE_MODE_CLANK) { hero_state->health.vehicle_mode_hp = hero_state->health.hp; - hero_state->health.hp = hero_state->health.unk22B0; + hero_state->health.hp = hero_state->health.saved_hp; if (hero_state->unk1620) { mark_moby_for_removal(hero_state->unk1620); hero_state->unk1620 = 0; @@ -2398,27 +2398,27 @@ void exit_hero_vehicle_mode(void) { { struct Hero *vehicle_animation_owner = &hero; if (vehicle_animation_owner->vehicle_mode == HERO_VEHICLE_MODE_GIANT_CLANK && - vehicle_animation_owner->unk1634 != -1) { - set_animation_parameter(vehicle_animation_owner->unk1634, 0); - vehicle_animation_owner->unk1634 = -1; + vehicle_animation_owner->vehicle_anim_handle != -1) { + set_animation_parameter(vehicle_animation_owner->vehicle_anim_handle, 0); + vehicle_animation_owner->vehicle_anim_handle = -1; } reset_hero_easing_records(); } { struct Hero *vehicle_exit_owner = &hero; vehicle_exit_owner->vehicle_mode = HERO_VEHICLE_MODE_ON_FOOT; - vehicle_moby = vehicle_exit_owner->unkA84; + vehicle_moby = vehicle_exit_owner->replacement_moby; if (vehicle_moby) { MOBY(vehicle_moby)->flags &= ~6; } - vehicle_exit_owner->unkA84 = 0; + vehicle_exit_owner->replacement_moby = 0; if (vehicle_exit_owner->vehicle_mode3_moby) { mark_moby_for_removal(vehicle_exit_owner->vehicle_mode3_moby); vehicle_exit_owner->vehicle_mode3_moby = 0; } release_and_clear_hero_voice_slots(); { - unsigned char *restored_hero_moby = vehicle_exit_owner->unkA88; + unsigned char *restored_hero_moby = vehicle_exit_owner->base_moby; vehicle_exit_owner->moby = (struct Moby *)restored_hero_moby; qcopy(restored_hero_moby + 0x10, &vehicle_exit_owner->motion.pos); MOBY(restored_hero_moby)->collision_disable = 0; @@ -2697,7 +2697,7 @@ void update_hero_collision_capsule_dimensions(void) { } if (hero.state.control_mode == HERO_MODE_JUMP) { if (hero.state_timer > hero.takeoff_frame && hero.past_jump_apex == 0) - hero.capsule_bottom_target = hero.unk434; + hero.capsule_bottom_target = hero.air_capsule_bottom; } else if (hero.state.current == HERO_STATE_FALL) { hero.capsule_bottom_target = 0.5f; } else if (hero.state.current == HERO_STATE_CROUCH) { @@ -3473,7 +3473,7 @@ void update_hero_ground_contact_and_surface_slopes(void) { break; } hero.ground_pitch.i = 0; - hero.unk2E8.i = 0; + hero.ground_roll.i = 0; hero.side_probe_roll.i[0] = 0; hero.side_probe_roll.i[1] = 0; hero.side_probe_pitch.i[0] = 0; @@ -3493,7 +3493,7 @@ void update_hero_ground_contact_and_surface_slopes(void) { hero.ground_pitch.f = ground_offset_or_angles.f[1]; } if (-0.78539819f < ground_offset_or_angles.f[0] && ground_offset_or_angles.f[0] < 0.78539819f) { - hero.unk2E8.f = ground_offset_or_angles.f[0]; + hero.ground_roll.f = ground_offset_or_angles.f[0]; } for (i = 0; i < 2; i++) { side_probe_angle = 1.5707964f; @@ -3520,7 +3520,7 @@ void update_hero_ground_contact_and_surface_slopes(void) { } else { hero.side_probe_drop.i[i] = 0; hero.side_probe_pitch.f[i] = hero.ground_pitch.f; - hero.side_probe_roll.f[i] = hero.unk2E8.f; + hero.side_probe_roll.f[i] = hero.ground_roll.f; } } } @@ -3682,8 +3682,9 @@ s32 resolve_hero_current_position_collisions(s32 mode) { hero.path_constrain_pending = 0; } if (hero.state.control_mode != HERO_MODE_SWIM) { - if (hero.gravity_mode != HERO_GRAVITY_WORLD_DOWN || hero.unk1F8 != 0) { - if (hero.gravity_mode == HERO_GRAVITY_OPPOSITE_GROUND_NORMAL || hero.unk1F8 != 0) { + if (hero.gravity_mode != HERO_GRAVITY_WORLD_DOWN || hero.magnet_walk_timer != 0) { + if (hero.gravity_mode == HERO_GRAVITY_OPPOSITE_GROUND_NORMAL || + hero.magnet_walk_timer != 0) { add_hero_up_offset(&collision_probe_offset, &collision_probe_offset, 0.6f); } else { add_hero_gravity_offset( @@ -4236,24 +4237,27 @@ void hero_integrate_velocity(void) { } } else { no_lift = 0; - if (hero.unk428 == 0.0f && hero.unk42C == 0.0f) { + if (hero.pending_jump_impulse == 0.0f && hero.jump_impulse_total == 0.0f) { no_lift = 1; } if ((pad_held_lui & 0x40) || no_lift || hero.state.current == 0x12) { - if (hero.jump_height < hero.unk48C && !(scale_game_frames(15) < hero.state_timer)) { - hero.jump_height += (hero.unk48C - hero.jump_height_start) / hero.jump_ramp_frames; - if (hero.unk48C < hero.jump_height) { - hero.jump_height = hero.unk48C; + if (hero.jump_height < hero.jump_height_target && + !(scale_game_frames(15) < hero.state_timer)) { + hero.jump_height += + (hero.jump_height_target - hero.jump_height_start) / hero.jump_ramp_frames; + if (hero.jump_height_target < hero.jump_height) { + hero.jump_height = hero.jump_height_target; } - hero.unk428 += + hero.pending_jump_impulse += square_root((hero.jump_height + hero.jump_height) * hero.jump_gravity) - - hero.unk42C - hero.unk428; + hero.jump_impulse_total - hero.pending_jump_impulse; } } - if (!(hero.state_timer < hero.takeoff_frame) && 0.0f < hero.unk428) { - add_hero_up_offset(&hero.motion.velocity, &hero.motion.velocity, hero.unk428); - hero.unk42C += hero.unk428; - hero.unk428 = 0.0f; + if (!(hero.state_timer < hero.takeoff_frame) && 0.0f < hero.pending_jump_impulse) { + add_hero_up_offset( + &hero.motion.velocity, &hero.motion.velocity, hero.pending_jump_impulse); + hero.jump_impulse_total += hero.pending_jump_impulse; + hero.pending_jump_impulse = 0.0f; } if (hero.velocity_keys_active != 0) { if (hero.state_timer < hero.velocity_keys_start_frame) { diff --git a/src/overlays/shared/hero/hero_update_hop_movement.c b/src/overlays/shared/hero/hero_update_hop_movement.c index 3f999d3808..229a58bd7e 100644 --- a/src/overlays/shared/hero/hero_update_hop_movement.c +++ b/src/overlays/shared/hero/hero_update_hop_movement.c @@ -114,7 +114,7 @@ void hero_update_hop_movement(void) { } else if (state == HERO_STATE_HIGH_JUMP || state == HERO_STATE_STORED_HEADING_JUMP) { hero.motion.move_yaw = hero.takeoff_yaw; turn_to(0, ED64 * 0.04f, ED64 * 0.2f, ED6C * 6.981317f); - if (hero.unk450 != 3) { + if (hero.jump_stick_direction != 3) { hero.ground_speed = hero.air_target_speed; } else { hero.ground_speed = 0.0f; @@ -187,7 +187,7 @@ void hero_update_hop_movement(void) { velocity_change_step = ED70 * 2.0f; } } - if (hero.unk4A8 && hero.on_ice_ground) { + if (hero.took_off_from_ice && hero.on_ice_ground) { velocity_change_step = ED70 * 0.17f; if (hero.state.current == 15) { stick_target(0, ED6C * 2.5f); diff --git a/src/overlays/shared/hero/hero_update_movement.c b/src/overlays/shared/hero/hero_update_movement.c index fe80c4836b..ea1f6b732e 100644 --- a/src/overlays/shared/hero/hero_update_movement.c +++ b/src/overlays/shared/hero/hero_update_movement.c @@ -594,8 +594,8 @@ void hero_update_movement(void) { swim_pitch_delta = fast_subtract_rotations(hero.motion.rot.f[1], old); stick_target(1.0f, 0); turn_to(0, frame_scale_sq * 0.007f, frame_scale_sq * 0.08f, frame_time * 5.2359877f); - hero.unk8EC = hero.motion.yaw_rate; - fast_dec_timer(&hero.unk8F4); + hero.swim_yaw_rate = hero.motion.yaw_rate; + fast_dec_timer(&hero.swim_thrust_timer); if (hero.state.step == 1) { hero.target_speed = frame_time * 6.0f; } else if (hero.state.current == 0x35) { @@ -720,7 +720,7 @@ void hero_update_movement(void) { qcopy(&hero.motion.velocity, &hero.motion.momentum); } clip_hero_velocity_against_probed_surfaces(0); - t = hero.unk8EC * fast_cos(yaw) * -7.0f; + t = hero.swim_yaw_rate * fast_cos(yaw) * -7.0f; spring_angle(&hero.motion.rot.f[0], t, &hero.swim_lean_vel, @@ -934,10 +934,11 @@ void hero_update_movement(void) { f32 hit2; qcopy(&movement_and_hit_descriptor_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &movement_and_hit_descriptor_scratch); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &movement_and_hit_descriptor_scratch); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { - hero.target_arrival_frames = hero.unk970 / hero.motion.speed_xy; + hero.target_arrival_frames = hero.grapple_target_dist / hero.motion.speed_xy; } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); @@ -952,7 +953,7 @@ void hero_update_movement(void) { &hit2, -(frame_time_sq * 42.0f) * 0.5f, hero.grapple_pull_speed, - -(hero.unk970 - 1.9f)) > 0 && + -(hero.grapple_target_dist - 1.9f)) > 0 && hit > 0.0f) { hero.target_arrival_frames = hit; hero.state.step = 1; @@ -995,7 +996,8 @@ void hero_update_movement(void) { hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&movement_and_hit_descriptor_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); - hero.unk970 = fast_vec_dist(&hero.motion.pos, &movement_and_hit_descriptor_scratch); + hero.grapple_target_dist = + fast_vec_dist(&hero.motion.pos, &movement_and_hit_descriptor_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&movement_vector_scratch, &v10, &movement_and_hit_descriptor_scratch); fast_vec_normalize(&movement_vector_scratch, &movement_vector_scratch, hero.tether_radius); @@ -1091,7 +1093,7 @@ void hero_update_movement(void) { f32 s; if (vector_distance_xy(&hero.motion.pos, &((struct MobyView *)hero.swing_target_moby)->u10.v10) < - hero.unk9A0 * 1.57f || + hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.displacement, frame_time_sq * 40.0f); @@ -1139,9 +1141,9 @@ void hero_update_movement(void) { old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, &hero.swing_length_vel, - hero.unk9A0, + hero.swing_rope_target_length, hero.swing_rope_spring_k, - hero.unk9C8, + hero.swing_rope_damping, hero.swing_rope_max_speed); d = hero.swing_rope_length - old; if (fast_vec_length(&vC0) > hero.swing_rope_length) { @@ -1171,7 +1173,7 @@ void hero_update_movement(void) { f32 t; s32 up; hero.swing_entry_push = 0; - t = square_root(hero.unk9A0 / hero.swing_gravity) * 3.1415927f; + t = square_root(hero.swing_rope_target_length / hero.swing_gravity) * 3.1415927f; if (hero.swing_anim_dir != 0) { up = hero.swing_anim_dir == 1; } else { @@ -1726,11 +1728,11 @@ void hero_update_movement(void) { emit_hero_randomized_motion_effects(5, 2); } if (hero.motion.flat_speed < frame_time * 0.3f && hero.stick_magnitude > 0.85f) { - hero.unk3B8 = 1; + hero.move_along_stick = 1; } if (absolute_float(hero.motion.yaw_error) < 0.05235988f || hero.item_anim_active != 0 || hero.state.step == 1) { - hero.unk3B8 = 0; + hero.move_along_stick = 0; } if (hero.sharp_turn != 0 && (absolute_float(hero.motion.yaw_error) < 0.06981317f || hero.item_anim_active != 0)) { @@ -1789,7 +1791,7 @@ void hero_update_movement(void) { } speed_step(a, b); } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -1992,7 +1994,7 @@ void hero_update_movement(void) { &hero.prev_rail_point, &hero.prev_rail_segment, &hero.prev_rail_seg_frac, - hero.unk5A0, + hero.prev_rail_spline_loops, 999.0f, 2.0f, 2.5f); @@ -2012,7 +2014,7 @@ void hero_update_movement(void) { hero.rail_off_frames++; break; } - r = hero.unk574 * (f32)hero.grind_direction; + r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { r = hero.unk5CC * (f32)hero.grind_direction; } @@ -2028,7 +2030,7 @@ void hero_update_movement(void) { &hero.prev_rail_segment, &hero.prev_rail_seg_frac, r, - hero.unk5A0); + hero.prev_rail_spline_loops); } if (scale_game_frames(90) < hero.control_mode_timer) { s32 h; @@ -2276,20 +2278,20 @@ void hero_update_movement(void) { hero.grind_pose = -1; } } - if (hero.unk5AC.f < sp) { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 8.0f); + if (hero.grind_speed_boost.f < sp) { + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 8.0f); } else { - approach_value(&hero.unk5AC.f, sp, frame_time_sq * 2.0f); + approach_value(&hero.grind_speed_boost.f, sp, frame_time_sq * 2.0f); } - if (hero.unk5AC.f > frame_time * 12.0f) { - hero.unk5AC.f = frame_time * 12.0f; + if (hero.grind_speed_boost.f > frame_time * 12.0f) { + hero.grind_speed_boost.f = frame_time * 12.0f; } - if (hero.unk5AC.f < D_0015ED6C_a * -2.5f) { - hero.unk5AC.f = D_0015ED6C_a * -2.5f; + if (hero.grind_speed_boost.f < D_0015ED6C_a * -2.5f) { + hero.grind_speed_boost.f = D_0015ED6C_a * -2.5f; } - hero.unk574 = hero.grind_base_speed + hero.unk5AC.f; - if (hero.unk574 < 0.0f) { - hero.unk574 = 0.0f; + hero.grind_speed = hero.grind_base_speed + hero.grind_speed_boost.f; + if (hero.grind_speed < 0.0f) { + hero.grind_speed = 0.0f; } fast_vec_sub( &hero.motion.velocity, &movement_and_hit_descriptor_scratch, &hero.rail_point); @@ -2414,19 +2416,19 @@ void hero_update_movement(void) { f32 len; fl = -fast_vec_length(&spatial_and_hit_descriptor_scratch); vendor_spring(&fl, - &hero.unk618.f, + &hero.follow_path_pull_speed.f, 0.0f, frame_scale_sq * 0.05f, frame_scale_sq * 0.3f, frame_time * 10.0f); len = fast_vec_length(&spatial_and_hit_descriptor_scratch); - if (len < hero.unk618.f) { - hero.unk618.f = len; + if (len < hero.follow_path_pull_speed.f) { + hero.follow_path_pull_speed.f = len; } - if (hero.unk618.f < len) { + if (hero.follow_path_pull_speed.f < len) { fast_vec_normalize(&spatial_and_hit_descriptor_scratch, &spatial_and_hit_descriptor_scratch, - hero.unk618.f); + hero.follow_path_pull_speed.f); } fast_vec_add(&hero.motion.pos, &hero.motion.pos, &spatial_and_hit_descriptor_scratch); } @@ -2439,7 +2441,7 @@ void hero_update_movement(void) { step_angle_toward_target(&hero.motion.rot.f[1], 0, 0.0f, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 4.0f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_ALT_LEDGE_HANG_ENTRY: case HERO_STATE_ALT_LEDGE_HANG: @@ -2447,7 +2449,7 @@ void hero_update_movement(void) { turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.2f, frame_time * 4.712389f); fast_vec_sub(&hero.motion.velocity, &hero.ledge_hang_pos, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 1.7f); - approach_value(&hero.unk4F0, hero.motion.pos.f[2], frame_time * 3.0f); + approach_value(&hero.smoothed_air_z, hero.motion.pos.f[2], frame_time * 3.0f); break; case HERO_STATE_LEDGE_SHIMMY_POSITIVE_YAW: case HERO_STATE_LEDGE_SHIMMY_NEGATIVE_YAW: { @@ -2692,7 +2694,7 @@ void hero_update_movement(void) { allocate_hero_voice_for_entry(4, 0); } } - if (hero.unk4A8 != 0 && hero.on_ice_ground != 0) { + if (hero.took_off_from_ice != 0 && hero.on_ice_ground != 0) { hero.target_speed = hero.ground_speed; } else { if (hero.rail_land_frames != 0) { @@ -2728,7 +2730,7 @@ void hero_update_movement(void) { hero.state.current != HERO_STATE_PACK_LONG_JUMP && hero.state.current != 0xC && hero.state.current != 0x11 && hero.state.current != 0x1C && hero.state.current != 0x4C)) { - if (hero.unk4A8 != 0) { + if (hero.took_off_from_ice != 0) { update_hero_planar_movement_velocity(); if (hero.state.current == HERO_STATE_PACK_JUMP && hero.state_timer < scale_game_frames(10) && @@ -3106,7 +3108,7 @@ void hero_update_movement(void) { 0, frame_scale_sq * 0.008f * g, frame_scale_sq * 0.15f, frame_time * 9.948377f * g); } speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -3463,7 +3465,7 @@ void hero_update_movement(void) { hero_eases[27].rot_target.f[2] = a * 0.25f; hero_eases[28].rot_target.f[2] = a * 0.57f; } - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); @@ -3551,7 +3553,7 @@ void hero_update_movement(void) { } turn_to(0, frame_scale_sq * 0.035f * g, frame_scale_sq * 0.1f, frame_time * 2.268928f * g); speed_step(frame_time_sq * 7.5f * k, frame_time_sq * 8.5f); - if (hero.unk3B8 != 0 && hero.magnetic_floor == 0) { + if (hero.move_along_stick != 0 && hero.magnetic_floor == 0) { set_planar_vel(hero.motion.move_yaw); } else { set_planar_vel(99999.0f); diff --git a/src/overlays/shared/hero/hero_update_transitions.c b/src/overlays/shared/hero/hero_update_transitions.c index dd21eab5c4..ae2794fc99 100644 --- a/src/overlays/shared/hero/hero_update_transitions.c +++ b/src/overlays/shared/hero/hero_update_transitions.c @@ -201,9 +201,10 @@ void hero_update_transitions(void) { if ((controller_state.pressed & 0x10) || (controller_state.pressed_unmasked & 0x10)) { if (hero.items[0].switch_lock != 2 && D_L00_0015F594 == 0 && (hero.item_use_locked == 0 || hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || - hero.unk1B2 != 0) && + hero.item_select_override_timer != 0) && (hero.item_select_blocked == 0 || - hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || hero.unk1B2 != 0)) { + hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK || + hero.item_select_override_timer != 0)) { switch (hero.vehicle_mode) { case HERO_VEHICLE_MODE_ON_FOOT: case 3: { @@ -391,7 +392,7 @@ void hero_update_transitions(void) { int anim = item_defs[id].hero_animation; if (hero.moby->prev_seq != anim) { if (hero.held_item_anim_blend[0] != 0) { - hero.unkD14 = 1; + hero.arm_layer_fade = 1; } hero.item_hold_anim = anim; set_hero_animation(hero.item_hold_anim, 0, scale_game_frames(0xB)); @@ -747,7 +748,7 @@ void hero_update_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } hero_set_state(HERO_STATE_IDLE, 1); @@ -756,7 +757,7 @@ void hero_update_transitions(void) { if (controller_state.held & hero.items[0].button_mask) { break; } - if (hero.unk1D0 != 0) { + if (hero.idle_return_delay != 0) { break; } if (hero.moby->prev_seq == 0x36) { @@ -999,7 +1000,7 @@ void hero_update_transitions(void) { } } if (MOBY(moby)->prev_seq == 0x37) { - hero.anim_speed = (1.0f - hero.unk3B0) * 2.0f; + hero.anim_speed = (1.0f - hero.run_speed_ratio) * 2.0f; if (hero.anim_speed > 1.7f) { hero.anim_speed = 1.7f; } @@ -1056,7 +1057,7 @@ void hero_update_transitions(void) { } break; case HERO_STATE_AT_TARGET_POSE: - if ((hero.anim_flags & 2) || hero.unk1650 != 0) { + if ((hero.anim_flags & 2) || hero.state_entry_option != 0) { hero_set_state(HERO_STATE_IDLE, 1); } if (0.2f < vector_distance_xy(hero.motion.pos.f, hero.target_pose.f)) { @@ -1120,7 +1121,7 @@ void hero_update_transitions(void) { hero_set_state(HERO_STATE_FALL, 1); break; } - hero.unk1F8 = scale_game_frames(0x28); + hero.magnet_walk_timer = scale_game_frames(0x28); if (absolute_float(hero.motion.rot.f[1]) > 0.7853982f || absolute_float(hero.motion.rot.f[0]) > 0.7853982f) { hero.ledge_probe_cooldown = scale_game_frames(0x28); @@ -1272,7 +1273,7 @@ void hero_update_transitions(void) { int go = 0; if (!(controller_state.held & hero.items[0].button_mask)) { if ((float)scale_game_frames(0x19) < hero.target_arrival_frames) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } go = 1; } @@ -1323,7 +1324,7 @@ void hero_update_transitions(void) { } if (scale_game_frames(0xA) < hero.state_timer) { if (scale_game_frames(0x28) > hero.state_timer) { - hero.unk988 = 1; + hero.swingshot_missed = 1; } hero_set_state(0x2D, 1); hero.stickless_decel = frame_time_sq * 7.0f; @@ -1420,9 +1421,9 @@ void hero_update_transitions(void) { 3.1415927f); ang = fast_add_rotations(ang, randf_sym(0.5235988f, 0.61086524f)); hero.motion.resolved_velocity.f[0] = - fast_cos(ang) * hero.unk574 * 0.7f; + fast_cos(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[1] = - fast_sin(ang) * hero.unk574 * 0.7f; + fast_sin(ang) * hero.grind_speed * 0.7f; hero.motion.resolved_velocity.f[2] = frame_time * 4.5f; } if (scale_game_frames(0xF) < hero.rail_off_frames && @@ -1430,7 +1431,7 @@ void hero_update_transitions(void) { hero.health.hp = 2; } hero_set_state(HERO_STATE_HURT, 1); - hero.unk1C8 = scale_game_frames(0x46); + hero.grind_catch_lockout = scale_game_frames(0x46); break; } } @@ -1449,7 +1450,7 @@ void hero_update_transitions(void) { } if (go) { if (pad_pressed_within(0x40, scale_game_frames(7), 0)) { - if (hero.unk5B8 != 0) { + if (hero.rail_jump_armed != 0) { hero.rail_jump_queued = 1; break; } @@ -1462,7 +1463,7 @@ void hero_update_transitions(void) { hero.move_lock_timer = scale_game_frames(0x46); } hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } if (pad_pressed_within(0x80, scale_game_frames(7), 0)) { @@ -1480,7 +1481,7 @@ void hero_update_transitions(void) { set_hero_animation(a, 0, scale_game_frames(0xC)); } } - if (hero.unk5BC != 0) { + if (hero.rail_jump_trigger != 0) { if (hero.rail_jump_queued != 0) { float t; @@ -1499,11 +1500,11 @@ void hero_update_transitions(void) { hero.jump_height_start = t; hero.jump_gravity = hero.rail_jump_gravity; hero.jump_height = t; - hero.unk48C = t + 0.05f; + hero.jump_height_target = t + 0.05f; } } - hero.unk5B8 = 0; - hero.unk5BC = 0; + hero.rail_jump_armed = 0; + hero.rail_jump_trigger = 0; } else if (hero.state.current == 0x2B) { int n; @@ -1528,7 +1529,7 @@ void hero_update_transitions(void) { } if (scale_game_frames(5) < hero.rail_off_frames) { hero_set_state(HERO_STATE_FALL, 1); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); } } else if (hero.state.current == 0x29 || hero.state.current == 0x2A) { if ((scale_game_frames(5) < hero.rail_off_frames || @@ -1540,7 +1541,7 @@ void hero_update_transitions(void) { } if (hero.state.current == 0x29 && hero.state_timer < scale_game_frames(0xA) && hero.past_jump_apex == 0 && - hero.unk12EE == 0 && hero.stick_magnitude > 0.5f && + hero.grind_jump_block == 0 && hero.stick_magnitude > 0.5f && hero.rail_switching == 0) { stick_target(0, 1.0f); if (fast_difference_between_rotations( @@ -1591,7 +1592,7 @@ void hero_update_transitions(void) { hero.transfer_from_spline = hero.rail_spline; hero.prev_rail_segment = hero.rail_segment; hero.prev_rail_seg_frac = hero.rail_seg_frac; - hero.unk5A0 = hero.rail_spline_loops; + hero.prev_rail_spline_loops = hero.rail_spline_loops; qcopy(hero.prev_rail_point.f, hero.rail_point.f); hero.rail_spline = new_path; hero.rail_spline_loops = new_loop; @@ -1670,7 +1671,7 @@ void hero_update_transitions(void) { if (-0.5f > hero.motion.pos.f[2] - hero.rail_point.f[2]) { hero_set_state(HERO_STATE_FALL, 1); hero.move_lock_timer = scale_game_frames(0x46); - hero.unk1C8 = scale_game_frames(8); + hero.grind_catch_lockout = scale_game_frames(8); break; } } @@ -2408,7 +2409,7 @@ void hero_update_transitions(void) { hero.state.current == HERO_STATE_PACK_LONG_JUMP) { if (scale_game_frames(0x19) < hero.state_timer && hero.on_flagged_ground_moby != 0) { - hero.unk4A6 = scale_game_frames(0x14); + hero.pack_glide_delay = scale_game_frames(0x14); } } { @@ -2424,7 +2425,7 @@ void hero_update_transitions(void) { approach_value(&hero.anim_speed, 1.3f, frame_scale * 0.1f); } delay = scale_game_frames(0x11); - hero.unk4A6 = delay; + hero.pack_glide_delay = delay; } n = hero.state_timer - 4; if (n < 2) { @@ -2452,7 +2453,7 @@ void hero_update_transitions(void) { hero.pack_disabled == 0 && (controller_state.held & 0x40) && delay < hero.state_timer && - hero.unk4A6 < hero.state_timer) { + hero.pack_glide_delay < hero.state_timer) { float lim = 0.6f; if (hero.state.current == HERO_STATE_RUN_JUMP || hero.state.current == HERO_STATE_JUMP) { diff --git a/src/overlays/shared/hero/initialize_hero.c b/src/overlays/shared/hero/initialize_hero.c index 802cdc8aee..ca6c5bc561 100644 --- a/src/overlays/shared/hero/initialize_hero.c +++ b/src/overlays/shared/hero/initialize_hero.c @@ -52,7 +52,7 @@ void initialize_hero(void) { if (z > 0.0f) hero.moby->pos.z = z; hero.moby->flags |= 2; - hero.unkA88 = (u8 *)hero.moby; + hero.base_moby = (u8 *)hero.moby; hero.motion.rot.f[2] = hero.moby->rot.z; qcopy(&hero.motion.pos, &hero.moby->pos); update_hero_ground_contact_and_surface_slopes(); @@ -87,7 +87,7 @@ void initialize_hero(void) { hero.reach_distance = 2.125f; hero.reach_height = 1.25f; hero.health.vehicle_mode_hp = 4; - hero.health.unk22B0 = hero.health.hp; + hero.health.saved_hp = hero.health.hp; hero.head_look_timer = random_int_between(scale_game_frames(0xB4), scale_game_frames(0x12C)); hero.idle_look_ease_rate = 0.007f; hero.unk1018 = 0.3f; diff --git a/src/overlays/shared/hero/process_hero_item_action_input.c b/src/overlays/shared/hero/process_hero_item_action_input.c index 3a37e8f581..5c16ecf04f 100644 --- a/src/overlays/shared/hero/process_hero_item_action_input.c +++ b/src/overlays/shared/hero/process_hero_item_action_input.c @@ -272,7 +272,7 @@ void hero_update_hop_velocity(void) { } else if (state == HERO_STATE_HIGH_JUMP || state == HERO_STATE_STORED_HEADING_JUMP) { hero.motion.move_yaw = hero.takeoff_yaw; turn_to(0, ED64 * 0.04f, ED64 * 0.2f, ED6C * 6.981317f); - if (hero.unk450 != 3) { + if (hero.jump_stick_direction != 3) { hero.ground_speed = hero.air_target_speed; } else { hero.ground_speed = 0.0f; @@ -382,7 +382,7 @@ extern void open_vendor_menu(s32) __asm__("FUN_L00_0029a6b0"); * state (hero_set_state) or gadget action once the buttons were pressed within * a frame window (pad_pressed_within). Afterwards, when the state did not change, * it handles the 0x81 state on button 8 (D_L02_0015F674 counts the window down) - * or clears hero.unk22CA. Returns nonzero when the hero state changed. + * or clears hero.hover_latch. Returns nonzero when the hero state changed. */ s32 process_hero_item_action_input(void) __asm__("FUN_L02_0022ee00"); @@ -457,9 +457,9 @@ s32 process_hero_item_action_input(void) { hero.state.current == HERO_STATE_FALL || (hero.state.current == 0xE && hero.anim_frame > 32.0f) || (hero.state.current == HERO_STATE_HIGH_JUMP && - (hero.unk450 != 3 && hero.anim_frame > 18.0f) || - (hero.state.current == HERO_STATE_HIGH_JUMP && hero.unk450 == 3 && - hero.anim_frame > 20.0f)) || + (hero.jump_stick_direction != 3 && hero.anim_frame > 18.0f) || + (hero.state.current == HERO_STATE_HIGH_JUMP && + hero.jump_stick_direction == 3 && hero.anim_frame > 20.0f)) || hero.state.current == 0x2D || hero.state.current == 0x11) && scale_game_frames(0xA) < hero.state_timer) { window = scale_game_frames(0xA); @@ -520,7 +520,7 @@ s32 process_hero_item_action_input(void) { hero.items[0].ready_frames > scale_game_frames(0xF))) { if (hero.swing_target_in_sight != 0) { if (hero.grapple_target_in_sight != 0) { - if (hero.swing_target_dist < hero.unk984) { + if (hero.swing_target_dist < hero.swing_max_range) { hero.grapple_target_in_sight = 0; } else { hero.swing_target_in_sight = 0; @@ -596,7 +596,7 @@ s32 process_hero_item_action_input(void) { hero.state.control_mode == HERO_MODE_CROUCH || hero.state.control_mode == HERO_MODE_LAND || hero.state.control_mode == HERO_MODE_GRIND || - (hero.state.control_mode == HERO_MODE_JUMP && hero.unk4AC != 0) || + (hero.state.control_mode == HERO_MODE_JUMP && hero.can_use_item_in_jump != 0) || (hero.state.current == 0x23 && hero.anim_frame > 25.0f)) { if (hero.item_anim_active == 0) { s32 hold; diff --git a/src/overlays/shared/hero/process_hero_primary_item_input.c b/src/overlays/shared/hero/process_hero_primary_item_input.c index ac469ab4f2..d51c21b355 100644 --- a/src/overlays/shared/hero/process_hero_primary_item_input.c +++ b/src/overlays/shared/hero/process_hero_primary_item_input.c @@ -763,10 +763,10 @@ int process_hero_primary_item_input(void) { ((*(Hero *)((char *)&hero)).state.current == 0xE && (*(Hero *)((char *)&hero)).anim_frame > 32.0f) || ((*(Hero *)((char *)&hero)).state.current == 0xB && - (*(Hero *)((char *)&hero)).unk450 != 3 && + (*(Hero *)((char *)&hero)).jump_stick_direction != 3 && (*(Hero *)((char *)&hero)).anim_frame > 18.0f) || ((*(Hero *)((char *)&hero)).state.current == 0xB && - (*(Hero *)((char *)&hero)).unk450 == 3 && + (*(Hero *)((char *)&hero)).jump_stick_direction == 3 && (*(Hero *)((char *)&hero)).anim_frame > 20.0f) || (*(Hero *)((char *)&hero)).state.current == 0x2D || (*(Hero *)((char *)&hero)).state.current == 0x11) { @@ -869,7 +869,7 @@ int process_hero_primary_item_input(void) { if ((*(Hero *)((char *)&hero)).swing_target_in_sight != 0) { if ((*(Hero *)((char *)&hero)).grapple_target_in_sight != 0) { if ((*(Hero *)((char *)&hero)).swing_target_dist < - (*(Hero *)((char *)&hero)).unk984) { + (*(Hero *)((char *)&hero)).swing_max_range) { (*(Hero *)((char *)&hero)).grapple_target_in_sight = 0; } else { (*(Hero *)((char *)&hero)).swing_target_in_sight = 0; @@ -968,7 +968,7 @@ int process_hero_primary_item_input(void) { (*(Hero *)((char *)&hero)).state.control_mode == HERO_MODE_LAND || (*(Hero *)((char *)&hero)).state.control_mode == HERO_MODE_GRIND || ((*(Hero *)((char *)&hero)).state.control_mode == HERO_MODE_JUMP && - (*(Hero *)((char *)&hero)).unk4AC != 0) || + (*(Hero *)((char *)&hero)).can_use_item_in_jump != 0) || ((*(Hero *)((char *)&hero)).state.current == 0x23 && (*(Hero *)((char *)&hero)).anim_frame > 25.0f)) { int window; @@ -1196,7 +1196,7 @@ void update_hero_hoverboard_trick_animations(void) { l05_hoverboard_trick_animation_frame_bounds[h->air_pose_index].seq); } else if ((float)h->anim_loop_frame - 2.0f < h->anim_frame) { h->tricks_landed[h->air_pose_index] = 1; - h->unk6F8 += 1; + h->tricks_landed_count += 1; } } } @@ -1859,11 +1859,11 @@ int hero_pick_help_mode(void) { D_L05_00174240.unk1C != 0) { CollisionHit *wall = &D_L05_00174240; if (1.2217305f < fast_arc_tan(wall->normal_z, vector_length_xy(&wall->normal_x))) { - player->unk8A4 = + player->wall_face_yaw = fast_add_rotations(fast_arc_tan(wall->normal_x, wall->normal_y), 3.1415927f); if (fast_difference_between_rotations( fast_arc_tan(player->motion.velocity.f[0], player->motion.velocity.f[1]), - player->unk8A4) < 0.7853982f) { + player->wall_face_yaw) < 0.7853982f) { state = HERO_STATE_HOVERBOARD_RESPAWN_ANIMATION_WAIT; if (!(player->ground_distance < 1.0f)) state = HERO_STATE_HOVERBOARD_RESPAWN_HEIGHT_OR_ANIMATION_WAIT; @@ -1968,7 +1968,7 @@ int hero_pick_help_mode(void) { continue_fall: if (alternate_item_available_lui[0]) { if (current_level_index == LEVEL_RILGAR && (&hero)->tricks_landed[4] == 4 && - (&hero)->unk70C > 3 && item_unlocked_lui[7] == 0) { + (&hero)->trick_combo_count > 3 && item_unlocked_lui[7] == 0) { item_unlocked_lui[7] = 1; allocate_voice_for_bank_entry(1, 0, 0); queue_dialogue_message(0x53D6, -1); @@ -2006,12 +2006,12 @@ void hero_update_linked_target(void) { struct Hero *hero_base = (struct Hero *)((char *)((unsigned char *)&D_0013E533) + 0xE1D); int path_owner_moby = *(int *)&hero_base->hoverboard_moby; - *(int *)&hero_base->unk2278 = 0; - hero_base->unk227C = 0; + *(int *)&hero_base->anim_link_moby = 0; + hero_base->anim_link_table = 0; if (path_owner_moby != 0) { if ((unsigned)(hero_base->state.control_mode - 0x15) < 2) { - *(int *)&hero_base->unk2278 = path_owner_moby; - hero_base->unk227C = (int)hero_hoverboard_animation_link_table; + *(int *)&hero_base->anim_link_moby = path_owner_moby; + hero_base->anim_link_table = (int)hero_hoverboard_animation_link_table; } } } diff --git a/src/overlays/shared/hero/set_hero_animation.c b/src/overlays/shared/hero/set_hero_animation.c index a25c7060b9..c825379415 100644 --- a/src/overlays/shared/hero/set_hero_animation.c +++ b/src/overlays/shared/hero/set_hero_animation.c @@ -284,18 +284,20 @@ void blend_hero_mapped_moby_animation(int animation_id, int frame_index, float b int mapped_animation_id[4]; int ok; - if (((void *)hero_mapped_animation_state->unk2278) != 0) { - if (hero_mapped_animation_state->unk227C != 0) { + if (((void *)hero_mapped_animation_state->anim_link_moby) != 0) { + if (hero_mapped_animation_state->anim_link_table != 0) { ok = lookup_s16_pair_value(animation_id, mapped_animation_id); if (ok != 0) { - blend_moby_animation(((void *)hero_mapped_animation_state->unk2278), + blend_moby_animation(((void *)hero_mapped_animation_state->anim_link_moby), mapped_animation_id[0], frame_index, (int)blend_frames); - } else if (*(unsigned char *)(((char *)hero_mapped_animation_state->unk2278) + 0x53) != - 0) { - blend_moby_animation( - ((void *)hero_mapped_animation_state->unk2278), 0, 0, scale_game_frames(7)); + } else if (*(unsigned char *)(((char *)hero_mapped_animation_state->anim_link_moby) + + 0x53) != 0) { + blend_moby_animation(((void *)hero_mapped_animation_state->anim_link_moby), + 0, + 0, + scale_game_frames(7)); } } } @@ -313,11 +315,11 @@ void sync_hero_mapped_moby_animation_speed(void) { struct Hero *hero_animation_speed_state = &hero; int mapped_animation_id[4]; - if (((void *)hero_animation_speed_state->unk2278) != 0 && - hero_animation_speed_state->unk227C != 0 && + if (((void *)hero_animation_speed_state->anim_link_moby) != 0 && + hero_animation_speed_state->anim_link_table != 0 && lookup_s16_pair_value(hero_animation_speed_state->moby->prev_seq, mapped_animation_id) != 0) { - *(float *)(((char *)hero_animation_speed_state->unk2278) + 0x58) = + *(float *)(((char *)hero_animation_speed_state->anim_link_moby) + 0x58) = hero_animation_speed_state->anim_speed; } } @@ -358,7 +360,7 @@ void sync_hero_mapped_moby_animation_frames(void) __asm__("FUN_L00_00232320"); void sync_hero_mapped_moby_animation_frames(void) { struct Hero *hero_animation_sync_state = &hero; - AnimState *animation_sync_target = ((AnimState *)hero_animation_sync_state->unk2278); + AnimState *animation_sync_target = ((AnimState *)hero_animation_sync_state->anim_link_moby); if (animation_sync_target == 0) { return; @@ -496,7 +498,7 @@ void set_hero_animation(int requested_animation_id, requested_animation_id, starting_frame_index, blend_frames_or_selector); } clear_hero_mapped_moby_animation_state(); - if (((int)hero_animation_dispatch_state->unk2278) != 0) { + if (((int)hero_animation_dispatch_state->anim_link_moby) != 0) { blend_hero_mapped_moby_animation( requested_animation_id, starting_frame_index, blend_frames_or_selector); } @@ -712,7 +714,7 @@ void set_hero_item_moby_flag_bit0(void) { char *hero_flag_target; int i; - *(unsigned short *)(((char *)hero_item_flag_state->unkA88) + 0x34) |= 1; + *(unsigned short *)(((char *)hero_item_flag_state->base_moby) + 0x34) |= 1; for (i = 0; i < 7; i++) { if (*(char **)&hero_item_flag_state->items[i].moby != 0) { *(unsigned short *)(*(char **)&hero_item_flag_state->items[i].moby + 0x34) |= 1; @@ -760,7 +762,7 @@ void update_hero_item_moby_flags(void) { char *hero_flag_target; int i; - *(unsigned short *)(*(char **)&hero_item_flag_clear_state->unkA88 + 0x34) &= ~1; + *(unsigned short *)(*(char **)&hero_item_flag_clear_state->base_moby + 0x34) &= ~1; for (i = 0; i < 7; i++) { if (*(char **)&hero_item_flag_clear_state->items[i].moby != 0) { *(unsigned short *)(*(char **)&hero_item_flag_clear_state->items[i].moby + 0x34) &= ~1; @@ -1364,7 +1366,7 @@ void request_hero_target_pose(void *source_position, void request_hero_target_pose(void *source_position, float f, int state_entry_option) { qcopy(&hero.target_pose, source_position); hero.target_pose.f[3] = f; - hero.unk1650 = state_entry_option; + hero.state_entry_option = state_entry_option; if ((unsigned)(hero.state.current - 0x65) >= 3) { hero_set_state(0x65, 1); } @@ -1710,7 +1712,7 @@ void update_hero_attachment(void) { extern int resolve_point_path_segment_clearance(int, void *, void *, float) __asm__("FUN_L00_00262030"); -/* Sets the short at &hero.unk1F6 to 4 when FUN_L00_00262030 succeeds. */ +/* Sets the short at &hero.pushed_timer to 4 when FUN_L00_00262030 succeeds. */ void resolve_hero_pending_path_clearance(void) __asm__("FUN_L00_002347c0"); void resolve_hero_pending_path_clearance(void) { @@ -1720,7 +1722,7 @@ void resolve_hero_pending_path_clearance(void) { &hero_path_clearance_state->motion.pos, &hero_path_clearance_state->motion.pos, hero_path_clearance_state->capsule_radius) != 0) { - hero_path_clearance_state->unk1F6 = 4; + hero_path_clearance_state->pushed_timer = 4; } } @@ -1738,17 +1740,18 @@ void animate_hero_slot4_and_slot5_visuals(void) { slot4_moby = (char *)hero.items[4].moby; if (slot4_moby) { if (X == 2) - hero.unk22E8 = fast_add_rotations(hero.unk22E8, DD * 1.2217305f); + hero.item4_glow_phase = fast_add_rotations(hero.item4_glow_phase, DD * 1.2217305f); else - hero.unk22E8 = fast_add_rotations(hero.unk22E8, DD * 2.0943952f); + hero.item4_glow_phase = fast_add_rotations(hero.item4_glow_phase, DD * 2.0943952f); MOBY(slot4_moby)->glow_color = - fast_tween_color(0xD2D2D2, 0x285050, fast_sin(hero.unk22E8) * 0.5f + 0.5f); + fast_tween_color(0xD2D2D2, 0x285050, fast_sin(hero.item4_glow_phase) * 0.5f + 0.5f); } slot4_secondary_moby = (char *)hero.items[4].moby2; if (slot4_secondary_moby) { if (X != 2) { f32 v; - hero.unk22EC = v = fast_add_rotations(hero.unk22EC, DD * 2.9670596f); + hero.item4_alt_glow_phase = v = + fast_add_rotations(hero.item4_alt_glow_phase, DD * 2.9670596f); slot4_secondary_target_color = 0x1EE628; if (0.0f < v && v < 1.9198622f) slot4_secondary_target_color = 0x1E1ED2; @@ -1756,7 +1759,8 @@ void animate_hero_slot4_and_slot5_visuals(void) { MOBY(slot4_secondary_moby)->glow_color, slot4_secondary_target_color, 0.07f); } else { f32 v; - hero.unk22EC = v = fast_add_rotations(hero.unk22EC, DD * 1.5707964f); + hero.item4_alt_glow_phase = v = + fast_add_rotations(hero.item4_alt_glow_phase, DD * 1.5707964f); MOBY(slot4_secondary_moby)->glow_color = fast_tween_color(0x1E1ED2, 0x1E1E50, fast_sin(v) * 0.5f + 0.5f); } @@ -1764,16 +1768,16 @@ void animate_hero_slot4_and_slot5_visuals(void) { slot5_moby = (char *)hero.items[5].moby; if (slot5_moby) { if (X == 2) - hero.unk22F0 = fast_add_rotations(hero.unk22EC, DD * 1.3962634f); + hero.item5_glow_phase = fast_add_rotations(hero.item4_alt_glow_phase, DD * 1.3962634f); else - hero.unk22F0 = fast_add_rotations(hero.unk22EC, DD * 1.9198622f); + hero.item5_glow_phase = fast_add_rotations(hero.item4_alt_glow_phase, DD * 1.9198622f); MOBY(slot5_moby)->glow_color = - fast_tween_color(0xAAC8AA, 0x965050, fast_sin(hero.unk22F0) * 0.5f + 0.5f); + fast_tween_color(0xAAC8AA, 0x965050, fast_sin(hero.item5_glow_phase) * 0.5f + 0.5f); if (slot5_moby) { if (!hero.unk1D90.attached) attach_manipulator(slot5_moby, 0, &hero.unk1D90); else - build_axis_rotation_quaternion(&hero.unk1D90.quat, 0, hero.unk22F0); + build_axis_rotation_quaternion(&hero.unk1D90.quat, 0, hero.item5_glow_phase); } } } diff --git a/src/overlays/shared/hero/update_hero_and_vehicle_mode_effects.c b/src/overlays/shared/hero/update_hero_and_vehicle_mode_effects.c index 755e6f8499..0c2f17df68 100644 --- a/src/overlays/shared/hero/update_hero_and_vehicle_mode_effects.c +++ b/src/overlays/shared/hero/update_hero_and_vehicle_mode_effects.c @@ -207,8 +207,8 @@ void update_hero_bobbing_and_target_position(void) { update_moby_vertical_oscillation(1.1f, frame_time * 5.2359877f, ((char *)hero_instance->moby), - (float *)(&hero_instance->unk6A8), - (float *)(&hero_instance->unk6AC)); + (float *)(&hero_instance->bob_phase), + (float *)(&hero_instance->bob_offset)); position_target = ((char *)hero_instance->hoverboard_moby); if (position_target != 0) { char *hero_moby; @@ -244,27 +244,27 @@ void restore_saved_hero_moby_and_clear_vehicle_mode(void) { void *moby_to_remove; char *restored_hero_moby; if (hero_state_for_vehicle_exit->vehicle_mode == HERO_VEHICLE_MODE_GIANT_CLANK) { - int animation_parameter_value = hero_state_for_vehicle_exit->unk1634; + int animation_parameter_value = hero_state_for_vehicle_exit->vehicle_anim_handle; if (animation_parameter_value != -1) { set_animation_parameter(animation_parameter_value, 0); - hero_state_for_vehicle_exit->unk1634 = -1; + hero_state_for_vehicle_exit->vehicle_anim_handle = -1; } } reset_hero_easing_records(); hero_state_bytes = (struct Hero *)(((unsigned char *)&D_0013E533) + 0xE1D); - flag_clear_target = *(int *)&hero_state_bytes->unkA84; + flag_clear_target = *(int *)&hero_state_bytes->replacement_moby; hero_state_bytes->vehicle_mode = HERO_VEHICLE_MODE_ON_FOOT; if (flag_clear_target != 0) { *(unsigned short *)(flag_clear_target + 0x34) &= 0xFFF9; } moby_to_remove = hero_state_bytes->vehicle_mode3_moby; - *(int *)&hero_state_bytes->unkA84 = 0; + *(int *)&hero_state_bytes->replacement_moby = 0; if (moby_to_remove != 0) { mark_moby_for_removal(moby_to_remove); *(int *)&hero_state_bytes->vehicle_mode3_moby = 0; } release_and_clear_hero_voice_slots(); - restored_hero_moby = ((char *)hero_state_bytes->unkA88); + restored_hero_moby = ((char *)hero_state_bytes->base_moby); hero_state_bytes->moby = restored_hero_moby; qcopy(&MOBY(restored_hero_moby)->pos, &hero_state_bytes->motion.pos); MOBY(restored_hero_moby)->collision_disable = 0; @@ -299,7 +299,7 @@ void update_hero_smoothing_parameters(void) { } if (hero.state.control_mode == HERO_MODE_JUMP) { if (hero.state_timer > hero.takeoff_frame && hero.past_jump_apex == 0) - hero.capsule_bottom_target = hero.unk434; + hero.capsule_bottom_target = hero.air_capsule_bottom; } else if (hero.state.current == HERO_STATE_FALL) { hero.capsule_bottom_target = 0.5f; } else if (hero.state.current == HERO_STATE_CROUCH) { @@ -475,30 +475,30 @@ void update_hero_timers_and_auxiliary_state(void) { hero.anim_seq_frames++; fast_dec_timer(&hero.move_lock_timer); fast_dec_timer(&hero.invulnerable_frames); - fast_dec_timer_s16(&hero.unk1B2); + fast_dec_timer_s16(&hero.item_select_override_timer); fast_dec_timer(&hero.long_jump_lockout); fast_dec_timer_s16(&hero.jump_lockout_timer); fast_dec_timer_s16(&hero.dive_lock); fast_dec_timer(&hero.wall_jump_window); - fast_dec_timer_s16(&hero.unk1F0); + fast_dec_timer_s16(&hero.ledge_ahead_timer); fast_dec_timer_s16(&hero.ledge_probe_cooldown); - fast_dec_timer_s16(&hero.unk1C8); + fast_dec_timer_s16(&hero.grind_catch_lockout); fast_dec_timer_s16(&hero.rail_catch_grace); fast_dec_timer_s16(&hero.rail_grab_cooldown); fast_dec_timer_s16(&hero.grapple_lockout_timer); fast_dec_timer(&hero.collision_off_frames); - fast_dec_timer(&hero.unk1D0); + fast_dec_timer(&hero.idle_return_delay); fast_dec_timer(&hero.jump_buffer_lockout); fast_dec_timer_s16(&hero.fidget_cooldown); fast_dec_timer_s16(&hero.sinking_floor_hold); fast_dec_timer_s16(&hero.hit_flash_timer); - fast_dec_timer_s16(&hero.unk1EA); + fast_dec_timer_s16(&hero.wall_push_out_timer); fast_dec_timer_s16(&hero.edge_brake_lock_timer); fast_dec_timer_s16(&hero.jump_lock_timer); - fast_dec_timer_s16(&hero.unk1DC); - fast_dec_timer_s16(&hero.unk1F6); - fast_dec_timer_s16(&hero.unk1DA); - fast_dec_timer_s16(&hero.unk1F8); + fast_dec_timer_s16(&hero.face_expression_timer); + fast_dec_timer_s16(&hero.pushed_timer); + fast_dec_timer_s16(&hero.item_swap_timer); + fast_dec_timer_s16(&hero.magnet_walk_timer); if (!(controller_state.held & 5)) { hero.unk1EC = 0; } diff --git a/src/overlays/shared/hero/update_hero_ground_contact.c b/src/overlays/shared/hero/update_hero_ground_contact.c index b2e20bb137..f8747044ec 100644 --- a/src/overlays/shared/hero/update_hero_ground_contact.c +++ b/src/overlays/shared/hero/update_hero_ground_contact.c @@ -222,7 +222,7 @@ void update_hero_ground_contact(void) { break; } hero.ground_pitch.i = 0; - hero.unk2E8.i = 0; + hero.ground_roll.i = 0; hero.side_probe_roll.i[0] = 0; hero.side_probe_roll.i[1] = 0; hero.side_probe_pitch.i[0] = 0; @@ -244,7 +244,7 @@ void update_hero_ground_contact(void) { } if (-0.78539819f < ground_displacement_or_angles.f[0] && ground_displacement_or_angles.f[0] < 0.78539819f) { - hero.unk2E8.f = ground_displacement_or_angles.f[0]; + hero.ground_roll.f = ground_displacement_or_angles.f[0]; } for (i = 0; i < 2; i++) { surface_probe_angle = 1.5707964f; @@ -274,7 +274,7 @@ void update_hero_ground_contact(void) { } else { hero.side_probe_drop.i[i] = 0; hero.side_probe_pitch.f[i] = hero.ground_pitch.f; - hero.side_probe_roll.f[i] = hero.unk2E8.f; + hero.side_probe_roll.f[i] = hero.ground_roll.f; } } } diff --git a/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c b/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c index 11d846e7a6..1e159d377b 100644 --- a/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c +++ b/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c @@ -372,7 +372,7 @@ void restore_hero_from_vehicle_mode(void) { unsigned char *flag_clear_target; if (hero_context->vehicle_mode == HERO_VEHICLE_MODE_CLANK) { hero_context->health.vehicle_mode_hp = hero_context->health.hp; - hero_context->health.hp = hero_context->health.unk22B0; + hero_context->health.hp = hero_context->health.saved_hp; if (hero_context->unk1620) { mark_moby_for_removal(hero_context->unk1620); hero_context->unk1620 = 0; @@ -386,18 +386,18 @@ void restore_hero_from_vehicle_mode(void) { struct Hero *hero_restore_context = &hero; reset_hero_easing_records(); hero_restore_context->vehicle_mode = HERO_VEHICLE_MODE_ON_FOOT; - flag_clear_target = hero_restore_context->unkA84; + flag_clear_target = hero_restore_context->replacement_moby; if (flag_clear_target) { *(u16 *)(flag_clear_target + 0x34) &= ~6; } - hero_restore_context->unkA84 = 0; + hero_restore_context->replacement_moby = 0; if (hero_restore_context->vehicle_mode3_moby) { mark_moby_for_removal(hero_restore_context->vehicle_mode3_moby); hero_restore_context->vehicle_mode3_moby = 0; } release_and_clear_hero_voice_slots(); { - unsigned char *restored_hero_moby = hero_restore_context->unkA88; + unsigned char *restored_hero_moby = hero_restore_context->base_moby; hero_restore_context->moby = (struct Moby *)restored_hero_moby; qcopy(&MOBY(restored_hero_moby)->pos, &hero_restore_context->motion.pos); MOBY(restored_hero_moby)->collision_disable = 0; @@ -583,8 +583,9 @@ s32 resolve_hero_position_collisions(s32 mode) { hero.path_constrain_pending = 0; } if (hero.state.control_mode != HERO_MODE_SWIM) { - if (hero.gravity_mode != HERO_GRAVITY_WORLD_DOWN || hero.unk1F8 != 0) { - if (hero.gravity_mode == HERO_GRAVITY_OPPOSITE_GROUND_NORMAL || hero.unk1F8 != 0) { + if (hero.gravity_mode != HERO_GRAVITY_WORLD_DOWN || hero.magnet_walk_timer != 0) { + if (hero.gravity_mode == HERO_GRAVITY_OPPOSITE_GROUND_NORMAL || + hero.magnet_walk_timer != 0) { add_hero_up_offset(&collision_query_offset, &collision_query_offset, 0.6f); } else { add_hero_gravity_offset( @@ -688,30 +689,30 @@ void update_hero_timers_and_spatial_state(void) { hero.anim_seq_frames++; fast_dec_timer(&hero.move_lock_timer); fast_dec_timer(&hero.invulnerable_frames); - fast_dec_timer_s16(&hero.unk1B2); + fast_dec_timer_s16(&hero.item_select_override_timer); fast_dec_timer(&hero.long_jump_lockout); fast_dec_timer_s16(&hero.jump_lockout_timer); fast_dec_timer_s16(&hero.dive_lock); fast_dec_timer(&hero.wall_jump_window); - fast_dec_timer_s16(&hero.unk1F0); + fast_dec_timer_s16(&hero.ledge_ahead_timer); fast_dec_timer_s16(&hero.ledge_probe_cooldown); - fast_dec_timer_s16(&hero.unk1C8); + fast_dec_timer_s16(&hero.grind_catch_lockout); fast_dec_timer_s16(&hero.rail_catch_grace); fast_dec_timer_s16(&hero.rail_grab_cooldown); fast_dec_timer_s16(&hero.grapple_lockout_timer); fast_dec_timer(&hero.collision_off_frames); - fast_dec_timer(&hero.unk1D0); + fast_dec_timer(&hero.idle_return_delay); fast_dec_timer(&hero.jump_buffer_lockout); fast_dec_timer_s16(&hero.fidget_cooldown); fast_dec_timer_s16(&hero.sinking_floor_hold); fast_dec_timer_s16(&hero.hit_flash_timer); - fast_dec_timer_s16(&hero.unk1EA); + fast_dec_timer_s16(&hero.wall_push_out_timer); fast_dec_timer_s16(&hero.edge_brake_lock_timer); fast_dec_timer_s16(&hero.jump_lock_timer); - fast_dec_timer_s16(&hero.unk1DC); - fast_dec_timer_s16(&hero.unk1F6); - fast_dec_timer_s16(&hero.unk1DA); - fast_dec_timer_s16(&hero.unk1F8); + fast_dec_timer_s16(&hero.face_expression_timer); + fast_dec_timer_s16(&hero.pushed_timer); + fast_dec_timer_s16(&hero.item_swap_timer); + fast_dec_timer_s16(&hero.magnet_walk_timer); if (!(controller_state.held & 5)) { hero.unk1EC = 0; } diff --git a/src/overlays/shared/mobys/evaluate_moby_animation_pose.c b/src/overlays/shared/mobys/evaluate_moby_animation_pose.c index 87b4e56af2..51a7985791 100644 --- a/src/overlays/shared/mobys/evaluate_moby_animation_pose.c +++ b/src/overlays/shared/mobys/evaluate_moby_animation_pose.c @@ -164,7 +164,7 @@ void FUN_L00_00257470(unsigned char *moby, int flags, int trajectory_target_inde if (flags & 0x100) { call_flags = 5; } - if (hero_lui.unk20B2 || (flags & 0x200)) { + if (hero_lui.on_hoverboard || (flags & 0x200)) { call_flags |= 2; } if (hero_lui.state.current == 0x10 && diff --git a/src/overlays/shared/ui/hud/draw_trick_combo_hud.c b/src/overlays/shared/ui/hud/draw_trick_combo_hud.c index dc22e268a6..f30d451c62 100644 --- a/src/overlays/shared/ui/hud/draw_trick_combo_hud.c +++ b/src/overlays/shared/ui/hud/draw_trick_combo_hud.c @@ -107,7 +107,7 @@ void update_trick_combo_hud(HudCounter *element) { if (player->air_frames.s < 6) { return; } - combo = player->unk70C; + combo = player->trick_combo_count; if (!((f32)combo >= 1.0f)) { return; } @@ -142,8 +142,8 @@ void update_trick_combo_hud(HudCounter *element) { } } player = &hero; - if (D_L05_0015FAD4 < player->unk70C) { - D_L05_0015FAD4 = player->unk70C; + if (D_L05_0015FAD4 < player->trick_combo_count) { + D_L05_0015FAD4 = player->trick_combo_count; state_bytes[1] = trick_combo_hud_delay_reload_gp; } if (player->grounded_frames == 0) { @@ -152,7 +152,7 @@ void update_trick_combo_hud(HudCounter *element) { } } D_L05_0015FB00 = 0; - player->unk70C = 0; + player->trick_combo_count = 0; player->tricks_landed[4] = 0; { int k; diff --git a/src/overlays/shared/ui/hud/draw_weapon_ammo_hud_panel.c b/src/overlays/shared/ui/hud/draw_weapon_ammo_hud_panel.c index dc2fc4b471..f921e21b3c 100644 --- a/src/overlays/shared/ui/hud/draw_weapon_ammo_hud_panel.c +++ b/src/overlays/shared/ui/hud/draw_weapon_ammo_hud_panel.c @@ -267,13 +267,13 @@ void update_weapon_hud_state(void) { set_animation_parameter(D_L00_0015F970, 0); D_L00_0015F970 = k; } - hero_state->unk1634 = queue_animation_update(0x10, - 0xFFFF, - reset_numeric_hud_element, - hud_update_counter, - draw_hud_cropped_gauge_panel, - &hero_state->vehicle_hp, - 200); + hero_state->vehicle_anim_handle = queue_animation_update(0x10, + 0xFFFF, + reset_numeric_hud_element, + hud_update_counter, + draw_hud_cropped_gauge_panel, + &hero_state->vehicle_hp, + 200); } else { if (D_L00_0015F970 != k) { set_animation_parameter(D_L00_0015F970, 0); diff --git a/src/overlays/shared/weapons/drone.c b/src/overlays/shared/weapons/drone.c index 042fb20e4e..ad923eb126 100644 --- a/src/overlays/shared/weapons/drone.c +++ b/src/overlays/shared/weapons/drone.c @@ -338,8 +338,8 @@ char *spawn_hero_drone(int previous_spawn_result, void *pos) { *(float *)(moby_vars + 0x3C) = player->motion.pos.f[2]; for (*(short *)(moby_vars + 0x54) = 0; *(short *)(moby_vars + 0x54) < 6; (*(short *)(moby_vars + 0x54))++) { - if (hero.unk2020[*(short *)(moby_vars + 0x54)] == 0) { - hero.unk2020[*(short *)(moby_vars + 0x54)] = spawned_moby; + if (hero.drone_mobys[*(short *)(moby_vars + 0x54)] == 0) { + hero.drone_mobys[*(short *)(moby_vars + 0x54)] = spawned_moby; break; } } diff --git a/src/overlays/shared/weapons/pyrocitor.c b/src/overlays/shared/weapons/pyrocitor.c index b0bba44390..c3d980e685 100644 --- a/src/overlays/shared/weapons/pyrocitor.c +++ b/src/overlays/shared/weapons/pyrocitor.c @@ -785,10 +785,10 @@ void update_pyrocitor_usage_and_cleanup(struct Moby *pyrocitor_moby) { P->stat[10].latest_time_bucket = scale_game_frames(D_0015EEA4) / 600; P->stat[10].level_mask = P->stat[10].level_mask | (1 << current_level_index) | 0x80000000; } else if (*(short *)(pyrocitor_vars + 0x50) < scale_game_frames(0x1E)) { - hero.unk20B4++; + hero.pyrocitor_tap_count++; } *(short *)(pyrocitor_vars + 0x50) = 0; - if (hero.unk20B4 >= 3) + if (hero.pyrocitor_tap_count >= 3) help_request(0x4E24, 0x4E); } diff --git a/src/overlays/shared/weapons/suckcannon.c b/src/overlays/shared/weapons/suckcannon.c index 7e320ed1d0..e91d7e904c 100644 --- a/src/overlays/shared/weapons/suckcannon.c +++ b/src/overlays/shared/weapons/suckcannon.c @@ -2020,7 +2020,7 @@ s32 cancel_suck_cannon_suction(struct Moby *moby) { switch (k) { case SUCK_CANNON_BEING_PULLED_IN: if (*(s16 *)(suction_record + 0x6A) != -1) { - hero.unk2050[*(s16 *)(suction_record + 0x6A)] = 0; + hero.suction_mobys[*(s16 *)(suction_record + 0x6A)] = 0; if (hero.suck_cannon_incoming > 0) hero.suck_cannon_incoming--; } @@ -2428,7 +2428,7 @@ int FUN_L00_002dc9f0(struct Moby *moby, char *yaw_turn_state) { hero.suck_cannon_incoming--; hero.sucked_moby_count++; func_L00_002DB6C8_2DDEA0(moby, &suction_and_projectile_scratch.v[0]); - hero.unk2050[suction_and_projectile_record->idx]->flags &= 0xEFFF; + hero.suction_mobys[suction_and_projectile_record->idx]->flags &= 0xEFFF; } else { transpose_rotation_matrix(&suction_and_projectile_scratch.v[5], D_0013FA90_2DDEA0); func_001F9BF0_2DDEA0(&suction_and_projectile_scratch.v[2], diff --git a/src/overlays/shared/weapons/swingshot.c b/src/overlays/shared/weapons/swingshot.c index 605ce655a9..e2b2487d25 100644 --- a/src/overlays/shared/weapons/swingshot.c +++ b/src/overlays/shared/weapons/swingshot.c @@ -239,7 +239,7 @@ void swingshot_update(Moby *m) { } } if (hero.state.current == 0x24 || - (hero.state.control_mode == HERO_MODE_GRIND && hero.unk5B4)) { + (hero.state.control_mode == HERO_MODE_GRIND && hero.rail_swing_target)) { if (hd) { d->size = 0.280000001f; d->scale = 1.0f; @@ -275,7 +275,7 @@ void swingshot_update(Moby *m) { FUN_001f9a28_2bffa8(&v0, &hero.grapple_target->pos, &d->hook->pos); speed = hd->speed; if (hero.state.control_mode == HERO_MODE_GRIND) { - speed = speed + hero.unk574; + speed = speed + hero.grind_speed; } else if (hero.state.prev_control_mode == HERO_MODE_JUMP || hero.state.prev_control_mode == HERO_MODE_FALL) { if (2.0f < hero.ground_distance) @@ -325,10 +325,10 @@ void swingshot_update(Moby *m) { d->spin = d->spin + 0.69813168f; d->size = d->size * (frame_scale * -0.100000024f + 1.0f); if (d->size < 0.168000013f) { - hero.unk5B4 = 0; + hero.rail_swing_target = 0; if (d->hook && 3.5f < FUN_001f9b48_2bffa8(&d->hook->pos, &hero.motion.pos)) { if (!(controller_state.held & hero.items[0].button_mask)) { - hero.unk988 = 1; + hero.swingshot_missed = 1; hero_set_state(0, 0); set_hero_animation(hero_idle_sequence(0), 0, (float)FUN_001f96f8_2bffa8(14)); m->state = 6; @@ -554,7 +554,7 @@ child_ready:; *(u128 *)(child + 0xe0) = *(u128 *)(m + 0xe0); } if ((hero.state.current == 36 || - (hero.state.control_mode == HERO_MODE_GRIND && hero.unk5B4)) && + (hero.state.control_mode == HERO_MODE_GRIND && hero.rail_swing_target)) && motion) { *(float *)(vars + 0x18) = 0.0f; *(float *)(vars + 0x1c) = 1.0f; @@ -590,7 +590,7 @@ child_ready:; FUN_001ff2a8_2c6158(&a, ((u8 *)hero.grapple_target) + 0x10, (*(u8 **)(vars + 0x14)) + 0x10); speed = *(float *)(motion + 4); if (hero.state.control_mode == HERO_MODE_GRIND) - speed += hero.unk574; + speed += hero.grind_speed; else if ((hero.state.prev_control_mode == HERO_MODE_JUMP || hero.state.prev_control_mode == HERO_MODE_FALL) && hero.ground_distance > 2.0f) @@ -647,11 +647,11 @@ child_ready:; *(float *)(vars + 0x20) = factor; if (!(factor < 0.16800001f)) return; - hero.unk5B4 = 0; + hero.rail_swing_target = 0; if ((*(u8 **)(vars + 0x14)) != 0 && 3.5f < FUN_001ff450_2c6158((*(u8 **)(vars + 0x14)) + 0x10, &hero.motion.pos)) { if ((pad_held_words[0] & hero.items[0].button_mask) == 0) { - hero.unk988 = 1; + hero.swingshot_missed = 1; hero_set_state(0, 0); effect = hero_idle_sequence(0); frames = scale_game_frames(14); @@ -741,7 +741,7 @@ child_ready:; *(float *)(vars + 0x20) = factor; if (!(factor < 0.16800001f)) return; - hero.unk99C = 1; + hero.swing_hooked = 1; m[0x20] = 12; return; } diff --git a/src/ui/text/draw_dialog_text.c b/src/ui/text/draw_dialog_text.c index 22c8188c37..3426f76117 100644 --- a/src/ui/text/draw_dialog_text.c +++ b/src/ui/text/draw_dialog_text.c @@ -32,7 +32,6 @@ extern void font_print_window(struct TextRegion *, s64, void *, s32, s32, u8 *) __asm__("FUN_001f7090"); extern void font_print_window_regular(struct TextRegion *, s32, char *, s32) __asm__("func_001F7580"); -extern f32 fast_sin(f32) __asm__("func_001F9DE0"); extern s32 fast_tween_color(s32, s32, f32) __asm__("func_001FA6E0"); extern char *get_help_message_text(s32) __asm__("func_001FDD10"); extern s32 get_icon_frame(s32, s32) __asm__("func_001FF960"); From 2527e2655d8d073a4f148256db6b772df28f8bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:02:07 +0000 Subject: [PATCH 013/213] decomp: name menu, map, disc table and follow camera fields from their use --- include/rnc/camera/follow_cam.h | 12 +++--- include/rnc/streaming/disc_table.h | 22 +++++----- include/rnc/ui/map/map_state.h | 14 +++---- include/rnc/ui/menus/menu_globals.h | 8 ++-- include/rnc/ui/menus/menu_screen.h | 2 +- include/rnc/ui/menus/menu_system.h | 40 +++++++++---------- src/audio/voices/pause_all_sounds.c | 10 ++--- src/check/disc_table_layout_check.c | 10 ++--- src/check/follow_cam_layout_check.c | 6 +-- src/check/menu_layout_check.c | 12 +++--- .../load_level_zero_preserving_progress.c | 4 +- src/game/process_global_state_flags.c | 2 +- .../shared/camera/aim_volume_camera.c | 12 +++--- .../shared/camera/swing_volume_camera.c | 14 +++---- .../cutscenes/update_cutscene_playback.c | 16 ++++---- .../streaming/load_scene_chunks_with_fade.c | 8 ++-- .../streaming/start_indexed_disc_stream.c | 8 ++-- .../render_level_effects_and_screen_sprites.c | 8 ++-- src/runtime/startup/init_once.c | 4 +- src/ui/map/coverage/save_map_coverage.c | 2 +- src/ui/map/draw_map_screen.c | 10 ++--- src/ui/menus/initialize_menu_preview_scene.c | 6 +-- .../clear_preview_resource_bindings.c | 10 ++--- .../initialize_menu_preview_objects.c | 6 +-- .../load_preview_resource_bindings.c | 6 +-- .../release_menu_preview_objects.c | 2 +- .../update_item_preview_binding.c | 6 +-- src/ui/menus/pause/build_pause_item_list.c | 4 +- src/ui/menus/save_data/saving_data_menu.c | 2 +- src/ui/menus/save_data/saving_data_menu2.c | 2 +- .../selection/build_filtered_menu_item_list.c | 6 +-- .../selection/update_menu_confirm_page.c | 2 +- .../initialize_menu_stream_buffers.c | 2 +- src/ui/menus/system/enter_main_menu.c | 2 +- .../menus/system/handle_menu_action_buttons.c | 4 +- .../menus/system/update_menu_entry_actions.c | 20 +++++----- src/ui/menus/system/update_menu_system.c | 6 +-- src/ui/menus/widgets/draw_prompt_box.c | 2 +- src/ui/menus/widgets/enter_menu_help_text.c | 4 +- .../widgets/update_menu_help_text_load.c | 2 +- src/weapons/load_hand_gadget.c | 6 +-- 41 files changed, 162 insertions(+), 162 deletions(-) diff --git a/include/rnc/camera/follow_cam.h b/include/rnc/camera/follow_cam.h index c56b298d86..ab43a4cac3 100644 --- a/include/rnc/camera/follow_cam.h +++ b/include/rnc/camera/follow_cam.h @@ -22,7 +22,7 @@ typedef struct { f32 offset[4]; /* 0xA0: eased offset, split into a lateral and an up part */ f32 lateral_ease[4]; /* 0xB0: cam_interp_values state of the lateral part */ f32 up_ease[4]; /* 0xC0: cam_interp_values state of the up part */ - f32 unkD0[4]; /* 0xD0: set to look_target when a shot camera snaps */ + f32 snap_look_target[4]; /* 0xD0: set to look_target when a shot camera snaps */ u8 padE0[0x10]; f32 look_height; /* 0xF0: height of look_target above the hero */ u8 padF4[0x22]; @@ -48,16 +48,16 @@ typedef struct { /* 0x1D0: written when a shot camera snaps. */ typedef struct { u8 pad1D0[0x20]; - f32 unk1F0[4]; /* 0x1F0: set to the record's position */ - f32 unk200; /* 0x200: unk15C minus the length of unk130 */ + f32 shot_pos[4]; /* 0x1F0: set to the record's position */ + f32 eye_distance_error; /* 0x200: eye_distance minus the length of eye_offset */ u8 pad204[8]; } FollowCamSnap; typedef struct { - f32 unk130[4]; /* 0x130: eye offset; its length is the eye distance */ - f32 unk140[4]; /* 0x140: copy of unk130 */ + f32 eye_offset[4]; /* 0x130: eye offset; its length is the eye distance */ + f32 saved_eye_offset[4]; /* 0x140: copy of eye_offset */ u8 pad150[0xC]; - f32 unk15C; /* 0x15C: eye distance, set with unk130 by the shot cameras */ + f32 eye_distance; /* 0x15C: eye distance, set with eye_offset by the shot cameras */ f32 distance; /* 0x160: distance of the eye behind the hero */ f32 unk164; /* 0x164: aim cameras start only while it is (nearly) 0 */ u8 pad168[0x40]; diff --git a/include/rnc/streaming/disc_table.h b/include/rnc/streaming/disc_table.h index fe2b53ed85..4904736f1c 100644 --- a/include/rnc/streaming/disc_table.h +++ b/include/rnc/streaming/disc_table.h @@ -45,10 +45,10 @@ struct DiscTable { known field, not a proven count of valid archives. */ struct DiscFile render_archives[201]; s32 music_50000[40][6]; /* 0xF00, tracks 50000.., one location per language */ - struct DiscFile unk12C0; /* 0x12C0 */ + struct DiscFile startup_archive; /* 0x12C0 */ struct DiscFile level_archives[4]; /* 0x12C8, by level index */ - struct DiscFile unk12E8[10]; /* 0x12E8, overlays: x of an x/y pair picked by D_0015ED80 */ - struct DiscFile unk1338[10]; /* 0x1338, the y half of the 0x12E8 pair */ + struct DiscFile chunk_archives[10]; /* 0x12E8, overlays: x of an x/y pair picked by D_0015ED80 */ + struct DiscFile chunk_archives_alt[10]; /* 0x1338, the y half of chunk_archives */ struct DiscFile loading_slides[6]; /* 0x1388, one per language */ struct DiscFile unk13B8; /* 0x13B8 */ struct DiscFile music_40000[36]; /* 0x13C0, music tracks 40000.. */ @@ -58,18 +58,18 @@ struct DiscTable { u8 pad_14F0[0x8]; struct DiscFile wad_chunks[6]; /* 0x14F8, level wad chunks */ struct DiscFile help_text; /* 0x1528, per-language archive read by update_menu_help_text_load */ - struct DiscFile unk1530[14]; /* 0x1530, overlays: x of an x/y pair picked by D_0015ED80 */ - struct DiscFile unk15A0[14]; /* 0x15A0, the y half of the 0x1530 pair */ + struct DiscFile scene_chunk_archives[14]; /* 0x1530, overlays: x of an x/y pair picked by D_0015ED80 */ + struct DiscFile scene_chunk_archives_alt[14]; /* 0x15A0, the y half of scene_chunk_archives */ struct DiscFile animation_table; /* 0x1610, read with animation_asset_read_active set */ struct DiscFile music_60000[62]; /* 0x1618, music tracks 60000.. */ - struct DiscFile unk1808[19]; /* 0x1808, overlays: x of an x/y pair picked by D_0015ED80 */ - struct DiscFile unk18A0[19]; /* 0x18A0, the y half of the 0x1808 pair */ + struct DiscFile scene_movies[19]; /* 0x1808, overlays: x of an x/y pair picked by D_0015ED80 */ + struct DiscFile scene_movies_alt[19]; /* 0x18A0, the y half of scene_movies */ struct DiscFile movies[12]; /* 0x1938, level transition movies */ struct DiscFile movies_alt[12]; /* 0x1998, picked by the video mode flag */ - struct DiscFile unk19F8[3]; /* 0x19F8, overlays: x/y pair picked by D_0015ED80 */ - struct DiscFile unk1A10[3]; /* 0x1A10, the y half of the 0x19F8 pair */ - struct DiscFile unk1A28[5]; /* 0x1A28, overlays: x/y pair picked by D_0015ED80 */ - struct DiscFile unk1A50[5]; /* 0x1A50, the y half of the 0x1A28 pair */ + struct DiscFile streams[3]; /* 0x19F8, overlays: x/y pair picked by D_0015ED80 */ + struct DiscFile streams_alt[3]; /* 0x1A10, the y half of streams */ + struct DiscFile queued_movies[5]; /* 0x1A28, overlays: x/y pair picked by D_0015ED80 */ + struct DiscFile queued_movies_alt[5]; /* 0x1A50, the y half of queued_movies */ struct DiscFile start_movies[4]; /* 0x1A78, played by start_level */ struct DiscFile start_movies_alt[4]; /* 0x1A98, while D_0015ED80 is set */ u8 pad_1AB8[0xEB0]; diff --git a/include/rnc/ui/map/map_state.h b/include/rnc/ui/map/map_state.h index 1187b18a30..c311ec504c 100644 --- a/include/rnc/ui/map/map_state.h +++ b/include/rnc/ui/map/map_state.h @@ -14,14 +14,14 @@ struct MapHdr; * * - level: update_menu_mission_list steps it to the next/previous level with missions; * update_mission_list reads D_001A2B70[level]; draw_map_screen shows that - * map and passes it as menu_system.unkE4. + * map and passes it as menu_system.travel_level. * - zoom/pan_x/pan_y are indexed by `loaded`; slot[] caches five decoded * maps (find_map_entry_slot). * - mask: compose_bitmap_from_mask input when the shown level is the * current one; save_map_coverage / downsample_map_coverage pack it into the level's - * 0x800-byte save page (cleared instead when unk28 is zero). - * - unk22C / unk234: stash_receive_data arguments when the next map is the - * current level's (draw_map_screen); unk234 is stored as slot_size. + * 0x800-byte save page (cleared instead when coverage_enabled is zero). + * - current_map_data / current_map_size: stash_receive_data arguments when the next map is the + * current level's (draw_map_screen); current_map_size is stored as slot_size. * - The *_vram words are GS memory byte addresses (>> 8 = block) passed to * register_8bit_texture as CBP (arg 5) and TBP0 (arg 6). tex0..tex2 are the TEX0 * values of the 128x128 images at hdr +0x10/+0x14/+0x18 (CLUT +0x20, @@ -38,7 +38,7 @@ struct MapState { struct MapMarker *markers; /* 0x01C: drawn by draw_map_markers, may be null */ struct MapIcon *icons; /* 0x020: icon list of the shown level */ s32 unk24; /* 0x024: zero: update_map_zoom_and_pan and draw_map_overlay return early */ - s32 unk28; /* 0x028: zero: the save page is cleared, not packed */ + s32 coverage_enabled; /* 0x028: zero: the save page is cleared, not packed */ s32 unk2C; /* 0x02C: see unk8 */ struct { s32 unk0; /* draw_map_overlay draft: <0 skipped */ @@ -51,9 +51,9 @@ struct MapState { u8 pad1A4[0x80]; s32 level; /* 0x224: selected level 0..19 */ s32 loaded; /* 0x228: index of the loaded map, -1 none */ - s32 unk22C; /* 0x22C: stash_receive_data argument */ + s32 current_map_data; /* 0x22C: stash_receive_data argument */ s32 unk230; /* 0x230: compared with -current_level_index (draw_map_screen) */ - s32 unk234; /* 0x234: stash_receive_data byte count */ + s32 current_map_size; /* 0x234: stash_receive_data byte count */ u8 pad238[0x4]; struct MapHdr *hdr; /* 0x23C */ s32 map_image_vram; /* 0x240: TBP0 of the 512x512 composed map */ diff --git a/include/rnc/ui/menus/menu_globals.h b/include/rnc/ui/menus/menu_globals.h index 8e202db3d3..7aa5fd8420 100644 --- a/include/rnc/ui/menus/menu_globals.h +++ b/include/rnc/ui/menus/menu_globals.h @@ -26,12 +26,12 @@ typedef struct MenuItemInfo { u8 pad4[4]; s32 slot; /* 0x08: equip slot the item goes in */ u8 padC[0x2C]; - u16 unk38; /* 0x38: copied into the pause item list */ + u16 icon; /* 0x38: copied into the pause item list */ s16 preview_class; /* 0x3A: preview moby class, -1 for none */ u8 pad3C[4]; - s16 unk40; /* 0x40: pause list value for the plain text */ - s16 unk42; /* 0x42: pause list value when item_text_variant is set */ - s16 unk44; /* 0x44: copied into the filtered item list */ + s16 name_text; /* 0x40: pause list value for the plain text */ + s16 alt_name_text; /* 0x42: pause list value when item_text_variant is set */ + s16 description_text; /* 0x44: copied into the filtered item list */ u8 pad46[6]; } MenuItemInfo; diff --git a/include/rnc/ui/menus/menu_screen.h b/include/rnc/ui/menus/menu_screen.h index 409de67e85..168e6b2fa0 100644 --- a/include/rnc/ui/menus/menu_screen.h +++ b/include/rnc/ui/menus/menu_screen.h @@ -350,7 +350,7 @@ struct MenuScreen { s32 (*draw)(struct MenuScreen *); /* 0x04 */ void (*enter)(struct MenuScreen *, s32); /* 0x08 */ void (*leave)(struct MenuScreen *, s32); /* 0x0C */ - s32 unk10; /* 0x10: bit 2 set by enter_menu_help_text */ + s32 flags; /* 0x10: MENU_SCREEN_HIDDEN while the help text loads */ s32 moby; /* 0x14: its menu moby D_001D5D90[i]; menu sounds play on it */ s32 x; /* 0x18: left edge */ s32 y; /* 0x1C: top edge */ diff --git a/include/rnc/ui/menus/menu_system.h b/include/rnc/ui/menus/menu_system.h index 02d0238808..3bad0c0540 100644 --- a/include/rnc/ui/menus/menu_system.h +++ b/include/rnc/ui/menus/menu_system.h @@ -43,7 +43,7 @@ struct MenuPage { * * Evidence for the less obvious fields: * - close_request: nonzero makes update_menu_system call close_menu_system (release the - * page, state 20); 1 from a screen update, 3 with unkE4..unkF4 set + * page, state 20); 1 from a screen update, 3 with travel_level..unkF4 set * (fun_00221968, draw_map_screen), 3/4/5 from update_menu_entry_actions. * - equipped: D_001863D8[id] +0 names the slot; draw_menu_item_grid draws the * held item with frame +1; load_hand_gadget builds the preview mobys from @@ -53,17 +53,17 @@ struct MenuPage { * streamed_animation_base from the stream archive (id - base); * pending_buffer is cleared by release_menu_stream_buffer and * clear_preview_animation_queue. - * - unkD4: 0 from saving_data_menu, 1/2 from saving_data_menu2 (flags + * - save_prompt_variant: 0 from saving_data_menu, 1/2 from saving_data_menu2 (flags * 0x2000); draw_prompt_box shows text 0x4FB3 for 0..2, 0x4FB5 for 3. - * - unkD8: render_level_effects_and_screen_sprites draws panel slot 6 only while set; pause_all_sounds + * - goodies_tab_shown: render_level_effects_and_screen_sprites draws panel slot 6 only while set; pause_all_sounds * sets it and picks page tables pause_goodies_tab by it. * - resource_table_toggle: select_world_object_resource_tables(class, * toggle == 0), then stored negated (load_hand_gadget, update_item_preview_binding); - * load_hand_gadget builds the preview moby once unk120 equals the + * load_hand_gadget builds the preview moby once preview_loaded_class equals the * selected class. * - unk134 / unk138: while set, pages with flags 8 / 4 are skipped * (find_next_pause_page) and grid items with those flags draw frame +2. - * - The buffer addresses (unk10, unkFC..unk10C) are carved from + * - The buffer addresses (graphics_workspace, unkFC..stream_buffer_base) are carved from * D_001940C0[1] / [2] by FUN_00218f98. */ struct MenuSystem { @@ -72,7 +72,7 @@ struct MenuSystem { struct MenuPage *current; /* 0x004: active page */ struct MenuPage *next; /* 0x008: requested page */ s32 close_request; /* 0x00C: nonzero closes the menu */ - s32 unk10; /* 0x010: buffer address D_001940C0[2] + 0xA0000 */ + s32 graphics_workspace; /* 0x010: buffer address D_001940C0[2] + 0xA0000 */ s32 timer; /* 0x014: 12 on a switch, 2 on close; counts down */ s32 saved_texture_start; /* 0x018: gs_texture_allocation_start to restore on close */ s32 current_gadget; /* 0x01C: gadget of the queued preview animation, -1 none */ @@ -82,9 +82,9 @@ struct MenuSystem { /* Preview animation stream */ s32 stream_buffer[2]; /* 0x0A0: double buffer */ - s32 unkA8; /* 0x0A8: load_preview_resource_bindings first-resource argument */ - s32 unkAC; /* 0x0AC: load_preview_resource_bindings count argument */ - s32 unkB0[3]; /* 0x0B0: buffer addresses read by load_preview_resource_bindings */ + s32 preview_resource_first; /* 0x0A8: load_preview_resource_bindings first-resource argument */ + s32 preview_resource_count; /* 0x0AC: load_preview_resource_bindings count argument */ + s32 preview_resource_buffers[3]; /* 0x0B0: buffer addresses read by load_preview_resource_bindings */ s32 read_offset; /* 0x0BC: offset of the data in the read buffer */ s32 unkC0; /* 0x0C0: -1 at preview init */ u8 pad_C4[0x4]; @@ -94,32 +94,32 @@ struct MenuSystem { u32 streamed_animation_base; /* 0x0CC: first animation id read from the stream archive */ struct MenuPage *previous; /* 0x0D0: page left by the last switch */ - s32 unkD4; /* 0x0D4: 0 saving_data_menu, 1/2 saving_data_menu2; picks draw_prompt_box text */ - s32 unkD8; /* 0x0D8: render_level_effects_and_screen_sprites draws slot 6 only while set */ + s32 save_prompt_variant; /* 0x0D4: 0 saving_data_menu, 1/2 saving_data_menu2; picks draw_prompt_box text */ + s32 goodies_tab_shown; /* 0x0D8: render_level_effects_and_screen_sprites draws slot 6 only while set */ s32 unkDC; /* 0x0DC: pause_all_sounds: (mode == 0x23) */ - s32 unkE0; /* 0x0E0: memcard_make_whole_save / memcard_restore_game argument */ - s32 unkE4; /* 0x0E4: written with unkF0/unkF4 before close_request 3 */ + s32 save_slot; /* 0x0E0: memcard_make_whole_save / memcard_restore_game argument */ + s32 travel_level; /* 0x0E4: written with travel_page/unkF4 before close_request 3 */ u8 pad_E8[0x4]; - s32 unkEC; /* 0x0EC: menu_action_messages[] entry (update_menu_entry_actions) */ + s32 action_message; /* 0x0EC: menu_action_messages[] entry (update_menu_entry_actions) */ struct MenuPage - *unkF0; /* 0x0F0: menu_system.current, or map_circle_destination_page (draw_map_screen) */ + *travel_page; /* 0x0F0: menu_system.current, or map_circle_destination_page (draw_map_screen) */ s32 unkF4; /* 0x0F4: 0, 2, 0xB or 0xF */ s32 unkF8; /* 0x0F8: read by pause_all_sounds */ /* Buffers carved at init (FUN_00218f98) */ s32 unkFC; /* 0x0FC: from D_001940C0[1] */ s32 unk100; /* 0x100: from D_001940C0[2] */ - s32 unk104; /* 0x104: D_001940C0[1] + 0xA0000 */ + s32 preview_workspace; /* 0x104: D_001940C0[1] + 0xA0000 */ s32 help_text_buffer; /* 0x108: help text read target, D_001940C0[1] + 0xDC000 */ - s32 unk10C; /* 0x10C: D_001940C0[2] + 0x180000 */ + s32 stream_buffer_base; /* 0x10C: D_001940C0[2] + 0x180000 */ s32 update_count; /* 0x110: update_menu_system updates */ u8 pad_114[0x4]; /* Preview moby resources */ s32 resource_table_toggle; /* 0x118: alternates per resource table select */ - s32 unk11C; /* 0x11C: an oclass, -1 none */ - s32 unk120; /* 0x120: an oclass, -1 none */ + s32 preview_requested_class; /* 0x11C: an oclass, -1 none */ + s32 preview_loaded_class; /* 0x120: an oclass, -1 none */ s32 close_locked; /* 0x124: nonzero blocks start/back closing the menu */ s32 card_op_pending; /* 0x128: card save/load started, waiting for the card */ @@ -128,7 +128,7 @@ struct MenuSystem { s32 unk134; /* 0x134: hides pages / items with flags 8 */ s32 unk138; /* 0x138: hides pages / items with flags 4 */ s32 unk13C; /* 0x13C: written by pause_all_sounds */ - s32 unk140; /* 0x140: oclass at the last resource table select */ + s32 resource_table_class; /* 0x140: oclass at the last resource table select */ s32 last_resource_table_toggle; /* 0x144: resource_table_toggle at the last select */ }; /* size 0x148 */ diff --git a/src/audio/voices/pause_all_sounds.c b/src/audio/voices/pause_all_sounds.c index 3416a71e46..0fa3b60365 100644 --- a/src/audio/voices/pause_all_sounds.c +++ b/src/audio/voices/pause_all_sounds.c @@ -62,20 +62,20 @@ void pause_all_sounds(s32 mode) { } { struct MenuSystem *g = &menu_system; - g->unkD8 = + g->goodies_tab_shown = D_0015EEA0_macro != 0 || alternate_animation_sequence_macro != 0 || g->unkF8 != 0; } { struct MenuSystem *g = &menu_system; struct MenuTextListScreen *head = &pause_menu_chain_head; g->unkDC = mode == 0x23; - head->list.up = g->unkD8 ? (struct MenuScreen *)&pause_goodies_tab + head->list.up = g->goodies_tab_shown ? (struct MenuScreen *)&pause_goodies_tab : (struct MenuScreen *)&pause_menu_chain_tail; } { struct MenuSystem *g = &menu_system; struct MenuTextListScreen *tail = &pause_menu_chain_tail; - tail->list.down = g->unkD8 ? (struct MenuScreen *)&pause_goodies_tab + tail->list.down = g->goodies_tab_shown ? (struct MenuScreen *)&pause_goodies_tab : (struct MenuScreen *)&pause_menu_chain_head; } { @@ -83,7 +83,7 @@ void pause_all_sounds(s32 mode) { game_mode_macro = 3; g->state = mode; g->close_request = 0; - g->unk10 = 0; + g->graphics_workspace = 0; g->update_count = 0; } { @@ -100,7 +100,7 @@ void pause_all_sounds(s32 mode) { { struct MenuSystem *g = &menu_system; g->unk13C = 1; - g->unk140 = 0; + g->resource_table_class = 0; } } diff --git a/src/check/disc_table_layout_check.c b/src/check/disc_table_layout_check.c index 688020e4fe..6e25fc1c64 100644 --- a/src/check/disc_table_layout_check.c +++ b/src/check/disc_table_layout_check.c @@ -10,13 +10,13 @@ OFFSET_CHECK(level_chunk, struct DiscTable, level_chunk, 0x4F8); OFFSET_CHECK(music_50000, struct DiscTable, music_50000, 0xF00); OFFSET_CHECK(sound_bank, struct DiscTable, sound_bank, 0x14E0); -OFFSET_CHECK(unk1530, struct DiscTable, unk1530, 0x1530); +OFFSET_CHECK(scene_chunk_archives, struct DiscTable, scene_chunk_archives, 0x1530); OFFSET_CHECK(memcard_data, struct DiscTable, memcard_data, 0x10); OFFSET_CHECK(animation_table, struct DiscTable, animation_table, 0x1610); -OFFSET_CHECK(unk1808, struct DiscTable, unk1808, 0x1808); +OFFSET_CHECK(scene_movies, struct DiscTable, scene_movies, 0x1808); OFFSET_CHECK(movies, struct DiscTable, movies, 0x1938); -OFFSET_CHECK(unk19F8, struct DiscTable, unk19F8, 0x19F8); -OFFSET_CHECK(unk1A28, struct DiscTable, unk1A28, 0x1A28); +OFFSET_CHECK(streams, struct DiscTable, streams, 0x19F8); +OFFSET_CHECK(queued_movies, struct DiscTable, queued_movies, 0x1A28); OFFSET_CHECK(start_movies, struct DiscTable, start_movies, 0x1A78); OFFSET_CHECK(shared_archive, struct DiscTable, shared_archive, 0x2968); OFFSET_CHECK(music_20000, struct DiscTable, music_20000, 0x2988); @@ -25,5 +25,5 @@ OFFSET_CHECK(sector_lists, struct DiscTable, sector_lists, 0x2AFC); SIZE_CHECK(sector_list, struct DiscSectorList, 0x250); OFFSET_CHECK(misc_animations, struct DiscTable, misc_animations, 0xF8); OFFSET_CHECK(vendor_animation, struct DiscTable, vendor_animation, 0x198); -OFFSET_CHECK(unk12E8, struct DiscTable, unk12E8, 0x12E8); +OFFSET_CHECK(chunk_archives, struct DiscTable, chunk_archives, 0x12E8); OFFSET_CHECK(loading_slides, struct DiscTable, loading_slides, 0x1388); diff --git a/src/check/follow_cam_layout_check.c b/src/check/follow_cam_layout_check.c index 2a4f8d71ae..2a0dcc451e 100644 --- a/src/check/follow_cam_layout_check.c +++ b/src/check/follow_cam_layout_check.c @@ -11,18 +11,18 @@ OFFSET_CHECK(reset, FollowCamState, reset, 0x20); OFFSET_CHECK(reset_distance, FollowCamState, reset.distance, 0x28); OFFSET_CHECK(reset_unk38, FollowCamState, reset.unk38, 0x38); OFFSET_CHECK(follow, FollowCamState, follow, 0x40); -OFFSET_CHECK(unkD0, FollowCamState, follow.unkD0, 0xD0); +OFFSET_CHECK(snap_look_target, FollowCamState, follow.snap_look_target, 0xD0); OFFSET_CHECK(look_height, FollowCamState, follow.look_height, 0xF0); OFFSET_CHECK(blend_timer, FollowCamState, follow.blend_timer, 0x118); OFFSET_CHECK(up_damping, FollowCamState, follow.up_damping, 0x128); OFFSET_CHECK(tail, FollowCamState, tail, 0x130); -OFFSET_CHECK(unk15C, FollowCamState, tail.unk15C, 0x15C); +OFFSET_CHECK(eye_distance, FollowCamState, tail.eye_distance, 0x15C); OFFSET_CHECK(distance, FollowCamState, tail.distance, 0x160); OFFSET_CHECK(ctl, FollowCamState, tail.ctl, 0x1A8); OFFSET_CHECK(flags, FollowCamState, tail.ctl.flags, 0x1B8); OFFSET_CHECK(unk1CC, FollowCamState, tail.unk1CC, 0x1CC); OFFSET_CHECK(snap, FollowCamState, tail.snap, 0x1D0); -OFFSET_CHECK(unk200, FollowCamState, tail.snap.unk200, 0x200); +OFFSET_CHECK(eye_distance_error, FollowCamState, tail.snap.eye_distance_error, 0x200); OFFSET_CHECK(zoom_scale, FollowCamState, tail.zoom_scale, 0x20C); OFFSET_CHECK(zoom_range, FollowCamState, tail.zoom_range, 0x214); OFFSET_CHECK(unk226, FollowCamState, tail.unk226, 0x226); diff --git a/src/check/menu_layout_check.c b/src/check/menu_layout_check.c index cdc9fc85e5..ddfb40ff77 100644 --- a/src/check/menu_layout_check.c +++ b/src/check/menu_layout_check.c @@ -25,17 +25,17 @@ CHECK(MenuSystem, saved_texture_start, saved_texture_start, 0x18); CHECK(MenuSystem, current_gadget, current_gadget, 0x1C); CHECK(MenuSystem, equipped, equipped, 0x30); CHECK(MenuSystem, stream_buffer, stream_buffer, 0xA0); -CHECK(MenuSystem, unkB0, unkB0, 0xB0); +CHECK(MenuSystem, preview_resource_buffers, preview_resource_buffers, 0xB0); CHECK(MenuSystem, read_offset, read_offset, 0xBC); CHECK(MenuSystem, loaded_animation, loaded_animation, 0xC8); CHECK(MenuSystem, pending_buffer, pending_buffer, 0xCB); CHECK(MenuSystem, streamed_animation_base, streamed_animation_base, 0xCC); CHECK(MenuSystem, previous, previous, 0xD0); -CHECK(MenuSystem, unkD4, unkD4, 0xD4); -CHECK(MenuSystem, unkD8, unkD8, 0xD8); -CHECK(MenuSystem, unkE4, unkE4, 0xE4); -CHECK(MenuSystem, unkEC, unkEC, 0xEC); -CHECK(MenuSystem, unkF0, unkF0, 0xF0); +CHECK(MenuSystem, save_prompt_variant, save_prompt_variant, 0xD4); +CHECK(MenuSystem, goodies_tab_shown, goodies_tab_shown, 0xD8); +CHECK(MenuSystem, travel_level, travel_level, 0xE4); +CHECK(MenuSystem, action_message, action_message, 0xEC); +CHECK(MenuSystem, travel_page, travel_page, 0xF0); CHECK(MenuSystem, unkF4, unkF4, 0xF4); CHECK(MenuSystem, unkF8, unkF8, 0xF8); CHECK(MenuSystem, unkFC, unkFC, 0xFC); diff --git a/src/game/load_level_zero_preserving_progress.c b/src/game/load_level_zero_preserving_progress.c index bab91e3fd0..c4940161e1 100644 --- a/src/game/load_level_zero_preserving_progress.c +++ b/src/game/load_level_zero_preserving_progress.c @@ -100,8 +100,8 @@ void load_level_zero_preserving_progress(s32 slot) { if (slot >= 0) { D_0013D290.slot = slot; D_0013D290.entries[slot].unk0 = 0; - memcard_make_whole_save(menu_system.unkE0); - D_0013D290.unkEC = menu_system.unkE0; + memcard_make_whole_save(menu_system.save_slot); + D_0013D290.unkEC = menu_system.save_slot; D_0013D290.unkC0 = 0; if (D_0013D290.unkDC < 0) { D_0013D290.unkE0 = 0; diff --git a/src/game/process_global_state_flags.c b/src/game/process_global_state_flags.c index 11ccca8324..40ef372274 100644 --- a/src/game/process_global_state_flags.c +++ b/src/game/process_global_state_flags.c @@ -41,7 +41,7 @@ s32 process_global_state_flags(void) { for (i = 0; i < 4; i++) { backup[i] = (&gold_bolts_collected[LEVEL_VELDIN2 * 4])[i]; } - memcard_restore_game(menu_system.unkE0); + memcard_restore_game(menu_system.save_slot); item_unlocked[0x1D] = old_value; for (i = 0; i < 4; i++) { (&gold_bolts_collected[LEVEL_VELDIN2 * 4])[i] = backup[i]; diff --git a/src/overlays/shared/camera/aim_volume_camera.c b/src/overlays/shared/camera/aim_volume_camera.c index bf6b23db39..7da8af4e75 100644 --- a/src/overlays/shared/camera/aim_volume_camera.c +++ b/src/overlays/shared/camera/aim_volume_camera.c @@ -151,21 +151,21 @@ void volume_camera_aim(struct UpdateCam *aim_camera_record) { state = rig; reset = &state->reset; qcopy(rec_pos, pos); - tail->unk15C = params->distance; + tail->eye_distance = params->distance; tail->distance = params->height; follow->look_height = params->offset_scale; fast_vec_scale(gravity_offset, &hero.gravity_dir, -tail->distance); fast_vec_add(state->follow.eye, &hero.motion.pos, gravity_offset); - fast_vec_sub(tail->unk130, pos, state->follow.eye); - qcopy(state->tail.unk140, tail->unk130); + fast_vec_sub(tail->eye_offset, pos, state->follow.eye); + qcopy(state->tail.saved_eye_offset, tail->eye_offset); fast_vec_scale(gravity_offset, &hero.gravity_dir, -follow->look_height); fast_vec_add(state->follow.look_target, &hero.motion.pos, gravity_offset); - qcopy(state->follow.unkD0, state->follow.look_target); + qcopy(state->follow.snap_look_target, state->follow.look_target); qcopy(follow->focus, &hero.motion.pos); qcopy(state->follow.offset, follow->focus); qcopy(state->position, rec_pos); - qcopy(state->tail.snap.unk1F0, rec_pos); - *(s32 *)&snap->unk200 = 0; + qcopy(state->tail.snap.shot_pos, rec_pos); + *(s32 *)&snap->eye_distance_error = 0; *(s32 *)&reset->unk34 = 0; reset->look_height = follow->look_height; { diff --git a/src/overlays/shared/camera/swing_volume_camera.c b/src/overlays/shared/camera/swing_volume_camera.c index c5287d0213..0dea107023 100644 --- a/src/overlays/shared/camera/swing_volume_camera.c +++ b/src/overlays/shared/camera/swing_volume_camera.c @@ -215,23 +215,23 @@ void volume_camera_swing(struct UpdateCam *swing_camera_record) { /* A second pointer to the same state: retail keeps both. */ state = rig; reset = &state->reset; - fast_vec_normalize(tail->unk130, tail->unk130, params->distance); - tail->unk15C = params->distance; + fast_vec_normalize(tail->eye_offset, tail->eye_offset, params->distance); + tail->eye_distance = params->distance; tail->distance = params->height; follow->look_height = params->offset_scale; - qcopy(state->tail.unk140, tail->unk130); + qcopy(state->tail.saved_eye_offset, tail->eye_offset); fast_vec_scale(gravity_offset_or_yaw_direction, &hero.gravity_dir, -tail->distance); pos = ¤t_follow_camera_record->pos; fast_vec_add(state->follow.eye, &hero.motion.pos, gravity_offset_or_yaw_direction); - fast_vec_add(pos, state->follow.eye, tail->unk130); + fast_vec_add(pos, state->follow.eye, tail->eye_offset); fast_vec_scale(gravity_offset_or_yaw_direction, &hero.gravity_dir, -follow->look_height); fast_vec_add(state->follow.look_target, &hero.motion.pos, gravity_offset_or_yaw_direction); - qcopy(state->follow.unkD0, state->follow.look_target); + qcopy(state->follow.snap_look_target, state->follow.look_target); qcopy(follow->focus, &hero.motion.pos); qcopy(state->follow.offset, follow->focus); qcopy(state->position, pos); - qcopy(state->tail.snap.unk1F0, pos); - snap->unk200 = tail->unk15C - fast_vec_length(tail->unk130); + qcopy(state->tail.snap.shot_pos, pos); + snap->eye_distance_error = tail->eye_distance - fast_vec_length(tail->eye_offset); *(s32 *)&reset->unk34 = 0; reset->look_height = follow->look_height; { diff --git a/src/overlays/shared/cutscenes/update_cutscene_playback.c b/src/overlays/shared/cutscenes/update_cutscene_playback.c index c9b6869412..0db26eddc0 100644 --- a/src/overlays/shared/cutscenes/update_cutscene_playback.c +++ b/src/overlays/shared/cutscenes/update_cutscene_playback.c @@ -831,11 +831,11 @@ void queue_scene_movie_with_game_language(s32 i) { if (i < 0) return; if (D_0015ED80) { - scene_movie_sector = disc_table.unk18A0[i].sector; - scene_movie_size = disc_table.unk18A0[i].size; + scene_movie_sector = disc_table.scene_movies_alt[i].sector; + scene_movie_size = disc_table.scene_movies_alt[i].size; } else { - scene_movie_sector = disc_table.unk1808[i].sector; - scene_movie_size = disc_table.unk1808[i].size; + scene_movie_sector = disc_table.scene_movies[i].sector; + scene_movie_size = disc_table.scene_movies[i].size; } hero_ptr = &hero; if (hero_ptr->health.hp == 0) { @@ -853,11 +853,11 @@ void queue_language_zero_movie(s32 i) { if (i < 0) return; if (D_0015ED80) { - queued_movie_sector = disc_table.unk1A50[i].sector; - queued_movie_size = disc_table.unk1A50[i].size; + queued_movie_sector = disc_table.queued_movies_alt[i].sector; + queued_movie_size = disc_table.queued_movies_alt[i].size; } else { - queued_movie_sector = disc_table.unk1A28[i].sector; - queued_movie_size = disc_table.unk1A28[i].size; + queued_movie_sector = disc_table.queued_movies[i].sector; + queued_movie_size = disc_table.queued_movies[i].size; } prepare_movie_playback(queued_movie_sector, queued_movie_size, 0); } diff --git a/src/overlays/shared/streaming/load_scene_chunks_with_fade.c b/src/overlays/shared/streaming/load_scene_chunks_with_fade.c index 0dc110d0a1..42aa0ca2a3 100644 --- a/src/overlays/shared/streaming/load_scene_chunks_with_fade.c +++ b/src/overlays/shared/streaming/load_scene_chunks_with_fade.c @@ -25,10 +25,10 @@ void load_scene_chunks_with_fade(s32 i) { s32 *offset_entry; if (pal_mode == PAL_MODE_DISABLED) { start_audio_stream_read( - D_L00_0016C860.buf, disc_table.unk1530[i].sector, disc_table.unk1530[i].size); + D_L00_0016C860.buf, disc_table.scene_chunk_archives[i].sector, disc_table.scene_chunk_archives[i].size); } else { start_audio_stream_read( - D_L00_0016C860.buf, disc_table.unk15A0[i].sector, disc_table.unk15A0[i].size); + D_L00_0016C860.buf, disc_table.scene_chunk_archives_alt[i].sector, disc_table.scene_chunk_archives_alt[i].size); } update_audio_stream_until_idle(0); fade_to_black(4); @@ -61,10 +61,10 @@ void load_chunks_with_optional_fade(s32 i, s32 fade_frame_count) { s32 *offset_entry; if (pal_mode == PAL_MODE_DISABLED) { start_audio_stream_read( - H245610.buf, disc_table.unk12E8[i].sector, disc_table.unk12E8[i].size); + H245610.buf, disc_table.chunk_archives[i].sector, disc_table.chunk_archives[i].size); } else { start_audio_stream_read( - H245610.buf, disc_table.unk1338[i].sector, disc_table.unk1338[i].size); + H245610.buf, disc_table.chunk_archives_alt[i].sector, disc_table.chunk_archives_alt[i].size); } if (fade_frame_count != 0) { update_audio_stream_until_idle(0); diff --git a/src/overlays/shared/streaming/start_indexed_disc_stream.c b/src/overlays/shared/streaming/start_indexed_disc_stream.c index 383816bc73..41c67d1156 100644 --- a/src/overlays/shared/streaming/start_indexed_disc_stream.c +++ b/src/overlays/shared/streaming/start_indexed_disc_stream.c @@ -16,11 +16,11 @@ void start_indexed_disc_stream(s32 i) { if (i < 0) return; if (pal_mode) { - sector = disc_table.unk1A10[i].sector; - stream_size = disc_table.unk1A10[i].size; + sector = disc_table.streams_alt[i].sector; + stream_size = disc_table.streams_alt[i].size; } else { - sector = disc_table.unk19F8[i].sector; - stream_size = disc_table.unk19F8[i].size; + sector = disc_table.streams[i].sector; + stream_size = disc_table.streams[i].size; } hero_ptr = &hero; if (hero_ptr->health.hp == 0) { diff --git a/src/rendering/effects/render_level_effects_and_screen_sprites.c b/src/rendering/effects/render_level_effects_and_screen_sprites.c index 321c6c2b6b..a1f3cd1ed4 100644 --- a/src/rendering/effects/render_level_effects_and_screen_sprites.c +++ b/src/rendering/effects/render_level_effects_and_screen_sprites.c @@ -116,7 +116,7 @@ void render_level_effects_and_screen_sprites(void) { update_camera_view_matrices(); for (effect_slot_index = 0; effect_slot_index < slot_count; effect_slot_index++) { if (panel_slot_enabled[effect_slot_index] != 0 && panel_slots[effect_slot_index] != 0 && - (effect_slot_index != 6 || menu_system.unkD8 != 0)) { + (effect_slot_index != 6 || menu_system.goodies_tab_shown != 0)) { draw_moby_list(panel_slots[effect_slot_index], 1); } } @@ -125,7 +125,7 @@ void render_level_effects_and_screen_sprites(void) { for (projection_slot_index = 0; projection_slot_index < slot_count; projection_slot_index++) { projected_slot = panel_slots[projection_slot_index]; if (projected_slot == 0 || panel_slot_enabled[projection_slot_index] == 0 || - (projection_slot_index == 6 && menu_system.unkD8 == 0)) { + (projection_slot_index == 6 && menu_system.goodies_tab_shown == 0)) { continue; } projected_frame = projected_slot->frame; @@ -179,7 +179,7 @@ void render_level_effects_and_screen_sprites(void) { if (panel_slot_enabled[draw_slot_index] == 0 || panel->draw == 0) { continue; } - if (draw_slot_index == 6 && menu_system.unkD8 == 0) { + if (draw_slot_index == 6 && menu_system.goodies_tab_shown == 0) { continue; } if (pass == 0 && !(projected_width_or_panel_flags & 2)) { @@ -274,7 +274,7 @@ void render_level_effects_and_screen_sprites(void) { setup_gif_paging(0); for (final_slot_index = 0; final_slot_index < slot_count; final_slot_index++) { if (panel_slot_enabled[final_slot_index] != 0 && - (final_slot_index != 6 || menu_system.unkD8 != 0)) { + (final_slot_index != 6 || menu_system.goodies_tab_shown != 0)) { draw_menu_flashing_panel(panel_slots[final_slot_index]); } } diff --git a/src/runtime/startup/init_once.c b/src/runtime/startup/init_once.c index a38184a074..259a5556bf 100644 --- a/src/runtime/startup/init_once.c +++ b/src/runtime/startup/init_once.c @@ -106,8 +106,8 @@ void init_once(void) { load_disc_sectors_into_global_buffer(); aligned_memory_base = (u32)D_24135F & 0xFFFFC000; boot_archive = (struct BootArchive *)(aligned_memory_base + 0x2C0000); - compressed_archive_buffer = (s32 *)(D_1FF8000 - (disc_table.unk12C0.size << 0xB)); - wad_get_sectors(disc_table.unk12C0.sector, disc_table.unk12C0.size, compressed_archive_buffer); + compressed_archive_buffer = (s32 *)(D_1FF8000 - (disc_table.startup_archive.size << 0xB)); + wad_get_sectors(disc_table.startup_archive.sector, disc_table.startup_archive.size, compressed_archive_buffer); FlushCache(0); decompress_wad(compressed_archive_buffer, boot_archive); FlushCache(0); diff --git a/src/ui/map/coverage/save_map_coverage.c b/src/ui/map/coverage/save_map_coverage.c index 2d637440ec..c8474f8dc1 100644 --- a/src/ui/map/coverage/save_map_coverage.c +++ b/src/ui/map/coverage/save_map_coverage.c @@ -14,7 +14,7 @@ void save_map_coverage(s32 map_coverage_buffer) { s32 coverage_save_result; noop_memory_callback(); - if (level_map_selection.unk28 == 0) { + if (level_map_selection.coverage_enabled == 0) { fill_transfer_words(map_coverage_buffer, 0, 0x800); return; } diff --git a/src/ui/map/draw_map_screen.c b/src/ui/map/draw_map_screen.c index e5ee7c9910..5d67484f73 100644 --- a/src/ui/map/draw_map_screen.c +++ b/src/ui/map/draw_map_screen.c @@ -98,10 +98,10 @@ s32 draw_map_screen(struct MenuScreen *screen) { menu_system.next = (struct MenuPage *)map_cross_destination_page; } if ((controller_state.pressed_unmasked & PAD_CIRCLE) && level_map_selection.level != 0) { - menu_system.unkF0 = (struct MenuPage *)map_circle_destination_page; + menu_system.travel_page = (struct MenuPage *)map_circle_destination_page; menu_system.unkF4 = 0xB; menu_system.close_request = 3; - menu_system.unkE4 = level_map_selection.level; + menu_system.travel_level = level_map_selection.level; allocate_voice_for_target_entry(0, 0x11, screen->moby); return 0; } @@ -213,11 +213,11 @@ s32 draw_map_screen(struct MenuScreen *screen) { k = (current_level_index + level_map_selection.unk230 == 0) ? 0 : 0x100; if (k == next) { stash_receive_data(level_map_selection.slot[pick], - level_map_selection.unk22C, + level_map_selection.current_map_data, 0, - level_map_selection.unk234, + level_map_selection.current_map_size, 0); - level_map_selection.slot_size[pick] = level_map_selection.unk234; + level_map_selection.slot_size[pick] = level_map_selection.current_map_size; } else { if (next & 0x100) { map_read_entry = &D_00138438[next ^ 0x100]; diff --git a/src/ui/menus/initialize_menu_preview_scene.c b/src/ui/menus/initialize_menu_preview_scene.c index 37b21e0e34..a1858e4ce3 100644 --- a/src/ui/menus/initialize_menu_preview_scene.c +++ b/src/ui/menus/initialize_menu_preview_scene.c @@ -76,10 +76,10 @@ void initialize_menu_preview_scene(void) { menu_system.unkFC = help_text_buffer_start + 0xC1000; menu_system.unk100 = graphics_buffer_start + 0x11800; current_vu_chain = 0xA0000; - menu_system.unk104 = preview_workspace_start; - menu_system.unk10 = graphics_workspace_base; + menu_system.preview_workspace = preview_workspace_start; + menu_system.graphics_workspace = graphics_workspace_base; menu_system.help_text_buffer = help_text_buffer_start; - menu_system.unk10C = graphics_buffer_start; + menu_system.stream_buffer_base = graphics_buffer_start; initialize_menu_stream_buffers(1); vu1_init_chain(); menu_system.saved_texture_start = gs_texture_allocation_start; diff --git a/src/ui/menus/item_preview/clear_preview_resource_bindings.c b/src/ui/menus/item_preview/clear_preview_resource_bindings.c index 672adeced7..9208bc1d4a 100644 --- a/src/ui/menus/item_preview/clear_preview_resource_bindings.c +++ b/src/ui/menus/item_preview/clear_preview_resource_bindings.c @@ -17,8 +17,8 @@ void clear_preview_resource_bindings(void) { register s32 resource_count; register s32 resource_end; - resource_index = menu_system.unkA8; - if (resource_index < (resource_index + menu_system.unkAC)) { + resource_index = menu_system.preview_resource_first; + if (resource_index < (resource_index + menu_system.preview_resource_count)) { u8 *class_slots = resident_class_slot_by_id; u8 *class_resources = (u8 *)moby_class_resources; u8 *bindings = preview_resource_bindings; @@ -32,10 +32,10 @@ void clear_preview_resource_bindings(void) { animation_address = class_resource_address + (binding->animation_index * 4); *(s32 *)(animation_address + 0x48) = 0; binding += 1; - resource_first = menu_system.unkA8; - resource_count = menu_system.unkAC; + resource_first = menu_system.preview_resource_first; + resource_count = menu_system.preview_resource_count; resource_end = resource_first + resource_count; } while (resource_index < resource_end); } - menu_system.unkAC = 0; + menu_system.preview_resource_count = 0; } diff --git a/src/ui/menus/item_preview/initialize_menu_preview_objects.c b/src/ui/menus/item_preview/initialize_menu_preview_objects.c index a8ed463050..0abe8b1c0c 100644 --- a/src/ui/menus/item_preview/initialize_menu_preview_objects.c +++ b/src/ui/menus/item_preview/initialize_menu_preview_objects.c @@ -31,14 +31,14 @@ int initialize_menu_preview_objects(struct MenuScreen *preview) { struct MenuSystem *g = &menu_system; active_class_resource_index = -1; - g->unk11C = -1; - g->unk120 = -1; + g->preview_requested_class = -1; + g->preview_loaded_class = -1; g->stream_buffer[0] = acquire_menu_stream_buffer(1); g->stream_buffer[1] = acquire_menu_stream_buffer(1); g->loaded_animation[0] = 0xFF; g->loaded_animation[1] = 0xFF; g->read_buffer_index = 0; - resource_buffer_slot = g->unkB0; + resource_buffer_slot = g->preview_resource_buffers; for (i = 2; i >= 0; i--) { *resource_buffer_slot = acquire_menu_stream_buffer(0); resource_buffer_slot++; diff --git a/src/ui/menus/item_preview/load_preview_resource_bindings.c b/src/ui/menus/item_preview/load_preview_resource_bindings.c index 881edfd4ec..5e98f4f242 100644 --- a/src/ui/menus/item_preview/load_preview_resource_bindings.c +++ b/src/ui/menus/item_preview/load_preview_resource_bindings.c @@ -33,8 +33,8 @@ void load_preview_resource_bindings(s32 first_resource, s32 resource_count) { count = resource_count; resource_index = 0; - menu_system.unkA8 = first_resource; - menu_system.unkAC = count; + menu_system.preview_resource_first = first_resource; + menu_system.preview_resource_count = count; /* Testing the index, not count, lets combine drop the constant note on its zero, so its live range is not doubled. */ if (resource_index < count) { @@ -62,7 +62,7 @@ void load_preview_resource_bindings(s32 first_resource, s32 resource_count) { compressed_size = stash_get_reserved_qwords(resource_id) * 0x10; buffer_offset = (resource_index + buffer_skip) * 4; resource_index += 1; - buffer_address = *((s32 *)((u8 *)menu_system.unkB0 + buffer_offset)); + buffer_address = *((s32 *)((u8 *)menu_system.preview_resource_buffers + buffer_offset)); read_address = (buffer_address + get_menu_stream_buffer_size(buffer_address)) - compressed_size; stash_receive_data(read_address, resource_id, 0, -1, 0); diff --git a/src/ui/menus/item_preview/release_menu_preview_objects.c b/src/ui/menus/item_preview/release_menu_preview_objects.c index ed7eb2bead..6f118c5c79 100644 --- a/src/ui/menus/item_preview/release_menu_preview_objects.c +++ b/src/ui/menus/item_preview/release_menu_preview_objects.c @@ -29,7 +29,7 @@ s32 release_menu_preview_objects(s32 preview_address) { resources->loaded_animation[1] = 0xFF; resources->read_buffer_index = 0; clear_preview_resource_bindings(); - resource_slot = resources->unkB0; + resource_slot = resources->preview_resource_buffers; do { resources_remaining -= 1; *resource_slot = release_menu_stream_buffer(*resource_slot); diff --git a/src/ui/menus/item_preview/update_item_preview_binding.c b/src/ui/menus/item_preview/update_item_preview_binding.c index 399a86ddbe..f6ae17588a 100644 --- a/src/ui/menus/item_preview/update_item_preview_binding.c +++ b/src/ui/menus/item_preview/update_item_preview_binding.c @@ -137,11 +137,11 @@ s32 update_item_preview_binding(struct ItemPreviewBinding *preview) { if (hero.items[0].item_id != 0 && oclass != hero.items[0].item_id) { noop_callback_q(0, 0); } - if (oclass != menu_system.unk11C) { + if (oclass != menu_system.preview_requested_class) { select_world_object_resource_tables(oclass, menu_system.resource_table_toggle == 0); menu_system.last_resource_table_toggle = active_decode_buffer; - menu_system.unk140 = oclass; - menu_system.unk120 = oclass; + menu_system.resource_table_class = oclass; + menu_system.preview_loaded_class = oclass; ((struct PreviewClassResource *) moby_class_resources[resident_class_slot_by_id[oclass]]) ->state_0d = 0; diff --git a/src/ui/menus/pause/build_pause_item_list.c b/src/ui/menus/pause/build_pause_item_list.c index c3a9b28433..54208a10b0 100644 --- a/src/ui/menus/pause/build_pause_item_list.c +++ b/src/ui/menus/pause/build_pause_item_list.c @@ -32,13 +32,13 @@ int build_pause_item_list(void) { MenuItemInfo *menu_item_definition = &menu_item_info[id]; unsigned char b = item_text_variant[id]; int has_text_variant = b != 0; - pause_item_entry->a = menu_item_definition->unk38; + pause_item_entry->a = menu_item_definition->icon; pause_item_entry->b = has_text_variant << 2; pause_item_entry->c = 0; pause_item_entry->id = id; pause_item_entry->idx = i; pause_item_variant_values[item_count] = - b ? menu_item_definition->unk42 : menu_item_definition->unk40; + b ? menu_item_definition->alt_name_text : menu_item_definition->name_text; item_count++; } } diff --git a/src/ui/menus/save_data/saving_data_menu.c b/src/ui/menus/save_data/saving_data_menu.c index dd9c54b397..901216b931 100644 --- a/src/ui/menus/save_data/saving_data_menu.c +++ b/src/ui/menus/save_data/saving_data_menu.c @@ -115,7 +115,7 @@ s32 saving_data_menu(struct MenuScreen *menu) { if ((pad_buttons & 0x40) && (memory_card_state.card[0].type == 2)) { new_var = (((u8 *)&memory_card_state) + (selected_slot * 0x1C)) + 0x20; if ((*((s32 *)new_var)) != (-1)) { - menu_system.unkD4 = 0; + menu_system.save_prompt_variant = 0; menu_system.next = (new_var = (u8 *)&save_confirm_page); D_001D2640[0] = menu->data.save.slot; } else { diff --git a/src/ui/menus/save_data/saving_data_menu2.c b/src/ui/menus/save_data/saving_data_menu2.c index fcbb282ee5..791d2a0006 100644 --- a/src/ui/menus/save_data/saving_data_menu2.c +++ b/src/ui/menus/save_data/saving_data_menu2.c @@ -122,7 +122,7 @@ s32 saving_data_menu2(struct MenuScreen *w) { if (*(s32 *)((u8 *)&memory_card_state + cursor * 0x1C + 0x20) != -1) { menu_system.next = (w->data.save.flags & 0x2000) ? &challenge_confirm_page : &new_game_confirm_page; - menu_system.unkD4 = (w->data.save.flags & 0x2000) ? 2 : 1; + menu_system.save_prompt_variant = (w->data.save.flags & 0x2000) ? 2 : 1; D_001D2640[0] = w->data.save.slot; } else { w->data.save.step = 1; diff --git a/src/ui/menus/selection/build_filtered_menu_item_list.c b/src/ui/menus/selection/build_filtered_menu_item_list.c index 731b4363b7..d614f5be68 100644 --- a/src/ui/menus/selection/build_filtered_menu_item_list.c +++ b/src/ui/menus/selection/build_filtered_menu_item_list.c @@ -35,12 +35,12 @@ s32 build_filtered_menu_item_list(void) { } if (item_available[id] != 0) { item_info = &menu_item_info[id]; - filtered_menu_item_records[filtered_item_count].icon = item_info->unk38; + filtered_menu_item_records[filtered_item_count].icon = item_info->icon; filtered_menu_item_records[filtered_item_count].unk2 = 0; filtered_menu_item_records[filtered_item_count].unk4 = 0; filtered_menu_item_records[filtered_item_count].id = id; - gadget_help_name_text_ids[filtered_item_count] = item_info->unk40; - gadget_help_text_ids[filtered_item_count] = item_info->unk44; + gadget_help_name_text_ids[filtered_item_count] = item_info->name_text; + gadget_help_text_ids[filtered_item_count] = item_info->description_text; filtered_menu_item_records[filtered_item_count].index = i; filtered_item_count++; } diff --git a/src/ui/menus/selection/update_menu_confirm_page.c b/src/ui/menus/selection/update_menu_confirm_page.c index 472fa0bce4..0406784ae5 100644 --- a/src/ui/menus/selection/update_menu_confirm_page.c +++ b/src/ui/menus/selection/update_menu_confirm_page.c @@ -11,7 +11,7 @@ int update_menu_confirm_page(void) { int confirm_input_flags = *(int *)(D_0013A4E0 + 0x2604); if (confirm_input_flags & 0x20) { struct MenuPage *page; - menu_system.unkD4 = 0; + menu_system.save_prompt_variant = 0; page = menu_system.current; menu_system.next = page->back; page->confirmed = 1; diff --git a/src/ui/menus/stream_buffers/initialize_menu_stream_buffers.c b/src/ui/menus/stream_buffers/initialize_menu_stream_buffers.c index 9c1dd584b8..5694d8a05e 100644 --- a/src/ui/menus/stream_buffers/initialize_menu_stream_buffers.c +++ b/src/ui/menus/stream_buffers/initialize_menu_stream_buffers.c @@ -24,7 +24,7 @@ void initialize_menu_stream_buffers(s32 mode) { struct MenuStreamBuffer *descriptor; primary_address = menu_system.help_text_buffer; - secondary_address = menu_system.unk10C; + secondary_address = menu_system.stream_buffer_base; if (mode == MENU_STREAM_MODE_SINGLE_PRIMARY_BUFFER) { primary_count = 1; secondary_count = 0; diff --git a/src/ui/menus/system/enter_main_menu.c b/src/ui/menus/system/enter_main_menu.c index 246b18c8f7..84b6eecc8f 100644 --- a/src/ui/menus/system/enter_main_menu.c +++ b/src/ui/menus/system/enter_main_menu.c @@ -7,7 +7,7 @@ void enter_main_menu(void) { GAME_MODE_MAIN_MENU = 3 }; menu_system.close_request = 0; - menu_system.unk10 = 0; + menu_system.graphics_workspace = 0; game_mode = GAME_MODE_MAIN_MENU; menu_system.state = 0x2D; menu_system.update_count = 0; diff --git a/src/ui/menus/system/handle_menu_action_buttons.c b/src/ui/menus/system/handle_menu_action_buttons.c index f7ba797a52..91fd304e19 100644 --- a/src/ui/menus/system/handle_menu_action_buttons.c +++ b/src/ui/menus/system/handle_menu_action_buttons.c @@ -23,8 +23,8 @@ s32 handle_menu_action_buttons(struct MenuScreen *menu_screen) { allocate_voice_for_target_entry(0, 0x11, menu_screen->moby); return 1; } else if (controller_state.pressed_unmasked & PAD_CIRCLE) { - menu_system.unkE4 = selected_level_index[0]; - menu_system.unkF0 = menu_system.current; + menu_system.travel_level = selected_level_index[0]; + menu_system.travel_page = menu_system.current; menu_system.close_request = 3; menu_system.unkF4 = 0xF; allocate_voice_for_target_entry(0, 0x11, menu_screen->moby); diff --git a/src/ui/menus/system/update_menu_entry_actions.c b/src/ui/menus/system/update_menu_entry_actions.c index e7b5dbaf4d..0e72fc7bbc 100644 --- a/src/ui/menus/system/update_menu_entry_actions.c +++ b/src/ui/menus/system/update_menu_entry_actions.c @@ -105,37 +105,37 @@ s32 update_menu_entry_actions(struct MenuScreen *menu) { /* This action passes the low halfword; the other indexed actions pass the full word. */ message_index = menu->data.list.items[menu->data.list.selected].param.half.hi; if (message_index != 0) { - menu_system.unkEC = (s32)menu_action_messages[message_index]; + menu_system.action_message = (s32)menu_action_messages[message_index]; } menu_system.close_request = 5; - menu_system.unkF0 = menu_system.current; + menu_system.travel_page = menu_system.current; menu_system.unkF4 = 0; - menu_system.unkE4 = menu->data.list.items[menu->data.list.selected].param.half.lo; + menu_system.travel_level = menu->data.list.items[menu->data.list.selected].param.half.lo; allocate_voice_for_target_entry(0, 0x11, menu->moby); return 0; case MENU_ACTION_REQUEST_CLOSE_WITH_WORD_PAYLOAD: menu_system.unkF4 = 2; - menu_system.unkF0 = menu_system.current; + menu_system.travel_page = menu_system.current; menu_system.close_request = 3; - menu_system.unkE4 = menu->data.list.items[menu->data.list.selected].param.value; + menu_system.travel_level = menu->data.list.items[menu->data.list.selected].param.value; allocate_voice_for_target_entry(0, 0x11, menu->moby); return 0; case MENU_ACTION_REQUEST_CLOSE_4_WITH_WORD_PAYLOAD: menu_system.unkF4 = 2; - menu_system.unkF0 = menu_system.current; + menu_system.travel_page = menu_system.current; menu_system.close_request = 4; - menu_system.unkE4 = menu->data.list.items[menu->data.list.selected].param.value; + menu_system.travel_level = menu->data.list.items[menu->data.list.selected].param.value; allocate_voice_for_target_entry(0, 0x11, menu->moby); return 0; case MENU_ACTION_REQUEST_CLOSE_6_WITH_WORD_PAYLOAD: menu_system.unkF4 = 2; - menu_system.unkF0 = menu_system.current; + menu_system.travel_page = menu_system.current; menu_system.close_request = 6; - menu_system.unkE4 = menu->data.list.items[menu->data.list.selected].param.value; + menu_system.travel_level = menu->data.list.items[menu->data.list.selected].param.value; allocate_voice_for_target_entry(0, 0x11, menu->moby); return 0; case MENU_ACTION_REQUEST_CLOSE_PRESERVING_PAYLOAD: - menu_system.unkF0 = menu_system.current; + menu_system.travel_page = menu_system.current; menu_system.unkF4 = 2; menu_system.close_request = 7; allocate_voice_for_target_entry(0, 0x11, menu->moby); diff --git a/src/ui/menus/system/update_menu_system.c b/src/ui/menus/system/update_menu_system.c index 5632457da6..a41c77dfe2 100644 --- a/src/ui/menus/system/update_menu_system.c +++ b/src/ui/menus/system/update_menu_system.c @@ -69,9 +69,9 @@ void update_menu_system(void) { update_fog(); space_load_in_progress = 1; menu_system.help_text_buffer = 0; - menu_system.unk10C = 0; - menu_system.unk104 = 0; - menu_system.unk10 = 0; + menu_system.stream_buffer_base = 0; + menu_system.preview_workspace = 0; + menu_system.graphics_workspace = 0; game_mode = 0; return; } diff --git a/src/ui/menus/widgets/draw_prompt_box.c b/src/ui/menus/widgets/draw_prompt_box.c index 4dd8c28c88..98bb9b0dad 100644 --- a/src/ui/menus/widgets/draw_prompt_box.c +++ b/src/ui/menus/widgets/draw_prompt_box.c @@ -24,7 +24,7 @@ int draw_prompt_box(struct MenuScreen *prompt) { vu1_add_g_sregister(0x47, 0x2004B); setup_gif_paging(0); text = fallback_prompt_text; - prompt_text_selector = menu_system.unkD4; + prompt_text_selector = menu_system.save_prompt_variant; switch (prompt_text_selector) { case 0: case 1: diff --git a/src/ui/menus/widgets/enter_menu_help_text.c b/src/ui/menus/widgets/enter_menu_help_text.c index 93678f6d4b..41d13b207e 100644 --- a/src/ui/menus/widgets/enter_menu_help_text.c +++ b/src/ui/menus/widgets/enter_menu_help_text.c @@ -29,7 +29,7 @@ s32 enter_menu_help_text(struct MenuScreen *menu) { menu_system_state = &menu_system; for (i = 0; i < 5; i++) { if (menu_stream_buffers[i].address != 0 && - (u32)menu_stream_buffers[i].address < (u32)menu_system_state->unk10C) { + (u32)menu_stream_buffers[i].address < (u32)menu_system_state->stream_buffer_base) { menu_stream_buffers[i].flags |= MENU_STREAM_BUFFER_ALLOCATED; } } @@ -43,7 +43,7 @@ s32 enter_menu_help_text(struct MenuScreen *menu) { menu->data.help.load_state = 3; } } - menu->unk10 |= MENU_SCREEN_HIDDEN; + menu->flags |= MENU_SCREEN_HIDDEN; return 0; } diff --git a/src/ui/menus/widgets/update_menu_help_text_load.c b/src/ui/menus/widgets/update_menu_help_text_load.c index af92480e00..20832e43da 100644 --- a/src/ui/menus/widgets/update_menu_help_text_load.c +++ b/src/ui/menus/widgets/update_menu_help_text_load.c @@ -61,7 +61,7 @@ int update_menu_help_text_load(struct MenuScreen *menu) { int text_base = (int)text_entries - 8; *(int *)((char *)text_entries + i * 0x10) += text_base; } - menu->unk10 &= ~MENU_SCREEN_HIDDEN; + menu->flags &= ~MENU_SCREEN_HIDDEN; menu->data.help.load_state = HELP_TEXT_LOAD_READY; } break; diff --git a/src/weapons/load_hand_gadget.c b/src/weapons/load_hand_gadget.c index 6abcfaa985..c8d5ad48c4 100644 --- a/src/weapons/load_hand_gadget.c +++ b/src/weapons/load_hand_gadget.c @@ -100,7 +100,7 @@ s32 load_hand_gadget(HandGadgetState *hand) { previous_selected_class = (moby != 0) ? (moby->oclass) : (-1); selected_gadget = menu_system.equipped[0]; selected_class = menu_item_info[selected_gadget].oclass; - selected_class_ready = selected_class == menu_system.unk120; + selected_class_ready = selected_class == menu_system.preview_loaded_class; if ((previous_selected_class != selected_class) && selected_class_ready) { delete_moby(moby); if (class_pose_manipulator.active) { @@ -111,9 +111,9 @@ s32 load_hand_gadget(HandGadgetState *hand) { } active_decode_buffer = menu_system.resource_table_toggle == 0; select_world_object_resource_tables(selected_class, -1); - menu_system.unk11C = selected_class; + menu_system.preview_requested_class = selected_class; menu_system.resource_table_toggle = active_decode_buffer; - menu_system.unk140 = selected_class; + menu_system.resource_table_class = selected_class; menu_system.last_resource_table_toggle = active_decode_buffer; ((u8 *)moby_class_resources[resident_class_slot_by_id[selected_class]])[0xD] = 0; moby = create_menu_preview_moby(selected_class); From 939f4213693d4b1deb1d5b00aa21a4746fbf605f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:03:51 +0000 Subject: [PATCH 014/213] decomp: name moby animation rate, pose layers, shadow slab and grid fields Offsets follow the moby animation and shadow notes: +0x5C rate, +0x60 pose layers, +0x84/+0x88 shadow slab, +0xA8 change counter, +0xAC grid index, +0xBD shadow direction. --- include/rnc/mobys/animation/moby_anim.h | 22 ++++++++--------- include/rnc/mobys/moby.h | 13 ++++++---- src/mobys/animation/blend_moby_animation.c | 6 ++--- src/mobys/animation/blend_moby_animation_ex.c | 6 ++--- src/mobys/animation/set_moby_animation.c | 4 ++-- src/mobys/init_moby_instance.c | 24 +++++++++---------- 6 files changed, 39 insertions(+), 36 deletions(-) diff --git a/include/rnc/mobys/animation/moby_anim.h b/include/rnc/mobys/animation/moby_anim.h index 92bbea5def..aab619bf88 100644 --- a/include/rnc/mobys/animation/moby_anim.h +++ b/include/rnc/mobys/animation/moby_anim.h @@ -20,18 +20,18 @@ typedef struct { char _pad00[0x24]; AnimClass *pClass; /* 0x24 */ char _pad28[0x50 - 0x28]; - unsigned char frame; /* 0x50 */ - unsigned char nextFrame; /* 0x51 */ - unsigned char seq; /* 0x52 */ - unsigned char prevSeq; /* 0x53 */ - float anim_time; /* 0x54: Moby.anim_time; a blend restarts it, > 0.025 not settled */ - float anim_speed; /* 0x58: Moby.anim_speed; 1 when a blend starts */ - float unk5C; /* 0x5C: 1 / blend frames after a blend */ - int unk60; /* 0x60: nonzero: not settled */ - void *manips; /* 0x64: Moby.manips; nonzero: not settled */ - float *frameData; /* 0x68 */ + unsigned char frame; /* 0x50 */ + unsigned char nextFrame; /* 0x51 */ + unsigned char seq; /* 0x52 */ + unsigned char prevSeq; /* 0x53 */ + float anim_time; /* 0x54: Moby.anim_time; a blend restarts it, > 0.025 not settled */ + float anim_speed; /* 0x58: Moby.anim_speed; 1 when a blend starts */ + float anim_rate; /* 0x5C: Moby.anim_rate; 1 / blend frames after a blend */ + int pose_layers; /* 0x60: Moby.pose_layers; nonzero forces the blend */ + void *manips; /* 0x64: Moby.manips; nonzero: not settled */ + float *frameData; /* 0x68 */ char _pad6C[4]; - unsigned char unk70; /* 0x70: Moby.anim_flags; a blend clears bit 1 */ + unsigned char anim_flags; /* 0x70: Moby.anim_flags; a blend clears bit 1 */ char _pad71[0xB]; unsigned char seq_sound; /* 0x7C */ char _pad7D[0x28]; diff --git a/include/rnc/mobys/moby.h b/include/rnc/mobys/moby.h index b8216dcf87..1ace2fbcd7 100644 --- a/include/rnc/mobys/moby.h +++ b/include/rnc/mobys/moby.h @@ -57,7 +57,8 @@ struct Moby { u8 prev_seq; f32 anim_time; f32 anim_speed; - u8 pad5C[8]; + f32 anim_rate; /* frame rate of the current frame (AnimSeq rate or the frame's own) */ + void *pose_layers; /* pose-layer list; a moby with layers always blends */ struct Manip *manips; void *cur_frame_data; void *prev_frame_data; @@ -81,16 +82,18 @@ struct Moby { u8 hit_slot; /* hit-message slot (0xFF: none) */ u8 padA5; s16 oclass; - u8 padA8[8]; - u8 mission; /* 0xB0: index into the level's D_0014C050 row (0xFF: not spawned) */ + s32 change_counter; /* bumped by the moby update; key of the collision pose cache */ + s32 grid_index; /* moby collision grid cell index */ + u8 mission; /* 0xB0: index into the level's D_0014C050 row (0xFF: not spawned) */ u8 padB1; u16 save_id; /* index into the level collected[]/killed[] tables and save bits D_0014C190[level][id >> 5] */ s16 unkB4; u8 padB6[2]; void * parent; /* 0xB8: spawner (bolt source record); its byte 0xB1 is a per-level id (FUN_L00_002a6b70) */ - u8 command; /* external command byte */ - u8 padBD[3]; + u8 command; /* external command byte */ + u8 shadow_dir; /* entry of the shadow direction table D_001AF000 */ + u8 padBE[2]; Vec4f rot_row0; /* 0xC0: rows of the matrix built from rot (euler_rotation_basis) */ Vec4f rot_row1; Vec4f rot_row2; diff --git a/src/mobys/animation/blend_moby_animation.c b/src/mobys/animation/blend_moby_animation.c index 529cf53068..a19b4231f7 100644 --- a/src/mobys/animation/blend_moby_animation.c +++ b/src/mobys/animation/blend_moby_animation.c @@ -28,7 +28,7 @@ void blend_moby_animation(MobyAnim *moby, int new_seq, int frame_index, int blen if (frame_index >= frame_count) { frame_index = frame_count - 1; } - if (moby->anim_time > 0.025f || moby->unk60 != 0 || moby->manips != 0) { + if (moby->anim_time > 0.025f || moby->pose_layers != 0 || moby->manips != 0) { slot = find_or_allocate_moby_render_slot((int)moby); if (slot >= 0) { FUN_0020ede8(moby, slot | 0x300); @@ -47,8 +47,8 @@ void blend_moby_animation(MobyAnim *moby, int new_seq, int frame_index, int blen moby->anim_speed = 1.0f; scale = 1.0f / convert_integer_to_float(blend_frames); moby->anim_time = 0.0f; - moby->unk70 = (unsigned char)(moby->unk70 & 0xFD); - moby->unk5C = scale; + moby->anim_flags = (unsigned char)(moby->anim_flags & 0xFD); + moby->anim_rate = scale; moby->seq_sound = moby->pClass->seqs[new_seq]->sound; } diff --git a/src/mobys/animation/blend_moby_animation_ex.c b/src/mobys/animation/blend_moby_animation_ex.c index 33df6500ac..06e2caf642 100644 --- a/src/mobys/animation/blend_moby_animation_ex.c +++ b/src/mobys/animation/blend_moby_animation_ex.c @@ -34,7 +34,7 @@ void blend_moby_animation_ex( unsigned char oldSeq; float scale; - if (moby->anim_time > 0.025f || moby->unk60 != 0 || moby->manips != 0 || (options & 4)) { + if (moby->anim_time > 0.025f || moby->pose_layers != 0 || moby->manips != 0 || (options & 4)) { slot = find_or_allocate_moby_render_slot((int)moby); if (slot >= 0) { flags = (options & 1) ? (slot | 0x100) : slot; @@ -54,8 +54,8 @@ void blend_moby_animation_ex( moby->anim_speed = 1.0f; scale = 1.0f / convert_integer_to_float(blend_frames); moby->anim_time = 0.0f; - moby->unk70 = (unsigned char)(moby->unk70 & 0xFD); - moby->unk5C = scale; + moby->anim_flags = (unsigned char)(moby->anim_flags & 0xFD); + moby->anim_rate = scale; moby->seq_sound = moby->pClass->seqs[new_seq]->sound; } diff --git a/src/mobys/animation/set_moby_animation.c b/src/mobys/animation/set_moby_animation.c index 0cf2d46a2f..fe3b72307c 100644 --- a/src/mobys/animation/set_moby_animation.c +++ b/src/mobys/animation/set_moby_animation.c @@ -27,8 +27,8 @@ void set_moby_animation(MobyAnim *moby, int seq, int frame) { moby->nextFrame = 0; } update_moby_animation_state(moby); - moby->unk5C = *moby->frameData; - moby->unk70 &= ~2; + moby->anim_rate = *moby->frameData; + moby->anim_flags &= ~2; } extern __typeof__(set_moby_animation) func_00212ED8 __attribute__((alias("FUN_00212ed8"))); diff --git a/src/mobys/init_moby_instance.c b/src/mobys/init_moby_instance.c index ae3529a5f7..8ba0e80934 100644 --- a/src/mobys/init_moby_instance.c +++ b/src/mobys/init_moby_instance.c @@ -41,7 +41,7 @@ typedef struct { unsigned long lights; /* 0x38 */ char pad40[0x18]; float anim_speed; /* 0x58 */ - float unk5C; /* 0x5C */ + float anim_rate; /* 0x5C */ char pad60[0x11]; unsigned char unk71; /* 0x71 */ unsigned char lod_dist; /* 0x72 */ @@ -53,8 +53,8 @@ typedef struct { unsigned char anim_trigger_count; /* 0x7E */ unsigned char shadow_range; /* 0x7F */ char pad80[4]; - int unk84; /* 0x84 */ - int unk88; /* 0x88 */ + int shadow_slab_lo; /* 0x84 */ + int shadow_slab_hi; /* 0x88 */ char pad8C[4]; int glow_color; /* 0x90 */ int collision; /* 0x94 */ @@ -66,10 +66,10 @@ typedef struct { unsigned char hit_slot; /* 0xA4 */ char padA5; short original_class_id; /* 0xA6 */ - int unkA8; /* 0xA8 */ - int unkAC; /* 0xAC */ + int change_counter; /* 0xA8 */ + int grid_index; /* 0xAC */ char padB0[0xD]; - unsigned char unkBD; /* 0xBD */ + unsigned char shadow_dir; /* 0xBD */ char padBE[0x42]; } MobyI; @@ -106,8 +106,8 @@ void init_moby_instance(void *moby_mem, int oClass) { moby_instance->lights = 0x40404000000000L; moby_instance->occlusion = 0x7F80; resident_pool_slot_index = ((char *)moby_instance - (char *)resident_object_pool) >> 8; - moby_instance->unkA8 = resident_pool_slot_index << 16; - moby_instance->unkAC = resident_pool_slot_index; + moby_instance->change_counter = resident_pool_slot_index << 16; + moby_instance->grid_index = resident_pool_slot_index; moby_instance->anim_trigger_count = 0; moby_instance->seq_sound = 0xFF; moby_instance->unkA0 = 0x7F; @@ -129,7 +129,7 @@ void init_moby_instance(void *moby_mem, int oClass) { moby_instance->collision = pClass->collision; moby_instance->scale = pClass->scale; moby_instance->anim_speed = 1.0f; - moby_instance->unk5C = 1.0f; + moby_instance->anim_rate = 1.0f; if (pClass->glow_rgba != 0) { moby_instance->flags |= 0x10; moby_instance->glow_color = pClass->glow_rgba; @@ -145,9 +145,9 @@ void init_moby_instance(void *moby_mem, int oClass) { if (vm->pClass->shadow_count != 0) { moby_instance->shadow_range = 0x18; moby_instance->flags |= 0x400; - moby_instance->unk84 = 0; - moby_instance->unk88 = 0; - moby_instance->unkBD = 0; + moby_instance->shadow_slab_lo = 0; + moby_instance->shadow_slab_hi = 0; + moby_instance->shadow_dir = 0; } if (vm->pClass->metal_count != 0) { moby_instance->metal_alpha = 0x18; From 1dc09c4191dc3a2724fa8cefcaf58f683d9b91c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:42:29 +0000 Subject: [PATCH 015/213] decomp: name spline ship, taxi and machinegun turret fields in levels 3, 5 and 7 --- src/overlays/l03/mobys/red_ship_1.c | 113 ++++++++-------- src/overlays/l05/mobys/taxi.c | 149 +++++++++++---------- src/overlays/l07/mobys/machinegun_turret.c | 144 ++++++++++---------- 3 files changed, 212 insertions(+), 194 deletions(-) diff --git a/src/overlays/l03/mobys/red_ship_1.c b/src/overlays/l03/mobys/red_ship_1.c index e979fb3248..891bf653ab 100644 --- a/src/overlays/l03/mobys/red_ship_1.c +++ b/src/overlays/l03/mobys/red_ship_1.c @@ -508,22 +508,19 @@ typedef struct RedShip1Vars { s8 unk2B; s8 unk2C; u8 pad_2D[0x33]; - u8 unk60; + u8 path_cursor; u8 pad_61[0x2F]; f32 segment_start_tangent[4]; - f32 unkA0; - f32 unkA4; - f32 unkA8; - u8 pad_AC[0x4]; - f32 unkB0[4]; - f32 unkC0[4]; - f32 unkD0[4]; - f32 unkE0[4]; + f32 segment_end_tangent[4]; + f32 segment_start[4]; + f32 segment_end[4]; + f32 spline_position[4]; + f32 prev_spline_position[4]; u8 pad_F0[0x10]; - f32 unk100; + f32 segment_t; f32 unk104; f32 unk108; - f32 unk10C; + f32 speed; u8 pad_110[0x4]; f32 roll_spring_velocity; u8 pad_118[0x4]; @@ -533,15 +530,15 @@ typedef struct RedShip1Vars { u8 pad_12E[0x3]; s8 unk131; u8 pad_132[0x2]; - f32 unk134; - f32 unk138; - f32 unk13C; + f32 speed_oscillation_amplitude; + f32 speed_oscillation_rate_degrees; + f32 speed_oscillation_phase; f32 unk140; f32 unk144; u8 pad_148[0x2]; s16 respawn_timer; u8 pad_14C[0x4]; - s32 unk150; + s32 voice; } RedShip1Vars; /* Train car update: keeps the cars of a group in step (stops them all when none can move), and on its @@ -583,7 +580,7 @@ void red_ship_1_update(char *moby) { if (spline_moby_pvars == 0) { return; } - pm = &spline_moby_pvars->unk60; + pm = &spline_moby_pvars->path_cursor; if (((unsigned char *)moby)[0x21] != 0xFF && ((unsigned char *)moby)[0x20] != 0 && ((unsigned char *)moby)[0x20] != 3) { found = 0; @@ -669,34 +666,38 @@ void red_ship_1_update(char *moby) { *(int *)(pm + 0x8) = 0; *(int *)(pm + 0x1C) = 0; } - initial_path_tangent = &spline_moby_pvars->unkA0; - *(OvlQuad *)&spline_moby_pvars->unkE0[0] = + initial_path_tangent = spline_moby_pvars->segment_end_tangent; + *(OvlQuad *)&spline_moby_pvars->prev_spline_position[0] = *(OvlQuad *)(*(char **)(pm + 0x10) + *(int *)pm * 0x10 + 0x10); - spline_moby_pvars->unk100 = 1.0f; + spline_moby_pvars->segment_t = 1.0f; compute_path_node_tangent(initial_path_tangent, (int *)pm, 0, spline_moby_pvars->unk104, spline_moby_pvars->unk108); - *(OvlQuad *)&spline_moby_pvars->unkB0[0] = *(OvlQuad *)&spline_moby_pvars->unkC0[0] = - *(OvlQuad *)(*(char **)(pm + 0x10) + *(int *)pm * 0x10 + 0x10); + *(OvlQuad *)&spline_moby_pvars->segment_start[0] = + *(OvlQuad *)&spline_moby_pvars->segment_end[0] = + *(OvlQuad *)(*(char **)(pm + 0x10) + *(int *)pm * 0x10 + 0x10); MOBY(moby)->rot.x = 0.0f; - MOBY(moby)->rot.y = - -fast_arc_tan(vector_length_xy(initial_path_tangent), spline_moby_pvars->unkA8); - MOBY(moby)->rot.z = - fast_arc_tan(spline_moby_pvars->unkA0 - zero[0], spline_moby_pvars->unkA4 - zero[1]); + MOBY(moby)->rot.y = -fast_arc_tan(vector_length_xy(initial_path_tangent), + spline_moby_pvars->segment_end_tangent[2]); + MOBY(moby)->rot.z = fast_arc_tan(spline_moby_pvars->segment_end_tangent[0] - zero[0], + spline_moby_pvars->segment_end_tangent[1] - zero[1]); spline_moby_pvars->roll_spring_velocity = 0.0f; spline_moby_pvars->unk11C = 0.0f; - *(OvlQuad *)&MOBY(moby)->pos = *(OvlQuad *)&spline_moby_pvars->unkE0[0]; + *(OvlQuad *)&MOBY(moby)->pos = *(OvlQuad *)&spline_moby_pvars->prev_spline_position[0]; add_moby_rotation_based_offsets(moby, moby_position); spline_moby_pvars->unk131 = 7; - initial_speed_oscillation_phase = spline_moby_pvars->unk13C; + initial_speed_oscillation_phase = spline_moby_pvars->speed_oscillation_phase; if (initial_speed_oscillation_phase > 6.2831855f) { - spline_moby_pvars->unk13C = initial_speed_oscillation_phase * DEG_TO_RAD; - } else if (spline_moby_pvars->unk134 != 0.0f && initial_speed_oscillation_phase == -1.0f) { - spline_moby_pvars->unk13C = random_angle_radians(); + spline_moby_pvars->speed_oscillation_phase = + initial_speed_oscillation_phase * DEG_TO_RAD; + } else if (spline_moby_pvars->speed_oscillation_amplitude != 0.0f && + initial_speed_oscillation_phase == -1.0f) { + spline_moby_pvars->speed_oscillation_phase = random_angle_radians(); } - *(OvlQuad *)&spline_moby_pvars->unkD0[0] = *(OvlQuad *)&spline_moby_pvars->unkC0[0]; + *(OvlQuad *)&spline_moby_pvars->spline_position[0] = + *(OvlQuad *)&spline_moby_pvars->segment_end[0]; compute_sampled_spline_path_lengths( pm, 0, moby, spline_moby_pvars->unk104, spline_moby_pvars->unk108); if (spline_moby_pvars->timer_12C > 0) { @@ -710,14 +711,14 @@ void red_ship_1_update(char *moby) { if (*(int *)(pm + 0x14) != -1) { MOBY(moby)->state = RED_SHIP_INITIALIZE; } - voice_slot_index = spline_moby_pvars->unk150; + voice_slot_index = spline_moby_pvars->voice; if (voice_slot_index != -1) { voice_slot_entry = (unsigned char *)&voice_pool + voice_slot_index * 0x70; if (*(char **)(voice_slot_entry + 0x88) == moby && voice_slot_entry[0x74]) { release_voice_slot(voice_slot_index); } } - spline_moby_pvars->unk150 = -1; + spline_moby_pvars->voice = -1; break; case RED_SHIP_WAIT_FOR_MOVEMENT_TIMER: if (fast_dec_timer_s16(&spline_moby_pvars->timer_12C)) { @@ -727,45 +728,49 @@ void red_ship_1_update(char *moby) { case RED_SHIP_FOLLOW_PATH_SPLINE: *(OvlQuad *)old_rot = *(OvlQuad *)&MOBY(moby)->rot; *(OvlQuad *)old_pos = *(OvlQuad *)&MOBY(moby)->pos; - path_tangent_or_moby_position = &spline_moby_pvars->unkA0; - if (spline_moby_pvars->unk100 >= 1.0f) { - spline_moby_pvars->unk100 -= 1.0f; + path_tangent_or_moby_position = spline_moby_pvars->segment_end_tangent; + if (spline_moby_pvars->segment_t >= 1.0f) { + spline_moby_pvars->segment_t -= 1.0f; advanced_path_node_index = advance_path_node_index(pm); *(OvlQuad *)&spline_moby_pvars->segment_start_tangent[0] = - *(OvlQuad *)&spline_moby_pvars->unkA0; + *(OvlQuad *)spline_moby_pvars->segment_end_tangent; compute_path_node_tangent(path_tangent_or_moby_position, (int *)pm, 1, spline_moby_pvars->unk104, spline_moby_pvars->unk108); - *(OvlQuad *)&spline_moby_pvars->unkB0[0] = *(OvlQuad *)&spline_moby_pvars->unkC0[0]; - *(OvlQuad *)&spline_moby_pvars->unkC0[0] = *( + *(OvlQuad *)&spline_moby_pvars->segment_start[0] = + *(OvlQuad *)&spline_moby_pvars->segment_end[0]; + *(OvlQuad *)&spline_moby_pvars->segment_end[0] = *( OvlQuad *)(*(char **)(pm + 0x10) + resolve_path_node_index(pm, advanced_path_node_index + 1) * 0x10 + 0x10); } - step = (spline_moby_pvars->unk10C + - spline_moby_pvars->unk134 * fast_sin(spline_moby_pvars->unk13C)) / - spline_moby_pvars->unkB0[3]; - spline_moby_pvars->unk13C = - fast_add_rotations(spline_moby_pvars->unk13C, spline_moby_pvars->unk138 * DEG_TO_RAD); - *(OvlQuad *)&spline_moby_pvars->unkE0[0] = *(OvlQuad *)&spline_moby_pvars->unkD0[0]; - evaluate_cubic_hermite_segment(spline_moby_pvars->unk100 + step, - spline_moby_pvars->unkD0, - spline_moby_pvars->unkB0, - spline_moby_pvars->unkC0, + step = + (spline_moby_pvars->speed + spline_moby_pvars->speed_oscillation_amplitude * + fast_sin(spline_moby_pvars->speed_oscillation_phase)) / + spline_moby_pvars->segment_start[3]; + spline_moby_pvars->speed_oscillation_phase = + fast_add_rotations(spline_moby_pvars->speed_oscillation_phase, + spline_moby_pvars->speed_oscillation_rate_degrees * DEG_TO_RAD); + *(OvlQuad *)&spline_moby_pvars->prev_spline_position[0] = + *(OvlQuad *)&spline_moby_pvars->spline_position[0]; + evaluate_cubic_hermite_segment(spline_moby_pvars->segment_t + step, + spline_moby_pvars->spline_position, + spline_moby_pvars->segment_start, + spline_moby_pvars->segment_end, spline_moby_pvars->segment_start_tangent, path_tangent_or_moby_position); if (!flag) { update_spline_moby_orientation(moby); } else { clear_u64_value(moby + 0x40); - MOBY(moby)->rot.z = - fast_arc_tan(spline_moby_pvars->unkD0[0] - spline_moby_pvars->unkE0[0], - spline_moby_pvars->unkD0[1] - spline_moby_pvars->unkE0[1]); + MOBY(moby)->rot.z = fast_arc_tan( + spline_moby_pvars->spline_position[0] - spline_moby_pvars->prev_spline_position[0], + spline_moby_pvars->spline_position[1] - spline_moby_pvars->prev_spline_position[1]); } path_tangent_or_moby_position = moby + 0x10; - spline_moby_pvars->unk100 += step; - *(OvlQuad *)&MOBY(moby)->pos = *(OvlQuad *)&spline_moby_pvars->unkE0[0]; + spline_moby_pvars->segment_t += step; + *(OvlQuad *)&MOBY(moby)->pos = *(OvlQuad *)&spline_moby_pvars->prev_spline_position[0]; if (!flag) { add_moby_rotation_based_offsets(moby, path_tangent_or_moby_position); } diff --git a/src/overlays/l05/mobys/taxi.c b/src/overlays/l05/mobys/taxi.c index 2719428be0..be601f5f2d 100644 --- a/src/overlays/l05/mobys/taxi.c +++ b/src/overlays/l05/mobys/taxi.c @@ -39,28 +39,27 @@ typedef struct TaxiVars { u8 pad_0[0x20]; u8 unk20; u8 pad_21[0x3F]; - f32 unk60[4]; - f32 unk70[4]; - s32 unk80; - u8 pad_84[0x10]; + f32 pose_position[4]; + f32 pose_rotation[4]; + s32 stops[5]; s32 path_94; s32 path_98; s32 path_9C; s32 path_A0; s32 path_A4; s32 path_A8; - char *unkAC; + char *route_path; s16 unkB0; s16 voice; - s16 unkB4; - s16 unkB6; - s32 unkB8; + s16 stop_index; + s16 destination_stop; + s32 branch_mission; s32 unkBC; - f32 unkC0; - s32 unkC4; + f32 blend_t; + s32 blend_speed; u8 pad_C8[0xC]; - f32 unkD4; - f32 unkD8; + f32 path_speed; + f32 path_acceleration; } TaxiVars; /* Moby class 998 */ @@ -110,7 +109,8 @@ void taxi_update(struct Moby *moby) { request_moby_variant_help_message(moby); if (pad_pressed_words[0] & 0x10) { moby->state = TAXI_BLEND_TO_PATH_START; - destination_stop_moby = find_moby_in_owner_list_by_id(moby, taxi_data->unkB6); + destination_stop_moby = + find_moby_in_owner_list_by_id(moby, taxi_data->destination_stop); if (destination_stop_moby != 0) { destination_stop_moby->state = TAXI_HIDDEN_STOP; destination_stop_moby->flags |= 1; @@ -128,39 +128,44 @@ void taxi_update(struct Moby *moby) { frame_time_sq, frame_time_sq, frame_time * 0.5f, - &taxi_data->unkC0, - (float *)&taxi_data->unkC4); + &taxi_data->blend_t, + (float *)&taxi_data->blend_speed); qa = rotation_or_start_position_scratch; - s = *(int *)((u8 *)taxi_data + 0x80 - (-(taxi_data->unkB4 * 4))); + s = *(int *)((u8 *)taxi_data + 0x80 - (-(taxi_data->stop_index * 4))); tab = l05_cuboids; qcopy(qa, &tab[s].pos); qcopy(interpolation_start_angles, &tab[s].rot); z = 0.0f; /* Fakematch: retail moves these arguments in another order; the cast keeps it. */ ((void (*)(float, int *, int, void *, float *, int))sample_camera_path)( - z, (int *)taxi_data->unkAC, 0, interpolation_end_position, interpolation_end_angles, 0); - lerp_vector(taxi_data->unk60, + z, + (int *)taxi_data->route_path, + 0, + interpolation_end_position, + interpolation_end_angles, + 0); + lerp_vector(taxi_data->pose_position, rotation_or_start_position_scratch, interpolation_end_position, - taxi_data->unkC0); - taxi_data->unk70[1] = fast_add_rotations( + taxi_data->blend_t); + taxi_data->pose_rotation[1] = fast_add_rotations( fast_subtract_rotations(interpolation_end_angles[1], interpolation_start_angles[1]) * - taxi_data->unkC0, + taxi_data->blend_t, interpolation_start_angles[1]); - taxi_data->unk70[2] = fast_add_rotations( + taxi_data->pose_rotation[2] = fast_add_rotations( fast_subtract_rotations(interpolation_end_angles[2], interpolation_start_angles[2]) * - taxi_data->unkC0, + taxi_data->blend_t, interpolation_start_angles[2]); - if (1.0f <= taxi_data->unkC0) { - taxi_data->unkC0 = z; - *(float *)&taxi_data->unkC4 = z; + if (1.0f <= taxi_data->blend_t) { + taxi_data->blend_t = z; + *(float *)&taxi_data->blend_speed = z; moby->state = TAXI_FOLLOW_PATH; } break; case TAXI_FOLLOW_PATH: if (advance_moby_path(moby)) { - *(int *)&taxi_data->unkC0 = 0; - taxi_data->unkC4 = 0; + *(int *)&taxi_data->blend_t = 0; + taxi_data->blend_speed = 0; moby->state = TAXI_BLEND_TO_DESTINATION; } break; @@ -171,40 +176,40 @@ void taxi_update(struct Moby *moby) { frame_time_sq, frame_time_sq, frame_time * 0.5f, - &taxi_data->unkC0, - (float *)&taxi_data->unkC4); + &taxi_data->blend_t, + (float *)&taxi_data->blend_speed); qa = interpolation_end_position; - s = *(int *)((u8 *)taxi_data + 0x80 - (-(taxi_data->unkB6 * 4))); + s = *(int *)((u8 *)taxi_data + 0x80 - (-(taxi_data->destination_stop * 4))); tab = l05_cuboids; qcopy(qa, &tab[s].pos); qcopy(interpolation_end_angles, &tab[s].rot); - sample_camera_path((int *)taxi_data->unkAC, + sample_camera_path((int *)taxi_data->route_path, 0, rotation_or_start_position_scratch, interpolation_start_angles, 0, - (float)*(int *)taxi_data->unkAC); - lerp_vector(taxi_data->unk60, + (float)*(int *)taxi_data->route_path); + lerp_vector(taxi_data->pose_position, rotation_or_start_position_scratch, interpolation_end_position, - taxi_data->unkC0); - taxi_data->unk70[1] = fast_add_rotations( + taxi_data->blend_t); + taxi_data->pose_rotation[1] = fast_add_rotations( fast_subtract_rotations(interpolation_end_angles[1], interpolation_start_angles[1]) * - taxi_data->unkC0, + taxi_data->blend_t, interpolation_start_angles[1]); - taxi_data->unk70[2] = fast_add_rotations( + taxi_data->pose_rotation[2] = fast_add_rotations( fast_subtract_rotations(interpolation_end_angles[2], interpolation_start_angles[2]) * - taxi_data->unkC0, + taxi_data->blend_t, interpolation_start_angles[2]); - if (1.0f <= taxi_data->unkC0) { - *(int *)&taxi_data->unkC0 = 0; - taxi_data->unkC4 = 0; + if (1.0f <= taxi_data->blend_t) { + *(int *)&taxi_data->blend_t = 0; + taxi_data->blend_speed = 0; moby->state = TAXI_WAIT_FOR_PICKUP; reset_selected_moby_to_current_placement(moby); } break; case TAXI_WAIT_FOR_ACTIVATION: - if (D_0014C050[current_level_index][taxi_data->unkB8] == 0xFF || + if (D_0014C050[current_level_index][taxi_data->branch_mission] == 0xFF || D_0014C050[current_level_index][taxi_data->unkBC] == 0xFF) { char *model = moby->pclass; unsigned short flags = moby->flags; @@ -252,20 +257,20 @@ enum TaxiStop { void initialize_taxi_stop_state(void *moby_v) { char *moby = moby_v; TaxiVars *taxi_stop_vars = (TaxiVars *)MOBY(moby)->pvars; - int *list = &taxi_stop_vars->unk80; + int *list = taxi_stop_vars->stops; int i; int selected_pose_byte_offset; char *pose_table_base; - taxi_stop_vars->unkB4 = -1; + taxi_stop_vars->stop_index = -1; for (i = 0; i < 5; i++) { if (fast_vec_dist(moby + 0x10, &l05_cuboids[list[i]].pos) < 1.0f) { - taxi_stop_vars->unkB4 = i; + taxi_stop_vars->stop_index = i; } } - switch (taxi_stop_vars->unkB4) { + switch (taxi_stop_vars->stop_index) { case TAXI_BRANCHING_STOP: { int k = current_level_index << 4; - if (visited52[taxi_stop_vars->unkB8 + k] != 0xFF && + if (visited52[taxi_stop_vars->branch_mission + k] != 0xFF && visited52[taxi_stop_vars->unkBC + k] != 0xFF) { moby[0x20] = 6; MOBY(moby)->flags = MOBY(moby)->flags | 1; @@ -295,12 +300,14 @@ void initialize_taxi_stop_state(void *moby_v) { } { int *selected = list; - selected += taxi_stop_vars->unkB4; + selected += taxi_stop_vars->stop_index; selected_pose_byte_offset = *selected << 7; } pose_table_base = (char *)l05_cuboids; - qcopy(taxi_stop_vars->unk60, (void *)(selected_pose_byte_offset + (int)pose_table_base + 0x30)); - qcopy(taxi_stop_vars->unk70, (void *)(selected_pose_byte_offset + (int)pose_table_base + 0x70)); + qcopy(taxi_stop_vars->pose_position, + (void *)(selected_pose_byte_offset + (int)pose_table_base + 0x30)); + qcopy(taxi_stop_vars->pose_rotation, + (void *)(selected_pose_byte_offset + (int)pose_table_base + 0x70)); } /* Picks the path for the current point (five points, point 2 chosen by the table entry) and sets the travel speeds; same source as FUN_L16_002e4a58. */ @@ -308,40 +315,40 @@ void select_taxi_route(struct Moby *moby) { TaxiVars *taxi_data = (TaxiVars *)moby->pvars; char *selected_path; float inv, frame_scaled_travel_step, frame_squared_travel_step, first_path_segment_length; - switch (taxi_data->unkB4) { + switch (taxi_data->stop_index) { case TAXI_PAIRED_ROUTE_FIRST_STOP: - taxi_data->unkAC = ((char *)l05_paths[taxi_data->path_94]); - taxi_data->unkB6 = 1; + taxi_data->route_path = ((char *)l05_paths[taxi_data->path_94]); + taxi_data->destination_stop = 1; break; case TAXI_PAIRED_ROUTE_SECOND_STOP: - taxi_data->unkAC = ((char *)l05_paths[taxi_data->path_98]); - taxi_data->unkB6 = 0; + taxi_data->route_path = ((char *)l05_paths[taxi_data->path_98]); + taxi_data->destination_stop = 0; break; case TAXI_BRANCHING_STOP: - if (D_0014C050[current_level_index][taxi_data->unkB8] != 0xFF) { - taxi_data->unkAC = ((char *)l05_paths[taxi_data->path_9C]); - taxi_data->unkB6 = 3; + if (D_0014C050[current_level_index][taxi_data->branch_mission] != 0xFF) { + taxi_data->route_path = ((char *)l05_paths[taxi_data->path_9C]); + taxi_data->destination_stop = 3; } else { - taxi_data->unkAC = ((char *)l05_paths[taxi_data->path_A4]); - taxi_data->unkB6 = 4; + taxi_data->route_path = ((char *)l05_paths[taxi_data->path_A4]); + taxi_data->destination_stop = 4; } break; case TAXI_PRIMARY_BRANCH_STOP: - taxi_data->unkAC = ((char *)l05_paths[taxi_data->path_A0]); - taxi_data->unkB6 = 2; + taxi_data->route_path = ((char *)l05_paths[taxi_data->path_A0]); + taxi_data->destination_stop = 2; break; case TAXI_FALLBACK_BRANCH_STOP: - taxi_data->unkAC = ((char *)l05_paths[taxi_data->path_A8]); - taxi_data->unkB6 = 2; + taxi_data->route_path = ((char *)l05_paths[taxi_data->path_A8]); + taxi_data->destination_stop = 2; break; } - selected_path = taxi_data->unkAC; + selected_path = taxi_data->route_path; first_path_segment_length = fast_vec_dist(selected_path + 0x10, selected_path + 0x20); frame_scaled_travel_step = frame_time * 20.0f; frame_squared_travel_step = frame_time_sq * 5.0f; - inv = 1.0f / (first_path_segment_length * (float)*(int *)taxi_data->unkAC); - taxi_data->unkC4 = 0; - *(int *)&taxi_data->unkC0 = 0; - taxi_data->unkD4 = frame_scaled_travel_step * inv; - taxi_data->unkD8 = frame_squared_travel_step * inv; + inv = 1.0f / (first_path_segment_length * (float)*(int *)taxi_data->route_path); + taxi_data->blend_speed = 0; + *(int *)&taxi_data->blend_t = 0; + taxi_data->path_speed = frame_scaled_travel_step * inv; + taxi_data->path_acceleration = frame_squared_travel_step * inv; } diff --git a/src/overlays/l07/mobys/machinegun_turret.c b/src/overlays/l07/mobys/machinegun_turret.c index 1d61ae0dfc..43906f33a2 100644 --- a/src/overlays/l07/mobys/machinegun_turret.c +++ b/src/overlays/l07/mobys/machinegun_turret.c @@ -39,7 +39,7 @@ void machinegun_turret_update(unsigned char *moby) __asm__("F typedef struct MachinegunTurretVars { u8 pad_0[0x20]; - u8 unk20; + u8 health; u8 pad_21[0x5]; s16 unk26; u8 pad_28[0x1]; @@ -47,19 +47,22 @@ typedef struct MachinegunTurretVars { u8 pad_2A[0x36]; u8 anim_state; u8 pad_61[0x6]; - u8 unk67; + u8 hit_flash_target_red; u8 pad_68[0x8]; - s32 unk70; - s32 unk74; + s32 sweep_start_moby; + s32 sweep_end_moby; f32 turn_speed_degrees; - s16 unk7C; - s16 unk7E; - f32 unk80[4]; - f32 unk90; - u16 unk94; + s16 fire_timer; + s16 sweep_reversing; + f32 sweep_start_yaw; + f32 sweep_end_yaw; + f32 sweep_offset; + f32 sweep_range; + f32 base_z; + u16 burst_length; u8 pad_96[0x2]; - s32 unk98; - u16 unk9C; + s32 burst_pause; + u16 burst_timer; u8 unk9E; } MachinegunTurretVars; @@ -86,7 +89,7 @@ void machinegun_turret_update(unsigned char *moby) { turret_instance_vars = ((char *)MOBY(moby)->pvars); if (turret_instance_vars == 0) return; - collision = &turret_instance_vars->unk20; + collision = &turret_instance_vars->health; animation = &turret_instance_vars->anim_state; hit = find_moby_hit(moby, 0x230000, 0); resolve_moby_hit_response((void *)moby, (MobyHit *)hit, collision, 0, contact, 0, 0, 4); @@ -94,10 +97,10 @@ void machinegun_turret_update(unsigned char *moby) { FUN_0022da68(1, 0, moby); FUN_L00_00257470(moby, 0, -1); MOBY(moby)->flags &= 0xefff; - turret_instance_vars->unk67 = 0xfa; + turret_instance_vars->hit_flash_target_red = 0xfa; turret_instance_vars->unk26 = scale_game_frames(60); trooper_anim_update(moby, animation); - turret_instance_vars->unk7C = scale_game_frames(60); + turret_instance_vars->fire_timer = scale_game_frames(60); if ((u8)MOBY(moby)->prev_seq != 2) FUN_00212f90(moby, 2, 0, 5); MOBY(moby)->state = TURRET_HIT_SPIN; @@ -106,34 +109,37 @@ void machinegun_turret_update(unsigned char *moby) { trooper_anim_finish(moby, animation); switch ((u8)MOBY(moby)->state) { case TURRET_INITIALIZE: - if (turret_instance_vars->unk70 != -1) { - char *target = (char *)(turret_instance_vars->unk70 * 0x100 + (int)level_mobys); - turret_instance_vars->unk80[0] = + if (turret_instance_vars->sweep_start_moby != -1) { + char *target = + (char *)(turret_instance_vars->sweep_start_moby * 0x100 + (int)level_mobys); + turret_instance_vars->sweep_start_yaw = fast_arc_tan(*(float *)(target + 0x10) - MOBY(moby)->pos.x, *(float *)(target + 0x14) - MOBY(moby)->pos.y); - if (turret_instance_vars->unk80[0] < 0.0f) - turret_instance_vars->unk80[0] += 6.2831855f; + if (turret_instance_vars->sweep_start_yaw < 0.0f) + turret_instance_vars->sweep_start_yaw += 6.2831855f; } - if (turret_instance_vars->unk74 != -1) { - char *target = (char *)(turret_instance_vars->unk74 * 0x100 + (int)level_mobys); - turret_instance_vars->unk80[1] = + if (turret_instance_vars->sweep_end_moby != -1) { + char *target = + (char *)(turret_instance_vars->sweep_end_moby * 0x100 + (int)level_mobys); + turret_instance_vars->sweep_end_yaw = fast_arc_tan(*(float *)(target + 0x10) - MOBY(moby)->pos.x, *(float *)(target + 0x14) - MOBY(moby)->pos.y); - if (turret_instance_vars->unk80[1] < 0.0f) - turret_instance_vars->unk80[1] += 6.2831855f; - if (turret_instance_vars->unk80[1] < turret_instance_vars->unk80[0]) - turret_instance_vars->unk80[1] += 6.2831855f; + if (turret_instance_vars->sweep_end_yaw < 0.0f) + turret_instance_vars->sweep_end_yaw += 6.2831855f; + if (turret_instance_vars->sweep_end_yaw < turret_instance_vars->sweep_start_yaw) + turret_instance_vars->sweep_end_yaw += 6.2831855f; } else { - turret_instance_vars->unk80[1] = turret_instance_vars->unk80[0] + 6.2831855f; + turret_instance_vars->sweep_end_yaw = + turret_instance_vars->sweep_start_yaw + 6.2831855f; } - turret_instance_vars->unk80[2] = 0.0f; - turret_instance_vars->unk80[3] = - turret_instance_vars->unk80[1] - turret_instance_vars->unk80[0]; - MOBY(moby)->rot.z = normalize_angle(turret_instance_vars->unk80[0]); - turret_instance_vars->unk90 = MOBY(moby)->pos.z; + turret_instance_vars->sweep_offset = 0.0f; + turret_instance_vars->sweep_range = + turret_instance_vars->sweep_end_yaw - turret_instance_vars->sweep_start_yaw; + MOBY(moby)->rot.z = normalize_angle(turret_instance_vars->sweep_start_yaw); + turret_instance_vars->base_z = MOBY(moby)->pos.z; turret_instance_vars->unk29 = 0; MOBY(moby)->command = 0; - turret_instance_vars->unk9C = turret_instance_vars->unk94; + turret_instance_vars->burst_timer = turret_instance_vars->burst_length; if ((u8)MOBY(moby)->prev_seq != 1) FUN_00212f90(moby, 1, 0, 0); MOBY(moby)->state = TURRET_SWEEP_AND_FIRE; @@ -142,27 +148,27 @@ void machinegun_turret_update(unsigned char *moby) { if ((u8)MOBY(moby)->seq != 1 && ((u8)MOBY(moby)->anim_flags & 2) != 0 && (u8)MOBY(moby)->prev_seq != 1) FUN_00212f90(moby, 1, 0, 1); - if (turret_instance_vars->unk7E != 0) { - turret_instance_vars->unk80[2] -= + if (turret_instance_vars->sweep_reversing != 0) { + turret_instance_vars->sweep_offset -= turret_instance_vars->turn_speed_degrees * 0.017453292f * frame_time; - if (turret_instance_vars->unk80[2] < 0.0f) { - turret_instance_vars->unk80[2] = 0.0f; - turret_instance_vars->unk7E = 0; + if (turret_instance_vars->sweep_offset < 0.0f) { + turret_instance_vars->sweep_offset = 0.0f; + turret_instance_vars->sweep_reversing = 0; } } else { - turret_instance_vars->unk80[2] += + turret_instance_vars->sweep_offset += turret_instance_vars->turn_speed_degrees * 0.017453292f * frame_time; - if (turret_instance_vars->unk80[3] < turret_instance_vars->unk80[2]) { - turret_instance_vars->unk80[2] = turret_instance_vars->unk80[3]; - turret_instance_vars->unk7E = 1; + if (turret_instance_vars->sweep_range < turret_instance_vars->sweep_offset) { + turret_instance_vars->sweep_offset = turret_instance_vars->sweep_range; + turret_instance_vars->sweep_reversing = 1; } } - MOBY(moby)->rot.z = - normalize_angle(turret_instance_vars->unk80[0] + turret_instance_vars->unk80[2]); - if (fast_dec_timer_s16(&turret_instance_vars->unk7C) == 0) + MOBY(moby)->rot.z = normalize_angle(turret_instance_vars->sweep_start_yaw + + turret_instance_vars->sweep_offset); + if (fast_dec_timer_s16(&turret_instance_vars->fire_timer) == 0) return; if ((u8)MOBY(moby)->command == 0) { - if (turret_instance_vars->unk98 == 0 || (turret_instance_vars->unk9C & 1)) { + if (turret_instance_vars->burst_pause == 0 || (turret_instance_vars->burst_timer & 1)) { FUN_L00_0024f7c8(moby, 0, position); velocity[0] = fast_cos(MOBY(moby)->rot.z) * (D_0015ED6C * 15.0f); velocity[1] = fast_sin(MOBY(moby)->rot.z) * (D_0015ED6C * 15.0f); @@ -171,32 +177,32 @@ void machinegun_turret_update(unsigned char *moby) { spawn_machinegun_turret_projectile( position, velocity, moby, (u8)turret_instance_vars->unk9E); } - if (turret_instance_vars->unk98 != 0) { - if (fast_dec_timer_s16(&turret_instance_vars->unk9C) != 0) { + if (turret_instance_vars->burst_pause != 0) { + if (fast_dec_timer_s16(&turret_instance_vars->burst_timer) != 0) { MOBY(moby)->command = 1; - turret_instance_vars->unk9C = *(u16 *)&turret_instance_vars->unk98; + turret_instance_vars->burst_timer = *(u16 *)&turret_instance_vars->burst_pause; } } else { - turret_instance_vars->unk9C ^= 1; + turret_instance_vars->burst_timer ^= 1; } - } else if (fast_dec_timer_s16(&turret_instance_vars->unk9C) != 0) { + } else if (fast_dec_timer_s16(&turret_instance_vars->burst_timer) != 0) { MOBY(moby)->command = 0; - turret_instance_vars->unk9C = turret_instance_vars->unk94; + turret_instance_vars->burst_timer = turret_instance_vars->burst_length; } - turret_instance_vars->unk7C = scale_game_frames(6); + turret_instance_vars->fire_timer = scale_game_frames(6); distance = vector_distance_xy(moby + 0x10, D_0013F3D0); if (!(55.0f < distance)) { if (!(35.0f < distance) || (u8)MOBY(moby)->visible != 0) return; } if (distance > 80.0f) - turret_instance_vars->unk7C *= 3; + turret_instance_vars->fire_timer *= 3; else if (distance > 120.0f) { - int timer = turret_instance_vars->unk7C; - turret_instance_vars->unk7C = timer << 2; + int timer = turret_instance_vars->fire_timer; + turret_instance_vars->fire_timer = timer << 2; } else { - int timer = turret_instance_vars->unk7C; - turret_instance_vars->unk7C = timer << 1; + int timer = turret_instance_vars->fire_timer; + turret_instance_vars->fire_timer = timer << 1; } break; case TURRET_HIT_SPIN: @@ -207,28 +213,28 @@ void machinegun_turret_update(unsigned char *moby) { direction = D_0015ED6C; } MOBY(moby)->rot.z = fast_add_rotations(MOBY(moby)->rot.z, direction * 12.566371f); - if (fast_dec_timer_s16(&turret_instance_vars->unk7C) == 0) + if (fast_dec_timer_s16(&turret_instance_vars->fire_timer) == 0) return; - turret_instance_vars->unk7C = scale_game_frames(180); + turret_instance_vars->fire_timer = scale_game_frames(180); MOBY(moby)->state = TURRET_LOWER_AND_REALIGN; break; case TURRET_LOWER_AND_REALIGN: if ((u8)MOBY(moby)->seq != 4 && ((u8)MOBY(moby)->anim_flags & 2) && (u8)MOBY(moby)->prev_seq != 4) FUN_00212f90(moby, 4, 0, 0); - if (turret_instance_vars->unk90 - 0.7f < MOBY(moby)->pos.z) + if (turret_instance_vars->base_z - 0.7f < MOBY(moby)->pos.z) MOBY(moby)->pos.z -= frame_time * 5.0f; else - MOBY(moby)->pos.z = turret_instance_vars->unk90 - 0.7f; - direction = - normalize_angle(turret_instance_vars->unk80[0] + turret_instance_vars->unk80[2]); + MOBY(moby)->pos.z = turret_instance_vars->base_z - 0.7f; + direction = normalize_angle(turret_instance_vars->sweep_start_yaw + + turret_instance_vars->sweep_offset); distance = fast_difference_between_rotations(MOBY(moby)->rot.z, direction); if (D_0015ED6C * 12.566371f < distance) MOBY(moby)->rot.z = fast_add_rotations(MOBY(moby)->rot.z, D_0015ED6C * 12.566371f); else - MOBY(moby)->rot.z = - normalize_angle(turret_instance_vars->unk80[0] + turret_instance_vars->unk80[2]); - if (fast_dec_timer_s16(&turret_instance_vars->unk7C) != 0) { + MOBY(moby)->rot.z = normalize_angle(turret_instance_vars->sweep_start_yaw + + turret_instance_vars->sweep_offset); + if (fast_dec_timer_s16(&turret_instance_vars->fire_timer) != 0) { FUN_0022da68(2, 0, moby); if ((u8)MOBY(moby)->prev_seq != 3) FUN_00212f90(moby, 3, 0, 5); @@ -236,11 +242,11 @@ void machinegun_turret_update(unsigned char *moby) { } break; case TURRET_RESTORE_HEIGHT: - if (MOBY(moby)->pos.z < turret_instance_vars->unk90) { + if (MOBY(moby)->pos.z < turret_instance_vars->base_z) { MOBY(moby)->pos.z += D_0015ED6C * 5.0f; return; } - MOBY(moby)->pos.z = turret_instance_vars->unk90; + MOBY(moby)->pos.z = turret_instance_vars->base_z; MOBY(moby)->flags |= 0x1000; if ((u8)MOBY(moby)->prev_seq != 1) FUN_00212f90(moby, 1, 0, 5); From 65b1df7e72a54505865ad9f619df840344399b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:54:26 +0000 Subject: [PATCH 016/213] decomp: name enemy movement, knockback and target fields in shared enemies --- src/overlays/shared/enemies/armed_transport.c | 122 ++++---- src/overlays/shared/enemies/blarg_commander.c | 36 +-- .../shared/enemies/blarg_elite_commando.c | 118 +++---- .../shared/enemies/blarg_paratrooper.c | 81 ++--- .../shared/enemies/blarg_space_commando.c | 45 +-- .../shared/enemies/blarg_trooper_projectile.c | 15 +- .../shared/enemies/bomb_spawner_bomb.c | 10 +- src/overlays/shared/enemies/frog.c | 66 ++-- src/overlays/shared/enemies/gadgebot.c | 294 +++++++++--------- src/overlays/shared/enemies/horny_toad.c | 88 +++--- src/overlays/shared/enemies/large_amoeboid.c | 208 +++++++------ src/overlays/shared/enemies/plasmabot.c | 79 ++--- src/overlays/shared/enemies/sand_mouse.c | 40 +-- src/overlays/shared/enemies/sandmouse.c | 58 ++-- src/overlays/shared/enemies/scoutbot.c | 38 +-- src/overlays/shared/enemies/seeker.c | 26 +- src/overlays/shared/enemies/sentrybot.c | 246 ++++++++------- src/overlays/shared/enemies/spawner.c | 59 ++-- src/overlays/shared/enemies/spawner_egg.c | 6 +- src/overlays/shared/enemies/spiderbot.c | 103 +++--- .../shared/math/interpolation/spring_turn.c | 111 +++---- 21 files changed, 965 insertions(+), 884 deletions(-) diff --git a/src/overlays/shared/enemies/armed_transport.c b/src/overlays/shared/enemies/armed_transport.c index f21b2c7f02..45b35ccf14 100644 --- a/src/overlays/shared/enemies/armed_transport.c +++ b/src/overlays/shared/enemies/armed_transport.c @@ -36,30 +36,30 @@ typedef struct ArmedTransportVars { u8 pad26[0x2]; s8 unk28; u8 pad29[0x37]; - u8 unk60[0x7]; + u8 trooper_anim[0x7]; u8 hit_animation_secondary_red; u8 pad68[0x8]; - f32 unk70[4]; + f32 target_position[4]; u8 pad80[0x30]; - s32 unkB0; - s32 unkB4; + s32 target; + s32 target_selection_status; u8 padB8[0x8]; - u8 unkC0[0x10]; - s32 unkD0; - s32 unkD4; + u8 passenger_moby_indices[0x10]; + s32 target_path_index; + s32 activation_path_index; s32 path_index; - s32 unkDC; - u8 unkE0[0x64]; - f32 unk144; + s32 second_path_index; + u8 joint_animation[0x64]; + f32 joint_animation_target; u8 pad148[0x18]; s32 death_timer_frames; - s32 unk164; + s32 rocket_timer; s32 path_point; s32 path_segment_fraction; f32 path_and_pose_state[4]; - u8 unk180[0x4]; - s32 unk184; - f32 unk188; + u8 pose_angle_velocity[0x4]; + s32 passenger_release_timer; + f32 rot_x_velocity; f32 bob_phase_radians; s32 voice; f32 base_height; @@ -188,8 +188,9 @@ void armed_transport_update(char *transport_moby) { transport_data->unk28 = 3; if (transport_data->path_index != -1) compute_armed_transport_path_headings(D_L16_001B0930[transport_data->path_index]); - if (transport_data->unkDC != -1) - compute_armed_transport_path_headings(D_L16_001B0930[transport_data->unkDC]); + if (transport_data->second_path_index != -1) + compute_armed_transport_path_headings( + D_L16_001B0930[transport_data->second_path_index]); speed = *(float *)&D_L16_00161D80 * frame_time; transport_data->path_segment_fraction = 0; transport_data->path_point = 0; @@ -212,10 +213,10 @@ void armed_transport_update(char *transport_moby) { int i; if (D_L16_0015F5C4 == 0 && - (transport_data->unkD4 == -1 || + (transport_data->activation_path_index == -1 || point_in_path_xy(hero.motion.pos.f, - D_L16_001B0930[transport_data->unkD4] + 0x10, - *(int *)D_L16_001B0930[transport_data->unkD4]))) { + D_L16_001B0930[transport_data->activation_path_index] + 0x10, + *(int *)D_L16_001B0930[transport_data->activation_path_index]))) { MOBY(transport_moby)->state = ARMED_TRANSPORT_STATE_FOLLOW_FIRST_PATH; MOBY(transport_moby)->flags &= 0xFFFE; MOBY(transport_moby)->visible = 1; @@ -225,9 +226,10 @@ void armed_transport_update(char *transport_moby) { vector.q = 0; vector.f[2] = 3.14159f; for (i = 0; i < 4; i++) { - if (((int *)(&transport_data->unkC0))[i] >= 0) { + if (((int *)(&transport_data->passenger_moby_indices))[i] >= 0) { set_blarg_elite_commando_parent_transform( - D_L16_0015FFD8 + (((int *)(&transport_data->unkC0))[i] << 8), + D_L16_0015FFD8 + + (((int *)(&transport_data->passenger_moby_indices))[i] << 8), transport_moby, armed_transport_passenger_attachment_offset, (char *)vector.f); @@ -241,7 +243,7 @@ void armed_transport_update(char *transport_moby) { char *path; for (i = 0; i < 4; i++) { - if (((int *)(&transport_data->unkC0))[i] >= 0) + if (((int *)(&transport_data->passenger_moby_indices))[i] >= 0) loaded = 1; } path = D_L16_001B0930[transport_data->path_index]; @@ -249,7 +251,7 @@ void armed_transport_update(char *transport_moby) { transport_data->path_and_pose_state[1] < 16.0f) { advance_accelerated_scalar((float *)(&transport_data->path_and_pose_state[3]), - (float *)(&transport_data->unk180), + (float *)(&transport_data->pose_angle_velocity), 1.5707964f, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, @@ -258,7 +260,7 @@ void armed_transport_update(char *transport_moby) { if (advance_armed_transport_along_path(transport_moby, path)) { if (loaded) { MOBY(transport_moby)->state = ARMED_TRANSPORT_STATE_RELEASE_PASSENGERS; - } else if (transport_data->unkDC == -1) { + } else if (transport_data->second_path_index == -1) { MOBY(transport_moby)->state = ARMED_TRANSPORT_STATE_TRACK_TARGET; } else { MOBY(transport_moby)->state = ARMED_TRANSPORT_STATE_ALIGN_SECOND_PATH; @@ -269,12 +271,13 @@ void armed_transport_update(char *transport_moby) { case ARMED_TRANSPORT_STATE_RELEASE_PASSENGERS: { int i, *slot; - if (!fast_dec_timer((int *)(&transport_data->unk184))) + if (!fast_dec_timer((int *)(&transport_data->passenger_release_timer))) break; - slot = (int *)(&transport_data->unkC0); + slot = (int *)(&transport_data->passenger_moby_indices); for (i = 0; i < 4; i++, slot++) { - if (((int *)(&transport_data->unkC0))[i] >= 0) { - char *passenger = D_L16_0015FFD8 + (((int *)(&transport_data->unkC0))[i] << 8); + if (((int *)(&transport_data->passenger_moby_indices))[i] >= 0) { + char *passenger = + D_L16_0015FFD8 + (((int *)(&transport_data->passenger_moby_indices))[i] << 8); clear_u64_value(rotation.f); rotation.f[2] = fast_add_rotations(MOBY(transport_moby)->rot.z, 3.14159f); @@ -284,11 +287,11 @@ void armed_transport_update(char *transport_moby) { start_blarg_elite_commando_return_to_initial_position(passenger, scale_game_frames(90)); *slot = -1; - transport_data->unk184 = scale_game_frames(30); + transport_data->passenger_release_timer = scale_game_frames(30); break; } if (i == 3) { - if (transport_data->unkDC != -1) { + if (transport_data->second_path_index != -1) { MOBY(transport_moby)->state = ARMED_TRANSPORT_STATE_ALIGN_SECOND_PATH; } else { MOBY(transport_moby)->state = ARMED_TRANSPORT_STATE_TRACK_TARGET; @@ -298,7 +301,7 @@ void armed_transport_update(char *transport_moby) { break; } case ARMED_TRANSPORT_STATE_ALIGN_SECOND_PATH: { - float heading = *(float *)(D_L16_001B0930[transport_data->unkDC] + 0x1C); + float heading = *(float *)(D_L16_001B0930[transport_data->second_path_index] + 0x1C); advance_accelerated_scalar((float *)&MOBY(transport_moby)->rot.z, (float *)(&transport_data->path_and_pose_state[2]), @@ -315,14 +318,14 @@ void armed_transport_update(char *transport_moby) { } case ARMED_TRANSPORT_STATE_FOLLOW_SECOND_PATH: advance_accelerated_scalar((float *)(&transport_data->path_and_pose_state[3]), - (float *)(&transport_data->unk180), + (float *)(&transport_data->pose_angle_velocity), 0.0f, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, frame_time * 6.2831855f); if (advance_armed_transport_along_path(transport_moby, - D_L16_001B0930[transport_data->unkDC])) { - if (transport_data->unkD0 == -1) { + D_L16_001B0930[transport_data->second_path_index])) { + if (transport_data->target_path_index == -1) { mark_moby_for_removal(transport_moby); return; } @@ -334,13 +337,13 @@ void armed_transport_update(char *transport_moby) { float bearing; advance_accelerated_scalar((float *)(&transport_data->path_and_pose_state[3]), - (float *)(&transport_data->unk180), + (float *)(&transport_data->pose_angle_velocity), 0.0f, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, frame_time * 6.2831855f); - bearing = fast_arc_tan(transport_data->unk70[0] - MOBY(transport_moby)->pos.x, - transport_data->unk70[1] - MOBY(transport_moby)->pos.y); + bearing = fast_arc_tan(transport_data->target_position[0] - MOBY(transport_moby)->pos.x, + transport_data->target_position[1] - MOBY(transport_moby)->pos.y); advance_accelerated_scalar(yaw, (float *)(&transport_data->path_and_pose_state[2]), bearing, @@ -348,28 +351,29 @@ void armed_transport_update(char *transport_moby) { frame_time_sq * 3.1415927f, frame_time * 6.2831855f); advance_accelerated_scalar((float *)&MOBY(transport_moby)->rot, - (float *)(&transport_data->unk188), + (float *)(&transport_data->rot_x_velocity), 0.0f, frame_time_sq * 1.5707964f, frame_time_sq * 1.5707964f, frame_time * 6.2831855f); - if (fast_dec_timer((int *)(&transport_data->unk164)) && transport_data->unkB4 != 2) + if (fast_dec_timer((int *)(&transport_data->rocket_timer)) && + transport_data->target_selection_status != 2) MOBY(transport_moby)->state = ARMED_TRANSPORT_STATE_SPAWN_DIRECTED_MOBY; break; } case ARMED_TRANSPORT_STATE_SPAWN_DIRECTED_MOBY: moby_point_position(transport_moby, 1, vector.f); - fast_vec_sub(rotation.f, &transport_data->unk70, vector.f); + fast_vec_sub(rotation.f, &transport_data->target_position, vector.f); fast_vec_normalize( rotation.f, rotation.f, *(float *)&armed_transport_spawn_direction_scale * frame_time); func_0022ED80_update(1, 0, transport_moby); spawn_armed_transport_rocket(transport_moby, (char *)rotation.f, vector.f, - &transport_data->unk70, + &transport_data->target_position, scale_game_frames(45)); MOBY(transport_moby)->state = ARMED_TRANSPORT_STATE_TRACK_TARGET; - transport_data->unk164 = scale_game_frames(180); + transport_data->rocket_timer = scale_game_frames(180); break; case ARMED_TRANSPORT_STATE_DYING: { float dt = frame_time; @@ -482,14 +486,15 @@ void update_armed_transport_damage_and_targeting(struct Moby *transport_moby) { if (response < 9) { FUN_0022da68_i(3, 0, transport_moby); transport_data->hit_animation_secondary_red = 120; - transport_data->unk188 = randf_sym(30.0f, 50.0f) * DEG_TO_RAD * frame_time; + transport_data->rot_x_velocity = + randf_sym(30.0f, 50.0f) * DEG_TO_RAD * frame_time; } } else { FUN_0022da68_i(3, 0, transport_moby); if (hero.vehicle_mode != HERO_VEHICLE_MODE_GIANT_CLANK) FUN_0022da68_i(2, 0, transport_moby); { - int *child = (int *)(&transport_data->unkC0), count = 3; + int *child = (int *)(&transport_data->passenger_moby_indices), count = 3; do { char *pool = D_L16_0015FFD8_sda; if (*child >= 0) @@ -502,20 +507,25 @@ void update_armed_transport_damage_and_targeting(struct Moby *transport_moby) { transport_data->hit_animation_secondary_red = 120; } } - trooper_anim_update(transport_moby, &transport_data->unk60); + trooper_anim_update(transport_moby, &transport_data->trooper_anim); } transport_moby->hit_slot = 255; - trooper_anim_finish(transport_moby, &transport_data->unk60); - if (transport_data->unkD0 != -1 && D_001413DC[0] != 22) { - char *path = D_L16_001B0930[transport_data->unkD0]; - FUN_L00_0025ff38( - 128.0f, transport_moby, &transport_data->unk70, 0, 0, path + 0x10, *(int *)path); + trooper_anim_finish(transport_moby, &transport_data->trooper_anim); + if (transport_data->target_path_index != -1 && D_001413DC[0] != 22) { + char *path = D_L16_001B0930[transport_data->target_path_index]; + FUN_L00_0025ff38(128.0f, + transport_moby, + &transport_data->target_position, + 0, + 0, + path + 0x10, + *(int *)path); } else - transport_data->unkB4 = 2; - if (transport_data->unkB0 == 0) { + transport_data->target_selection_status = 2; + if (transport_data->target == 0) { struct Hero *player = &hero; - transport_data->unkB0 = ((int)player->moby); - qcopy(&transport_data->unk70, &player->motion.pos); + transport_data->target = ((int)player->moby); + qcopy(&transport_data->target_position, &player->motion.pos); } } @@ -577,9 +587,9 @@ void update_armed_transport_joint_animation(char *moby) { float joint_animation_smoothing_factor = ticks * 0.03f; float joint_animation_secondary_control = ticks * 0.3f; ArmedTransportVars *transport_private_data = (ArmedTransportVars *)MOBY(moby)->pvars; - transport_private_data->unk144 = transport_private_data->path_and_pose_state[3]; + transport_private_data->joint_animation_target = transport_private_data->path_and_pose_state[3]; update_joint_animation(moby, - &transport_private_data->unkE0, + &transport_private_data->joint_animation, 2, joint_animation_smoothing_factor, joint_animation_secondary_control); diff --git a/src/overlays/shared/enemies/blarg_commander.c b/src/overlays/shared/enemies/blarg_commander.c index 3fb4796c2d..20be08e2f3 100644 --- a/src/overlays/shared/enemies/blarg_commander.c +++ b/src/overlays/shared/enemies/blarg_commander.c @@ -41,20 +41,20 @@ trooper_start_knockback(float, void *, void *, int, int, int) __asm__("FUN_L00_0 /* Pvars of a lobbed projectile, as set up at launch. */ typedef struct { u8 pad0[0x20]; - Vec4f arc; /* 0x20: filled by trooper_start_knockback */ - f32 rise; /* 0x30: D_0015ED70 * 40 */ - f32 fall; /* 0x34: D_0015ED70 * 100 */ - f32 launch_speed; /* 0x38 */ - f32 unk3C; /* 0x3C */ - s32 timer; /* 0x40 */ - s32 unk44; /* 0x44: set to 1 on launch */ - f32 unk48; /* 0x48: 0.7 on launch */ + Vec4f arc; /* 0x20: filled by trooper_start_knockback */ + f32 rise; /* 0x30: D_0015ED70 * 40 */ + f32 fall; /* 0x34: D_0015ED70 * 100 */ + f32 launch_speed; /* 0x38 */ + f32 vertical_speed; /* 0x3C */ + s32 collision_radius; /* 0x40: 1/1024 units (716.8 = 0.7) */ + s32 motion_flags; /* 0x44: set to 1 on launch */ + f32 collision_z_offset; /* 0x48: 0.7 on launch */ u8 pad4C[0x11]; u8 unk5D; u8 pad5E[0xE]; - f32 unk6C; /* 0x6C */ - f32 unk70; /* 0x70: -1 on launch */ - f32 unk74; /* 0x74: -1 on launch */ + f32 unk6C; /* 0x6C */ + f32 apex_animation_frame; /* 0x70: -1 on launch */ + f32 landing_animation_frame; /* 0x74: -1 on launch */ } LobbedVars; void start_blarg_commander_knockback(void *unused, struct Moby *moby) __asm__("FUN_L12_00308708"); @@ -70,8 +70,8 @@ void start_blarg_commander_knockback(void *unused, struct Moby *moby) { if (random_integer_below(3) == 0) { allocate_voice_for_target_entry(1, 0x20, moby); } - lobbed_vars->unk48 = 0.7f; - lobbed_vars->timer = truncate_float_to_s32(716.8f); + lobbed_vars->collision_z_offset = 0.7f; + lobbed_vars->collision_radius = truncate_float_to_s32(716.8f); lobbed_vars->unk6C = 0.0f; moby->update_dist = 0xFF; moby->flags &= ~6; @@ -90,17 +90,17 @@ void start_blarg_commander_knockback(void *unused, struct Moby *moby) { 3.0f / ((rise_sqrt_term + rise_sqrt_term) / frame_scaled_rise) + frame_time_sq * 100.0f * 0.5f * ((frame_rise_sqrt_term + frame_rise_sqrt_term) / frame_scaled_rise); - lobbed_vars->unk3C = square_root(frame_scaled_rise * 4.0f); + lobbed_vars->vertical_speed = square_root(frame_scaled_rise * 4.0f); lobbed_vars->unk5D = 0; - lobbed_vars->unk44 = 1; + lobbed_vars->motion_flags = 1; trooper_knockback_arc(knockback_input_vector, &knockback_heading, &lobbed_vars->launch_speed, - &lobbed_vars->unk3C); + &lobbed_vars->vertical_speed); trooper_start_knockback(knockback_heading, moby, &lobbed_vars->arc, 1, 5, 2); lobbed_vars->unk6C = frame_time + frame_time; - lobbed_vars->unk70 = -1.0f; - lobbed_vars->unk74 = -1.0f; + lobbed_vars->apex_animation_frame = -1.0f; + lobbed_vars->landing_animation_frame = -1.0f; moby->flags &= ~0x1000; blend_moby_animation(moby, 1, 0, 0); } diff --git a/src/overlays/shared/enemies/blarg_elite_commando.c b/src/overlays/shared/enemies/blarg_elite_commando.c index 01d022dba3..bfd7195c88 100644 --- a/src/overlays/shared/enemies/blarg_elite_commando.c +++ b/src/overlays/shared/enemies/blarg_elite_commando.c @@ -75,42 +75,42 @@ typedef struct L16DamageData { int owner; int pursuit_mode; u8 pad118[0x8]; - s32 unk120; + s32 spawn_path_index; float pursuit_range; - s32 unk128; + s32 starts_on_parent; int path_index; - u8 unk130[0x64]; + u8 joint_1_animation[0x64]; f32 joint_1_target_pitch; f32 joint_1_target_yaw; u8 pad19C[0x14]; - u8 unk1B0[0x64]; + u8 joint_2_animation[0x64]; f32 joint_2_target_pitch; f32 joint_2_target_yaw; u8 pad21C[0x14]; - u8 unk230[0x64]; - f32 unk294; + u8 joint_3_animation[0x64]; + f32 joint_3_target_pitch; f32 joint_3_target_yaw; u8 pad29C[0x14]; f32 initial_position_x; f32 initial_position_y; u8 pad2B8[0x4]; f32 cached_position_z; - f32 unk2C0; + f32 base_position_x; f32 base_position_y; - f32 unk2C8; + f32 base_position_z; f32 parent_heading_offset; - char *unk2D0; + char *parent_moby; f32 movement_step_length; u8 heading_angular_step[0x4]; s16 state_countdown_ticks; u16 rocket_fire_cycle_count; int pursuit_timer; f32 bobbing_z_phase_step; - f32 unk2E8; + f32 bobbing_z_phase; f32 bobbing_amplitude; f32 bobbing_x_phase_step; - f32 unk2F4; - f32 unk2F8; + f32 bobbing_x_phase; + f32 bobbing_y_phase_step; f32 bobbing_y_phase; s16 selected_path_node_index; s16 patrol_countdown_ticks; @@ -240,7 +240,7 @@ void blarg_elite_commando_update(char *commando_moby) { qcopy(target, &MOBY(aim_target_moby)->pos); } if ((&big_head_cheat_enabled)[7]) - manipulator_set_scale(&commando_data->unk130, 2.5f); + manipulator_set_scale(&commando_data->joint_1_animation, 2.5f); switch (((unsigned char *)commando_moby)[0x20]) { case COMMANDO_STATE_INITIALIZE: *(int *)&commando_data->bobbing_amplitude = 0; @@ -249,12 +249,13 @@ void blarg_elite_commando_update(char *commando_moby) { commando_data->unk28 = 2; commando_data->unk30 = 1.5f; commando_data->health = 3.0f; - commando_data->unk2F4 = random_angle_radians(); + commando_data->bobbing_x_phase = random_angle_radians(); commando_data->bobbing_y_phase = random_angle_radians(); - commando_data->unk2E8 = random_angle_radians(); + commando_data->bobbing_z_phase = random_angle_radians(); commando_data->bobbing_x_phase_step = random_float_between(90.0f, 180.0f) * DEG_TO_RAD * frame_time; - commando_data->unk2F8 = random_float_between(90.0f, 180.0f) * DEG_TO_RAD * frame_time; + commando_data->bobbing_y_phase_step = + random_float_between(90.0f, 180.0f) * DEG_TO_RAD * frame_time; commando_data->bobbing_z_phase_step = random_float_between(90.0f, 180.0f) * DEG_TO_RAD * frame_time; commando_data->patrol_countdown_ticks = @@ -265,17 +266,18 @@ void blarg_elite_commando_update(char *commando_moby) { MOBY(commando_moby)->flags &= 0x7FFF; { char *position = &MOBY(commando_moby)->pos; - if (commando_data->unk120 >= 0) { + if (commando_data->spawn_path_index >= 0) { int node = truncate_float_to_s32(random_float_between( - 0.0f, (float)(*(int *)D_L16_001B0930[commando_data->unk120] - 1))); + 0.0f, (float)(*(int *)D_L16_001B0930[commando_data->spawn_path_index] - 1))); commando_data->selected_path_node_index = node; - qcopy(position, D_L16_001B0930[commando_data->unk120] + (short)node * 16 + 0x10); + qcopy(position, + D_L16_001B0930[commando_data->spawn_path_index] + (short)node * 16 + 0x10); } commando_data->reward_hits = 1; - qcopy(&commando_data->unk2C0, position); + qcopy(&commando_data->base_position_x, position); qcopy(&commando_data->initial_position_x, position); } - if (commando_data->unk128) { + if (commando_data->starts_on_parent) { MOBY(commando_moby)->state = COMMANDO_STATE_FOLLOW_PARENT_TRANSFORM; MOBY(commando_moby)->visible = 0; MOBY(commando_moby)->flags = (MOBY(commando_moby)->flags | 1) & 0xEFFF; @@ -287,15 +289,16 @@ void blarg_elite_commando_update(char *commando_moby) { goto idle; break; case COMMANDO_STATE_FOLLOW_PARENT_TRANSFORM: - if (commando_data->unk2D0) { + if (commando_data->parent_moby) { MOBY(commando_moby)->visible = 1; MOBY(commando_moby)->flags &= 0xFFFE; movement = scratch_vector; transform_vector_by_basis( - movement, &commando_data->unk2C0, commando_data->unk2D0 + 0xC0); - fast_vec_add(&MOBY(commando_moby)->pos, movement, commando_data->unk2D0 + 0x10); - MOBY(commando_moby)->rot.z = fast_add_rotations( - *(float *)(commando_data->unk2D0 + 0x48), commando_data->parent_heading_offset); + movement, &commando_data->base_position_x, commando_data->parent_moby + 0xC0); + fast_vec_add(&MOBY(commando_moby)->pos, movement, commando_data->parent_moby + 0x10); + MOBY(commando_moby)->rot.z = + fast_add_rotations(*(float *)(commando_data->parent_moby + 0x48), + commando_data->parent_heading_offset); } break; case COMMANDO_STATE_RETURN_TO_INITIAL_POSITION: @@ -326,7 +329,7 @@ void blarg_elite_commando_update(char *commando_moby) { fast_dec_timer_s16(&commando_data->state_countdown_ticks); if (commando_data->pursuit_mode != COMMANDO_PURSUIT_MODE_DISABLED) { if (commando_data->state_countdown_ticks == 0) { - if (commando_data->unk120 >= 0) { + if (commando_data->spawn_path_index >= 0) { MOBY(commando_moby)->state = COMMANDO_STATE_MOVE_TO_ATTACK_NODE; commando_data->state_countdown_ticks = truncate_float_to_s32(scale_time(random_float_between(30.0f, 90.0f))); @@ -341,7 +344,7 @@ void blarg_elite_commando_update(char *commando_moby) { } } } else if (fast_dec_timer_s16(&commando_data->patrol_countdown_ticks)) { - if (commando_data->unk120 >= 0) { + if (commando_data->spawn_path_index >= 0) { commando_data->selected_path_node_index = (commando_data->selected_path_node_index + 1) % 2; MOBY(commando_moby)->state = COMMANDO_STATE_MOVE_TO_PATROL_NODE; @@ -353,7 +356,7 @@ void blarg_elite_commando_update(char *commando_moby) { case COMMANDO_STATE_MOVE_TO_PATROL_NODE: { float path_distance = func_L16_002D5280_update(commando_moby, - D_L16_001B0930[commando_data->unk120] + + D_L16_001B0930[commando_data->spawn_path_index] + (commando_data->selected_path_node_index * 16 + 0x10), 1); if (path_distance < 0.01f) { @@ -426,7 +429,7 @@ void blarg_elite_commando_update(char *commando_moby) { case COMMANDO_STATE_MOVE_TO_ATTACK_NODE: distance = func_L16_002D5280_update(commando_moby, - D_L16_001B0930[commando_data->unk120] + + D_L16_001B0930[commando_data->spawn_path_index] + (commando_data->selected_path_node_index * 16 + 0x10), 1); fast_dec_timer_s16(&commando_data->state_countdown_ticks); @@ -467,7 +470,7 @@ void blarg_elite_commando_update(char *commando_moby) { return; } fast_vec_sub(movement, position, movement); - fast_vec_add(&commando_data->unk2C0, &commando_data->unk2C0, movement); + fast_vec_add(&commando_data->base_position_x, &commando_data->base_position_x, movement); } break; case 6: default: @@ -478,21 +481,21 @@ void blarg_elite_commando_update(char *commando_moby) { if (((unsigned char *)commando_moby)[0x20] != 0 && ((unsigned char *)commando_moby)[0x20] != 10) { approach_value((float *)(&commando_data->bobbing_amplitude), 0.25f, frame_time * 0.25f); - commando_data->unk2F4 = - fast_add_rotations(commando_data->unk2F4, commando_data->bobbing_x_phase_step); - commando_data->bobbing_y_phase = - fast_add_rotations(commando_data->bobbing_y_phase, commando_data->unk2F8); - commando_data->unk2E8 = - fast_add_rotations(commando_data->unk2E8, commando_data->bobbing_z_phase_step); + commando_data->bobbing_x_phase = fast_add_rotations( + commando_data->bobbing_x_phase, commando_data->bobbing_x_phase_step); + commando_data->bobbing_y_phase = fast_add_rotations( + commando_data->bobbing_y_phase, commando_data->bobbing_y_phase_step); + commando_data->bobbing_z_phase = fast_add_rotations( + commando_data->bobbing_z_phase, commando_data->bobbing_z_phase_step); MOBY(commando_moby)->pos.x = - commando_data->unk2C0 + - commando_data->bobbing_amplitude * fast_sin(commando_data->unk2F4); + commando_data->base_position_x + + commando_data->bobbing_amplitude * fast_sin(commando_data->bobbing_x_phase); MOBY(commando_moby)->pos.y = commando_data->base_position_y + commando_data->bobbing_amplitude * fast_sin(commando_data->bobbing_y_phase); MOBY(commando_moby)->pos.z = - commando_data->unk2C8 + - commando_data->bobbing_amplitude * fast_sin(commando_data->unk2E8); + commando_data->base_position_z + + commando_data->bobbing_amplitude * fast_sin(commando_data->bobbing_z_phase); } if (fast_vec_dist(&MOBY(commando_moby)->pos, D_L16_001671C0) < 32.0f && !voice_is_playing(commando_moby, commando_data->voice_playback_handle)) @@ -686,8 +689,8 @@ void set_blarg_elite_commando_parent_transform(char *moby, char *vector) { L16DamageData *commando_data = (L16DamageData *)MOBY(moby)->pvars; - commando_data->unk2D0 = parent_moby; - qcopy(&commando_data->unk2C0, position); + commando_data->parent_moby = parent_moby; + qcopy(&commando_data->base_position_x, position); commando_data->parent_heading_offset = *(float *)(vector + 8); } @@ -710,7 +713,7 @@ void start_blarg_elite_commando_return_to_initial_position(struct Moby *moby, moby->flags |= 0x1000; commando_data->state_countdown_ticks = return_countdown_ticks; commando_data->cached_position_z = moby->pos.z; - qcopy(&commando_data->unk2C0, &moby->pos); + qcopy(&commando_data->base_position_x, &moby->pos); commando_data->movement_step_length = frame_time * 5.0f; } } @@ -722,7 +725,7 @@ float advance_blarg_elite_commando_base_position(char *moby, float advance_blarg_elite_commando_base_position(char *moby, float *target) { L16DamageData *commando_motion_data = (L16DamageData *)MOBY(moby)->pvars; - char *base_position = &commando_motion_data->unk2C0; + char *base_position = &commando_motion_data->base_position_x; float distance = fast_vec_dist(base_position, target); float acceleration_braking_step = frame_time_sq * 4.0f; int zero[1]; @@ -772,7 +775,7 @@ void randomize_blarg_elite_commando_group_pursuit_timers(void *group_source_moby /* Ported from rac1-decomp (src/overlays/shared/vendor_002A1B58.c: func_L16_002D5438), where it is exact; names translated to the US level program. */ void select_blarg_elite_commando_movement_animation(char *moby) { L16DamageData *commando_path_state = (L16DamageData *)MOBY(moby)->pvars; - char *target = D_L16_001B0930[commando_path_state->unk120] + + char *target = D_L16_001B0930[commando_path_state->spawn_path_index] + (commando_path_state->selected_path_node_index << 4); float angle = fast_arc_tan(*(float *)(target + 0x10) - MOBY(moby)->pos.x, *(float *)(target + 0x14) - MOBY(moby)->pos.y); @@ -917,16 +920,25 @@ void update_blarg_elite_commando_joint_aim(char *commando_moby) { yaw2 = 0.34906584f; else if (yaw2 < -0.34906584f) yaw2 = -0.34906584f; - commando_data->unk294 = pitch2; + commando_data->joint_3_target_pitch = pitch2; commando_data->joint_3_target_yaw = yaw2; } } - update_joint_animation( - commando_moby, &commando_data->unk130, 1, frame_scale_sq * 0.03f, frame_scale_sq * 0.3f); - update_joint_animation( - commando_moby, &commando_data->unk1B0, 2, frame_scale_sq * 0.03f, frame_scale_sq * 0.3f); - update_joint_animation( - commando_moby, &commando_data->unk230, 3, frame_scale_sq * 0.03f, frame_scale_sq * 0.3f); + update_joint_animation(commando_moby, + &commando_data->joint_1_animation, + 1, + frame_scale_sq * 0.03f, + frame_scale_sq * 0.3f); + update_joint_animation(commando_moby, + &commando_data->joint_2_animation, + 2, + frame_scale_sq * 0.03f, + frame_scale_sq * 0.3f); + update_joint_animation(commando_moby, + &commando_data->joint_3_animation, + 3, + frame_scale_sq * 0.03f, + frame_scale_sq * 0.3f); } /* Emit randomized joint particles while the moby is active. */ diff --git a/src/overlays/shared/enemies/blarg_paratrooper.c b/src/overlays/shared/enemies/blarg_paratrooper.c index 6c045d3823..dc0bb8351f 100644 --- a/src/overlays/shared/enemies/blarg_paratrooper.c +++ b/src/overlays/shared/enemies/blarg_paratrooper.c @@ -51,22 +51,22 @@ typedef struct Paratrooper302618 { u8 pad59[0x1]; unsigned char f5A; u8 pad5B[0x5]; - u8 unk60[0x7]; + u8 trooper_anim[0x7]; u8 hit_flash_red; u8 pad68[0x8]; - u8 unk70[0x10]; - f32 unk80; + u8 motion[0x10]; + f32 knockback_gravity; u8 pad84[0x4]; - f32 unk88; + f32 knockback_speed; f32 knockback_z_speed; - s32 unk90; - s32 unk94; - f32 unk98; + s32 knockback_collision_radius; + s32 knockback_motion_flags; + f32 knockback_collision_z_offset; u8 pad9C[0x11]; u8 unkAD; u8 padAE[0x12]; - f32 unkC0; - f32 unkC4; + f32 knockback_apex_animation_frame; + f32 knockback_landing_animation_frame; u8 padC8[0x8]; int fD0; u8 padD4[0x4]; @@ -82,8 +82,8 @@ typedef struct Paratrooper302618 { float f110; float f114; u8 pad118[0x8]; - u8 unk120[0x8]; - f32 unk128; + u8 path_search_point[0x8]; + f32 path_search_point_z; u8 pad12C[0x34]; char *target_moby; int target_selection_status; @@ -92,7 +92,7 @@ typedef struct Paratrooper302618 { int jump_path_index; s16 target_range_boost_timer; short hop_count; - f32 unk1DC; + f32 target_range; u8 pad1E0[0x4]; f32 base_target_range; float projectile_pitch_divisor; @@ -697,10 +697,10 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { turn = truncate_float_to_s32(512.0f); { float pose_scale = D_L08_00162184 * frame_time_sq; - paratrooper_instance_state->unk90 = turn; - paratrooper_instance_state->unk98 = 0.5f; - paratrooper_instance_state->unk94 = 9; - paratrooper_instance_state->unk80 = pose_scale; + paratrooper_instance_state->knockback_collision_radius = turn; + paratrooper_instance_state->knockback_collision_z_offset = 0.5f; + paratrooper_instance_state->knockback_motion_flags = 9; + paratrooper_instance_state->knockback_gravity = pose_scale; } paratrooper_instance_state->unkAD = 0; @@ -721,10 +721,10 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { case 8: { float pose_scale = l08_paratrooper_recovery_knockback_xy_speed * frame_time; float timer_scale = frame_time * 3.0f; - paratrooper_instance_state->unk88 = pose_scale; + paratrooper_instance_state->knockback_speed = pose_scale; paratrooper_instance_state->knockback_z_speed = timer_scale; - paratrooper_instance_state->unkC0 = 5.0f; - paratrooper_instance_state->unkC4 = 10.0f; + paratrooper_instance_state->knockback_apex_animation_frame = 5.0f; + paratrooper_instance_state->knockback_landing_animation_frame = 10.0f; } { char *hit_moby = *(char **)(target + 0x20); @@ -736,10 +736,10 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { knock_angle = angle; trooper_knockback_arc(pos, &knock_angle, - (float *)(¶trooper_instance_state->unk88), + (float *)(¶trooper_instance_state->knockback_speed), (float *)(¶trooper_instance_state->knockback_z_speed)); trooper_start_knockback( - moby, ¶trooper_instance_state->unk70, knock_angle, 8, 1, 0); + moby, ¶trooper_instance_state->motion, knock_angle, 8, 1, 0); MOBY(moby)->state = PARATROOPER_STATE_KNOCKBACK_RECOVERY; paratrooper_instance_state->hit_flash_red = 0x78; break; @@ -755,13 +755,13 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { pose_scale = pose_rate * frame_time_sq; timer_scale = timer_rate * step; angle_scale = angle_rate * step; - paratrooper_instance_state->unk98 = 0.25f; + paratrooper_instance_state->knockback_collision_z_offset = 0.25f; paratrooper_instance_state->knockback_z_speed = angle_scale; - paratrooper_instance_state->unk80 = pose_scale; - paratrooper_instance_state->unk88 = timer_scale; - paratrooper_instance_state->unkC0 = 11.0f; - paratrooper_instance_state->unkC4 = push_limit; - paratrooper_instance_state->unk90 = 0x200; + paratrooper_instance_state->knockback_gravity = pose_scale; + paratrooper_instance_state->knockback_speed = timer_scale; + paratrooper_instance_state->knockback_apex_animation_frame = 11.0f; + paratrooper_instance_state->knockback_landing_animation_frame = push_limit; + paratrooper_instance_state->knockback_collision_radius = 0x200; } { char *hit_moby = *(char **)(target + 0x20); @@ -773,10 +773,10 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { second_knock_angle = angle; trooper_knockback_arc(pos, &second_knock_angle, - (float *)(¶trooper_instance_state->unk88), + (float *)(¶trooper_instance_state->knockback_speed), (float *)(¶trooper_instance_state->knockback_z_speed)); trooper_start_knockback( - moby, ¶trooper_instance_state->unk70, second_knock_angle, 12, 1, 0); + moby, ¶trooper_instance_state->motion, second_knock_angle, 12, 1, 0); MOBY(moby)->state = PARATROOPER_STATE_DEATH_EFFECTS_AND_REMOVE; paratrooper_instance_state->hit_flash_red = 0xf0; spawn_randomized_bolt_drop(moby, 2, 3, 0, -1); @@ -785,10 +785,10 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { break; } } - trooper_anim_update(moby, ¶trooper_instance_state->unk60); + trooper_anim_update(moby, ¶trooper_instance_state->trooper_anim); } MOBY(moby)->hit_slot = 0xff; - trooper_anim_finish(moby, ¶trooper_instance_state->unk60); + trooper_anim_finish(moby, ¶trooper_instance_state->trooper_anim); if (paratrooper_instance_state->unk38 != 0) { angle = random_float_between(180.0f, 240.0f); @@ -798,32 +798,35 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { } fast_dec_timer_s16((short *)(¶trooper_instance_state->target_range_boost_timer)); if (paratrooper_instance_state->target_range_boost_timer != 0) - paratrooper_instance_state->unk1DC = paratrooper_instance_state->base_target_range + 6.0f; + paratrooper_instance_state->target_range = + paratrooper_instance_state->base_target_range + 6.0f; else - paratrooper_instance_state->unk1DC = paratrooper_instance_state->base_target_range; + paratrooper_instance_state->target_range = paratrooper_instance_state->base_target_range; if (random_integer_below(4) == 0) { { char *path = ((char *)l08_paths[paratrooper_instance_state->wake_path_index]); reaction = activate_effect_l08(moby, - ¶trooper_instance_state->unk120, - paratrooper_instance_state->unk1DC, + ¶trooper_instance_state->path_search_point, + paratrooper_instance_state->target_range, 0, 0, path + 0x10, *(int *)path); } if (reaction != 2) { - distance = vector_distance_xy(&MOBY(moby)->pos, ¶trooper_instance_state->unk120); - if (paratrooper_instance_state->unk1DC < distance || - 3.0f < absolute_float(MOBY(moby)->pos.z - paratrooper_instance_state->unk128)) + distance = vector_distance_xy(&MOBY(moby)->pos, + ¶trooper_instance_state->path_search_point); + if (paratrooper_instance_state->target_range < distance || + 3.0f < absolute_float(MOBY(moby)->pos.z - + paratrooper_instance_state->path_search_point_z)) paratrooper_instance_state->target_selection_status = 2; } } else { chased = paratrooper_instance_state->target_moby; if (chased != 0 && *(unsigned char *)(chased + 0x20) != 0xfe && *(unsigned char *)(chased + 0x20) != 0xfd) { - qcopy(¶trooper_instance_state->unk120, chased + 0x10); + qcopy(¶trooper_instance_state->path_search_point, chased + 0x10); } else { paratrooper_instance_state->target_moby = 0; paratrooper_instance_state->target_selection_status = 2; diff --git a/src/overlays/shared/enemies/blarg_space_commando.c b/src/overlays/shared/enemies/blarg_space_commando.c index 2a3b05a893..4496be91bf 100644 --- a/src/overlays/shared/enemies/blarg_space_commando.c +++ b/src/overlays/shared/enemies/blarg_space_commando.c @@ -34,12 +34,12 @@ enum { }; typedef struct { - s32 unk0; - f32 unk4; - f32 unk8; - f32 unkC; + s32 collision_radius_1024ths; + f32 step_height; + f32 max_drop; + f32 max_climb; u8 pad10[0x14]; - f32 unk24; + f32 max_speed; u8 pad28[0x10]; s32 flags; /* 0x38 */ } MoveCtl; @@ -74,11 +74,11 @@ typedef struct { MoveCtl ctl; /* 0xC0 */ u8 padFC[0x64]; struct Moby *target; /* 0x160 */ - s32 unk164; + s32 target_selection_status; u8 pad168[8]; Vec4 home; /* 0x170 */ u8 pad180[8]; - s32 unk188; + s32 pursuit_timer; f32 turn_speed; /* 0x18C */ u8 pad190[0xC]; s32 timer; /* 0x19C */ @@ -87,7 +87,7 @@ typedef struct { s32 route; /* 0x1A8 */ s32 volume; /* 0x1AC */ u8 pad1B0[0x50]; - Vec4 unk200; + Vec4 melee_sweep_previous_position; u8 pad210[0x210]; u8 unk420[1]; } Moby1068Vars; @@ -178,11 +178,12 @@ void blarg_space_commando_update(struct Moby *moby) { blarg_commando_state->unk58 = truncate_float_to_s32(12.0f); blarg_commando_state->unk5A = truncate_float_to_s32(13.6f); FUN_L01_0026d930(&blarg_commando_state->ctl); - blarg_commando_state->ctl.unk8 = 2.0f; - blarg_commando_state->ctl.unkC = 0.5f; - blarg_commando_state->ctl.unk0 = truncate_float_to_s32(D_L06_00161FA8 * 307.2f); - blarg_commando_state->ctl.unk4 = D_L06_00161FA8 * 0.3f; - blarg_commando_state->ctl.unk24 = movement_max_horizontal_speed_gp * frame_time; + blarg_commando_state->ctl.max_drop = 2.0f; + blarg_commando_state->ctl.max_climb = 0.5f; + blarg_commando_state->ctl.collision_radius_1024ths = + truncate_float_to_s32(D_L06_00161FA8 * 307.2f); + blarg_commando_state->ctl.step_height = D_L06_00161FA8 * 0.3f; + blarg_commando_state->ctl.max_speed = movement_max_horizontal_speed_gp * frame_time; blarg_commando_state->ctl.flags |= 8; qcopy(&blarg_commando_state->home, &moby->pos); moby->state = BLARG_COMMANDO_STATE_SELECT_ACTION; @@ -203,7 +204,7 @@ void blarg_space_commando_update(struct Moby *moby) { frame_time_sq * 6.2831855f, frame_time_sq * 6.2831855f, frame_time * 3.1415927f); - if (blarg_commando_state->unk164 != 2) { + if (blarg_commando_state->target_selection_status != 2) { if (melee_attack_distance_threshold_gp < vector_distance_xy(&moby->pos, &target->pos)) { if (fast_difference_between_rotations( moby->rot.z, @@ -220,7 +221,7 @@ void blarg_space_commando_update(struct Moby *moby) { blend_moby_animation(moby, 6, 0, scale_game_frames(10)); } } - } else if (blarg_commando_state->unk188 != 0) { + } else if (blarg_commando_state->pursuit_timer != 0) { moby->state = BLARG_COMMANDO_STATE_CHASE_TARGET; if (moby->prev_seq != 1) { blend_moby_animation(moby, 1, 0, scale_game_frames(20)); @@ -290,7 +291,7 @@ void blarg_space_commando_update(struct Moby *moby) { break; case BLARG_COMMANDO_STATE_RANGED_ATTACK_RECOVERY: if (moby->anim_flags & 2) { - if (blarg_commando_state->unk164 != 2) { + if (blarg_commando_state->target_selection_status != 2) { moby->state = BLARG_COMMANDO_STATE_RANGED_ATTACK_COOLDOWN; if (moby->prev_seq != 4) { blend_moby_animation(moby, 4, 0, scale_game_frames(20)); @@ -323,7 +324,7 @@ void blarg_space_commando_update(struct Moby *moby) { if (moby->prev_seq != 6) { blend_moby_animation(moby, 6, 0, scale_game_frames(10)); } - } else if (blarg_commando_state->unk188 != 0) { + } else if (blarg_commando_state->pursuit_timer != 0) { moby->state = BLARG_COMMANDO_STATE_CHASE_TARGET; if (moby->prev_seq != 1) { blend_moby_animation(moby, 1, 0, scale_game_frames(20)); @@ -355,13 +356,13 @@ void blarg_space_commando_update(struct Moby *moby) { shot.oclass = moby->oclass; sweep_hit_segment(&position_or_movement_vector, &movement_input_or_output_or_melee_origin, - &blarg_commando_state->unk200, + &blarg_commando_state->melee_sweep_previous_position, &movement_input_or_output_or_melee_origin, moby, &shot, 5); } - qcopy(&blarg_commando_state->unk200, &position_or_movement_vector); + qcopy(&blarg_commando_state->melee_sweep_previous_position, &position_or_movement_vector); if (moby->anim_flags & 2) { moby->state = BLARG_COMMANDO_STATE_MELEE_RECOVERY; moby->command = 1; @@ -403,7 +404,7 @@ void blarg_space_commando_update(struct Moby *moby) { fast_vec_dist(&moby->pos, &movement_output_or_hit_vector_or_path_point) < 0.8f) { near = 1; } - if (blarg_commando_state->unk188 == 0) { + if (blarg_commando_state->pursuit_timer == 0) { moby->state = BLARG_COMMANDO_STATE_RETURN_HOME; } else if (near != 0) { moby->state = BLARG_COMMANDO_STATE_CHASE_MELEE_ATTACK; @@ -434,13 +435,13 @@ void blarg_space_commando_update(struct Moby *moby) { shot.oclass = moby->oclass; sweep_hit_segment(&position_or_movement_vector, &movement_input_or_output_or_melee_origin, - &blarg_commando_state->unk200, + &blarg_commando_state->melee_sweep_previous_position, &movement_input_or_output_or_melee_origin, moby, &shot, 5); } - qcopy(&blarg_commando_state->unk200, &position_or_movement_vector); + qcopy(&blarg_commando_state->melee_sweep_previous_position, &position_or_movement_vector); if (moby->anim_flags & 2) { moby->state = BLARG_COMMANDO_STATE_CHASE_TARGET; if (moby->prev_seq != 1) { diff --git a/src/overlays/shared/enemies/blarg_trooper_projectile.c b/src/overlays/shared/enemies/blarg_trooper_projectile.c index c4eecbde68..4082604e38 100644 --- a/src/overlays/shared/enemies/blarg_trooper_projectile.c +++ b/src/overlays/shared/enemies/blarg_trooper_projectile.c @@ -92,8 +92,8 @@ typedef struct { s16 time; /* 0x1C: frames left */ s16 time_max; /* 0x1E: lifetime */ f32 hero_dist; /* 0x20: distance to the hero at spawn */ - s32 unk24; - s32 unk28; + s32 approached_hero; + s32 flyby_sound_played; } ShotVars; extern void spawn_source_attached_fading_effect_particle( @@ -140,8 +140,8 @@ struct Moby *spawn_blarg_trooper_projectile(struct Moby *owner, void *pos, void projectile_state->time = life; projectile_state->time_max = life; projectile_state->hero_dist = fast_vec_dist(&spawned_moby->pos, &hero.motion.pos); - projectile_state->unk24 = 0; - projectile_state->unk28 = 0; + projectile_state->approached_hero = 0; + projectile_state->flyby_sound_played = 0; if (owner->oclass == 0xFF) { spawn_source_attached_fading_effect_particle( spawned_moby, 0x2F7F4F4F, life * 5 / 4, -1, 100000.0f); @@ -208,12 +208,13 @@ void blarg_trooper_projectile_update(struct Moby *moby) { hero_distance = fast_vec_dist(&moby->pos, &hero.motion.pos); qcopy(&previous_position, &moby->pos); fast_vec_add(&moby->pos, &moby->pos, &v->dir); - if (v->unk28 == 0 && v->unk24 != 0 && v->hero_dist < hero_distance && hero_distance < 3.0f) { + if (v->flyby_sound_played == 0 && v->approached_hero != 0 && v->hero_dist < hero_distance && + hero_distance < 3.0f) { allocate_voice_for_target_entry(0, 0, moby); - v->unk28 = 1; + v->flyby_sound_played = 1; } if (hero_distance < v->hero_dist) - v->unk24 = 1; + v->approached_hero = 1; v->hero_dist = hero_distance; if (moby->pos.x < 0.0f || moby->pos.y < 0.0f || moby->pos.z < 0.0f || range < vector_distance_xy(&moby->pos, D_L04_00166F40)) { diff --git a/src/overlays/shared/enemies/bomb_spawner_bomb.c b/src/overlays/shared/enemies/bomb_spawner_bomb.c index aa23a0d2d8..65bef4c3bc 100644 --- a/src/overlays/shared/enemies/bomb_spawner_bomb.c +++ b/src/overlays/shared/enemies/bomb_spawner_bomb.c @@ -27,12 +27,12 @@ enum { typedef struct { u8 pad0[0xF]; u8 always_draw; /* 0x0F */ - s32 unk10; /* 0x10 */ + s32 collision; /* 0x10 */ u8 pad14[0x10]; f32 scale; /* 0x24 */ u8 pad28[0x18]; - s32 unk40; /* 0x40 */ - u16 flags; /* 0x44 */ + s32 glow_rgba; /* 0x40 */ + u16 flags; /* 0x44 */ } SpawnClass; /* Spawner pvars. */ @@ -137,7 +137,7 @@ struct Moby *revive_spawner_pooled_child(struct Moby *spawner_moby, Vec4 *at, s3 current_moby->update_dist = spawner_moby->update_dist; current_moby->draw_dist = spawner_moby->draw_dist; current_moby->visible = found; - if (spawned_moby_class->unk40 != 0) { + if (spawned_moby_class->glow_rgba != 0) { current_moby->flags = flags | 0x10; } if (((SpawnClass *)current_moby->pclass)->always_draw != 0) { @@ -167,7 +167,7 @@ struct Moby *revive_spawner_pooled_child(struct Moby *spawner_moby, Vec4 *at, s3 if (spawner_moby->unkB4 < 0) { spawner_moby->unkB4 = 1; } - current_moby->collision = ((SpawnClass *)current_moby->pclass)->unk10; + current_moby->collision = ((SpawnClass *)current_moby->pclass)->collision; copy_hero_moby_field_38(current_moby); update_entity(current_moby); spawned = current_moby; diff --git a/src/overlays/shared/enemies/frog.c b/src/overlays/shared/enemies/frog.c index 8ec9a99955..741a4541c6 100644 --- a/src/overlays/shared/enemies/frog.c +++ b/src/overlays/shared/enemies/frog.c @@ -51,17 +51,17 @@ typedef struct FrogVars { short *unkD0; u8 padD4[0x4c]; u8 motion[0x10]; - f32 unk130; - s32 unk134; - f32 unk138; - f32 unk13C; - s32 unk140; - s32 unk144; + f32 knockback_gravity; + s32 knockback_speed_approach_rate; + f32 knockback_speed; + f32 knockback_vertical_speed; + s32 knockback_collision_radius; + s32 knockback_motion_flags; s32 motion_collision_height_offset; u8 pad14C[0x11]; s8 unk15D; u8 pad15E[0x62]; - unsigned char *unk1C0; + unsigned char *target; s32 pursuit_target_mode; u8 pad1C8[0xc]; f32 turn_angle; @@ -69,20 +69,20 @@ typedef struct FrogVars { u8 pad1DC[0x8]; f32 movement_speed; s16 blink_countdown; - s16 unk1EA; + s16 hidden; s32 unk1EC; u8 pad1F0[0x8]; s32 path_index; s32 wander_destination_timer; - s16 unk200; + s16 spawns_child; s16 initialize_in_respawn; u8 pad204[0x4]; s16 path_point; s16 target_selection_frame_slot; char *child; f32 home_position[4]; - u8 unk220[0x10]; - u8 unk230[0x10]; + u8 home_rotation[0x10]; + u8 wander_destination[0x10]; s16 unk240; s16 unk242; f32 unk244; @@ -279,10 +279,10 @@ void frog_update(unsigned char *moby) { } mode = D_L06_0015F5C4; if (mode == 2 && ((MOBY(moby)->flags ^ 1) & 1)) { - frog_instance_vars->unk1EA = 1; + frog_instance_vars->hidden = 1; MOBY(moby)->flags |= 0x41; - } else if (mode == 0 && frog_instance_vars->unk1EA != 0) { - frog_instance_vars->unk1EA = 0; + } else if (mode == 0 && frog_instance_vars->hidden != 0) { + frog_instance_vars->hidden = 0; MOBY(moby)->flags &= 0xFFBE; } if (MOBY(moby)->state != FROG_STATE_SUCK_CANNON_HELD) { @@ -300,7 +300,7 @@ void frog_update(unsigned char *moby) { FUN_L00_0025a120(moby); MOBY(moby)->shadow_range = 0xB; } - target = frog_instance_vars->unk1C0; + target = frog_instance_vars->target; switch (MOBY(moby)->state) { case FROG_STATE_INITIALIZE: { float wait; @@ -315,19 +315,19 @@ void frog_update(unsigned char *moby) { frog_instance_vars->unk58 = truncate_float_to_s32(8.0f); frog_instance_vars->unk5A = truncate_float_to_s32(3.2f); qcopy(&frog_instance_vars->home_position, &MOBY(moby)->pos); - qcopy(&frog_instance_vars->unk230, &MOBY(moby)->pos); - qcopy(&frog_instance_vars->unk220, moby + 0x40); + qcopy(&frog_instance_vars->wander_destination, &MOBY(moby)->pos); + qcopy(&frog_instance_vars->home_rotation, moby + 0x40); frog_instance_vars->path_point = 0; wait = random_float_between(0.5f, 3.0f); - frog_instance_vars->unk130 = D_0015ED70 * 20.0f; + frog_instance_vars->knockback_gravity = D_0015ED70 * 20.0f; frog_instance_vars->motion_collision_height_offset = 0; - frog_instance_vars->unk134 = 0; - frog_instance_vars->unk140 = 0x200; + frog_instance_vars->knockback_speed_approach_rate = 0; + frog_instance_vars->knockback_collision_radius = 0x200; frog_instance_vars->unk244 = wait; frog_instance_vars->glow_animation_phase = random_angle_radians(); frog_instance_vars->unkD0 = D_L06_00161BF0; frog_instance_vars->unk29 = 1; - if (frog_instance_vars->unk200 != 0) { + if (frog_instance_vars->spawns_child != 0) { char *child; MOBY(moby)->state = FROG_STATE_WAIT_WITH_CHILD; child = create_moby(0x1F4); @@ -409,18 +409,19 @@ void frog_update(unsigned char *moby) { return; } qcopy(&frog_instance_vars->home_position, (char *)path + point_count * 16); - qcopy(&frog_instance_vars->unk230, &frog_instance_vars->home_position); + qcopy(&frog_instance_vars->wander_destination, &frog_instance_vars->home_position); home_distance_xy = vector_distance_xy(&MOBY(moby)->pos, &frog_instance_vars->home_position); return_speed = home_distance_xy / (float)scale_game_frames(30); - frog_instance_vars->unk138 = return_speed; - frog_instance_vars->unk13C = FUN_L00_0025abf0(&MOBY(moby)->pos, - &frog_instance_vars->home_position, - 0, - return_speed, - -frog_instance_vars->unk130); + frog_instance_vars->knockback_speed = return_speed; + frog_instance_vars->knockback_vertical_speed = + FUN_L00_0025abf0(&MOBY(moby)->pos, + &frog_instance_vars->home_position, + 0, + return_speed, + -frog_instance_vars->knockback_gravity); frog_instance_vars->unk15D = 3; - frog_instance_vars->unk144 = 5; + frog_instance_vars->knockback_motion_flags = 5; trooper_start_knockback( moby, &frog_instance_vars->motion, @@ -469,18 +470,19 @@ void frog_update(unsigned char *moby) { break; case FROG_STATE_WANDER: if (MOBY(moby)->visible != 0) { - if (fast_vec_dist(&MOBY(moby)->pos, &frog_instance_vars->unk230) < 0.05f || + if (fast_vec_dist(&MOBY(moby)->pos, &frog_instance_vars->wander_destination) < 0.05f || fast_dec_timer((int *)(&frog_instance_vars->wander_destination_timer)) != 0) { float angle = random_angle_radians(); float radius = random_float_between(0.5f, 2.0f); A[0] = fast_cos(angle) * radius; A[1] = fast_sin(angle) * radius; A[2] = 0.0f; - fast_vec_add(&frog_instance_vars->unk230, &frog_instance_vars->home_position, A); + fast_vec_add( + &frog_instance_vars->wander_destination, &frog_instance_vars->home_position, A); frog_instance_vars->wander_destination_timer = scale_game_frames(truncate_float_to_s32(random_float_between(45.0f, 75.0f))); } - fast_vec_sub(C, &frog_instance_vars->unk230, &MOBY(moby)->pos); + fast_vec_sub(C, &frog_instance_vars->wander_destination, &MOBY(moby)->pos); probe_frog_local_z_collision((char *)moby); blend_frog_rotation_to_facing_frame((char *)moby, (float *)D_L06_00174600, C); fast_vec_normalize(B, moby + 0xC0, frog_instance_vars->movement_speed * D_0015ED6C_gp); diff --git a/src/overlays/shared/enemies/gadgebot.c b/src/overlays/shared/enemies/gadgebot.c index 659e54ffde..e5eda25add 100644 --- a/src/overlays/shared/enemies/gadgebot.c +++ b/src/overlays/shared/enemies/gadgebot.c @@ -59,9 +59,9 @@ typedef union { typedef struct { char p0[0x10]; - int unk10; + int collision; char p14[0x10]; - float unk24; + float scale; } GbClass; typedef struct GbMoby { @@ -73,7 +73,7 @@ typedef struct GbMoby { char p28[4]; float scale; char p30; - unsigned char unk31; + unsigned char visible; char p32[2]; unsigned short flags; char p36[0x12]; @@ -81,45 +81,45 @@ typedef struct GbMoby { char p4C[7]; unsigned char anim; char p54[0x1C]; - unsigned char unk70; + unsigned char anim_flags; char p71[7]; void *vars; char p7C[3]; - unsigned char unk7F; + unsigned char shadow_range; char p80[0x14]; - int unk94; + int collision; char p98[0xE]; short cls_id; char pA8[8]; - unsigned char unkB0; + unsigned char mission; char pB1[0xB]; unsigned char sub; char pBD[3]; - float unkC0[4]; + float rot_row0[4]; char pD0[0x30]; } GbMoby; typedef struct { int collision_radius_1024ths; - float unk04; - float unk08; - float unk0C; - float unk10; - float unk14; - float unk18; - float unk1C; - float unk20; - float unk24; - float unk28; - float unk2C; - float unk30; + float step_height; + float max_drop; + float max_climb; + float speed; + float turn_step; + float vertical_velocity; + float acceleration; + float brake; + float max_speed; + float heading_tolerance; + float arrive_distance; + float ground_probe_depth; float unk34; int movement_option_flags; - float unk3C; - float unk40; - float unk44; - int i48; - float unk4C; + float turn_spring; + float turn_damping; + float max_turn_step; + int move_timer; + float move_heading; } GbCtl; typedef struct { @@ -128,34 +128,34 @@ typedef struct { } GbPaths; typedef struct { - float unk0[4] __attribute__((aligned(16))); + float follow_anchor[4] __attribute__((aligned(16))); float unk10; float unk14; float unk18; char p1C[0x14]; GbCtl ctl; - char unk80[0x60]; - float unkE0[4] __attribute__((aligned(16))); - float unkF0[4] __attribute__((aligned(16))); - unsigned char unk100; + char knockback_motion[0x60]; + float home_position[4] __attribute__((aligned(16))); + float stall_check_position[4] __attribute__((aligned(16))); + unsigned char scale_manipulator; unsigned char scale_manipulator_attached; char p102[0x1E]; - float unk120; - float unk124; - float unk128; + float scale_manipulator_scale_x; + float scale_manipulator_scale_y; + float scale_manipulator_scale_z; char p12C[0x44]; GbMoby *spawn_container_moby; GbMoby *target; /* nearest mine/box moby found by FUN_L06_002f2910 (0: none) */ char p178[4]; float approach_heading_offset; char p180[4]; - int unk184; - float unk188; + int follow_frame_count; + float stall_hero_distance; int attack_target_search_frame; short unk190; char p192[2]; int attack_substate_timer; - short unk198; + short has_target; short target_searched; /* set once FUN_L06_002f2910 has run the search */ GbMoby *collision_contact_moby; char p1A0[0x40]; @@ -164,50 +164,50 @@ typedef struct { int selected_path_slot; char p280[4]; float collision_correction_speed; - float unk288; + float ground_spring_velocity; float glow_pulse_angle; char p290[0x10]; int follow_gate_moby_indices[8]; - int unk2C0[8]; + int follow_gate_volumes[8]; GbVec position_history_latest; GbVec position_history_previous; float ground_height_change_limit; GbMoby *absorption_owner_moby; - float unk308; + float manipulator_scale; int target_group; /* moby group searched for targets (-1: whole level list) */ int configured_path_count; } GbVars; typedef struct { char p0[0x14]; - int unk14; + int absorbs_remaining; } GbOwnerVars; typedef struct { char p0[0x18]; - GbMoby *unk18; + GbMoby *moby; int unk1C; char p20[0x10]; - float unk30[4]; - float unk40[2]; - float unk48; + float position[4]; + float normal_xy[2]; + float normal_z; } GbHit; typedef struct { char p0[0x2C]; - int unk2C; + int in_range_count; /* gadgebots near the hero that take a command this frame */ } GbStats; typedef int u128_c __attribute__((mode(TI))); typedef struct { char p0[0x18]; - Moby *unk18; + Moby *moby; int unk1C; char p20[0x10]; - float unk30[4]; - float unk40[2]; - float unk48; + float position[4]; + float normal_xy[2]; + float normal_z; } GbHit_2f2250; typedef struct { @@ -220,7 +220,7 @@ typedef struct { char p190[2]; short candidate_count; char p194[4]; - short unk198; + short has_target; short target_searched; char p19C[4]; int candidates[8]; @@ -370,7 +370,7 @@ void gadgebot_update(GbMoby *moby) { ok = 1; } if (ok) { - l06_gadgebot_command_range_stats.unk2C++; + l06_gadgebot_command_range_stats.in_range_count++; switch (D_00141610[0]) { case GADGEBOT_COMMAND_FOLLOW_HERO: if (moby->state != GADGEBOT_FOLLOW_HERO) { @@ -397,52 +397,52 @@ void gadgebot_update(GbMoby *moby) { } if (GB_FLAG != 0) { if (gadgebot_vars->scale_manipulator_attached == 0) { - attach_manipulator((char *)moby, 0, &gadgebot_vars->unk100); + attach_manipulator((char *)moby, 0, &gadgebot_vars->scale_manipulator); } if (moby->state != GADGEBOT_WAIT_FOR_SPAWN_PAD) { - approach_value(&gadgebot_vars->unk308, 2.3f, frame_scale * 0.1f); + approach_value(&gadgebot_vars->manipulator_scale, 2.3f, frame_scale * 0.1f); } else { - approach_value(&gadgebot_vars->unk308, 1.0f, frame_scale * 0.1f); + approach_value(&gadgebot_vars->manipulator_scale, 1.0f, frame_scale * 0.1f); } - gadgebot_vars->unk120 = gadgebot_vars->unk308; - gadgebot_vars->unk124 = gadgebot_vars->unk308; - gadgebot_vars->unk128 = gadgebot_vars->unk308; + gadgebot_vars->scale_manipulator_scale_x = gadgebot_vars->manipulator_scale; + gadgebot_vars->scale_manipulator_scale_y = gadgebot_vars->manipulator_scale; + gadgebot_vars->scale_manipulator_scale_z = gadgebot_vars->manipulator_scale; } else if (gadgebot_vars->scale_manipulator_attached != 0) { - detach_manipulator(moby, &gadgebot_vars->unk100); + detach_manipulator(moby, &gadgebot_vars->scale_manipulator); } switch (moby->state) { case GADGEBOT_INITIALIZE: { int i; - gadgebot_vars->unk308 = 1.0f; + gadgebot_vars->manipulator_scale = 1.0f; moby->pos[2] = probe_ground_height(moby->pos, 0, 0.5f); spawn_gadgebot_pad((char *)moby); gadgebot_vars->position_history_previous.q = gadgebot_vars->position_history_latest.q = *(OvlQuad *)moby->pos; - if (visited52[moby->unkB0 + current_level_index * 16] == 0xFF) { + if (visited52[moby->mission + current_level_index * 16] == 0xFF) { mark_moby_for_removal(moby); return; } gadgebot_vars->spawn_container_moby = (GbMoby *)spawn_gadgebot_spawn_container((char *)moby); moby->pos[2] = probe_ground_height(moby->pos, 0, 0.5f); - qcopy(gadgebot_vars->unk0, moby->pos); - qcopy(gadgebot_vars->unkE0, moby->pos); + qcopy(gadgebot_vars->follow_anchor, moby->pos); + qcopy(gadgebot_vars->home_position, moby->pos); gadgebot_vars->unk14 = frame_time * 2.0f; gadgebot_vars->unk18 = frame_time * 2.6179938f; gadgebot_vars->ctl.collision_radius_1024ths = 0x12C; - gadgebot_vars->ctl.unk04 = 0.51f; - gadgebot_vars->ctl.unk08 = gadgebot_vars->ground_height_change_limit; - gadgebot_vars->ctl.unk0C = gadgebot_vars->ground_height_change_limit; - gadgebot_vars->ctl.unk24 = frame_time * 3.0f + frame_time * 0.1f; - gadgebot_vars->ctl.unk1C = frame_scale_sq * 0.02f; - gadgebot_vars->ctl.unk20 = frame_scale_sq * 0.3f; - gadgebot_vars->ctl.unk28 = 0.6981317f; - gadgebot_vars->ctl.unk2C = 0.2f; - gadgebot_vars->ctl.unk3C = frame_scale_sq * 0.03f; - gadgebot_vars->ctl.unk40 = frame_scale_sq * 0.3f; - gadgebot_vars->ctl.unk44 = frame_time * 3.1415927f; - gadgebot_vars->ctl.i48 = scale_game_frames(4); + gadgebot_vars->ctl.step_height = 0.51f; + gadgebot_vars->ctl.max_drop = gadgebot_vars->ground_height_change_limit; + gadgebot_vars->ctl.max_climb = gadgebot_vars->ground_height_change_limit; + gadgebot_vars->ctl.max_speed = frame_time * 3.0f + frame_time * 0.1f; + gadgebot_vars->ctl.acceleration = frame_scale_sq * 0.02f; + gadgebot_vars->ctl.brake = frame_scale_sq * 0.3f; + gadgebot_vars->ctl.heading_tolerance = 0.6981317f; + gadgebot_vars->ctl.arrive_distance = 0.2f; + gadgebot_vars->ctl.turn_spring = frame_scale_sq * 0.03f; + gadgebot_vars->ctl.turn_damping = frame_scale_sq * 0.3f; + gadgebot_vars->ctl.max_turn_step = frame_time * 3.1415927f; + gadgebot_vars->ctl.move_timer = scale_game_frames(4); gadgebot_vars->ctl.movement_option_flags |= 1; for (i = 0; i < 16; i++) { if (gadgebot_vars->paths.id[i] >= 0) { @@ -452,7 +452,7 @@ void gadgebot_update(GbMoby *moby) { gadgebot_vars->glow_pulse_angle = random_angle_radians(); gadgebot_vars->selected_path_slot = -1; moby->state = GADGEBOT_WAIT_FOR_SPAWN_PAD; - moby->unk94 = 0; + moby->collision = 0; break; } case GADGEBOT_WAIT_FOR_SPAWN_PAD: @@ -485,7 +485,7 @@ void gadgebot_update(GbMoby *moby) { gadgebot_position_snapshot_z_offset_gp = 0.27f; } moby->flags = (moby->flags & 0xFFBE) | 0x1000; - moby->unk94 = moby->cls->unk10; + moby->collision = moby->cls->collision; moby->state = GADGEBOT_FOLLOW_HERO; } else { if (hero.vehicle_mode == HERO_VEHICLE_MODE_ON_FOOT) { @@ -493,16 +493,16 @@ void gadgebot_update(GbMoby *moby) { gadgebot_vars->spawn_container_moby->flags |= 0x41; moby->flags &= 0xEFFF; gadgebot_vars->spawn_container_moby->flags &= 0xEFFF; - gadgebot_vars->spawn_container_moby->unk94 = 0; + gadgebot_vars->spawn_container_moby->collision = 0; } else { moby->flags &= 0xFFBE; gadgebot_vars->spawn_container_moby->flags &= 0xFFBE; moby->flags |= 0x1000; gadgebot_vars->spawn_container_moby->flags |= 0x1000; - gadgebot_vars->spawn_container_moby->unk94 = - gadgebot_vars->spawn_container_moby->cls->unk10; + gadgebot_vars->spawn_container_moby->collision = + gadgebot_vars->spawn_container_moby->cls->collision; } - if (moby->unk31 != 0) { + if (moby->visible != 0) { update_gadgebot_glow_effects((char *)moby); } return; @@ -545,14 +545,14 @@ void gadgebot_update(GbMoby *moby) { { int *ca = &gadgebot_vars->follow_gate_moby_indices[j]; - int *cb = &gadgebot_vars->unk2C0[j]; + int *cb = &gadgebot_vars->follow_gate_volumes[j]; if (*ca == -1 || *cb == -1) { break; } } ta = &gadgebot_vars->follow_gate_moby_indices[j]; - tb = &gadgebot_vars->unk2C0[j]; + tb = &gadgebot_vars->follow_gate_volumes[j]; referenced_moby = &(*(GbMoby **)&D_L06_0015FFD8)[*ta]; if (referenced_moby->cls_id == 0x3F7 && referenced_moby->state != 4 && is_point_inside_clip_volume(((GbMoby *)hero.moby)->pos, *tb) != 0 && @@ -566,9 +566,9 @@ void gadgebot_update(GbMoby *moby) { switch (moby->sub) { case GADGEBOT_FOLLOW_INITIALIZE: moby->sub = 1; - gadgebot_vars->unk184 = 0; + gadgebot_vars->follow_frame_count = 0; gadgebot_vars->unk190 = 0; - qcopy(gadgebot_vars->unkF0, moby->pos); + qcopy(gadgebot_vars->stall_check_position, moby->pos); gadgebot_vars->approach_heading_offset = randf_sym(0.13962634f, 0.34906584f); case GADGEBOT_FOLLOW_MOVE_TOWARD_HERO: { int hit; @@ -608,22 +608,23 @@ void gadgebot_update(GbMoby *moby) { fast_arc_tan(position_and_displacement_scratch[0] - moby->pos[0], position_and_displacement_scratch[1] - moby->pos[1]), gadgebot_vars->approach_heading_offset), - &gadgebot_vars->ctl.unk14, + &gadgebot_vars->ctl.turn_step, frame_scale_sq * 0.07f, frame_scale_sq * 0.3f, frame_time * 5.2359877f); if (hero_distance > 2.3f) { approach_value( - &gadgebot_vars->ctl.unk24, frame_time * 3.0f * 1.35f, frame_time_sq); + &gadgebot_vars->ctl.max_speed, frame_time * 3.0f * 1.35f, frame_time_sq); } else if (hero_distance < 1.2f) { - approach_value( - &gadgebot_vars->ctl.unk24, frame_time * 3.0f * 0.77f, frame_time_sq * 2.0f); + approach_value(&gadgebot_vars->ctl.max_speed, + frame_time * 3.0f * 0.77f, + frame_time_sq * 2.0f); } else { approach_value( - &gadgebot_vars->ctl.unk24, frame_time * 3.0f * 0.95f, frame_time_sq); + &gadgebot_vars->ctl.max_speed, frame_time * 3.0f * 0.95f, frame_time_sq); } - if (frame_time * 3.0f * 1.35f < gadgebot_vars->ctl.unk24) { - gadgebot_vars->ctl.unk24 = frame_time * 3.0f * 1.35f; + if (frame_time * 3.0f * 1.35f < gadgebot_vars->ctl.max_speed) { + gadgebot_vars->ctl.max_speed = frame_time * 3.0f * 1.35f; } if (hero_distance > 0.8f) { flags = move_moby_with_ground_and_collision_checks(moby, @@ -648,14 +649,14 @@ void gadgebot_update(GbMoby *moby) { } hit = 0; if (flags & 1) { - if (gadgebot_vars->unk184 % 14 == 0) { - if (vector_distance_xy(gadgebot_vars->unkF0, moby->pos) < - gadgebot_vars->ctl.unk10) { + if (gadgebot_vars->follow_frame_count % 14 == 0) { + if (vector_distance_xy(gadgebot_vars->stall_check_position, moby->pos) < + gadgebot_vars->ctl.speed) { hit = 1; - gadgebot_vars->unk188 = + gadgebot_vars->stall_hero_distance = vector_distance_xy(hero.motion.pos.f, moby->pos); } - qcopy(gadgebot_vars->unkF0, moby->pos); + qcopy(gadgebot_vars->stall_check_position, moby->pos); } } if (flags & 0x20) { @@ -663,16 +664,17 @@ void gadgebot_update(GbMoby *moby) { *(OvlQuad *)moby->pos = *(OvlQuad *)temporary_position; } if (hero_distance < 0.8f || hit != 0 || dz > 1.75f) { - qcopy(gadgebot_vars->unk0, moby->pos); + qcopy(gadgebot_vars->follow_anchor, moby->pos); moby->sub = 2; } break; } case GADGEBOT_FOLLOW_WAIT_AND_FACE_HERO: { - float hd = vector_distance_xy(gadgebot_vars->unk0, hero.motion.pos.f); + float hd = vector_distance_xy(gadgebot_vars->follow_anchor, hero.motion.pos.f); if ((gadgebot_vars->unk190 == 0 && hd > 1.8f) || - (gadgebot_vars->unk190 != 0 && hd > gadgebot_vars->unk188 + 0.5f)) { + (gadgebot_vars->unk190 != 0 && + hd > gadgebot_vars->stall_hero_distance + 0.5f)) { if (dz < 1.75f) { moby->sub = 0; } @@ -683,14 +685,14 @@ void gadgebot_update(GbMoby *moby) { FUN_L00_00258278((char *)moby, fast_arc_tan(hero.motion.pos.f[0] - moby->pos[0], hero.motion.pos.f[1] - moby->pos[1]), - &gadgebot_vars->ctl.unk14, + &gadgebot_vars->ctl.turn_step, frame_scale_sq * 0.05f, frame_scale_sq * 0.3f, frame_time * 3.4906585f); break; } } - gadgebot_vars->unk184++; + gadgebot_vars->follow_frame_count++; } break; } @@ -701,7 +703,7 @@ void gadgebot_update(GbMoby *moby) { FUN_L00_00258278( (char *)moby, fast_arc_tan(hero.motion.pos.f[0] - moby->pos[0], hero.motion.pos.f[1] - moby->pos[1]), - &gadgebot_vars->ctl.unk14, + &gadgebot_vars->ctl.turn_step, frame_scale_sq * 0.05f, frame_scale_sq * 0.3f, frame_time * 3.4906585f); @@ -728,7 +730,7 @@ void gadgebot_update(GbMoby *moby) { if (moby->sub == 0) { moby->sub = 1; gadgebot_vars->target = 0; - gadgebot_vars->unk198 = 0; + gadgebot_vars->has_target = 0; gadgebot_vars->target_searched = 0; gadgebot_vars->approach_heading_offset = randf_sym(0.13962634f, 0.34906584f); gadgebot_vars->attack_target_search_frame = level_frame_count; @@ -789,11 +791,11 @@ void gadgebot_update(GbMoby *moby) { } FUN_L00_00258278((char *)moby, approach_heading, - &gadgebot_vars->ctl.unk14, + &gadgebot_vars->ctl.turn_step, frame_scale_sq * 0.07f, frame_scale_sq * 0.3f, frame_time * 5.2359877f); - gadgebot_vars->ctl.unk24 = frame_time * 4.5f; + gadgebot_vars->ctl.max_speed = frame_time * 4.5f; if (move_moby_with_ground_and_collision_checks(moby, &gadgebot_vars->ctl, gadgebot_vars->target->pos, @@ -840,7 +842,7 @@ void gadgebot_update(GbMoby *moby) { record_moby_hit(gadgebot_vars->target, vector_and_hit_scratch); } } - if (moby->unk70 & 2) { + if (moby->anim_flags & 2) { gadgebot_vars->target_searched = 0; gadgebot_vars->attack_substate_timer = scale_game_frames(0x1E); moby->sub = 3; @@ -896,14 +898,14 @@ void gadgebot_update(GbMoby *moby) { gadgebot_vars->target->cls_id != 0x15F) { fast_vec_add(vector_and_hit_scratch, gadgebot_vars->target->pos, - gadgebot_vars->target->unkC0); + gadgebot_vars->target->rot_row0); } else { *(OvlQuad *)vector_and_hit_scratch = *(OvlQuad *)gadgebot_vars->target->pos; } FUN_L00_00258278((char *)moby, fast_arc_tan(vector_and_hit_scratch[0] - moby->pos[0], vector_and_hit_scratch[1] - moby->pos[1]), - &gadgebot_vars->ctl.unk14, + &gadgebot_vars->ctl.turn_step, frame_scale_sq * 0.07f, frame_scale_sq * 0.3f, frame_time * 5.2359877f); @@ -940,10 +942,10 @@ void gadgebot_update(GbMoby *moby) { if (rr <= 0.0f) { GbOwnerVars *ov = gadgebot_vars->absorption_owner_moby->vars; - if (ov->unk14 > 0) { - ov->unk14--; + if (ov->absorbs_remaining > 0) { + ov->absorbs_remaining--; } - if (ov->unk14 == 0) { + if (ov->absorbs_remaining == 0) { trooper_play_sound(1, 0, (int)gadgebot_vars->absorption_owner_moby, 0x516); } else { trooper_play_sound(0, 0, (int)gadgebot_vars->absorption_owner_moby, 0x516); @@ -957,23 +959,23 @@ void gadgebot_update(GbMoby *moby) { moby->pos[0] = vector_and_hit_scratch[0] + gadgebot_vars->absorption_owner_moby->pos[0]; moby->pos[1] = vector_and_hit_scratch[1] + gadgebot_vars->absorption_owner_moby->pos[1]; if (rr < 1.0f) { - moby->scale = moby->cls->unk24 * rr; + moby->scale = moby->cls->scale * rr; spawn_source_attached_fading_effect_particle( (1.0f - rr) * 0.5f * 210000.0f, (char *)moby, 0x3000407F, scale_game_frames(2), 3); } - if (moby->unk31 != 0) { + if (moby->visible != 0) { update_gadgebot_glow_effects((char *)moby); } - moby->unk94 = 0; + moby->collision = 0; moby->flags &= 0xEFFF; return; } case GADGEBOT_UPDATE_KNOCKBACK: - if (step_moby_motion(moby, gadgebot_vars->unk80) & 0x41) { + if (step_moby_motion(moby, gadgebot_vars->knockback_motion) & 0x41) { int i; cart_burst(moby, moby->pos, -1, 0.5f, 13.0f); - qcopy(moby->pos, gadgebot_vars->unkE0); + qcopy(moby->pos, gadgebot_vars->home_position); moby->state = GADGEBOT_STAND_AND_FACE_HERO; for (i = 0; i < 10; i++) { float effect_scale_factor = random_float_between(0.1f, 1.0f); @@ -1026,14 +1028,14 @@ void gadgebot_update(GbMoby *moby) { qcopy(raised_position_snapshot, moby->pos); raised_position_snapshot[2] += gadgebot_position_snapshot_z_offset_gp + 0.02f; qcopy(vector_and_hit_scratch, moby->pos); - saved_control_f10 = gadgebot_vars->ctl.unk10; - saved_control_f24 = gadgebot_vars->ctl.unk24; - gadgebot_vars->ctl.unk10 = 0.0f; - gadgebot_vars->ctl.unk24 = 0.0f; + saved_control_f10 = gadgebot_vars->ctl.speed; + saved_control_f24 = gadgebot_vars->ctl.max_speed; + gadgebot_vars->ctl.speed = 0.0f; + gadgebot_vars->ctl.max_speed = 0.0f; move_moby_with_ground_and_collision_checks( moby, &gadgebot_vars->ctl, moby->pos, movement_displacement_output, 1.0f); - gadgebot_vars->ctl.unk10 = saved_control_f10; - gadgebot_vars->ctl.unk24 = saved_control_f24; + gadgebot_vars->ctl.speed = saved_control_f10; + gadgebot_vars->ctl.max_speed = saved_control_f24; moby->pos[2] = vector_and_hit_scratch[2]; if (fast_vec_dist(vector_and_hit_scratch, moby->pos) > 0.005f) { float max; @@ -1072,13 +1074,13 @@ void gadgebot_update(GbMoby *moby) { if (interaction_result == 0) { float z = moby->pos[2]; - float *hp = D_L06_001745C0.unk30; + float *hp = D_L06_001745C0.position; int i; i = 0; do { qcopy(position_and_displacement_scratch, moby->pos); - position_and_displacement_scratch[2] += gadgebot_vars->ctl.unk04; + position_and_displacement_scratch[2] += gadgebot_vars->ctl.step_height; if (coll_sphere( position_and_displacement_scratch, convert_integer_to_float(gadgebot_vars->ctl.collision_radius_1024ths) * @@ -1087,52 +1089,52 @@ void gadgebot_update(GbMoby *moby) { moby) == 0) { break; } - if (fast_arc_tan(D_L06_001745C0.unk48, vector_length_xy(D_L06_001745C0.unk40)) > - 0.5235988f) { + if (fast_arc_tan(D_L06_001745C0.normal_z, + vector_length_xy(D_L06_001745C0.normal_xy)) > 0.5235988f) { qcopy(moby->pos, hp); - moby->pos[2] -= gadgebot_vars->ctl.unk04; + moby->pos[2] -= gadgebot_vars->ctl.step_height; } i++; } while (i < 6); moby->pos[2] = z; if (absolute_float(save1[2] - probe_ground_height(moby->pos, 0, 0.5f)) >= - gadgebot_vars->ctl.unk0C) { + gadgebot_vars->ctl.max_climb) { *(OvlQuad *)moby->pos = *(OvlQuad *)save1; gadgebot_vars->collision_correction_speed = 0.0f; } } - movement_control->unk18 -= frame_time_sq * 7.0f; - if (movement_control->unk18 < frame_time * -8.0f) { - movement_control->unk18 = frame_time * -8.0f; + movement_control->vertical_velocity -= frame_time_sq * 7.0f; + if (movement_control->vertical_velocity < frame_time * -8.0f) { + movement_control->vertical_velocity = frame_time * -8.0f; } moby->pos[2] += 0.25f; ground_height = probe_ground_height(moby->pos, 0, 0.5f); moby->pos[2] -= 0.25f; if (moby->pos[2] < ground_height) { vendor_spring(&moby->pos[2], - &gadgebot_vars->unk288, + &gadgebot_vars->ground_spring_velocity, ground_height, frame_scale_sq * 0.04f, frame_scale_sq * 0.3f, frame_time * 1.5f); - movement_control->unk18 = 0.0f; + movement_control->vertical_velocity = 0.0f; } else if (ground_height < moby->pos[2]) { - moby->pos[2] += movement_control->unk18; + moby->pos[2] += movement_control->vertical_velocity; if (moby->pos[2] < ground_height) { moby->pos[2] = ground_height; } } } - if (moby->pos[2] < gadgebot_vars->unkE0[2] - 5.0f || moby->pos[0] < 2.0f || + if (moby->pos[2] < gadgebot_vars->home_position[2] - 5.0f || moby->pos[0] < 2.0f || moby->pos[0] > 1021.0f || moby->pos[1] < 2.0f || moby->pos[1] > 1021.0f || moby->pos[2] < 2.0f || moby->pos[2] > 1021.0f) { - qcopy(moby->pos, gadgebot_vars->unkE0); + qcopy(moby->pos, gadgebot_vars->home_position); moby->state = GADGEBOT_STAND_AND_FACE_HERO; return; } } - if (D_L06_001745C0.unk18 != 0 && D_L06_001745C0.unk1C > 0) { - gadgebot_vars->collision_contact_moby = D_L06_001745C0.unk18; + if (D_L06_001745C0.moby != 0 && D_L06_001745C0.unk1C > 0) { + gadgebot_vars->collision_contact_moby = D_L06_001745C0.moby; } else { gadgebot_vars->collision_contact_moby = 0; } @@ -1145,17 +1147,17 @@ void gadgebot_update(GbMoby *moby) { position_and_displacement_scratch[2] += 1.0f; if (collision_line( position_and_displacement_scratch, vector_and_hit_scratch, 0, (int)moby, 0) != 0 && - D_L06_001745C0.unk18 != 0 && - (D_L06_001745C0.unk18->cls_id == 0x409 || D_L06_001745C0.unk18->cls_id == 0x359 || - is_moby_in_class_range_500_to_540(D_L06_001745C0.unk18) != 0)) { + D_L06_001745C0.moby != 0 && + (D_L06_001745C0.moby->cls_id == 0x409 || D_L06_001745C0.moby->cls_id == 0x359 || + is_moby_in_class_range_500_to_540(D_L06_001745C0.moby) != 0)) { *(OvlQuad *)moby->pos = *(OvlQuad *)save0; } - if (moby->unk31 != 0) { + if (moby->visible != 0) { if (fast_vec_dist(moby->pos, D_L06_00167540) < 17.0f) { FUN_L00_0025a120(moby); - moby->unk7F = 0xD; + moby->shadow_range = 0xD; } - if (moby->unk31 != 0) { + if (moby->visible != 0) { update_gadgebot_glow_effects((char *)moby); } } @@ -1259,7 +1261,7 @@ void assign_gadgebot_attack_targets(void) { *(float *)(start + 8) += 0.25f; *(float *)(end + 8) += 0.25f; if (collision_line(start, end, 2, (int)moby, 0) != 0 && - (char *)D_L06_001745C0.unk18 != candidate) + (char *)D_L06_001745C0.moby != candidate) continue; score = score_gadgebot_target_candidate(moby, candidate, 5); for (k = 0; k < CANDIDATE_COUNT(vars); k++) { @@ -1381,7 +1383,7 @@ void assign_gadgebot_attack_targets(void) { slots->target = (char *)claimed; slots->target_searched = 1; if (claimed != 0) - slots->unk198 = 1; + slots->has_target = 1; } } diff --git a/src/overlays/shared/enemies/horny_toad.c b/src/overlays/shared/enemies/horny_toad.c index bb86797769..912080c1f5 100644 --- a/src/overlays/shared/enemies/horny_toad.c +++ b/src/overlays/shared/enemies/horny_toad.c @@ -26,11 +26,14 @@ enum { typedef struct HornyToadVars { u8 pad0[0x1f4]; - f32 unk1F4[4]; + f32 turn_speed; /* 0x1F4 */ + f32 move_speed; + f32 movement_yaw_offset; + u8 pad200[4]; u8 pad204[0x6c]; - f32 unk270; + f32 vertical_velocity; u8 pad274[0x4]; - f32 unk278; + f32 movement_yaw; } HornyToadVars; typedef struct Moby Moby; @@ -38,7 +41,7 @@ typedef float ToadVec[4] __attribute__((aligned(16))); typedef struct { u8 pad0[0x24]; - float unk24; + float scale; } ToadClass; typedef struct { @@ -55,27 +58,27 @@ typedef struct { u8 pad59; u8 unk5A; u8 pad5B[0x70 - 0x5B]; - u8 unk70[0x138 - 0x70]; + u8 motion[0x138 - 0x70]; s16 unk138; u8 pad13A[0x140 - 0x13A]; void *unk140; u8 pad144[0x180 - 0x144]; - ToadVec unk180; + ToadVec approach_position; u8 pad190[0x1C0 - 0x190]; Moby *target; - int unk1C4; + int target_selection_status; u8 pad1C8[8]; ToadVec home; - int unk1E0; + int boundary_path; int wait_path_point_set_index; int path; int follow_moby; int pickup_moby; float turn_speed; - float unk1F8; + float move_speed; float movement_yaw_offset; u8 unk200[0x40]; - ToadVec unk240; + ToadVec wander_center; float unk250; float unk254; float wander_turn_step; @@ -216,13 +219,13 @@ void horny_toad_update(Moby *moby) { switch (moby->state) { case HORNY_TOAD_INITIALIZE: { float k; - moby->scale = ((ToadClass *)moby->pclass)->unk24 * D_L00_0016196C; + moby->scale = ((ToadClass *)moby->pclass)->scale * D_L00_0016196C; qcopy(horny_toad_vars->home, (*(ToadVec *)&moby->pos)); if (moby->prev_seq != 1) blend_moby_animation(moby, 1, 0, 0); horny_toad_vars->unk29 = 1; horny_toad_vars->unk140 = &D_L00_00161960; - qcopy(horny_toad_vars->unk240, (*(ToadVec *)&moby->pos)); + qcopy(horny_toad_vars->wander_center, (*(ToadVec *)&moby->pos)); k = frame_time; horny_toad_vars->wander_radius = 1.5f; horny_toad_vars->unk254 = k * 2.0f; @@ -259,7 +262,7 @@ void horny_toad_update(Moby *moby) { break; } case HORNY_TOAD_RUN_MOVEMENT_SEQUENCE: - if (FUN_L00_002dc9f0_2d4610(moby, horny_toad_vars->unk70) != 0) { + if (FUN_L00_002dc9f0_2d4610(moby, horny_toad_vars->motion) != 0) { moby->state = HORNY_TOAD_ROAM; horny_toad_vars->unk138 = 0; } @@ -294,7 +297,7 @@ void horny_toad_update(Moby *moby) { } break; case HORNY_TOAD_WAIT_TO_FOLLOW_PATH: - if (horny_toad_vars->unk1C4 != 2) { + if (horny_toad_vars->target_selection_status != 2) { moby->state = HORNY_TOAD_FOLLOW_PATH; if (moby->prev_seq != 4) blend_moby_animation(moby, 4, 0, scale_game_frames(10)); @@ -311,7 +314,7 @@ void horny_toad_update(Moby *moby) { if (moby->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); } - } else if (horny_toad_vars->unk1C4 != 2) { + } else if (horny_toad_vars->target_selection_status != 2) { moby->state = HORNY_TOAD_APPROACH_AND_FACE_TARGET; if (moby->prev_seq != 4) blend_moby_animation(moby, 4, 0, scale_game_frames(10)); @@ -325,8 +328,9 @@ void horny_toad_update(Moby *moby) { blend_moby_animation(moby, 4, animation_start_index, scale_game_frames(10)); moby->anim_speed = random_float_between(0.92f, 1.08f); } - update_object_wander_movement((char *)moby, (char *)horny_toad_vars->unk240, 0.5f, 0.5f); - if (horny_toad_vars->unk1C4 != 2) { + update_object_wander_movement( + (char *)moby, (char *)horny_toad_vars->wander_center, 0.5f, 0.5f); + if (horny_toad_vars->target_selection_status != 2) { horny_toad_vars->movement_yaw_offset = random_float_between(-20.0f, 20.0f) * 0.017453292f; moby->state = HORNY_TOAD_APPROACH_AND_FACE_TARGET; @@ -335,7 +339,8 @@ void horny_toad_update(Moby *moby) { } break; case HORNY_TOAD_APPROACH_AND_FACE_TARGET: - if (move_horny_toad_toward_position((unsigned char *)moby, horny_toad_vars->unk180, 0.5f) < + if (move_horny_toad_toward_position( + (unsigned char *)moby, horny_toad_vars->approach_position, 0.5f) < horny_toad_target_approach_distance_threshold_gp && fast_difference_between_rotations( moby->rot.z, @@ -348,7 +353,7 @@ void horny_toad_update(Moby *moby) { 5, (int)horny_toad_target_animation_start_index_gp, scale_game_frames(10)); - } else if (horny_toad_vars->unk1C4 == 2) { + } else if (horny_toad_vars->target_selection_status == 2) { moby->state = HORNY_TOAD_RETURN_HOME; if (moby->prev_seq != 4) blend_moby_animation(moby, 4, 0, scale_game_frames(10)); @@ -358,7 +363,7 @@ void horny_toad_update(Moby *moby) { if (is_value_within_interpolated_window(moby, 34.0f) != 0) { collect_mobies_in_sphere_at_moby_point(moby, 0.333f, 1.0f, 1.0f, 0, 1, 0, 1, 0); } else if (moby->anim_flags & 2) { - if (horny_toad_vars->unk1C4 == 2) { + if (horny_toad_vars->target_selection_status == 2) { moby->state = HORNY_TOAD_RETURN_HOME; if (moby->prev_seq != 4) blend_moby_animation(moby, 4, 0, scale_game_frames(10)); @@ -381,7 +386,7 @@ void horny_toad_update(Moby *moby) { moby->state = HORNY_TOAD_ROAM; if (moby->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); - } else if (horny_toad_vars->unk1C4 != 2) { + } else if (horny_toad_vars->target_selection_status != 2) { moby->state = HORNY_TOAD_APPROACH_AND_FACE_TARGET; if (moby->prev_seq != 4) blend_moby_animation(moby, 4, 0, scale_game_frames(10)); @@ -389,7 +394,7 @@ void horny_toad_update(Moby *moby) { break; case HORNY_TOAD_MOVE_TO_POINT_OR_FACE_TARGET: { fast_vec_sub(reference_point_or_movement_endpoint, - horny_toad_vars->unk180, + horny_toad_vars->approach_position, (*(ToadVec *)&moby->pos)); reference_point_or_movement_endpoint[2] = 0.0f; fast_vec_normalize( @@ -397,7 +402,7 @@ void horny_toad_update(Moby *moby) { fast_vec_add(reference_point_or_movement_endpoint, reference_point_or_movement_endpoint, (*(ToadVec *)&moby->pos)); - if (test_path_segment_strict_crossing(horny_toad_vars->unk1E0, + if (test_path_segment_strict_crossing(horny_toad_vars->boundary_path, (*(ToadVec *)&moby->pos), reference_point_or_movement_endpoint) != 0) { approach_angle( @@ -417,10 +422,11 @@ void horny_toad_update(Moby *moby) { } else { if (moby->prev_seq != 4) blend_moby_animation(moby, 4, 0, scale_game_frames(20)); - move_horny_toad_toward_position((unsigned char *)moby, horny_toad_vars->unk180, 0.5f); + move_horny_toad_toward_position( + (unsigned char *)moby, horny_toad_vars->approach_position, 0.5f); } if (moby->anim_flags & 2) { - if (horny_toad_vars->unk1C4 != 2) { + if (horny_toad_vars->target_selection_status != 2) { moby->state = HORNY_TOAD_APPROACH_AND_FACE_TARGET; if (moby->prev_seq != 4) blend_moby_animation(moby, 4, 0, scale_game_frames(10)); @@ -433,14 +439,14 @@ void horny_toad_update(Moby *moby) { break; } case HORNY_TOAD_RECOVER_FROM_REACTION: - if (step_moby_motion(moby, horny_toad_vars->unk70) & 0x140) { + if (step_moby_motion(moby, horny_toad_vars->motion) & 0x140) { moby->state = HORNY_TOAD_ROAM; if (moby->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); } break; case HORNY_TOAD_DYING: - if (step_moby_motion(moby, horny_toad_vars->unk70) & 0x140) { + if (step_moby_motion(moby, horny_toad_vars->motion) & 0x140) { allocate_voice_for_target_entry(7, 0, moby); spawn_color_swapped_explosion_burst(moby, (*(ToadVec *)&moby->pos), -1, 0.75f, 10.0f); mark_moby_for_removal(moby); @@ -454,8 +460,10 @@ void horny_toad_update(Moby *moby) { frame_time * 7.0f, &(*(ToadVec *)&moby->pos)[2]); if (moby->state != HORNY_TOAD_FOLLOW_PATH) { - resolve_point_path_segment_xy_clearance( - horny_toad_vars->unk1E0, 0.25f, (*(ToadVec *)&moby->pos), (*(ToadVec *)&moby->pos)); + resolve_point_path_segment_xy_clearance(horny_toad_vars->boundary_path, + 0.25f, + (*(ToadVec *)&moby->pos), + (*(ToadVec *)&moby->pos)); } } if (horny_toad_vars->pickup_moby != -1) { @@ -607,12 +615,12 @@ float move_horny_toad_toward_position(unsigned char *moby, z = MOBY(moby)->pos.z; target_distance = fast_vec_dist(&MOBY(moby)->pos, target_position); if (2.0f < target_distance) - desired_yaw = fast_add_rotations(desired_yaw, moby_vars->unk1F4[2]); + desired_yaw = fast_add_rotations(desired_yaw, moby_vars->movement_yaw_offset); if (MOBY(moby)->seq != MOBY(moby)->prev_seq) return target_distance; approach_angle(moby + 0x48, desired_yaw, - &moby_vars->unk1F4, + &moby_vars->turn_speed, D_0015ED70_2d54c8 * 12.566371f, D_0015ED70_2d54c8 * 12.566371f, frame_time * 12.566371f); @@ -621,22 +629,22 @@ float move_horny_toad_toward_position(unsigned char *moby, D_0015ED70_2d54c8 * 8.0f, D_0015ED70_2d54c8 * 12.0f, frame_time * 4.0f, - (float *)(&moby_vars->unk1F4[1])); - if (moby_vars->unk1F4[1] < 0.0f) - moby_vars->unk1F4[1] = 0.0f; + (float *)(&moby_vars->move_speed)); + if (moby_vars->move_speed < 0.0f) + moby_vars->move_speed = 0.0f; movement_yaw = MOBY(moby)->rot.z; - moby_vars->unk278 = movement_yaw; - requested_movement_displacement[0] = FUN_001f9dc8_2d54c8(movement_yaw) * moby_vars->unk1F4[1]; + moby_vars->movement_yaw = movement_yaw; + requested_movement_displacement[0] = FUN_001f9dc8_2d54c8(movement_yaw) * moby_vars->move_speed; requested_movement_displacement[1] = - FUN_001f9de0_2d54c8(moby_vars->unk278) * moby_vars->unk1F4[1]; + FUN_001f9de0_2d54c8(moby_vars->movement_yaw) * moby_vars->move_speed; requested_movement_displacement[2] = 0.0f; - requested_movement_displacement[2] = moby_vars->unk270 - D_0015ED70_2d54c8 * 10.0f; + requested_movement_displacement[2] = moby_vars->vertical_velocity - D_0015ED70_2d54c8 * 10.0f; FUN_L00_00258830_2d54c8(moby, requested_movement_displacement, 0x10, 0.5f, 0.5f, 0.0f); vertical_displacement = MOBY(moby)->pos.z - z; maximum_vertical_displacement = frame_time * 4.0f; - moby_vars->unk270 = vertical_displacement; + moby_vars->vertical_velocity = vertical_displacement; if (maximum_vertical_displacement < vertical_displacement) - moby_vars->unk270 = maximum_vertical_displacement; + moby_vars->vertical_velocity = maximum_vertical_displacement; if (MOBY(moby)->anim_flags & 2) return target_distance; return 37.0f; diff --git a/src/overlays/shared/enemies/large_amoeboid.c b/src/overlays/shared/enemies/large_amoeboid.c index cef145f983..9a6a38b820 100644 --- a/src/overlays/shared/enemies/large_amoeboid.c +++ b/src/overlays/shared/enemies/large_amoeboid.c @@ -50,17 +50,17 @@ typedef struct LargeAmoeboidVars { u8 pad34[0x4]; s32 unk38; u8 pad3C[0x4]; - u8 unk40[0x18]; + u8 move_displacement[0x18]; s8 unk58; u8 pad59[0x1]; s8 unk5A; u8 pad5B[0x5]; - u8 unk60[0x10]; - f32 unk70; + u8 motion[0x10]; + f32 knockback_gravity; u8 pad74[0xc]; - s32 unk80; - s32 unk84; - f32 unk88; + s32 knockback_collision_radius; + s32 knockback_motion_flags; + f32 knockback_collision_z_offset; u8 pad8C[0x11]; s8 unk9D; u8 pad9E[0x8a]; @@ -68,35 +68,35 @@ typedef struct LargeAmoeboidVars { u8 pad12A[0x6]; void *unk130; u8 pad134[0x3c]; - s32 unk170; + s32 move_control; u8 pad174[0x4]; - f32 unk178; - f32 unk17C; + f32 move_max_drop; + f32 move_max_climb; u8 pad180[0x14]; - f32 unk194; + f32 move_max_speed; u8 pad198[0x28]; - f32 unk1C0[4]; + f32 path_search_point[4]; u8 pad1D0[0x30]; char *target; s32 target_selection_status; u8 pad208[0x8]; f32 home_pos[4]; /* 0x210: position at spawn */ - u8 unk220[0x4]; + u8 turn_velocity[0x4]; f32 base_target_search_radius; f32 effective_target_search_radius; - s32 unk22C; - s32 unk230; - f32 unk234; + s32 pursuit_timer; + s32 starts_active; + f32 path_heading_offset; u8 pad238[0x4]; - f32 unk23C; - s32 unk240; - s32 unk244; + f32 move_speed; + s32 path_ids; + s32 path_index; s32 alternate_target_list_index; s32 target_region_path_index; f32 size_scale; /* 0x250: 1, 0.7 or 0.49 by amoeboid size */ - f32 unk254; + f32 glow_cycle_phase; s32 removal_height_table_index; - s32 unk25C; + s32 activation_volume; s32 target_search_gate_moby_index; u8 pad264[0xc]; u8 unk270[0x4]; @@ -291,7 +291,7 @@ void large_amoeboid_update(unsigned char *moby) { break; } large_amoeboid_vars->unk30 = large_amoeboid_vars->size_scale; - large_amoeboid_vars->unk254 = FUN_00213308(); + large_amoeboid_vars->glow_cycle_phase = FUN_00213308(); if (MOBY(moby)->oclass == 0x362) large_amoeboid_vars->unk130 = &D_L01_00161A50; else @@ -299,24 +299,24 @@ void large_amoeboid_update(unsigned char *moby) { large_amoeboid_vars->unk29 = 1; if (large_amoeboid_vars->removal_height_table_index != 0) { large_amoeboid_vars->health = 1.0f; - large_amoeboid_vars->unk230 = 1; + large_amoeboid_vars->starts_active = 1; } else { large_amoeboid_vars->health = 3.0f; } if (large_amoeboid_vars->base_target_search_radius == 0.0f) large_amoeboid_vars->base_target_search_radius = 15.0f; - FUN_L01_0026d930(&large_amoeboid_vars->unk170); - large_amoeboid_vars->unk17C = 2.0f; - large_amoeboid_vars->unk178 = 2.0f; + FUN_L01_0026d930(&large_amoeboid_vars->move_control); + large_amoeboid_vars->move_max_climb = 2.0f; + large_amoeboid_vars->move_max_drop = 2.0f; result = truncate_float_to_s32(large_amoeboid_vars->size_scale * 0.8f * 1024.0f); - angle = large_amoeboid_vars->unk23C * frame_time_gp; - large_amoeboid_vars->unk170 = result; - large_amoeboid_vars->unk194 = angle; - if (large_amoeboid_vars->unk230 != 0) { + angle = large_amoeboid_vars->move_speed * frame_time_gp; + large_amoeboid_vars->move_control = result; + large_amoeboid_vars->move_max_speed = angle; + if (large_amoeboid_vars->starts_active != 0) { MOBY(moby)->state = LARGE_AMOEBOID_TRY_ACQUIRE_TARGET_PATH; MOBY(moby)->flags |= 0x1000; } else { - if (large_amoeboid_vars->unk25C == -1) + if (large_amoeboid_vars->activation_volume == -1) MOBY(moby)->state = LARGE_AMOEBOID_DORMANT; else MOBY(moby)->state = LARGE_AMOEBOID_WAIT_FOR_ACTIVATION_VOLUME; @@ -331,9 +331,9 @@ void large_amoeboid_update(unsigned char *moby) { case LARGE_AMOEBOID_TRY_ACQUIRE_TARGET_PATH: if (large_amoeboid_vars->target_selection_status != 2) { if (FUN_00213260(4) == 0) { - path_hit = follow_path((int *)(&large_amoeboid_vars->unk240), + path_hit = follow_path((int *)(&large_amoeboid_vars->path_ids), 1, - large_amoeboid_vars->unk244, + large_amoeboid_vars->path_index, large_amoeboid_vars->size_scale * 0.8f, &MOBY(moby)->pos, target + 0x10, @@ -342,20 +342,23 @@ void large_amoeboid_update(unsigned char *moby) { MOBY(moby)->state = LARGE_AMOEBOID_FOLLOW_PATH_TO_TARGET; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); - clear_u64_value(&large_amoeboid_vars->unk40); - large_amoeboid_vars->unk234 = random_float_between(-0.34906584f, 0.34906584f); + clear_u64_value(&large_amoeboid_vars->move_displacement); + large_amoeboid_vars->path_heading_offset = + random_float_between(-0.34906584f, 0.34906584f); } else { large_amoeboid_vars->target_selection_status = 2; } } } - if (large_amoeboid_vars->unk22C != 0 && large_amoeboid_vars->target_selection_status == 2) { + if (large_amoeboid_vars->pursuit_timer != 0 && + large_amoeboid_vars->target_selection_status == 2) { MOBY(moby)->state = LARGE_AMOEBOID_MOVE_DIRECTLY_TOWARD_TARGET; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, 5); return; } - large_amoeboid_vars->unk194 = large_amoeboid_vars->unk23C * 0.5f * frame_time_gp; + large_amoeboid_vars->move_max_speed = + large_amoeboid_vars->move_speed * 0.5f * frame_time_gp; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, 5); MOBY(moby)->state = LARGE_AMOEBOID_MOVE_TOWARD_STORED_POSITION; @@ -364,7 +367,7 @@ void large_amoeboid_update(unsigned char *moby) { angle = fast_arc_tan(large_amoeboid_vars->home_pos[0] - MOBY(moby)->pos.x, large_amoeboid_vars->home_pos[1] - MOBY(moby)->pos.y); approach_angle((float *)&MOBY(moby)->rot.z, - (float *)(&large_amoeboid_vars->unk220), + (float *)(&large_amoeboid_vars->turn_velocity), angle, D_0015ED70 * 1.0471976f, D_0015ED70 * 1.0471976f, @@ -372,13 +375,16 @@ void large_amoeboid_update(unsigned char *moby) { move[0] = fast_cos(MOBY(moby)->rot.z); move[1] = fast_sin(MOBY(moby)->rot.z); move[2] = 0.0f; - move_moby_with_ground_and_collision_checks( - moby, &large_amoeboid_vars->unk170, move, &large_amoeboid_vars->unk40, 1.0f); + move_moby_with_ground_and_collision_checks(moby, + &large_amoeboid_vars->move_control, + move, + &large_amoeboid_vars->move_displacement, + 1.0f); result = large_amoeboid_vars->target_selection_status; if (result != 2 && FUN_00213260(4) == 0) { - path_hit = follow_path((int *)(&large_amoeboid_vars->unk240), + path_hit = follow_path((int *)(&large_amoeboid_vars->path_ids), 1, - large_amoeboid_vars->unk244, + large_amoeboid_vars->path_index, large_amoeboid_vars->size_scale * 0.8f, &MOBY(moby)->pos, target + 0x10, @@ -387,16 +393,17 @@ void large_amoeboid_update(unsigned char *moby) { MOBY(moby)->state = LARGE_AMOEBOID_WAIT_FOR_PATH_ACQUISITION_ANIMATION_END; if (MOBY(moby)->prev_seq != 0) blend_moby_animation(moby, 0, 0, scale_game_frames(10)); - clear_u64_value(&large_amoeboid_vars->unk40); + clear_u64_value(&large_amoeboid_vars->move_displacement); angle = random_float_between(-0.34906584f, 0.34906584f); - distance = large_amoeboid_vars->unk23C * frame_time_gp; - large_amoeboid_vars->unk234 = angle; - large_amoeboid_vars->unk194 = distance; + distance = large_amoeboid_vars->move_speed * frame_time_gp; + large_amoeboid_vars->path_heading_offset = angle; + large_amoeboid_vars->move_max_speed = distance; } else { large_amoeboid_vars->target_selection_status = 2; } } - if (large_amoeboid_vars->unk22C != 0 && large_amoeboid_vars->target_selection_status == 2) { + if (large_amoeboid_vars->pursuit_timer != 0 && + large_amoeboid_vars->target_selection_status == 2) { MOBY(moby)->state = LARGE_AMOEBOID_MOVE_DIRECTLY_TOWARD_TARGET; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, 5); @@ -408,7 +415,7 @@ void large_amoeboid_update(unsigned char *moby) { angle = fast_arc_tan(*(float *)(target + 0x10) - MOBY(moby)->pos.x, *(float *)(target + 0x14) - MOBY(moby)->pos.y); approach_angle((float *)&MOBY(moby)->rot.z, - (float *)(&large_amoeboid_vars->unk220), + (float *)(&large_amoeboid_vars->turn_velocity), angle, D_0015ED70 * 1.0471976f, D_0015ED70 * 1.0471976f, @@ -416,12 +423,15 @@ void large_amoeboid_update(unsigned char *moby) { move[0] = fast_cos(MOBY(moby)->rot.z); move[1] = fast_sin(MOBY(moby)->rot.z); move[2] = 0.0f; - move_moby_with_ground_and_collision_checks( - moby, &large_amoeboid_vars->unk170, move, &large_amoeboid_vars->unk40, 1.0f); - if (path_8808(large_amoeboid_vars->unk240, &MOBY(moby)->pos, target + 0x10, hit) != 0 && + move_moby_with_ground_and_collision_checks(moby, + &large_amoeboid_vars->move_control, + move, + &large_amoeboid_vars->move_displacement, + 1.0f); + if (path_8808(large_amoeboid_vars->path_ids, &MOBY(moby)->pos, target + 0x10, hit) != 0 && fast_vec_dist(&MOBY(moby)->pos, hit) < 1.5f) blocked = 1; - if (large_amoeboid_vars->unk22C == 0) { + if (large_amoeboid_vars->pursuit_timer == 0) { MOBY(moby)->state = LARGE_AMOEBOID_RETURN_TO_STORED_POSITION; } else if (blocked) { MOBY(moby)->state = LARGE_AMOEBOID_WAIT_WHILE_BLOCKED; @@ -435,7 +445,7 @@ void large_amoeboid_update(unsigned char *moby) { } break; case LARGE_AMOEBOID_WAIT_WHILE_BLOCKED: - if (!(MOBY(moby)->anim_flags & 2) || large_amoeboid_vars->unk22C != 0) + if (!(MOBY(moby)->anim_flags & 2) || large_amoeboid_vars->pursuit_timer != 0) return; MOBY(moby)->state = LARGE_AMOEBOID_RETURN_TO_STORED_POSITION; if (MOBY(moby)->prev_seq != 1) @@ -448,33 +458,33 @@ void large_amoeboid_update(unsigned char *moby) { distance = vector_distance_xy(&MOBY(moby)->pos, target_position); if (distance < large_amoeboid_path_lunge_distance_threshold_gp) { MOBY(moby)->state = LARGE_AMOEBOID_LUNGE_AT_TARGET; - large_amoeboid_vars->unk194 = - (large_amoeboid_vars->unk23C + large_amoeboid_vars->unk23C) * frame_time_gp; + large_amoeboid_vars->move_max_speed = + (large_amoeboid_vars->move_speed + large_amoeboid_vars->move_speed) * frame_time_gp; if (MOBY(moby)->prev_seq != 2) blend_moby_animation(moby, 2, 0, scale_game_frames(10)); return; } else { - if (follow_path((int *)(&large_amoeboid_vars->unk240), + if (follow_path((int *)(&large_amoeboid_vars->path_ids), 1, - large_amoeboid_vars->unk244, + large_amoeboid_vars->path_index, large_amoeboid_vars->size_scale * 0.8f, &MOBY(moby)->pos, target_position, hit) != 0) path_hit = 1; else - path_hit = follow_path((int *)(&large_amoeboid_vars->unk240), + path_hit = follow_path((int *)(&large_amoeboid_vars->path_ids), 1, - large_amoeboid_vars->unk244, + large_amoeboid_vars->path_index, 0.0f, &MOBY(moby)->pos, target_position, hit) != 0; if (path_hit != 0) { angle = fast_arc_tan(hit[0] - MOBY(moby)->pos.x, hit[1] - MOBY(moby)->pos.y); - angle = fast_add_rotations(angle, large_amoeboid_vars->unk234); + angle = fast_add_rotations(angle, large_amoeboid_vars->path_heading_offset); approach_angle((float *)&MOBY(moby)->rot.z, - (float *)(&large_amoeboid_vars->unk220), + (float *)(&large_amoeboid_vars->turn_velocity), angle, D_0015ED70 * 12.566371f, D_0015ED70 * 12.566371f, @@ -484,8 +494,11 @@ void large_amoeboid_update(unsigned char *moby) { move[1] = fast_sin(MOBY(moby)->rot.z); move[1] += move[1]; move[2] = 0.0f; - move_moby_with_ground_and_collision_checks( - moby, &large_amoeboid_vars->unk170, move, &large_amoeboid_vars->unk40, 1.0f); + move_moby_with_ground_and_collision_checks(moby, + &large_amoeboid_vars->move_control, + move, + &large_amoeboid_vars->move_displacement, + 1.0f); } else { large_amoeboid_vars->target_selection_status = 2; } @@ -501,7 +514,7 @@ void large_amoeboid_update(unsigned char *moby) { angle = fast_arc_tan(*(float *)(target + 0x10) - MOBY(moby)->pos.x, *(float *)(target + 0x14) - MOBY(moby)->pos.y); approach_angle(rotation, - (float *)(&large_amoeboid_vars->unk220), + (float *)(&large_amoeboid_vars->turn_velocity), angle, D_0015ED70 * 12.566371f, D_0015ED70 * 12.566371f, @@ -513,8 +526,11 @@ void large_amoeboid_update(unsigned char *moby) { move[1] = fast_sin(*rotation); move[1] += move[1]; move[2] = 0.0f; - move_moby_with_ground_and_collision_checks( - moby, &large_amoeboid_vars->unk170, move, &large_amoeboid_vars->unk40, 1.0f); + move_moby_with_ground_and_collision_checks(moby, + &large_amoeboid_vars->move_control, + move, + &large_amoeboid_vars->move_displacement, + 1.0f); } if (is_value_within_interpolated_window(15.5f, moby) != 0 && vector_distance_xy(&MOBY(moby)->pos, (target_position = target + 0x10)) < 2.0f && @@ -533,7 +549,7 @@ void large_amoeboid_update(unsigned char *moby) { MOBY(moby)->state = LARGE_AMOEBOID_WAIT_FOR_ANIMATION_BEFORE_RESUMING_PATH; if (MOBY(moby)->prev_seq != 3) blend_moby_animation(moby, 3, 0, scale_game_frames(10)); - large_amoeboid_vars->unk194 = large_amoeboid_vars->unk23C * frame_time_gp; + large_amoeboid_vars->move_max_speed = large_amoeboid_vars->move_speed * frame_time_gp; } break; } @@ -553,18 +569,18 @@ void large_amoeboid_update(unsigned char *moby) { if (distance < 1.0f) { MOBY(moby)->state = LARGE_AMOEBOID_TRY_ACQUIRE_TARGET_PATH; } else { - if (follow_path((int *)(&large_amoeboid_vars->unk240), + if (follow_path((int *)(&large_amoeboid_vars->path_ids), 1, - large_amoeboid_vars->unk244, + large_amoeboid_vars->path_index, large_amoeboid_vars->size_scale * 0.8f, &MOBY(moby)->pos, target_position, hit) != 0) blocked = 1; else - blocked = follow_path((int *)(&large_amoeboid_vars->unk240), + blocked = follow_path((int *)(&large_amoeboid_vars->path_ids), 1, - large_amoeboid_vars->unk244, + large_amoeboid_vars->path_index, 0.0f, target_position, target_position, @@ -572,9 +588,9 @@ void large_amoeboid_update(unsigned char *moby) { } if (blocked != 0) { angle = fast_arc_tan(hit[0] - MOBY(moby)->pos.x, hit[1] - MOBY(moby)->pos.y); - angle = fast_add_rotations(angle, large_amoeboid_vars->unk234); + angle = fast_add_rotations(angle, large_amoeboid_vars->path_heading_offset); approach_angle((float *)&MOBY(moby)->rot.z, - (float *)(&large_amoeboid_vars->unk220), + (float *)(&large_amoeboid_vars->turn_velocity), angle, D_0015ED70 * 12.566371f, D_0015ED70 * 12.566371f, @@ -584,8 +600,11 @@ void large_amoeboid_update(unsigned char *moby) { move[1] = fast_sin(MOBY(moby)->rot.z); move[1] += move[1]; move[2] = 0.0f; - move_moby_with_ground_and_collision_checks( - moby, &large_amoeboid_vars->unk170, move, &large_amoeboid_vars->unk40, 1.0f); + move_moby_with_ground_and_collision_checks(moby, + &large_amoeboid_vars->move_control, + move, + &large_amoeboid_vars->move_displacement, + 1.0f); } if (large_amoeboid_vars->target_selection_status != 2 && (MOBY(moby)->state = 4, MOBY(moby)->prev_seq != 1)) @@ -594,18 +613,19 @@ void large_amoeboid_update(unsigned char *moby) { return; } case LARGE_AMOEBOID_PROCESS_KNOCKBACK: - result = step_moby_motion(moby, &large_amoeboid_vars->unk60); + result = step_moby_motion(moby, &large_amoeboid_vars->motion); if (result & 1) { - path_hit = follow_path((int *)(&large_amoeboid_vars->unk240), + path_hit = follow_path((int *)(&large_amoeboid_vars->path_ids), 1, - large_amoeboid_vars->unk244, + large_amoeboid_vars->path_index, large_amoeboid_vars->size_scale * 0.8f, &MOBY(moby)->pos, &large_amoeboid_vars->home_pos, move); if (path_hit != 0) { FUN_0022da68(4, 0, (char *)moby); - large_amoeboid_vars->unk194 = large_amoeboid_vars->unk23C * frame_time_gp; + large_amoeboid_vars->move_max_speed = + large_amoeboid_vars->move_speed * frame_time_gp; MOBY(moby)->state = LARGE_AMOEBOID_WAIT_FOR_ANIMATION_BEFORE_RESTARTING_PATH; if (MOBY(moby)->prev_seq != 5) blend_moby_animation(moby, 5, 4, scale_game_frames(10)); @@ -624,16 +644,16 @@ void large_amoeboid_update(unsigned char *moby) { MOBY(moby)->state = LARGE_AMOEBOID_FOLLOW_PATH_TO_TARGET; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); - clear_u64_value(&large_amoeboid_vars->unk40); + clear_u64_value(&large_amoeboid_vars->move_displacement); angle = random_float_between(-0.34906584f, 0.34906584f); - distance = large_amoeboid_vars->unk23C * frame_time_gp; - large_amoeboid_vars->unk234 = angle; - large_amoeboid_vars->unk194 = distance; + distance = large_amoeboid_vars->move_speed * frame_time_gp; + large_amoeboid_vars->path_heading_offset = angle; + large_amoeboid_vars->move_max_speed = distance; } break; case LARGE_AMOEBOID_WAIT_FOR_ACTIVATION_VOLUME: MOBY(moby)->flags |= 1; - if (FUN_00214720(D_0013F420, large_amoeboid_vars->unk25C) != 0) { + if (FUN_00214720(D_0013F420, large_amoeboid_vars->activation_volume) != 0) { u16 flags; float distance; int result; @@ -650,7 +670,7 @@ void large_amoeboid_update(unsigned char *moby) { } return; case LARGE_AMOEBOID_PROCESS_SUCK_CANNON_INTERACTION: - if (FUN_L00_002dc9f0(moby, &large_amoeboid_vars->unk60)) { + if (FUN_L00_002dc9f0(moby, &large_amoeboid_vars->motion)) { MOBY(moby)->state = LARGE_AMOEBOID_TRY_ACQUIRE_TARGET_PATH; large_amoeboid_vars->unk128 = 0; } @@ -734,11 +754,11 @@ void process_amoeboid_hits_and_update_targeting(char *moby) { rate = 0.008f; moby_vars->health = moby_vars->health - hit_decrement; moby_vars->unk9D = 0; - moby_vars->unk70 = rate; - moby_vars->unk84 = 8; - moby_vars->unk80 = + moby_vars->knockback_gravity = rate; + moby_vars->knockback_motion_flags = 8; + moby_vars->knockback_collision_radius = truncate_float_to_s32(moby_vars->size_scale * size_multiplier * fixed_scale); - moby_vars->unk88 = moby_vars->size_scale * size_multiplier; + moby_vars->knockback_collision_z_offset = moby_vars->size_scale * size_multiplier; spawn_amoeboid_burst_sparks((unsigned char *)moby, (float *)(hit_record + 0x10)); if (0.0f < moby_vars->health) { spawned = activate_smaller_amoeboid(moby); @@ -812,10 +832,10 @@ void process_amoeboid_hits_and_update_targeting(char *moby) { return; } if (moby_vars->unk38 != 0) { - moby_vars->unk22C = scale_game_frames(0xF0); + moby_vars->pursuit_timer = scale_game_frames(0xF0); moby_vars->unk38 = 0; } - if (fast_dec_timer(&moby_vars->unk22C) != 0) { + if (fast_dec_timer(&moby_vars->pursuit_timer) != 0) { moby_vars->effective_target_search_radius = moby_vars->base_target_search_radius; } else { moby_vars->effective_target_search_radius = moby_vars->base_target_search_radius + 20.0f; @@ -825,7 +845,7 @@ void process_amoeboid_hits_and_update_targeting(char *moby) { *(unsigned char *)((path_search_gate_moby_index << 8) + (*(int *)&D_L01_0015FFD8) + 0xBC) != 0) { search_path = ((char *)l01_paths[moby_vars->target_region_path_index]); - path_search_position = &moby_vars->unk1C0; + path_search_position = &moby_vars->path_search_point; if (FUN_L00_0025ff38(moby_vars->effective_target_search_radius, moby, path_search_position, @@ -835,7 +855,7 @@ void process_amoeboid_hits_and_update_targeting(char *moby) { *(int *)search_path) != 2) { if (moby_vars->effective_target_search_radius < vector_distance_xy(&moby_vars->home_pos, path_search_position) || - 3.0f < absolute_float(MOBY(moby)->pos.z - moby_vars->unk1C0[2])) { + 3.0f < absolute_float(MOBY(moby)->pos.z - moby_vars->path_search_point[2])) { moby_vars->target_selection_status = 2; } } @@ -858,8 +878,8 @@ void process_amoeboid_hits_and_update_targeting(char *moby) { if (*(int *)&moby_vars->target == 0) { *(int *)&moby_vars->target = *(int *)(((char *)((char(*))D_001413D0))); } - color_cycle_phase = fast_add_rotations(moby_vars->unk254, frame_time * 9.424778f); - moby_vars->unk254 = color_cycle_phase; + color_cycle_phase = fast_add_rotations(moby_vars->glow_cycle_phase, frame_time * 9.424778f); + moby_vars->glow_cycle_phase = color_cycle_phase; MOBY(moby)->glow_color = fast_tween_color((fast_sin(color_cycle_phase) + 1.0f) * 0.5f, *(int *)&amoeboid_color_cycle_start_gp, *(int *)&amoeboid_color_cycle_end_gp); diff --git a/src/overlays/shared/enemies/plasmabot.c b/src/overlays/shared/enemies/plasmabot.c index 626614e1e3..27b3ab8186 100644 --- a/src/overlays/shared/enemies/plasmabot.c +++ b/src/overlays/shared/enemies/plasmabot.c @@ -69,27 +69,27 @@ typedef struct PlasmabotVars { u8 pad59[0x1]; s8 unk5A; u8 pad5B[0x5]; - u8 unk60[0x18]; - f32 unk78; - f32 unk7C; - s32 unk80; + u8 motion[0x18]; + f32 knockback_speed; + f32 knockback_vertical_speed; + s32 knockback_collision_radius; u8 pad84[0x4]; - f32 unk88; + f32 knockback_collision_z_offset; u8 pad8C[0x24]; - f32 unkB0; - f32 unkB4; + f32 knockback_apex_animation_frame; + f32 knockback_landing_animation_frame; u8 padB8[0x8]; - u8 unkC0[0x10]; - u8 unkD0[0x40]; + u8 trooper_anim[0x10]; + u8 path_search_point[0x40]; s32 target; /* 0x110: target moby */ s32 target_selection_status; u8 pad118[0x8]; - u8 unk120[0x10]; - u8 unk130[0x30]; + u8 aim_joint_manipulator[0x10]; + u8 aim_joint_rotation[0x30]; u8 manipulator_attachment_header[0x10]; u8 aim_quaternion_storage[0x70]; u8 unk1E0[0x10]; - u8 unk1F0[0x10]; + u8 nozzle_position[0x10]; u8 unk200[0x10]; u8 beam_start_position_storage[0x10]; u8 beam_end_position_storage[0x14]; @@ -107,7 +107,7 @@ typedef struct PlasmabotVars { s32 hatch_index; f32 aim_yaw_offset; s32 aim_yaw_angular_velocity; - s32 unk270; + s32 aim_joint_angle; s32 aim_joint_angular_velocity; f32 aim_sweep_center_angle; f32 path_traversal_direction; @@ -128,14 +128,14 @@ void update_plasmabot_target(char *moby) { PlasmabotVars *plasmabot_private_vars = (PlasmabotVars *)MOBY(moby)->pvars; int *target_filter_record = ((int *)l14_paths[plasmabot_private_vars->target_path_index]); if (FUN_L00_0025ff38(moby, - &plasmabot_private_vars->unkD0, + &plasmabot_private_vars->path_search_point, plasmabot_private_vars->target_range, 0, 0, target_filter_record + 4, *target_filter_record) != 2) { if (plasmabot_private_vars->target_range < - vector_distance_xy(&MOBY(moby)->pos, &plasmabot_private_vars->unkD0)) { + vector_distance_xy(&MOBY(moby)->pos, &plasmabot_private_vars->path_search_point)) { plasmabot_private_vars->target_selection_status = PLASMABOT_TARGET_STATUS_REJECTED; } } @@ -232,14 +232,15 @@ void update_plasmabot_aim_joint_rotation(char *moby, float x) { target_joint_angle = -1.2217304706573486f; { float k = frame_time_sq * 12.566370964050293f; - approach_angle((float *)(&moby_vars->unk270), + approach_angle((float *)(&moby_vars->aim_joint_angle), (float *)(&moby_vars->aim_joint_angular_velocity), target_joint_angle, k, k, frame_time * 6.2831854820251465f); } - build_axis_rotation_quaternion(&moby_vars->unk130, 2, *(float *)&moby_vars->unk270); + build_axis_rotation_quaternion( + &moby_vars->aim_joint_rotation, 2, *(float *)&moby_vars->aim_joint_angle); } /* Ported from rac1-decomp (src/overlays/shared/vendor_002B2A28.c: func_L14_002B4AE0), where it is exact; names translated to the US level program. */ @@ -374,7 +375,7 @@ void plasmabot_update(char *moby) { plasmabot_update_private_vars = (PlasmabotVars *)MOBY(moby)->pvars; plasmabot_aim_target_moby = 0; - FUN_L00_00263ac8(2.5f, moby, 2, &plasmabot_update_private_vars->unk120); + FUN_L00_00263ac8(2.5f, moby, 2, &plasmabot_update_private_vars->aim_joint_manipulator); if (plasmabot_update_private_vars->unk288 != 0) { if (((unsigned char *)D_001413F4)[0] != 2) { MOBY(moby)->flags |= 0x41; @@ -474,10 +475,10 @@ void plasmabot_update(char *moby) { plasmabot_update_private_vars->aim_yaw_angular_velocity = 0; plasmabot_update_private_vars->aim_pitch_angle = 0; plasmabot_update_private_vars->aim_pitch_angular_velocity = 0; - plasmabot_update_private_vars->unk270 = 0; + plasmabot_update_private_vars->aim_joint_angle = 0; plasmabot_update_private_vars->aim_joint_angular_velocity = 0; if (((unsigned char *)plasmabot_update_private_vars)[0x121] == 0) { - attach_manipulator(moby, 2, &plasmabot_update_private_vars->unk120); + attach_manipulator(moby, 2, &plasmabot_update_private_vars->aim_joint_manipulator); } if (((unsigned char *)plasmabot_update_private_vars)[0x161] == 0) { attach_manipulator( @@ -516,7 +517,7 @@ void plasmabot_update(char *moby) { *(int *)&plasmabot_update_private_vars->aim_yaw_offset = 0; plasmabot_update_private_vars->path_traversal_direction = 1.0f; plasmabot_update_private_vars->aim_yaw_angular_velocity = 0; - plasmabot_update_private_vars->unk270 = 0; + plasmabot_update_private_vars->aim_joint_angle = 0; plasmabot_update_private_vars->aim_joint_angular_velocity = 0; plasmabot_update_private_vars->path_segment_index = 0; *(int *)&plasmabot_update_private_vars->path_offset_and_spring_velocities = 0; @@ -771,7 +772,7 @@ void plasmabot_update(char *moby) { break; } case PLASMABOT_FALL_THEN_EXPLODE: { - if ((step_moby_motion(moby, &plasmabot_update_private_vars->unk60) & 0x160) == 0) + if ((step_moby_motion(moby, &plasmabot_update_private_vars->motion) & 0x160) == 0) return; release_beam_slot_by_id(moby); FUN_L00_0024f7c8(moby, 2, bone_transform_scratch); @@ -994,7 +995,7 @@ void draw_plasmabot_effect_quads(struct Moby *moby) { pp = &plasmabot_effect_private_vars->beam_end_position_storage; fast_vec_sub(&quad_transform[0], ((char *)&D_L14_001674C0), &quad_transform[3]); beam_start_position = &plasmabot_effect_private_vars->beam_start_position_storage; - nozzle_position = &plasmabot_effect_private_vars->unk1F0; + nozzle_position = &plasmabot_effect_private_vars->nozzle_position; fast_vec_normalize(&quad_transform[0], &quad_transform[0], 1.0f); fast_vec_cross(&quad_transform[1], &quad_transform[0], D_0013F5E0); fast_vec_normalize(&quad_transform[1], &quad_transform[1], -1.0f); @@ -1121,7 +1122,7 @@ void process_plasmabot_hit_reaction(struct Moby *moby) { if (((unsigned char *)moby)[0x20] == 0 || ((unsigned char *)moby)[0x20] == 0xB) { if (((unsigned char *)moby)[0x20] == 0xB) { ((unsigned char *)moby)[0xA4] = 0xFF; - trooper_anim_finish(moby, &state->unkC0); + trooper_anim_finish(moby, &state->trooper_anim); } return; } @@ -1146,7 +1147,7 @@ void process_plasmabot_hit_reaction(struct Moby *moby) { case 8: case 9: case 10: { - char *reaction_motion_state = &state->unk60; + char *reaction_motion_state = &state->motion; int stagger_duration_frames; float frame_duration, stagger_motion_z, k; release_beam_slot_by_id(moby); @@ -1156,10 +1157,10 @@ void process_plasmabot_hit_reaction(struct Moby *moby) { stagger_motion_z = plasmabot_stagger_motion_z_scale_gp * frame_duration; k = frame_duration * 8.0f; state->stagger_reaction_duration_frames = stagger_duration_frames; - state->unk78 = k; - state->unk7C = stagger_motion_z; - state->unkB0 = 11.0f; - state->unkB4 = 29.0f; + state->knockback_speed = k; + state->knockback_vertical_speed = stagger_motion_z; + state->knockback_apex_animation_frame = 11.0f; + state->knockback_landing_animation_frame = 29.0f; func_L00_0025D5B0_i( moby, reaction_motion_state, @@ -1181,17 +1182,17 @@ void process_plasmabot_hit_reaction(struct Moby *moby) { moby->flags &= 0xEFFF; { int scaled_previous_motion_parameter = - truncate_float_to_s32(state->unk88 * 1024.0f); + truncate_float_to_s32(state->knockback_collision_z_offset * 1024.0f); float k = frame_time * 10.0f; - state->unk88 = 0.3f; - state->unk78 = k; - state->unk7C = k; - state->unkB0 = 9.0f; - state->unk80 = scaled_previous_motion_parameter; - state->unkB4 = 15.0f; + state->knockback_collision_z_offset = 0.3f; + state->knockback_speed = k; + state->knockback_vertical_speed = k; + state->knockback_apex_animation_frame = 9.0f; + state->knockback_collision_radius = scaled_previous_motion_parameter; + state->knockback_landing_animation_frame = 15.0f; } y = fast_arc_tan(*(float *)(hit_info + 0x10), *(float *)(hit_info + 0x14)); - func_L00_0025D5B0_i(moby, &state->unk60, y, 8, scale_game_frames(5), 0); + func_L00_0025D5B0_i(moby, &state->motion, y, 8, scale_game_frames(5), 0); ((unsigned char *)state)[0xC7] = 0xFA; if (((unsigned char *)D_0013E533)[0x2EC1] == 2) { FUN_L00_00257470(moby, 0x200, -1); @@ -1205,10 +1206,10 @@ void process_plasmabot_hit_reaction(struct Moby *moby) { case HIT_REACTION_NONE: break; } - trooper_anim_update(moby, (short *)(&state->unkC0)); + trooper_anim_update(moby, (short *)(&state->trooper_anim)); } ((unsigned char *)moby)[0xA4] = 0xFF; - trooper_anim_finish(moby, &state->unkC0); + trooper_anim_finish(moby, &state->trooper_anim); } /* steers the moby toward its target: queries the path, eases x/y, then turns to face the heading */ /* Ported from rac1-decomp (src/overlays/shared/vendor_002B2A28.c: func_L14_002B4668), where it is exact; names translated to the US level program. */ diff --git a/src/overlays/shared/enemies/sand_mouse.c b/src/overlays/shared/enemies/sand_mouse.c index e31a976df9..4621dd9e15 100644 --- a/src/overlays/shared/enemies/sand_mouse.c +++ b/src/overlays/shared/enemies/sand_mouse.c @@ -69,11 +69,12 @@ typedef struct { } Data; typedef struct { - int unk0; - float unk4, unk8, unkC, unk10, yaw_speed, unk18, unk1C, unk20, unk24, unk28, unk2C, unk30; - int unk34, unk38; - float unk3C, unk40, unk44; - int unk48, unk4C; + int collision_radius_1024ths; + float step_height, max_drop, max_climb, speed, yaw_speed, vertical_velocity, acceleration, + brake, max_speed, heading_tolerance, arrive_distance, ground_probe_depth; + int unk34, movement_option_flags; + float turn_spring, turn_damping, max_turn_step; + int move_timer, move_heading; void *owner; } Mover; @@ -563,20 +564,21 @@ void sand_mouse_update(struct Moby *moby) { int flag; rig_probe_setup(moby, 0, &kind, va, &collision_probe_extent, &flag); mover_2e3f20.yaw_speed = frame_scale * 0.4f; - mover_2e3f20.unk8 = 0.15f; - mover_2e3f20.unkC = 0.15f; - mover_2e3f20.unk10 = frame_scale * 0.01f; - mover_2e3f20.unk24 = frame_time * 2.7f; - mover_2e3f20.unk1C = frame_scale * 0.01f; - mover_2e3f20.unk0 = truncate_float_to_s32(collision_probe_extent * 1024.0f) + 1; - mover_2e3f20.unk38 |= 8; - mover_2e3f20.unk4 = 0.3f; - mover_2e3f20.unk30 = 0.005f; - mover_2e3f20.unk3C = frame_time_sq * 11.519173f; - mover_2e3f20.unk40 = frame_time_sq * 3.1415927f; - mover_2e3f20.unk44 = frame_time * 11.519173f; - mover_2e3f20.unk48 = scale_game_frames(4); - mover_2e3f20.unk28 = 3.1415927f; + mover_2e3f20.max_drop = 0.15f; + mover_2e3f20.max_climb = 0.15f; + mover_2e3f20.speed = frame_scale * 0.01f; + mover_2e3f20.max_speed = frame_time * 2.7f; + mover_2e3f20.acceleration = frame_scale * 0.01f; + mover_2e3f20.collision_radius_1024ths = + truncate_float_to_s32(collision_probe_extent * 1024.0f) + 1; + mover_2e3f20.movement_option_flags |= 8; + mover_2e3f20.step_height = 0.3f; + mover_2e3f20.ground_probe_depth = 0.005f; + mover_2e3f20.turn_spring = frame_time_sq * 11.519173f; + mover_2e3f20.turn_damping = frame_time_sq * 3.1415927f; + mover_2e3f20.max_turn_step = frame_time * 11.519173f; + mover_2e3f20.move_timer = scale_game_frames(4); + mover_2e3f20.heading_tolerance = 3.1415927f; } moby->state = SAND_MOUSE_WAIT_FOR_HERO_IN_VOLUME; moby->draw_dist = 0; diff --git a/src/overlays/shared/enemies/sandmouse.c b/src/overlays/shared/enemies/sandmouse.c index 0acfdea342..2b7bf3e3a4 100644 --- a/src/overlays/shared/enemies/sandmouse.c +++ b/src/overlays/shared/enemies/sandmouse.c @@ -260,16 +260,16 @@ struct HoverVars { /* steering constants */ struct HoverTuning { - s32 unk0; /* passed to FUN_L00_00258ad0 */ - f32 unk4, unk8, unkC, unk10; - f32 yaw_speed; /* 0x14: turn speed FUN_L00_00258278 keeps (D_L01_001DEB4C) */ - f32 unk18, unk1C, unk20, unk24, unk28, unk2C; - f32 unk30; - f32 unk34; - s32 unk38; - f32 unk3C, unk40, unk44; - s32 unk48; - s32 unk4C; + s32 collision_radius_1024ths; /* passed to FUN_L00_00258ad0 (move_moby_with_collision_integer_radius) */ + f32 step_height, max_drop, max_climb, speed; + f32 yaw_speed; /* 0x14: turn speed FUN_L00_00258278 keeps (D_L01_001DEB4C) */ + f32 vertical_velocity, acceleration, brake, max_speed, heading_tolerance, arrive_distance; + f32 ground_probe_depth; + f32 unk34; + s32 movement_option_flags; + f32 turn_spring, turn_damping, max_turn_step; + s32 move_timer; + s32 move_heading; struct Moby *owner; /* 0x50 */ }; @@ -364,8 +364,12 @@ void update_sandmouse_hover_movement(struct Moby *moby, struct HoverVars *hover_ clamp_vector_length(&hover_vars->vel, &hover_vars->vel, frame_time * 2.7f); } hover_tuning = &D_L01_001DEB38; - hit = move_moby_with_collision_integer_radius( - moby, &hover_vars->vel, 1.0f, hover_tuning->unk30, hover_tuning->unk0, 0); + hit = move_moby_with_collision_integer_radius(moby, + &hover_vars->vel, + 1.0f, + hover_tuning->ground_probe_depth, + hover_tuning->collision_radius_1024ths, + 0); velocity_magnitude = fast_vec_length(&hover_vars->vel); if (hit == 0) { hover_vars->stuck = 0; @@ -609,21 +613,21 @@ void sandmouse_update(Moby *sandmouse_moby) { qcopy(&sandmouse_vars->a20, &sandmouse_moby->pos); qcopy(&sandmouse_vars->a30, &sandmouse_moby->pos); FUN_L01_0026d930(&D_L01_001DEB38_lui); - D_L01_001DEB38_lui.unk0 = 500; - D_L01_001DEB38_lui.unk8 = 0.15f; - D_L01_001DEB38_lui.unkC = 0.15f; + D_L01_001DEB38_lui.collision_radius_1024ths = 500; + D_L01_001DEB38_lui.max_drop = 0.15f; + D_L01_001DEB38_lui.max_climb = 0.15f; D_L01_001DEB38_lui.yaw_speed = frame_scale * 0.4f; - D_L01_001DEB38_lui.unk10 = frame_scale * 0.01f; - D_L01_001DEB38_lui.unk24 = frame_time * 2.7f; - D_L01_001DEB38_lui.unk1C = frame_scale * 0.01f; - D_L01_001DEB38_lui.unk4 = 0.3f; - D_L01_001DEB38_lui.unk30 = 0.005f; - D_L01_001DEB38_lui.unk38 |= 8; - D_L01_001DEB38_lui.unk3C = frame_time_sq * 6.2831855f; - D_L01_001DEB38_lui.unk40 = frame_time_sq * 3.1415927f; - D_L01_001DEB38_lui.unk44 = frame_time * 11.519173f; - D_L01_001DEB38_lui.unk48 = scale_game_frames(4); - D_L01_001DEB38_lui.unk28 = 3.1415927f; + D_L01_001DEB38_lui.speed = frame_scale * 0.01f; + D_L01_001DEB38_lui.max_speed = frame_time * 2.7f; + D_L01_001DEB38_lui.acceleration = frame_scale * 0.01f; + D_L01_001DEB38_lui.step_height = 0.3f; + D_L01_001DEB38_lui.ground_probe_depth = 0.005f; + D_L01_001DEB38_lui.movement_option_flags |= 8; + D_L01_001DEB38_lui.turn_spring = frame_time_sq * 6.2831855f; + D_L01_001DEB38_lui.turn_damping = frame_time_sq * 3.1415927f; + D_L01_001DEB38_lui.max_turn_step = frame_time * 11.519173f; + D_L01_001DEB38_lui.move_timer = scale_game_frames(4); + D_L01_001DEB38_lui.heading_tolerance = 3.1415927f; sandmouse_moby->state = SANDMOUSE_STATE_WAIT_FOR_ACTIVATION; sandmouse_moby->draw_dist = 0; break; @@ -732,7 +736,7 @@ void sandmouse_update(Moby *sandmouse_moby) { } if (0.6f < vector_distance_xy(&sandmouse_moby->pos, &sandmouse_vars->a30) && sandmouse_vars->timer == 0) { - D_L01_001DEB38_lui.unk4 = 0.7f; + D_L01_001DEB38_lui.step_height = 0.7f; compute_sandmouse_follow_goal(sandmouse_moby, sandmouse_vars); update_sandmouse_hover_movement(sandmouse_moby, (struct HoverVars *)sandmouse_vars); movement_result_flags = sandmouse_vars->stuck < 0x15; diff --git a/src/overlays/shared/enemies/scoutbot.c b/src/overlays/shared/enemies/scoutbot.c index c6767e85e6..708de11bda 100644 --- a/src/overlays/shared/enemies/scoutbot.c +++ b/src/overlays/shared/enemies/scoutbot.c @@ -34,22 +34,22 @@ enum { typedef struct ScoutbotVars { u8 pad0[0x20]; - f32 unk20[4]; - u8 pad30[0x10]; - f32 unk40[4]; + f32 health; + u8 pad24[0x1C]; + f32 velocity[4]; u8 pad50[0x78]; s16 unkC8; u8 padCA[0xa6]; f32 tracked_target_position[4]; u8 pad180[0x30]; - s32 unk1B0; + s32 target; s32 target_selection_status; u8 pad1B8[0x8]; - f32 unk1C0[4]; + f32 home_position[4]; f32 unk1D0[4]; f32 unk1E0[4]; u8 pad1F0[0x10]; - f32 unk200; + f32 hover_height_offset; f32 vertical_bob_phase; f32 vertical_bob_amplitude; f32 vertical_bob_phase_increment; @@ -426,10 +426,10 @@ void update_scoutbot_health_and_target(struct Moby *moby) { int hit_reaction_code; dmg = 0.0f; hit_reaction_code = hit_reaction( - moby, find_moby_hit(moby, 0x330000, 0), &scoutbot_pvars->unk20, 0, &hit, &dmg, 0, 4); + moby, find_moby_hit(moby, 0x330000, 0), &scoutbot_pvars->health, 0, &hit, &dmg, 0, 4); if (hit != 1 && ((unsigned char *)moby)[0x20] != 0x63) { - scoutbot_pvars->unk20[0] -= dmg; - if (scoutbot_pvars->unk20[0] <= 0.0f) + scoutbot_pvars->health -= dmg; + if (scoutbot_pvars->health <= 0.0f) hit_reaction_code = 1; if (hit_reaction_code < 12) { if (hit_reaction_code >= 0) { @@ -448,17 +448,17 @@ void update_scoutbot_health_and_target(struct Moby *moby) { 0, path + 0x10, *(int *)path) != 2) { - if (14.0f < vector_distance_xy(&scoutbot_pvars->unk1C0, + if (14.0f < vector_distance_xy(&scoutbot_pvars->home_position, &scoutbot_pvars->tracked_target_position)) { scoutbot_pvars->target_selection_status = SCOUTBOT_TARGET_SELECTION_UNAVAILABLE; - } else if (3.0f < absolute_float(scoutbot_pvars->unk1C0[2] - + } else if (3.0f < absolute_float(scoutbot_pvars->home_position[2] - scoutbot_pvars->tracked_target_position[2])) { scoutbot_pvars->target_selection_status = SCOUTBOT_TARGET_SELECTION_UNAVAILABLE; } } } - if (scoutbot_pvars->unk1B0 == 0) { - scoutbot_pvars->unk1B0 = ((int)hero.moby); + if (scoutbot_pvars->target == 0) { + scoutbot_pvars->target = ((int)hero.moby); } } @@ -601,7 +601,7 @@ void draw_target_beam(struct Moby *moby) { void update_scoutbot_movement(struct Moby *moby) { ScoutbotVars *scoutbot_instance_state = (ScoutbotVars *)moby->pvars; float movement_length = - fast_vec_length((float *)(&scoutbot_instance_state->unk40)) - frame_time_sq * 6.0f; + fast_vec_length((float *)(&scoutbot_instance_state->velocity)) - frame_time_sq * 6.0f; float movement_length_limit = frame_time * 3.0f; float target_height; float vertical_step; @@ -612,17 +612,17 @@ void update_scoutbot_movement(struct Moby *moby) { } else if (movement_length < 0.0f) { movement_length = 0.0f; } - velocity_ptr = (float *)(&scoutbot_instance_state->unk40); + velocity_ptr = (float *)(&scoutbot_instance_state->velocity); fast_vec_normalize(velocity_ptr, velocity_ptr, movement_length); fast_vec_add((float *)&moby->pos, (float *)&moby->pos, velocity_ptr); scoutbot_instance_state->vertical_bob_phase = fast_add_rotations(scoutbot_instance_state->vertical_bob_phase, scoutbot_instance_state->vertical_bob_phase_increment); - target_height = scoutbot_instance_state->unk1C0[2] + + target_height = scoutbot_instance_state->home_position[2] + scoutbot_instance_state->vertical_bob_amplitude * fast_sin(scoutbot_instance_state->vertical_bob_phase); if (scoutbot_instance_state->ground_hover_offset_enabled) - target_height += scoutbot_instance_state->unk200; + target_height += scoutbot_instance_state->hover_height_offset; vertical_step = target_height - moby->pos.z; { float vertical_step_limit = frame_time * 3.0f; @@ -634,7 +634,7 @@ void update_scoutbot_movement(struct Moby *moby) { vertical_step = vertical_step_limit; } } - scoutbot_instance_state->unk40[2] = vertical_step; + scoutbot_instance_state->velocity[2] = vertical_step; qcopy(probe_position_or_correction, (float *)&moby->pos); probe_position_or_correction[2] += 0.5f; if (FUN_L08_002025d0(probe_position_or_correction, 0x190, 0, moby, 0)) { @@ -660,7 +660,7 @@ void *enter_scoutbot_return_home_state(struct Moby *moby) { void *suction_cancel_status = cancel_suck_cannon_suction(moby); ScoutbotVars *scoutbot_data = (ScoutbotVars *)moby->pvars; moby->state = SCOUTBOT_STATE_RETURN_HOME; - scoutbot_data->unk200 = 4.0f; + scoutbot_data->hover_height_offset = 4.0f; scoutbot_data->vertical_bob_amplitude = 0.5f; if ((unsigned char)((char)moby->prev_seq) != 2) { blend_moby_animation(moby, 2, 0, 3); diff --git a/src/overlays/shared/enemies/seeker.c b/src/overlays/shared/enemies/seeker.c index 0c87395e99..9ed268b143 100644 --- a/src/overlays/shared/enemies/seeker.c +++ b/src/overlays/shared/enemies/seeker.c @@ -31,7 +31,7 @@ enum { typedef struct { u8 pad0[0x20]; - f32 unk20; + f32 health; s16 unk24; u8 pad26[2]; u8 unk28; @@ -42,17 +42,17 @@ typedef struct { u8 pad5B[0x15]; Vec4 vel; u8 pad80[0x50]; - s32 unkD0; + s32 move_control; u8 padD4[4]; - f32 unkD8; - f32 unkDC; + f32 move_max_drop; + f32 move_max_climb; u8 padE0[0x14]; f32 speed; u8 padF8[0x68]; struct Moby *target; - s32 unk164; + s32 target_selection_status; u8 pad168[0x18]; - s32 unk180; + s32 bound_path; s32 timer; u8 pad188[4]; f32 heading_speed; @@ -132,20 +132,20 @@ void seeker_update(struct Moby *moby) { } switch (moby->state) { case SEEKER_STATE_INITIALIZE: - seeker_instance_vars->unk20 = 3.0f; + seeker_instance_vars->health = 3.0f; seeker_instance_vars->unk24 = 3; seeker_instance_vars->unk28 = 2; seeker_instance_vars->unk5A = 6; seeker_instance_vars->unk58 = 8; - if (seeker_instance_vars->unk180 == -1) { + if (seeker_instance_vars->bound_path == -1) { debug_print(seeker_invalid_bound_path_format, moby->save_id); mark_moby_for_removal(moby); break; } - FUN_L01_0026d930(&seeker_instance_vars->unkD0); - seeker_instance_vars->unkDC = 0.5f; - seeker_instance_vars->unkD8 = 0.5f; - seeker_instance_vars->unkD0 = truncate_float_to_s32(512.0f); + FUN_L01_0026d930(&seeker_instance_vars->move_control); + seeker_instance_vars->move_max_climb = 0.5f; + seeker_instance_vars->move_max_drop = 0.5f; + seeker_instance_vars->move_control = truncate_float_to_s32(512.0f); seeker_instance_vars->speed = frame_time * 7.75f; moby->state = SEEKER_STATE_IDLE_HOVER; if (moby->prev_seq != 1) { @@ -171,7 +171,7 @@ void seeker_update(struct Moby *moby) { } moby->anim_speed = random_float_between(0.95f, 1.05f); } - if (seeker_instance_vars->unk164 != 2) { + if (seeker_instance_vars->target_selection_status != 2) { if (moby->group != 0xFF) { FUN_L01_0026e090(moby->group, 1); } diff --git a/src/overlays/shared/enemies/sentrybot.c b/src/overlays/shared/enemies/sentrybot.c index 6f56e61d70..bec76d49f1 100644 --- a/src/overlays/shared/enemies/sentrybot.c +++ b/src/overlays/shared/enemies/sentrybot.c @@ -71,9 +71,9 @@ typedef struct SentrybotKnockback { f32 speed_approach_rate; /* 0x14 */ f32 horizontal_speed; /* 0x18 */ f32 vertical_speed; /* 0x1C */ - s32 unk20; - s32 unk24; - f32 unk28; + s32 collision_radius; + s32 motion_flags; + f32 collision_z_offset; u8 pad2C[0x11]; u8 unk3D; u8 pad3E[2]; @@ -94,34 +94,34 @@ typedef struct SentrybotVars { u8 pad68[8]; SentrybotKnockback knockback; /* 0x70 */ u8 padB0[0x10]; - f32 unkC0; - f32 unkC4; + f32 knockback_apex_animation_frame; + f32 knockback_landing_animation_frame; u8 padC8[8]; - f32 unkD0[4]; /* 0xD0: path point FUN_L00_0025ff38 finds */ + f32 path_search_point[4]; /* 0xD0: path point FUN_L00_0025ff38 finds */ u8 padE0[0x20]; - f32 unk100[4]; + f32 aim_point[4]; char *target; /* 0x110 */ s32 target_mode; u8 pad118[8]; s32 path_index; /* 0x120: into D_L15_001B0AB0 */ - s32 unk124; + s32 patrol_path_index; s32 alarm_moby_index; /* 0x128: moby the alarm is set on */ s32 sight_line_ignored_moby_index; /* moby index the sight line ignores */ f32 target_countdown; /* 0x130 */ f32 forward_speed; /* 0x134 */ - f32 unk138[1]; + f32 turn_velocity[1]; s32 patrol_point; /* 0x13C */ u8 pad140[4]; - s32 unk144; + s32 patrol_point_reached; s32 patrol_pause_duration_frames; s32 patrol_pause_timer; - s32 unk150; + s32 linked_moby_index; s16 linked_moby_deactivation_cooldown; s16 alert_timer; /* 0x156: set by alert_visible_group_sentrybots */ s16 target_detected_without_engagement; u8 has_line_of_sight; /* 0x15A: to the hero */ u8 alert_engagement_suppressed; - u8 unk15C; + u8 next_state; u8 pending_animation; u8 saved_alert_engagement_suppression_plus_one; u8 command_alert_transition_started; @@ -364,7 +364,7 @@ void sentrybot_update(unsigned char *moby) { sentrybot_instance_data->home_yaw = MOBY(moby)->rot.z; if (sentrybot_instance_data->patrol_pause_duration_frames < 5) sentrybot_instance_data->patrol_pause_duration_frames = 5; - sentrybot_instance_data->unk144 = 1; + sentrybot_instance_data->patrol_point_reached = 1; MOBY(moby)->state = SENTRYBOT_PATROL_IDLE; MOBY(moby)->flags |= 0x1000; { @@ -401,7 +401,7 @@ void sentrybot_update(unsigned char *moby) { } else { sentrybot_instance_data->command_alert_transition_started = 1; MOBY(moby)->state = SENTRYBOT_WAIT_FOR_TRANSITION_ANIMATION; - sentrybot_instance_data->unk15C = 0x10; + sentrybot_instance_data->next_state = 0x10; sentrybot_instance_data->pending_animation = 3; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); @@ -409,19 +409,19 @@ void sentrybot_update(unsigned char *moby) { } else if (sentrybot_instance_data->alert_timer != 0 && sentrybot_instance_data->alert_engagement_suppressed == 0) { if (sentrybot_instance_data->has_line_of_sight != 0 || - sentrybot_instance_data->unk124 == -1) { + sentrybot_instance_data->patrol_path_index == -1) { begin_sentrybot_turn_toward_point((char *)moby, sentrybot_instance_data, (float *)(target + 0x10), (void *)0x10, (void *)3); } else { - if (sentrybot_instance_data->unk144 != 0) { + if (sentrybot_instance_data->patrol_point_reached != 0) { sentrybot_instance_data->patrol_point = (sentrybot_instance_data->patrol_point + 1) % - *D_L15_001B0AB0[sentrybot_instance_data->unk124]; + *D_L15_001B0AB0[sentrybot_instance_data->patrol_path_index]; } - sentrybot_instance_data->unk144 = 0; + sentrybot_instance_data->patrol_point_reached = 0; MOBY(moby)->command = 1; if (sentrybot_instance_data->command_alert_transition_started != 0) { MOBY(moby)->state = SENTRYBOT_PATROL_MOVE_FAST; @@ -430,7 +430,7 @@ void sentrybot_update(unsigned char *moby) { } else { sentrybot_instance_data->command_alert_transition_started = 1; MOBY(moby)->state = SENTRYBOT_WAIT_FOR_TRANSITION_ANIMATION; - sentrybot_instance_data->unk15C = 0xD; + sentrybot_instance_data->next_state = 0xD; sentrybot_instance_data->pending_animation = 0xE; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); @@ -455,8 +455,8 @@ void sentrybot_update(unsigned char *moby) { (void *)0xA, (void *)0xF); } else if (MOBY(moby)->state == SENTRYBOT_PATROL_IDLE) { - if (sentrybot_instance_data->unk124 != -1) { - if (sentrybot_instance_data->unk144 == 0 || + if (sentrybot_instance_data->patrol_path_index != -1) { + if (sentrybot_instance_data->patrol_point_reached == 0 || can_sentrybot_advance_patrol(moby) != 0) { sentrybot_instance_data->patrol_pause_timer = scale_game_frames(sentrybot_instance_data->patrol_pause_duration_frames); @@ -464,32 +464,32 @@ void sentrybot_update(unsigned char *moby) { } } else if (sentrybot_instance_data->target_detected_without_engagement != 0 && hero.state.current == 0x59) { - if (sentrybot_instance_data->unk150 != -1 || + if (sentrybot_instance_data->linked_moby_index != -1 || sentrybot_instance_data->sight_line_ignored_moby_index != -1 || (sentrybot_instance_data->linked_moby_deactivation_cooldown == 0 && random_integer_below(0x78) == 0)) { sentrybot_instance_data->pending_animation = 0; - sentrybot_instance_data->unk15C = 2; + sentrybot_instance_data->next_state = 2; MOBY(moby)->state = SENTRYBOT_DEACTIVATE_LINKED_MOBYS_AFTER_ANIMATION; if (MOBY(moby)->prev_seq != 2) blend_moby_animation(moby, 2, 0, scale_game_frames(10)); } - } else if (sentrybot_instance_data->unk124 == -1) { + } else if (sentrybot_instance_data->patrol_path_index == -1) { begin_sentrybot_turn_toward_heading( moby, sentrybot_instance_data, 2, 0, sentrybot_instance_data->home_yaw); } } else if (MOBY(moby)->state == SENTRYBOT_PATROL_PAUSE) { if (fast_dec_timer(&sentrybot_instance_data->patrol_pause_timer) != 0) { - if (sentrybot_instance_data->unk144 != 0) { + if (sentrybot_instance_data->patrol_point_reached != 0) { sentrybot_instance_data->patrol_point = (sentrybot_instance_data->patrol_point + 1) % - *D_L15_001B0AB0[sentrybot_instance_data->unk124]; + *D_L15_001B0AB0[sentrybot_instance_data->patrol_path_index]; } - sentrybot_instance_data->unk144 = 0; + sentrybot_instance_data->patrol_point_reached = 0; begin_sentrybot_turn_toward_point( (char *)moby, sentrybot_instance_data, - (float *)((char *)D_L15_001B0AB0[sentrybot_instance_data->unk124] + + (float *)((char *)D_L15_001B0AB0[sentrybot_instance_data->patrol_path_index] + (sentrybot_instance_data->patrol_point * 0x10 + 0x10)), (void *)4, (void *)0xD); @@ -507,7 +507,7 @@ void sentrybot_update(unsigned char *moby) { } else { sentrybot_instance_data->command_alert_transition_started = 1; MOBY(moby)->state = SENTRYBOT_WAIT_FOR_TRANSITION_ANIMATION; - sentrybot_instance_data->unk15C = 0x10; + sentrybot_instance_data->next_state = 0x10; sentrybot_instance_data->pending_animation = 3; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); @@ -523,10 +523,10 @@ void sentrybot_update(unsigned char *moby) { case SENTRYBOT_DEACTIVATE_LINKED_MOBYS_AFTER_ANIMATION: if (MOBY(moby)->anim_flags & 2) { sentrybot_instance_data->linked_moby_deactivation_cooldown = scale_game_frames(0xF0); - if (sentrybot_instance_data->unk150 != -1) { - mark_moby_killed_and_release_owned_voice((int)l15_moby_array + - (sentrybot_instance_data->unk150 << 8)); - sentrybot_instance_data->unk150 = -1; + if (sentrybot_instance_data->linked_moby_index != -1) { + mark_moby_killed_and_release_owned_voice( + (int)l15_moby_array + (sentrybot_instance_data->linked_moby_index << 8)); + sentrybot_instance_data->linked_moby_index = -1; } if (sentrybot_instance_data->sight_line_ignored_moby_index != -1) { mark_moby_killed_and_release_owned_voice( @@ -534,7 +534,7 @@ void sentrybot_update(unsigned char *moby) { (sentrybot_instance_data->sight_line_ignored_moby_index << 8)); sentrybot_instance_data->sight_line_ignored_moby_index = -1; } - MOBY(moby)->state = sentrybot_instance_data->unk15C; + MOBY(moby)->state = sentrybot_instance_data->next_state; switch (MOBY(moby)->state) { case SENTRYBOT_PATROL_IDLE: if (MOBY(moby)->prev_seq != 0) @@ -554,8 +554,9 @@ void sentrybot_update(unsigned char *moby) { SENTRYBOT_TARGET_MODE_SUPPRESS_DIRECT_EMISSION && fast_difference_between_rotations( MOBY(moby)->rot.z, - fast_arc_tan(sentrybot_instance_data->unkD0[0] - MOBY(moby)->pos.x, - sentrybot_instance_data->unkD0[1] - MOBY(moby)->pos.y)) < 0.5235988f) { + fast_arc_tan(sentrybot_instance_data->path_search_point[0] - MOBY(moby)->pos.x, + sentrybot_instance_data->path_search_point[1] - MOBY(moby)->pos.y)) < + 0.5235988f) { MOBY(moby)->command = 1; if (sentrybot_instance_data->command_alert_transition_started != 0) { MOBY(moby)->state = SENTRYBOT_WAIT_FOR_ANIMATION_THEN_EMIT_WITH_NEGATIVE_JOINT_AIM; @@ -564,7 +565,7 @@ void sentrybot_update(unsigned char *moby) { } else { sentrybot_instance_data->command_alert_transition_started = 1; MOBY(moby)->state = SENTRYBOT_WAIT_FOR_TRANSITION_ANIMATION; - sentrybot_instance_data->unk15C = 0x10; + sentrybot_instance_data->next_state = 0x10; sentrybot_instance_data->pending_animation = 3; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); @@ -590,7 +591,7 @@ void sentrybot_update(unsigned char *moby) { fast_add_rotations(sentrybot_instance_data->turn_start_yaw, turn_heading_offsets_degrees[k] * DEG_TO_RAD); } - MOBY(moby)->state = sentrybot_instance_data->unk15C; + MOBY(moby)->state = sentrybot_instance_data->next_state; if (MOBY(moby)->prev_seq != sentrybot_instance_data->pending_animation) blend_moby_animation( moby, sentrybot_instance_data->pending_animation, 0, scale_game_frames(10)); @@ -611,11 +612,11 @@ void sentrybot_update(unsigned char *moby) { float sp = frame_time * 2.0f; if (move_sentrybot_toward_point( (char *)moby, - (float *)((char *)D_L15_001B0AB0[sentrybot_instance_data->unk124] + + (float *)((char *)D_L15_001B0AB0[sentrybot_instance_data->patrol_path_index] + (sentrybot_instance_data->patrol_point * 0x10 + 0x10)), sp)) { MOBY(moby)->state = SENTRYBOT_PATROL_IDLE; - sentrybot_instance_data->unk144 = 1; + sentrybot_instance_data->patrol_point_reached = 1; if (MOBY(moby)->prev_seq != 0) blend_moby_animation(moby, 0, 0, scale_game_frames(10)); } else if (sentrybot_instance_data->target_mode != @@ -628,7 +629,7 @@ void sentrybot_update(unsigned char *moby) { } else { sentrybot_instance_data->command_alert_transition_started = 1; MOBY(moby)->state = SENTRYBOT_WAIT_FOR_TRANSITION_ANIMATION; - sentrybot_instance_data->unk15C = 0x10; + sentrybot_instance_data->next_state = 0x10; sentrybot_instance_data->pending_animation = 3; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); @@ -651,7 +652,7 @@ void sentrybot_update(unsigned char *moby) { } else { sentrybot_instance_data->command_alert_transition_started = 1; MOBY(moby)->state = SENTRYBOT_WAIT_FOR_TRANSITION_ANIMATION; - sentrybot_instance_data->unk15C = 0xD; + sentrybot_instance_data->next_state = 0xD; sentrybot_instance_data->pending_animation = 0xE; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); @@ -666,10 +667,10 @@ void sentrybot_update(unsigned char *moby) { (void *)0xF); } else if (sentrybot_instance_data->target_detected_without_engagement != 0 && hero.state.current == 0x59) { - if (sentrybot_instance_data->unk150 != -1 || + if (sentrybot_instance_data->linked_moby_index != -1 || sentrybot_instance_data->sight_line_ignored_moby_index != -1 || sentrybot_instance_data->linked_moby_deactivation_cooldown == 0) { - sentrybot_instance_data->unk15C = MOBY(moby)->state; + sentrybot_instance_data->next_state = MOBY(moby)->state; sentrybot_instance_data->pending_animation = 0xD; MOBY(moby)->state = SENTRYBOT_DEACTIVATE_LINKED_MOBYS_AFTER_ANIMATION; if (MOBY(moby)->prev_seq != 2) @@ -693,11 +694,11 @@ void sentrybot_update(unsigned char *moby) { float sp = frame_time * 3.5f; if (move_sentrybot_toward_point( (char *)moby, - (float *)((char *)D_L15_001B0AB0[sentrybot_instance_data->unk124] + + (float *)((char *)D_L15_001B0AB0[sentrybot_instance_data->patrol_path_index] + (sentrybot_instance_data->patrol_point * 0x10 + 0x10)), sp)) { MOBY(moby)->state = SENTRYBOT_ALERT_IDLE; - sentrybot_instance_data->unk144 = 1; + sentrybot_instance_data->patrol_point_reached = 1; if (MOBY(moby)->prev_seq != 0) blend_moby_animation(moby, 0, 0, scale_game_frames(10)); } else if (sentrybot_instance_data->target_mode != @@ -711,7 +712,7 @@ void sentrybot_update(unsigned char *moby) { } else { sentrybot_instance_data->command_alert_transition_started = 1; MOBY(moby)->state = SENTRYBOT_WAIT_FOR_TRANSITION_ANIMATION; - sentrybot_instance_data->unk15C = 0x10; + sentrybot_instance_data->next_state = 0x10; sentrybot_instance_data->pending_animation = 3; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); @@ -736,13 +737,13 @@ void sentrybot_update(unsigned char *moby) { unsigned char *home = &sentrybot_instance_data->home_pos; if (fast_vec_dist(&MOBY(moby)->pos, home) > 0.2f) { move_sentrybot_toward_point((char *)moby, (float *)home, frame_time * 2.0f); - } else if (sentrybot_instance_data->unk124 != -1) { + } else if (sentrybot_instance_data->patrol_path_index != -1) { MOBY(moby)->command = 0; - sentrybot_instance_data->unk144 = 0; + sentrybot_instance_data->patrol_point_reached = 0; begin_sentrybot_turn_toward_point( (char *)moby, sentrybot_instance_data, - (float *)((char *)D_L15_001B0AB0[sentrybot_instance_data->unk124] + + (float *)((char *)D_L15_001B0AB0[sentrybot_instance_data->patrol_path_index] + (sentrybot_instance_data->patrol_point * 0x10 + 0x10)), (void *)2, (void *)0); @@ -758,12 +759,12 @@ void sentrybot_update(unsigned char *moby) { move_sentrybot_toward_point((char *)moby, (float *)home, frame_time * 3.0f); } else if (sentrybot_instance_data->alert_timer == 0) { MOBY(moby)->command = 0; - sentrybot_instance_data->unk144 = 0; - if (sentrybot_instance_data->unk124 != -1) { + sentrybot_instance_data->patrol_point_reached = 0; + if (sentrybot_instance_data->patrol_path_index != -1) { begin_sentrybot_turn_toward_point( (char *)moby, sentrybot_instance_data, - (float *)((char *)D_L15_001B0AB0[sentrybot_instance_data->unk124] + + (float *)((char *)D_L15_001B0AB0[sentrybot_instance_data->patrol_path_index] + (sentrybot_instance_data->patrol_point * 0x10 + 0x10)), (void *)2, (void *)0); @@ -773,15 +774,17 @@ void sentrybot_update(unsigned char *moby) { } } else if (fast_difference_between_rotations( MOBY(moby)->rot.z, - fast_arc_tan(sentrybot_instance_data->unkD0[0] - MOBY(moby)->pos.x, - sentrybot_instance_data->unkD0[1] - MOBY(moby)->pos.y)) > + fast_arc_tan( + sentrybot_instance_data->path_search_point[0] - MOBY(moby)->pos.x, + sentrybot_instance_data->path_search_point[1] - MOBY(moby)->pos.y)) > 0.7853982f && sentrybot_instance_data->alert_engagement_suppressed == 0) { - begin_sentrybot_turn_toward_point((char *)moby, - sentrybot_instance_data, - (float *)(&sentrybot_instance_data->unkD0), - (void *)0x10, - (void *)3); + begin_sentrybot_turn_toward_point( + (char *)moby, + sentrybot_instance_data, + (float *)(&sentrybot_instance_data->path_search_point), + (void *)0x10, + (void *)3); } else { MOBY(moby)->state = SENTRYBOT_ALERT_IDLE; if (MOBY(moby)->prev_seq != 0) @@ -811,15 +814,15 @@ void sentrybot_update(unsigned char *moby) { MOBY(moby)->state = SENTRYBOT_APPROACH_LINKED_MOBY; if (MOBY(moby)->prev_seq != 0xE) blend_moby_animation(moby, 0xE, 0, scale_game_frames(0x14)); - } else if (sentrybot_instance_data->unk15C == 0x10) { + } else if (sentrybot_instance_data->next_state == 0x10) { begin_sentrybot_turn_toward_point((char *)moby, sentrybot_instance_data, (float *)(target + 0x10), (void *)0x10, (void *)3); } else { - if (sentrybot_instance_data->unk15C != 0xFF) - MOBY(moby)->state = sentrybot_instance_data->unk15C; + if (sentrybot_instance_data->next_state != 0xFF) + MOBY(moby)->state = sentrybot_instance_data->next_state; if (sentrybot_instance_data->pending_animation != 0xFF && MOBY(moby)->prev_seq != sentrybot_instance_data->pending_animation) blend_moby_animation(moby, @@ -911,7 +914,7 @@ void sentrybot_update(unsigned char *moby) { fast_vec_normalize(va, selected_joint_world_matrix[1], sentrybot_emission_vector_speed_gp * frame_time); - fast_vec_sub(vb, &sentrybot_instance_data->unk100, emission_origin); + fast_vec_sub(vb, &sentrybot_instance_data->aim_point, emission_origin); fast_vec_normalize(vb, vb, sentrybot_emission_vector_speed_gp * frame_time); if (fast_difference_between_rotations(fast_arc_tan(va[0], va[1]), fast_arc_tan(vb[0], vb[1])) > 0.7853982f || @@ -921,12 +924,12 @@ void sentrybot_update(unsigned char *moby) { spawn_sentrybot_projectile((char *)moby, va, (char *)emission_origin, - (char *)(&sentrybot_instance_data->unk100)); + (char *)(&sentrybot_instance_data->aim_point)); } else { spawn_sentrybot_projectile((char *)moby, vb, (char *)emission_origin, - (char *)(&sentrybot_instance_data->unk100)); + (char *)(&sentrybot_instance_data->aim_point)); } sentrybot_instance_data->projectile_emitted_this_animation = 1; } @@ -948,14 +951,16 @@ void sentrybot_update(unsigned char *moby) { blend_moby_animation(moby, 0xE, 0, scale_game_frames(0x14)); } else if (fast_difference_between_rotations( MOBY(moby)->rot.z, - fast_arc_tan(sentrybot_instance_data->unkD0[0] - MOBY(moby)->pos.x, - sentrybot_instance_data->unkD0[1] - MOBY(moby)->pos.y)) > + fast_arc_tan( + sentrybot_instance_data->path_search_point[0] - MOBY(moby)->pos.x, + sentrybot_instance_data->path_search_point[1] - MOBY(moby)->pos.y)) > 0.7853982f) { - begin_sentrybot_turn_toward_point((char *)moby, - sentrybot_instance_data, - (float *)(&sentrybot_instance_data->unkD0), - (void *)0x10, - (void *)3); + begin_sentrybot_turn_toward_point( + (char *)moby, + sentrybot_instance_data, + (float *)(&sentrybot_instance_data->path_search_point), + (void *)0x10, + (void *)3); } else if (sentrybot_instance_data->target_mode == SENTRYBOT_TARGET_MODE_SUPPRESS_DIRECT_EMISSION) { MOBY(moby)->state = SENTRYBOT_ALERT_IDLE; @@ -982,7 +987,7 @@ void sentrybot_update(unsigned char *moby) { fast_vec_normalize(va, selected_joint_world_matrix[1], -(sentrybot_emission_vector_speed_gp * frame_time)); - fast_vec_sub(vb, &sentrybot_instance_data->unk100, emission_origin); + fast_vec_sub(vb, &sentrybot_instance_data->aim_point, emission_origin); fast_vec_normalize(vb, vb, sentrybot_emission_vector_speed_gp * frame_time); if (fast_difference_between_rotations(fast_arc_tan(va[0], va[1]), fast_arc_tan(vb[0], vb[1])) > 0.7853982f || @@ -992,12 +997,12 @@ void sentrybot_update(unsigned char *moby) { spawn_sentrybot_projectile((char *)moby, va, (char *)emission_origin, - (char *)(&sentrybot_instance_data->unk100)); + (char *)(&sentrybot_instance_data->aim_point)); } else { spawn_sentrybot_projectile((char *)moby, vb, (char *)emission_origin, - (char *)(&sentrybot_instance_data->unk100)); + (char *)(&sentrybot_instance_data->aim_point)); } sentrybot_instance_data->projectile_emitted_this_animation = 1; } @@ -1019,14 +1024,16 @@ void sentrybot_update(unsigned char *moby) { blend_moby_animation(moby, 0xE, 0, scale_game_frames(0x14)); } else if (fast_difference_between_rotations( MOBY(moby)->rot.z, - fast_arc_tan(sentrybot_instance_data->unkD0[0] - MOBY(moby)->pos.x, - sentrybot_instance_data->unkD0[1] - MOBY(moby)->pos.y)) > + fast_arc_tan( + sentrybot_instance_data->path_search_point[0] - MOBY(moby)->pos.x, + sentrybot_instance_data->path_search_point[1] - MOBY(moby)->pos.y)) > 0.7853982f) { - begin_sentrybot_turn_toward_point((char *)moby, - sentrybot_instance_data, - (float *)(&sentrybot_instance_data->unkD0), - (void *)0x12, - (void *)5); + begin_sentrybot_turn_toward_point( + (char *)moby, + sentrybot_instance_data, + (float *)(&sentrybot_instance_data->path_search_point), + (void *)0x12, + (void *)5); } else if (sentrybot_instance_data->target_mode == SENTRYBOT_TARGET_MODE_SUPPRESS_DIRECT_EMISSION) { MOBY(moby)->state = SENTRYBOT_ALERT_IDLE; @@ -1056,11 +1063,12 @@ void sentrybot_update(unsigned char *moby) { int mode = sentrybot_instance_data->target_mode; if (mode != SENTRYBOT_TARGET_MODE_SUPPRESS_DIRECT_EMISSION && sentrybot_instance_data->alert_engagement_suppressed == 0) { - begin_sentrybot_turn_toward_point((char *)moby, - sentrybot_instance_data, - (float *)(&sentrybot_instance_data->unkD0), - (void *)0x10, - (void *)3); + begin_sentrybot_turn_toward_point( + (char *)moby, + sentrybot_instance_data, + (float *)(&sentrybot_instance_data->path_search_point), + (void *)0x10, + (void *)3); } else if (sentrybot_instance_data->alert_timer == 0) { MOBY(moby)->state = SENTRYBOT_RETURN_HOME; if (MOBY(moby)->prev_seq != 0xD) @@ -1087,13 +1095,13 @@ void sentrybot_update(unsigned char *moby) { (void *)0xC, (void *)0); } - } else if (sentrybot_instance_data->unk124 != -1) { - if (sentrybot_instance_data->unk144 != 0) { + } else if (sentrybot_instance_data->patrol_path_index != -1) { + if (sentrybot_instance_data->patrol_point_reached != 0) { sentrybot_instance_data->patrol_point = (sentrybot_instance_data->patrol_point + 1) % - *D_L15_001B0AB0[sentrybot_instance_data->unk124]; + *D_L15_001B0AB0[sentrybot_instance_data->patrol_path_index]; } - sentrybot_instance_data->unk144 = 0; + sentrybot_instance_data->patrol_point_reached = 0; sentrybot_instance_data->patrol_pause_timer = scale_game_frames(0x3C); MOBY(moby)->command = 1; if (sentrybot_instance_data->command_alert_transition_started != 0) { @@ -1103,7 +1111,7 @@ void sentrybot_update(unsigned char *moby) { } else { sentrybot_instance_data->command_alert_transition_started = 1; MOBY(moby)->state = SENTRYBOT_WAIT_FOR_TRANSITION_ANIMATION; - sentrybot_instance_data->unk15C = 0xD; + sentrybot_instance_data->next_state = 0xD; sentrybot_instance_data->pending_animation = 0xE; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); @@ -1131,7 +1139,7 @@ void sentrybot_update(unsigned char *moby) { } else { sentrybot_instance_data->command_alert_transition_started = 1; MOBY(moby)->state = SENTRYBOT_WAIT_FOR_TRANSITION_ANIMATION; - sentrybot_instance_data->unk15C = 0x10; + sentrybot_instance_data->next_state = 0x10; sentrybot_instance_data->pending_animation = 3; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); @@ -1145,10 +1153,10 @@ void sentrybot_update(unsigned char *moby) { (sentrybot_instance_data->sight_line_ignored_moby_index << 8)); sentrybot_instance_data->sight_line_ignored_moby_index = -1; } - if (sentrybot_instance_data->unk150 != -1) { - mark_moby_killed_and_release_owned_voice((int)l15_moby_array + - (sentrybot_instance_data->unk150 << 8)); - sentrybot_instance_data->unk150 = -1; + if (sentrybot_instance_data->linked_moby_index != -1) { + mark_moby_killed_and_release_owned_voice( + (int)l15_moby_array + (sentrybot_instance_data->linked_moby_index << 8)); + sentrybot_instance_data->linked_moby_index = -1; } allocate_voice_for_target_entry(0xD, 0, (int)moby); cart_burst(moby, &MOBY(moby)->pos, -1, 0.5f, 13.0f); @@ -1169,10 +1177,10 @@ void sentrybot_update(unsigned char *moby) { (sentrybot_instance_data->sight_line_ignored_moby_index << 8)); sentrybot_instance_data->sight_line_ignored_moby_index = -1; } - if (sentrybot_instance_data->unk150 != -1) { - mark_moby_killed_and_release_owned_voice((int)l15_moby_array + - (sentrybot_instance_data->unk150 << 8)); - sentrybot_instance_data->unk150 = -1; + if (sentrybot_instance_data->linked_moby_index != -1) { + mark_moby_killed_and_release_owned_voice( + (int)l15_moby_array + (sentrybot_instance_data->linked_moby_index << 8)); + sentrybot_instance_data->linked_moby_index = -1; } allocate_voice_for_target_entry(0xD, 0, (int)moby); cart_burst(moby, &MOBY(moby)->pos, -1, 0.5f, 13.0f); @@ -1249,11 +1257,11 @@ int begin_sentrybot_turn_toward_heading( float heading_delta = -fast_subtract_rotations(MOBY(moby)->rot.z, angle); float stored_heading_delta; int turn_required = 1; - moby_data->unk144 = 0; + moby_data->patrol_point_reached = 0; moby_data->turn_start_yaw = MOBY(moby)->rot.z; moby_data->turn_target_yaw = angle; moby_data->turn_delta = heading_delta; - moby_data->unk15C = next_state; + moby_data->next_state = next_state; moby_data->pending_animation = next_animation; if (heading_delta > 2.0943952f || heading_delta < -2.0943952f) { MOBY(moby)->state = SENTRYBOT_TURN_AROUND; @@ -1308,7 +1316,7 @@ int move_sentrybot_toward_point(char *moby, float *point, float target_forward_s float movement_target_heading; target_heading = fast_arc_tan(point[0] - MOBY(moby)->pos.x, point[1] - MOBY(moby)->pos.y); approach_angle(fp, - (float *)(&moby_data->unk138), + (float *)(&moby_data->turn_velocity), target_heading, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, @@ -1437,7 +1445,8 @@ int can_sentrybot_advance_patrol(void *input_moby) { MOBY(listed_moby)->state != 0xFE && MOBY(listed_moby)->state != 0xFD && MOBY(listed_moby)->command == 0) { SentrybotVars *od = (SentrybotVars *)MOBY(listed_moby)->pvars; - if (od->unk144 == 0 && od->unk124 != -1 && od->patrol_point >= moby_data->patrol_point) + if (od->patrol_point_reached == 0 && od->patrol_path_index != -1 && + od->patrol_point >= moby_data->patrol_point) return 0; } } while ((short)*group_moby_entry++ >= 0); @@ -1520,7 +1529,7 @@ void update_sentrybot_joint_aim(void *mv) { qcopy(target_position, moby_data->attention_source + 0x10); have = 1; } else if (((unsigned char *)moby_data)[0x19F] != 0) { - qcopy(target_position, &moby_data->unk100); + qcopy(target_position, &moby_data->aim_point); have = 1; } if (have) { @@ -1626,9 +1635,9 @@ void update_sentrybot_hit_response_and_target_visibility(void *sentrybot_moby, i code = 1; amount = truncate_float_to_s32(512.0f); speed = sentrybot_knockback_gravity_gp * frame_time_sq; - sentrybot_data->knockback.unk20 = amount; - sentrybot_data->knockback.unk28 = 0.5f; - sentrybot_data->knockback.unk24 = 9; + sentrybot_data->knockback.collision_radius = amount; + sentrybot_data->knockback.collision_z_offset = 0.5f; + sentrybot_data->knockback.motion_flags = 9; sentrybot_data->knockback.gravity = speed; sentrybot_data->knockback.unk3D = 0; switch (code) { @@ -1662,8 +1671,8 @@ void update_sentrybot_hit_response_and_target_visibility(void *sentrybot_moby, i sentrybot_data->knockback.horizontal_speed = forward; sentrybot_data->knockback.vertical_speed = lateral; sentrybot_data->knockback.speed_approach_rate = vz; - sentrybot_data->unkC0 = 5.0f; - sentrybot_data->unkC4 = 10.0f; + sentrybot_data->knockback_apex_animation_frame = 5.0f; + sentrybot_data->knockback_landing_animation_frame = 10.0f; } { float heading = @@ -1701,8 +1710,8 @@ void update_sentrybot_hit_response_and_target_visibility(void *sentrybot_moby, i sentrybot_data->knockback.horizontal_speed = forward; sentrybot_data->knockback.vertical_speed = lateral; sentrybot_data->knockback.speed_approach_rate = vz; - sentrybot_data->unkC0 = 8.0f; - sentrybot_data->unkC4 = 16.0f; + sentrybot_data->knockback_apex_animation_frame = 8.0f; + sentrybot_data->knockback_landing_animation_frame = 16.0f; } { float heading = @@ -1748,14 +1757,15 @@ void update_sentrybot_hit_response_and_target_visibility(void *sentrybot_moby, i sentrybot_data->has_line_of_sight = 0; } path = D_L15_001B0AB0[sentrybot_data->path_index]; - if (FUN_L00_0025ff38(moby, &sentrybot_data->unkD0, 128.0f, 0, 0, path + 4, *path) != 2) { + if (FUN_L00_0025ff38(moby, &sentrybot_data->path_search_point, 128.0f, 0, 0, path + 4, *path) != + 2) { float target_angle; seen = 0; - target_angle = fast_arc_tan(sentrybot_data->unkD0[0] - MOBY(moby)->pos.x, - sentrybot_data->unkD0[1] - MOBY(moby)->pos.y); + target_angle = fast_arc_tan(sentrybot_data->path_search_point[0] - MOBY(moby)->pos.x, + sentrybot_data->path_search_point[1] - MOBY(moby)->pos.y); if ((fast_difference_between_rotations(MOBY(moby)->rot.z, target_angle) < 1.5707964f && (sentrybot_target_visibility_height_check_gate[0] == 0 || - absolute_float(MOBY(moby)->pos.z - sentrybot_data->unkD0[2]) < 4.0f)) || + absolute_float(MOBY(moby)->pos.z - sentrybot_data->path_search_point[2]) < 4.0f)) || MOBY(moby)->state == SENTRYBOT_WAIT_FOR_ANIMATION_THEN_EMIT_WITH_NEGATIVE_JOINT_AIM || MOBY(moby)->state == SENTRYBOT_EMIT_WITH_NEGATIVE_JOINT_AIM) { seen = sentrybot_data->has_line_of_sight; diff --git a/src/overlays/shared/enemies/spawner.c b/src/overlays/shared/enemies/spawner.c index 76cc6b4d74..28132b0086 100644 --- a/src/overlays/shared/enemies/spawner.c +++ b/src/overlays/shared/enemies/spawner.c @@ -34,16 +34,16 @@ typedef struct SpawnerVars { s8 unk67; u8 pad68[0x8]; u8 unk70[0x10]; - f32 unk80; - s32 unk84; - s32 unk88; - s16 unk8C; - s16 unk8E; - s8 unk90; - s8 unk91; - u8 unk92; - s8 unk93; - s32 unk94; + f32 target_search_radius; + s32 excluded_moby; + s32 region_path_index; + s16 spawn_interval_frames; + s16 spawn_timer; + s8 max_spawn_count; + s8 spawn_count; + u8 pick_region_nearest_hero; + s8 egg_grows_held_moby; + s32 cleared_moby_group; u8 pad98[0x18]; char *slots[4]; } SpawnerVars; @@ -158,7 +158,8 @@ void spawner_update(char *moby) { switch ((unsigned char)MOBY(moby)->state) { case SPAWNER_STATE_INITIALIZE: { int moby_to_remove = 0; - while (get_first_moby_in_group(&moby_to_remove, spawner_vars->unk94, 0, 0) == 0) { + while (get_first_moby_in_group(&moby_to_remove, spawner_vars->cleared_moby_group, 0, 0) == + 0) { mark_moby_for_removal((void *)moby_to_remove); } MOBY(moby)->state = SPAWNER_STATE_SPAWN; @@ -166,25 +167,25 @@ void spawner_update(char *moby) { } case SPAWNER_STATE_SPAWN: { process_spawner_hit_record(moby, spawner_vars); - if (!fast_dec_timer_s16(&spawner_vars->unk8E)) + if (!fast_dec_timer_s16(&spawner_vars->spawn_timer)) return; if (random_integer_below(7) == 0) { char *excluded = 0; int excluded_count = 0; char *region = 0; int region_count = 0; - if (spawner_vars->unk84 != -1) { - excluded = &spawner_vars->unk84; + if (spawner_vars->excluded_moby != -1) { + excluded = &spawner_vars->excluded_moby; excluded_count = 1; } - if (spawner_vars->unk88 != -1) { - char *q = ((char *)l09_paths[spawner_vars->unk88]); + if (spawner_vars->region_path_index != -1) { + char *q = ((char *)l09_paths[spawner_vars->region_path_index]); region_count = *(int *)q; region = q + 0x10; } activate_effect_l08(moby, (char *)spawner_vars + 0x100, - spawner_vars->unk80, + spawner_vars->target_search_radius, excluded, excluded_count, region, @@ -205,12 +206,13 @@ void spawner_update(char *moby) { { int last = refresh_spawner_population_and_find_free_slot((int)moby, spawner_vars); char *sel; - if ((unsigned char)spawner_vars->unk91 >= (unsigned char)spawner_vars->unk90) + if ((unsigned char)spawner_vars->spawn_count >= + (unsigned char)spawner_vars->max_spawn_count) return; if (last == -1) return; sel = 0; - if (spawner_vars->unk92 != 0) { + if (spawner_vars->pick_region_nearest_hero != 0) { int i; float best = 100000.0f; for (i = 0; i < 4; i++) { @@ -227,7 +229,7 @@ void spawner_update(char *moby) { if (sel == 0) { fast_vec_sub(target, (char *)spawner_vars + 0x100, &MOBY(moby)->pos); fast_vec_scale(target, target, 0.5f); - if (3.0f < spawner_vars->unk80) + if (3.0f < spawner_vars->target_search_radius) clamp_vector_length(target, target, 3.0f); if (fast_vec_length(target) < 3.0f) fast_vec_normalize(target, target, 3.0f); @@ -247,7 +249,7 @@ void spawner_update(char *moby) { } } if (sel == 0) { - float target_offset_scale = spawner_vars->unk80; + float target_offset_scale = spawner_vars->target_search_radius; if (target_offset_scale < 3.0f) target_offset_scale = 3.0f; generate_random_scaled_vector2(target, target_offset_scale); @@ -279,13 +281,14 @@ void spawner_update(char *moby) { launch_velocity[2] = FUN_L00_0025abf0_30ab80( spawn_position, target, 0, speed, -(frame_time_sq_macro * 9.8f)); } - spawner_vars->slots[last] = spawn_spawner_egg((int)moby, - spawn_position, - launch_velocity, - (unsigned char)spawner_vars->unk93, - (unsigned char)last); - spawner_vars->unk8E = scale_game_frames(spawner_vars->unk8C); - spawner_vars->unk91 = (char)(spawner_vars->unk91 + 1); + spawner_vars->slots[last] = + spawn_spawner_egg((int)moby, + spawn_position, + launch_velocity, + (unsigned char)spawner_vars->egg_grows_held_moby, + (unsigned char)last); + spawner_vars->spawn_timer = scale_game_frames(spawner_vars->spawn_interval_frames); + spawner_vars->spawn_count = (char)(spawner_vars->spawn_count + 1); } return; } diff --git a/src/overlays/shared/enemies/spawner_egg.c b/src/overlays/shared/enemies/spawner_egg.c index c8c46460d2..3e01308df9 100644 --- a/src/overlays/shared/enemies/spawner_egg.c +++ b/src/overlays/shared/enemies/spawner_egg.c @@ -29,7 +29,7 @@ typedef struct { struct Moby *owner; /* 0x10: class 0x75D spawner; its pvars hold the bubble list at 0xB0 */ struct Moby *held; /* 0x14: from FUN_L09_0030a778 when the bubble settles */ s16 life; /* 0x18 */ - u8 unk1A; + u8 grow_held_moby; u8 sound_delay; /* 0x1B */ u8 slot; /* 0x1C: index in the owner's bubble list */ } BubbleVars; @@ -284,7 +284,7 @@ void spawner_egg_update(struct Moby *moby) { case SPAWNER_EGG_STATE_SHRINKING: rate = frame_scale * 0.05f; moby->scale -= moby->scale * rate; - if (bubble_vars->held != NULL && bubble_vars->unk1A != 0) { + if (bubble_vars->held != NULL && bubble_vars->grow_held_moby != 0) { bubble_vars->held->scale += (bubble_vars->held->pclass->scale - bubble_vars->held->scale) * rate; } @@ -292,7 +292,7 @@ void spawner_egg_update(struct Moby *moby) { moby->scale = 0.0001f; held = bubble_vars->held; if (held == NULL || held->state == 0xFE || held->state == 0xFD || - bubble_vars->unk1A == 0 || held->pclass->scale - 0.01f <= held->scale) { + bubble_vars->grow_held_moby == 0 || held->pclass->scale - 0.01f <= held->scale) { remove_spawner_egg(moby, (char *)bubble_vars); } } diff --git a/src/overlays/shared/enemies/spiderbot.c b/src/overlays/shared/enemies/spiderbot.c index 15fa0a460a..d3baa3e342 100644 --- a/src/overlays/shared/enemies/spiderbot.c +++ b/src/overlays/shared/enemies/spiderbot.c @@ -18,12 +18,12 @@ typedef struct SpiderbotVars { u8 pad0[0x10]; - u8 unk10[0x10]; - s32 unk20; - f32 unk24; - f32 unk28; - f32 unk2C; - f32 unk30; + u8 beam_end_position[0x10]; + s32 motion_mode; + f32 radius; + f32 phase; + f32 axis_yaw; + f32 speed; } SpiderbotVars; typedef int u128_2A8090 __attribute__((mode(TI))); @@ -93,36 +93,36 @@ void spiderbot_update(unsigned char *moby) { switch (MOBY(moby)->state) { case SPIDERBOT_INITIALIZE: *(u128_2A8090 *)moby_data = *(u128_2A8090 *)previous_moby_position; - MOBY(moby)->anim_speed = moby_data->unk30 / 1.5f; - moby_data->unk28 = moby_data->unk28 * 0.017453292f; - if (moby_data->unk20 == 0) { + MOBY(moby)->anim_speed = moby_data->speed / 1.5f; + moby_data->phase = moby_data->phase * 0.017453292f; + if (moby_data->motion_mode == 0) { MOBY(moby)->state = SPIDERBOT_CIRCULAR_MOTION; - moby_data->unk2C = MOBY(moby)->rot.z; - } else if (moby_data->unk20 >= 3) { + moby_data->axis_yaw = MOBY(moby)->rot.z; + } else if (moby_data->motion_mode >= 3) { MOBY(moby)->state = SPIDERBOT_ARC_OSCILLATION; - moby_data->unk2C = MOBY(moby)->rot.z; + moby_data->axis_yaw = MOBY(moby)->rot.z; } else { MOBY(moby)->state = SPIDERBOT_LINEAR_OSCILLATION; } break; case SPIDERBOT_CIRCULAR_MOTION: { *(u128_2A8090 *)C = 0; - C[2] = moby_data->unk24; + C[2] = moby_data->radius; *(u128_2A8090 *)D = 0; *(u128_2A8090 *)B = *(u128_2A8090 *)C; - moby_data->unk28 = - fast_add_rotations(moby_data->unk28, - 360.0f / (moby_data->unk24 * 6.2831855f / moby_data->unk30) * + moby_data->phase = + fast_add_rotations(moby_data->phase, + 360.0f / (moby_data->radius * 6.2831855f / moby_data->speed) * 0.017453292f * D_0015ED6C); - MOBY(moby)->anim_speed = moby_data->unk30 / 1.5f; - C[0] = fast_cos(moby_data->unk2C); - C[1] = fast_sin(moby_data->unk2C); + MOBY(moby)->anim_speed = moby_data->speed / 1.5f; + C[0] = fast_cos(moby_data->axis_yaw); + C[1] = fast_sin(moby_data->axis_yaw); C[2] = 0.0f; - build_look_at_matrix(A, B, C, moby_data->unk28); + build_look_at_matrix(A, B, C, moby_data->phase); fast_vec_add(T, moby_data, A); *(u128_2A8090 *)&MOBY(moby)->pos = *(u128_2A8090 *)T; - D[2] = fast_add_rotations(moby_data->unk2C, 1.5707964f); - D[1] = fast_add_rotations(-moby_data->unk28, 3.1415927f); + D[2] = fast_add_rotations(moby_data->axis_yaw, 1.5707964f); + D[1] = fast_add_rotations(-moby_data->phase, 3.1415927f); euler_rotation_matrix(M, D); copy_matrix3x4(moby + 0xC0, M); normalize_vector_triplet(moby + 0xC0); @@ -133,29 +133,29 @@ void spiderbot_update(unsigned char *moby) { float previous_arc_angle; float current_arc_angle; *(u128_2A8090 *)C = 0; - C[2] = -moby_data->unk24; + C[2] = -moby_data->radius; *(u128_2A8090 *)D = 0; *(u128_2A8090 *)B = *(u128_2A8090 *)C; previous_arc_angle = - fast_add_rotations(fast_normalize_angle(fast_cos(moby_data->unk28) * 1.5707964f), - moby_data->unk20 == 4 ? 1.5707964f : 0.0f); - moby_data->unk28 = - fast_add_rotations(moby_data->unk28, - 360.0f / (moby_data->unk24 * 6.2831855f / moby_data->unk30) * + fast_add_rotations(fast_normalize_angle(fast_cos(moby_data->phase) * 1.5707964f), + moby_data->motion_mode == 4 ? 1.5707964f : 0.0f); + moby_data->phase = + fast_add_rotations(moby_data->phase, + 360.0f / (moby_data->radius * 6.2831855f / moby_data->speed) * 0.017453292f * D_0015ED6C); current_arc_angle = - fast_add_rotations(fast_normalize_angle(fast_cos(moby_data->unk28) * 1.5707964f), - moby_data->unk20 == 4 ? 1.5707964f : 0.0f); + fast_add_rotations(fast_normalize_angle(fast_cos(moby_data->phase) * 1.5707964f), + moby_data->motion_mode == 4 ? 1.5707964f : 0.0f); MOBY(moby)->anim_speed = - moby_data->unk24 * fast_subtract_rotations(current_arc_angle, previous_arc_angle) / + moby_data->radius * fast_subtract_rotations(current_arc_angle, previous_arc_angle) / (D_0015ED6C * 1.5f); - C[0] = fast_cos(moby_data->unk2C); - C[1] = fast_sin(moby_data->unk2C); + C[0] = fast_cos(moby_data->axis_yaw); + C[1] = fast_sin(moby_data->axis_yaw); C[2] = 0.0f; build_look_at_matrix(A, B, C, current_arc_angle); fast_vec_add(T, moby_data, A); *(u128_2A8090 *)&MOBY(moby)->pos = *(u128_2A8090 *)T; - D[2] = fast_add_rotations(moby_data->unk2C, 1.5707964f); + D[2] = fast_add_rotations(moby_data->axis_yaw, 1.5707964f); D[1] = fast_add_rotations(-current_arc_angle, 0.0f); euler_rotation_matrix(M, D); copy_matrix3x4(moby + 0xC0, M); @@ -166,17 +166,17 @@ void spiderbot_update(unsigned char *moby) { case SPIDERBOT_LINEAR_OSCILLATION: { float previous_linear_displacement; float x; - previous_linear_displacement = fast_cos(moby_data->unk28) * moby_data->unk24; - moby_data->unk28 = - fast_add_rotations(moby_data->unk28, - 360.0f / (moby_data->unk24 * 6.2831855f / moby_data->unk30) * + previous_linear_displacement = fast_cos(moby_data->phase) * moby_data->radius; + moby_data->phase = + fast_add_rotations(moby_data->phase, + 360.0f / (moby_data->radius * 6.2831855f / moby_data->speed) * 0.017453292f * D_0015ED6C); - x = fast_cos(moby_data->unk28) * moby_data->unk24; + x = fast_cos(moby_data->phase) * moby_data->radius; MOBY(moby)->anim_speed = (x - previous_linear_displacement) / (D_0015ED6C * 1.5f); build_spherical_offset(A, x, - moby_data->unk20 != 2 ? MOBY(moby)->rot.z : 0.0f, - moby_data->unk20 == 2 ? 1.5707964f : 0.0f); + moby_data->motion_mode != 2 ? MOBY(moby)->rot.z : 0.0f, + moby_data->motion_mode == 2 ? 1.5707964f : 0.0f); fast_vec_add(B, moby_data, A); *(u128_2A8090 *)&MOBY(moby)->pos = *(u128_2A8090 *)B; break; @@ -206,9 +206,9 @@ void spiderbot_update(unsigned char *moby) { *(u128_2A8090 *)C = *(u128_2A8090 *)T2; collision_line(&MOBY(moby)->pos, A, 9, moby, &R); if (collision_line(&MOBY(moby)->pos, A, 2, 0, 0)) { - *(u128_2A8090 *)(&moby_data->unk10) = *(u128_2A8090 *)D_L15_00174460; + *(u128_2A8090 *)(&moby_data->beam_end_position) = *(u128_2A8090 *)D_L15_00174460; } else { - *(u128_2A8090 *)(&moby_data->unk10) = *(u128_2A8090 *)A; + *(u128_2A8090 *)(&moby_data->beam_end_position) = *(u128_2A8090 *)A; } for (i = 0; i < spiderbot_effect_spawn_count_gp; i++) { float effect_direction_sign; @@ -221,12 +221,13 @@ void spiderbot_update(unsigned char *moby) { k = truncate_float_to_s32( FUN_L04_001f1978(random_float_between(spiderbot_effect_lifetime_range_end_gp * 0.5f, spiderbot_effect_lifetime_range_end_gp))); - fast_vec_sub(T2, &moby_data->unk10, &MOBY(moby)->pos); + fast_vec_sub(T2, &moby_data->beam_end_position, &MOBY(moby)->pos); *(u128_2A8090 *)B = *(u128_2A8090 *)T2; fast_vec_scale(B, B, effect_direction_sign); effect_segment_length = fast_vec_length(B); - *(u128_2A8090 *)A = effect_direction_sign < 0.0f ? *(u128_2A8090 *)(&moby_data->unk10) - : *(u128_2A8090 *)&MOBY(moby)->pos; + *(u128_2A8090 *)A = effect_direction_sign < 0.0f + ? *(u128_2A8090 *)(&moby_data->beam_end_position) + : *(u128_2A8090 *)&MOBY(moby)->pos; life = k; fast_vec_scale(B, B, random_float_between(0.0f, 0.9f)); add_vectors(T2, A, B); @@ -260,14 +261,14 @@ void draw_spiderbot_effect_quad(char *moby) { float D[4]; SpiderbotVars *d = (SpiderbotVars *)MOBY(moby)->pvars; int i; - fast_vec_sub(A, &d->unk10, &MOBY(moby)->pos); + fast_vec_sub(A, &d->beam_end_position, &MOBY(moby)->pos); *(OvlQuad *)B = *(OvlQuad *)A; fast_vec_normalize(B, B, 0.5f); *(OvlQuad *)C = *(OvlQuad *)&MOBY(moby)->pos; add_vectors(D, C, B); - fast_vec_sub(E, C, &d->unk10); + fast_vec_sub(E, C, &d->beam_end_position); fast_vec_sub(A, C, D_L15_001673C0); - fast_vec_sub(F, &d->unk10, D_L15_001673C0); + fast_vec_sub(F, &d->beam_end_position, D_L15_001673C0); fast_vec_cross(A, A, E); fast_vec_normalize(A, A, 0.1f); fast_vec_cross(F, F, E); @@ -288,9 +289,9 @@ void draw_spiderbot_effect_quad(char *moby) { *(OvlQuad *)effect_quad.v[0] = *(OvlQuad *)D; fast_vec_add(D, C, A); *(OvlQuad *)effect_quad.v[1] = *(OvlQuad *)D; - fast_vec_sub(D, &d->unk10, F); + fast_vec_sub(D, &d->beam_end_position, F); *(OvlQuad *)effect_quad.v[2] = *(OvlQuad *)D; - fast_vec_add(D, &d->unk10, F); + fast_vec_add(D, &d->beam_end_position, F); *(OvlQuad *)effect_quad.v[3] = *(OvlQuad *)D; draw_geometry_quad(&effect_quad, 0, 0); } diff --git a/src/overlays/shared/math/interpolation/spring_turn.c b/src/overlays/shared/math/interpolation/spring_turn.c index 678885a76a..c80a058e69 100644 --- a/src/overlays/shared/math/interpolation/spring_turn.c +++ b/src/overlays/shared/math/interpolation/spring_turn.c @@ -428,23 +428,23 @@ void move_moby_with_collision_integer_radius(int moby, #include "rnc/math/vector.h" typedef struct { - s32 i00; - f32 f04; - f32 f08; - f32 f0C; - f32 f10; - f32 f14; - f32 f18; - f32 f1C; - f32 f20; - f32 f24; - f32 f28; - f32 f2C; - f32 f30; - f32 f34; - s32 i38; + s32 collision_radius_1024ths; + f32 step_height; + f32 max_drop; + f32 max_climb; + f32 speed; + f32 turn_step; + f32 vertical_velocity; + f32 acceleration; + f32 brake; + f32 max_speed; + f32 heading_tolerance; + f32 arrive_distance; + f32 ground_probe_depth; + f32 unk34; + s32 movement_option_flags; u8 pad3C[0x4C - 0x3C]; - f32 f4C; + f32 move_heading; } Ctl; typedef struct { @@ -493,43 +493,44 @@ s32 move_moby_with_ground_and_collision_checks(Obj *moby, f32 normal_elevation_angle; f32 intended_displacement_length_xy; - sp = movement_control->f1C * f; - horizontal_step_cap_or_probe_height_threshold = movement_control->f24 * f; + sp = movement_control->acceleration * f; + horizontal_step_cap_or_probe_height_threshold = movement_control->max_speed * f; fast_vec_sub(&displacement, target_position, &moby->pos); target_distance_xy = vector_length_xy(&displacement); save.q = moby->pos.q; speed_increment = sp * target_distance_xy; if (sp < speed_increment) speed_increment = sp; - movement_control->f10 = movement_control->f10 + speed_increment; - if (target_distance_xy < movement_control->f10 * 10.0f) - movement_control->f10 = - movement_control->f10 - movement_control->f20 * movement_control->f10; - if (horizontal_step_cap_or_probe_height_threshold < movement_control->f10) - movement_control->f10 = horizontal_step_cap_or_probe_height_threshold; - else if (movement_control->f10 < -horizontal_step_cap_or_probe_height_threshold) - movement_control->f10 = -horizontal_step_cap_or_probe_height_threshold; - if (movement_control->i38 & 4) { - displacement.f[0] = fast_cos(movement_control->f4C) * movement_control->f10; - displacement.f[1] = fast_sin(movement_control->f4C) * movement_control->f10; + movement_control->speed = movement_control->speed + speed_increment; + if (target_distance_xy < movement_control->speed * 10.0f) + movement_control->speed = + movement_control->speed - movement_control->brake * movement_control->speed; + if (horizontal_step_cap_or_probe_height_threshold < movement_control->speed) + movement_control->speed = horizontal_step_cap_or_probe_height_threshold; + else if (movement_control->speed < -horizontal_step_cap_or_probe_height_threshold) + movement_control->speed = -horizontal_step_cap_or_probe_height_threshold; + if (movement_control->movement_option_flags & 4) { + displacement.f[0] = fast_cos(movement_control->move_heading) * movement_control->speed; + displacement.f[1] = fast_sin(movement_control->move_heading) * movement_control->speed; } else { - displacement.f[0] = fast_cos(moby->f48) * movement_control->f10; - displacement.f[1] = fast_sin(moby->f48) * movement_control->f10; + displacement.f[0] = fast_cos(moby->f48) * movement_control->speed; + displacement.f[1] = fast_sin(moby->f48) * movement_control->speed; } - if (movement_control->i38 & 1) { + if (movement_control->movement_option_flags & 1) { displacement.f[2] = 0.0f; } else { - displacement.f[2] = movement_control->f18; - movement_control->f18 = movement_control->f18 - frame_time_sq_gp * 9.0f; + displacement.f[2] = movement_control->vertical_velocity; + movement_control->vertical_velocity = + movement_control->vertical_velocity - frame_time_sq_gp * 9.0f; } horizontal_step_cap_or_probe_height_threshold = moby->pos.f[2] + 0.04f; fast_vec_add(&probe_or_direction, &moby->pos, &displacement); - probe_or_direction.f[2] = moby->pos.f[2] - movement_control->f30; + probe_or_direction.f[2] = moby->pos.f[2] - movement_control->ground_probe_depth; if (FUN_L00_002583f0_c(&probe_or_direction, moby, - movement_control->i38 & 0x20, - movement_control->f08, - movement_control->f0C)) { + movement_control->movement_option_flags & 0x20, + movement_control->max_drop, + movement_control->max_climb)) { collision_probe_result = &D_L00_00173E40_c; normal_elevation_angle = fast_arc_tan(collision_probe_result->v40.f[2], vector_length_xy(&collision_probe_result->v40)); @@ -538,25 +539,25 @@ s32 move_moby_with_ground_and_collision_checks(Obj *moby, { fast_vec_normalize(&q, &displacement, 0.57f); fast_vec_add(&q, &q, &moby->pos); - q.f[2] = moby->pos.f[2] - movement_control->f30; + q.f[2] = moby->pos.f[2] - movement_control->ground_probe_depth; if (FUN_L00_002583f0_c(&q, moby, - movement_control->i38 & 0x20, - movement_control->f08, - movement_control->f0C)) { + movement_control->movement_option_flags & 0x20, + movement_control->max_drop, + movement_control->max_climb)) { lookahead_probe_hit_height = collision_probe_result->f28; if (!(0.5f <= fast_arc_tan(collision_probe_result->v40.f[2], vector_length_xy(&collision_probe_result->v40)))) goto done; mask = 0x22; - if (!(movement_control->i38 & 8)) + if (!(movement_control->movement_option_flags & 8)) goto done; if (!(lookahead_probe_hit_height < horizontal_step_cap_or_probe_height_threshold)) goto done; } else { mask = 0x22; - if (!(movement_control->i38 & 8)) + if (!(movement_control->movement_option_flags & 8)) goto done; } if (displacement_probe_hit_height < horizontal_step_cap_or_probe_height_threshold) @@ -564,7 +565,7 @@ s32 move_moby_with_ground_and_collision_checks(Obj *moby, } } } else { - mask = (movement_control->i38 & 8) ? 8 : 0x22; + mask = (movement_control->movement_option_flags & 8) ? 8 : 0x22; } done: if (!(mask & 2)) { @@ -572,12 +573,12 @@ s32 move_moby_with_ground_and_collision_checks(Obj *moby, fast_vec_scale(&probe_or_direction, &displacement, 1.0f / intended_displacement_length_xy); movement_collision_flags = FUN_L00_00258ad0_c(moby, &displacement, - movement_control->f04, - movement_control->i00, - movement_control->f30, - movement_control->i38); + movement_control->step_height, + movement_control->collision_radius_1024ths, + movement_control->ground_probe_depth, + movement_control->movement_option_flags); if (movement_collision_flags & 2) - movement_control->f18 = frame_scale * -0.01f; + movement_control->vertical_velocity = frame_scale * -0.01f; if (movement_collision_flags & 1) { mask |= 1; if (displacement.f[0] * probe_or_direction.f[0] + @@ -585,18 +586,18 @@ s32 move_moby_with_ground_and_collision_checks(Obj *moby, intended_displacement_length_xy * 0.2f) mask |= 2; ground_height = probe_ground_height(&moby->pos, 0, 0.5f); - if (movement_control->f08 < save.f[2] - ground_height || - movement_control->f0C < ground_height - save.f[2]) { + if (movement_control->max_drop < save.f[2] - ground_height || + movement_control->max_climb < ground_height - save.f[2]) { mask |= 0x22; moby->pos.q = save.q; } } qcopy(movement_displacement_vector_output, &displacement); } else { - if ((movement_control->i38 ^ 1) & 1) - movement_control->f18 = frame_scale * -0.01f; + if ((movement_control->movement_option_flags ^ 1) & 1) + movement_control->vertical_velocity = frame_scale * -0.01f; } - if (target_distance_xy < movement_control->f2C) + if (target_distance_xy < movement_control->arrive_distance) mask |= 4; return mask; } From 1e9c67c0e75935e2e2e76d33f45be905173a6b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:54:26 +0000 Subject: [PATCH 017/213] decomp: name bridge, door, teleporter and other prop fields in shared props --- src/overlays/shared/props/bridge.c | 135 +++++++++--------- .../shared/props/directional_spark_emitter.c | 101 +++++++------ src/overlays/shared/props/door.c | 97 +++++++------ src/overlays/shared/props/escalator.c | 77 +++++----- src/overlays/shared/props/lamp.c | 39 ++--- src/overlays/shared/props/teleporter.c | 91 ++++++------ .../shared/props/timed_activation_pads.c | 44 +++--- src/overlays/shared/props/trespasser_pad.c | 115 +++++++-------- src/overlays/shared/props/tumbling_part.c | 46 +++--- 9 files changed, 385 insertions(+), 360 deletions(-) diff --git a/src/overlays/shared/props/bridge.c b/src/overlays/shared/props/bridge.c index 079d42319f..7fa6c8b84e 100644 --- a/src/overlays/shared/props/bridge.c +++ b/src/overlays/shared/props/bridge.c @@ -10,19 +10,19 @@ typedef struct BridgeVars { u8 pad0[0x60]; - u8 unk60[0x40]; - f32 unkA0[4]; - s32 unkB0; - u32 unkB4; - u32 unkB8; - f32 unkBC; - f32 unkC0; - f32 unkC4; - f32 unkC8; - f32 unkCC; - s32 unkD0; - s32 unkD4; - s32 unkD8; + u8 entity_matrix[0x40]; + f32 initial_position[4]; /* w: distance left to move */ + s32 trigger_moby_index; + u32 trigger_extend_state; + u32 trigger_return_state; + f32 offset_x; + f32 offset_y; + f32 offset_z; + f32 extend_speed; + f32 return_speed; + s32 move_sound; + s32 stop_sound; + s32 extended_flag_index; } BridgeVars; extern s32 allocate_voice_for_target_entry() __asm__("func_0022DA68"); @@ -58,104 +58,105 @@ void bridge_update(u8 *moby) { if (MOBY(moby)->mission != 0xff && visited52[MOBY(moby)->mission + current_level_index * 16] == 0xff) - bridge_data->unkB0 = -1; + bridge_data->trigger_moby_index = -1; state = MOBY(moby)->state; switch (state) { case BRIDGE_INITIALIZE: - qcopy(&bridge_data->unkA0, &MOBY(moby)->pos); - if (bridge_data->unkD8 != -1) - D_L07_00184528[bridge_data->unkD8] = 0; + qcopy(&bridge_data->initial_position, &MOBY(moby)->pos); + if (bridge_data->extended_flag_index != -1) + D_L07_00184528[bridge_data->extended_flag_index] = 0; MOBY(moby)->state = BRIDGE_WAIT_TO_MOVE_TO_OFFSET_POSITION; - *(s32 *)&bridge_data->unkA0[3] = 0; + *(s32 *)&bridge_data->initial_position[3] = 0; break; case BRIDGE_WAIT_TO_MOVE_TO_OFFSET_POSITION: - if (bridge_data->unkB0 != -1) { - linked_state_moby = level_mobys + bridge_data->unkB0 * 0x100; + if (bridge_data->trigger_moby_index != -1) { + linked_state_moby = level_mobys + bridge_data->trigger_moby_index * 0x100; if (linked_state_moby != 0 && MOBY(linked_state_moby)->state != 0xfe && MOBY(linked_state_moby)->state != 0xfd && - MOBY(linked_state_moby)->state != bridge_data->unkB4) + MOBY(linked_state_moby)->state != bridge_data->trigger_extend_state) break; } *(quadword *)(vectors + 4) = 0; - vectors[4] = bridge_data->unkBC; - vectors[5] = bridge_data->unkC0; - vectors[6] = bridge_data->unkC4; + vectors[4] = bridge_data->offset_x; + vectors[5] = bridge_data->offset_y; + vectors[6] = bridge_data->offset_z; *(quadword *)vectors = *(quadword *)(vectors + 4); - bridge_data->unkA0[3] = fast_vec_length(vectors); - if (bridge_data->unkD0 != -1) - allocate_voice_for_target_entry(bridge_data->unkD0, 0, moby); + bridge_data->initial_position[3] = fast_vec_length(vectors); + if (bridge_data->move_sound != -1) + allocate_voice_for_target_entry(bridge_data->move_sound, 0, moby); MOBY(moby)->state = BRIDGE_MOVE_TO_OFFSET_POSITION; break; case BRIDGE_MOVE_TO_OFFSET_POSITION: - if (bridge_data->unkB0 != -1) { - linked_state_moby = level_mobys + bridge_data->unkB0 * 0x100; + if (bridge_data->trigger_moby_index != -1) { + linked_state_moby = level_mobys + bridge_data->trigger_moby_index * 0x100; if (linked_state_moby != 0 && MOBY(linked_state_moby)->state != 0xfe && MOBY(linked_state_moby)->state != 0xfd && - MOBY(linked_state_moby)->state == bridge_data->unkB8) { - if (bridge_data->unkD0 != -1) - allocate_voice_for_target_entry(bridge_data->unkD0, 0, moby); + MOBY(linked_state_moby)->state == bridge_data->trigger_return_state) { + if (bridge_data->move_sound != -1) + allocate_voice_for_target_entry(bridge_data->move_sound, 0, moby); MOBY(moby)->state = BRIDGE_RETURN_TO_INITIAL_POSITION; break; } } *(quadword *)(vectors + 4) = 0; - vectors[4] = bridge_data->unkBC; - vectors[5] = bridge_data->unkC0; - vectors[6] = bridge_data->unkC4; + vectors[4] = bridge_data->offset_x; + vectors[5] = bridge_data->offset_y; + vectors[6] = bridge_data->offset_z; *(quadword *)vectors = *(quadword *)(vectors + 4); transform_vector_by_basis(vectors, vectors, moby + 0xc0); - scale_vector_xyz_alt_31aee0(bridge_data->unkC8 * frame_time, vectors + 4, vectors); + scale_vector_xyz_alt_31aee0(bridge_data->extend_speed * frame_time, vectors + 4, vectors); fast_vec_add(&MOBY(moby)->pos, &MOBY(moby)->pos, vectors + 4); - bridge_data->unkA0[3] -= bridge_data->unkC8 * frame_time; - if (bridge_data->unkA0[3] < 0.0f) { - fast_vec_add(&MOBY(moby)->pos, &bridge_data->unkA0, vectors); - bridge_data->unkA0[3] = 0.0f; - if (bridge_data->unkD8 != -1) - D_L07_00184528[bridge_data->unkD8] = 1; + bridge_data->initial_position[3] -= bridge_data->extend_speed * frame_time; + if (bridge_data->initial_position[3] < 0.0f) { + fast_vec_add(&MOBY(moby)->pos, &bridge_data->initial_position, vectors); + bridge_data->initial_position[3] = 0.0f; + if (bridge_data->extended_flag_index != -1) + D_L07_00184528[bridge_data->extended_flag_index] = 1; MOBY(moby)->state = BRIDGE_WAIT_TO_RETURN_TO_INITIAL_POSITION; - if (bridge_data->unkD4 != -1) - allocate_voice_for_target_entry(bridge_data->unkD0, 0, moby); + if (bridge_data->stop_sound != -1) + allocate_voice_for_target_entry(bridge_data->move_sound, 0, moby); } break; case BRIDGE_WAIT_TO_RETURN_TO_INITIAL_POSITION: - if (bridge_data->unkB0 != -1) { - linked_state_moby = level_mobys + bridge_data->unkB0 * 0x100; + if (bridge_data->trigger_moby_index != -1) { + linked_state_moby = level_mobys + bridge_data->trigger_moby_index * 0x100; if (linked_state_moby != 0 && MOBY(linked_state_moby)->state != 0xfe && MOBY(linked_state_moby)->state != 0xfd && - MOBY(linked_state_moby)->state == bridge_data->unkB8) { - *(s32 *)&bridge_data->unkA0[3] = 0; - if (bridge_data->unkD0 != -1) - allocate_voice_for_target_entry(bridge_data->unkD0, 0, moby); + MOBY(linked_state_moby)->state == bridge_data->trigger_return_state) { + *(s32 *)&bridge_data->initial_position[3] = 0; + if (bridge_data->move_sound != -1) + allocate_voice_for_target_entry(bridge_data->move_sound, 0, moby); MOBY(moby)->state = BRIDGE_RETURN_TO_INITIAL_POSITION; } } break; case BRIDGE_RETURN_TO_INITIAL_POSITION: - if (bridge_data->unkB0 == -1 || - (linked_state_moby = level_mobys + bridge_data->unkB0 * 0x100) == 0 || + if (bridge_data->trigger_moby_index == -1 || + (linked_state_moby = level_mobys + bridge_data->trigger_moby_index * 0x100) == 0 || MOBY(linked_state_moby)->state == 0xfe || MOBY(linked_state_moby)->state == 0xfd || - MOBY(linked_state_moby)->state == bridge_data->unkB4) { - if (bridge_data->unkD0 != -1) - allocate_voice_for_target_entry(bridge_data->unkD0, 0, moby); + MOBY(linked_state_moby)->state == bridge_data->trigger_extend_state) { + if (bridge_data->move_sound != -1) + allocate_voice_for_target_entry(bridge_data->move_sound, 0, moby); MOBY(moby)->state = BRIDGE_MOVE_TO_OFFSET_POSITION; } else { *(quadword *)(vectors + 4) = 0; - vectors[4] = bridge_data->unkBC; - vectors[5] = bridge_data->unkC0; - vectors[6] = bridge_data->unkC4; + vectors[4] = bridge_data->offset_x; + vectors[5] = bridge_data->offset_y; + vectors[6] = bridge_data->offset_z; *(quadword *)vectors = *(quadword *)(vectors + 4); distance = fast_vec_length(vectors); - scale_vector_xyz_alt_31aee0(-(bridge_data->unkCC * frame_time), vectors, vectors); + scale_vector_xyz_alt_31aee0( + -(bridge_data->return_speed * frame_time), vectors, vectors); transform_vector_by_basis(vectors + 4, vectors, moby + 0xc0); fast_vec_add(&MOBY(moby)->pos, &MOBY(moby)->pos, vectors + 4); - bridge_data->unkA0[3] += bridge_data->unkCC * frame_time; - if (distance < bridge_data->unkA0[3]) { - qcopy(&MOBY(moby)->pos, &bridge_data->unkA0); - if (bridge_data->unkD0 != -1) - allocate_voice_for_target_entry(bridge_data->unkD4, 0, moby); - if (bridge_data->unkD8 != -1) - D_L07_00184528[bridge_data->unkD8] = 0; + bridge_data->initial_position[3] += bridge_data->return_speed * frame_time; + if (distance < bridge_data->initial_position[3]) { + qcopy(&MOBY(moby)->pos, &bridge_data->initial_position); + if (bridge_data->move_sound != -1) + allocate_voice_for_target_entry(bridge_data->stop_sound, 0, moby); + if (bridge_data->extended_flag_index != -1) + D_L07_00184528[bridge_data->extended_flag_index] = 0; MOBY(moby)->state = BRIDGE_WAIT_TO_MOVE_TO_OFFSET_POSITION; } } @@ -164,5 +165,5 @@ void bridge_update(u8 *moby) { break; } fast_vec_add(delta, delta, &MOBY(moby)->pos); - update_entity_matrix(&bridge_data->unk60, delta, old_rotation, moby + 0x40); + update_entity_matrix(&bridge_data->entity_matrix, delta, old_rotation, moby + 0x40); } diff --git a/src/overlays/shared/props/directional_spark_emitter.c b/src/overlays/shared/props/directional_spark_emitter.c index 41c8b1a9af..54503c3552 100644 --- a/src/overlays/shared/props/directional_spark_emitter.c +++ b/src/overlays/shared/props/directional_spark_emitter.c @@ -10,22 +10,22 @@ #include "rnc/overlay/shared/props/directional_spark_emitter_data/directional_spark_emitter_update.h" typedef struct DirectionalSparkEmitterVars { - s32 unk0; - s32 unk4; - u8 unk8[0x4]; - u8 unkC[0x4]; - u8 unk10[0x4]; - s32 unk14; - f32 unk18; - f32 unk1C; - f32 unk20; - f32 unk24; - f32 unk28; - f32 unk2C; - f32 unk30; - f32 unk34; + s32 color_1; + s32 color_2; + u8 phase_1_frames[0x4]; + u8 phase_2_frames[0x4]; + u8 phase_3_frames[0x4]; + s32 emit_interval; + f32 forward_speed_1; + f32 rise_speed_1; + f32 forward_speed_2; + f32 rise_speed_2; + f32 vector_1_w; + f32 vector_2_w; + f32 side_spread_1; + f32 side_spread_2; s32 unk38; - s32 unk3C; + s32 emit_timer; } DirectionalSparkEmitterVars; extern void @@ -63,10 +63,10 @@ void directional_spark_emitter_update(char *moby) { s32 spark_frame_count, spark_second_frame_count, spark_third_frame_count; spark_data = (DirectionalSparkEmitterVars *)MOBY(moby)->pvars; - if (fast_dec_timer((int *)(&spark_data->unk3C)) == 0) + if (fast_dec_timer((int *)(&spark_data->emit_timer)) == 0) return; if (spark_data->unk38 != 0) { - spark_data->unk3C = spark_emitter_default_timer_reset_gp; + spark_data->emit_timer = spark_emitter_default_timer_reset_gp; euler_rotation_matrix(spark_rotation_matrix, moby + 0x40); qcopy(spark_position, &MOBY(moby)->pos); spark_position[0] += random_float_between(-0.05f, 0.05f); @@ -127,49 +127,58 @@ void directional_spark_emitter_update(char *moby) { spark_third_frame_count, -1); } else { - spark_data->unk3C = spark_data->unk14; + spark_data->emit_timer = spark_data->emit_interval; euler_rotation_matrix(spark_rotation_matrix, moby + 0x40); qcopy(spark_position, &MOBY(moby)->pos); spark_position[0] += random_float_between(-0.05f, 0.05f); spark_position[1] += random_float_between(-0.05f, 0.05f); spark_position[2] += random_float_between(-0.05f, 0.05f); random_float_between(-0.17453292f, 0.17453292f); - fast_vec_normalize(spark_motion_primary, - spark_rotation_matrix, - random_float_between(spark_data->unk18, spark_data->unk18 * 1.2f) * - frame_time); - fast_vec_normalize(spark_motion_offset, - spark_rotation_matrix + 4, - random_float_between(-spark_data->unk30, spark_data->unk30) * - frame_time); + fast_vec_normalize( + spark_motion_primary, + spark_rotation_matrix, + random_float_between(spark_data->forward_speed_1, spark_data->forward_speed_1 * 1.2f) * + frame_time); + fast_vec_normalize( + spark_motion_offset, + spark_rotation_matrix + 4, + random_float_between(-spark_data->side_spread_1, spark_data->side_spread_1) * + frame_time); fast_vec_add(spark_motion_primary, spark_motion_primary, spark_motion_offset); spark_motion_primary[2] += - random_float_between(spark_data->unk1C, spark_data->unk1C * 1.2f) * frame_time; + random_float_between(spark_data->rise_speed_1, spark_data->rise_speed_1 * 1.2f) * + frame_time; qcopy(spark_motion_secondary, spark_motion_primary); - fast_vec_normalize(spark_motion_secondary, - spark_rotation_matrix, - random_float_between(spark_data->unk20, spark_data->unk20 * 1.5f) * - frame_time); - fast_vec_normalize(spark_motion_offset, - spark_rotation_matrix + 4, - random_float_between(-spark_data->unk34, spark_data->unk34) * - frame_time); + fast_vec_normalize( + spark_motion_secondary, + spark_rotation_matrix, + random_float_between(spark_data->forward_speed_2, spark_data->forward_speed_2 * 1.5f) * + frame_time); + fast_vec_normalize( + spark_motion_offset, + spark_rotation_matrix + 4, + random_float_between(-spark_data->side_spread_2, spark_data->side_spread_2) * + frame_time); fast_vec_add(spark_motion_secondary, spark_motion_secondary, spark_motion_offset); spark_motion_secondary[2] += - random_float_between(spark_data->unk24, spark_data->unk24 * 1.5f) * frame_time; - spark_motion_primary[3] = spark_data->unk28; - spark_motion_secondary[3] = spark_data->unk2C; - spark_frame_count = truncate_float_to_s32(scale_time(random_float_between( - (f32) * (s32 *)(&spark_data->unk8), (f32) * (s32 *)(&spark_data->unk8) * 1.2f))); - spark_second_frame_count = truncate_float_to_s32(scale_time(random_float_between( - (f32) * (s32 *)(&spark_data->unkC), (f32) * (s32 *)(&spark_data->unkC) * 1.2f))); - spark_third_frame_count = truncate_float_to_s32(scale_time(random_float_between( - (f32) * (s32 *)(&spark_data->unk10), (f32) * (s32 *)(&spark_data->unk10) * 1.2f))); + random_float_between(spark_data->rise_speed_2, spark_data->rise_speed_2 * 1.5f) * + frame_time; + spark_motion_primary[3] = spark_data->vector_1_w; + spark_motion_secondary[3] = spark_data->vector_2_w; + spark_frame_count = truncate_float_to_s32( + scale_time(random_float_between((f32) * (s32 *)(&spark_data->phase_1_frames), + (f32) * (s32 *)(&spark_data->phase_1_frames) * 1.2f))); + spark_second_frame_count = truncate_float_to_s32( + scale_time(random_float_between((f32) * (s32 *)(&spark_data->phase_2_frames), + (f32) * (s32 *)(&spark_data->phase_2_frames) * 1.2f))); + spark_third_frame_count = truncate_float_to_s32( + scale_time(random_float_between((f32) * (s32 *)(&spark_data->phase_3_frames), + (f32) * (s32 *)(&spark_data->phase_3_frames) * 1.2f))); spawn_spark(spark_position, spark_motion_primary, spark_motion_secondary, - spark_data->unk0, - spark_data->unk4, + spark_data->color_1, + spark_data->color_2, spark_frame_count, spark_second_frame_count, spark_third_frame_count, diff --git a/src/overlays/shared/props/door.c b/src/overlays/shared/props/door.c index 02118e7c8d..a51867dfd2 100644 --- a/src/overlays/shared/props/door.c +++ b/src/overlays/shared/props/door.c @@ -9,18 +9,18 @@ typedef struct DoorVars { u8 pad0[0xc]; - f32 unkC; + f32 distance_left; s32 linked_moby_index; - u32 unk14; - u32 unk18; - f32 unk1C; - f32 unk20; - f32 unk24; - f32 unk28; - f32 unk2C; + u32 trigger_extend_state; + u32 trigger_return_state; + f32 offset_x; + f32 offset_y; + f32 offset_z; + f32 extend_speed; + f32 return_speed; s32 sound_entry; - s32 unk34; - s32 unk38; + s32 stop_sound; + s32 extended_flag_index; } DoorVars; extern s32 allocate_voice_for_target_entry() __asm__("func_0022DA68"); @@ -55,37 +55,39 @@ void door_update(u8 *moby) { switch (state) { case DOOR_INITIALIZE: qcopy(door_data, &MOBY(moby)->pos); - if (door_data->unk38 != -1) - D_L07_00184528[door_data->unk38] = 0; + if (door_data->extended_flag_index != -1) + D_L07_00184528[door_data->extended_flag_index] = 0; MOBY(moby)->state = DOOR_WAIT_TO_MOVE_TO_OFFSET_POSITION; - *(s32 *)&door_data->unkC = 0; + *(s32 *)&door_data->distance_left = 0; return; case DOOR_WAIT_TO_MOVE_TO_OFFSET_POSITION: - if (door_data->unk38 != -1) - D_L07_00184528[door_data->unk38] = 0; + if (door_data->extended_flag_index != -1) + D_L07_00184528[door_data->extended_flag_index] = 0; if (door_data->linked_moby_index != -1) { linked_moby = level_mobys + door_data->linked_moby_index * 0x100; if (linked_moby != 0 && MOBY(linked_moby)->state != 0xfe && - MOBY(linked_moby)->state != 0xfd && MOBY(linked_moby)->state != door_data->unk14) + MOBY(linked_moby)->state != 0xfd && + MOBY(linked_moby)->state != door_data->trigger_extend_state) return; } *(quadword *)(vectors + 4) = 0; - vectors[4] = door_data->unk1C; - vectors[5] = door_data->unk20; - vectors[6] = door_data->unk24; + vectors[4] = door_data->offset_x; + vectors[5] = door_data->offset_y; + vectors[6] = door_data->offset_z; *(quadword *)vectors = *(quadword *)(vectors + 4); - door_data->unkC = fast_vec_length(vectors); + door_data->distance_left = fast_vec_length(vectors); if (door_data->sound_entry != -1) allocate_voice_for_target_entry(door_data->sound_entry, 0, moby); MOBY(moby)->state = DOOR_MOVE_TO_OFFSET_POSITION; return; case DOOR_MOVE_TO_OFFSET_POSITION: - if (door_data->unk38 != -1) - D_L07_00184528[door_data->unk38] = 1; + if (door_data->extended_flag_index != -1) + D_L07_00184528[door_data->extended_flag_index] = 1; if (door_data->linked_moby_index != -1) { linked_moby = level_mobys + door_data->linked_moby_index * 0x100; if (linked_moby != 0 && MOBY(linked_moby)->state != 0xfe && - MOBY(linked_moby)->state != 0xfd && MOBY(linked_moby)->state == door_data->unk18) { + MOBY(linked_moby)->state != 0xfd && + MOBY(linked_moby)->state == door_data->trigger_return_state) { if (door_data->sound_entry != -1) allocate_voice_for_target_entry(door_data->sound_entry, 0, moby); MOBY(moby)->state = DOOR_RETURN_TO_INITIAL_POSITION; @@ -93,64 +95,65 @@ void door_update(u8 *moby) { } } *(quadword *)(vectors + 4) = 0; - vectors[4] = door_data->unk1C; - vectors[5] = door_data->unk20; - vectors[6] = door_data->unk24; + vectors[4] = door_data->offset_x; + vectors[5] = door_data->offset_y; + vectors[6] = door_data->offset_z; *(quadword *)vectors = *(quadword *)(vectors + 4); transform_vector_by_basis(vectors, vectors, moby + 0xc0); - fast_vec_normalize(vectors + 4, vectors, door_data->unk28 * frame_time); + fast_vec_normalize(vectors + 4, vectors, door_data->extend_speed * frame_time); fast_vec_add(&MOBY(moby)->pos, &MOBY(moby)->pos, vectors + 4); - door_data->unkC -= door_data->unk28 * frame_time; - if (!(door_data->unkC < 0.0f)) + door_data->distance_left -= door_data->extend_speed * frame_time; + if (!(door_data->distance_left < 0.0f)) return; fast_vec_add(&MOBY(moby)->pos, door_data, vectors); - door_data->unkC = 0.0f; + door_data->distance_left = 0.0f; MOBY(moby)->state = DOOR_WAIT_TO_RETURN_TO_INITIAL_POSITION; - if (door_data->unk34 != -1) + if (door_data->stop_sound != -1) allocate_voice_for_target_entry(door_data->sound_entry, 0, moby); return; case DOOR_WAIT_TO_RETURN_TO_INITIAL_POSITION: - if (door_data->unk38 != -1) - D_L07_00184528[door_data->unk38] = 1; + if (door_data->extended_flag_index != -1) + D_L07_00184528[door_data->extended_flag_index] = 1; if (door_data->linked_moby_index == -1) return; linked_moby = level_mobys + door_data->linked_moby_index * 0x100; if (linked_moby == 0 || MOBY(linked_moby)->state == 0xfe || - MOBY(linked_moby)->state == 0xfd || MOBY(linked_moby)->state != door_data->unk18) + MOBY(linked_moby)->state == 0xfd || + MOBY(linked_moby)->state != door_data->trigger_return_state) return; - *(s32 *)&door_data->unkC = 0; + *(s32 *)&door_data->distance_left = 0; if (door_data->sound_entry != -1) allocate_voice_for_target_entry(door_data->sound_entry, 0, moby); MOBY(moby)->state = DOOR_RETURN_TO_INITIAL_POSITION; return; case DOOR_RETURN_TO_INITIAL_POSITION: - if (door_data->unk38 != -1) - D_L07_00184528[door_data->unk38] = 0; + if (door_data->extended_flag_index != -1) + D_L07_00184528[door_data->extended_flag_index] = 0; if (door_data->linked_moby_index == -1 || (linked_moby = level_mobys + door_data->linked_moby_index * 0x100) == 0 || MOBY(linked_moby)->state == 0xfe || MOBY(linked_moby)->state == 0xfd || - MOBY(linked_moby)->state == door_data->unk14) { + MOBY(linked_moby)->state == door_data->trigger_extend_state) { if (door_data->sound_entry != -1) allocate_voice_for_target_entry(door_data->sound_entry, 0, moby); MOBY(moby)->state = DOOR_MOVE_TO_OFFSET_POSITION; } else { *(quadword *)(vectors + 4) = 0; - vectors[4] = door_data->unk1C; - vectors[5] = door_data->unk20; - vectors[6] = door_data->unk24; + vectors[4] = door_data->offset_x; + vectors[5] = door_data->offset_y; + vectors[6] = door_data->offset_z; *(quadword *)vectors = *(quadword *)(vectors + 4); distance = fast_vec_length(vectors); - fast_vec_normalize(vectors, vectors, -(door_data->unk2C * frame_time)); + fast_vec_normalize(vectors, vectors, -(door_data->return_speed * frame_time)); transform_vector_by_basis(vectors + 4, vectors, moby + 0xc0); fast_vec_add(&MOBY(moby)->pos, &MOBY(moby)->pos, vectors + 4); - door_data->unkC += door_data->unk2C * frame_time; - if (!(distance < door_data->unkC)) + door_data->distance_left += door_data->return_speed * frame_time; + if (!(distance < door_data->distance_left)) return; qcopy(&MOBY(moby)->pos, door_data); if (door_data->sound_entry != -1) - allocate_voice_for_target_entry(door_data->unk34, 0, moby); - if (door_data->unk38 != -1) - D_L07_00184528[door_data->unk38] = 0; + allocate_voice_for_target_entry(door_data->stop_sound, 0, moby); + if (door_data->extended_flag_index != -1) + D_L07_00184528[door_data->extended_flag_index] = 0; MOBY(moby)->state = DOOR_WAIT_TO_MOVE_TO_OFFSET_POSITION; } break; diff --git a/src/overlays/shared/props/escalator.c b/src/overlays/shared/props/escalator.c index a708367d4c..2e4fcbe038 100644 --- a/src/overlays/shared/props/escalator.c +++ b/src/overlays/shared/props/escalator.c @@ -9,14 +9,14 @@ typedef struct EscalatorVars { u8 pad0[0x40]; - f32 unk40; - f32 unk44; - s32 unk48; + f32 belt_velocity_x; + f32 belt_velocity_y; + s32 belt_velocity_z; u8 pad4C[0x14]; - u8 unk60[0x3c]; - u32 unk9C; - s32 unkA0; - s32 unkA4; + u8 entity_matrix[0x3c]; + u32 entity_matrix_flags; + s32 direction_timer; + s32 constant_speed; } EscalatorVars; extern int escalator_direction_timer_frames_gp __asm__("D_L02_00161C18") __attribute__((sda)); @@ -54,10 +54,11 @@ void escalator_update(char *moby) { goto state3; goto move; state0: - clear_u64_value(&escalator_motion_state->unk40); - escalator_motion_state->unkA0 = scale_game_frames(escalator_direction_timer_frames_gp); - escalator_motion_state->unk9C |= 4; - if (escalator_motion_state->unkA4 != 0) + clear_u64_value(&escalator_motion_state->belt_velocity_x); + escalator_motion_state->direction_timer = + scale_game_frames(escalator_direction_timer_frames_gp); + escalator_motion_state->entity_matrix_flags |= 4; + if (escalator_motion_state->constant_speed != 0) MOBY(moby)->state = ESCALATOR_STATE_CONSTANT_SPEED_MOTION; else MOBY(moby)->state = ESCALATOR_STATE_TIMED_NEGATIVE_YAW_MOTION; @@ -66,27 +67,28 @@ state1: { float speed; MOBY(moby)->anim_speed = 1.0f; - if (fast_dec_timer((int *)(&escalator_motion_state->unkA0))) { - speed = fast_vec_length(&escalator_motion_state->unk40) - + if (fast_dec_timer((int *)(&escalator_motion_state->direction_timer))) { + speed = fast_vec_length(&escalator_motion_state->belt_velocity_x) - escalator_acceleration_gp * frame_time_sq; if (speed <= 0.0f) { - escalator_motion_state->unkA0 = scale_game_frames(escalator_direction_timer_frames_gp); + escalator_motion_state->direction_timer = + scale_game_frames(escalator_direction_timer_frames_gp); MOBY(moby)->state = ESCALATOR_STATE_TIMED_POSITIVE_YAW_MOTION; } else { - escalator_motion_state->unk40 = fast_cos(MOBY(moby)->rot.z) * -speed; + escalator_motion_state->belt_velocity_x = fast_cos(MOBY(moby)->rot.z) * -speed; y = fast_sin(MOBY(moby)->rot.z) * -speed; - *(float *)&escalator_motion_state->unk48 = 0.0f; - escalator_motion_state->unk44 = y; + *(float *)&escalator_motion_state->belt_velocity_z = 0.0f; + escalator_motion_state->belt_velocity_y = y; } } else { - speed = fast_vec_length(&escalator_motion_state->unk40); + speed = fast_vec_length(&escalator_motion_state->belt_velocity_x); limit = absolute_float(escalator_target_speed_gp * frame_time); /* Retail loads frame_time_sq through its absolute EE address here. */ if (speed < limit) speed += escalator_acceleration_gp * (*(float *)0x0015ED70); - escalator_motion_state->unk40 = fast_cos(MOBY(moby)->rot.z) * -speed; - escalator_motion_state->unk44 = fast_sin(MOBY(moby)->rot.z) * -speed; - escalator_motion_state->unk48 = 0; + escalator_motion_state->belt_velocity_x = fast_cos(MOBY(moby)->rot.z) * -speed; + escalator_motion_state->belt_velocity_y = fast_sin(MOBY(moby)->rot.z) * -speed; + escalator_motion_state->belt_velocity_z = 0; } MOBY(moby)->anim_speed = speed / (escalator_target_speed_gp * frame_time); goto move; @@ -95,38 +97,41 @@ state2: { float speed; MOBY(moby)->anim_speed = -1.0f; - if (fast_dec_timer((int *)(&escalator_motion_state->unkA0))) { - speed = fast_vec_length(&escalator_motion_state->unk40) - + if (fast_dec_timer((int *)(&escalator_motion_state->direction_timer))) { + speed = fast_vec_length(&escalator_motion_state->belt_velocity_x) - escalator_acceleration_gp * frame_time_sq; if (speed <= 0.0f) { - escalator_motion_state->unkA0 = scale_game_frames(escalator_direction_timer_frames_gp); + escalator_motion_state->direction_timer = + scale_game_frames(escalator_direction_timer_frames_gp); MOBY(moby)->state = ESCALATOR_STATE_TIMED_NEGATIVE_YAW_MOTION; } else { - escalator_motion_state->unk40 = fast_cos(MOBY(moby)->rot.z) * speed; - escalator_motion_state->unk44 = fast_sin(MOBY(moby)->rot.z) * speed; - *(float *)&escalator_motion_state->unk48 = 0.0f; + escalator_motion_state->belt_velocity_x = fast_cos(MOBY(moby)->rot.z) * speed; + escalator_motion_state->belt_velocity_y = fast_sin(MOBY(moby)->rot.z) * speed; + *(float *)&escalator_motion_state->belt_velocity_z = 0.0f; } } else { - speed = fast_vec_length(&escalator_motion_state->unk40); + speed = fast_vec_length(&escalator_motion_state->belt_velocity_x); limit = absolute_float(escalator_target_speed_gp * frame_time); if (speed < limit) speed += escalator_acceleration_gp * (*(float *)0x0015ED70); - escalator_motion_state->unk40 = fast_cos(MOBY(moby)->rot.z) * speed; - escalator_motion_state->unk44 = fast_sin(MOBY(moby)->rot.z) * speed; - escalator_motion_state->unk48 = 0; + escalator_motion_state->belt_velocity_x = fast_cos(MOBY(moby)->rot.z) * speed; + escalator_motion_state->belt_velocity_y = fast_sin(MOBY(moby)->rot.z) * speed; + escalator_motion_state->belt_velocity_z = 0; } MOBY(moby)->anim_speed = speed / -(escalator_target_speed_gp * frame_time); goto move; } state3: - escalator_motion_state->unk40 = + escalator_motion_state->belt_velocity_x = fast_cos(MOBY(moby)->rot.z) * -(escalator_target_speed_gp * frame_time); - escalator_motion_state->unk44 = + escalator_motion_state->belt_velocity_y = fast_sin(MOBY(moby)->rot.z) * -(escalator_target_speed_gp * frame_time); - escalator_motion_state->unk48 = 0; + escalator_motion_state->belt_velocity_z = 0; move: - update_entity_matrix( - &escalator_motion_state->unk60, &escalator_motion_state->unk40, moby + 0x40, moby + 0x40); + update_entity_matrix(&escalator_motion_state->entity_matrix, + &escalator_motion_state->belt_velocity_x, + moby + 0x40, + moby + 0x40); } int D_L12_00161964 = 0xb4; diff --git a/src/overlays/shared/props/lamp.c b/src/overlays/shared/props/lamp.c index 87a9a0fc67..65562ff7fd 100644 --- a/src/overlays/shared/props/lamp.c +++ b/src/overlays/shared/props/lamp.c @@ -15,12 +15,12 @@ typedef struct LampVars { u8 pad0[0x10]; - u8 unk10[0x30]; - f32 unk40; - f32 unk44; - f32 unk48; - f32 unk4C; - f32 unk50; + u8 tilt_rotation[0x30]; + f32 base_yaw; + f32 yaw_wobble_phase; + f32 tilt_wobble_phase; + f32 yaw_wobble_rate; + f32 tilt_wobble_rate; } LampVars; typedef struct { @@ -68,17 +68,17 @@ void moby_wobble_update(unsigned char *moby) { float random_angular_sample, lo, hi; switch (MOBY(moby)->state) { case MOBY_WOBBLE_STATE_INITIALIZE: - wobble_vars->unk40 = MOBY(moby)->rot.z; - wobble_vars->unk48 = random_angle_radians(); + wobble_vars->base_yaw = MOBY(moby)->rot.z; + wobble_vars->tilt_wobble_phase = random_angle_radians(); random_angular_sample = random_angle_radians(); lo = frame_time * 0.47123888f; hi = frame_time * 0.5235988f; - wobble_vars->unk44 = random_angular_sample; + wobble_vars->yaw_wobble_phase = random_angular_sample; random_angular_sample = randf_sym(lo, hi); lo = frame_time * 0.20943951f; hi = frame_time * 0.2617994f; - wobble_vars->unk50 = random_angular_sample; - wobble_vars->unk4C = randf_sym(lo, hi); + wobble_vars->tilt_wobble_rate = random_angular_sample; + wobble_vars->yaw_wobble_rate = randf_sym(lo, hi); set_moby_color(moby, 0x80, 0x80, 0x80); attach_manipulator((char *)moby, 0, wobble_vars); MOBY(moby)->state = MOBY_WOBBLE_STATE_ANIMATE; @@ -87,12 +87,15 @@ void moby_wobble_update(unsigned char *moby) { float k = 0.5235988f; float wobble_phase; add_draw_callback((void *)draw_moby_wobble_quads, moby); - wobble_phase = fast_add_rotations(wobble_vars->unk44, wobble_vars->unk4C); - wobble_vars->unk44 = wobble_phase; - MOBY(moby)->rot.z = fast_add_rotations(wobble_vars->unk40, fast_sin(wobble_phase) * k); - wobble_phase = fast_add_rotations(wobble_vars->unk48, wobble_vars->unk50); - wobble_vars->unk48 = wobble_phase; - build_axis_rotation_quaternion(&wobble_vars->unk10, 1, fast_sin(wobble_phase) * k + k); + wobble_phase = + fast_add_rotations(wobble_vars->yaw_wobble_phase, wobble_vars->yaw_wobble_rate); + wobble_vars->yaw_wobble_phase = wobble_phase; + MOBY(moby)->rot.z = fast_add_rotations(wobble_vars->base_yaw, fast_sin(wobble_phase) * k); + wobble_phase = + fast_add_rotations(wobble_vars->tilt_wobble_phase, wobble_vars->tilt_wobble_rate); + wobble_vars->tilt_wobble_phase = wobble_phase; + build_axis_rotation_quaternion( + &wobble_vars->tilt_rotation, 1, fast_sin(wobble_phase) * k + k); break; } } @@ -120,7 +123,7 @@ void draw_moby_wobble_quads(struct Moby *moby) { moby_point_position(moby, 0, position); clear_u64_value(rotation); rotation[2] = moby->rot.z; - rotation[1] = fast_sin(moby_wobble_vars->unk48) * 0.5235988f + 0.5235988f; + rotation[1] = fast_sin(moby_wobble_vars->tilt_wobble_phase) * 0.5235988f + 0.5235988f; side = matrix; euler_rotation_matrix(side, rotation); direction = matrix + 4; diff --git a/src/overlays/shared/props/teleporter.c b/src/overlays/shared/props/teleporter.c index 0424fff21e..8da8a22079 100644 --- a/src/overlays/shared/props/teleporter.c +++ b/src/overlays/shared/props/teleporter.c @@ -34,18 +34,19 @@ enum { typedef struct TeleporterVars { u8 pad0[0x4]; - s32 unk4; - s32 unk8; + s32 activation_volume; + s32 blocking_mission; u8 padC[0x8]; - f32 unk14[4]; - f32 unk24; + s32 child_mobys[3]; /* 0x14: the three ring mobys (class 0x13B) */ + f32 child_motion_1; + f32 child_motion_2; f32 unk28; f32 unk2C; s32 unk30; - f32 unk34; - s32 unk38; + f32 ring_radius; + s32 starts_active; s32 unk3C; - s32 unk40; + s32 music_track; s32 unk44; } TeleporterVars; @@ -277,8 +278,8 @@ void teleporter_update(struct Moby *moby) { active = 1; } active = active != 0; - if (moby->state != TELEPORTER_INITIALIZE && teleporter_vars->unk4 != -1 && !active && - FUN_00214720(&hero.motion.pos, teleporter_vars->unk4) != 0) { + if (moby->state != TELEPORTER_INITIALIZE && teleporter_vars->activation_volume != -1 && + !active && FUN_00214720(&hero.motion.pos, teleporter_vars->activation_volume) != 0) { active = 1; activate_teleporter_and_record_state(moby); show_teleporter_and_children(moby); @@ -296,7 +297,7 @@ void teleporter_update(struct Moby *moby) { } switch (moby->state) { case TELEPORTER_INITIALIZE: { - char **slots = (char **)(&teleporter_vars->unk14); + char **slots = (char **)(&teleporter_vars->child_mobys); int i; moby->update_dist = 0xFF; for (i = 0; i < 3; i++) { @@ -313,7 +314,7 @@ void teleporter_update(struct Moby *moby) { *(float *)(slots[i] + 0x48) = fast_add_rotations(MOBY(child_moby)->rot.z, (float)i * 2.0943952f); } - if (teleporter_vars->unk38 != 0 || active) { + if (teleporter_vars->starts_active != 0 || active) { moby->state = TELEPORTER_ENTER_WAIT_FOR_USE; } else { moby->state = TELEPORTER_WAIT_FOR_ACTIVATION; @@ -329,8 +330,8 @@ void teleporter_update(struct Moby *moby) { moby->state = TELEPORTER_WAIT_FOR_USE; case TELEPORTER_WAIT_FOR_USE: { struct Hero *g; - if (teleporter_vars->unk8 >= 0 && - D_0014C050[teleporter_vars->unk8 + current_level_index * 16] != 0xFF) + if (teleporter_vars->blocking_mission >= 0 && + D_0014C050[teleporter_vars->blocking_mission + current_level_index * 16] != 0xFF) break; if (*(int *)teleporter_vars == -1) break; @@ -354,15 +355,15 @@ void teleporter_update(struct Moby *moby) { break; } case TELEPORTER_EFFECT_CYCLE_PREPARE: - if (teleporter_vars->unk14[3] < 1.0f) { - advance_accelerated_scalar((float *)(&teleporter_vars->unk14[3]), + if (teleporter_vars->child_motion_1 < 1.0f) { + advance_accelerated_scalar((float *)(&teleporter_vars->child_motion_1), (float *)(&teleporter_vars->unk28), 1.0f, teleporter_child_motion_acceleration_gp * frame_time_sq, teleporter_child_motion_deceleration_gp * frame_time_sq, teleporter_child_motion_max_speed_gp * frame_time); - } else if (teleporter_vars->unk24 < 1.0f) { - advance_accelerated_scalar((float *)(&teleporter_vars->unk24), + } else if (teleporter_vars->child_motion_2 < 1.0f) { + advance_accelerated_scalar((float *)(&teleporter_vars->child_motion_2), (float *)(&teleporter_vars->unk2C), 1.0f, teleporter_child_motion_acceleration_gp * frame_time_sq, @@ -371,29 +372,29 @@ void teleporter_update(struct Moby *moby) { } else { allocate_voice_for_target_entry(1, 0, (void *)moby); moby->state = TELEPORTER_EFFECT_CYCLE_RETURN_TO_IDLE; - teleporter_vars->unk34 = 0.0f; + teleporter_vars->ring_radius = 0.0f; } update_teleporter_child_transforms(moby); break; case TELEPORTER_PREPARE_TRANSFER: { int transfer_preparation_status = get_hero_target_pose_status(); - if (teleporter_vars->unk14[3] < 1.0f) { - advance_accelerated_scalar((float *)(&teleporter_vars->unk14[3]), + if (teleporter_vars->child_motion_1 < 1.0f) { + advance_accelerated_scalar((float *)(&teleporter_vars->child_motion_1), (float *)(&teleporter_vars->unk28), 1.0f, teleporter_child_motion_acceleration_gp * frame_time_sq, teleporter_child_motion_deceleration_gp * frame_time_sq, teleporter_child_motion_max_speed_gp * frame_time); - } else if (teleporter_vars->unk24 < 1.0f) { - advance_accelerated_scalar((float *)(&teleporter_vars->unk24), + } else if (teleporter_vars->child_motion_2 < 1.0f) { + advance_accelerated_scalar((float *)(&teleporter_vars->child_motion_2), (float *)(&teleporter_vars->unk2C), 1.0f, teleporter_child_motion_acceleration_gp * frame_time_sq, teleporter_child_motion_deceleration_gp * frame_time_sq, teleporter_child_motion_max_speed_gp * frame_time); - } else if (D_L01_0015F594 != 4 || !(teleporter_vars->unk14[3] > 0.25f)) { + } else if (D_L01_0015F594 != 4 || !(teleporter_vars->child_motion_1 > 0.25f)) { if (transfer_preparation_status == HERO_TARGET_POSE_STATUS_TRANSFER_READY) { - teleporter_vars->unk34 = 1.95f; + teleporter_vars->ring_radius = 1.95f; moby->state = TELEPORTER_TRANSFER_TO_DESTINATION; } else if (transfer_preparation_status == HERO_TARGET_POSE_STATUS_INACTIVE) { moby->state = TELEPORTER_RETURN_TO_IDLE; @@ -403,9 +404,9 @@ void teleporter_update(struct Moby *moby) { break; } case TELEPORTER_TRANSFER_TO_DESTINATION: - if (teleporter_vars->unk34 != 0.0f) { + if (teleporter_vars->ring_radius != 0.0f) { add_draw_callback(draw_moby_radius_ring, moby); - approach_value((float *)(&teleporter_vars->unk34), 0.0f, frame_time * 4.0f); + approach_value((float *)(&teleporter_vars->ring_radius), 0.0f, frame_time * 4.0f); } else { char *destination_moby = D_L01_0015FFD8 + (*(int *)teleporter_vars << 8); TeleporterVars *td = (TeleporterVars *)MOBY(destination_moby)->pvars; @@ -414,39 +415,39 @@ void teleporter_update(struct Moby *moby) { destination_position[2] += 0.2f; set_race_camera(destination_position, destination_moby + 0x40, 0, 1); hero.hidden = 1; - if (teleporter_vars->unk40 != -1 && teleporter_vars->unk44 != -1) { - request_music_track(teleporter_vars->unk40, teleporter_vars->unk44); + if (teleporter_vars->music_track != -1 && teleporter_vars->unk44 != -1) { + request_music_track(teleporter_vars->music_track, teleporter_vars->unk44); } MOBY(destination_moby)->state = TELEPORTER_RETURN_TO_IDLE; - td->unk34 = 0.0f; + td->ring_radius = 0.0f; td->unk28 = 0.0f; td->unk2C = 0.0f; - td->unk14[3] = 1.0f; - td->unk24 = 1.0f; + td->child_motion_1 = 1.0f; + td->child_motion_2 = 1.0f; allocate_voice_for_target_entry(1, 0, (void *)destination_moby); moby->state = TELEPORTER_WAIT_FOR_USE; - teleporter_vars->unk14[3] = 0.0f; - teleporter_vars->unk24 = 0.0f; + teleporter_vars->child_motion_1 = 0.0f; + teleporter_vars->child_motion_2 = 0.0f; teleporter_vars->unk28 = 0.0f; teleporter_vars->unk2C = 0.0f; - teleporter_vars->unk34 = 1.95f; + teleporter_vars->ring_radius = 1.95f; update_teleporter_child_transforms(moby); } break; case TELEPORTER_RETURN_TO_IDLE: case TELEPORTER_EFFECT_CYCLE_RETURN_TO_IDLE: - if (teleporter_vars->unk34 < 1.95f) { + if (teleporter_vars->ring_radius < 1.95f) { add_draw_callback(draw_moby_radius_ring, moby); - approach_value((float *)(&teleporter_vars->unk34), 1.95f, frame_time * 4.0f); - } else if (0.0f < teleporter_vars->unk24) { - advance_accelerated_scalar((float *)(&teleporter_vars->unk24), + approach_value((float *)(&teleporter_vars->ring_radius), 1.95f, frame_time * 4.0f); + } else if (0.0f < teleporter_vars->child_motion_2) { + advance_accelerated_scalar((float *)(&teleporter_vars->child_motion_2), (float *)(&teleporter_vars->unk28), 0.0f, teleporter_child_motion_acceleration_gp * frame_time_sq, teleporter_child_motion_deceleration_gp * frame_time_sq, teleporter_child_motion_max_speed_gp * frame_time); - } else if (0.0f < teleporter_vars->unk14[3]) { - advance_accelerated_scalar((float *)(&teleporter_vars->unk14[3]), + } else if (0.0f < teleporter_vars->child_motion_1) { + advance_accelerated_scalar((float *)(&teleporter_vars->child_motion_1), (float *)(&teleporter_vars->unk2C), 0.0f, teleporter_child_motion_acceleration_gp * frame_time_sq, @@ -542,8 +543,8 @@ void draw_moby_radius_ring(char *moby) { quad.c[i] = moby_radius_ring_vertex_color_gp; } ring_half_height = 0.1f; - if (moby_data->unk34 < 1.15f) { - float ring_half_height_increase = (1.15f - moby_data->unk34) * 2.0f; + if (moby_data->ring_radius < 1.15f) { + float ring_half_height_increase = (1.15f - moby_data->ring_radius) * 2.0f; if (1.0f < ring_half_height_increase) { ring_half_height_increase = 1.0f; } else if (ring_half_height_increase < 0.0f) { @@ -551,7 +552,7 @@ void draw_moby_radius_ring(char *moby) { } ring_half_height = ring_half_height_increase + 0.1f; if (((unsigned char *)moby)[0x20] != 7 && ((unsigned char *)moby)[0x20] != 8) { - if (moby_data->unk34 < 0.65f) { + if (moby_data->ring_radius < 0.65f) { D_001413F5_lui = 1; } else { D_001413F5_lui = 0; @@ -566,8 +567,8 @@ void draw_moby_radius_ring(char *moby) { vertex = quad.v; for (; k < 4;) { float vertex_angle = (float)(j + k / 2) * 6.28318f * 0.03125f - 3.14159f; - vertex[0] = fast_cos(vertex_angle) * moby_data->unk34; - vertex[1] = fast_sin(vertex_angle) * moby_data->unk34; + vertex[0] = fast_cos(vertex_angle) * moby_data->ring_radius; + vertex[1] = fast_sin(vertex_angle) * moby_data->ring_radius; vertex[2] = 0.0f; if (k++ & 1) { vertex[2] = moby_radius_ring_center_z_gp + ring_half_height + vertex[2]; diff --git a/src/overlays/shared/props/timed_activation_pads.c b/src/overlays/shared/props/timed_activation_pads.c index f6a005d787..985e1cde43 100644 --- a/src/overlays/shared/props/timed_activation_pads.c +++ b/src/overlays/shared/props/timed_activation_pads.c @@ -10,11 +10,11 @@ typedef struct TimedActivationPadVars { u8 pad0[0x4]; - s32 unk4; - s32 unk8; - s16 unkC; - s16 unkE; - s32 unk10; + s32 tick_sound_timer; + s32 pressed; + s16 glow_timer; + s16 glow_phase; + s32 duration_seconds; } TimedActivationPadVars; extern s32 allocate_voice_for_target_entry() __asm__("func_0022DA68"); @@ -70,7 +70,7 @@ void timed_activation_pads_update(unsigned char *moby) { } } - if (pad_data->unk8 == 0) { + if (pad_data->pressed == 0) { activation_reference_data = (char *)D_0013F350_lui; if (*(short *)(activation_reference_data + 0x30E) == 0) flag = *(unsigned char **)(activation_reference_data + 0x2FC) == moby; @@ -102,9 +102,9 @@ void timed_activation_pads_update(unsigned char *moby) { if (fast_dec_timer((int *)pad_data)) { allocate_voice_for_target_entry(2, 0, (int)moby); set_moby_list_state(MOBY(moby)->group, 8); - } else if (fast_dec_timer((int *)(&pad_data->unk4))) { + } else if (fast_dec_timer((int *)(&pad_data->tick_sound_timer))) { allocate_voice_for_target_entry(0, 0, (int)moby); - pad_data->unk4 = + pad_data->tick_sound_timer = func_001F9850_30D370(0x2D) < func_001F9850_30D370(5) + *(int *)pad_data / func_001F9850_30D370(0x28) ? func_001F9850_30D370(0x2D) @@ -120,16 +120,16 @@ void timed_activation_pads_update(unsigned char *moby) { set_moby_list_state(MOBY(moby)->group, 1); break; case PAD_WAIT_FOR_ACTIVATION: - pad_data->unk8 = 0; + pad_data->pressed = 0; glow_n(moby, 0x80, 0x80, 0x80); if (flag) { - if (pad_data->unk10 > 0) - *(int *)pad_data = func_001F9850_30D370(pad_data->unk10 * 60); + if (pad_data->duration_seconds > 0) + *(int *)pad_data = func_001F9850_30D370(pad_data->duration_seconds * 60); else *(int *)pad_data = func_001F9850_30D370(900); on = 1; glow_n(moby, 0, 0xFF, 0); - pad_data->unk8 = on; + pad_data->pressed = on; func_L01_0026F040_30D370(MOBY(moby)->group, 0); MOBY(moby)->command = on; allocate_voice_for_target_entry(3, 0, (int)moby); @@ -141,7 +141,7 @@ void timed_activation_pads_update(unsigned char *moby) { break; case PAD_WAIT_TO_ENTER_FLASH_ACTIVATION_WAIT: if (flag) { - pad_data->unk8 = 1; + pad_data->pressed = 1; glow_n(moby, 0, 0xFF, 0); allocate_voice_for_target_entry(3, 0, (int)moby); set_moby_list_state(MOBY(moby)->group, 4); @@ -152,15 +152,15 @@ void timed_activation_pads_update(unsigned char *moby) { break; case PAD_WAIT_FOR_FLASH_ACTIVATION: if (flag) { - pad_data->unk8 = 1; + pad_data->pressed = 1; glow_n(moby, 0, 0xFF, 0); set_moby_list_state(MOBY(moby)->group, 6); allocate_voice_for_target_entry(1, 0, (int)moby); } break; case PAD_INITIALIZE_FLASHING: - pad_data->unkC = func_001F9850_30D370(0x14); - pad_data->unkE = 0; + pad_data->glow_timer = func_001F9850_30D370(0x14); + pad_data->glow_phase = 0; glow_n(moby, 0x80, 0xFF, 0x80); MOBY(moby)->state = PAD_UPDATE_FLASHING; break; @@ -169,19 +169,19 @@ void timed_activation_pads_update(unsigned char *moby) { if (visited52[MOBY(moby)->mission + (current_level_index << 4)] != 0xFF) jet_clear_persistent(MOBY(moby)->mission); } - if (fast_dec_timer_s16(&pad_data->unkC)) { - pad_data->unkC = func_001F9850_30D370(0x14); - switch (pad_data->unkE) { + if (fast_dec_timer_s16(&pad_data->glow_timer)) { + pad_data->glow_timer = func_001F9850_30D370(0x14); + switch (pad_data->glow_phase) { case PAD_FLASH_APPLY_GREEN: glow_n(moby, 0, 0xFF, 0); - pad_data->unkE = 1; + pad_data->glow_phase = 1; break; case PAD_FLASH_APPLY_WHITE: glow_n(moby, 0xFF, 0xFF, 0xFF); - pad_data->unkE = 0; + pad_data->glow_phase = 0; break; case 2 ... 5: - pad_data->unkE = 0; + pad_data->glow_phase = 0; break; } } diff --git a/src/overlays/shared/props/trespasser_pad.c b/src/overlays/shared/props/trespasser_pad.c index b58f3967c7..f8502a6050 100644 --- a/src/overlays/shared/props/trespasser_pad.c +++ b/src/overlays/shared/props/trespasser_pad.c @@ -27,15 +27,15 @@ typedef struct TrespasserPadVars { u8 pad0[0x14]; - s32 unk14; - s32 unk18; - s32 unk1C; - u8 unk20[0x30]; - u8 unk50[0x30]; - u8 unk80[0x30]; - u8 unkB0[0x30]; - s32 unkE0; - f32 unkE4; + s32 ring_1_offset; + s32 ring_2_offset; + s32 ring_3_offset; + u8 ring_1[0x30]; + u8 ring_2[0x30]; + u8 ring_3[0x30]; + u8 markers[0x30]; + s32 turning_ring; + f32 turn_angle; } TrespasserPadVars; typedef float V2d8910[4] __attribute__((aligned(16))); @@ -508,7 +508,7 @@ void draw_tresspasser_puzzle(char *moby) { } ctx; int first_step, second_step; TrespasserPadVars *puzzle_state = (TrespasserPadVars *)MOBY(moby)->pvars; - Ring12 *markers = (Ring12 *)(&puzzle_state->unkB0); + Ring12 *markers = (Ring12 *)(&puzzle_state->markers); Ring12 *first_ring, *second_ring, *third; int i, state, third_step; @@ -529,16 +529,16 @@ void draw_tresspasser_puzzle(char *moby) { first_step = 0; second_step = 0; third_step = 0; - if (puzzle_state->unkE4 > 0.31415927f) { - state = puzzle_state->unkE0; + if (puzzle_state->turn_angle > 0.31415927f) { + state = puzzle_state->turning_ring; if (state == TRESSPASSER_SELECTED_RING_FIRST) first_step = 1; else if (state == TRESSPASSER_SELECTED_RING_SECOND) second_step = 1; else third_step = 1; - } else if (puzzle_state->unkE4 < -0.31415927f) { - state = puzzle_state->unkE0; + } else if (puzzle_state->turn_angle < -0.31415927f) { + state = puzzle_state->turning_ring; if (state == TRESSPASSER_SELECTED_RING_FIRST) first_step = -1; else if (state == TRESSPASSER_SELECTED_RING_SECOND) @@ -548,27 +548,27 @@ void draw_tresspasser_puzzle(char *moby) { } i = 0; - first_ring = (Ring12 *)(&puzzle_state->unk20); - second_ring = (Ring12 *)(&puzzle_state->unk50); - third = (Ring12 *)(&puzzle_state->unk80); + first_ring = (Ring12 *)(&puzzle_state->ring_1); + second_ring = (Ring12 *)(&puzzle_state->ring_2); + third = (Ring12 *)(&puzzle_state->ring_3); { int index, other, slot, draw_second, color; float angle, distance, phase; for (; i < 12; ++i) { draw_second = 1; phase = -0.31415927f; - if (puzzle_state->unkE0 == 1) - phase = fast_add_rotations(phase, puzzle_state->unkE4); + if (puzzle_state->turning_ring == 1) + phase = fast_add_rotations(phase, puzzle_state->turn_angle); angle = fast_add_rotations(phase, (float)(i * 30) * 0.017453292f); - index = i + puzzle_state->unk14; + index = i + puzzle_state->ring_1_offset; slot = index % 12; if (first_ring->slot[slot] == 2) { - other = i + puzzle_state->unk18 + first_step - second_step; + other = i + puzzle_state->ring_2_offset + first_step - second_step; color = tresspasser_default_radial_strip_color_gp; if (second_ring->slot[other % 12] != 0) distance = (float)tresspasser_second_ring_arrow_distance_gp; else { - int third_index = i + puzzle_state->unk1C + first_step - third_step; + int third_index = i + puzzle_state->ring_3_offset + first_step - third_step; if (third->slot[third_index % 12] != 0) distance = (float)tresspasser_third_ring_arrow_distance_gp; else if (third->slot[(third_index + 6) % 12] != 0) @@ -614,20 +614,21 @@ void draw_tresspasser_puzzle(char *moby) { draw_second = 1; phase = -0.31415927f; color = tresspasser_default_radial_strip_color_gp; - if (puzzle_state->unkE0 == 2) - phase = fast_add_rotations(phase, puzzle_state->unkE4); + if (puzzle_state->turning_ring == 2) + phase = fast_add_rotations(phase, puzzle_state->turn_angle); angle = fast_add_rotations(phase, (float)(i * 30) * 0.017453292f); - index = i + puzzle_state->unk18; + index = i + puzzle_state->ring_2_offset; slot = index % 12; if (second_ring->slot[slot] == 2) { - other = i + puzzle_state->unk1C + second_step - third_step; + other = i + puzzle_state->ring_3_offset + second_step - third_step; if (third->slot[other % 12] != 0) distance = (float)tresspasser_third_ring_arrow_distance_gp; else if (third->slot[(other + 6) % 12] != 0) distance = (float)-tresspasser_third_ring_arrow_distance_gp; else if (second_ring->slot[(index + 6) % 12] != 0) distance = (float)-tresspasser_second_ring_arrow_distance_gp; - else if (first_ring->slot[(i + puzzle_state->unk14 + second_step - first_step + 6) % + else if (first_ring->slot[(i + puzzle_state->ring_1_offset + second_step - + first_step + 6) % 12] != 0) distance = (float)-tresspasser_first_ring_arrow_distance_gp; else { @@ -666,21 +667,21 @@ void draw_tresspasser_puzzle(char *moby) { draw_second = 1; phase = -0.31415927f; color = tresspasser_default_radial_strip_color_gp; - if (puzzle_state->unkE0 == 3) - phase = fast_add_rotations(phase, puzzle_state->unkE4); + if (puzzle_state->turning_ring == 3) + phase = fast_add_rotations(phase, puzzle_state->turn_angle); angle = fast_add_rotations(phase, (float)(i * 30) * 0.017453292f); - index = i + puzzle_state->unk1C; + index = i + puzzle_state->ring_3_offset; slot = index % 12; if (third->slot[slot] == 2) { if (third->slot[(index + 6) % 12] != 0) distance = (float)-tresspasser_third_ring_arrow_distance_gp; - else if (second_ring - ->slot[(i + puzzle_state->unk18 + third_step - second_step + 6) % - 12] != 0) + else if (second_ring->slot[(i + puzzle_state->ring_2_offset + third_step - + second_step + 6) % + 12] != 0) distance = (float)-tresspasser_second_ring_arrow_distance_gp; - else if (first_ring - ->slot[(i + puzzle_state->unk14 + third_step - first_step + 6) % 12] != - 0) + else if (first_ring->slot[(i + puzzle_state->ring_1_offset + third_step - + first_step + 6) % + 12] != 0) distance = (float)-tresspasser_first_ring_arrow_distance_gp; else { int opposite; @@ -716,13 +717,13 @@ void draw_tresspasser_puzzle(char *moby) { float angle; for (i = 0; i < 12; ++i) { angle = -0.2617994f; - if (puzzle_state->unkE0 == 1) { + if (puzzle_state->turning_ring == 1) { color = fast_tween_color( tresspasser_selected_ring_base_color_gp, tresspasser_selected_ring_base_color_gp & 0xffffff, fast_sin((float)((D_L02_0015F5CC % 60) * 6) * 0.017453292f) * 0.5f + 0.5f); - if (puzzle_state->unkE4 != 0.0f) - angle = fast_add_rotations(angle, puzzle_state->unkE4); + if (puzzle_state->turn_angle != 0.0f) + angle = fast_add_rotations(angle, puzzle_state->turn_angle); } else color = tresspasser_unselected_ring_color_gp; angle = fast_add_rotations(angle, (float)(i * 30) * 0.017453292f); @@ -734,15 +735,15 @@ void draw_tresspasser_puzzle(char *moby) { (float)tresspasser_first_ring_arc_first_boundary_radius_gp, (float)tresspasser_first_ring_arc_second_boundary_radius_gp, color); - if (first_ring->slot[(i + puzzle_state->unk14) % 12] != 0) { - if (first_ring->slot[(i + puzzle_state->unk14) % 12] >= 3) { + if (first_ring->slot[(i + puzzle_state->ring_1_offset) % 12] != 0) { + if (first_ring->slot[(i + puzzle_state->ring_1_offset) % 12] >= 3) { draw_tresspasser_puzzle_arrow(ctx.texture, tresspasser_arrow_unused_argument_gp, 0, fast_add_rotations(angle, 0.2617994f), (float)tresspasser_first_ring_arrow_distance_gp); - first_ring->slot[(i + puzzle_state->unk14) % 12] = 2; - } else if (first_ring->slot[(i + puzzle_state->unk14) % 12] == 2) { + first_ring->slot[(i + puzzle_state->ring_1_offset) % 12] = 2; + } else if (first_ring->slot[(i + puzzle_state->ring_1_offset) % 12] == 2) { draw_tresspasser_puzzle_arrow(ctx.texture, tresspasser_arrow_unused_argument_gp, 1, @@ -763,13 +764,13 @@ void draw_tresspasser_puzzle(char *moby) { float angle; for (i = 0; i < 12; ++i) { angle = -0.2617994f; - if (puzzle_state->unkE0 == 2) { + if (puzzle_state->turning_ring == 2) { color = fast_tween_color( tresspasser_selected_ring_base_color_gp, tresspasser_selected_ring_base_color_gp & 0xffffff, fast_sin((float)((D_L02_0015F5CC % 60) * 6) * 0.017453292f) * 0.5f + 0.5f); - if (puzzle_state->unkE4 != 0.0f) - angle = fast_add_rotations(angle, puzzle_state->unkE4); + if (puzzle_state->turn_angle != 0.0f) + angle = fast_add_rotations(angle, puzzle_state->turn_angle); } else color = tresspasser_unselected_ring_color_gp; angle = fast_add_rotations(angle, (float)(i * 30) * 0.017453292f); @@ -781,15 +782,15 @@ void draw_tresspasser_puzzle(char *moby) { (float)tresspasser_second_ring_arc_first_boundary_radius_gp, (float)tresspasser_second_ring_arc_second_boundary_radius_gp, color); - if (second_ring->slot[(i + puzzle_state->unk18) % 12] != 0) { - if (second_ring->slot[(i + puzzle_state->unk18) % 12] >= 3) { + if (second_ring->slot[(i + puzzle_state->ring_2_offset) % 12] != 0) { + if (second_ring->slot[(i + puzzle_state->ring_2_offset) % 12] >= 3) { draw_tresspasser_puzzle_arrow(ctx.texture, tresspasser_arrow_unused_argument_gp, 0, fast_add_rotations(angle, 0.2617994f), (float)tresspasser_second_ring_arrow_distance_gp); - second_ring->slot[(i + puzzle_state->unk18) % 12] = 2; - } else if (second_ring->slot[(i + puzzle_state->unk18) % 12] == 2) { + second_ring->slot[(i + puzzle_state->ring_2_offset) % 12] = 2; + } else if (second_ring->slot[(i + puzzle_state->ring_2_offset) % 12] == 2) { draw_tresspasser_puzzle_arrow(ctx.texture, tresspasser_arrow_unused_argument_gp, 1, @@ -810,13 +811,13 @@ void draw_tresspasser_puzzle(char *moby) { float angle; for (i = 0; i < 12; ++i) { angle = -0.2617994f; - if (puzzle_state->unkE0 == 3) { + if (puzzle_state->turning_ring == 3) { color = fast_tween_color( tresspasser_selected_ring_base_color_gp, tresspasser_selected_ring_base_color_gp & 0xffffff, fast_sin((float)((D_L02_0015F5CC % 60) * 6) * 0.017453292f) * 0.5f + 0.5f); - if (puzzle_state->unkE4 != 0.0f) - angle = fast_add_rotations(angle, puzzle_state->unkE4); + if (puzzle_state->turn_angle != 0.0f) + angle = fast_add_rotations(angle, puzzle_state->turn_angle); } else color = tresspasser_unselected_ring_color_gp; angle = fast_add_rotations(angle, (float)(i * 30) * 0.017453292f); @@ -828,15 +829,15 @@ void draw_tresspasser_puzzle(char *moby) { (float)tresspasser_third_ring_arc_first_boundary_radius_gp, (float)tresspasser_third_ring_arc_second_boundary_radius_gp, color); - if (third->slot[(i + puzzle_state->unk1C) % 12] != 0) { - if (third->slot[(i + puzzle_state->unk1C) % 12] >= 3) { + if (third->slot[(i + puzzle_state->ring_3_offset) % 12] != 0) { + if (third->slot[(i + puzzle_state->ring_3_offset) % 12] >= 3) { draw_tresspasser_puzzle_arrow(ctx.texture, tresspasser_arrow_unused_argument_gp, 0, fast_add_rotations(angle, 0.2617994f), (float)tresspasser_third_ring_arrow_distance_gp); - third->slot[(i + puzzle_state->unk1C) % 12] = 2; - } else if (third->slot[(i + puzzle_state->unk1C) % 12] == 2) { + third->slot[(i + puzzle_state->ring_3_offset) % 12] = 2; + } else if (third->slot[(i + puzzle_state->ring_3_offset) % 12] == 2) { draw_tresspasser_puzzle_arrow(ctx.texture, tresspasser_arrow_unused_argument_gp, 1, diff --git a/src/overlays/shared/props/tumbling_part.c b/src/overlays/shared/props/tumbling_part.c index 140f08b451..f56761e98b 100644 --- a/src/overlays/shared/props/tumbling_part.c +++ b/src/overlays/shared/props/tumbling_part.c @@ -12,13 +12,13 @@ typedef struct TumblingPartVars { u8 pad0[0x8]; - f32 unk8; + f32 velocity_z; u8 padC[0x4]; - u8 unk10[0x10]; - f32 unk20[4]; - s32 unk30; - s32 unk34; - f32 unk38; + u8 rotation_step[0x10]; + f32 pivot_offset[4]; /* w: collision radius */ + s32 timer; + s32 options; + f32 gravity; } TumblingPartVars; extern float scale_time(float) __asm__("FUN_001f96b0"); @@ -79,28 +79,29 @@ void tumbling_part_update(char *moby) { mark_moby_for_removal(moby); return; case TUMBLING_PART_WAIT_FOR_TIMER: - if (func_001F9908_r((int *)(&moby_data->unk30))) { - MOBY(moby)->state = (moby_data->unk34 & 1) ? 3 : 2; - moby_data->unk30 = truncate_float_to_s32(scale_time(10.0f)); + if (func_001F9908_r((int *)(&moby_data->timer))) { + MOBY(moby)->state = (moby_data->options & 1) ? 3 : 2; + moby_data->timer = truncate_float_to_s32(scale_time(10.0f)); return; } break; case TUMBLING_PART_SPAWN_EFFECT_AND_REMOVE: - transform_vector_by_basis(effect_offset_or_world_position, &moby_data->unk20, moby + 0xC0); + transform_vector_by_basis( + effect_offset_or_world_position, &moby_data->pivot_offset, moby + 0xC0); fast_vec_add( effect_offset_or_world_position, effect_offset_or_world_position, &MOBY(moby)->pos); - if (moby_data->unk34 & 2) { + if (moby_data->options & 2) { spawn_color_swapped_explosion_burst( - moby, effect_offset_or_world_position, -1, moby_data->unk20[3] * 0.5f, 0.0f); + moby, effect_offset_or_world_position, -1, moby_data->pivot_offset[3] * 0.5f, 0.0f); } else { - float half_collision_radius = moby_data->unk20[3] * 0.5f; + float half_collision_radius = moby_data->pivot_offset[3] * 0.5f; spawn_explosion(moby, &zero_vector, effect_offset_or_world_position, 0.0f, 0.0f, 5, - moby_data->unk20[3], + moby_data->pivot_offset[3], 3, half_collision_radius, 9.0f, @@ -116,25 +117,26 @@ void tumbling_part_update(char *moby) { mark_moby_for_removal(moby); return; case TUMBLING_PART_FADE_AND_REMOVE: - if (func_001F9908_r((int *)(&moby_data->unk30))) { + if (func_001F9908_r((int *)(&moby_data->timer))) { mark_moby_for_removal(moby); return; } MOBY(moby)->alpha = - truncate_float_to_s32((float)moby_data->unk30 / scale_time(10.0f) * 128.0f); + truncate_float_to_s32((float)moby_data->timer / scale_time(10.0f) * 128.0f); break; } - rotation_step_euler = &moby_data->unk10; + rotation_step_euler = &moby_data->rotation_step; euler_rotation_basis(rotation_step_basis, rotation_step_euler); - transform_vector_by_basis(effect_offset_or_world_position, &moby_data->unk20, moby + 0xC0); + transform_vector_by_basis( + effect_offset_or_world_position, &moby_data->pivot_offset, moby + 0xC0); multiply_matrix3x3(moby + 0xC0, rotation_step_basis, moby + 0xC0); - transform_vector_by_basis(offset_after_rotation, &moby_data->unk20, moby + 0xC0); + transform_vector_by_basis(offset_after_rotation, &moby_data->pivot_offset, moby + 0xC0); fast_vec_sub(rotation_offset_delta, offset_after_rotation, effect_offset_or_world_position); fast_vec_sub((float *)&MOBY(moby)->pos, (float *)&MOBY(moby)->pos, rotation_offset_delta); fast_vec_add(&MOBY(moby)->pos, &MOBY(moby)->pos, moby_data); - collision_radius = moby_data->unk20[3]; - moby_data->unk8 = moby_data->unk8 - moby_data->unk38; - transform_vector_by_basis(collision_probe_position, &moby_data->unk20, moby + 0xC0); + collision_radius = moby_data->pivot_offset[3]; + moby_data->velocity_z = moby_data->velocity_z - moby_data->gravity; + transform_vector_by_basis(collision_probe_position, &moby_data->pivot_offset, moby + 0xC0); fast_vec_add(collision_probe_position, collision_probe_position, &MOBY(moby)->pos); if (func_L00_001F10E0_s(collision_probe_position, collision_radius, 0, moby)) { float speed, approach; From bf2a891264b9b40d0adaafb9a739c445960ed2af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:57:07 +0000 Subject: [PATCH 018/213] decomp: name moby-controlled camera fields in shared camera --- .../shared/camera/moby_controlled_camera.c | 177 +++++++++--------- 1 file changed, 90 insertions(+), 87 deletions(-) diff --git a/src/overlays/shared/camera/moby_controlled_camera.c b/src/overlays/shared/camera/moby_controlled_camera.c index 5498f35ca3..cbe193d540 100644 --- a/src/overlays/shared/camera/moby_controlled_camera.c +++ b/src/overlays/shared/camera/moby_controlled_camera.c @@ -17,26 +17,26 @@ typedef struct MobyCameraControl { u8 pad0[0xc]; - s32 unkC; - s32 unk10; - s32 unk14; + s32 activation_clip_volume; + s32 activation_cylinder; + s32 activation_path; u8 pad18[0x8]; - s16 unk20; - u8 unk22; + s16 active_frames; + u8 activation_by_distance; u8 pad23[0x1]; - f32 unk24; + f32 activation_distance; s32 target_moby_index; /* 0x28 */ - f32 unk2C; - f32 unk30; - f32 unk34; - f32 unk38; - s16 unk3C; + f32 axis_angle_limit_degrees; + f32 residual_angle_limit_degrees; + f32 camera_distance; + f32 camera_height; + s16 mode; s16 unk3E; - f32 unk40; - s32 unk44; + f32 heading; + s32 target_group; char *target; /* 0x48: moby the camera follows */ - f32 unk4C; - s32 unk50; + f32 camera_offset_scale; + s32 disabled; } MobyCameraControl; extern int test_point_in_transformed_unit_sphere(void *, int) __asm__("FUN_L00_0025faf0"); @@ -81,23 +81,24 @@ int test_moby_camera_control_activation(char *moby) { if (special != 0 && special == target) { return 1; } - if (camera_control_entry->unk3C == 6) { + if (camera_control_entry->mode == 6) { return (char *)hero.ground_moby == target; } - if (camera_control_entry->unk22 == 1) { - return fast_vec_dist(&hero.motion.pos, target + 0x10) < camera_control_entry->unk24; + if (camera_control_entry->activation_by_distance == 1) { + return fast_vec_dist(&hero.motion.pos, target + 0x10) < + camera_control_entry->activation_distance; } - if (camera_control_entry->unkC >= 0) { - hero_containment_result = - is_point_inside_clip_volume(&hero.motion.pos, camera_control_entry->unkC); + if (camera_control_entry->activation_clip_volume >= 0) { + hero_containment_result = is_point_inside_clip_volume( + &hero.motion.pos, camera_control_entry->activation_clip_volume); if (hero_containment_result == 0) { goto rejected; } return 1; } - if (camera_control_entry->unk10 >= 0) { - hero_containment_result = - test_point_in_transformed_unit_cylinder(&hero.motion.pos, camera_control_entry->unk10); + if (camera_control_entry->activation_cylinder >= 0) { + hero_containment_result = test_point_in_transformed_unit_cylinder( + &hero.motion.pos, camera_control_entry->activation_cylinder); if (hero_containment_result == 0) { goto rejected; } @@ -111,10 +112,10 @@ int test_moby_camera_control_activation(char *moby) { } return 1; } - if (camera_control_entry->unk14 < 0) { + if (camera_control_entry->activation_path < 0) { goto rejected; } - activation_path_record = (int *)D_L02_001B0AB0[camera_control_entry->unk14]; + activation_path_record = (int *)D_L02_001B0AB0[camera_control_entry->activation_path]; hero_containment_result = point_in_path_xy(&hero.motion.pos, activation_path_record + 4, *activation_path_record); if (hero_containment_result == 0) { @@ -209,16 +210,16 @@ void apply_moby_camera_control(char *moby) { float amount; float heading_vector[3]; - if (moby_camera_control_record->unk50 != 0) { - moby_camera_control_record->unk20 = 0; + if (moby_camera_control_record->disabled != 0) { + moby_camera_control_record->active_frames = 0; clear_follow_camera_volume_if_current(moby); return; } - index = moby_camera_control_record->unk44; + index = moby_camera_control_record->target_group; if (index >= 0) { group = (unsigned short *)D_L02_001ABE40[index]; if (group == 0) { - moby_camera_control_record->unk20 = -1; + moby_camera_control_record->active_frames = -1; clear_follow_camera_volume_if_current(moby); return; } @@ -235,7 +236,7 @@ void apply_moby_camera_control(char *moby) { if (*(signed char *)(first_group_target + 0x20) < 0) { do { if ((id << 16) < 0) { - moby_camera_control_record->unk20 = -1; + moby_camera_control_record->active_frames = -1; clear_follow_camera_volume_if_current(moby); return; } @@ -255,49 +256,49 @@ void apply_moby_camera_control(char *moby) { } else { target = (char *)(D_L02_0015FFD8 + (moby_camera_control_record->target_moby_index << 8)); if (*(signed char *)(target + 0x20) < 0) { - moby_camera_control_record->unk20 = -1; + moby_camera_control_record->active_frames = -1; clear_follow_camera_volume_if_current(moby); return; } } moby_camera_control_record->target = target; - if (moby_camera_control_record->unk3C == 6 && (char *)hero_lui.ground_moby != target) { - moby_camera_control_record->unk20 = 0; + if (moby_camera_control_record->mode == 6 && (char *)hero_lui.ground_moby != target) { + moby_camera_control_record->active_frames = 0; clear_follow_camera_volume_if_current(moby); return; } if (try_select_follow_camera_volume(moby) <= 0) { - moby_camera_control_record->unk20 = 0; + moby_camera_control_record->active_frames = 0; return; } if (test_moby_camera_control_activation(moby) == 0) { - moby_camera_control_record->unk20 = 0; + moby_camera_control_record->active_frames = 0; clear_follow_camera_volume_if_current(moby); return; } - if (moby_camera_control_record->unk3C == 5) { + if (moby_camera_control_record->mode == 5) { angle = fast_arc_tan(*(float *)D_L02_00167400_d, *(float *)(D_L02_00167400_d + 4)); - if (moby_camera_control_record->unk20 < 2) - moby_camera_control_record->unk40 = + if (moby_camera_control_record->active_frames < 2) + moby_camera_control_record->heading = *(float *)(l02_moby_record_table + *(short *)(moby + 0x84) * 32 + 0x18); else if (absolute_float(controller_state.analog[0]) >= 0.3f || absolute_float(controller_state.analog[1]) >= 0.3f) - moby_camera_control_record->unk40 = angle; - heading = moby_camera_control_record->unk40; + moby_camera_control_record->heading = angle; + heading = moby_camera_control_record->heading; if (fast_difference_between_rotations(heading, angle) > 1.5707964f) fast_add_rotations(heading, 3.1415927f); } - if (moby_camera_control_record->unk3C == 4) { + if (moby_camera_control_record->mode == 4) { heading = *(float *)(l02_moby_record_table + *(short *)(moby + 0x84) * 32 + 0x18); angle = fast_arc_tan(*(float *)D_L02_00167400_d, *(float *)(D_L02_00167400_d + 4)); if (fast_difference_between_rotations(heading, angle) > 1.5707964f) heading = fast_add_rotations(heading, 3.1415927f); - moby_camera_control_record->unk40 = heading; + moby_camera_control_record->heading = heading; } active = 1; scale = 1.0f; - moby_camera_control_record->unk20 += 1; - if (moby_camera_control_record->unk3C == 1) { + moby_camera_control_record->active_frames += 1; + if (moby_camera_control_record->mode == 1) { duration = scale_game_frames(300); count = scale_game_frames(400); end = scale_game_frames(560); @@ -308,10 +309,10 @@ void apply_moby_camera_control(char *moby) { end = scale_game_frames(400); frames = scale_game_frames(200); } - if (moby_camera_control_record->unk3C == 7) { + if (moby_camera_control_record->mode == 7) { if (controller_state.analog[0] != 0.0f) - moby_camera_control_record->unk20 = duration; - count = moby_camera_control_record->unk20; + moby_camera_control_record->active_frames = duration; + count = moby_camera_control_record->active_frames; if (count >= duration) { active = 0; moby_camera_control_record->unk3E += 1; @@ -320,62 +321,64 @@ void apply_moby_camera_control(char *moby) { active = 1; } } - if (moby_camera_control_record->unk20 >= end) { + if (moby_camera_control_record->active_frames >= end) { active = 1; moby_camera_control_record->unk3E = 0; - moby_camera_control_record->unk20 = 1; + moby_camera_control_record->active_frames = 1; } - if (frames < moby_camera_control_record->unk20 && - moby_camera_control_record->unk20 < duration) { + if (frames < moby_camera_control_record->active_frames && + moby_camera_control_record->active_frames < duration) { moby_camera_control_record->unk3E = duration; - moby_camera_control_record->unk20 = frames; + moby_camera_control_record->active_frames = frames; } - } else if ((unsigned short)(moby_camera_control_record->unk3C - 1) < 2) { + } else if ((unsigned short)(moby_camera_control_record->mode - 1) < 2) { set_follow_camera_control_word(176); set_nonzero_follow_camera_parameters(1.0f, 12.0f, 0.11f); if (controller_state.analog[0] != 0.0f || controller_state.analog[1] != 0.0f) - moby_camera_control_record->unk20 = duration; - if (moby_camera_control_record->unk20 >= duration) { + moby_camera_control_record->active_frames = duration; + if (moby_camera_control_record->active_frames >= duration) { int waited = (unsigned short)moby_camera_control_record->unk3E + 1; moby_camera_control_record->unk3E = waited; if ((short)waited >= count) { if (test_moby_camera_target_angle_limits(moby, 30.0f, 0.0f) != 0) - moby_camera_control_record->unk20 = end; + moby_camera_control_record->active_frames = end; else active = 0; } else { active = 0; } } - if (moby_camera_control_record->unk20 >= end) { + if (moby_camera_control_record->active_frames >= end) { active = 1; moby_camera_control_record->unk3E = 0; - moby_camera_control_record->unk20 = 1; + moby_camera_control_record->active_frames = 1; } - if (frames < moby_camera_control_record->unk20 && - moby_camera_control_record->unk20 < duration) { + if (frames < moby_camera_control_record->active_frames && + moby_camera_control_record->active_frames < duration) { moby_camera_control_record->unk3E = duration; - moby_camera_control_record->unk20 = frames; + moby_camera_control_record->active_frames = frames; } - } else if (frames < moby_camera_control_record->unk20) { - moby_camera_control_record->unk20 = frames; + } else if (frames < moby_camera_control_record->active_frames) { + moby_camera_control_record->active_frames = frames; } hit = 0; amount = *(float *)moby_camera_control_record * scale * 0.017453292f * - ((float)moby_camera_control_record->unk20 / convert_integer_to_float(frames)); + ((float)moby_camera_control_record->active_frames / convert_integer_to_float(frames)); if (active) { if (test_moby_camera_target_angle_limits( - moby, moby_camera_control_record->unk30, moby_camera_control_record->unk2C) != 0) { + moby, + moby_camera_control_record->residual_angle_limit_degrees, + moby_camera_control_record->axis_angle_limit_degrees) != 0) { hit = 1; - if ((unsigned short)(moby_camera_control_record->unk3C - 4) < 2) { - heading_vector[0] = fast_cos(moby_camera_control_record->unk40); - heading_vector[1] = fast_sin(moby_camera_control_record->unk40); + if ((unsigned short)(moby_camera_control_record->mode - 4) < 2) { + heading_vector[0] = fast_cos(moby_camera_control_record->heading); + heading_vector[1] = fast_sin(moby_camera_control_record->heading); heading_vector[2] = 0.0f; set_follow_camera_angle_blend_from_direction(amount, 0.0f, heading_vector); - } else if (moby_camera_control_record->unk3C == 3) { + } else if (moby_camera_control_record->mode == 3) { float speed; - if (moby_camera_control_record->unk20 < scale_game_frames(90)) - speed = (amount - 0.0f) * ((float)moby_camera_control_record->unk20 / + if (moby_camera_control_record->active_frames < scale_game_frames(90)) + speed = (amount - 0.0f) * ((float)moby_camera_control_record->active_frames / convert_integer_to_float(scale_game_frames(90))) + 0.0f; else @@ -386,44 +389,44 @@ void apply_moby_camera_control(char *moby) { } } } - if (moby_camera_control_record->unk34 != 0.0f) { - follow_camera_set_distance(0, moby_camera_control_record->unk34, 0.003f); + if (moby_camera_control_record->camera_distance != 0.0f) { + follow_camera_set_distance(0, moby_camera_control_record->camera_distance, 0.003f); FUN_L00_002e8620(); } - if (moby_camera_control_record->unk38 != 0.0f) - follow_camera_set_height(moby_camera_control_record->unk38, 0.003f); - if (moby_camera_control_record->unk4C != 0.0f) - follow_camera_set_offset_scale(0, moby_camera_control_record->unk4C, 0.005f); - if (moby_camera_control_record->unk3C == 3) { + if (moby_camera_control_record->camera_height != 0.0f) + follow_camera_set_height(moby_camera_control_record->camera_height, 0.003f); + if (moby_camera_control_record->camera_offset_scale != 0.0f) + follow_camera_set_offset_scale(0, moby_camera_control_record->camera_offset_scale, 0.005f); + if (moby_camera_control_record->mode == 3) { float heading; set_follow_camera_orbit_clamp_mode(0); FUN_L00_002e8620(); follow_camera_start_slide(); follow_camera_set_up_spring(0.01f, 0.2f); - if (moby_camera_control_record->unk20 >= scale_game_frames(120)) + if (moby_camera_control_record->active_frames >= scale_game_frames(120)) heading = 0.03f; else - heading = ((float)moby_camera_control_record->unk20 / + heading = ((float)moby_camera_control_record->active_frames / convert_integer_to_float(scale_game_frames(120))) * 0.02f + 0.01f; follow_camera_set_lateral_spring(heading, 0.2f); } - if ((unsigned short)(moby_camera_control_record->unk3C - 4) < 2) { + if ((unsigned short)(moby_camera_control_record->mode - 4) < 2) { set_follow_camera_orbit_clamp_mode(0); FUN_L00_002e8620(); follow_camera_start_slide(); follow_camera_set_up_spring(0.02f, 0.2f); follow_camera_set_distance(0, 5.84f, 0.003f); - if (moby_camera_control_record->unk3C == 4) { + if (moby_camera_control_record->mode == 4) { float angle; fast_vec_sub(heading_vector, target + 0x10, &hero.motion.pos); angle = fast_arc_tan(heading_vector[0], heading_vector[1]); - if (hit && fast_difference_between_rotations(angle, moby_camera_control_record->unk40) > - 1.9198622f) { - if (moby_camera_control_record->unk34 != 0.0f) + if (hit && fast_difference_between_rotations( + angle, moby_camera_control_record->heading) > 1.9198622f) { + if (moby_camera_control_record->camera_distance != 0.0f) follow_camera_set_distance( - 0, moby_camera_control_record->unk34 + 3.36f, 0.003f); + 0, moby_camera_control_record->camera_distance + 3.36f, 0.003f); else follow_camera_set_distance(0, 8.0f, 0.003f); } From 2757bff538abe38f2fd3d43450f8baade261c5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:57:07 +0000 Subject: [PATCH 019/213] decomp: name rotator, grindrail barrier, debris and light fields in shared props --- src/overlays/shared/props/electric_water.c | 12 +++--- src/overlays/shared/props/grindrail_barrier.c | 37 ++++++++++--------- src/overlays/shared/props/group_rotator.c | 36 +++++++++--------- src/overlays/shared/props/rock.c | 32 ++++++++-------- 4 files changed, 59 insertions(+), 58 deletions(-) diff --git a/src/overlays/shared/props/electric_water.c b/src/overlays/shared/props/electric_water.c index bf3b934521..0bb74efac5 100644 --- a/src/overlays/shared/props/electric_water.c +++ b/src/overlays/shared/props/electric_water.c @@ -55,9 +55,9 @@ typedef struct { } HitRecord; typedef struct { - float unk0; - float unk4; - float unk8; + float red; /* the colour, as PointLight.color */ + float green; + float blue; int unkC; Vec4 pos; /* w: radius */ } Light29FF90; @@ -293,10 +293,10 @@ void electric_water_update(struct Moby *moby) { } else { Light29FF90 *light = &D_L15_001808C0[electric_water_controller_vars->light]; qcopy(&light->pos, &electric_water_controller_vars->bolt_start); - light->unk0 = 1.0f; + light->red = 1.0f; light->pos.f[3] = 8.0f; - light->unk4 = 1.0f; - light->unk8 = 0.5f; + light->green = 1.0f; + light->blue = 0.5f; light->unkC = 0; } initialize_electric_water_bolt_effect((char *)moby); diff --git a/src/overlays/shared/props/grindrail_barrier.c b/src/overlays/shared/props/grindrail_barrier.c index 0327d7f7c3..4c3bf0b543 100644 --- a/src/overlays/shared/props/grindrail_barrier.c +++ b/src/overlays/shared/props/grindrail_barrier.c @@ -13,11 +13,11 @@ typedef struct GrindrailBarrierVars { u8 pad0[0x8]; - f32 unk8; - f32 unkC; - u8 unk10[0x10]; - s32 unk20; - s32 unk24; + f32 ring_rotation; + f32 ring_phase; + u8 accent_rotations[0x10]; + s32 release_moby_list; + s32 voice; } GrindrailBarrierVars; typedef struct { @@ -90,17 +90,18 @@ void grindrail_barrier_update(struct Moby *barrier_moby) { barrier_moby->update_dist = 0xFF; break; case GRINDRAIL_BARRIER_STATE_COLLISION_ENABLED: - cycle = barrier_data->unkC + *(float *)&grindrail_barrier_ring_phase_speed * frame_time; - barrier_data->unkC = cycle; + cycle = + barrier_data->ring_phase + *(float *)&grindrail_barrier_ring_phase_speed * frame_time; + barrier_data->ring_phase = cycle; if (cycle > 1.0f) - barrier_data->unkC = cycle - 1.0f; - if (voice_is_playing(barrier_moby, barrier_data->unk24) == 0) { - barrier_data->unk24 = allocate_voice_for_target_entry(0, 4, barrier_moby); + barrier_data->ring_phase = cycle - 1.0f; + if (voice_is_playing(barrier_moby, barrier_data->voice) == 0) { + barrier_data->voice = allocate_voice_for_target_entry(0, 4, barrier_moby); } - barrier_data->unk8 = fast_add_rotations(barrier_data->unk8, - *(float *)&grindrail_barrier_ring_rotation_speed * - DEG_TO_RAD * frame_time); - cardinal_angles = (float *)(&barrier_data->unk10); + barrier_data->ring_rotation = fast_add_rotations( + barrier_data->ring_rotation, + *(float *)&grindrail_barrier_ring_rotation_speed * DEG_TO_RAD * frame_time); + cardinal_angles = (float *)(&barrier_data->accent_rotations); for (i = 0; i < 4; i++) { cardinal_angles[i] = fast_add_rotations( cardinal_angles[i], @@ -108,15 +109,15 @@ void grindrail_barrier_update(struct Moby *barrier_moby) { } if (barrier_moby->visible) add_draw_callback(FUN_L16_002e58d8_u, barrier_moby); - if (barrier_data->unk20 != -1 && - check_grindrail_barrier_release_condition(barrier_data->unk20)) { + if (barrier_data->release_moby_list != -1 && + check_grindrail_barrier_release_condition(barrier_data->release_moby_list)) { barrier_moby->collision = 0; barrier_moby->state = GRINDRAIL_BARRIER_STATE_COLLISION_DISABLED; - group_trigger_nearest(barrier_data->unk20); + group_trigger_nearest(barrier_data->release_moby_list); } break; case GRINDRAIL_BARRIER_STATE_COLLISION_DISABLED: - if (!check_grindrail_barrier_release_condition(barrier_data->unk20)) { + if (!check_grindrail_barrier_release_condition(barrier_data->release_moby_list)) { barrier_moby->state = GRINDRAIL_BARRIER_STATE_COLLISION_ENABLED; barrier_moby->collision = barrier_moby->pclass->collision; } diff --git a/src/overlays/shared/props/group_rotator.c b/src/overlays/shared/props/group_rotator.c index 7629e4ffd0..48628f98e3 100644 --- a/src/overlays/shared/props/group_rotator.c +++ b/src/overlays/shared/props/group_rotator.c @@ -13,13 +13,13 @@ typedef struct Moby Moby; typedef struct { - float pos[4]; /* 0x00 */ - float unk10; /* 0x10 */ - float unk14; /* 0x14 */ - int unk18; /* 0x18 */ - int idx; /* 0x1C */ - float unk20; /* 0x20 */ - Moby *slots[7]; /* 0x24 */ + float pos[4]; /* 0x00 */ + float base_rot_x; /* 0x10 */ + float rotation; /* 0x14 */ + int unk18; /* 0x18 */ + int idx; /* 0x1C */ + float rotation_speed; /* 0x20 */ + Moby *slots[7]; /* 0x24 */ } Vars; extern char *create_moby(int) __asm__("FUN_0020c4f8"); @@ -67,7 +67,7 @@ void moby_rotation_group_update(Moby *moby) { switch (moby->state) { case SPAWN_CHILD_MOBYS: - moby_vars->unk10 = (*(float(*)[4]) & moby->rot)[0]; + moby_vars->base_rot_x = (*(float(*)[4]) & moby->rot)[0]; qcopy(moby_vars->pos, (*(float(*)[4]) & moby->pos)); moby->state = WAIT_FOR_TRIGGER_AND_CHILDREN; for (i = 0; i < 7; i++) { @@ -88,7 +88,7 @@ void moby_rotation_group_update(Moby *moby) { } break; case INITIALIZE_BASE_TRANSFORM: - moby_vars->unk10 = (*(float(*)[4]) & moby->rot)[0]; + moby_vars->base_rot_x = (*(float(*)[4]) & moby->rot)[0]; qcopy(moby_vars->pos, (*(float(*)[4]) & moby->pos)); moby->state = UPDATE_POSITION_FROM_BASE; fast_vec_normalize(position_offset, @@ -127,7 +127,7 @@ void moby_rotation_group_update(Moby *moby) { allocate_voice_for_target_entry(0, 0, moby); moby->state = ROTATE_AND_HIDE_AFTER_TRIGGER_AND_CHILDREN; moby_vars->unk18 = 0; - moby_vars->unk14 = 0.0f; + moby_vars->rotation = 0.0f; for (k = 0; k < 7; k++) { moby_vars->slots[k]->state = 5; } @@ -142,16 +142,16 @@ void moby_rotation_group_update(Moby *moby) { break; case ROTATE_AND_HIDE_AFTER_TRIGGER_AND_CHILDREN: case ROTATE_AND_HIDE: - approach_angle(&moby_vars->unk14, - &moby_vars->unk20, + approach_angle(&moby_vars->rotation, + &moby_vars->rotation_speed, 1.0471976f, rotation_group_angular_velocity_adjustment_degrees_gp * 0.017453292f * D_0015ED70, rotation_group_angular_deceleration_degrees_gp * 0.017453292f * D_0015ED70, rotation_group_max_angular_speed_degrees_gp * 0.017453292f * D_0015ED6C); (*(float(*)[4]) & moby->rot)[0] = - fast_subtract_rotations(moby_vars->unk10, moby_vars->unk14); - if (moby_vars->unk14 >= 1.0471976f) { + fast_subtract_rotations(moby_vars->base_rot_x, moby_vars->rotation); + if (moby_vars->rotation >= 1.0471976f) { moby->flags |= 1; (*(char *)&moby->visible) = 0; if (moby->state == ROTATE_AND_HIDE_AFTER_TRIGGER_AND_CHILDREN) { @@ -163,16 +163,16 @@ void moby_rotation_group_update(Moby *moby) { break; case RESTORE_ROTATION_THEN_WAIT_FOR_TRIGGER_AND_CHILDREN: case RESTORE_ROTATION_THEN_UPDATE_POSITION_FROM_BASE: - approach_angle(&moby_vars->unk14, - &moby_vars->unk20, + approach_angle(&moby_vars->rotation, + &moby_vars->rotation_speed, 0.0f, rotation_group_angular_velocity_adjustment_degrees_gp * 0.017453292f * D_0015ED70, rotation_group_angular_deceleration_degrees_gp * 0.017453292f * D_0015ED70, rotation_group_max_angular_speed_degrees_gp * 0.017453292f * D_0015ED6C); (*(float(*)[4]) & moby->rot)[0] = - fast_subtract_rotations(moby_vars->unk10, moby_vars->unk14); - if (moby_vars->unk14 <= 0.0f) { + fast_subtract_rotations(moby_vars->base_rot_x, moby_vars->rotation); + if (moby_vars->rotation <= 0.0f) { if (moby->state == RESTORE_ROTATION_THEN_WAIT_FOR_TRIGGER_AND_CHILDREN) { moby->state = WAIT_FOR_TRIGGER_AND_CHILDREN; } else { diff --git a/src/overlays/shared/props/rock.c b/src/overlays/shared/props/rock.c index a41b223daa..a574f326fb 100644 --- a/src/overlays/shared/props/rock.c +++ b/src/overlays/shared/props/rock.c @@ -18,14 +18,14 @@ /* pvars of the debris moby spawn_debris_chunk spawns */ typedef struct { - Vec4f vel; /* 0x00 */ - s32 unk10; /* 0x10 */ - f32 scale; /* 0x14 */ - f32 spin; /* 0x18: random spin, random sign */ - s32 life; /* 0x1C: frames */ - s32 unk20; /* 0x20 */ - f32 gravity; /* 0x24 */ - s32 unk28; /* 0x28 */ + Vec4f vel; /* 0x00 */ + s32 timer; /* 0x10 */ + f32 scale; /* 0x14 */ + f32 spin; /* 0x18: random spin, random sign */ + s32 life; /* 0x1C: frames */ + s32 fade_out; /* 0x20 */ + f32 gravity; /* 0x24 */ + s32 fade_frames; /* 0x28 */ } DebrisVars; extern s32 rand(void) __asm__("FUN_001160d8"); @@ -86,12 +86,12 @@ struct Moby *spawn_debris_chunk(Vec4f *pos, } else { initial_spin = random_spin_magnitude * spin; } - debris_vars->unk10 = initial_timer; - debris_vars->unk28 = initial_timer; + debris_vars->timer = initial_timer; + debris_vars->fade_frames = initial_timer; debris_vars->scale = scale; debris_vars->spin = initial_spin; debris_vars->life = truncate_float_to_s32(scale_time(seconds * 60.0f)); - debris_vars->unk20 = fade_out; + debris_vars->fade_out = fade_out; debris_vars->gravity = gravity * 9.8f * frame_time_sq; update_entity(debris_moby); } @@ -99,7 +99,7 @@ struct Moby *spawn_debris_chunk(Vec4f *pos, } /* Debris update: falls and spins, bounces off what it hits with a random kick, bursts into 40 sparks once it - comes to rest (or its unk10 timer runs out), or fades out over unk28 frames when unk20 is set. */ + comes to rest (or its timer runs out), or fades out over fade_frames frames when fade_out is set. */ void rock_update(struct Moby *m) __asm__("FUN_L01_002f8718"); /* Moby classes 200, 201, 205-207, 210, 696-698, 1806, 1807 */ @@ -151,8 +151,8 @@ void rock_update(struct Moby *debris_moby) { debris_vars->spin = spin; } } - if (debris_vars->unk20 == 0) { - if (fast_dec_timer(&debris_vars->unk10) == 0) { + if (debris_vars->fade_out == 0) { + if (fast_dec_timer(&debris_vars->timer) == 0) { if (!(fast_vec_length(&debris_vars->vel) < frame_time * 0.5f)) { return; } @@ -187,9 +187,9 @@ void rock_update(struct Moby *debris_moby) { scale_game_frames(random_int_between(20, 60))); } mark_moby_for_removal(debris_moby); - } else if (fast_dec_timer(&debris_vars->unk10) != 0) { + } else if (fast_dec_timer(&debris_vars->timer) != 0) { mark_moby_for_removal(debris_moby); } else { - debris_moby->alpha = debris_vars->unk10 * 127 / debris_vars->unk28; + debris_moby->alpha = debris_vars->timer * 127 / debris_vars->fade_frames; } } From 44353565ebf85cdcb41bda1ed9c12c944803e281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:57:07 +0000 Subject: [PATCH 020/213] decomp: name spline path, background ship and taxi path fields in shared vehicles --- .../shared/vehicles/background_ship_1.c | 48 ++-- .../shared/vehicles/background_ship_2.c | 48 ++-- src/overlays/shared/vehicles/gunship.c | 239 ++++++++++-------- src/overlays/shared/vehicles/taxi_path.c | 63 ++--- 4 files changed, 209 insertions(+), 189 deletions(-) diff --git a/src/overlays/shared/vehicles/background_ship_1.c b/src/overlays/shared/vehicles/background_ship_1.c index 24f77aaa0c..978753ab7e 100644 --- a/src/overlays/shared/vehicles/background_ship_1.c +++ b/src/overlays/shared/vehicles/background_ship_1.c @@ -25,15 +25,15 @@ typedef struct BackgroundShip1Vars { u8 unk2B; u8 unk2C; u8 pad2D[0x33]; - s32 unk60; + s32 path_index; f32 path_progress; - f32 unk68; - s32 unk6C; - f32 unk70; - f32 unk74; + f32 bob_phase; + s32 voice; + f32 first_segment_length; + f32 start_progress; u8 pad78[0x8]; - u8 unk80[0x30]; - s32 unkB0; + u8 joint_positions[0x30]; + s32 packed_glow_color; int *unkB4; } BackgroundShip1Vars; @@ -156,7 +156,7 @@ void prepare_background_ship_1_joint_billboards(char *moby) { return; } background_ship_data = (BackgroundShip1Vars *)MOBY(moby)->pvars; - joint_position_out = &background_ship_data->unk80; + joint_position_out = &background_ship_data->joint_positions; for (i = 0; i < 3; i++) { moby_point_position(moby, i + 3, joint_position_out); joint_position_out += 0x10; @@ -168,7 +168,7 @@ void prepare_background_ship_1_joint_billboards(char *moby) { packed_color = (r << 16) | 0x30000000; packed_color |= g << 8; packed_color |= b; - background_ship_data->unkB0 = packed_color; + background_ship_data->packed_glow_color = packed_color; if (current_global_value != 0) { cached_global_value_ptr = background_ship_data->unkB4; if (current_global_value != *cached_global_value_ptr) { @@ -201,7 +201,7 @@ void background_ship_1_update(char *moby) { int second_effect_frame_count; int third_effect_frame_count; moby_data = (BackgroundShip1Vars *)MOBY(moby)->pvars; - path = D_L02_001B0AB0[moby_data->unk60]; + path = D_L02_001B0AB0[moby_data->path_index]; hit_record = (int)find_moby_hit(moby, 0x10000, 0); switch (MOBY(moby)->state) { case BACKGROUND_SHIP_1_INITIALIZE: { @@ -209,37 +209,37 @@ void background_ship_1_update(char *moby) { MOBY(moby)->update_dist = 0xFF; MOBY(moby)->draw_dist = 0xFF; invalid_index = -1; - if (moby_data->unk60 == invalid_index) { + if (moby_data->path_index == invalid_index) { debug_print(background_ship_1_missing_path_message, ((short)MOBY(moby)->save_id)); mark_moby_for_removal(moby); return; } - if (*(int *)D_L02_001B0AB0[moby_data->unk60] == 0) { + if (*(int *)D_L02_001B0AB0[moby_data->path_index] == 0) { debug_print(background_ship_1_empty_path_message, ((short)MOBY(moby)->save_id)); mark_moby_for_removal(moby); return; } - first_path_segment_length = fast_vec_dist(D_L02_001B0AB0[moby_data->unk60] + 0x10, - D_L02_001B0AB0[moby_data->unk60] + 0x20); + first_path_segment_length = fast_vec_dist(D_L02_001B0AB0[moby_data->path_index] + 0x10, + D_L02_001B0AB0[moby_data->path_index] + 0x20); moby_data->unk2C = 0x28; - moby_data->unk70 = first_path_segment_length; + moby_data->first_segment_length = first_path_segment_length; moby_data->unk2B = 1; - qcopy(&MOBY(moby)->pos, D_L02_001B0AB0[moby_data->unk60] + 0x10); - moby_data->unk68 = random_angle_radians(); - moby_data->unk6C = invalid_index; + qcopy(&MOBY(moby)->pos, D_L02_001B0AB0[moby_data->path_index] + 0x10); + moby_data->bob_phase = random_angle_radians(); + moby_data->voice = invalid_index; MOBY(moby)->state = BACKGROUND_SHIP_1_FOLLOW_PATH; MOBY(moby)->flags |= 0x10; - moby_data->path_progress = moby_data->unk74 * (float)*(int *)path; + moby_data->path_progress = moby_data->start_progress * (float)*(int *)path; break; } case BACKGROUND_SHIP_1_FOLLOW_PATH: qcopy(tv, &MOBY(moby)->pos); - if (voice_is_playing(moby, moby_data->unk6C) == 0) { - moby_data->unk6C = func_0022ED80_r(1, 4, (int)moby); + if (voice_is_playing(moby, moby_data->voice) == 0) { + moby_data->voice = func_0022ED80_r(1, 4, (int)moby); } path_travel_distance = *(float *)&background_ship_1_path_travel_speed_gp * frame_time; moby_data->path_progress = - moby_data->path_progress + path_travel_distance / moby_data->unk70; + moby_data->path_progress + path_travel_distance / moby_data->first_segment_length; if ((float)*(int *)path < moby_data->path_progress) { moby_data->path_progress = moby_data->path_progress - (float)*(int *)path; } @@ -343,7 +343,7 @@ void background_ship_1_update(char *moby) { break; } if (MOBY(moby)->visible != 0) { - x = fast_sin(moby_data->unk68) * 4.0f - 3.0f; + x = fast_sin(moby_data->bob_phase) * 4.0f - 3.0f; if (1.0f < x) { x = 1.0f; } else if (x < 0.0f) { @@ -358,7 +358,7 @@ void background_ship_1_update(char *moby) { k = *(float *)&background_ship_1_color_phase_rate_degrees_gp * 0.017453292f * frame_time; MOBY(moby)->glow_color = tweened_color; - moby_data->unk68 = fast_add_rotations(moby_data->unk68, k); + moby_data->bob_phase = fast_add_rotations(moby_data->bob_phase, k); } prepare_background_ship_1_joint_billboards(moby); } diff --git a/src/overlays/shared/vehicles/background_ship_2.c b/src/overlays/shared/vehicles/background_ship_2.c index 15d3aca22b..06e9ebfb80 100644 --- a/src/overlays/shared/vehicles/background_ship_2.c +++ b/src/overlays/shared/vehicles/background_ship_2.c @@ -25,15 +25,15 @@ typedef struct BackgroundShip2Vars { u8 unk2B; u8 unk2C; u8 pad2D[0x33]; - s32 unk60; + s32 path_index; f32 path_progress; - f32 unk68; - s32 unk6C; - f32 unk70; - f32 unk74; + f32 bob_phase; + s32 voice; + f32 first_segment_length; + f32 start_progress; u8 pad78[0x8]; - u8 unk80[0x60]; - s32 unkE0; + u8 joint_positions[0x60]; + s32 packed_glow_color; int *unkE4; } BackgroundShip2Vars; @@ -178,7 +178,7 @@ void prepare_background_ship_2_joint_draw_data(char *moby) { return; } background_ship_2_data = (BackgroundShip2Vars *)MOBY(moby)->pvars; - joint_position_out = &background_ship_2_data->unk80; + joint_position_out = &background_ship_2_data->joint_positions; for (i = 0; i < 6; i++) { moby_point_position(moby, i + 2, joint_position_out); joint_position_out += 0x10; @@ -190,7 +190,7 @@ void prepare_background_ship_2_joint_draw_data(char *moby) { packed_color = (r << 16) | 0x30000000; packed_color |= g << 8; packed_color |= b; - background_ship_2_data->unkE0 = packed_color; + background_ship_2_data->packed_glow_color = packed_color; if (current_global_value != 0) { cached_global_value_ptr = background_ship_2_data->unkE4; if (current_global_value != *cached_global_value_ptr) { @@ -224,7 +224,7 @@ void background_ship_2_update(char *moby) { int second_effect_frame_count; int third_effect_frame_count; moby_data = (BackgroundShip2Vars *)MOBY(moby)->pvars; - path = D_L02_001B0AB0[moby_data->unk60]; + path = D_L02_001B0AB0[moby_data->path_index]; hit_record = (int)find_moby_hit(moby, 0x10000, 0); switch (MOBY(moby)->state) { case BACKGROUND_SHIP_2_INITIALIZE: { @@ -235,27 +235,27 @@ void background_ship_2_update(char *moby) { MOBY(moby)->scale = MOBY(moby)->scale * 0.5f; } invalid_index = -1; - if (moby_data->unk60 == invalid_index) { + if (moby_data->path_index == invalid_index) { debug_print(background_ship_2_missing_path_message, ((short)MOBY(moby)->save_id)); mark_moby_for_removal(moby); return; } - if (*(int *)D_L02_001B0AB0[moby_data->unk60] == 0) { + if (*(int *)D_L02_001B0AB0[moby_data->path_index] == 0) { debug_print(background_ship_2_empty_path_message, ((short)MOBY(moby)->save_id)); mark_moby_for_removal(moby); return; } - first_path_segment_length = fast_vec_dist(D_L02_001B0AB0[moby_data->unk60] + 0x10, - D_L02_001B0AB0[moby_data->unk60] + 0x20); + first_path_segment_length = fast_vec_dist(D_L02_001B0AB0[moby_data->path_index] + 0x10, + D_L02_001B0AB0[moby_data->path_index] + 0x20); moby_data->unk2C = 0x28; - moby_data->unk70 = first_path_segment_length; + moby_data->first_segment_length = first_path_segment_length; moby_data->unk2B = 1; - qcopy(&MOBY(moby)->pos, D_L02_001B0AB0[moby_data->unk60] + 0x10); - moby_data->unk68 = random_angle_radians(); - moby_data->unk6C = invalid_index; + qcopy(&MOBY(moby)->pos, D_L02_001B0AB0[moby_data->path_index] + 0x10); + moby_data->bob_phase = random_angle_radians(); + moby_data->voice = invalid_index; MOBY(moby)->state = BACKGROUND_SHIP_2_FOLLOW_PATH; MOBY(moby)->flags |= 0x10; - moby_data->path_progress = moby_data->unk74 * (float)*(int *)path; + moby_data->path_progress = moby_data->start_progress * (float)*(int *)path; break; } case BACKGROUND_SHIP_2_FOLLOW_PATH: @@ -264,15 +264,15 @@ void background_ship_2_update(char *moby) { return; } qcopy(tv, &MOBY(moby)->pos); - if (voice_is_playing(moby, moby_data->unk6C) == 0) { - moby_data->unk6C = allocate_voice_for_target_entry(1, 4, (int)moby); + if (voice_is_playing(moby, moby_data->voice) == 0) { + moby_data->voice = allocate_voice_for_target_entry(1, 4, (int)moby); } path_travel_distance = background_ship_2_path_travel_speed_gp * frame_time; if (current_level_index == LEVEL_ORXON) { path_travel_distance = path_travel_distance * 0.25f; } moby_data->path_progress = - moby_data->path_progress + path_travel_distance / moby_data->unk70; + moby_data->path_progress + path_travel_distance / moby_data->first_segment_length; if ((float)*(int *)path < moby_data->path_progress) { moby_data->path_progress = moby_data->path_progress - (float)*(int *)path; } @@ -380,7 +380,7 @@ void background_ship_2_update(char *moby) { break; } if (MOBY(moby)->visible != 0) { - x = fast_sin(moby_data->unk68) * 4.0f - 3.0f; + x = fast_sin(moby_data->bob_phase) * 4.0f - 3.0f; if (1.0f < x) { x = 1.0f; } else if (x < 0.0f) { @@ -393,7 +393,7 @@ void background_ship_2_update(char *moby) { background_ship_2_color_tween_start_gp, background_ship_2_color_tween_end_gp, x); k = background_ship_2_color_phase_rate_degrees_gp * 0.017453292f * frame_time; MOBY(moby)->glow_color = tweened_color; - moby_data->unk68 = fast_add_rotations(moby_data->unk68, k); + moby_data->bob_phase = fast_add_rotations(moby_data->bob_phase, k); } prepare_background_ship_2_joint_draw_data(moby); } diff --git a/src/overlays/shared/vehicles/gunship.c b/src/overlays/shared/vehicles/gunship.c index d2970fca80..4274dfc7c3 100644 --- a/src/overlays/shared/vehicles/gunship.c +++ b/src/overlays/shared/vehicles/gunship.c @@ -49,40 +49,40 @@ typedef struct { typedef struct { u8 pad0[0x60]; - PathCursor path; /* 0x60 */ - QVec unk80; /* 0x80 */ - QVec unk90; /* 0x90 */ - QVec unkA0; /* 0xA0 */ - QVec unkB0; /* 0xB0 */ - QVec unkC0; /* 0xC0 */ - QVec unkD0; /* 0xD0 */ - QVec unkE0; /* 0xE0 */ - f32 unkF0; + PathCursor path; /* 0x60 */ + QVec unk80; /* 0x80 */ + QVec segment_start_tangent; /* 0x90 */ + QVec segment_end_tangent; /* 0xA0 */ + QVec segment_start; /* 0xB0 */ + QVec segment_end; /* 0xC0 */ + QVec spline_position; /* 0xD0 */ + QVec prev_spline_position; /* 0xE0 */ + f32 segment_t; f32 unkF4; f32 unkF8; - f32 unkFC; - f32 unk100; - f32 unk104; - f32 unk108; - f32 unk10C; - f32 unk110; - f32 unk114; + f32 speed; + f32 roll_spring_rate_degrees; + f32 roll_spring_velocity; + f32 pitch_spring_rate_degrees; + f32 pitch_spring_velocity; + f32 turn_smoothing; + f32 turn_to_roll; f32 unk118; - s16 unk11C; - s16 unk11E; - u8 unk120; + s16 movement_delay_timer; + s16 voice; + u8 options; u8 unk121; - s16 unk122; - f32 unk124; - f32 unk128; - f32 unk12C; + s16 yaw_offset_degrees; + f32 speed_oscillation_amplitude; + f32 speed_oscillation_rate_degrees; + f32 speed_oscillation_phase; f32 unk130; f32 unk134; - s16 unk138; + s16 ambient_sound_timer; s16 unk13A; - s16 unk13C; - s16 unk13E; - s32 unk140[4]; + s16 ambient_sound_min_frames; + s16 ambient_sound_extra_frames; + s32 attached_mobys[4]; } Vars; typedef struct { @@ -250,7 +250,7 @@ void gunship_update(struct Moby *moby) { Vars *iv = (Vars *)it->pvars; bad = 3; it->state = bad; - iv->unk11C = scale_game_frames(5); + iv->movement_delay_timer = scale_game_frames(5); get_next_moby_in_group(&it, it, 0, 0); } } @@ -259,31 +259,37 @@ void gunship_update(struct Moby *moby) { if ((moby->oclass == 0x33 || moby->oclass == 0x46A || moby->oclass == 0x473 || moby->oclass == 0x474) && (level_frame_count & 7) == (((s32)moby >> 8) & 7) && v->unk13A <= 0 && - moby->state != GUNSHIP_PATH_STATE_INITIALIZE && FUN_L00_0028d8c0(moby, v->unk11E) == 0) { - v->unk11E = allocate_voice_for_target_entry(0, 4, moby); + moby->state != GUNSHIP_PATH_STATE_INITIALIZE && FUN_L00_0028d8c0(moby, v->voice) == 0) { + v->voice = allocate_voice_for_target_entry(0, 4, moby); } switch ((s16)(moby->oclass - 0x33)) { case 0: case 9: case 23: - if (v->unk138 != -1) { - if (!fast_dec_timer_s16(&v->unk138)) + if (v->ambient_sound_timer != -1) { + if (!fast_dec_timer_s16(&v->ambient_sound_timer)) break; if (fast_vec_dist(&moby->pos, camera_pos) < 30.0f) allocate_voice_for_target_entry(1, 0, moby); } - v->unk138 = scale_game_frames(random_int_between(v->unk13C, v->unk13C + v->unk13E)); + v->ambient_sound_timer = scale_game_frames( + random_int_between(v->ambient_sound_min_frames, + v->ambient_sound_min_frames + v->ambient_sound_extra_frames)); break; case 13: case 17: /* Fakematch: duplicating the reset preserves retail's voice-call argument scheduling. */ - if (v->unk138 != -1) { - if (!fast_dec_timer_s16(&v->unk138)) + if (v->ambient_sound_timer != -1) { + if (!fast_dec_timer_s16(&v->ambient_sound_timer)) break; FUN_0022da68((FUN_00213260(100) & 1) ? 1 : 2, 0, (char *)moby); - v->unk138 = scale_game_frames(random_int_between(v->unk13C, v->unk13C + v->unk13E)); + v->ambient_sound_timer = scale_game_frames( + random_int_between(v->ambient_sound_min_frames, + v->ambient_sound_min_frames + v->ambient_sound_extra_frames)); } else { - v->unk138 = scale_game_frames(random_int_between(v->unk13C, v->unk13C + v->unk13E)); + v->ambient_sound_timer = scale_game_frames( + random_int_between(v->ambient_sound_min_frames, + v->ambient_sound_min_frames + v->ambient_sound_extra_frames)); } break; } @@ -300,7 +306,7 @@ void gunship_update(struct Moby *moby) { truncate_float_to_s32((f32)(moby - (struct Moby *)D_L01_0015FFD8))); } moby->update_dist = 0xFF; - v->unk11E = -1; + v->voice = -1; if (500.0f < v->unk130) v->unk130 = FUN_002132a8(-1.0f, 1.0f) * v->unk130 / 1000.0f; if (500.0f < v->unk134) @@ -330,34 +336,36 @@ void gunship_update(struct Moby *moby) { path_cursor->unk8 = 0; path_cursor->unk1C = 0; } - v->unkE0.q = (path_cursor->nodes->node + path_cursor->idx)->q; - v->unkF0 = 1.0f; - compute_path_node_tangent(&v->unkA0, path_cursor, 0, v->unkF4, v->unkF8); - v->unkB0.q = v->unkC0.q = (path_cursor->nodes->node + path_cursor->idx)->q; + v->prev_spline_position.q = (path_cursor->nodes->node + path_cursor->idx)->q; + v->segment_t = 1.0f; + compute_path_node_tangent(&v->segment_end_tangent, path_cursor, 0, v->unkF4, v->unkF8); + v->segment_start.q = v->segment_end.q = (path_cursor->nodes->node + path_cursor->idx)->q; *(s32 *)&moby->rot.x = 0; - moby->rot.y = -fast_arc_tan(vector_length_xy(&v->unkA0), v->unkA0.v.z); - moby->rot.z = fast_arc_tan(v->unkA0.v.x - zero.v.x, v->unkA0.v.y - zero.v.y); - v->unk104 = 0; - v->unk10C = 0; - *(u128 *)&moby->pos = v->unkE0.q; + moby->rot.y = + -fast_arc_tan(vector_length_xy(&v->segment_end_tangent), v->segment_end_tangent.v.z); + moby->rot.z = fast_arc_tan(v->segment_end_tangent.v.x - zero.v.x, + v->segment_end_tangent.v.y - zero.v.y); + v->roll_spring_velocity = 0; + v->pitch_spring_velocity = 0; + *(u128 *)&moby->pos = v->prev_spline_position.q; apply_gunship_path_position_offsets((char *)moby, (float *)&moby->pos); v->unk121 = 7; - if (6.2831855f < v->unk12C) { - v->unk12C = v->unk12C * 0.017453292f; - } else if (v->unk124 != 0.0f && v->unk12C == -1.0f) { - v->unk12C = FUN_00213308(); + if (6.2831855f < v->speed_oscillation_phase) { + v->speed_oscillation_phase = v->speed_oscillation_phase * 0.017453292f; + } else if (v->speed_oscillation_amplitude != 0.0f && v->speed_oscillation_phase == -1.0f) { + v->speed_oscillation_phase = FUN_00213308(); } - v->unkD0.q = v->unkC0.q; + v->spline_position.q = v->segment_end.q; compute_sampled_spline_path_lengths( - v->unkF4, v->unkF8, path_cursor, v->unk120 & 0x20, moby); - if ((v->unk120 & 0x1E) && !(v->unk120 & 1)) { + v->unkF4, v->unkF8, path_cursor, v->options & 0x20, moby); + if ((v->options & 0x1E) && !(v->options & 1)) { s32 i; for (i = 0; i < 4; i++) { struct Moby *c; ChildVars *cv; - if (!(v->unk120 & (2 << i)) || v->unk140[i] == -1) + if (!(v->options & (2 << i)) || v->attached_mobys[i] == -1) continue; - c = (struct Moby *)D_L01_0015FFD8 + v->unk140[i]; + c = (struct Moby *)D_L01_0015FFD8 + v->attached_mobys[i]; if (c == 0 || (cv = (ChildVars *)c->pvars) == 0) continue; cv->unk70 |= 0x1000; @@ -368,7 +376,7 @@ void gunship_update(struct Moby *moby) { cv->unk80.q = dA0.q; } } - if (v->unk11C > 0) { + if (v->movement_delay_timer > 0) { moby->state = GUNSHIP_PATH_STATE_WAIT_FOR_RESUME_TIMER; return; } @@ -381,17 +389,17 @@ void gunship_update(struct Moby *moby) { if (path_cursor->path_id == -1) return; moby->state = GUNSHIP_PATH_STATE_INITIALIZE; - if (v->unk11E != -1) { - u8 *e = (u8 *)((char *)&voice_pool) + v->unk11E * 0x70; + if (v->voice != -1) { + u8 *e = (u8 *)((char *)&voice_pool) + v->voice * 0x70; if (*(struct Moby **)(e + 0x88) == moby && e[0x74] != 0) - FUN_0022d798(v->unk11E); + FUN_0022d798(v->voice); } - v->unk11E = -1; + v->voice = -1; return; case GUNSHIP_PATH_STATE_WAIT_FOR_RESUME_TIMER: - if (fast_dec_timer_s16(&v->unk11C)) { - v->unk11C = 0; + if (fast_dec_timer_s16(&v->movement_delay_timer)) { + v->movement_delay_timer = 0; moby->state = GUNSHIP_PATH_STATE_FOLLOW_PATH; } return; @@ -405,90 +413,99 @@ void gunship_update(struct Moby *moby) { previous_rotation.q = *(u128 *)&moby->rot; previous_position.q = *(u128 *)&moby->pos; - if (1.0f <= v->unkF0) { + if (1.0f <= v->segment_t) { s32 advanced_node_index; - v->unkF0 -= 1.0f; + v->segment_t -= 1.0f; advanced_node_index = advance_path_node_index(path_cursor); - v->unk90.q = v->unkA0.q; - compute_path_node_tangent(&v->unkA0, path_cursor, 1, v->unkF4, v->unkF8); - v->unkB0.q = v->unkC0.q; - v->unkC0.q = (path_cursor->nodes->node + - resolve_path_node_index(path_cursor, advanced_node_index + 1)) - ->q; + v->segment_start_tangent.q = v->segment_end_tangent.q; + compute_path_node_tangent(&v->segment_end_tangent, path_cursor, 1, v->unkF4, v->unkF8); + v->segment_start.q = v->segment_end.q; + v->segment_end.q = (path_cursor->nodes->node + + resolve_path_node_index(path_cursor, advanced_node_index + 1)) + ->q; } { - f32 speed_modulation_sine = fast_sin(v->unk12C); - path_speed = v->unkFC + v->unk124 * D_0015ED60 * speed_modulation_sine * D_0015ED60; - segment_progress_step = path_speed / v->unkB0.v.w; - v->unk12C = fast_add_rotations(v->unk12C, v->unk128 * D_0015ED60 * 0.017453292f); + f32 speed_modulation_sine = fast_sin(v->speed_oscillation_phase); + path_speed = v->speed + v->speed_oscillation_amplitude * D_0015ED60 * + speed_modulation_sine * D_0015ED60; + segment_progress_step = path_speed / v->segment_start.v.w; + v->speed_oscillation_phase = + fast_add_rotations(v->speed_oscillation_phase, + v->speed_oscillation_rate_degrees * D_0015ED60 * 0.017453292f); } - v->unkE0.q = v->unkD0.q; - evaluate_cubic_hermite_segment( - v->unkF0 + segment_progress_step, &v->unkD0, &v->unkB0, &v->unkC0, &v->unk90, &v->unkA0); - if (!(v->unk120 & 0x40)) { - f32 dd = fast_vec_dist(&v->unkE0, &v->unkD0); + v->prev_spline_position.q = v->spline_position.q; + evaluate_cubic_hermite_segment(v->segment_t + segment_progress_step, + &v->spline_position, + &v->segment_start, + &v->segment_end, + &v->segment_start_tangent, + &v->segment_end_tangent); + if (!(v->options & 0x40)) { + f32 dd = fast_vec_dist(&v->prev_spline_position, &v->spline_position); if (dd != 0.0f) { segment_progress_step = segment_progress_step * (path_speed / dd); - evaluate_cubic_hermite_segment(v->unkF0 + segment_progress_step, - &v->unkD0, - &v->unkB0, - &v->unkC0, - &v->unk90, - &v->unkA0); + evaluate_cubic_hermite_segment(v->segment_t + segment_progress_step, + &v->spline_position, + &v->segment_start, + &v->segment_end, + &v->segment_start_tangent, + &v->segment_end_tangent); } } if (!frozen) { f32 k = 0.017453292f; f32 steering_angle; f32 turn; - f32 yaw_offset_radians = (f32)v->unk122 * k; + f32 yaw_offset_radians = (f32)v->yaw_offset_degrees * k; fast_subtract_rotations(moby->rot.z, yaw_offset_radians); - steering_angle = fast_arc_tan(v->unkD0.v.x - v->unkE0.v.x, v->unkD0.v.y - v->unkE0.v.y); + steering_angle = fast_arc_tan(v->spline_position.v.x - v->prev_spline_position.v.x, + v->spline_position.v.y - v->prev_spline_position.v.y); steering_angle = fast_add_rotations(steering_angle, yaw_offset_radians); steering_angle = fast_subtract_rotations(steering_angle, moby->rot.z); - turn = steering_angle * (1.0f / v->unk110 * D_0015ED60); + turn = steering_angle * (1.0f / v->turn_smoothing * D_0015ED60); moby->rot.z = fast_add_rotations(turn, moby->rot.z); - fast_vec_sub(&path_displacement, &v->unkD0, &v->unkE0); + fast_vec_sub(&path_displacement, &v->spline_position, &v->prev_spline_position); steering_angle = -fast_arc_tan(vector_length_xy(&path_displacement), path_displacement.v.z); - moby->rot.y = FUN_L00_00258110(&v->unk10C, + moby->rot.y = FUN_L00_00258110(&v->pitch_spring_velocity, moby->rot.y, steering_angle, - v->unk108 * 10.0f * k * D_0015ED70, - v->unk108 * 5.0f * k * D_0015ED70, - v->unk108 * k * D_0015ED6C); - steering_angle = normalize_angle(turn * v->unk114); + v->pitch_spring_rate_degrees * 10.0f * k * D_0015ED70, + v->pitch_spring_rate_degrees * 5.0f * k * D_0015ED70, + v->pitch_spring_rate_degrees * k * D_0015ED6C); + steering_angle = normalize_angle(turn * v->turn_to_roll); steering_angle = fast_subtract_rotations(moby->rot.x, steering_angle); steering_angle = normalize_angle(steering_angle * v->unk118); - moby->rot.x = FUN_L00_00258110(&v->unk104, + moby->rot.x = FUN_L00_00258110(&v->roll_spring_velocity, moby->rot.x, steering_angle, - v->unk100 * 10.0f * k * D_0015ED70, - v->unk100 * 5.0f * k * D_0015ED70, - v->unk100 * k * D_0015ED6C); + v->roll_spring_rate_degrees * 10.0f * k * D_0015ED70, + v->roll_spring_rate_degrees * 5.0f * k * D_0015ED70, + v->roll_spring_rate_degrees * k * D_0015ED6C); } else { clear_u64_value(&moby->rot); - moby->rot.z = fast_arc_tan(v->unkD0.v.x - v->unkE0.v.x, v->unkD0.v.y - v->unkE0.v.y); + moby->rot.z = fast_arc_tan(v->spline_position.v.x - v->prev_spline_position.v.x, + v->spline_position.v.y - v->prev_spline_position.v.y); } - v->unkF0 += segment_progress_step; - *(u128 *)&moby->pos = v->unkE0.q; + v->segment_t += segment_progress_step; + *(u128 *)&moby->pos = v->prev_spline_position.q; if (!frozen) apply_gunship_path_position_offsets((char *)moby, (float *)&moby->pos); - if (v->unk120 & 0x1F) { + if (v->options & 0x1F) { s32 attachment_point_index = 0; s32 i; for (i = 0; i < 5; i++) { - if (!((v->unk120 >> i) & 1)) + if (!((v->options >> i) & 1)) continue; moby_point_position(moby, attachment_point_index, &attachment_and_hit_vectors[0]); attachment_point_index++; fast_vec_sub( &attachment_and_hit_vectors[1], &attachment_and_hit_vectors[0], &moby->pos); - if (!(v->unk120 & 1)) { + if (!(v->options & 1)) { struct Moby *c; ChildVars *cv; - if (v->unk140[i - 1] == -1) + if (v->attached_mobys[i - 1] == -1) continue; - c = (struct Moby *)D_L01_0015FFD8 + v->unk140[i - 1]; + c = (struct Moby *)D_L01_0015FFD8 + v->attached_mobys[i - 1]; if (c == 0 || (cv = (ChildVars *)c->pvars) == 0) continue; fast_vec_normalize( @@ -573,11 +590,11 @@ void gunship_update(struct Moby *moby) { } moby->collision = 0; moby->flags |= 0x41; - if (v->unk11E != -1) { - u8 *e = (u8 *)((char *)&voice_pool) + v->unk11E * 0x70; + if (v->voice != -1) { + u8 *e = (u8 *)((char *)&voice_pool) + v->voice * 0x70; if (*(struct Moby **)(e + 0x88) == moby && e[0x74] != 0) - FUN_0022d798(v->unk11E); + FUN_0022d798(v->voice); } - v->unk11E = -1; + v->voice = -1; moby->flags &= 0xEFFF; } diff --git a/src/overlays/shared/vehicles/taxi_path.c b/src/overlays/shared/vehicles/taxi_path.c index a1a5aea2dc..6d367f8747 100644 --- a/src/overlays/shared/vehicles/taxi_path.c +++ b/src/overlays/shared/vehicles/taxi_path.c @@ -13,17 +13,20 @@ typedef struct TaxiVars { u8 pad0[0x60]; - u8 unk60[0x10]; - u8 unk70[0x3c]; - int *unkAC; + u8 pose_position[0x10]; + u8 pose_rotation[0x3c]; + int *route_path; u8 padB0[0x4]; - s16 unkB4; - s16 unkB6; + s16 stop_index; + s16 destination_stop; u8 padB8[0x8]; - f32 unkC0[4]; - f32 unkD0; - f32 unkD4; - f32 unkD8; + f32 path_t; /* 0xC0: 0..1 along route_path */ + f32 path_t_speed; + f32 wobble_phase_1; + f32 wobble_phase_2; + f32 wobble_phase_3; + f32 path_speed; + f32 path_acceleration; s32 unkDC; } TaxiVars; @@ -49,21 +52,21 @@ void reset_selected_moby_to_current_placement(void *moby_v) __asm__("FUN_L05_003 void reset_selected_moby_to_current_placement(void *moby_v) { struct Moby *moby = moby_v; TaxiVars *taxi_vars = (TaxiVars *)moby->pvars; - char *spawn = func_L05_0031AAA8_19510(moby, taxi_vars->unkB6); + char *spawn = func_L05_0031AAA8_19510(moby, taxi_vars->destination_stop); char *position; if (spawn != 0) { int index; char *slot = taxi_vars; char *placement_table_base; position = spawn + 0x10; - slot += taxi_vars->unkB4 << 2; + slot += taxi_vars->stop_index << 2; index = *(int *)(slot + 0x80) << 7; placement_table_base = (char *)l05_cuboids; qcopy(position, (void *)(index + (int)placement_table_base + 0x30)); qcopy(spawn + 0x40, (void *)(index + (int)placement_table_base + 0x70)); initialize_taxi_stop_state(spawn); } - taxi_vars->unkB4 = *(unsigned short *)&taxi_vars->unkB6; + taxi_vars->stop_index = *(unsigned short *)&taxi_vars->destination_stop; } /* Finds the pool moby in this moby's class list whose data id at 0xB4 matches. */ @@ -97,19 +100,19 @@ int advance_moby_path(char *moby) { TaxiVars *moby_vars = (TaxiVars *)MOBY(moby)->pvars; int *path; advance_accelerated_scalar(1.0f, - moby_vars->unkD8, - moby_vars->unkD8, - moby_vars->unkD4, - (float *)(&moby_vars->unkC0), - (float *)(&moby_vars->unkC0[1])); - path = moby_vars->unkAC; + moby_vars->path_acceleration, + moby_vars->path_acceleration, + moby_vars->path_speed, + (float *)(&moby_vars->path_t), + (float *)(&moby_vars->path_t_speed)); + path = moby_vars->route_path; sample_camera_path(path, 0, - &moby_vars->unk60, - (float *)(&moby_vars->unk70), + &moby_vars->pose_position, + (float *)(&moby_vars->pose_rotation), 0, - moby_vars->unkC0[0] * (float)(*path - 1)); - return moby_vars->unkC0[0] >= 1.0f; + moby_vars->path_t * (float)(*path - 1)); + return moby_vars->path_t >= 1.0f; } /* Plays the sound that goes with the moby's current variant. */ @@ -148,20 +151,20 @@ void apply_moby_position_and_rotation_wobble(char *moby) __asm__("FUN_L05_003197 void apply_moby_position_and_rotation_wobble(char *moby) { TaxiVars *moby_vars = (TaxiVars *)MOBY(moby)->pvars; float wobble_phase, wobble_result, wobble_phase_step; - qcopy(&MOBY(moby)->pos, &moby_vars->unk60); - qcopy(moby + 0x40, &moby_vars->unk70); - wobble_phase = fast_add_rotations(moby_vars->unkC0[2], frame_time * 2.0943951f); - moby_vars->unkC0[2] = wobble_phase; + qcopy(&MOBY(moby)->pos, &moby_vars->pose_position); + qcopy(moby + 0x40, &moby_vars->pose_rotation); + wobble_phase = fast_add_rotations(moby_vars->wobble_phase_1, frame_time * 2.0943951f); + moby_vars->wobble_phase_1 = wobble_phase; wobble_result = fast_sin(wobble_phase); wobble_phase_step = frame_time * 1.6929693f; MOBY(moby)->pos.z += wobble_result * 0.25f; - wobble_phase = fast_add_rotations(moby_vars->unkC0[3], wobble_phase_step); - moby_vars->unkC0[3] = wobble_phase; + wobble_phase = fast_add_rotations(moby_vars->wobble_phase_2, wobble_phase_step); + moby_vars->wobble_phase_2 = wobble_phase; wobble_result = fast_add_rotations(MOBY(moby)->rot.y, fast_sin(wobble_phase) * 0.08726646f); wobble_phase_step = frame_time * 0.9250245f; MOBY(moby)->rot.y = wobble_result; - wobble_phase = fast_add_rotations(moby_vars->unkD0, wobble_phase_step); - moby_vars->unkD0 = wobble_phase; + wobble_phase = fast_add_rotations(moby_vars->wobble_phase_3, wobble_phase_step); + moby_vars->wobble_phase_3 = wobble_phase; MOBY(moby)->rot.x = fast_add_rotations(MOBY(moby)->rot.x, fast_sin(wobble_phase) * 0.08726646f); if (MOBY(moby)->rot.x > 0.17453292f) MOBY(moby)->rot.x = 0.17453292f; From b9aa6e2e8360e951efc7b7664d995e33b42e6d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:57:08 +0000 Subject: [PATCH 021/213] decomp: name decoy and ryno rocket fields in shared weapons --- src/overlays/shared/weapons/decoy.c | 133 +++++++++++---------- src/overlays/shared/weapons/ryno_rocket.c | 136 ++++++++++++---------- 2 files changed, 141 insertions(+), 128 deletions(-) diff --git a/src/overlays/shared/weapons/decoy.c b/src/overlays/shared/weapons/decoy.c index ee4d936ef2..4637f549af 100644 --- a/src/overlays/shared/weapons/decoy.c +++ b/src/overlays/shared/weapons/decoy.c @@ -40,19 +40,19 @@ enum { typedef struct DecoyVars { u8 pad0[0x10]; - f32 unk10[4]; + f32 velocity[4]; u8 pad20[0x20]; - char *unk40; - s16 unk44; + char *holder; + s16 timer; s16 unk46; - f32 unk48; - f32 unk4C; - f32 unk50; - s32 unk54; - s32 unk58; - s32 unk5C; + f32 health; + f32 target_rot_x; + f32 target_rot_y; + s32 frame_count; + s32 last_hit_source; + s32 same_source_hit_timer; u8 pad60[0xc]; - s16 unk6C; + s16 hit_cooldown_timer; s8 hit_cooldown_latched; s8 collision_voice_cooldown; } DecoyVars; @@ -583,13 +583,14 @@ void decoy_update(char *moby) { mark_moby_for_removal(moby); return; } - ++decoy_instance_vars->unk54; + ++decoy_instance_vars->frame_count; if (hero.hidden != 0 && (u8)MOBY(moby)->state < DECOY_THROWN_MOVEMENT) MOBY(moby)->flags |= 0x41; else MOBY(moby)->flags &= 0xffbe; - if (*(short *)(decoy_instance_vars->unk40 + 0xa6) == 0x232 && decoy_instance_vars->unk46 == 0 && - FUN_001ff3d8_2c4380(&decoy_instance_vars->unk10) > 0.0f) { + if (*(short *)(decoy_instance_vars->holder + 0xa6) == 0x232 && + decoy_instance_vars->unk46 == 0 && + FUN_001ff3d8_2c4380(&decoy_instance_vars->velocity) > 0.0f) { if (hero.ground_moby == 0 || !FUN_L00_002603d0((int)hero.ground_moby)) predict_thrown_moby_landing((ThrowVars *)decoy_instance_vars, (struct Moby *)moby, 1); else if (!predict_thrown_moby_landing( @@ -599,15 +600,15 @@ void decoy_update(char *moby) { switch ((u8)MOBY(moby)->state) { case DECOY_INITIALIZE: MOBY(moby)->state = DECOY_HELD; - decoy_instance_vars->unk44 = 0; + decoy_instance_vars->timer = 0; MOBY(moby)->collision_disable = -1; - decoy_instance_vars->unk6C = 0; + decoy_instance_vars->hit_cooldown_timer = 0; decoy_instance_vars->hit_cooldown_latched = 0; break; case DECOY_HELD: { char *target; - decoy_instance_vars->unk44 = 0; - target = decoy_instance_vars->unk40; + decoy_instance_vars->timer = 0; + target = decoy_instance_vars->holder; if (target && (((u8)target[0x20] & 0xf0) != 0xf0) && hero.items[0].moby && hero.items[0].moby->oclass == 0x232) return; @@ -619,7 +620,7 @@ void decoy_update(char *moby) { if (MOBY(moby)->scale < *(float *)(*(char **)(moby + 0x24) + 0x24)) MOBY(moby)->scale += frame_scale * 0.02f; qcopy(position_effect_and_normal_scratch, &MOBY(moby)->pos); - decoy_instance_vars->unk10[2] -= frame_time_sq * 9.0f; + decoy_instance_vars->velocity[2] -= frame_time_sq * 9.0f; for (i = 1; i <= D_L00_001B0830_lui[0]; ++i) { char *target; ids = D_L00_001B0830_lui + i; @@ -633,55 +634,57 @@ void decoy_update(char *moby) { if (len < 1.8f) { FUN_001ff300_2c4380((1.8f - len) * 0.015f, scratch.w, scratch.w); FUN_001ff278_2c4380( - &decoy_instance_vars->unk10, &decoy_instance_vars->unk10, scratch.w); + &decoy_instance_vars->velocity, &decoy_instance_vars->velocity, scratch.w); } } } if (hero.state.current == 0x1e) *(int *)((char *)hero.moby + 0x94) = 0; - hit = FUN_L00_00258830(moby, &decoy_instance_vars->unk10, 0.2f, 0.2f, 0.0f, 0); + hit = FUN_L00_00258830(moby, &decoy_instance_vars->velocity, 0.2f, 0.2f, 0.0f, 0); if (hit & 1) { qcopy(scratch.w, &MOBY(moby)->pos); scratch.w[2] += 0.2f; if (coll_sphere(scratch.w, 0.23f, 0, moby)) { - if (decoy_instance_vars->unk10[2] < 0.0f) { + if (decoy_instance_vars->velocity[2] < 0.0f) { float len; FUN_001ff2a8_2c4380(scratch.x, &MOBY(moby)->pos, &hero.motion.pos); scratch.x[2] = 0.0f; len = FUN_001ff3d8_2c4380(scratch.x); if (len < 1.8f) { FUN_001ff300_2c4380((1.8f - len) * 0.015f, scratch.x, scratch.x); - FUN_001ff278_2c4380( - &decoy_instance_vars->unk10, &decoy_instance_vars->unk10, scratch.x); + FUN_001ff278_2c4380(&decoy_instance_vars->velocity, + &decoy_instance_vars->velocity, + scratch.x); } } - reflect_vector( - &decoy_instance_vars->unk10, &decoy_instance_vars->unk10, &coll_hit.normal_x); + reflect_vector(&decoy_instance_vars->velocity, + &decoy_instance_vars->velocity, + &coll_hit.normal_x); if (coll_hit.moby != 0 && coll_hit.unk1C <= 0) FUN_001ff300_2c4380( - 1.05f, &decoy_instance_vars->unk10, &decoy_instance_vars->unk10); + 1.05f, &decoy_instance_vars->velocity, &decoy_instance_vars->velocity); else FUN_001ff300_2c4380( - 0.2f, &decoy_instance_vars->unk10, &decoy_instance_vars->unk10); + 0.2f, &decoy_instance_vars->velocity, &decoy_instance_vars->velocity); rate = 0.01f; - len = FUN_001ff3d8_2c4380(&decoy_instance_vars->unk10); + len = FUN_001ff3d8_2c4380(&decoy_instance_vars->velocity); if (len < frame_scale * rate || (hero.ground_moby && FUN_L00_002603d0((int)hero.ground_moby) && - FUN_001ff3d8_2c4380(&decoy_instance_vars->unk10) < + FUN_001ff3d8_2c4380(&decoy_instance_vars->velocity) < frame_scale * rate + FUN_001ff3d8_2c4380(&hero.motion.displacement))) { angle = FUN_001ff8b0_2c4380(coll_hit.normal_z, FUN_001ff408_2c4380(&coll_hit.normal_x)); if (angle < 0.61086524f) { - ++decoy_instance_vars->unk44; + ++decoy_instance_vars->timer; if (coll_hit.moby == 0 || coll_hit.unk1C > 0 || - decoy_instance_vars->unk44 > FUN_001fef20_2c4380(240)) { + decoy_instance_vars->timer > FUN_001fef20_2c4380(240)) { if (((u8 *)moby)[0x53] != 1) blend_moby_animation(moby, 1, 0, FUN_001fef20_2c4380(10)); *(int *)(moby + 0x94) = *(int *)(*(char **)(moby + 0x24) + 0x10); MOBY(moby)->collision_disable = 0; - qzero(&decoy_instance_vars->unk10); + qzero(&decoy_instance_vars->velocity); MOBY(moby)->state = DECOY_SETTLED_MOVEMENT; - decoy_instance_vars->unk44 = FUN_001fef20_2c4380(600); + decoy_instance_vars->timer = FUN_001fef20_2c4380(600); MOBY(moby)->pos.z = coll_hit.point.f[2]; qcopy(scratch.x, &coll_hit.normal_x); cos_angle = FUN_001ff7e8_2c4380(MOBY(moby)->rot.z); @@ -691,20 +694,22 @@ void decoy_update(char *moby) { sin_angle = FUN_001ff800_2c4380(MOBY(moby)->rot.z); rotated_normal[1] = scratch.x[1] * cos_angle - scratch.x[0] * sin_angle; rotated_normal[2] = scratch.x[2]; - decoy_instance_vars->unk4C = -FUN_001ff8b0_2c4380( + decoy_instance_vars->target_rot_x = -FUN_001ff8b0_2c4380( FUN_001ff1e0_2c4380(rotated_normal[0] * rotated_normal[0] + rotated_normal[2] * rotated_normal[2]), rotated_normal[1]); - decoy_instance_vars->unk50 = + decoy_instance_vars->target_rot_y = FUN_001ff8b0_2c4380(rotated_normal[2], rotated_normal[0]); rate = 0.1f; MOBY(moby)->rot.x = FUN_002000e8_2c4380( MOBY(moby)->rot.x, - FUN_00200130_2c4380(decoy_instance_vars->unk4C, MOBY(moby)->rot.x) * + FUN_00200130_2c4380(decoy_instance_vars->target_rot_x, + MOBY(moby)->rot.x) * (frame_scale * rate)); MOBY(moby)->rot.y = FUN_002000e8_2c4380( MOBY(moby)->rot.y, - FUN_00200130_2c4380(decoy_instance_vars->unk50, MOBY(moby)->rot.y) * + FUN_00200130_2c4380(decoy_instance_vars->target_rot_y, + MOBY(moby)->rot.y) * (frame_scale * rate)); } } @@ -714,7 +719,7 @@ void decoy_update(char *moby) { allocate_voice_for_target_entry(0, 0, moby), decoy_instance_vars->collision_voice_cooldown = FUN_001fef20_2c4380(20); else - add_random_offset_to_vector_xyz(frame_time, &decoy_instance_vars->unk10); + add_random_offset_to_vector_xyz(frame_time, &decoy_instance_vars->velocity); } } if (hero.state.current == 0x1e) { @@ -725,31 +730,31 @@ void decoy_update(char *moby) { case DECOY_SETTLED_MOVEMENT: case DECOY_PRE_REMOVAL_DELAY: hit = FUN_L00_0025a420(moby, 0x30001, 0); - MOBY(moby)->rot.x = - FUN_002000e8_2c4380(MOBY(moby)->rot.x, - FUN_00200130_2c4380(decoy_instance_vars->unk4C, MOBY(moby)->rot.x) * - (frame_scale * 0.1f)); - MOBY(moby)->rot.y = - FUN_002000e8_2c4380(MOBY(moby)->rot.y, - FUN_00200130_2c4380(decoy_instance_vars->unk50, MOBY(moby)->rot.y) * - (frame_scale * 0.1f)); + MOBY(moby)->rot.x = FUN_002000e8_2c4380( + MOBY(moby)->rot.x, + FUN_00200130_2c4380(decoy_instance_vars->target_rot_x, MOBY(moby)->rot.x) * + (frame_scale * 0.1f)); + MOBY(moby)->rot.y = FUN_002000e8_2c4380( + MOBY(moby)->rot.y, + FUN_00200130_2c4380(decoy_instance_vars->target_rot_y, MOBY(moby)->rot.y) * + (frame_scale * 0.1f)); update_decoy_proximity_motion((S_2c40a0 *)moby); - FUN_001fef68_2c4380(&decoy_instance_vars->unk5C); - fast_dec_timer_s16(&decoy_instance_vars->unk6C); + FUN_001fef68_2c4380(&decoy_instance_vars->same_source_hit_timer); + fast_dec_timer_s16(&decoy_instance_vars->hit_cooldown_timer); if (hit) { target = (char *)hit; - if (*(int *)(target + 0x20) != decoy_instance_vars->unk58 || - decoy_instance_vars->unk5C <= 0) { - decoy_instance_vars->unk58 = *(int *)(target + 0x20); - decoy_instance_vars->unk5C = FUN_001fef20_2c4380(30); + if (*(int *)(target + 0x20) != decoy_instance_vars->last_hit_source || + decoy_instance_vars->same_source_hit_timer <= 0) { + decoy_instance_vars->last_hit_source = *(int *)(target + 0x20); + decoy_instance_vars->same_source_hit_timer = FUN_001fef20_2c4380(30); /* Fakematch: the empty loop keeps the timer read below the cooldown store. */ do { } while (0); - if (decoy_instance_vars->unk6C == 0) { + if (decoy_instance_vars->hit_cooldown_timer == 0) { if (*(u16 *)(target + 0x28) == 0x101 && ((*(u64 *)((char *)decoy_instance_vars + 0x68) & 0xffffff00000000ULL) == 0)) { - decoy_instance_vars->unk6C = FUN_001fef20_2c4380(100); + decoy_instance_vars->hit_cooldown_timer = FUN_001fef20_2c4380(100); decoy_instance_vars->hit_cooldown_latched = 1; } else decoy_instance_vars->hit_cooldown_latched = 0; @@ -757,10 +762,10 @@ void decoy_update(char *moby) { { float len = *(float *)(target + 0x2c); ((u8 *)decoy_instance_vars)[7] = 0xfa; - decoy_instance_vars->unk48 -= len; + decoy_instance_vars->health -= len; } trooper_anim_update(moby, decoy_instance_vars); - if (decoy_instance_vars->unk48 < 0.0f) { + if (decoy_instance_vars->health < 0.0f) { *(OvlQuad *)scratch.w = 0; scratch.w[0] = frame_scale * 0.5f; scratch.w[2] = frame_scale * 0.7f; @@ -813,13 +818,13 @@ void decoy_update(char *moby) { if (len != 0.0f) { destroy_decoy_on_selected_materials(moby); if (len + 0.02f < MOBY(moby)->pos.z) { - decoy_instance_vars->unk10[2] -= frame_time_sq * 9.8f; + decoy_instance_vars->velocity[2] -= frame_time_sq * 9.8f; FUN_001ff278_2c4380( - &MOBY(moby)->pos, &MOBY(moby)->pos, &decoy_instance_vars->unk10); + &MOBY(moby)->pos, &MOBY(moby)->pos, &decoy_instance_vars->velocity); len = probe_ground_height(&MOBY(moby)->pos, 0, 0.5f); if (MOBY(moby)->pos.z < len) { MOBY(moby)->pos.z = len; - qzero(&decoy_instance_vars->unk10); + qzero(&decoy_instance_vars->velocity); qcopy(position_effect_and_normal_scratch, &coll_hit.normal_x); cos_angle = FUN_001ff7e8_2c4380(MOBY(moby)->rot.z); sin_angle = FUN_001ff800_2c4380(MOBY(moby)->rot.z); @@ -830,15 +835,15 @@ void decoy_update(char *moby) { scratch.w[1] = position_effect_and_normal_scratch[1] * cos_angle - position_effect_and_normal_scratch[0] * sin_angle; scratch.w[2] = position_effect_and_normal_scratch[2]; - decoy_instance_vars->unk4C = + decoy_instance_vars->target_rot_x = -FUN_001ff8b0_2c4380(FUN_001ff1e0_2c4380(scratch.w[0] * scratch.w[0] + scratch.w[2] * scratch.w[2]), scratch.w[1]); - decoy_instance_vars->unk50 = + decoy_instance_vars->target_rot_y = FUN_001ff8b0_2c4380(scratch.w[2], scratch.w[0]); } } else - qzero(&decoy_instance_vars->unk10); + qzero(&decoy_instance_vars->velocity); if (coll_hit.moby) FUN_L00_00260400(moby, coll_hit.moby, @@ -850,7 +855,7 @@ void decoy_update(char *moby) { } else { if (MOBY(moby)->scale < *(float *)(*(char **)(moby + 0x24) + 0x24)) MOBY(moby)->scale += frame_scale * 0.02f; - if (fast_dec_timer_s16(&decoy_instance_vars->unk44)) { + if (fast_dec_timer_s16(&decoy_instance_vars->timer)) { if (((u8 *)moby)[0x53]) blend_moby_animation(moby, 0, 0, FUN_001fef20_2c4380(60)); mine_spawn_drops(moby, D_L00_001B0830_lui); @@ -865,7 +870,7 @@ void decoy_update(char *moby) { moby, coll_hit.moby, &MOBY(moby)->pos, moby + 0x40, &MOBY(moby)->pos, moby + 0x40); if (MOBY(moby)->anim_flags & 2) *(int *)(moby + 0x58) = 0; - if (fast_dec_timer_s16(&decoy_instance_vars->unk44) || (MOBY(moby)->anim_flags & 2)) + if (fast_dec_timer_s16(&decoy_instance_vars->timer) || (MOBY(moby)->anim_flags & 2)) MOBY(moby)->state = DECOY_SHRINK_FOR_REMOVAL; break; case DECOY_SHRINK_FOR_REMOVAL: { diff --git a/src/overlays/shared/weapons/ryno_rocket.c b/src/overlays/shared/weapons/ryno_rocket.c index 13a94a6c4c..c8bc7cd95f 100644 --- a/src/overlays/shared/weapons/ryno_rocket.c +++ b/src/overlays/shared/weapons/ryno_rocket.c @@ -14,21 +14,21 @@ typedef struct RynoRocketVars { u8 pad0[0x10]; - u8 unk10[0x10]; - char *unk20; - s32 unk24; - char *unk28; - f32 unk2C; - f32 unk30; - s32 unk34; - s32 unk38; + u8 path_position[0x10]; + char *owner; + s32 life_timer; + char *target; + f32 target_height_offset; + f32 speed; + s32 yaw_velocity; + s32 pitch_velocity; u8 pad3C[0x8]; - f32 unk44; - f32 unk48; - f32 unk4C; - f32 unk50; - f32 unk54; - s32 unk58; + f32 wobble_radius; + f32 wobble_angle; + f32 wobble_phase; + f32 wobble_angle_rate; + f32 wobble_phase_rate; + s32 target_class; } RynoRocketVars; typedef union { @@ -150,34 +150,34 @@ void ryno_rocket_update(char *rocket_moby) { *(float *)(rocket_moby + 0x2C) = a + (*(float *)(*(char **)(rocket_moby + 0x24) + 0x24) - a) * (k60 * 0.05f); { - float e = rocket_vars->unk30; - rocket_vars->unk30 = e + (k * 20.0f - e) * (k60 * 0.1f) * k64; + float e = rocket_vars->speed; + rocket_vars->speed = e + (k * 20.0f - e) * (k60 * 0.1f) * k64; } } steering_timer_threshold = scale_game_frames_c(250); steering_timer_threshold -= scale_game_frames_c(5); - if (rocket_vars->unk24 < steering_timer_threshold) { - target_moby = rocket_vars->unk28; - if (target_moby == 0 || *(short *)(target_moby + 0xA6) != rocket_vars->unk58 || + if (rocket_vars->life_timer < steering_timer_threshold) { + target_moby = rocket_vars->target; + if (target_moby == 0 || *(short *)(target_moby + 0xA6) != rocket_vars->target_class || *(unsigned char *)(target_moby + 0x20) == 0xFE || *(unsigned char *)(target_moby + 0x20) == 0xFD) { - rocket_vars->unk44 = rocket_vars->unk44 + D_0015ED60 * 0.1f; - *(int *)&rocket_vars->unk28 = 0; + rocket_vars->wobble_radius = rocket_vars->wobble_radius + D_0015ED60 * 0.1f; + *(int *)&rocket_vars->target = 0; steering_timer_threshold = scale_game_frames_c(250); steering_timer_threshold -= scale_game_frames_c(100); - if (rocket_vars->unk24 < steering_timer_threshold) { + if (rocket_vars->life_timer < steering_timer_threshold) { *(float *)(rocket_moby + 0x44) = fast_add_rotations(*(float *)(rocket_moby + 0x44), - fast_sin(rocket_vars->unk48) * (D_0015ED60 * 0.04f)); + fast_sin(rocket_vars->wobble_angle) * (D_0015ED60 * 0.04f)); } *(float *)(rocket_moby + 0x48) = fast_add_rotations(*(float *)(rocket_moby + 0x48), - fast_cos(rocket_vars->unk48) * (D_0015ED60 * 0.05f)); + fast_cos(rocket_vars->wobble_angle) * (D_0015ED60 * 0.05f)); } else { qcopy(&u.v.c, target_moby + 0x10); - u.v.c.f[2] = u.v.c.f[2] + rocket_vars->unk2C; + u.v.c.f[2] = u.v.c.f[2] + rocket_vars->target_height_offset; fast_vec_sub(&u.v.b, &u.v.c, rocket_vars); - fast_vec_sub(&u.v.a, &u.v.c, &rocket_vars->unk10); + fast_vec_sub(&u.v.a, &u.v.c, &rocket_vars->path_position); qcopy(rocket_vars, &u.v.c); { float target_displacement_length_squared = FUN_L00_001ff430(&u.v.b); @@ -185,7 +185,7 @@ void ryno_rocket_update(char *rocket_moby) { (u.v.b.f[0] * u.v.a.f[0] + u.v.b.f[1] * u.v.a.f[1] + u.v.b.f[2] * u.v.a.f[2]) * -2.0f; float fA = - rocket_vars->unk30 * rocket_vars->unk30 - target_displacement_length_squared; + rocket_vars->speed * rocket_vars->speed - target_displacement_length_squared; float r2f = FUN_L00_001ff430(&u.v.a); float sq = square_root(fB * fB - (4.0f * fA) * (-r2f)); float intercept_root_plus = (-fB + sq) / (fA + fA); @@ -207,32 +207,34 @@ void ryno_rocket_update(char *rocket_moby) { add_vector_xyz(&intercept_direction, &intercept_direction, &u.v.a); intercept_angle_scratch = fast_arc_tan(intercept_direction.f[0], intercept_direction.f[1]); - *(float *)(rocket_moby + 0x48) = FUN_L00_00258110((float *)(&rocket_vars->unk34), - *(float *)(rocket_moby + 0x48), - intercept_angle_scratch, - D_0015ED70 * 188.49556f, - 0.0f, - 0.0f); + *(float *)(rocket_moby + 0x48) = + FUN_L00_00258110((float *)(&rocket_vars->yaw_velocity), + *(float *)(rocket_moby + 0x48), + intercept_angle_scratch, + D_0015ED70 * 188.49556f, + 0.0f, + 0.0f); intercept_angle_scratch = fast_arc_tan(vector_length_xy(&intercept_direction), intercept_direction.f[2]); - *(float *)(rocket_moby + 0x44) = FUN_L00_00258110((float *)(&rocket_vars->unk38), - *(float *)(rocket_moby + 0x44), - -intercept_angle_scratch, - D_0015ED70 * 188.49556f, - 0.0f, - 0.0f); + *(float *)(rocket_moby + 0x44) = + FUN_L00_00258110((float *)(&rocket_vars->pitch_velocity), + *(float *)(rocket_moby + 0x44), + -intercept_angle_scratch, + D_0015ED70 * 188.49556f, + 0.0f, + 0.0f); } s = fast_vec_length(&u.v.a); if (s < 6.0f) { - rocket_vars->unk44 = rocket_vars->unk44 * (s / 6.0f); + rocket_vars->wobble_radius = rocket_vars->wobble_radius * (s / 6.0f); } else { - rocket_vars->unk44 = rocket_vars->unk44 + D_0015ED60 * 0.1f; + rocket_vars->wobble_radius = rocket_vars->wobble_radius + D_0015ED60 * 0.1f; } } } build_spherical_offset(&forward_step, - rocket_vars->unk30, + rocket_vars->speed, *(float *)(rocket_moby + 0x48), -*(float *)(rocket_moby + 0x44)); *(u128_cd *)&u.v.b = 0; @@ -243,7 +245,7 @@ void ryno_rocket_update(char *rocket_moby) { fast_vec_normalize(&u.v.a, &u.v.a, random_float_between(0.1f, 0.2f) * D_0015ED6C); fast_vec_normalize(&z, &forward_step, -random_float_between(D_0015ED6C * 0.1f, D_0015ED6C)); add_vector_xyz(&u.v.a, &u.v.a, &z); - fast_vec_normalize(&z, &forward_step, random_float_between(0.0f, 1.0f) * rocket_vars->unk30); + fast_vec_normalize(&z, &forward_step, random_float_between(0.0f, 1.0f) * rocket_vars->speed); add_vector_xyz(&z, &z, rocket_moby + 0x10); { int particle_duration_frames = scale_game_frames_c(random_int_between(0x1C, 0x28)); @@ -257,13 +259,15 @@ void ryno_rocket_update(char *rocket_moby) { 1); } qcopy(&previous_position, rocket_moby + 0x10); - add_vector_xyz(&rocket_vars->unk10, &rocket_vars->unk10, &forward_step); - rocket_vars->unk48 = fast_add_rotations(rocket_vars->unk48, rocket_vars->unk50); - rocket_vars->unk4C = fast_add_rotations(rocket_vars->unk4C, rocket_vars->unk54); - rocket_vars->unk48 = - fast_add_rotations(rocket_vars->unk48, fast_sin(rocket_vars->unk4C) * 0.15f); - if (0.9f < rocket_vars->unk44) - rocket_vars->unk44 = 0.9f; + add_vector_xyz(&rocket_vars->path_position, &rocket_vars->path_position, &forward_step); + rocket_vars->wobble_angle = + fast_add_rotations(rocket_vars->wobble_angle, rocket_vars->wobble_angle_rate); + rocket_vars->wobble_phase = + fast_add_rotations(rocket_vars->wobble_phase, rocket_vars->wobble_phase_rate); + rocket_vars->wobble_angle = + fast_add_rotations(rocket_vars->wobble_angle, fast_sin(rocket_vars->wobble_phase) * 0.15f); + if (0.9f < rocket_vars->wobble_radius) + rocket_vars->wobble_radius = 0.9f; flag = 0; goto body; @@ -272,16 +276,18 @@ void ryno_rocket_update(char *rocket_moby) { if (!(0.1f < sp)) goto done; body: - offset_trig_factor = fast_sin(rocket_vars->unk48); - u.v.a.f[1] = rocket_vars->unk44 * offset_trig_factor * fast_cos(rocket_vars->unk4C); - offset_trig_factor = fast_cos(rocket_vars->unk48); - u.v.a.f[2] = rocket_vars->unk44 * offset_trig_factor * fast_cos(rocket_vars->unk4C); + offset_trig_factor = fast_sin(rocket_vars->wobble_angle); + u.v.a.f[1] = + rocket_vars->wobble_radius * offset_trig_factor * fast_cos(rocket_vars->wobble_phase); + offset_trig_factor = fast_cos(rocket_vars->wobble_angle); + u.v.a.f[2] = + rocket_vars->wobble_radius * offset_trig_factor * fast_cos(rocket_vars->wobble_phase); zf = 0.0f; u.v.a.f[3] = zf; u.v.a.f[0] = zf; euler_rotation_matrix(va0, rocket_moby + 0x40); transform_vector(&u.v.a, &u.v.a, va0); - add_vector_xyz(rocket_moby + 0x10, &rocket_vars->unk10, &u.v.a); + add_vector_xyz(rocket_moby + 0x10, &rocket_vars->path_position, &u.v.a); if (collision_line(&previous_position, rocket_moby + 0x10, 6, (int)rocket_moby, 0) == 0) goto done; goto hit; @@ -289,8 +295,8 @@ void ryno_rocket_update(char *rocket_moby) { } hit: flag = 1; - sp = rocket_vars->unk44 * 0.7f; - rocket_vars->unk44 = sp; + sp = rocket_vars->wobble_radius * 0.7f; + rocket_vars->wobble_radius = sp; goto top; done: @@ -301,8 +307,8 @@ void ryno_rocket_update(char *rocket_moby) { *(float *)(rocket_moby + 0x44) = -fast_arc_tan(vector_distance_xy(&previous_position, rocket_moby + 0x10), *(float *)(rocket_moby + 0x18) - previous_position.f[2]); - rocket_vars->unk34 = 0; - rocket_vars->unk38 = 0; + rocket_vars->yaw_velocity = 0; + rocket_vars->pitch_velocity = 0; } if (*(float *)(rocket_moby + 0x10) < 0.0f || *(float *)(rocket_moby + 0x14) < 0.0f || @@ -323,7 +329,7 @@ void ryno_rocket_update(char *rocket_moby) { gg = (char *)((int *)&D_L00_00173E40); p = *(char **)(gg + 0x18); if (p != 0) { - if (p == (char *)D_001413D0_lui || p == rocket_vars->unk20 || + if (p == (char *)D_001413D0_lui || p == rocket_vars->owner || *(short *)(p + 0xA6) == 0x1C9 || *(short *)(p + 0xA6) == 0) goto keep; rocket_moby[0xBC] = 2; @@ -379,7 +385,7 @@ void ryno_rocket_update(char *rocket_moby) { return; } } else { - if (fast_dec_timer((int *)(&rocket_vars->unk24)) == 0 && + if (fast_dec_timer((int *)(&rocket_vars->life_timer)) == 0 && !(200.0f < vector_distance_xy(rocket_moby + 0x10, (char *)D_001413D0_lui + 0x10))) goto keep; } @@ -387,12 +393,14 @@ void ryno_rocket_update(char *rocket_moby) { mark_moby_for_removal(rocket_moby); return; keep: - if (rocket_vars->unk24 % scale_game_frames_c(0x20) != 0) + if (rocket_vars->life_timer % scale_game_frames_c(0x20) != 0) return; if (RandomNext() & 1) { - rocket_vars->unk50 = rocket_vars->unk50 * random_float_between(-0.7f, -1.5f); + rocket_vars->wobble_angle_rate = + rocket_vars->wobble_angle_rate * random_float_between(-0.7f, -1.5f); } if (RandomNext() & 1) { - rocket_vars->unk54 = rocket_vars->unk54 * random_float_between(-0.6f, -1.6f); + rocket_vars->wobble_phase_rate = + rocket_vars->wobble_phase_rate * random_float_between(-0.6f, -1.6f); } } From 30a178b147737091095b169d784b0630254b50e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:58:51 +0000 Subject: [PATCH 022/213] decomp: name HUD element and item selector slot fields in shared ui --- include/rnc/overlay/shared/ui/hud.h | 24 +-- src/overlays/l02/hud_counter.c | 8 +- .../ui/hud/draw_hud_item_selector_panel.c | 157 +++++++++--------- .../shared/ui/hud/draw_trick_combo_hud.c | 12 +- .../ui/hud/draw_weapon_ammo_hud_panel.c | 16 +- src/overlays/shared/ui/hud/hud_keep_visible.c | 133 +++++++-------- .../shared/ui/hud/hud_update_counter.c | 28 ++-- .../ui/hud/initialize_hud_element_defaults.c | 12 +- .../ui/hud/initialize_numeric_hud_element.c | 6 +- 9 files changed, 199 insertions(+), 197 deletions(-) diff --git a/include/rnc/overlay/shared/ui/hud.h b/include/rnc/overlay/shared/ui/hud.h index aa5be46ebf..17f045f675 100644 --- a/include/rnc/overlay/shared/ui/hud.h +++ b/include/rnc/overlay/shared/ui/hud.h @@ -4,14 +4,14 @@ #include "types.h" /* One of the 13 HUD element records at D_L00_0017DC50. update_hud_elements - counts unk7C down each frame (unk04 bit 0x10 holds it up), moves unk6C + counts visible_timer down each frame (unk04 bit 0x10 holds it up), moves slide between -6 and 30 with it and calls update; hud_keep_visible finds a record by key. */ typedef struct HudElem { int unk00; int unk04; - int unk08; - int *unk0C; + int max_value; + int *value_source; char pad10[0x4]; void (*update)(struct HudElem *); char pad18[0x8]; @@ -19,22 +19,22 @@ typedef struct HudElem { int unk24; char pad28[0x1C]; int icon; /* 0x44: icon sprite id */ - short unk48; - short unk4A; + short offset_x; + short offset_y; char pad4C[0x4]; - int unk50; - int unk54; + int x; + int y; int w; int h; int flags; int key; int unk68; - int unk6C; + int slide; unsigned char cnt[4]; - int unk74; - int unk78; - int unk7C; - void *unk80; + int shown_value; + int target_value; + int visible_timer; + void *animation_counters; char pad84[0xC]; } HudElem; diff --git a/src/overlays/l02/hud_counter.c b/src/overlays/l02/hud_counter.c index 9f7c961286..f5e8cc2a8c 100644 --- a/src/overlays/l02/hud_counter.c +++ b/src/overlays/l02/hud_counter.c @@ -78,8 +78,8 @@ s32 draw_hud_counter(HudElem *hud_element) { if (fade[0] == 0) { return hud_element->w; } - x = hud_element->unk50; - y = hud_element->unk54; + x = hud_element->x; + y = hud_element->y; hud_screen_position(hud_element, &x, &y); left = x < 0x101; if (left) { @@ -103,9 +103,9 @@ s32 draw_hud_counter(HudElem *hud_element) { } else if (shade < 0.0f) { shade = 0.0f; } - sprintf(text, hud_counter_decimal_format, hud_element->unk74); + sprintf(text, hud_counter_decimal_format, hud_element->shown_value); alpha = truncate_float_to_s32((f32)truncate_float_to_s32(grow * 128.0f) * 0.7f); - if (hud_element->unk08 < 10) { + if (hud_element->max_value < 10) { full_bar_width = l02_hud_counter_narrow_bar_width; } else { full_bar_width = l02_hud_counter_wide_bar_width; diff --git a/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c b/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c index a1d5c6e954..bcea9efcf9 100644 --- a/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c +++ b/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c @@ -45,24 +45,24 @@ void update_hud_counter_cap_and_visibility(char *hud_element) { typedef struct { char pad0[0x8]; - int unk08; - int *unk0C; + int max_value; + int *value_source; char pad10[0x38]; - short unk48; - short unk4A; + short offset_x; + short offset_y; char pad4C[0x4]; - int unk50; - int unk54; + int x; + int y; int w; int h; int flags; char pad64[0x8]; - int unk6C; + int slide; unsigned char cnt[4]; - int unk74; - int unk78; - int unk7C; - void *unk80; + int shown_value; + int target_value; + int visible_timer; + void *animation_counters; } HudElem_237840; extern int D_L00_0015F760 __attribute__((sda)); @@ -76,8 +76,8 @@ int hud_draw_gauge_frame(HudElem_237840 *gauge_element) { int left, top, right, bottom, w, h, bh, step, i; { int ww = D_L00_0015F760; - screen_position[0] = gauge_element->unk50; - screen_position[1] = gauge_element->unk54; + screen_position[0] = gauge_element->x; + screen_position[1] = gauge_element->y; gauge_element->w = ww; { int *vertical_scale_source = (int *)&(*(short *)&D_L00_0015F764); @@ -87,13 +87,13 @@ int hud_draw_gauge_frame(HudElem_237840 *gauge_element) { } hud_screen_position(gauge_element, &screen_position[0], &screen_position[1]); apply_hud_slide_offset( - gauge_element, &screen_position[0], &screen_position[1], gauge_element->unk6C, 0); + gauge_element, &screen_position[0], &screen_position[1], gauge_element->slide, 0); w = D_L00_0015F760 * 0xD0; h = D_L00_0015F764 * 0xA0; bh = D_L00_0015F760 * 0x260; bottom = D_L00_0015F764 * 0xEA0; - left = (screen_position[0] + gauge_element->unk48) << 4; - top = (screen_position[1] + gauge_element->unk4A) << 4; + left = (screen_position[0] + gauge_element->offset_x) << 4; + top = (screen_position[1] + gauge_element->offset_y) << 4; left += w / 64; top += h / 256; right = left + bh / 64; @@ -102,28 +102,29 @@ int hud_draw_gauge_frame(HudElem_237840 *gauge_element) { { int gauge_height_numerator = D_L00_0015F764 * 0xEA0; h = D_L00_0015F764; - top = (screen_position[1] + gauge_element->unk4A) << 4; + top = (screen_position[1] + gauge_element->offset_y) << 4; top += (h * 0xF40) / 256; - bh = (gauge_element->unk74 * gauge_height_numerator) / (gauge_element->unk08 << 8); + bh = + (gauge_element->shown_value * gauge_height_numerator) / (gauge_element->max_value << 8); append_screen_rect_packet(left, top, right, top - bh, 0x80829E00, 1); } i = 1; - if (i < gauge_element->unk74) + if (i < gauge_element->shown_value) do { int hh = D_L00_0015F764; - top = (screen_position[1] + gauge_element->unk4A) << 4; + top = (screen_position[1] + gauge_element->offset_y) << 4; top += (hh * 0xF40) / 256; step = D_L00_0015F764 * 0xEA0; - step = i * step / (gauge_element->unk08 << 8); + step = i * step / (gauge_element->max_value << 8); i++; top -= step; top -= 16; append_screen_rect_packet(left, top, right, top + 32, 0x80000000, 1); - } while (i < gauge_element->unk74); + } while (i < gauge_element->shown_value); w = get_icon_frame(*(int *)gauge_element, 0); draw_rotated_hud_sprite(w, - screen_position[0] + gauge_element->unk48, - screen_position[1] + gauge_element->unk4A, + screen_position[0] + gauge_element->offset_x, + screen_position[1] + gauge_element->offset_y, D_L00_0015F760, D_L00_0015F764, 0x80); @@ -191,7 +192,7 @@ void initialize_eight_slot_hud_selector(O00237ae8 *hud_element) { } typedef struct { - int unk0, unk4, unk8, unkC, unk10, unk14, unk18; + int icon, icon_frame, left_slot, right_slot, up_slot, down_slot, command; } Ent; typedef struct { @@ -307,7 +308,7 @@ void update_hud_item_selector_selection_and_visibility(Obj *hud_element) { if (pad_slot_index == -1) slot_lookup = D_L00_0017DC20; else - slot_lookup = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].unk10; + slot_lookup = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].up_slot; pad_slot_index = slot_lookup; } if (((s32)controller_state.pressed_unmasked) & 0x4000) { @@ -315,7 +316,7 @@ void update_hud_item_selector_selection_and_visibility(Obj *hud_element) { if (pad_slot_index == -1) slot_lookup = D_L00_0017DC24; else - slot_lookup = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].unk14; + slot_lookup = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].down_slot; pad_slot_index = slot_lookup; } if (((s32)controller_state.pressed_unmasked) & 0x8000) { @@ -323,7 +324,7 @@ void update_hud_item_selector_selection_and_visibility(Obj *hud_element) { if (pad_slot_index == -1) slot_lookup = D_L00_0017DC18; else - slot_lookup = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].unk8; + slot_lookup = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].left_slot; pad_slot_index = slot_lookup; } if (((s32)controller_state.pressed_unmasked) & 0x2000) { @@ -331,7 +332,7 @@ void update_hud_item_selector_selection_and_visibility(Obj *hud_element) { if (pad_slot_index == -1) slot_lookup = D_L00_0017DC1C; else - slot_lookup = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].unkC; + slot_lookup = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].right_slot; pad_slot_index = slot_lookup; } hud_element->w74 = pad_slot_index; @@ -339,9 +340,9 @@ void update_hud_item_selector_selection_and_visibility(Obj *hud_element) { { Ent *slot_lookup = D_L00_0015FAC0_c[D_L00_0015F72C]; int selected_slot_index = hud_element->w74; - if (slot_lookup[selected_slot_index].unk0 == 0 && slot_step != 0) { + if (slot_lookup[selected_slot_index].icon == 0 && slot_step != 0) { k = (selected_slot_index + slot_step) % D_L00_0015FA90; - if (slot_lookup[k].unk0 != 0) + if (slot_lookup[k].icon != 0) hud_element->w74 = k; } } @@ -352,7 +353,7 @@ void update_hud_item_selector_selection_and_visibility(Obj *hud_element) { counters[1]++; if (!(((s32)controller_state.held_unmasked) & 0x10)) { int sel = hud_element->w74; - if (sel >= 0 && (id = D_L00_0015FAC0_c[D_L00_0015F72C][sel].unk18) != 0) { + if (sel >= 0 && (id = D_L00_0015FAC0_c[D_L00_0015F72C][sel].command) != 0) { VendorItemInfo *rr; int ri = id; if (hero_lui.items[0].item_id != id) { @@ -464,8 +465,8 @@ int draw_hud_item_selector_panel(HudElem *selector_element) { angle += 0.875f; marker_alpha = truncate_float_to_s32(radius * angle); } - x = selector_element->unk50; - y = selector_element->unk54; + x = selector_element->x; + y = selector_element->y; hud_screen_position(selector_element, &x, &y); half_w = D_L00_0015F718_gp / 2; half_h = D_L00_0015F71C_gp / 2; @@ -484,13 +485,13 @@ int draw_hud_item_selector_panel(HudElem *selector_element) { icon_x = x + D_L00_0015F720_gp + (int)(D_L00_0015F78C_gp * fast_cos(angle) * D_L00_0015F7C4_gp); icon_y = y + D_L00_0015F724_gp + (int)(D_L00_0015F78C_gp * fast_sin(angle)); - if (selector_element->unk74 == i && + if (selector_element->shown_value == i && ((E_238C30 **)D_L00_0015FAC0)[D_L00_0015F72C_gp][i].id != 0) draw_hud_sprite( get_icon_frame(0xe99c, 0), icon_x - 0x13, icon_y - 0x13, 0x26, 0x26, marker_alpha); if (((E_238C30 **)D_L00_0015FAC0)[D_L00_0015F72C_gp][i].id != 0) { int icon_alpha; - if (i != selector_element->unk74) + if (i != selector_element->shown_value) icon_alpha = truncate_float_to_s32((float)alpha * D_L00_0015F7C0); else icon_alpha = alpha; @@ -507,7 +508,7 @@ int draw_hud_item_selector_panel(HudElem *selector_element) { icon_alpha); } } - selected = selector_element->unk74; + selected = selector_element->shown_value; if (selected >= 0 && *(int *)(((char **)D_L00_0015FAC0)[D_L00_0015F72C_gp] + selected * 0x1C) != 0) { color = fast_tween_color(l00_hud_item_selector_text_shadow_color_from, @@ -663,28 +664,28 @@ void update_hud_radial_selector_selection_and_visibility(Obj *hud_element) { if (pad_slot_index == -1) next_slot_index = D_L00_0017DC40; else - next_slot_index = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].unk10; + next_slot_index = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].up_slot; pad_slot_index = next_slot_index; } if (((s32)controller_state.pressed_unmasked) & 0x4000) { if (pad_slot_index == -1) next_slot_index = D_L00_0017DC44; else - next_slot_index = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].unk14; + next_slot_index = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].down_slot; pad_slot_index = next_slot_index; } if (((s32)controller_state.pressed_unmasked) & 0x8000) { if (pad_slot_index == -1) next_slot_index = D_L00_0017DC38; else - next_slot_index = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].unk8; + next_slot_index = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].left_slot; pad_slot_index = next_slot_index; } if (((s32)controller_state.pressed_unmasked) & 0x2000) { if (pad_slot_index == -1) next_slot_index = D_L00_0017DC3C; else - next_slot_index = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].unkC; + next_slot_index = D_L00_0015FAC0_c[D_L00_0015F72C][pad_slot_index].right_slot; pad_slot_index = next_slot_index; } hud_element->w74 = pad_slot_index; @@ -699,7 +700,7 @@ void update_hud_radial_selector_selection_and_visibility(Obj *hud_element) { if (hud_element->w74 == -1) D_00141610[0] = 0; else - D_00141610[0] = D_L00_0015FAC0_c[D_L00_0015F72C][hud_element->w74].unk18; + D_00141610[0] = D_L00_0015FAC0_c[D_L00_0015F72C][hud_element->w74].command; if (counters[0] != 0) counters[0]--; } else if (counters[0] < l00_hud_selector_fade_counter_limit_gp) { @@ -721,28 +722,28 @@ void update_hud_radial_selector_selection_and_visibility(Obj *hud_element) { typedef struct { char pad0[0x8]; - int unk08; - int *unk0C; + int max_value; + int *value_source; char pad10[0x38]; - short unk48; - short unk4A; + short offset_x; + short offset_y; char pad4C[0x4]; - int unk50; - int unk54; + int x; + int y; int w; int h; int flags; char pad64[0x8]; - int unk6C; + int slide; unsigned char cnt[4]; - int unk74; - int unk78; - int unk7C; - void *unk80; + int shown_value; + int target_value; + int visible_timer; + void *animation_counters; } HudElem_238f88; typedef struct { - int unk0, unk4, unk8, unkC, unk10, unk14, unk18; + int icon, icon_frame, left_slot, right_slot, up_slot, down_slot, command; } Ent_239918; typedef struct { @@ -848,11 +849,11 @@ int draw_hud_radial_selector_panel(Elem *element) { (float)i * 2.0f * 3.1415927f / (float)D_L00_0015FA90 - 3.1415927f, 1.5707964f); icon_x = x + D_L00_0015F720 + (int)(D_L00_0015F78C * fast_cos(angle) * D_L00_0015F7C4); icon_y = y + D_L00_0015F724 + (int)(D_L00_0015F78C * fast_sin(angle)); - if (element->sel == i && D_L00_0015FAC0_c2[D_L00_0015F72C][i].unk0 != 0) { + if (element->sel == i && D_L00_0015FAC0_c2[D_L00_0015F72C][i].icon != 0) { draw_hud_sprite( get_icon_frame(0xE99C, 0), icon_x - 0x13, icon_y - 0x13, 0x26, 0x26, pulse_alpha); } - if (D_L00_0015FAC0_c2[D_L00_0015F72C][i].unk0 != 0) { + if (D_L00_0015FAC0_c2[D_L00_0015F72C][i].icon != 0) { if (i != element->sel) { alpha = truncate_float_to_s32((float)frame_alpha * D_L00_0015F7C0); } else { @@ -860,16 +861,16 @@ int draw_hud_radial_selector_panel(Elem *element) { } if (((Arena *)D_L00_0017E5D8_239918)->unk2C != 0) { hud_frame(element, - get_icon_frame(D_L00_0015FAC0_c2[D_L00_0015F72C][i].unk0, - D_L00_0015FAC0_c2[D_L00_0015F72C][i].unk4), + get_icon_frame(D_L00_0015FAC0_c2[D_L00_0015F72C][i].icon, + D_L00_0015FAC0_c2[D_L00_0015F72C][i].icon_frame), icon_x, icon_y, 1, alpha); } else { hud_frame(element, - get_icon_frame(D_L00_0015FAC0_c2[D_L00_0015F72C][i].unk0, - D_L00_0015FAC0_c2[D_L00_0015F72C][i].unk4 + 4), + get_icon_frame(D_L00_0015FAC0_c2[D_L00_0015F72C][i].icon, + D_L00_0015FAC0_c2[D_L00_0015F72C][i].icon_frame + 4), icon_x, icon_y, 1, @@ -878,9 +879,9 @@ int draw_hud_radial_selector_panel(Elem *element) { } } selected = element->sel; - if (selected >= 0 && D_L00_0015FAC0_c2[D_L00_0015F72C][selected].unk0 != 0) { + if (selected >= 0 && D_L00_0015FAC0_c2[D_L00_0015F72C][selected].icon != 0) { text_ids = D_L00_0015F8C0_239918; - if (D_L00_0015FAC0_c2[D_L00_0015F72C][selected].unk0 != 0) { + if (D_L00_0015FAC0_c2[D_L00_0015F72C][selected].icon != 0) { text = get_help_message_text(text_ids.v[selected]); if (text != 0 && strlen_alt(text) != 0) { float fade = text_fade * open_fade; @@ -940,10 +941,10 @@ void update_health_hud_animation_and_visibility(HudElem *hud_element) { int unclamped_target_value; int max; - if (hud_element->unk0C != 0) { - unclamped_target_value = *hud_element->unk0C; - hud_element->unk78 = unclamped_target_value > -1 ? unclamped_target_value : 0; - animation_counters = hud_element->unk80; + if (hud_element->value_source != 0) { + unclamped_target_value = *hud_element->value_source; + hud_element->target_value = unclamped_target_value > -1 ? unclamped_target_value : 0; + animation_counters = hud_element->animation_counters; animation_counters->unk0 = (animation_counters->unk0 + 1) % 60; animation_counters->unk2 += animation_counters->unk4; animation_counters->unk4 += animation_counters->unk6; @@ -969,28 +970,28 @@ void update_health_hud_animation_and_visibility(HudElem *hud_element) { if (health_icon_animation_counters->unk2 < 0) { health_icon_animation_counters->unk2 = 0; } - if (hud_element->unk78 > hud_element->unk08) { - hud_element->unk78 = hud_element->unk08; + if (hud_element->target_value > hud_element->max_value) { + hud_element->target_value = hud_element->max_value; } } - if (hud_element->unk74 != hud_element->unk78 || hud_element->unk74 == 1) { - hud_element->unk7C = scale_game_frames(0x78); - hud_element->unk74 = hud_element->unk78; + if (hud_element->shown_value != hud_element->target_value || hud_element->shown_value == 1) { + hud_element->visible_timer = scale_game_frames(0x78); + hud_element->shown_value = hud_element->target_value; } - if (hud_element->unk7C >= scale_game_frames(5)) { + if (hud_element->visible_timer >= scale_game_frames(5)) { if (*(int *)&l00_hud_panel_visibility_counter_limit_gp > visibility_counters[0]) { visibility_counters[0]++; } else if (visibility_counters[1] < *(int *)&l00_hud_panel_visibility_counter_limit_gp) { visibility_counters[1]++; } } else { - hud_element->unk6C = 1; + hud_element->slide = 1; if (visibility_counters[1] != 0) { visibility_counters[1]--; } else if (visibility_counters[0] != 0) { visibility_counters[0]--; } else { - hud_element->unk6C = -6; + hud_element->slide = -6; } } update_hud_animation_frame((char *)hud_element + 0x40); @@ -1176,7 +1177,7 @@ void initialize_bolt_counter_hud(HudElem *hud_element) __asm__("FUN_L00_00239cc8 void initialize_bolt_counter_hud(HudElem *hud_element) { initialize_numeric_hud_timer_and_base_dimensions(hud_element); - hud_element->unk80 = &l00_bolt_hud_icon_animation_counters; + hud_element->animation_counters = &l00_bolt_hud_icon_animation_counters; l00_bolt_hud_icon_animation_counters.unk0 = 0; } @@ -1267,7 +1268,7 @@ int draw_bolt_counter_hud_panel(HudElem *hud_element) { int y, x, digits, alpha, bolt_count_quotient, slide, color, shadow, sx, sy, i, dx, dy; f32 open, text; - frame = hud_element->unk80; + frame = hud_element->animation_counters; /* the byte offset kept in a local is load-bearing (retail tests m + off) */ panel_open_counter_offset = 0x70; if (camera_secondary_mode_lui[0] == 50 || ((u8 *)hud_element)[panel_open_counter_offset] == 0) @@ -1275,7 +1276,7 @@ int draw_bolt_counter_hud_panel(HudElem *hud_element) { fade = hud_element->cnt; y = *(volatile s32 *)&pal_mode ? 10 : 18; - x = hud_element->unk50; + x = hud_element->x; open = convert_integer_to_float(hud_element->cnt[0]) / convert_integer_to_float(bolt_panel_open_steps_gp); @@ -1475,7 +1476,7 @@ int draw_hud_cropped_gauge_panel(char *cropped_gauge_element) { /* Sets unk7C to scale_game_frames(0x78) + 0x1E and w/h to 0x20, calls FUN_L00_00235c80. */ void initialize_numeric_hud_timer_and_base_dimensions(HudElem *hud_element) { - hud_element->unk7C = scale_game_frames(0x78) + 0x1E; + hud_element->visible_timer = scale_game_frames(0x78) + 0x1E; hud_element->w = 0x20; hud_element->h = 0x20; initialize_numeric_hud_values_and_dimensions(hud_element); diff --git a/src/overlays/shared/ui/hud/draw_trick_combo_hud.c b/src/overlays/shared/ui/hud/draw_trick_combo_hud.c index f30d451c62..93e5903660 100644 --- a/src/overlays/shared/ui/hud/draw_trick_combo_hud.c +++ b/src/overlays/shared/ui/hud/draw_trick_combo_hud.c @@ -32,10 +32,10 @@ void hud_release_held_element(void) { typedef struct { u8 pad[0x48]; - s16 unk48; - s16 unk4A; + s16 offset_x; + s16 offset_y; u8 pad2[0x7C - 0x4C]; - s32 unk7C; + s32 visible_timer; } HudElemX; extern void initialize_numeric_hud_values_and_dimensions(void *) __asm__("FUN_L00_00235c80"); @@ -46,9 +46,9 @@ void initialize_trick_combo_hud(HudElemX *hud_element) __asm__("FUN_L05_00262ae8 void initialize_trick_combo_hud(HudElemX *hud_element) { s32 i; s32 *reset_slot; - hud_element->unk7C = scale_game_frames(0xB4) + 0x1E; - hud_element->unk48 = 0; - hud_element->unk4A = 0; + hud_element->visible_timer = scale_game_frames(0xB4) + 0x1E; + hud_element->offset_x = 0; + hud_element->offset_y = 0; i = 3; reset_slot = &D_L05_0015FAFC; for (; i >= 0; i--) { diff --git a/src/overlays/shared/ui/hud/draw_weapon_ammo_hud_panel.c b/src/overlays/shared/ui/hud/draw_weapon_ammo_hud_panel.c index f921e21b3c..010fc0e981 100644 --- a/src/overlays/shared/ui/hud/draw_weapon_ammo_hud_panel.c +++ b/src/overlays/shared/ui/hud/draw_weapon_ammo_hud_panel.c @@ -213,19 +213,19 @@ int update_hud_elements(int call) { hud_timer_refresh_control = &D_L00_0017E4D8; do { if ((hud_element->unk04 & 0x10) || hud_timer_refresh_control->b != 0) { - if (hud_element->unk7C < scale_game_frames(10)) { - hud_element->unk7C = scale_game_frames(10); + if (hud_element->visible_timer < scale_game_frames(10)) { + hud_element->visible_timer = scale_game_frames(10); } } - if (hud_element->unk7C > 0 && --hud_element->unk7C > 0) { + if (hud_element->visible_timer > 0 && --hud_element->visible_timer > 0) { positive_timer_count++; - if (hud_element->unk6C < 30) - hud_element->unk6C++; + if (hud_element->slide < 30) + hud_element->slide++; } else { - if (hud_element->unk6C >= -5) - hud_element->unk6C--; + if (hud_element->slide >= -5) + hud_element->slide--; } - if (hud_element->unk68 && hud_element->unk6C == -6) { + if (hud_element->unk68 && hud_element->slide == -6) { apply_pending_animation(hud_element); } if (call && hud_element->update) { diff --git a/src/overlays/shared/ui/hud/hud_keep_visible.c b/src/overlays/shared/ui/hud/hud_keep_visible.c index 738f9aa6e5..976a2b1614 100644 --- a/src/overlays/shared/ui/hud/hud_keep_visible.c +++ b/src/overlays/shared/ui/hud/hud_keep_visible.c @@ -31,8 +31,8 @@ void reset_hud_animation_channels(void) { for (i = 0; i < 13; i++) { queue_animation_update(i, 0xFFFF, 0, 0, 0, 0, 1); - hud_elements[i].unk7C = 0; - hud_elements[i].unk6C = -6; + hud_elements[i].visible_timer = 0; + hud_elements[i].slide = -6; apply_pending_animation(&hud_elements[i]); } } @@ -83,7 +83,7 @@ void apply_hud_slide_offset(HudElem *hud_element, int *x, int *y, int slide_inde int dy = 0; float slide_scale; - if (hud_element->unk7C != 0) { + if (hud_element->visible_timer != 0) { slide_index -= slide_step; } else { slide_index += slide_step; @@ -94,7 +94,7 @@ void apply_hud_slide_offset(HudElem *hud_element, int *x, int *y, int slide_inde if (slide_index > 23) { slide_index = 23; } - if (hud_element->unk7C != 0) { + if (hud_element->visible_timer != 0) { slide_scale = hud_slide_timer_active_scales[slide_index]; } else { slide_scale = hud_slide_timer_inactive_scales[slide_index]; @@ -124,19 +124,19 @@ void apply_hud_slide_offset(HudElem *hud_element, int *x, int *y, int slide_inde void initialize_numeric_hud_values_and_dimensions(HudElem *hud_element) __asm__("FUN_L00_00235c80"); void initialize_numeric_hud_values_and_dimensions(HudElem *hud_element) { - int *numeric_value_source = hud_element->unk0C; + int *numeric_value_source = hud_element->value_source; int digits; int decimal_quotient, flags, width; if (numeric_value_source && !((int)numeric_value_source & 3)) { - hud_element->unk78 = *numeric_value_source; - if (hud_element->unk08 < hud_element->unk78) - hud_element->unk78 = hud_element->unk08; - hud_element->unk74 = hud_element->unk78; + hud_element->target_value = *numeric_value_source; + if (hud_element->max_value < hud_element->target_value) + hud_element->target_value = hud_element->max_value; + hud_element->shown_value = hud_element->target_value; } else { - hud_element->unk78 = 99999; - hud_element->unk74 = 99999; + hud_element->target_value = 99999; + hud_element->shown_value = 99999; } - decimal_quotient = hud_element->unk08; + decimal_quotient = hud_element->max_value; digits = 0; flags = hud_element->flags; width = hud_element->h; @@ -160,25 +160,25 @@ void initialize_numeric_hud_values_and_dimensions(HudElem *hud_element) { extern void initialize_numeric_hud_values_and_dimensions(HudElem *) __asm__("FUN_L00_00235c80"); -/* Sets unk7C to scale_game_frames(0xB4) + 0x1E, clears 0x48/0x4A, calls FUN_L00_00235c80. */ +/* Sets visible_timer to scale_game_frames(0xB4) + 0x1E, clears offset_x/offset_y, calls FUN_L00_00235c80. */ void reset_numeric_hud_element(HudElem *hud_element) __asm__("FUN_L00_00235d80"); void reset_numeric_hud_element(HudElem *hud_element) { - hud_element->unk7C = scale_game_frames(0xB4) + 0x1E; - hud_element->unk48 = 0; - hud_element->unk4A = 0; + hud_element->visible_timer = scale_game_frames(0xB4) + 0x1E; + hud_element->offset_x = 0; + hud_element->offset_y = 0; initialize_numeric_hud_values_and_dimensions(hud_element); } /* func_L00_00236710 for a 32 x 32 element. */ /* Ported from rac1-decomp (src/overlays/shared/hud_00235960.c: func_L00_00236750), where it is exact; names translated to the US level program. */ -/* Sets unk7C to scale_game_frames(0xB4) + 0x1E, clears 0x48/0x4A, w/h 0x20, calls 00235c80. */ +/* Sets visible_timer to scale_game_frames(0xB4) + 0x1E, clears offset_x/offset_y, w/h 0x20, calls 00235c80. */ void reset_numeric_hud_element_32x32_base(HudElem *hud_element) __asm__("FUN_L00_00235dc0"); void reset_numeric_hud_element_32x32_base(HudElem *hud_element) { - hud_element->unk7C = scale_game_frames(0xB4) + 0x1E; - hud_element->unk48 = 0; - hud_element->unk4A = 0; + hud_element->visible_timer = scale_game_frames(0xB4) + 0x1E; + hud_element->offset_x = 0; + hud_element->offset_y = 0; hud_element->w = 0x20; hud_element->h = 0x20; initialize_numeric_hud_values_and_dimensions(hud_element); @@ -197,8 +197,9 @@ s32 hud_keep_visible(s32 key, s32 minimum_visible_frames) { } if (i < 13 && hud_elements[i].unk68 == 0) { hud_element = hud_elements + i; - hud_element->unk7C = (minimum_visible_frames < hud_element->unk7C) ? hud_element->unk7C - : minimum_visible_frames; + hud_element->visible_timer = (minimum_visible_frames < hud_element->visible_timer) + ? hud_element->visible_timer + : minimum_visible_frames; return 0; } return 1; @@ -215,21 +216,21 @@ void hud_update_counter(e) HudElem *e __asm__("FUN_L00_00235ea0"); int d; int s; - if (e->unk0C != 0) { - v = *e->unk0C; - cap = e->unk08; + if (e->value_source != 0) { + v = *e->value_source; + cap = e->max_value; if (v < 0) { v = 0; } - e->unk78 = v; + e->target_value = v; if (cap < v) { - e->unk78 = cap; + e->target_value = cap; } } - if (e->unk74 != e->unk78) { - e->unk7C = scale_game_frames(0xB4); - if (e->unk6C >= 0x18) { - int t = e->unk74 - e->unk78; + if (e->shown_value != e->target_value) { + e->visible_timer = scale_game_frames(0xB4); + if (e->slide >= 0x18) { + int t = e->shown_value - e->target_value; d = t < 0 ? -t : t; if (d != 0) { s = truncate_float_to_s32(square_root(convert_integer_to_float(d) / 25.0f) * 5.0f); @@ -244,17 +245,17 @@ void hud_update_counter(e) HudElem *e __asm__("FUN_L00_00235ea0"); c[3] += s; if (c[3] > scale_game_frames(2)) { s = c[3] / scale_game_frames(2); - if (e->unk78 < e->unk74) { - e->unk74 = e->unk74 - s; + if (e->target_value < e->shown_value) { + e->shown_value = e->shown_value - s; } else { - e->unk74 = e->unk74 + s; + e->shown_value = e->shown_value + s; } c[3] -= s * scale_game_frames(2); } } } } - if (e->unk7C >= scale_game_frames(5)) { + if (e->visible_timer >= scale_game_frames(5)) { if (c[0] < scale_game_frames(8)) { c[0]++; } else if (c[1] < scale_game_frames(8)) { @@ -262,7 +263,7 @@ void hud_update_counter(e) HudElem *e __asm__("FUN_L00_00235ea0"); } } else { if (c[1] != 0 || c[0] != 0) { - e->unk6C = 1; + e->slide = 1; } if (c[1] != 0) { c[1]--; @@ -281,24 +282,24 @@ void update_numeric_hud_element_direct_value(HudElem *hud_element) { int sampled_value; int cap; - if (hud_element->unk0C != 0) { - sampled_value = *hud_element->unk0C; - cap = hud_element->unk08; + if (hud_element->value_source != 0) { + sampled_value = *hud_element->value_source; + cap = hud_element->max_value; if (sampled_value < 0) { sampled_value = 0; } - hud_element->unk78 = sampled_value; + hud_element->target_value = sampled_value; if (cap < sampled_value) { - hud_element->unk78 = cap; + hud_element->target_value = cap; } } - if (hud_element->unk74 != hud_element->unk78) { - hud_element->unk7C = scale_game_frames(0xB4); - if (hud_element->unk6C >= 0x18) { - hud_element->unk74 = hud_element->unk78; + if (hud_element->shown_value != hud_element->target_value) { + hud_element->visible_timer = scale_game_frames(0xB4); + if (hud_element->slide >= 0x18) { + hud_element->shown_value = hud_element->target_value; } } - if (hud_element->unk7C >= scale_game_frames(5)) { + if (hud_element->visible_timer >= scale_game_frames(5)) { if (hud_counters[0] < scale_game_frames(8)) { hud_counters[0]++; } else if (hud_counters[1] < scale_game_frames(8)) { @@ -306,7 +307,7 @@ void update_numeric_hud_element_direct_value(HudElem *hud_element) { } } else { if (hud_counters[1] != 0 || hud_counters[0] != 0) { - hud_element->unk6C = 1; + hud_element->slide = 1; } if (hud_counters[1] != 0) { hud_counters[1]--; @@ -430,21 +431,21 @@ int draw_hud_stars(HudElem *element) { { int width = D_L00_0015F760; - x = element->unk50; - y = element->unk54; + x = element->x; + y = element->y; element->w = width; element->h = D_L00_0015F764; } hud_screen_position(element, &x, &y); - apply_hud_slide_offset(element, &x, &y, element->unk6C, 0); + apply_hud_slide_offset(element, &x, &y, element->slide, 0); { int left_inset = D_L00_0015F760 * 0xD0; int top_inset = D_L00_0015F764 * 0xA0; int bar_width = D_L00_0015F760 * 0x260; int bottom = D_L00_0015F764 * 0xEA0; - int left = (x + element->unk48) << 4; - int top = (y + element->unk4A) << 4; + int left = (x + element->offset_x) << 4; + int top = (y + element->offset_y) << 4; int right; left += left_inset / 64; top += top_inset / 256; @@ -453,14 +454,14 @@ int draw_hud_stars(HudElem *element) { append_screen_rect_packet(left, top, right, bottom, 0x80684C2F, 1); } - if (element->unk74 * 3 < 10001) { + if (element->shown_value * 3 < 10001) { frames = scale_game_frames(1); seconds = scale_time(0.75f); previous = (D_L00_0015F3F8 - 1) % (int)((float)frames * 60.0f) < (int)(seconds * 60.0f); } else { previous = 0; } - if (element->unk74 * 3 < 10001) { + if (element->shown_value * 3 < 10001) { frames = scale_game_frames(1); seconds = scale_time(0.75f); current = D_L00_0015F3F8 % (int)((float)frames * 60.0f) < (int)(seconds * 60.0f); @@ -475,7 +476,7 @@ int draw_hud_stars(HudElem *element) { sixteen = 16.0f; thirty_two = 32.0f; draw_rotated_hud_sprite( - image, x + element->unk48, y + element->unk4A, D_L00_0015F760, D_L00_0015F764, 0x80); + image, x + element->offset_x, y + element->offset_y, D_L00_0015F760, D_L00_0015F764, 0x80); { float center_x, center_y, half_w, half_h; @@ -483,8 +484,8 @@ int draw_hud_stars(HudElem *element) { half_h = -(D_L00_0015F764 * D_L00_0015F76C * 0.5f) / 116.0f; origin[2] = 1.0f; origin[3] = 1.0f; - center_x = D_L00_0015F760 * D_L00_0015F768 * 0.5f + (x + element->unk48); - center_y = D_L00_0015F764 * D_L00_0015F76C * 0.5f + (y + element->unk4A); + center_x = D_L00_0015F760 * D_L00_0015F768 * 0.5f + (x + element->offset_x); + center_y = D_L00_0015F764 * D_L00_0015F76C * 0.5f + (y + element->offset_y); direction[0] = (center_x + (1.0f - D_L00_0015F768) * 0.5f * D_L00_0015F760) * sixteen; direction[1] = (center_y + (1.0f - D_L00_0015F76C) * 0.5f * D_L00_0015F764) * sixteen; direction[2] = 0.0f; @@ -492,7 +493,7 @@ int draw_hud_stars(HudElem *element) { origin[0] = half_w * sixteen; origin[1] = half_h * sixteen; } - offset = (float)(10000 - element->unk74) / 10000.0f; + offset = (float)(10000 - element->shown_value) / 10000.0f; offset = 116.0f - (offset + offset) * 116.0f; image = get_icon_frame(*(int *)element, 2); @@ -562,16 +563,16 @@ int draw_uniform_size_hud_stars(HudElem *hud_element) { s32 image; int star_width, i; - x = hud_element->unk50; - y = hud_element->unk54; + x = hud_element->x; + y = hud_element->y; hud_element->w = D_L00_0015F760; hud_element->h = D_L00_0015F764; hud_screen_position(hud_element, &x, &y); - apply_hud_slide_offset(hud_element, &x, &y, hud_element->unk6C, 0); + apply_hud_slide_offset(hud_element, &x, &y, hud_element->slide, 0); image = get_icon_frame(*(int *)hud_element, 0); draw_rotated_hud_sprite(image, - x + hud_element->unk48, - y + hud_element->unk4A, + x + hud_element->offset_x, + y + hud_element->offset_y, D_L00_0015F760, D_L00_0015F764, 0x80); @@ -581,8 +582,8 @@ int draw_uniform_size_hud_stars(HudElem *hud_element) { half_h = -(D_L00_0015F764 * D_L00_0015F76C * 0.5f) / 116.0f; origin[2] = 1.0f; origin[3] = 1.0f; - center_x = D_L00_0015F760 * D_L00_0015F768 * 0.5f + (x + hud_element->unk48); - center_y = D_L00_0015F764 * D_L00_0015F76C * 0.5f + (y + hud_element->unk4A); + center_x = D_L00_0015F760 * D_L00_0015F768 * 0.5f + (x + hud_element->offset_x); + center_y = D_L00_0015F764 * D_L00_0015F76C * 0.5f + (y + hud_element->offset_y); direction[0] = (center_x + (1.0f - D_L00_0015F768) * 0.5f * D_L00_0015F760) * 16.0f; direction[1] = (center_y + (1.0f - D_L00_0015F76C) * 0.5f * D_L00_0015F764) * 16.0f; direction[2] = 0.0f; @@ -590,7 +591,7 @@ int draw_uniform_size_hud_stars(HudElem *hud_element) { origin[0] = half_w * 16.0f; origin[1] = half_h * 16.0f; } - offset = (10000 - hud_element->unk74) / 10000.0f; + offset = (10000 - hud_element->shown_value) / 10000.0f; offset = 116.0f - (offset + offset) * 116.0f; image = get_icon_frame(*(int *)hud_element, 1); clear_u64_value(first_step); diff --git a/src/overlays/shared/ui/hud/hud_update_counter.c b/src/overlays/shared/ui/hud/hud_update_counter.c index ce43a53226..b7caa5ee07 100644 --- a/src/overlays/shared/ui/hud/hud_update_counter.c +++ b/src/overlays/shared/ui/hud/hud_update_counter.c @@ -20,21 +20,21 @@ void hud_update_counter(HudElem *hud_element) { int x; unsigned char easing_accumulator_value; - if (hud_element->unk0C != 0) { - counter_value = *hud_element->unk0C; - cap = hud_element->unk08; + if (hud_element->value_source != 0) { + counter_value = *hud_element->value_source; + cap = hud_element->max_value; if (counter_value < 0) { counter_value = 0; } - hud_element->unk78 = counter_value; + hud_element->target_value = counter_value; if (cap < counter_value) { - hud_element->unk78 = cap; + hud_element->target_value = cap; } } - if (hud_element->unk74 != hud_element->unk78) { - hud_element->unk7C = scale_game_frames(0xB4); - if (hud_element->unk6C >= 0x18) { - x = hud_element->unk74 - hud_element->unk78; + if (hud_element->shown_value != hud_element->target_value) { + hud_element->visible_timer = scale_game_frames(0xB4); + if (hud_element->slide >= 0x18) { + x = hud_element->shown_value - hud_element->target_value; value_distance = x; value_distance = value_distance < 0 ? -value_distance : value_distance; if (value_distance != 0) { @@ -53,17 +53,17 @@ void hud_update_counter(HudElem *hud_element) { easing_accumulator_value = counter_state_bytes[3]; if (scale_game_frames(2) < easing_accumulator_value) { easing_step = counter_state_bytes[3] / scale_game_frames(2); - if (hud_element->unk78 < hud_element->unk74) { - hud_element->unk74 = hud_element->unk74 - easing_step; + if (hud_element->target_value < hud_element->shown_value) { + hud_element->shown_value = hud_element->shown_value - easing_step; } else { - hud_element->unk74 = hud_element->unk74 + easing_step; + hud_element->shown_value = hud_element->shown_value + easing_step; } counter_state_bytes[3] -= easing_step * scale_game_frames(2); } } } } - if (hud_element->unk7C >= scale_game_frames(5)) { + if (hud_element->visible_timer >= scale_game_frames(5)) { if (counter_state_bytes[0] < scale_game_frames(8)) { counter_state_bytes[0]++; } else if (counter_state_bytes[1] < scale_game_frames(8)) { @@ -71,7 +71,7 @@ void hud_update_counter(HudElem *hud_element) { } } else { if (counter_state_bytes[1] != 0 || counter_state_bytes[0] != 0) { - hud_element->unk6C = 1; + hud_element->slide = 1; } if (counter_state_bytes[1] != 0) { counter_state_bytes[1]--; diff --git a/src/overlays/shared/ui/hud/initialize_hud_element_defaults.c b/src/overlays/shared/ui/hud/initialize_hud_element_defaults.c index d8e6504cc3..a92d9b4725 100644 --- a/src/overlays/shared/ui/hud/initialize_hud_element_defaults.c +++ b/src/overlays/shared/ui/hud/initialize_hud_element_defaults.c @@ -18,11 +18,11 @@ void initialize_hud_element_defaults(HudElem *hud_element) __asm__("FUN_L05_002661a0"); void initialize_hud_element_defaults(HudElem *hud_element) { - hud_element->unk7C = scale_game_frames(0xB4) + 0x1E; + hud_element->visible_timer = scale_game_frames(0xB4) + 0x1E; hud_element->w = 0x80; - hud_element->unk48 = 0; + hud_element->offset_x = 0; hud_element->h = 0x80; - hud_element->unk4A = 0; + hud_element->offset_y = 0; } /* Ported from rac1-decomp (src/overlays/shared/hud_00263490.c: func_L05_00266BD8), where it is exact; names translated to the US level program. */ @@ -91,7 +91,7 @@ int draw_hud_progress_and_rank(HudElem *hud_element) { char small_buf[16]; int x, y, count; - if (hud_element->unk6C <= 0) { + if (hud_element->slide <= 0) { return 0; } { @@ -137,7 +137,7 @@ int draw_hud_progress_and_rank(HudElem *hud_element) { sprintf(small_buf, D_L05_0015F860, hero.race_ammo); /* Fakematch: the dead early copy of the default row gives retail's register order. */ y2 = pal_mode ? 10 : 18; - x2 = hud_element->unk50; + x2 = hud_element->x; if (alternate_item_available[0] == 0) { y2 = pal_mode ? 10 : 18; } else { @@ -165,7 +165,7 @@ int draw_hud_timer(HudElem *hud_element) { int min, sec, hund; int x; - if (hud_element->unk6C <= 0) { + if (hud_element->slide <= 0) { return 0; } /* written as -(row) + height: the plain `height - row` form folds the +10/+18 into the subtraction */ diff --git a/src/overlays/shared/ui/hud/initialize_numeric_hud_element.c b/src/overlays/shared/ui/hud/initialize_numeric_hud_element.c index 2c6721d649..742f19562c 100644 --- a/src/overlays/shared/ui/hud/initialize_numeric_hud_element.c +++ b/src/overlays/shared/ui/hud/initialize_numeric_hud_element.c @@ -11,9 +11,9 @@ void initialize_numeric_hud_element(HudElem *hud_element) __asm__("FUN_L00_00237190"); void initialize_numeric_hud_element(HudElem *hud_element) { - hud_element->unk7C = scale_game_frames(0xA) + 0x1E; - hud_element->unk48 = 0; - hud_element->unk4A = 0; + hud_element->visible_timer = scale_game_frames(0xA) + 0x1E; + hud_element->offset_x = 0; + hud_element->offset_y = 0; hud_element->w = 0x20; hud_element->h = 0x20; initialize_numeric_hud_values_and_dimensions(hud_element); From 70bd443cb76e6b1eb11b3766fa9346a8fa8b4b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:01:05 +0000 Subject: [PATCH 023/213] decomp: name crate class and bolt moby fields in shared pickups --- src/overlays/shared/pickups/bolt.c | 27 ++++++++++++++------------- src/overlays/shared/pickups/crate.c | 22 +++++++++++----------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/src/overlays/shared/pickups/bolt.c b/src/overlays/shared/pickups/bolt.c index ac622fd3a0..392315284d 100644 --- a/src/overlays/shared/pickups/bolt.c +++ b/src/overlays/shared/pickups/bolt.c @@ -65,24 +65,24 @@ typedef struct Bolt { BoltClass *pclass; /* 0x24 */ u8 pad28[4]; f32 scale; /* 0x2C */ - u8 unk30; /* 0x30 */ + u8 update_dist; /* 0x30 */ u8 is_visible; /* 0x31 */ u16 draw_distance; /* 0x32 */ u16 flags; /* 0x34 */ u8 pad36[0x3D]; - u8 unk73; /* 0x73 */ + u8 metal_alpha; /* 0x73 */ u8 pad74[4]; BoltVars *vars; /* 0x78 */ u8 pad7C[0x2A]; s16 oclass; /* 0xA6 */ u8 padA8[8]; - u8 unkB0; /* 0xB0 */ + u8 mission; /* 0xB0 */ u8 padB1; - s16 unkB2; /* 0xB2 */ + s16 save_id; /* 0xB2 */ u8 padB4[0xC]; Vec4 rot; /* 0xC0 */ u8 padD0[0x10]; - Vec4 unkE0; /* 0xE0 */ + Vec4 rot_row2; /* 0xE0 */ } Bolt; typedef struct { @@ -213,16 +213,16 @@ void bolt_update(Bolt *bolt_moby) { switch (bolt_moby->state) { case BOLT_INITIALIZE: bolt_moby->state = BOLT_IDLE; - bolt_moby->unk73 = 0x14; + bolt_moby->metal_alpha = 0x14; bolt_moby->flags |= 0x100; - bolt_moby->unk30 = 0x20; + bolt_moby->update_dist = 0x20; bolt_moby->draw_distance = 0x20; if (random_integer_below(2) == 0) { v->unk55 |= 1; } - fast_vec_normalize(&geometry_scratch, &bolt_moby->unkE0, 0.2f); + fast_vec_normalize(&geometry_scratch, &bolt_moby->rot_row2, 0.2f); fast_vec_add(&geometry_scratch, &geometry_scratch, &bolt_moby->pos); - fast_vec_normalize(&vector_scratch, &bolt_moby->unkE0, -3.0f); + fast_vec_normalize(&vector_scratch, &bolt_moby->rot_row2, -3.0f); fast_vec_add(&vector_scratch, &vector_scratch, &bolt_moby->pos); hit = FUN_001efa68(&geometry_scratch, &vector_scratch, 0x22, 0, 0); if (v->landed == 0 && hit != 0) { @@ -440,10 +440,11 @@ void bolt_update(Bolt *bolt_moby) { } FUN_L00_002a6b70_c(bolt_moby); if ((u8 *)bolt_moby < D_L00_0015FFDC) { - D_L00_001BA5D0.killed[bolt_moby->unkB2] = bolt_moby->unkB0 + 2; - if (bolt_moby->unkB0 == 0xFF || (mission_state_macro[bolt_moby->unkB0] != 0xFF && - D_0014C050[D_0015ED84][bolt_moby->unkB0] == 0xFF)) { - D_L00_001BB230.killed[bolt_moby->unkB2] = bolt_moby->unkB0 + 2; + D_L00_001BA5D0.killed[bolt_moby->save_id] = bolt_moby->mission + 2; + if (bolt_moby->mission == 0xFF || + (mission_state_macro[bolt_moby->mission] != 0xFF && + D_0014C050[D_0015ED84][bolt_moby->mission] == 0xFF)) { + D_L00_001BB230.killed[bolt_moby->save_id] = bolt_moby->mission + 2; } } mark_moby_for_removal(bolt_moby); diff --git a/src/overlays/shared/pickups/crate.c b/src/overlays/shared/pickups/crate.c index 8a15f1588a..c1ecb67e6e 100644 --- a/src/overlays/shared/pickups/crate.c +++ b/src/overlays/shared/pickups/crate.c @@ -35,9 +35,9 @@ enum { typedef struct { u8 pad00[0xE]; - u8 unkE; + u8 lod_trans; u8 pad0F; - u32 unk10; + u32 collision; } Part; typedef struct Moby Moby; @@ -73,7 +73,7 @@ typedef struct { u32 flags; u8 padB0[0xB4 - 0xB0]; s32 frameB4; - u64 unkB8; /* saved moby spawn_frame word */ + u64 saved_spawn_frame; /* saved moby spawn_frame word */ u8 padC0[0xC6 - 0xC0]; s16 unkC6; u8 unkC8; @@ -349,7 +349,7 @@ void crate_update(struct Moby *moby) { moby->command = truncate_float_to_s32(scale_time(random_float_between(5.0f, 15.0f))); } - crate_vars->unkB8 = moby->spawn_frame; + crate_vars->saved_spawn_frame = moby->spawn_frame; doHit = 0; } if (moby->oclass >= 0x1FB && moby->oclass <= 0x1FD) { @@ -372,7 +372,7 @@ void crate_update(struct Moby *moby) { moby->class_slot = D_L00_00197BC0[moby->oclass]; moby->pclass = D_L00_00197300[moby->class_slot]; update_moby_animation_state(moby); - moby->lod_dist = ((Part *)moby->pclass)->unkE; + moby->lod_dist = ((Part *)moby->pclass)->lod_trans; moby->state = CRATE_STATE_CLASS_CHANGE_COOLDOWN; moby->command = scale_game_frames(15); doHit = 0; @@ -457,7 +457,7 @@ void crate_update(struct Moby *moby) { moby->state = CRATE_STATE_PROCESS_HITS; moby->visible = 1; moby->flags &= ~1; - moby->collision = ((Part *)moby->pclass)->unk10; + moby->collision = ((Part *)moby->pclass)->collision; moby->flags |= 0x1000; break; } @@ -503,7 +503,7 @@ void crate_update(struct Moby *moby) { moby->state = CRATE_STATE_PROCESS_HITS; moby->visible = 1; moby->flags &= ~1; - moby->collision = ((Part *)moby->pclass)->unk10; + moby->collision = ((Part *)moby->pclass)->collision; moby->flags |= 0x1000; crate_vars->flags |= 4; break; @@ -518,7 +518,7 @@ void crate_update(struct Moby *moby) { crate_vars->below = NULL; moby->visible = 1; moby->flags &= ~1; - moby->collision = ((Part *)moby->pclass)->unk10; + moby->collision = ((Part *)moby->pclass)->collision; moby->flags |= 0x1000; } break; @@ -527,7 +527,7 @@ void crate_update(struct Moby *moby) { case CRATE_STATE_DETONATION_COUNTDOWN: if (moby->command == 0) { moby->command = scale_game_frames(60) * 3 - 1; - crate_vars->unkB8 = moby->spawn_frame; + crate_vars->saved_spawn_frame = moby->spawn_frame; } else if (moby->command > scale_game_frames(15) && hit_contact != NULL) { moby->command = truncate_float_to_s32(scale_time(random_float_between(5.0f, 15.0f))); } @@ -539,10 +539,10 @@ void crate_update(struct Moby *moby) { moby->command < scale_game_frames(15)) { set_moby_color(moby, 0xC8, 0x40, 0x40); } else { - moby->spawn_frame = crate_vars->unkB8; + moby->spawn_frame = crate_vars->saved_spawn_frame; } if (moby->command == 1 || D_001413DC == 0x16) { - moby->spawn_frame = crate_vars->unkB8; + moby->spawn_frame = crate_vars->saved_spawn_frame; break_crate(moby, 1, NULL); crate_drop_bolts(moby); } From e75834b45d27691eecac4ab74d33b5eca78ed7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:01:06 +0000 Subject: [PATCH 024/213] decomp: name stationary ship carrier moby fields in level 1 --- src/overlays/l01/mobys/stationary_ship.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/overlays/l01/mobys/stationary_ship.c b/src/overlays/l01/mobys/stationary_ship.c index c2cae86a34..0231e40155 100644 --- a/src/overlays/l01/mobys/stationary_ship.c +++ b/src/overlays/l01/mobys/stationary_ship.c @@ -74,7 +74,7 @@ typedef struct { Vec4f pos; /* 0x10 */ u8 state; /* 0x20 */ u8 pad21[0xF]; - u8 unk30; /* 0x30 */ + u8 update_dist; /* 0x30 */ u8 pad31[3]; u16 flags; /* 0x34 */ u8 pad36[0xA]; @@ -87,9 +87,9 @@ typedef struct { u8 pad7C[0x2A]; s16 oclass; /* 0xA6 */ u8 padA8[0x14]; - u8 unkBC; /* 0xBC */ + u8 command; /* 0xBC */ u8 padBD[3]; - Vec4f unkC0; /* 0xC0 */ + Vec4f rot_row0; /* 0xC0 */ u8 padD0[0x30]; } CarrierMoby; @@ -137,7 +137,7 @@ void stationary_ship_update(CarrierMoby *carrier_moby) { v->state = CARRIER_STATE_WAIT_FOR_TRIGGER; v->arrived = 0; v->keep = 0; - carrier_moby->unk30 = 0xFF; + carrier_moby->update_dist = 0xFF; carrier_moby->flags |= 0x41; return; case CARRIER_STATE_WAIT_FOR_TRIGGER: @@ -147,7 +147,7 @@ void stationary_ship_update(CarrierMoby *carrier_moby) { if (v->camera != -1) { cv = (CarrierCamVars *)((CarrierMoby *)ents)[v->camera].pvars; cv->frames = scale_game_frames(truncate_float_to_s32(v->seconds * 60.0f)); - ((CarrierMoby *)ents)[v->camera].unkBC = 1; + ((CarrierMoby *)ents)[v->camera].command = 1; } if (v->path != -1) { carrier_path = l01_paths[v->path]; @@ -208,7 +208,7 @@ void stationary_ship_update(CarrierMoby *carrier_moby) { if (v->state != CARRIER_STATE_WAIT_FOR_TRIGGER) { ((CarrierMoby *)ents)[v->riders[i]].flags &= ~0x41; } - transform_vector_by_basis(&offs.v[i], &offs.v[i], &carrier_moby->unkC0); + transform_vector_by_basis(&offs.v[i], &offs.v[i], &carrier_moby->rot_row0); fast_vec_add( &((CarrierMoby *)ents)[v->riders[i]].pos, &carrier_moby->pos, &offs.v[i]); qcopy_nc(&((CarrierMoby *)ents)[v->riders[i]].rot, &carrier_moby->rot); From 2bfdb424bb0bc7ce4a3f318e5652c15b74a75767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:01:06 +0000 Subject: [PATCH 025/213] decomp: name Skid's agent, sand shark, liftcar and elevator fields in level 2 --- src/overlays/l02/mobys/elevator.c | 12 ++-- src/overlays/l02/mobys/liftcar_platform.c | 26 +++---- src/overlays/l02/mobys/sand_shark.c | 46 +++++++------ src/overlays/l02/mobys/sandshark_egg.c | 13 ++-- src/overlays/l02/mobys/skids_agent.c | 84 +++++++++++++---------- 5 files changed, 97 insertions(+), 84 deletions(-) diff --git a/src/overlays/l02/mobys/elevator.c b/src/overlays/l02/mobys/elevator.c index 03870e8907..a666e3531b 100644 --- a/src/overlays/l02/mobys/elevator.c +++ b/src/overlays/l02/mobys/elevator.c @@ -260,20 +260,20 @@ extern void draw_geometry_quad(void *, void *, int); typedef struct ElevatorVars { u8 pad_0[0xA0]; - s32 unkA0; + s32 shaft_cuboid_index; u8 pad_A4[0xC]; - f32 unkB0; + f32 vertical_speed; u8 pad_B4[0x4]; - f32 unkB8; + f32 height_offset; } ElevatorVars; void draw_elevator_rotating_rings(struct Moby *moby) { L16RingPacket packet; L16RingMatrix matrix; ElevatorVars *moby_vars = (ElevatorVars *)moby->pvars; - int bound_index = (moby_vars->unkA0) << 7; + int bound_index = (moby_vars->shaft_cuboid_index) << 7; char *elevator_transform_entry = (char *)(bound_index + (int)level02_elevator_transform_table); - float translation = (moby_vars->unkB8); + float translation = (moby_vars->height_offset); float lower = (*(float *)((char *)elevator_transform_entry + 0x38)); float half = (*(float *)((char *)elevator_transform_entry + 0x28)); float upper = lower + half + translation; @@ -288,7 +288,7 @@ void draw_elevator_rotating_rings(struct Moby *moby) { lower += translation; color = fast_tween_color(level02_elevator_ring_zero_speed_color, level02_elevator_ring_max_speed_color, - absolute_float((moby_vars->unkB0)) / + absolute_float((moby_vars->vertical_speed)) / (level02_elevator_max_vertical_speed_gp * D_0015ED6C)); copy_matrix_rotation(&matrix, &moby->rot_row0); qcopy(matrix.position, &moby->pos); diff --git a/src/overlays/l02/mobys/liftcar_platform.c b/src/overlays/l02/mobys/liftcar_platform.c index 39b4a03a44..936827f8ba 100644 --- a/src/overlays/l02/mobys/liftcar_platform.c +++ b/src/overlays/l02/mobys/liftcar_platform.c @@ -25,10 +25,10 @@ void liftcar_platform_update(struct Moby *moby) __asm__("FUN_L02_002e2228"); typedef struct LiftcarPlatformVars { u8 pad_0[0x60]; - f32 unk60[4]; + f32 entity_matrix[4]; u8 pad_70[0x30]; - s32 unkA0; - s32 unkA4; + s32 driver_moby_index; + s32 voice; } LiftcarPlatformVars; /* Moby class 792 */ @@ -43,7 +43,7 @@ void liftcar_platform_update(struct Moby *moby) { LIFTCAR_PLATFORM_FOLLOW_DRIVER_ONLY = 6 }; LiftcarPlatformVars *platform_vars = (LiftcarPlatformVars *)moby->pvars; - struct Moby *driver = &D_L02_0015FFD8[platform_vars->unkA0]; + struct Moby *driver = &D_L02_0015FFD8[platform_vars->driver_moby_index]; Vec4 delta; Vec4 old_rot; float joint_mtx[16]; @@ -86,11 +86,11 @@ void liftcar_platform_update(struct Moby *moby) { moby->state == LIFTCAR_PLATFORM_WAIT_FOR_MISSION_GATE) { moby->state = LIFTCAR_PLATFORM_ANIMATE_THEN_WAIT_FOR_RIDER_OR_HERO_ABOVE; set_moby_animation(driver, 0, 0); - platform_vars->unkA4 = allocate_voice_for_target_entry(2, 4, driver); + platform_vars->voice = allocate_voice_for_target_entry(2, 4, driver); } else { moby->state = LIFTCAR_PLATFORM_ANIMATE_THEN_WAIT_FOR_RIDER_OR_HERO_BELOW; set_moby_animation(driver, 2, 0); - platform_vars->unkA4 = allocate_voice_for_target_entry(0, 4, driver); + platform_vars->voice = allocate_voice_for_target_entry(0, 4, driver); } } else if (hero.ground_moby != moby) { moby->command = 0; @@ -103,34 +103,34 @@ void liftcar_platform_update(struct Moby *moby) { if (vector_distance_xy(&moby->pos, &hero.motion.pos) < 1.5f && hero.motion.pos.f[2] < moby->pos.z - 1.5f) { driver->anim_speed = 0.0f; - voice = platform_vars->unkA4; + voice = platform_vars->voice; if (voice != -1) { char *e = ((char *)&voice_pool) + voice * 0x70; if (*(struct Moby **)(e + 0x88) == driver && *(unsigned char *)(e + 0x74) != 0) { release_voice_slot(voice); } } - platform_vars->unkA4 = -1; + platform_vars->voice = -1; } if (driver->anim_speed == 0.0f && (vector_distance_xy(&moby->pos, &hero.motion.pos) > 2.0f || moby->pos.z - 1.25f < hero.motion.pos.f[2])) { driver->anim_speed = 1.0f; if (moby->state == LIFTCAR_PLATFORM_ANIMATE_THEN_WAIT_FOR_RIDER_OR_HERO_ABOVE) { - platform_vars->unkA4 = allocate_voice_for_target_entry(2, 4, driver); + platform_vars->voice = allocate_voice_for_target_entry(2, 4, driver); } else { - platform_vars->unkA4 = allocate_voice_for_target_entry(0, 4, driver); + platform_vars->voice = allocate_voice_for_target_entry(0, 4, driver); } } if (driver->anim_flags & 2) { - voice = platform_vars->unkA4; + voice = platform_vars->voice; if (voice != -1) { char *e = ((char *)&voice_pool) + voice * 0x70; if (*(struct Moby **)(e + 0x88) == driver && *(unsigned char *)(e + 0x74) != 0) { release_voice_slot(voice); } } - platform_vars->unkA4 = -1; + platform_vars->voice = -1; if (moby->state == LIFTCAR_PLATFORM_ANIMATE_THEN_WAIT_FOR_RIDER_OR_HERO_ABOVE) { moby->state = LIFTCAR_PLATFORM_WAIT_FOR_RIDER_OR_HERO_ABOVE; blend_moby_animation(driver, 1, 0, 0); @@ -147,5 +147,5 @@ void liftcar_platform_update(struct Moby *moby) { break; } fast_vec_add(&delta, &delta, &moby->pos); - update_entity_matrix(platform_vars->unk60, &delta, &old_rot, &moby->rot); + update_entity_matrix(platform_vars->entity_matrix, &delta, &old_rot, &moby->rot); } diff --git a/src/overlays/l02/mobys/sand_shark.c b/src/overlays/l02/mobys/sand_shark.c index cd4611b0e0..5e43e85deb 100644 --- a/src/overlays/l02/mobys/sand_shark.c +++ b/src/overlays/l02/mobys/sand_shark.c @@ -184,7 +184,7 @@ void emit_sand_shark_dust_burst(void *moby) { /* pvars of the Aridia enemy sand_shark_update updates (it leaves its burrow, walks, jumps and digs back in). */ typedef struct { /* 0x000 */ char pad0[0x20]; - /* 0x020 */ float unk20; + /* 0x020 */ float health; /* 0x024 */ short unk24; /* 0x026 */ char pad26[3]; /* 0x029 */ unsigned char unk29; @@ -201,7 +201,7 @@ typedef struct { /* 0x0CA */ char padCA[6]; /* 0x0D0 */ void *unkD0; /* 0x0D4 */ char padD4[0x4C]; - /* 0x120 */ char unk120[0x60]; + /* 0x120 */ char motion[0x60]; /* 0x180 */ int walk_mode; /* 0x184 */ float walk_184; /* 0x188 */ float walk_188; @@ -216,29 +216,29 @@ typedef struct { /* 0x214 */ int target_selection_status; /* 0x218 */ char pad218[8]; /* 0x220 */ OvlVec4 home; - /* 0x230 */ OvlVec4 unk230; + /* 0x230 */ OvlVec4 spawn_position; /* 0x240 */ float turn_vel; /* 0x244 */ float turn_offset; /* 0x248 */ float turn_range; /* 0x24C */ float base_target_selection_range; /* 0x250 */ char pad250[4]; - /* 0x254 */ float unk254; + /* 0x254 */ float walk_speed; /* 0x258 */ int initialization_gate_moby_index; /* 0x25C */ short target_range_refresh_timer; /* 0x25E */ short target_range_extension_timer; /* 0x260 */ int turn_timer; /* 0x264 */ char pad264[8]; /* 0x26C */ int primary_hero_launch_trigger_volume_index; - /* 0x270 */ int unk270; + /* 0x270 */ int secondary_hero_launch_trigger_volume_index; /* 0x274 */ int wander_target_volume_index; /* 0x278 */ int target_activation_volume_index; /* 0x27C */ int selected_relaunch_moby; /* 0x280 */ char pad280[4]; /* 0x284 */ int turn_offset_multiplier; - /* 0x288 */ int unk288; + /* 0x288 */ int spawner_moby_index; /* 0x28C */ int launch_origin_moby_index; /* 0x290 */ int path; - /* 0x294 */ float unk294; + /* 0x294 */ float navigation_arrive_distance; /* 0x298 */ int outside_path_return_active; /* 0x29C */ int death_landing_particles_emitted; /* 0x2A0 */ char unk2A0[0x10]; @@ -328,14 +328,15 @@ void sand_shark_update(struct Moby *moby) { mark_moby_for_removal(moby); return; } - if (sand_shark_behavior_vars->unk288 >= 0) { + if (sand_shark_behavior_vars->spawner_moby_index >= 0) { extern struct Moby *D_L02_0015FFD8_gp __asm__("D_L02_0015FFD8") __attribute__((sda)); - (*(int *)(D_L02_0015FFD8_gp[sand_shark_behavior_vars->unk288].pvars + 0x14C))++; + (*(int *)(D_L02_0015FFD8_gp[sand_shark_behavior_vars->spawner_moby_index].pvars + + 0x14C))++; } qcopy(&sand_shark_behavior_vars->home, &moby->pos); - qcopy(&sand_shark_behavior_vars->unk230, &moby->pos); + qcopy(&sand_shark_behavior_vars->spawn_position, &moby->pos); sand_shark_behavior_vars->unk24 = 1; - sand_shark_behavior_vars->unk20 = 1.0f; + sand_shark_behavior_vars->health = 1.0f; sand_shark_behavior_vars->unk58 = D_L02_00161900; sand_shark_behavior_vars->unk5C = 1; sand_shark_behavior_vars->relaunch_request_state = 1; @@ -345,7 +346,7 @@ void sand_shark_update(struct Moby *moby) { sand_shark_behavior_vars->walk_188 = sand_shark_behavior_vars->walk_18C = 2.0f; sand_shark_behavior_vars->walk_mode = 0x200; sand_shark_behavior_vars->walk_184 = 0.5f; - sand_shark_behavior_vars->walk_step = sand_shark_behavior_vars->unk254 * D_0015ED6C; + sand_shark_behavior_vars->walk_step = sand_shark_behavior_vars->walk_speed * D_0015ED6C; if (rand_e50() & 1) { moby->flags |= 0x8000; } @@ -497,7 +498,8 @@ void sand_shark_update(struct Moby *moby) { &moby->pos, &target_or_particle_vector, &navigation_point) && - fast_vec_dist(&moby->pos, &navigation_point) < sand_shark_behavior_vars->unk294) { + fast_vec_dist(&moby->pos, &navigation_point) < + sand_shark_behavior_vars->navigation_arrive_distance) { hit14 = 1; } if (sand_shark_behavior_vars->target_range_extension_timer != 0) { @@ -595,7 +597,8 @@ void sand_shark_update(struct Moby *moby) { blend_moby_animation(moby, 0, 0, scale_game_frames(3)); } } else { - sand_shark_behavior_vars->unk294 = random_float_between(2.0f, 3.5f); + sand_shark_behavior_vars->navigation_arrive_distance = + random_float_between(2.0f, 3.5f); sand_shark_behavior_vars->walk_step = D_0015ED6C * 4.0f; moby->state = SAND_SHARK_APPROACH_TARGET_WITH_PATH_PROXIMITY_CHECK; if (moby->prev_seq != 0) { @@ -765,7 +768,7 @@ void sand_shark_update(struct Moby *moby) { sand_shark_behavior_vars->target_activation_volume_index)) { moby->state = SAND_SHARK_APPROACH_TARGET; sand_shark_behavior_vars->walk_step = - sand_shark_behavior_vars->unk254 * D_0015ED6C; + sand_shark_behavior_vars->walk_speed * D_0015ED6C; } } else if (fast_vec_length(&target_home_delta) < sand_shark_behavior_vars->base_target_selection_range) { @@ -775,7 +778,7 @@ void sand_shark_update(struct Moby *moby) { moby->state = SAND_SHARK_APPROACH_TARGET_WITH_HEIGHT_OFFSET; } sand_shark_behavior_vars->walk_step = - sand_shark_behavior_vars->unk254 * D_0015ED6C; + sand_shark_behavior_vars->walk_speed * D_0015ED6C; if (moby->prev_seq != 0) { blend_moby_animation(moby, 0, 0, scale_game_frames(3)); } @@ -798,7 +801,7 @@ void sand_shark_update(struct Moby *moby) { } break; case SAND_SHARK_KNOCKBACK_UNTIL_LANDING: - if (step_moby_motion(moby, sand_shark_behavior_vars->unk120) & 1) { + if (step_moby_motion(moby, sand_shark_behavior_vars->motion) & 1) { moby->state = SAND_SHARK_LANDED_AFTER_KNOCKBACK; if (moby->prev_seq != 4) { blend_moby_animation(moby, 4, 8, scale_game_frames(3)); @@ -812,7 +815,7 @@ void sand_shark_update(struct Moby *moby) { } break; case SAND_SHARK_SUCK_CANNON_INTERACTION: - if (FUN_L00_002dc9f0_e50(moby, sand_shark_behavior_vars->unk120)) { + if (FUN_L00_002dc9f0_e50(moby, sand_shark_behavior_vars->motion)) { moby->state = SAND_SHARK_BEGIN_RETURN_HOME_WITH_HEIGHT_OFFSET; sand_shark_behavior_vars->unkC8 = 0; } @@ -824,8 +827,9 @@ void sand_shark_update(struct Moby *moby) { sand_shark_behavior_vars->primary_hero_launch_trigger_volume_index)) { in = 1; } else { - in = is_point_inside_clip_volume(&hero.motion.pos, sand_shark_behavior_vars->unk270) != - 0; + in = is_point_inside_clip_volume( + &hero.motion.pos, + sand_shark_behavior_vars->secondary_hero_launch_trigger_volume_index) != 0; } if (in) { struct Moby *dest = @@ -892,7 +896,7 @@ void sand_shark_update(struct Moby *moby) { break; } case SAND_SHARK_DEATH_KNOCKBACK: { - int knockback_status_flags = step_moby_motion(moby, sand_shark_behavior_vars->unk120); + int knockback_status_flags = step_moby_motion(moby, sand_shark_behavior_vars->motion); if ((knockback_status_flags & 1) && sand_shark_behavior_vars->death_landing_particles_emitted == 0) { sand_shark_behavior_vars->death_landing_particles_emitted = 1; diff --git a/src/overlays/l02/mobys/sandshark_egg.c b/src/overlays/l02/mobys/sandshark_egg.c index 68c6d0ec7a..65c20ccfa7 100644 --- a/src/overlays/l02/mobys/sandshark_egg.c +++ b/src/overlays/l02/mobys/sandshark_egg.c @@ -23,7 +23,7 @@ void sandshark_egg_update(struct Moby *moby) __asm__("FUN_L02_002e0280"); typedef struct SandsharkEggVars { u8 pad_0[0x60]; - char *unk60; + char *linked_moby; } SandsharkEggVars; /* Moby class 755 */ @@ -67,13 +67,14 @@ void sandshark_egg_update(struct Moby *moby) { } while (i >= 0); break; case SANDSHARK_EGG_HANDOFF_TO_LINKED_MOBY: - linked_moby = egg_vars->unk60; + linked_moby = egg_vars->linked_moby; qcopy(linked_moby + 0x10, &moby->pos); linked_moby[0x20] = 0x11; - blend_moby_animation(egg_vars->unk60, 5, 0, 1); - *(int *)(egg_vars->unk60 + 0x94) = *(int *)(*(char **)(egg_vars->unk60 + 0x24) + 0x10); - *(float *)(egg_vars->unk60 + 0x58) = 1.0f; - update_entity(egg_vars->unk60); + blend_moby_animation(egg_vars->linked_moby, 5, 0, 1); + *(int *)(egg_vars->linked_moby + 0x94) = + *(int *)(*(char **)(egg_vars->linked_moby + 0x24) + 0x10); + *(float *)(egg_vars->linked_moby + 0x58) = 1.0f; + update_entity(egg_vars->linked_moby); mark_moby_for_removal(moby); break; } diff --git a/src/overlays/l02/mobys/skids_agent.c b/src/overlays/l02/mobys/skids_agent.c index c80be7f89a..f80a7a621a 100644 --- a/src/overlays/l02/mobys/skids_agent.c +++ b/src/overlays/l02/mobys/skids_agent.c @@ -67,27 +67,27 @@ typedef struct SkidsAgentVars { u8 pad_0[0x4]; s16 unk4; u8 pad_6[0x2]; - u8 unk8; + u8 any_direction; u8 pad_9[0x3]; - f32 unkC; + f32 radius; u8 pad_10[0x10]; - char *unk20; + char *dialogue_data; u8 pad_24[0x1C]; - u8 unk40; + u8 joint_0_animation; u8 pad_41[0x63]; - f32 unkA4; - f32 unkA8; + f32 joint_0_target_pitch; + f32 joint_0_target_yaw; u8 pad_AC[0x4]; - f32 unkB0; + f32 joint_0_scale; u8 pad_B4[0xC]; - u8 unkC0; + u8 joint_1_animation; u8 pad_C1[0x67]; - f32 unk128; + f32 joint_1_target_yaw; u8 pad_12C[0x24]; - s32 unk150; + s32 return_camera_cuboid_index; s32 clip_volume_154; s32 camera_start_cuboid_index; - s32 unk15C; + s32 camera_end_cuboid_index; u8 idle_look_target_position; u8 pad_161[0x11]; s16 timer_172; @@ -95,8 +95,8 @@ typedef struct SkidsAgentVars { s16 timer_176; struct Moby *carried_prop; f32 fade_amount; - f32 unk180; - f32 unk184; + f32 camera_blend_t; + f32 camera_blend_speed; } SkidsAgentVars; /* Moby class 786 */ @@ -120,7 +120,7 @@ void skids_agent_update(struct Moby *moby) { if (item_available[0x2D] != 0) { goto kill; } - skids_agent_vars->unk20 = skids_agent_dialogue_data; + skids_agent_vars->dialogue_data = skids_agent_dialogue_data; moby->state = SKIDS_AGENT_IDLE_AND_TALK; initialize_npc_dialogue(moby, skids_agent_vars); initialize_moby_grounding(moby); @@ -132,11 +132,11 @@ void skids_agent_update(struct Moby *moby) { skids_agent_vars->carried_prop->flags |= 0x100; break; case SKIDS_AGENT_IDLE_AND_TALK: - if (skids_agent_vars->unk8 == 1 && + if (skids_agent_vars->any_direction == 1 && is_point_inside_clip_volume(&hero.motion.pos, skids_agent_vars->clip_volume_154) != 0) { - skids_agent_vars->unkC = 255.0f; + skids_agent_vars->radius = 255.0f; } else { - skids_agent_vars->unkC = 3.7f; + skids_agent_vars->radius = 3.7f; } if (update_npc_dialogue(moby, skids_agent_vars) != 0) { begin_dialogue_camera_transition(moby, 2.2f); @@ -180,9 +180,9 @@ void skids_agent_update(struct Moby *moby) { moby->state = SKIDS_AGENT_IDLE_AND_TALK; if (skids_agent_vars->unk4 == 0) { jet_clear_persistent(moby->mission); - if (skids_agent_vars->unk150 != -1) { + if (skids_agent_vars->return_camera_cuboid_index != -1) { char *camera_transform_entry = - (char *)l02_cuboids + (skids_agent_vars->unk150 << 7); + (char *)l02_cuboids + (skids_agent_vars->return_camera_cuboid_index << 7); jet_reset_camera(camera_transform_entry + 0x30, camera_transform_entry + 0x70); } } else if (skids_agent_vars->unk4 == 2) { @@ -214,29 +214,34 @@ void skids_agent_update(struct Moby *moby) { Vec4 rot; Vec4 from; Vec4 to; - advance_accelerated_scalar(&skids_agent_vars->unk180, - &skids_agent_vars->unk184, + advance_accelerated_scalar(&skids_agent_vars->camera_blend_t, + &skids_agent_vars->camera_blend_speed, 1.0f, frame_time_sq * 0.1f, frame_time_sq * 0.25f, frame_time * 0.5f); lerp_vector(&pos, (char *)l02_cuboids + (skids_agent_vars->camera_start_cuboid_index << 7) + 0x30, - (char *)l02_cuboids + (skids_agent_vars->unk15C << 7) + 0x30, - skids_agent_vars->unk180); + (char *)l02_cuboids + (skids_agent_vars->camera_end_cuboid_index << 7) + 0x30, + skids_agent_vars->camera_blend_t); qcopy_nc(&from, (char *)((skids_agent_vars->camera_start_cuboid_index << 7) + (s32)l02_cuboids) + 0x70); - qcopy_nc(&to, (char *)((skids_agent_vars->unk15C << 7) + (s32)l02_cuboids) + 0x70); - rot.f[2] = fast_add_rotations( - fast_subtract_rotations(to.f[2], from.f[2]) * skids_agent_vars->unk180, from.f[2]); - rot.f[1] = fast_add_rotations( - fast_subtract_rotations(to.f[1], from.f[1]) * skids_agent_vars->unk180, from.f[1]); - rot.f[0] = fast_add_rotations( - fast_subtract_rotations(to.f[0], from.f[0]) * skids_agent_vars->unk180, from.f[0]); + qcopy_nc(&to, + (char *)((skids_agent_vars->camera_end_cuboid_index << 7) + (s32)l02_cuboids) + + 0x70); + rot.f[2] = fast_add_rotations(fast_subtract_rotations(to.f[2], from.f[2]) * + skids_agent_vars->camera_blend_t, + from.f[2]); + rot.f[1] = fast_add_rotations(fast_subtract_rotations(to.f[1], from.f[1]) * + skids_agent_vars->camera_blend_t, + from.f[1]); + rot.f[0] = fast_add_rotations(fast_subtract_rotations(to.f[0], from.f[0]) * + skids_agent_vars->camera_blend_t, + from.f[0]); set_camera_position(&pos); set_camera_rotation(&rot); - if (skids_agent_vars->unk180 < 1.0f) { + if (skids_agent_vars->camera_blend_t < 1.0f) { approach_value(&skids_agent_vars->fade_amount, 0.0f, 0.1f); } else { approach_value(&skids_agent_vars->fade_amount, 1.0f, 0.1f); @@ -348,20 +353,23 @@ void skids_agent_update(struct Moby *moby) { pitch = 0.5235988f; else if (pitch < -0.5235988f) pitch = -0.5235988f; - skids_agent_vars->unkA4 = pitch; - skids_agent_vars->unkA8 = yaw * 0.7f; - skids_agent_vars->unk128 = yaw * 0.3f; + skids_agent_vars->joint_0_target_pitch = pitch; + skids_agent_vars->joint_0_target_yaw = yaw * 0.7f; + skids_agent_vars->joint_1_target_yaw = yaw * 0.3f; } if (big_head_cheat_enabled != 0) { - skids_agent_vars->unkB0 = 2.75f; + skids_agent_vars->joint_0_scale = 2.75f; } delta = frame_scale_sq; - update_joint_animation( - rotation_step * delta, rotation_limit * delta, moby, &skids_agent_vars->unk40, 0); + update_joint_animation(rotation_step * delta, + rotation_limit * delta, + moby, + &skids_agent_vars->joint_0_animation, + 0); update_joint_animation(rotation_step * frame_scale_sq, rotation_limit * frame_scale_sq, moby, - &skids_agent_vars->unkC0, + &skids_agent_vars->joint_1_animation, 1); } } From 7cdc2ffa0c7b72ce62d73a681671054ba6eb6ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:03:37 +0000 Subject: [PATCH 026/213] decomp: name train carriage, mine layer, path mover and red ship fields in level 3 --- .../l03/mobys/metropolis_train_carriage.c | 21 ++++---- src/overlays/l03/mobys/mine_layer.c | 16 +++--- .../l03/mobys/moving_platform_small.c | 50 +++++++++---------- src/overlays/l03/mobys/path_mover.c | 29 ++++++----- src/overlays/l03/mobys/red_ship_1.c | 4 +- 5 files changed, 62 insertions(+), 58 deletions(-) diff --git a/src/overlays/l03/mobys/metropolis_train_carriage.c b/src/overlays/l03/mobys/metropolis_train_carriage.c index 4d6827e96e..43ef96a3f6 100644 --- a/src/overlays/l03/mobys/metropolis_train_carriage.c +++ b/src/overlays/l03/mobys/metropolis_train_carriage.c @@ -14,9 +14,9 @@ void metropolis_train_carriage_update(struct Moby *moby) __asm__("FUN_L03_002953 typedef struct MetropolisTrainCarriageVars { u8 pad_0[0x20]; - f32 unk20[4]; + f32 entity_matrix[4]; u8 pad_30[0x2C]; - s32 unk5C; + s32 entity_matrix_flags; s32 unk60; s16 unk64; u8 pad_66[0x2]; @@ -24,11 +24,11 @@ typedef struct MetropolisTrainCarriageVars { u8 pad_69[0x15]; s16 unk7E; u8 pad_80[0x20]; - u8 unkA0; + u8 previous_position; u8 pad_A1[0xF]; - u8 unkB0; + u8 previous_rotation; u8 pad_B1[0x13]; - f32 unkC4; + f32 joint_0_distance; } MetropolisTrainCarriageVars; /* Moby class 1210 */ @@ -46,8 +46,8 @@ void metropolis_train_carriage_update(struct Moby *moby) { carriage_pvars = (MetropolisTrainCarriageVars *)moby->pvars; if ((moby->flags & 2) == 0) { current_position = &moby->pos; - previous_position = &carriage_pvars->unkA0; - previous_rotation = &carriage_pvars->unkB0; + previous_position = &carriage_pvars->previous_position; + previous_rotation = &carriage_pvars->previous_rotation; current_rotation = &moby->rot; if (moby->state == METROPOLIS_TRAIN_CARRIAGE_STATE_INITIALIZE) { carriage_pvars->unk60 = 0; @@ -55,15 +55,16 @@ void metropolis_train_carriage_update(struct Moby *moby) { carriage_pvars->unk68 = 4; carriage_pvars->unk7E = 0xD; moby_point_position(moby, 0, joint_zero_world_position); - carriage_pvars->unkC4 = fast_vec_dist(current_position, joint_zero_world_position); + carriage_pvars->joint_0_distance = + fast_vec_dist(current_position, joint_zero_world_position); qcopy(previous_position, current_position); qcopy(previous_rotation, current_rotation); - carriage_pvars->unk5C = 3; + carriage_pvars->entity_matrix_flags = 3; moby->update_dist = moby->draw_dist = 0xFF; } fast_vec_sub(position_delta, current_position, previous_position); update_entity_matrix( - carriage_pvars->unk20, position_delta, previous_rotation, current_rotation); + carriage_pvars->entity_matrix, position_delta, previous_rotation, current_rotation); qcopy(previous_position, current_position); qcopy(previous_rotation, current_rotation); } diff --git a/src/overlays/l03/mobys/mine_layer.c b/src/overlays/l03/mobys/mine_layer.c index 6e97f5e5c7..be622e3449 100644 --- a/src/overlays/l03/mobys/mine_layer.c +++ b/src/overlays/l03/mobys/mine_layer.c @@ -63,14 +63,14 @@ typedef struct { f32 kb_max; /* 0xC4 */ u8 padC8[8]; u8 walk[8]; /* 0xD0: walk driver (FUN_L01_0026d930, FUN_L00_00259028) */ - f32 unkD8; - f32 unkDC; + f32 walk_max_drop; + f32 walk_max_climb; u8 padE0[8]; f32 fall_speed; /* 0xE8 */ u8 padEC[8]; - f32 unkF4; + f32 walk_max_speed; u8 padF8[0x14]; - f32 unk10C; + f32 walk_turn_spring; f32 patrol_turn_damping_factor; f32 patrol_turn_step_limit; u8 pad118[8]; @@ -160,14 +160,14 @@ void mine_layer_update(struct Moby *mine_layer_moby) { switch (mine_layer_moby->state) { case MINE_LAYER_INITIALIZE: FUN_L01_0026d930(mine_layer_vars->walk); - mine_layer_vars->unk10C = frame_time_sq * 6.2831855f; + mine_layer_vars->walk_turn_spring = frame_time_sq * 6.2831855f; mine_layer_vars->patrol_turn_step_limit = frame_time * 6.2831855f; mine_layer_vars->patrol_turn_damping_factor = frame_time_sq * 18.849556f; - mine_layer_vars->unkF4 = frame_time * 5.0f; + mine_layer_vars->walk_max_speed = frame_time * 5.0f; mine_layer_vars->unk58 = 8; mine_layer_vars->unk5A = 8; - mine_layer_vars->unkDC = 2.0f; - mine_layer_vars->unkD8 = 2.0f; + mine_layer_vars->walk_max_climb = 2.0f; + mine_layer_vars->walk_max_drop = 2.0f; mine_layer_vars->health = 2.0f; mine_layer_vars->unk24 = 2; mine_layer_vars->unk28 = 1; diff --git a/src/overlays/l03/mobys/moving_platform_small.c b/src/overlays/l03/mobys/moving_platform_small.c index d645be68b1..f852b25d69 100644 --- a/src/overlays/l03/mobys/moving_platform_small.c +++ b/src/overlays/l03/mobys/moving_platform_small.c @@ -22,21 +22,21 @@ typedef struct MovingPlatformSmallVars { u8 pad_0[0x60]; f32 transform[16]; f32 node_direction[4]; - s32 unkB0; + s32 path_cursor; u8 pad_B4[0xC]; char *path; u8 pad_C4[0x1C]; s32 path_index; - f32 unkE4; + f32 speed; s32 wait_timer; - f32 unkEC; + f32 max_speed; s32 wait_frames; - f32 unkF4; - s32 unkF8; - f32 unkFC; + f32 slowdown_distance; + s32 reverse_direction; + f32 scale_factor; s32 timer_100; s32 voice; - s32 unk108; + s32 stop_at_every_node; s32 easing_frames; f32 path_endpoint_distance; f32 glide_speed; @@ -87,9 +87,9 @@ void moving_platform_small_update(char *moby) { noop_main_callback(moby); switch (((unsigned char *)moby)[0x20]) { case PLATFORM_INITIALIZE_AND_WAIT: - pa = &platform_pvars->unkB0; + pa = &platform_pvars->path_cursor; platform_pvars->path = ((char *)l03_paths[platform_pvars->path_index]); - if (platform_pvars->unkF8 != 0) { + if (platform_pvars->reverse_direction != 0) { pa[4] = -1; } else { pa[4] = 1; @@ -100,7 +100,7 @@ void moving_platform_small_update(char *moby) { } qcopy_nc(moby + 0x10, initial_path_position); *(int *)pa = pa[4] < 0 ? 0 : **(int **)(pa + 0x10) - 1; - MOBY(moby)->scale = MOBY(moby)->pclass->scale * platform_pvars->unkFC; + MOBY(moby)->scale = MOBY(moby)->pclass->scale * platform_pvars->scale_factor; platform_pvars->voice = -1; if (fast_dec_timer(&platform_pvars->timer_100)) { platform_pvars->path_endpoint_distance = fast_vec_dist( @@ -114,7 +114,7 @@ void moving_platform_small_update(char *moby) { } break; case PLATFORM_EASED_ENDPOINT_TRAVEL: - pb = &platform_pvars->unkB0; + pb = &platform_pvars->path_cursor; speed = platform_pvars->glide_speed; eased_endpoint_distance = 0.0f; if ((MOBY(moby)->oclass == 0x389 || MOBY(moby)->oclass == 0x364) && @@ -161,43 +161,43 @@ void moving_platform_small_update(char *moby) { } break; case PLATFORM_FOLLOW_PATH_NODES: - pc = &platform_pvars->unkB0; + pc = &platform_pvars->path_cursor; path = *(int **)(pc + 0x10); path_node_step = pc[4]; count = *path; end = path_node_step < 0 ? 0 : count - 1; - next_path_node_index = (platform_pvars->unkB0 + count + path_node_step) % count; + next_path_node_index = (platform_pvars->path_cursor + count + path_node_step) % count; node_off = next_path_node_index * 0x10; platform_position = moby + 0x10; fast_vec_sub( platform_pvars->node_direction, (char *)path + (node_off + 0x10), platform_position); next_path_node_byte_offset = node_off; target = *(char **)(pc + 0x10) + 0x10; - if (platform_pvars->unk108 != 0) { + if (platform_pvars->stop_at_every_node != 0) { target += next_path_node_byte_offset; } else { target += end * 0x10; node_off = 0; /* dead store: unused afterwards, but needed for the retail register allocation */ } - if (fast_vec_dist(platform_position, target) < platform_pvars->unkF4) { - approach_value(&platform_pvars->unkE4, + if (fast_vec_dist(platform_position, target) < platform_pvars->slowdown_distance) { + approach_value(&platform_pvars->speed, frame_time * 0.5f, - platform_pvars->unkEC * platform_pvars->unkEC / platform_pvars->unkF4 * - frame_time_sq * 0.5f); + platform_pvars->max_speed * platform_pvars->max_speed / + platform_pvars->slowdown_distance * frame_time_sq * 0.5f); } else { - approach_value(&platform_pvars->unkE4, - platform_pvars->unkEC * frame_time, - platform_pvars->unkEC * platform_pvars->unkEC / platform_pvars->unkF4 * - frame_time_sq * 0.5f); + approach_value(&platform_pvars->speed, + platform_pvars->max_speed * frame_time, + platform_pvars->max_speed * platform_pvars->max_speed / + platform_pvars->slowdown_distance * frame_time_sq * 0.5f); } - FUN_L00_0025f730(platform_pvars->node_direction, platform_pvars->unkE4); + FUN_L00_0025f730(platform_pvars->node_direction, platform_pvars->speed); fast_vec_add(moby + 0x10, moby + 0x10, platform_pvars->node_direction); if (fast_vec_dist(moby + 0x10, *(char **)(pc + 0x10) + (next_path_node_byte_offset + 0x10)) < - platform_pvars->unkE4 * 2.0f) { + platform_pvars->speed * 2.0f) { *(int *)pc = next_path_node_index; - if ((next_path_node_index == end || platform_pvars->unk108 != 0) && + if ((next_path_node_index == end || platform_pvars->stop_at_every_node != 0) && platform_pvars->wait_frames > 0) { voice_slot_index = platform_pvars->voice; if (voice_slot_index != -1) { diff --git a/src/overlays/l03/mobys/path_mover.c b/src/overlays/l03/mobys/path_mover.c index 2165f320fc..1bc60a62a1 100644 --- a/src/overlays/l03/mobys/path_mover.c +++ b/src/overlays/l03/mobys/path_mover.c @@ -16,10 +16,10 @@ void path_mover_update(struct Moby *path_moby) __asm__("FUN_L03_002db020"); typedef struct PathMoverVars { u8 pad_0[0x20]; - f32 unk20[4]; + f32 entity_matrix[4]; u8 pad_30[0x30]; - char *unk60; - f32 unk64; + char *path; + f32 path_distance; } PathMoverVars; /* Moby class 898 */ @@ -34,25 +34,28 @@ void path_mover_update(struct Moby *path_moby) { *(OvlQuad *)previous_position = *(OvlQuad *)&path_moby->pos; path_moby_vars = (PathMoverVars *)path_moby->pvars; - path_moby_vars->unk64 += path_mover_distance_step; - movement_scratch[0] = fast_cos(path_moby->rot.z) * path_moby_vars->unk64; - movement_scratch[1] = fast_sin(path_moby->rot.z) * path_moby_vars->unk64; + path_moby_vars->path_distance += path_mover_distance_step; + movement_scratch[0] = fast_cos(path_moby->rot.z) * path_moby_vars->path_distance; + movement_scratch[1] = fast_sin(path_moby->rot.z) * path_moby_vars->path_distance; *(int *)&movement_scratch[2] = 0; - fast_vec_add(movement_scratch, movement_scratch, path_moby_vars->unk60 + 0x10); - i = truncate_float_to_s32(path_moby_vars->unk64 / *(float *)(path_moby_vars->unk60 + 0x1C)); + fast_vec_add(movement_scratch, movement_scratch, path_moby_vars->path + 0x10); + i = truncate_float_to_s32(path_moby_vars->path_distance / + *(float *)(path_moby_vars->path + 0x1C)); segment_fraction = convert_integer_to_float(i); - path = path_moby_vars->unk60; - segment_fraction = (path_moby_vars->unk64 - segment_fraction * *(float *)(path + 0x1C)) / - *(float *)(path + 0x1C); + path = path_moby_vars->path; + segment_fraction = + (path_moby_vars->path_distance - segment_fraction * *(float *)(path + 0x1C)) / + *(float *)(path + 0x1C); if (i >= *(int *)path - 2) { mark_moby_for_removal(path_moby); return; } fast_vec_sub(segment_offset, ((float(*)[4])path)[i + 2], ((float(*)[4])path)[i + 1]); fast_vec_scale(segment_offset, segment_offset, segment_fraction); - fast_vec_add(&path_moby->pos, segment_offset, (*(float(**)[4])(&path_moby_vars->unk60))[i + 1]); + fast_vec_add(&path_moby->pos, segment_offset, (*(float(**)[4])(&path_moby_vars->path))[i + 1]); fast_vec_sub(movement_scratch, &path_moby->pos, previous_position); - update_entity_matrix(path_moby_vars->unk20, movement_scratch, &path_moby->rot, &path_moby->rot); + update_entity_matrix( + path_moby_vars->entity_matrix, movement_scratch, &path_moby->rot, &path_moby->rot); } float path_mover_distance_step = 0; diff --git a/src/overlays/l03/mobys/red_ship_1.c b/src/overlays/l03/mobys/red_ship_1.c index 891bf653ab..ec05a97426 100644 --- a/src/overlays/l03/mobys/red_ship_1.c +++ b/src/overlays/l03/mobys/red_ship_1.c @@ -524,7 +524,7 @@ typedef struct RedShip1Vars { u8 pad_110[0x4]; f32 roll_spring_velocity; u8 pad_118[0x4]; - f32 unk11C; + f32 pitch_spring_velocity; u8 pad_120[0xC]; s16 timer_12C; u8 pad_12E[0x3]; @@ -684,7 +684,7 @@ void red_ship_1_update(char *moby) { MOBY(moby)->rot.z = fast_arc_tan(spline_moby_pvars->segment_end_tangent[0] - zero[0], spline_moby_pvars->segment_end_tangent[1] - zero[1]); spline_moby_pvars->roll_spring_velocity = 0.0f; - spline_moby_pvars->unk11C = 0.0f; + spline_moby_pvars->pitch_spring_velocity = 0.0f; *(OvlQuad *)&MOBY(moby)->pos = *(OvlQuad *)&spline_moby_pvars->prev_spline_position[0]; add_moby_rotation_based_offsets(moby, moby_position); spline_moby_pvars->unk131 = 7; From 1c76f6a1a8fc2e7bcdb0e5b24d565bb91c6118f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:03:37 +0000 Subject: [PATCH 027/213] decomp: name alien queen, door, gas vent and breakaway piece fields in level 6 --- src/overlays/l06/mobys/alien_queen.c | 54 +++++----- src/overlays/l06/mobys/alien_queen_slider.c | 24 ++--- src/overlays/l06/mobys/breakaway_piece.c | 16 +-- src/overlays/l06/mobys/countdown_sequence.c | 44 ++++---- src/overlays/l06/mobys/hangar_door.c | 61 ++++++----- src/overlays/l06/mobys/split_door.c | 111 ++++++++++---------- src/overlays/l06/mobys/toxic_gas_vent.c | 40 +++---- 7 files changed, 179 insertions(+), 171 deletions(-) diff --git a/src/overlays/l06/mobys/alien_queen.c b/src/overlays/l06/mobys/alien_queen.c index d475c6de74..2b85009bbe 100644 --- a/src/overlays/l06/mobys/alien_queen.c +++ b/src/overlays/l06/mobys/alien_queen.c @@ -378,13 +378,13 @@ typedef struct AlienQueenVars { u8 unk70; u8 pad_71[0x3F]; char *target; - s32 unkB4; + s32 target_selection_status; u8 pad_B8[0x8]; - f32 unkC0[4]; + f32 home_position[4]; f32 path_midpoint[4]; - u8 unkE0; + u8 turn_velocity; u8 pad_E1[0x7]; - f32 unkE8; + f32 move_speed; s32 path; s32 frog_list; s32 state18_list; @@ -445,7 +445,7 @@ void alien_queen_update(unsigned char *moby) { alien_queen_update_vars->unk5A = truncate_float_to_s32(18.4f); alien_queen_update_vars->timer_120 = scale_game_frames(0x4B0); alien_queen_update_vars->suppress_death_dialogue = 0; - qcopy(alien_queen_update_vars->unkC0, moby + 0x10); + qcopy(alien_queen_update_vars->home_position, moby + 0x10); alien_queen_update_vars->animation_update = -1; alien_queen_update_vars->saved_path_point_count = *D_L06_001B0C30_q[alien_queen_update_vars->path]; @@ -455,7 +455,7 @@ void alien_queen_update(unsigned char *moby) { (char *)path + ((*path / 2) * 16 + 16), 0.5f); alien_queen_update_vars->path_midpoint[3] = vector_distance_xy( - alien_queen_update_vars->unkC0, alien_queen_update_vars->path_midpoint); + alien_queen_update_vars->home_position, alien_queen_update_vars->path_midpoint); alien_queen_update_vars->unk128 = random_angle_radians(); alien_queen_update_vars->timer_12C = scale_game_frames(0x1E); MOBY(moby)->collision = 0; @@ -470,7 +470,7 @@ void alien_queen_update(unsigned char *moby) { break; } case ALIEN_QUEEN_STATE_WAIT_TO_START_INTRO: - if (alien_queen_update_vars->unkB4 == 2) + if (alien_queen_update_vars->target_selection_status == 2) return; if (*(short *)(target + 0xA6) != 0) return; @@ -499,14 +499,14 @@ void alien_queen_update(unsigned char *moby) { MOBY(moby)->pos.z = MOBY(moby)->pos.z + alien_queen_update_vars->z_velocity; alien_queen_update_vars->z_velocity = alien_queen_update_vars->z_velocity - gravity; if ((unsigned char)moby[0x53] == 8) { - if (absolute_float((MOBY(moby)->pos.z - alien_queen_update_vars->unkC0[2]) / + if (absolute_float((MOBY(moby)->pos.z - alien_queen_update_vars->home_position[2]) / alien_queen_update_vars->z_velocity) <= 6.0f && (unsigned char)moby[0x53] != 9) { blend_moby_animation(moby, 9, 0, scale_game_frames(5)); } } else { - if (MOBY(moby)->pos.z < alien_queen_update_vars->unkC0[2]) { - MOBY(moby)->pos.z = alien_queen_update_vars->unkC0[2]; + if (MOBY(moby)->pos.z < alien_queen_update_vars->home_position[2]) { + MOBY(moby)->pos.z = alien_queen_update_vars->home_position[2]; } if (MOBY(moby)->anim_time == 0.0f && (moby[0x70] & 2)) { if ((unsigned char)moby[0x53] == 9) { @@ -559,7 +559,7 @@ void alien_queen_update(unsigned char *moby) { } return; case ALIEN_QUEEN_STATE_WAIT_TO_APPROACH_TARGET: - if (alien_queen_update_vars->unkB4 == 2) + if (alien_queen_update_vars->target_selection_status == 2) break; moby[0x20] = 8; if ((unsigned char)moby[0x53] == 3) @@ -575,27 +575,27 @@ void alien_queen_update(unsigned char *moby) { approach_angle((float *)&MOBY(moby)->rot.z, fast_arc_tan(*(float *)(target + 0x10) - MOBY(moby)->pos.x, *(float *)(target + 0x14) - MOBY(moby)->pos.y), - (float *)&alien_queen_update_vars->unkE0, + (float *)&alien_queen_update_vars->turn_velocity, frame_time_sq * 6.2831855f, frame_time_sq * 6.2831855f, frame_time * 3.1415927f); if (turn < 0.7853982f && *(float *)&l06_alien_queen_attack_distance < dist) { - approach_value(&alien_queen_update_vars->unkE8, + approach_value(&alien_queen_update_vars->move_speed, *(float *)&l06_alien_queen_movement_speed * frame_time, alien_queen_movement_acceleration_gp * frame_time_sq); } else if (dist < *(float *)&l06_alien_queen_retreat_distance) { - approach_value(&alien_queen_update_vars->unkE8, + approach_value(&alien_queen_update_vars->move_speed, -(*(float *)&l06_alien_queen_movement_speed * frame_time), alien_queen_movement_acceleration_gp * frame_time_sq); } else { - approach_value(&alien_queen_update_vars->unkE8, 0.0f, frame_time_sq * 8.0f); + approach_value(&alien_queen_update_vars->move_speed, 0.0f, frame_time_sq * 8.0f); } fast_vec_sub(step, target + 0x10, moby + 0x10); step[2] = 0.0f; - fast_vec_normalize(step, step, alien_queen_update_vars->unkE8); + fast_vec_normalize(step, step, alien_queen_update_vars->move_speed); fast_vec_add(moby + 0x10, moby + 0x10, step); func_L00_00262DF0_q(alien_queen_update_vars->path, moby + 0x10, 1.0f, moby + 0x10); - if (alien_queen_update_vars->unkB4 == 2) { + if (alien_queen_update_vars->target_selection_status == 2) { moby[0x20] = 0xD; break; } @@ -630,7 +630,7 @@ void alien_queen_update(unsigned char *moby) { fast_dec_timer(&alien_queen_update_vars->timer_120); approach_angle((float *)&MOBY(moby)->rot.z, MOBY(moby)->rot.z, - (float *)&alien_queen_update_vars->unkE0, + (float *)&alien_queen_update_vars->turn_velocity, frame_time_sq * 6.2831855f, frame_time_sq * 6.2831855f, frame_time * 3.1415927f); @@ -692,16 +692,16 @@ void alien_queen_update(unsigned char *moby) { return; case ALIEN_QUEEN_STATE_RETURN_HOME: { char *pos = (char *)moby + 0x10; - char *home = alien_queen_update_vars->unkC0; + char *home = alien_queen_update_vars->home_position; float dist = vector_distance_xy(pos, home); float turn = fast_difference_between_rotations( MOBY(moby)->rot.z, - fast_arc_tan(alien_queen_update_vars->unkC0[0] - MOBY(moby)->pos.x, - alien_queen_update_vars->unkC0[1] - MOBY(moby)->pos.y)); + fast_arc_tan(alien_queen_update_vars->home_position[0] - MOBY(moby)->pos.x, + alien_queen_update_vars->home_position[1] - MOBY(moby)->pos.y)); approach_angle((float *)&MOBY(moby)->rot.z, - fast_arc_tan(alien_queen_update_vars->unkC0[0] - MOBY(moby)->pos.x, - alien_queen_update_vars->unkC0[1] - MOBY(moby)->pos.y), - (float *)&alien_queen_update_vars->unkE0, + fast_arc_tan(alien_queen_update_vars->home_position[0] - MOBY(moby)->pos.x, + alien_queen_update_vars->home_position[1] - MOBY(moby)->pos.y), + (float *)&alien_queen_update_vars->turn_velocity, frame_time_sq * 6.2831855f, frame_time_sq * 6.2831855f, frame_time * 3.1415927f); @@ -712,7 +712,7 @@ void alien_queen_update(unsigned char *moby) { fast_vec_add(pos, pos, step); func_L00_00262DF0_q(alien_queen_update_vars->path, pos, 1.0f, pos); } - if (alien_queen_update_vars->unkB4 != 2) { + if (alien_queen_update_vars->target_selection_status != 2) { moby[0x20] = 7; break; } @@ -935,7 +935,7 @@ void update_alien_queen_hit_response_and_recovery(char *moby) { alien_queen_hit_recovery_vars->health = 19.9f; moby[0x20] = 3; alien_queen_hit_recovery_vars->intro_or_recovery_delay_active = 0; - qcopy(moby + 0x10, alien_queen_hit_recovery_vars->unkC0); + qcopy(moby + 0x10, alien_queen_hit_recovery_vars->home_position); MOBY(moby)->rot.z = fast_arc_tan(hero.motion.pos.f[0] - MOBY(moby)->pos.x, hero.motion.pos.f[1] - MOBY(moby)->pos.y); euler_rotation_basis(moby + 0xC0, moby + 0x40); @@ -949,7 +949,7 @@ void update_alien_queen_hit_response_and_recovery(char *moby) { alien_queen_hit_recovery_vars->intro_or_recovery_delay_active = 0; base = &l06_cuboids[alien_queen_hit_recovery_vars->cuboid]; set_race_camera(&base->pos, &base->rot, 0x72, 1); - qcopy(moby + 0x10, alien_queen_hit_recovery_vars->unkC0); + qcopy(moby + 0x10, alien_queen_hit_recovery_vars->home_position); MOBY(moby)->rot.z = fast_arc_tan(hero.motion.pos.f[0] - MOBY(moby)->pos.x, hero.motion.pos.f[1] - MOBY(moby)->pos.y); euler_rotation_basis(moby + 0xC0, moby + 0x40); diff --git a/src/overlays/l06/mobys/alien_queen_slider.c b/src/overlays/l06/mobys/alien_queen_slider.c index 7deb904bdc..cceb16a1b6 100644 --- a/src/overlays/l06/mobys/alien_queen_slider.c +++ b/src/overlays/l06/mobys/alien_queen_slider.c @@ -17,11 +17,11 @@ void alien_queen_slider_update(unsigned char *moby) __asm__("FUN_L06_002d9d10"); typedef struct AlienQueenSliderVars { u8 pad_0[0x10]; - u8 unk10; + u8 end_position; u8 pad_11[0xF]; - f32 unk20; - f32 unk24; - f32 unk28; + f32 blend; + f32 blend_speed; + f32 target_blend; } AlienQueenSliderVars; /* Moby class 367 */ @@ -37,7 +37,7 @@ void alien_queen_slider_update(unsigned char *moby) { char *moby_position = (char *)moby + 0x10; char *offset_position_endpoint; qcopy(position_interpolation_vars, moby_position); - offset_position_endpoint = &position_interpolation_vars->unk10; + offset_position_endpoint = &position_interpolation_vars->end_position; fast_vec_normalize(offset_position_endpoint, moby + 0xD0, 11.0f); fast_vec_add(offset_position_endpoint, offset_position_endpoint, moby_position); moby[0x20] = 1; @@ -45,17 +45,17 @@ void alien_queen_slider_update(unsigned char *moby) { } case INTERPOLATE_POSITION_TO_TARGET: { float blend_acceleration_step = (&frame_time)[1] * 10.0f; - advance_accelerated_scalar(&position_interpolation_vars->unk20, - &position_interpolation_vars->unk24, - position_interpolation_vars->unk28, + advance_accelerated_scalar(&position_interpolation_vars->blend, + &position_interpolation_vars->blend_speed, + position_interpolation_vars->target_blend, blend_acceleration_step, blend_acceleration_step, frame_time * 20.0f); lerp_vector(moby + 0x10, position_interpolation_vars, - &position_interpolation_vars->unk10, - position_interpolation_vars->unk20); - if (position_interpolation_vars->unk20 == position_interpolation_vars->unk28) + &position_interpolation_vars->end_position, + position_interpolation_vars->blend); + if (position_interpolation_vars->blend == position_interpolation_vars->target_blend) moby[0x20] = 1; break; } @@ -95,7 +95,7 @@ void set_listed_alien_queen_sliders_state_2_and_clear_data_28(int moby_list_inde if (MOBY(moby)->oclass == 0x16F) { AlienQueenSliderVars *listed_moby_vars = (AlienQueenSliderVars *)MOBY(moby)->pvars; moby[0x20] = 2; - *(int *)&listed_moby_vars->unk28 = 0; + *(int *)&listed_moby_vars->target_blend = 0; } } while (*moby_index_cursor++ >= 0); } diff --git a/src/overlays/l06/mobys/breakaway_piece.c b/src/overlays/l06/mobys/breakaway_piece.c index b8f8932434..d5eaff7024 100644 --- a/src/overlays/l06/mobys/breakaway_piece.c +++ b/src/overlays/l06/mobys/breakaway_piece.c @@ -13,9 +13,9 @@ extern int GB_FRAME_gp __asm__("D_L06_0015F5CC") __attribute__((sda)); void breakaway_piece_update(char *moby) __asm__("FUN_L06_00300df0"); typedef struct BreakawayPieceVars { - u8 pad_0[0xC]; - f32 unkC; - f32 unk10[4]; + u8 pad_0[0xC]; /* velocity while flying off (state 2) */ + f32 base_z; + f32 angular_velocity[4]; } BreakawayPieceVars; /* Moby classes 1091-1098, 1103 */ @@ -36,24 +36,24 @@ void breakaway_piece_update(char *moby) { case INITIALIZE_BOBBING_HEIGHT: MOBY(moby)->draw_dist = 0x200; ((unsigned char *)moby)[0x30] = 0xFF; - bobbing_and_motion_vars->unkC = MOBY(moby)->pos.z; + bobbing_and_motion_vars->base_z = MOBY(moby)->pos.z; MOBY(moby)->state = UPDATE_BOBBING_HEIGHT; break; case UPDATE_BOBBING_HEIGHT: if (*(int *)(D_0013E533 + 0x2EA1) == 0x72) { - MOBY(moby)->pos.z = bobbing_and_motion_vars->unkC; + MOBY(moby)->pos.z = bobbing_and_motion_vars->base_z; } else { float bobbing_cycle_fraction = convert_integer_to_float(GB_FRAME_gp % 600) / 600.0f; float bobbing_sine_factor = fast_sin(bobbing_cycle_fraction * 6.28318f); MOBY(moby)->pos.z = - bobbing_and_motion_vars->unkC + moby_bobbing_amplitude_gp * bobbing_sine_factor; + bobbing_and_motion_vars->base_z + moby_bobbing_amplitude_gp * bobbing_sine_factor; } break; case UPDATE_LINEAR_AND_ANGULAR_MOTION: - if (bobbing_and_motion_vars->unkC > 1.0f) + if (bobbing_and_motion_vars->base_z > 1.0f) fast_vec_scale(bobbing_and_motion_vars, bobbing_and_motion_vars, 0.985f); fast_vec_add(moby + 0x10, moby + 0x10, bobbing_and_motion_vars); - fast_vec_add(moby + 0x40, moby + 0x40, bobbing_and_motion_vars->unk10); + fast_vec_add(moby + 0x40, moby + 0x40, bobbing_and_motion_vars->angular_velocity); if (*(int *)(D_0013E533 + 0x2EA1) != 0x72) mark_moby_for_removal(moby); break; diff --git a/src/overlays/l06/mobys/countdown_sequence.c b/src/overlays/l06/mobys/countdown_sequence.c index 6478db2d42..7dbe01dd92 100644 --- a/src/overlays/l06/mobys/countdown_sequence.c +++ b/src/overlays/l06/mobys/countdown_sequence.c @@ -174,17 +174,17 @@ typedef struct CountdownSequenceVars { s32 unk10; s32 unk14; s32 unk18; - s32 unk1C; + s32 watched_group; s32 unk20; - s32 unk24; + s32 path_index; s32 cuboid_28; - s32 unk2C; + s32 red_button_moby_index; s32 unk30; - s32 unk34; + s32 spark_emitter_list; u8 pad_38[0x78]; - s32 unkB0; + s32 path_node_counter; s32 timer_B4; - f32 unkB8; + f32 exit_ramp_progress; s32 timer_BC; s32 timer_C0; } CountdownSequenceVars; @@ -219,11 +219,11 @@ void countdown_sequence_update(unsigned char *moby) { moby[0x30] = 0xFF; return; case TRIGGER_LINKED_SEQUENCE_WHEN_GROUP_INACTIVE: - if (count_active_moby_group_members(moby_vars->unk1C, -1) != 0) + if (count_active_moby_group_members(moby_vars->watched_group, -1) != 0) return; - begin_red_button_rotation(D_L06_0015FFD8_301b90 + (moby_vars->unk2C << 8)); + begin_red_button_rotation(D_L06_0015FFD8_301b90 + (moby_vars->red_button_moby_index << 8)); if (get_red_button_sequence_status((const u8 *)D_L06_0015FFD8_301b90 + - (moby_vars->unk2C << 8)) != 1) + (moby_vars->red_button_moby_index << 8)) != 1) return; moby[0x20] = 2; select_localized_moby_voice_line((struct Moby *)moby, 0); @@ -232,10 +232,10 @@ void countdown_sequence_update(unsigned char *moby) { int *p; float r; if (get_red_button_sequence_status((const u8 *)D_L06_0015FFD8_301b90 + - (moby_vars->unk2C << 8)) != 2) + (moby_vars->red_button_moby_index << 8)) != 2) return; moby[0x20] = 3; - moby_vars->unkB0 = 1; + moby_vars->path_node_counter = 1; request_music_track(6, 9); if (*(short *)dialogue_playback_phase == DIALOGUE_PHASE_READY_TO_CONTINUE) continue_audio_stream_if_ready(); @@ -248,7 +248,7 @@ void countdown_sequence_update(unsigned char *moby) { set_moby_state_3(D_L06_0015FFD8_301b90 + (moby_vars->unk20 << 8)); { ((LevelCuboid *)((moby_vars->unkC << 7) + (int)l06_cuboids))->pos.z += 10.0f; - p = D_L06_001B0C30_301b90[moby_vars->unk24]; + p = D_L06_001B0C30_301b90[moby_vars->path_index]; qcopy(va, (char *)p + 0x20); qcopy(vb, (char *)p + 0x10); clear_u64_value(vc); @@ -275,11 +275,11 @@ void countdown_sequence_update(unsigned char *moby) { int **p; int x, nb; float r; - p = &D_L06_001B0C30_301b90[moby_vars->unk24]; - nb = moby_vars->unkB0; + p = &D_L06_001B0C30_301b90[moby_vars->path_index]; + nb = moby_vars->path_node_counter; qcopy(vb, (char *)((nb << 4) + (int)*p) + 0x10); nb++; - moby_vars->unkB0 = nb; + moby_vars->path_node_counter = nb; if (nb == **p - 1) { moby[0x20] = 4; select_localized_moby_voice_line((struct Moby *)moby, 1); @@ -290,11 +290,11 @@ void countdown_sequence_update(unsigned char *moby) { scripted_camera_sequence_active = 0; return; } - activate_listed_spark_emitters(moby_vars->unk34); - x = moby_vars->unkB0 - 30; + activate_listed_spark_emitters(moby_vars->spark_emitter_list); + x = moby_vars->path_node_counter - 30; if (x < 0) x = 0; - qcopy(va, (char *)D_L06_001B0C30_301b90[moby_vars->unk24] + 0x10 + (x << 4)); + qcopy(va, (char *)D_L06_001B0C30_301b90[moby_vars->path_index] + 0x10 + (x << 4)); clear_u64_value(vc); vc[2] = fast_arc_tan(va[0] - vb[0], va[1] - vb[1]); r = vector_distance_xy(vb, va); @@ -341,22 +341,22 @@ void countdown_sequence_update(unsigned char *moby) { moby[0x20] = 5; x = scale_game_frames(15); q = D_L06_0015FFD8_301b90 + (moby_vars->unk30 << 8); - moby_vars->unkB8 = 0.0f; + moby_vars->exit_ramp_progress = 0.0f; moby_vars->timer_BC = x; set_moby_state_5(q); allocate_voice_for_group_entry(1, 0, (int)hero.moby); return; } case RAMP_SHARED_VALUE_AFTER_DELAY: - if (moby_vars->unkB8 == 1.0f) { + if (moby_vars->exit_ramp_progress == 1.0f) { hero_respawn(); linked_sequence_exit_ramp_progress = 0.0f; return; } if (fast_dec_timer(&moby_vars->timer_BC) == 0) return; - approach_value(&moby_vars->unkB8, 1.0f, frame_time * 6.0f); - linked_sequence_exit_ramp_progress = moby_vars->unkB8; + approach_value(&moby_vars->exit_ramp_progress, 1.0f, frame_time * 6.0f); + linked_sequence_exit_ramp_progress = moby_vars->exit_ramp_progress; return; } } diff --git a/src/overlays/l06/mobys/hangar_door.c b/src/overlays/l06/mobys/hangar_door.c index a305be13d5..9c7fa10fef 100644 --- a/src/overlays/l06/mobys/hangar_door.c +++ b/src/overlays/l06/mobys/hangar_door.c @@ -20,12 +20,12 @@ void hangar_door_update(char *m) __asm__("FUN_L06_002b4770"); typedef struct HangarDoorVars { u8 pad_0[0x4]; - f32 unk4; - f32 unk8; - f32 unkC; - s32 unk10; - f32 unk14; - f32 unk18; + f32 base_yaw; + f32 open_angle_speed; + f32 pivot_distance; + s32 ship_swing_started; + f32 target_open_angle; + f32 open_angle; } HangarDoorVars; /* Moby class 55 */ @@ -41,35 +41,36 @@ void hangar_door_update(char *door_moby) { float pivot_offset_y; LevelCuboid *tb; if (D_L06_0015F5C4 == 6) { - if (door_data->unk10 == 0) { + if (door_data->ship_swing_started == 0) { int x; - door_data->unk10 = 0; + door_data->ship_swing_started = 0; x = *(int *)(ship_substate); if (x == 8) { - door_data->unk10 = 1; - door_data->unk18 = 0.3490658402442932f; - *(int *)&door_data->unk14 = 0; + door_data->ship_swing_started = 1; + door_data->open_angle = 0.3490658402442932f; + *(int *)&door_data->target_open_angle = 0; } else if (x == 3) { - door_data->unk10 = 1; - door_data->unk14 = 0.3490658402442932f; - *(int *)&door_data->unk18 = 0; + door_data->ship_swing_started = 1; + door_data->target_open_angle = 0.3490658402442932f; + *(int *)&door_data->open_angle = 0; } } } else { - door_data->unk10 = 0; + door_data->ship_swing_started = 0; } - if (door_data->unk18 != door_data->unk14) { - approach_angle(&door_data->unk18, - &door_data->unk8, - door_data->unk14, + if (door_data->open_angle != door_data->target_open_angle) { + approach_angle(&door_data->open_angle, + &door_data->open_angle_speed, + door_data->target_open_angle, frame_time_sq * 1.5707964f, frame_time_sq * 1.5707964f, frame_time * 1.5707964f); } switch (((unsigned char *)door_moby)[0x20]) { case HANGAR_DOOR_INITIALIZE: - door_data->unkC = vector_distance_xy(door_moby + 0x10, &l06_cuboids[*(int *)door_data].pos); - door_data->unk4 = MOBY(door_moby)->rot.z; + door_data->pivot_distance = + vector_distance_xy(door_moby + 0x10, &l06_cuboids[*(int *)door_data].pos); + door_data->base_yaw = MOBY(door_moby)->rot.z; if (MOBY(door_moby)->rot.y != 0.0f) { door_moby[0x20] = 1; } else { @@ -78,29 +79,31 @@ void hangar_door_update(char *door_moby) { break; case HANGAR_DOOR_POSITIVE_ANGLE_OFFSET: z = MOBY(door_moby)->pos.z; - position_angle_radians = fast_add_rotations(door_data->unk18, -1.5707950592041016f); - MOBY(door_moby)->pos.x = fast_cos(position_angle_radians) * door_data->unkC; - pivot_offset_y = fast_sin(position_angle_radians) * door_data->unkC; + position_angle_radians = fast_add_rotations(door_data->open_angle, -1.5707950592041016f); + MOBY(door_moby)->pos.x = fast_cos(position_angle_radians) * door_data->pivot_distance; + pivot_offset_y = fast_sin(position_angle_radians) * door_data->pivot_distance; tb = l06_cuboids; MOBY(door_moby)->pos.y = pivot_offset_y; *(int *)(door_moby + 0x18) = 0; tb += *(int *)door_data; fast_vec_add(door_moby + 0x10, door_moby + 0x10, &tb->pos); MOBY(door_moby)->pos.z = z; - MOBY(door_moby)->rot.z = fast_add_rotations(door_data->unk4, door_data->unk18); + MOBY(door_moby)->rot.z = fast_add_rotations(door_data->base_yaw, door_data->open_angle); break; case HANGAR_DOOR_NEGATIVE_ANGLE_OFFSET: z = MOBY(door_moby)->pos.z; - position_angle_radians = fast_subtract_rotations(-1.5707950592041016f, door_data->unk18); - MOBY(door_moby)->pos.x = fast_cos(position_angle_radians) * door_data->unkC; - pivot_offset_y = fast_sin(position_angle_radians) * door_data->unkC; + position_angle_radians = + fast_subtract_rotations(-1.5707950592041016f, door_data->open_angle); + MOBY(door_moby)->pos.x = fast_cos(position_angle_radians) * door_data->pivot_distance; + pivot_offset_y = fast_sin(position_angle_radians) * door_data->pivot_distance; tb = l06_cuboids; MOBY(door_moby)->pos.y = pivot_offset_y; *(int *)(door_moby + 0x18) = 0; tb += *(int *)door_data; fast_vec_add(door_moby + 0x10, door_moby + 0x10, &tb->pos); MOBY(door_moby)->pos.z = z; - MOBY(door_moby)->rot.z = fast_subtract_rotations(door_data->unk4, door_data->unk18); + MOBY(door_moby)->rot.z = + fast_subtract_rotations(door_data->base_yaw, door_data->open_angle); break; } } diff --git a/src/overlays/l06/mobys/split_door.c b/src/overlays/l06/mobys/split_door.c index 86416cf8a4..93015c041a 100644 --- a/src/overlays/l06/mobys/split_door.c +++ b/src/overlays/l06/mobys/split_door.c @@ -63,19 +63,19 @@ void split_door_update(char *moby) __asm__("FUN_L06_002fbfb0"); typedef struct SplitDoorVars { u8 pad_0[0x4]; - s32 unk4; - u8 unk8; + s32 open_mode; + u8 slide_speed; u8 pad_9[0x3]; - u8 unkC; + u8 turn_speed; u8 pad_D[0x3]; - u8 unk10; + u8 home_position; u8 pad_11[0xF]; - f32 unk20[4]; - f32 unk30[4]; - char *unk40; - u8 unk44; + f32 home_rotation[4]; + f32 split_axis[4]; + char *other_half; + u8 other_slide_speed; u8 pad_45[0x3]; - u8 unk48; + u8 other_turn_speed; u8 pad_49[0x3]; s32 timer_4C; } SplitDoorVars; @@ -107,39 +107,40 @@ void split_door_update(char *moby) { switch ((unsigned char)MOBY(moby)->state) { case INITIALIZE_CHILD_AND_TRANSFORMS: - qcopy(&pair_transform_vars->unk10, moby + 0x10); - qcopy(pair_transform_vars->unk20, moby + 0x40); - qcopy(pair_transform_vars->unk30, moby + 0xe0); - pair_transform_vars->unk40 = (char *)create_moby(0x41f); - *(unsigned short *)(pair_transform_vars->unk40 + 0x32) = 0x40; - (pair_transform_vars->unk40)[0x31] = 1; - *(long *)(pair_transform_vars->unk40 + 0x38) = ((long)MOBY(moby)->spawn_frame); - *(unsigned short *)(pair_transform_vars->unk40 + 0x34) = MOBY(moby)->flags; - child = pair_transform_vars->unk40 + 0x10; + qcopy(&pair_transform_vars->home_position, moby + 0x10); + qcopy(pair_transform_vars->home_rotation, moby + 0x40); + qcopy(pair_transform_vars->split_axis, moby + 0xe0); + pair_transform_vars->other_half = (char *)create_moby(0x41f); + *(unsigned short *)(pair_transform_vars->other_half + 0x32) = 0x40; + (pair_transform_vars->other_half)[0x31] = 1; + *(long *)(pair_transform_vars->other_half + 0x38) = ((long)MOBY(moby)->spawn_frame); + *(unsigned short *)(pair_transform_vars->other_half + 0x34) = MOBY(moby)->flags; + child = pair_transform_vars->other_half + 0x10; qcopy(child, moby + 0x10); qcopy(child + 0x30, moby + 0x40); if (*(int *)pair_transform_vars >= 0) { MOBY(moby)->state = WAIT_FOR_HERO_IN_CLIP_VOLUME; return; } - if (pair_transform_vars->unk4 == 2) { + if (pair_transform_vars->open_mode == 2) { MOBY(moby)->state = 2; return; } fast_vec_normalize( - position_offset, pair_transform_vars->unk30, moby_pair_parent_fixed_distance_gp); - fast_vec_add(moby + 0x10, &pair_transform_vars->unk10, position_offset); + position_offset, pair_transform_vars->split_axis, moby_pair_parent_fixed_distance_gp); + fast_vec_add(moby + 0x10, &pair_transform_vars->home_position, position_offset); fast_vec_normalize( - position_offset, pair_transform_vars->unk30, -moby_pair_child_fixed_distance_gp); - fast_vec_add( - pair_transform_vars->unk40 + 0x10, &pair_transform_vars->unk10, position_offset); - update_entity(pair_transform_vars->unk40); + position_offset, pair_transform_vars->split_axis, -moby_pair_child_fixed_distance_gp); + fast_vec_add(pair_transform_vars->other_half + 0x10, + &pair_transform_vars->home_position, + position_offset); + update_entity(pair_transform_vars->other_half); MOBY(moby)->state = WAIT_FOR_RESET; return; case WAIT_FOR_HERO_IN_CLIP_VOLUME: if (!is_point_inside_clip_volume(&hero.motion.pos, *(int *)pair_transform_vars)) return; - if (pair_transform_vars->unk4 == 1) { + if (pair_transform_vars->open_mode == 1) { MOBY(moby)->state = ANIMATE_PAIR_WITH_TIMED_PHASES; pair_transform_vars->timer_4C = scale_game_frames(0x14); } else if ((unsigned char)MOBY(moby)->group != 0xff) { @@ -147,13 +148,13 @@ void split_door_update(char *moby) { } else { MOBY(moby)->state = MOVE_PAIR_TO_FIXED_OFFSETS; } - allocate_voice_for_target_entry(0, 0, (int)pair_transform_vars->unk40); + allocate_voice_for_target_entry(0, 0, (int)pair_transform_vars->other_half); return; case MOVE_PAIR_TO_FIXED_OFFSETS: - target_delta = fast_vec_dist(moby + 0x10, &pair_transform_vars->unk10); - child = pair_transform_vars->unk40; + target_delta = fast_vec_dist(moby + 0x10, &pair_transform_vars->home_position); + child = pair_transform_vars->other_half; parent_distance = target_delta; - child_distance = fast_vec_dist(child + 0x10, &pair_transform_vars->unk10); + child_distance = fast_vec_dist(child + 0x10, &pair_transform_vars->home_position); advance_accelerated_scalar(&parent_distance, &((float *)pair_transform_vars)[2], moby_pair_parent_fixed_distance_gp, @@ -166,21 +167,22 @@ void split_door_update(char *moby) { frame_time_sq * 10.0f, frame_time_sq * 20.0f, frame_time * 5.0f); - fast_vec_normalize(position_offset, pair_transform_vars->unk30, parent_distance); - fast_vec_add(moby + 0x10, &pair_transform_vars->unk10, position_offset); - fast_vec_normalize(position_offset, pair_transform_vars->unk30, -child_distance); - fast_vec_add( - pair_transform_vars->unk40 + 0x10, &pair_transform_vars->unk10, position_offset); - update_entity(pair_transform_vars->unk40); + fast_vec_normalize(position_offset, pair_transform_vars->split_axis, parent_distance); + fast_vec_add(moby + 0x10, &pair_transform_vars->home_position, position_offset); + fast_vec_normalize(position_offset, pair_transform_vars->split_axis, -child_distance); + fast_vec_add(pair_transform_vars->other_half + 0x10, + &pair_transform_vars->home_position, + position_offset); + update_entity(pair_transform_vars->other_half); if (absolute_float(parent_distance - moby_pair_parent_fixed_distance_gp) < 0.01f && absolute_float(child_distance - moby_pair_child_fixed_distance_gp) < 0.01f) MOBY(moby)->state = WAIT_FOR_RESET; return; case ANIMATE_PAIR_WITH_TIMED_PHASES: - target_delta = fast_vec_dist(moby + 0x10, &pair_transform_vars->unk10); - child = pair_transform_vars->unk40; + target_delta = fast_vec_dist(moby + 0x10, &pair_transform_vars->home_position); + child = pair_transform_vars->other_half; phase_a = target_delta; - phase_b = fast_vec_dist(child + 0x10, &pair_transform_vars->unk10); + phase_b = fast_vec_dist(child + 0x10, &pair_transform_vars->home_position); phase = (unsigned char)MOBY(moby)->command; if (phase == SPLIT_DOOR_PHASE_TARGET_CURRENT_TRANSFORMS) goto phase_one; @@ -205,7 +207,7 @@ void split_door_update(char *moby) { goto phase_join; phase_one: target_rot_a = MOBY(moby)->rot.y; - target_rot_b = *(float *)(pair_transform_vars->unk40 + 0x44); + target_rot_b = *(float *)(pair_transform_vars->other_half + 0x44); target_a = phase_a; target_b = phase_b; acceleration = moby_pair_phase_distance_acceleration_gp; @@ -253,18 +255,19 @@ void split_door_update(char *moby) { rotation_acceleration * DEG_TO_RAD * frame_time_sq, rotation_speed * DEG_TO_RAD * frame_time_sq, rotation_damping * DEG_TO_RAD * frame_time); - advance_accelerated_scalar((float *)(pair_transform_vars->unk40 + 0x44), + advance_accelerated_scalar((float *)(pair_transform_vars->other_half + 0x44), &((float *)pair_transform_vars)[0x12], target_rot_b, rotation_acceleration * DEG_TO_RAD * frame_time_sq, rotation_speed * DEG_TO_RAD * frame_time_sq, rotation_damping * DEG_TO_RAD * frame_time); - fast_vec_normalize(position_offset, pair_transform_vars->unk30, phase_a); - fast_vec_add(moby + 0x10, &pair_transform_vars->unk10, position_offset); - fast_vec_normalize(position_offset, pair_transform_vars->unk30, -phase_b); - fast_vec_add( - pair_transform_vars->unk40 + 0x10, &pair_transform_vars->unk10, position_offset); - update_entity(pair_transform_vars->unk40); + fast_vec_normalize(position_offset, pair_transform_vars->split_axis, phase_a); + fast_vec_add(moby + 0x10, &pair_transform_vars->home_position, position_offset); + fast_vec_normalize(position_offset, pair_transform_vars->split_axis, -phase_b); + fast_vec_add(pair_transform_vars->other_half + 0x10, + &pair_transform_vars->home_position, + position_offset); + update_entity(pair_transform_vars->other_half); if (!fast_dec_timer(&pair_transform_vars->timer_4C)) return; MOBY(moby)->command = next_phase; @@ -280,15 +283,15 @@ void split_door_update(char *moby) { return; MOBY(moby)->command = 0; MOBY(moby)->state = WAIT_FOR_HERO_IN_CLIP_VOLUME; - qcopy(moby + 0x10, &pair_transform_vars->unk10); - qcopy(moby + 0x40, pair_transform_vars->unk20); - child = pair_transform_vars->unk40 + 0x10; + qcopy(moby + 0x10, &pair_transform_vars->home_position); + qcopy(moby + 0x40, pair_transform_vars->home_rotation); + child = pair_transform_vars->other_half + 0x10; qcopy(child, moby + 0x10); qcopy(child + 0x30, moby + 0x40); - *(volatile float *)(&pair_transform_vars->unk48) = 0.0f; - *(volatile float *)(&pair_transform_vars->unk8) = 0.0f; - *(volatile float *)(&pair_transform_vars->unkC) = 0.0f; - *(volatile float *)(&pair_transform_vars->unk44) = 0.0f; + *(volatile float *)(&pair_transform_vars->other_turn_speed) = 0.0f; + *(volatile float *)(&pair_transform_vars->slide_speed) = 0.0f; + *(volatile float *)(&pair_transform_vars->turn_speed) = 0.0f; + *(volatile float *)(&pair_transform_vars->other_slide_speed) = 0.0f; return; } } diff --git a/src/overlays/l06/mobys/toxic_gas_vent.c b/src/overlays/l06/mobys/toxic_gas_vent.c index 99502fc1ce..00b33aafee 100644 --- a/src/overlays/l06/mobys/toxic_gas_vent.c +++ b/src/overlays/l06/mobys/toxic_gas_vent.c @@ -86,15 +86,15 @@ typedef struct ToxicGasVentVars { f32 unk50; f32 unk54; u8 pad_58[0x8]; - s32 unk60; + s32 oscillates; f32 oscillation_amplitude_degrees; - f32 unk68; - f32 unk6C; - f32 unk70; - f32 unk74; - f32 unk78; - f32 unk7C; - f32 unk80; + f32 oscillation_period_seconds; + f32 oscillation_start_degrees; + f32 active_seconds; + f32 inactive_seconds; + f32 start_delay_seconds; + f32 oscillation_phase; + f32 oscillation_phase_step; f32 initial_heading_radians; s32 timer_88; u8 pad_8C[0x4]; @@ -125,15 +125,16 @@ void toxic_gas_vent_update(char *vent_moby) { } switch (((unsigned char *)vent_moby)[0x20]) { case VENT_INITIALIZE: - if (vent_data->unk60 != 0) { + if (vent_data->oscillates != 0) { vent_moby[0x20] = 1; - vent_data->unk80 = 360.0f / vent_data->unk68 * DEG_TO_RAD * frame_time; - vent_data->unk7C = vent_data->unk6C * DEG_TO_RAD; + vent_data->oscillation_phase_step = + 360.0f / vent_data->oscillation_period_seconds * DEG_TO_RAD * frame_time; + vent_data->oscillation_phase = vent_data->oscillation_start_degrees * DEG_TO_RAD; vent_data->initial_heading_radians = MOBY(vent_moby)->rot.z; } else { vent_moby[0x20] = 3; - vent_data->timer_88 = scale_game_frames( - truncate_float_to_s32(vent_data->unk74 + vent_data->unk78 * 60.0f)); + vent_data->timer_88 = scale_game_frames(truncate_float_to_s32( + vent_data->inactive_seconds + vent_data->start_delay_seconds * 60.0f)); } vent_data->voice = -1; break; @@ -143,9 +144,10 @@ void toxic_gas_vent_update(char *vent_moby) { } emit_toxic_gas_vent_sparks(vent_moby); check_oscillating_toxic_gas_vent_collisions(vent_moby); - heading_offset_radians = - vent_data->oscillation_amplitude_degrees * DEG_TO_RAD * fast_sin(vent_data->unk7C); - vent_data->unk7C = fast_add_rotations(vent_data->unk7C, vent_data->unk80); + heading_offset_radians = vent_data->oscillation_amplitude_degrees * DEG_TO_RAD * + fast_sin(vent_data->oscillation_phase); + vent_data->oscillation_phase = + fast_add_rotations(vent_data->oscillation_phase, vent_data->oscillation_phase_step); MOBY(vent_moby)->rot.z = fast_add_rotations(vent_data->initial_heading_radians, heading_offset_radians); break; @@ -158,7 +160,7 @@ void toxic_gas_vent_update(char *vent_moby) { if (fast_dec_timer(&vent_data->timer_88) != 0) { vent_moby[0x20] = 3; vent_data->timer_88 = - scale_game_frames(truncate_float_to_s32(vent_data->unk74 * 60.0f)); + scale_game_frames(truncate_float_to_s32(vent_data->inactive_seconds * 60.0f)); if (vent_data->voice != -1) { char *voice_slot = ((char *)&D_0013E550) + vent_data->voice * 0x70; if (*(char **)(voice_slot + 0x88) == vent_moby && @@ -173,7 +175,7 @@ void toxic_gas_vent_update(char *vent_moby) { if (fast_dec_timer(&vent_data->timer_88) != 0) { vent_moby[0x20] = 2; vent_data->timer_88 = - scale_game_frames(truncate_float_to_s32(vent_data->unk70 * 60.0f)); + scale_game_frames(truncate_float_to_s32(vent_data->active_seconds * 60.0f)); } break; } @@ -341,7 +343,7 @@ void check_timed_toxic_gas_vent_collisions(char *vent_moby) { q.b18 = 3; q.b19 = 1; q.s1A = ((unsigned short)MOBY(vent_moby)->oclass); - sp = (vent_data->unk70 * 60.0f - (float)vent_data->timer_88) * + sp = (vent_data->active_seconds * 60.0f - (float)vent_data->timer_88) * (*(float *)&spark_speed_gp * frame_time); if (*(float *)&toxic_gas_vent_max_collision_range_gp < sp) sp = *(float *)&toxic_gas_vent_max_collision_range_gp; From 1467351609726462de32bf1d3362b1d112c56aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:44:51 +0000 Subject: [PATCH 028/213] decomp: define the Veldin ship reflection mesh in C --- config/us/levels/data.tsv | 12 + src/overlays/shared/vehicles/veldin_ship.c | 598 ++++++++++++++++++++- 2 files changed, 604 insertions(+), 6 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 76ee959637..316fe2451b 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -4112,6 +4112,12 @@ D_L00_001DC1A0 3840 D_L00_001DD0A0 48 D_L00_001DD0A0 48 D_L00_001DD0D0 48 +D_L00_001DE7B0 1632 +D_L00_001DEE10 1776 +D_L00_001DF9A0 1632 +D_L00_001E04A0 1632 +D_L00_001E0B00 816 +D_L00_001E0E30 816 D_L00_001E4C80 4800 D_L00_001E6CE0 64 D_L00_001E6CE0 64 @@ -5085,6 +5091,12 @@ D_L01_001DC560 192 D_L01_001DC620 3840 D_L01_001DD520 4 D_L01_001DD550 4 +D_L01_001DEC50 1632 +D_L01_001DF2B0 1776 +D_L01_001DFE40 1632 +D_L01_001E0940 1632 +D_L01_001E0FA0 816 +D_L01_001E12D0 816 D_L01_001E1610 1 D_L01_001E1640 608 D_L01_001E18A0 304 diff --git a/src/overlays/shared/vehicles/veldin_ship.c b/src/overlays/shared/vehicles/veldin_ship.c index d7175b43dd..ae407f9dc8 100644 --- a/src/overlays/shared/vehicles/veldin_ship.c +++ b/src/overlays/shared/vehicles/veldin_ship.c @@ -42,12 +42,12 @@ typedef struct M2d1e80 { u8 bc; } M2d1e80; -extern Vec_2d19b0 ship_normals[] __asm__("D_L00_001DF9A0"); -extern Vec_2d19b0 ship_world_vertices[] __asm__("D_L00_001E04A0"); -extern Vec_2d19b0 ship_vertices[] __asm__("D_L00_001DE7B0"); -extern f32 ship_reflection_uvs[][2] __asm__("D_L00_001E0B00"); -extern f32 ship_previous_uvs[][2] __asm__("D_L00_001E0E30"); -extern s16 ship_quad_indices[][4][3] __asm__("D_L00_001DEE10"); +extern Vec_2d19b0 ship_normals[0x66] __asm__("D_L00_001DF9A0"); +extern Vec_2d19b0 ship_world_vertices[0x66] __asm__("D_L00_001E04A0"); +extern Vec_2d19b0 ship_vertices[0x66] __asm__("D_L00_001DE7B0"); +extern f32 ship_reflection_uvs[0x66][2] __asm__("D_L00_001E0B00"); +extern f32 ship_previous_uvs[0x66][2] __asm__("D_L00_001E0E30"); +extern s16 ship_quad_indices[0x4a][4][3] __asm__("D_L00_001DEE10"); extern s64 get_effect_texture(s32) __asm__("func_001F44B8"); extern short D_L00_001618E8 __attribute__((sda)); extern short D_L00_001618E0 __attribute__((sda)); @@ -186,3 +186,589 @@ short D_L15_001B0E30 NOT_SDA = 0; short D_L16_001B0CB0 NOT_SDA = 0; short D_L17_001B1130 NOT_SDA = 0; short D_L18_001B1230 NOT_SDA = 0; + +Vec_2d19b0 ship_normals[102] __asm__("D_L00_001DF9A0") = { + { 0.043892f, -0.009545f, 0.994299f, 1.0f}, + { 0.048983f, -0.207782f, 0.971366f, 1.0f}, + {-0.074535f, -0.2135f, 0.967925f, 1.0f}, + {-0.070656f, -0.000525f, 0.991827f, 1.0f}, + { 0.021298f, -0.509048f, 0.827797f, 1.0f}, + {-0.105019f, -0.5399f, 0.790563f, 1.0f}, + {-0.052564f, -0.828934f, 0.501181f, 1.0f}, + {-0.154474f, -0.858711f, 0.431325f, 1.0f}, + {-0.127832f, -0.966468f, 0.196786f, 1.0f}, + {-0.167565f, -0.968997f, 0.173191f, 1.0f}, + {-0.157676f, -0.984946f, 0.036541f, 1.0f}, + {-0.155021f, -0.984194f, 0.058129f, 1.0f}, + {-0.150524f, -0.988348f, -0.018406f, 1.0f}, + {-0.145769f, -0.989247f, -0.008698f, 1.0f}, + {-0.147698f, -0.967732f, 0.184989f, 1.0f}, + {-0.103519f, -0.843822f, 0.466253f, 1.0f}, + { -0.04186f, -0.524474f, 0.80918f, 1.0f}, + {-0.012776f, -0.210641f, 0.969646f, 1.0f}, + {-0.013382f, -0.005035f, 0.993063f, 1.0f}, + {-0.152838f, -0.985704f, 0.0353f, 1.0f}, + { 0.039087f, 0.199356f, 0.972363f, 1.0f}, + {-0.070016f, 0.207511f, 0.970156f, 1.0f}, + { 0.050214f, 0.482619f, 0.852035f, 1.0f}, + {-0.071442f, 0.507868f, 0.826186f, 1.0f}, + { 0.018825f, 0.790385f, 0.564132f, 1.0f}, + {-0.100102f, 0.826775f, 0.499455f, 1.0f}, + { -0.06566f, 0.955842f, 0.255396f, 1.0f}, + {-0.150533f, 0.963685f, 0.193719f, 1.0f}, + {-0.136995f, 0.985319f, 0.056758f, 1.0f}, + {-0.163807f, 0.984249f, 0.043941f, 1.0f}, + {-0.150525f, 0.988348f, -0.018405f, 1.0f}, + {-0.145769f, 0.989247f, -0.008697f, 1.0f}, + {-0.108096f, 0.959763f, 0.224557f, 1.0f}, + {-0.040638f, 0.80858f, 0.531794f, 1.0f}, + {-0.010614f, 0.495243f, 0.839111f, 1.0f}, + {-0.015464f, 0.203434f, 0.971259f, 1.0f}, + { -0.14808f, 0.985875f, 0.037712f, 1.0f}, + { 0.825852f, -0.009367f, 0.561082f, 1.0f}, + { 0.451917f, -0.885225f, -0.110215f, 1.0f}, + { 0.10908f, -0.99334f, -0.037111f, 1.0f}, + { 0.251649f, 0.004132f, 0.964704f, 1.0f}, + { 0.747399f, -0.560285f, 0.324121f, 1.0f}, + { 0.236173f, -0.793311f, 0.519033f, 1.0f}, + { 0.438564f, -0.709622f, 0.491717f, 1.0f}, + { 0.550282f, -0.0018f, 0.820055f, 1.0f}, + { 0.828151f, -0.159923f, 0.527947f, 1.0f}, + { 0.544118f, -0.194104f, 0.794462f, 1.0f}, + { 0.743607f, -0.170514f, 0.624285f, 1.0f}, + { 0.746896f, -0.005337f, 0.651196f, 1.0f}, + { 0.655149f, -0.602965f, 0.403074f, 1.0f}, + { 0.808123f, -0.353001f, 0.459026f, 1.0f}, + { 0.723868f, -0.377724f, 0.551298f, 1.0f}, + { 0.524972f, -0.445634f, 0.69698f, 1.0f}, + { 0.264343f, -0.212708f, 0.929436f, 1.0f}, + { 0.342136f, 0.000919f, 0.931752f, 1.0f}, + { 0.346758f, -0.209906f, 0.898868f, 1.0f}, + { 0.275202f, -0.783456f, 0.51022f, 1.0f}, + { 0.338826f, -0.50075f, 0.772024f, 1.0f}, + { 0.267322f, -0.512681f, 0.793659f, 1.0f}, + { 0.211836f, -0.973555f, -0.056687f, 1.0f}, + { 0.637162f, -0.745307f, 0.142773f, 1.0f}, + { 0.310435f, -0.89984f, 0.251018f, 1.0f}, + { 0.523809f, -0.801371f, 0.204521f, 1.0f}, + { 0.362684f, -0.922382f, -0.088689f, 1.0f}, + { 0.510565f, -0.852823f, -0.028158f, 1.0f}, + { 0.404524f, -0.899609f, 0.008167f, 1.0f}, + { 0.233273f, -0.963499f, 0.04374f, 1.0f}, + { 0.182536f, -0.945613f, 0.246453f, 1.0f}, + { 0.196476f, -0.943929f, 0.24111f, 1.0f}, + { 0.129651f, -0.990456f, -0.041661f, 1.0f}, + { 0.148075f, -0.983089f, 0.049508f, 1.0f}, + { 0.128088f, -0.985575f, 0.056029f, 1.0f}, + { 0.409797f, 0.911873f, 0.023553f, 1.0f}, + { 0.078973f, 0.99499f, -0.061311f, 1.0f}, + { 0.709214f, 0.512195f, 0.467128f, 1.0f}, + { 0.251679f, 0.779591f, 0.524379f, 1.0f}, + { 0.409969f, 0.746511f, 0.483171f, 1.0f}, + { 0.809029f, 0.124801f, 0.568716f, 1.0f}, + { 0.548324f, 0.197648f, 0.7888f, 1.0f}, + { 0.737132f, 0.157022f, 0.639723f, 1.0f}, + { 0.598403f, 0.618245f, 0.458741f, 1.0f}, + { 0.77758f, 0.303378f, 0.540639f, 1.0f}, + { 0.694092f, 0.380493f, 0.583177f, 1.0f}, + { 0.505706f, 0.479578f, 0.684948f, 1.0f}, + { 0.251897f, 0.19753f, 0.939951f, 1.0f}, + { 0.341655f, 0.201792f, 0.90341f, 1.0f}, + { 0.292013f, 0.774158f, 0.520183f, 1.0f}, + { 0.333159f, 0.490262f, 0.778866f, 1.0f}, + { 0.26551f, 0.478978f, 0.813551f, 1.0f}, + { 0.213175f, 0.973423f, -0.055357f, 1.0f}, + { 0.59227f, 0.715208f, 0.343866f, 1.0f}, + { 0.30909f, 0.908283f, 0.233465f, 1.0f}, + { 0.486576f, 0.803106f, 0.275357f, 1.0f}, + { 0.341498f, 0.935733f, -0.02193f, 1.0f}, + { 0.467485f, 0.86027f, 0.1443f, 1.0f}, + { 0.388517f, 0.903663f, 0.076249f, 1.0f}, + { 0.238743f, 0.963588f, 0.028552f, 1.0f}, + { 0.195511f, 0.947508f, 0.219698f, 1.0f}, + { 0.216405f, 0.936535f, 0.23989f, 1.0f}, + { 0.116063f, 0.991121f, -0.052306f, 1.0f}, + { 0.146155f, 0.983871f, 0.034467f, 1.0f}, + { 0.124374f, 0.987623f, 0.020028f, 1.0f}, +}; + +Vec_2d19b0 ship_world_vertices[102] __asm__("D_L00_001E04A0") = {0}; + +Vec_2d19b0 ship_vertices[102] __asm__("D_L00_001DE7B0") = { + {0.861523f, 0.0f, 0.013765f, 1.0f}, + {0.859484f, -0.335939f, -0.015431f, 1.0f}, + {0.113162f, -0.3507f, -0.029874f, 1.0f}, + {0.113158f, 0.0f, 0.007876f, 1.0f}, + {0.846932f, -0.640567f, -0.114991f, 1.0f}, + {0.112618f, -0.647725f, -0.130677f, 1.0f}, + { 0.82354f, -0.856003f, -0.299634f, 1.0f}, + {0.118674f, -0.804799f, -0.316702f, 1.0f}, + {0.786455f, -0.969294f, -0.583058f, 1.0f}, + {0.164336f, -0.877732f, -0.590409f, 1.0f}, + {0.747418f, -1.000344f, -0.837052f, 1.0f}, + {0.261173f, -0.923427f, -0.835041f, 1.0f}, + {0.695949f, -0.984063f, -1.158686f, 1.0f}, + {0.410285f, -0.945511f, -1.043905f, 1.0f}, + {0.491094f, -0.934442f, -0.573622f, 1.0f}, + {0.481865f, -0.844739f, -0.28957f, 1.0f}, + {0.481865f, -0.659702f, -0.103872f, 1.0f}, + {0.481864f, -0.352164f, -0.003578f, 1.0f}, + {0.481864f, 0.0f, 0.033956f, 1.0f}, + {0.539086f, -0.96644f, -0.822146f, 1.0f}, + {0.859484f, 0.335939f, -0.015431f, 1.0f}, + {0.113162f, 0.3507f, -0.029874f, 1.0f}, + {0.846932f, 0.640567f, -0.114991f, 1.0f}, + {0.112618f, 0.647725f, -0.130677f, 1.0f}, + { 0.82354f, 0.856003f, -0.299634f, 1.0f}, + {0.118674f, 0.804799f, -0.316702f, 1.0f}, + {0.786455f, 0.969294f, -0.583058f, 1.0f}, + {0.164336f, 0.877732f, -0.590409f, 1.0f}, + {0.747418f, 1.000344f, -0.837052f, 1.0f}, + {0.261173f, 0.923427f, -0.835041f, 1.0f}, + {0.695949f, 0.984062f, -1.158686f, 1.0f}, + {0.410285f, 0.945511f, -1.043905f, 1.0f}, + {0.491094f, 0.934442f, -0.573622f, 1.0f}, + {0.481864f, 0.844739f, -0.28957f, 1.0f}, + {0.481864f, 0.659702f, -0.103872f, 1.0f}, + {0.481864f, 0.352164f, -0.003578f, 1.0f}, + {0.539086f, 0.966439f, -0.822146f, 1.0f}, + {2.170457f, 0.0f, -0.758635f, 1.0f}, + {2.022542f, -0.706736f, -1.265006f, 1.0f}, + {0.812696f, -0.981776f, -1.181052f, 1.0f}, + {0.969718f, 0.0f, 0.004067f, 1.0f}, + {2.126068f, -0.506562f, -0.906663f, 1.0f}, + {0.931735f, -0.850309f, -0.309822f, 1.0f}, + {1.656937f, -0.74316f, -0.558319f, 1.0f}, + {1.744048f, 0.0f, -0.284043f, 1.0f}, + {2.167933f, -0.146602f, -0.766726f, 1.0f}, + { 1.73703f, -0.271735f, -0.301321f, 1.0f}, + {2.008576f, -0.220971f, -0.541968f, 1.0f}, + {2.018027f, 0.0f, -0.530516f, 1.0f}, + {1.929459f, -0.652202f, -0.729568f, 1.0f}, + {2.153005f, -0.339117f, -0.814842f, 1.0f}, + {1.979537f, -0.458678f, -0.615276f, 1.0f}, + {1.705263f, -0.544232f, -0.396189f, 1.0f}, + {0.967679f, -0.331721f, -0.023461f, 1.0f}, + {1.363154f, 0.0f, -0.100011f, 1.0f}, + {1.355846f, -0.310677f, -0.121696f, 1.0f}, + {1.291995f, -0.798739f, -0.406063f, 1.0f}, + {1.330918f, -0.600588f, -0.2282f, 1.0f}, + {0.955127f, -0.63488f, -0.123777f, 1.0f}, + {1.497638f, -0.897401f, -1.244121f, 1.0f}, + {2.089435f, -0.628692f, -1.029167f, 1.0f}, + {1.595354f, -0.862908f, -0.788319f, 1.0f}, + {1.873638f, -0.769949f, -0.900315f, 1.0f}, + {1.777945f, -0.816516f, -1.259501f, 1.0f}, + {2.056674f, -0.688329f, -1.146204f, 1.0f}, + { 1.8227f, -0.816723f, -1.074334f, 1.0f}, + {1.540647f, -0.902233f, -1.001033f, 1.0f}, + {0.892796f, -0.965274f, -0.59545f, 1.0f}, + {1.238794f, -0.913929f, -0.678421f, 1.0f}, + { 1.14692f, -0.952909f, -1.219003f, 1.0f}, + {1.188917f, -0.959236f, -0.926228f, 1.0f}, + { 0.85702f, -0.998334f, -0.855237f, 1.0f}, + {2.022541f, 0.706737f, -1.265005f, 1.0f}, + {0.812696f, 0.981775f, -1.181052f, 1.0f}, + {2.126068f, 0.506562f, -0.906663f, 1.0f}, + {0.931735f, 0.850309f, -0.309822f, 1.0f}, + {1.656937f, 0.74316f, -0.558319f, 1.0f}, + {2.167932f, 0.146602f, -0.766726f, 1.0f}, + { 1.73703f, 0.271735f, -0.301321f, 1.0f}, + {2.008576f, 0.220971f, -0.541968f, 1.0f}, + {1.929459f, 0.652202f, -0.729568f, 1.0f}, + {2.153005f, 0.339117f, -0.814842f, 1.0f}, + {1.979537f, 0.458678f, -0.615276f, 1.0f}, + {1.705263f, 0.544232f, -0.396189f, 1.0f}, + {0.967679f, 0.331721f, -0.023461f, 1.0f}, + {1.355846f, 0.310677f, -0.121696f, 1.0f}, + {1.291995f, 0.798739f, -0.406063f, 1.0f}, + {1.330918f, 0.600588f, -0.2282f, 1.0f}, + {0.955127f, 0.63488f, -0.123777f, 1.0f}, + {1.497638f, 0.897401f, -1.244121f, 1.0f}, + {2.089435f, 0.628693f, -1.029167f, 1.0f}, + {1.595354f, 0.862908f, -0.788319f, 1.0f}, + {1.873638f, 0.769949f, -0.900315f, 1.0f}, + {1.777945f, 0.816516f, -1.259501f, 1.0f}, + {2.056674f, 0.688329f, -1.146204f, 1.0f}, + { 1.8227f, 0.816723f, -1.074334f, 1.0f}, + {1.540647f, 0.902233f, -1.001033f, 1.0f}, + {0.892796f, 0.965274f, -0.59545f, 1.0f}, + {1.238794f, 0.913929f, -0.678421f, 1.0f}, + { 1.14692f, 0.952909f, -1.219003f, 1.0f}, + {1.188917f, 0.959236f, -0.926228f, 1.0f}, + { 0.85702f, 0.998334f, -0.855237f, 1.0f}, +}; + +f32 ship_reflection_uvs[102][2] __asm__("D_L00_001E0B00") = {0}; + +f32 ship_previous_uvs[102][2] __asm__("D_L00_001E0E30") = {0}; + +s16 ship_quad_indices[74][4][3] __asm__("D_L00_001DEE10") = { + { {0, 0, 0}, {0x12, 1, 1}, {1, 3, 3}, {0x11, 2, 2}}, + { {0x11, 2, 4}, {0x10, 4, 5}, {1, 3, 7}, {4, 5, 6}}, + { {0x10, 4, 8}, {0xf, 6, 9}, {4, 5, 0xb}, {6, 7, 0xa}}, + { {0xf, 6, 0xc}, {0xe, 8, 0xd}, {6, 7, 0xf}, {8, 9, 0xe}}, + { {0xe, 8, 0x10}, {0x13, 0xa, 0x11}, {8, 9, 0x13}, {0xa, 0xb, 0x12}}, + { {0xb, 0xc, 0x14}, {0xd, 0xd, 0x15}, {0x13, 0xa, -1}, {0x13, 0xa, 0x16}}, + { {9, 0xe, 0x17}, {0xb, 0xc, 0x18}, {0xe, 8, 0x1a}, {0x13, 0xa, 0x19}}, + { {7, 0xf, 0x1b}, {9, 0xe, 0x1c}, {0xf, 6, 0x1e}, {0xe, 8, 0x1d}}, + { {5, 0x10, 0x1f}, {7, 0xf, 0x20}, {0x10, 4, 0x22}, {0xf, 6, 0x21}}, + { {2, 0x11, 0x23}, {5, 0x10, 0x24}, {0x11, 2, 0x26}, {0x10, 4, 0x25}}, + { {0x12, 1, 0x27}, {3, 0x12, 0x28}, {0x11, 2, 0x2a}, {2, 0x11, 0x29}}, + { {0xc, 0x13, 0x2b}, {0xa, 0xb, 0x2c}, {0x13, 0xa, -1}, {0x13, 0xa, 0x2d}}, + { {0xd, 0xd, 0x2e}, {0xc, 0x13, 0x2f}, {0x13, 0xa, -1}, {0x13, 0xa, 0x30}}, + { {0, 0, 0x31}, {0x14, 0x14, 0x32}, {0x12, 1, 0x34}, {0x23, 0x15, 0x33}}, + { {0x23, 0x15, 0x35}, {0x14, 0x14, 0x36}, {0x22, 0x17, 0x38}, {0x16, 0x16, 0x37}}, + { {0x22, 0x17, 0x39}, {0x16, 0x16, 0x3a}, {0x21, 0x19, 0x3c}, {0x18, 0x18, 0x3b}}, + { {0x21, 0x19, 0x3d}, {0x18, 0x18, 0x3e}, {0x20, 0x1b, 0x40}, {0x1a, 0x1a, 0x3f}}, + { {0x20, 0x1b, 0x41}, {0x1a, 0x1a, 0x42}, {0x24, 0x1d, 0x44}, {0x1c, 0x1c, 0x43}}, + { {0x1d, 0x1e, 0x45}, {0x24, 0x1d, 0x46}, {0x1f, 0x1f, -1}, {0x1f, 0x1f, 0x47}}, + { {0x1b, 0x20, 0x48}, {0x20, 0x1b, 0x49}, {0x1d, 0x1e, 0x4b}, {0x24, 0x1d, 0x4a}}, + { {0x19, 0x21, 0x4c}, {0x21, 0x19, 0x4d}, {0x1b, 0x20, 0x4f}, {0x20, 0x1b, 0x4e}}, + { {0x17, 0x22, 0x50}, {0x22, 0x17, 0x51}, {0x19, 0x21, 0x53}, {0x21, 0x19, 0x52}}, + { {0x15, 0x23, 0x54}, {0x23, 0x15, 0x55}, {0x17, 0x22, 0x57}, {0x22, 0x17, 0x56}}, + { {0x12, 1, 0x58}, {0x23, 0x15, 0x59}, {3, 0x12, 0x5b}, {0x15, 0x23, 0x5a}}, + { {0x1e, 0x24, 0x5c}, {0x24, 0x1d, 0x5d}, {0x1c, 0x1c, -1}, {0x1c, 0x1c, 0x5e}}, + { {0x1f, 0x1f, 0x5f}, {0x24, 0x1d, 0x60}, {0x1e, 0x24, -1}, {0x1e, 0x24, 0x61}}, + { {0x45, 0x25, 0x62}, {0x46, 0x26, 0x63}, {0x27, 0x28, 0x65}, {0x47, 0x27, 0x64}}, + { {0x38, 0x29, 0x66}, {0x39, 0x2a, 0x67}, {0x2a, 0x2c, 0x69}, {0x3a, 0x2b, 0x68}}, + { {0x31, 0x2d, 0x6a}, {0x33, 0x2e, 0x6b}, {0x2b, 0x30, 0x6d}, {0x34, 0x2f, 0x6c}}, + { {0x2f, 0x31, 0x6e}, {0x30, 0x32, 0x6f}, {0x2e, 0x34, 0x71}, {0x2c, 0x33, 0x70}}, + { {0x25, 0x35, 0x72}, {0x30, 0x32, 0x73}, {0x2d, 0x36, 0x75}, {0x2f, 0x31, 0x74}}, + { {0x32, 0x37, 0x76}, {0x33, 0x2e, 0x77}, {0x29, 0x38, 0x79}, {0x31, 0x2d, 0x78}}, + { {0x2d, 0x36, 0x7a}, {0x2f, 0x31, 0x7b}, {0x32, 0x37, 0x7d}, {0x33, 0x2e, 0x7c}}, + { {0x34, 0x2f, 0x7e}, {0x33, 0x2e, 0x7f}, {0x2e, 0x34, 0x81}, {0x2f, 0x31, 0x80}}, + { {0x35, 0x39, 0x82}, {0x37, 0x3a, 0x83}, {0x28, 0x3c, 0x85}, {0x36, 0x3b, 0x84}}, + { {0x36, 0x3b, 0x86}, {0x37, 0x3a, 0x87}, {0x2c, 0x33, 0x89}, {0x2e, 0x34, 0x88}}, + { {0x2b, 0x30, 0x8a}, {0x34, 0x2f, 0x8b}, {0x38, 0x29, 0x8d}, {0x39, 0x2a, 0x8c}}, + { {0x39, 0x2a, 0x8e}, {0x34, 0x2f, 0x8f}, {0x37, 0x3a, 0x91}, {0x2e, 0x34, 0x90}}, + { {0x3a, 0x2b, 0x92}, {0x39, 0x2a, 0x93}, {0x35, 0x39, 0x95}, {0x37, 0x3a, 0x94}}, + { {0x3f, 0x3d, 0x96}, {0x41, 0x3e, 0x97}, {0x3b, 0x40, 0x99}, {0x42, 0x3f, 0x98}}, + { {0x3e, 0x41, 0x9a}, {0x31, 0x2d, 0x9b}, {0x3d, 0x42, 0x9d}, {0x2b, 0x30, 0x9c}}, + { {0x29, 0x38, 0x9e}, {0x31, 0x2d, 0x9f}, {0x3c, 0x43, 0xa1}, {0x3e, 0x41, 0xa0}}, + { {0x40, 0x44, 0xa2}, {0x41, 0x3e, 0xa3}, {0x26, 0x45, 0xa5}, {0x3f, 0x3d, 0xa4}}, + { {0x3c, 0x43, 0xa6}, {0x3e, 0x41, 0xa7}, {0x40, 0x44, 0xa9}, {0x41, 0x3e, 0xa8}}, + { {0x42, 0x3f, 0xaa}, {0x41, 0x3e, 0xab}, {0x3d, 0x42, 0xad}, {0x3e, 0x41, 0xac}}, + { {0x43, 0x46, 0xae}, {0x44, 0x47, 0xaf}, {0x2a, 0x2c, 0xb1}, {0x38, 0x29, 0xb0}}, + { {0x38, 0x29, 0xb2}, {0x44, 0x47, 0xb3}, {0x2b, 0x30, 0xb5}, {0x3d, 0x42, 0xb4}}, + { {0x3b, 0x40, 0xb6}, {0x42, 0x3f, 0xb7}, {0x45, 0x25, 0xb9}, {0x46, 0x26, 0xb8}}, + { {0x46, 0x26, 0xba}, {0x42, 0x3f, 0xbb}, {0x44, 0x47, 0xbd}, {0x3d, 0x42, 0xbc}}, + { {0x47, 0x27, 0xbe}, {0x46, 0x26, 0xbf}, {0x43, 0x46, 0xc1}, {0x44, 0x47, 0xc0}}, + { {0x63, 0x48, 0xc2}, {0x49, 0x49, 0xc3}, {0x64, 0x4b, 0xc5}, {0x65, 0x4a, 0xc4}}, + { {0x56, 0x4c, 0xc6}, {0x4b, 0x4d, 0xc7}, {0x57, 0x4f, 0xc9}, {0x58, 0x4e, 0xc8}}, + { {0x50, 0x50, 0xca}, {0x4c, 0x51, 0xcb}, {0x52, 0x53, 0xcd}, {0x53, 0x52, 0xcc}}, + { {0x4f, 0x54, 0xce}, {0x4e, 0x55, 0xcf}, {0x30, 0x32, 0xd1}, {0x2c, 0x33, 0xd0}}, + { {0x25, 0x35, 0xd2}, {0x4d, 0x56, 0xd3}, {0x30, 0x32, 0xd5}, {0x4f, 0x54, 0xd4}}, + { {0x51, 0x57, 0xd6}, {0x4a, 0x58, 0xd7}, {0x52, 0x53, 0xd9}, {0x50, 0x50, 0xd8}}, + { {0x4d, 0x56, 0xda}, {0x51, 0x57, 0xdb}, {0x4f, 0x54, 0xdd}, {0x52, 0x53, 0xdc}}, + { {0x53, 0x52, 0xde}, {0x4e, 0x55, 0xdf}, {0x52, 0x53, 0xe1}, {0x4f, 0x54, 0xe0}}, + { {0x54, 0x59, 0xe2}, {0x28, 0x3c, 0xe3}, {0x55, 0x5a, 0xe5}, {0x36, 0x3b, 0xe4}}, + { {0x36, 0x3b, 0xe6}, {0x2c, 0x33, 0xe7}, {0x55, 0x5a, 0xe9}, {0x4e, 0x55, 0xe8}}, + { {0x4c, 0x51, 0xea}, {0x56, 0x4c, 0xeb}, {0x53, 0x52, 0xed}, {0x57, 0x4f, 0xec}}, + { {0x57, 0x4f, 0xee}, {0x55, 0x5a, 0xef}, {0x53, 0x52, 0xf1}, {0x4e, 0x55, 0xf0}}, + { {0x58, 0x4e, 0xf2}, {0x54, 0x59, 0xf3}, {0x57, 0x4f, 0xf5}, {0x55, 0x5a, 0xf4}}, + { {0x5d, 0x5b, 0xf6}, {0x59, 0x5c, 0xf7}, {0x5f, 0x5e, 0xf9}, {0x60, 0x5d, 0xf8}}, + { {0x5c, 0x5f, 0xfa}, {0x5b, 0x60, 0xfb}, {0x50, 0x50, 0xfd}, {0x4c, 0x51, 0xfc}}, + { {0x4a, 0x58, 0xfe}, {0x5a, 0x61, 0xff}, {0x50, 0x50, 0x101}, {0x5c, 0x5f, 0x100}}, + {{0x5e, 0x62, 0x102}, {0x48, 0x63, 0x103}, {0x5f, 0x5e, 0x105}, {0x5d, 0x5b, 0x104}}, + {{0x5a, 0x61, 0x106}, {0x5e, 0x62, 0x107}, {0x5c, 0x5f, 0x109}, {0x5f, 0x5e, 0x108}}, + {{0x60, 0x5d, 0x10a}, {0x5b, 0x60, 0x10b}, {0x5f, 0x5e, 0x10d}, {0x5c, 0x5f, 0x10c}}, + {{0x61, 0x64, 0x10e}, {0x4b, 0x4d, 0x10f}, {0x62, 0x65, 0x111}, {0x56, 0x4c, 0x110}}, + {{0x56, 0x4c, 0x112}, {0x4c, 0x51, 0x113}, {0x62, 0x65, 0x115}, {0x5b, 0x60, 0x114}}, + {{0x59, 0x5c, 0x116}, {0x63, 0x48, 0x117}, {0x60, 0x5d, 0x119}, {0x64, 0x4b, 0x118}}, + {{0x64, 0x4b, 0x11a}, {0x62, 0x65, 0x11b}, {0x60, 0x5d, 0x11d}, {0x5b, 0x60, 0x11c}}, + {{0x65, 0x4a, 0x11e}, {0x61, 0x64, 0x11f}, {0x64, 0x4b, 0x121}, {0x62, 0x65, 0x120}}, +}; + +Vec_2d19b0 D_L01_001DEC50[102] = { + {0.861523f, 0.0f, 0.013765f, 1.0f}, + {0.859484f, -0.335939f, -0.015431f, 1.0f}, + {0.113162f, -0.3507f, -0.029874f, 1.0f}, + {0.113158f, 0.0f, 0.007876f, 1.0f}, + {0.846932f, -0.640567f, -0.114991f, 1.0f}, + {0.112618f, -0.647725f, -0.130677f, 1.0f}, + { 0.82354f, -0.856003f, -0.299634f, 1.0f}, + {0.118674f, -0.804799f, -0.316702f, 1.0f}, + {0.786455f, -0.969294f, -0.583058f, 1.0f}, + {0.164336f, -0.877732f, -0.590409f, 1.0f}, + {0.747418f, -1.000344f, -0.837052f, 1.0f}, + {0.261173f, -0.923427f, -0.835041f, 1.0f}, + {0.695949f, -0.984063f, -1.158686f, 1.0f}, + {0.410285f, -0.945511f, -1.043905f, 1.0f}, + {0.491094f, -0.934442f, -0.573622f, 1.0f}, + {0.481865f, -0.844739f, -0.28957f, 1.0f}, + {0.481865f, -0.659702f, -0.103872f, 1.0f}, + {0.481864f, -0.352164f, -0.003578f, 1.0f}, + {0.481864f, 0.0f, 0.033956f, 1.0f}, + {0.539086f, -0.96644f, -0.822146f, 1.0f}, + {0.859484f, 0.335939f, -0.015431f, 1.0f}, + {0.113162f, 0.3507f, -0.029874f, 1.0f}, + {0.846932f, 0.640567f, -0.114991f, 1.0f}, + {0.112618f, 0.647725f, -0.130677f, 1.0f}, + { 0.82354f, 0.856003f, -0.299634f, 1.0f}, + {0.118674f, 0.804799f, -0.316702f, 1.0f}, + {0.786455f, 0.969294f, -0.583058f, 1.0f}, + {0.164336f, 0.877732f, -0.590409f, 1.0f}, + {0.747418f, 1.000344f, -0.837052f, 1.0f}, + {0.261173f, 0.923427f, -0.835041f, 1.0f}, + {0.695949f, 0.984062f, -1.158686f, 1.0f}, + {0.410285f, 0.945511f, -1.043905f, 1.0f}, + {0.491094f, 0.934442f, -0.573622f, 1.0f}, + {0.481864f, 0.844739f, -0.28957f, 1.0f}, + {0.481864f, 0.659702f, -0.103872f, 1.0f}, + {0.481864f, 0.352164f, -0.003578f, 1.0f}, + {0.539086f, 0.966439f, -0.822146f, 1.0f}, + {2.170457f, 0.0f, -0.758635f, 1.0f}, + {2.022542f, -0.706736f, -1.265006f, 1.0f}, + {0.812696f, -0.981776f, -1.181052f, 1.0f}, + {0.969718f, 0.0f, 0.004067f, 1.0f}, + {2.126068f, -0.506562f, -0.906663f, 1.0f}, + {0.931735f, -0.850309f, -0.309822f, 1.0f}, + {1.656937f, -0.74316f, -0.558319f, 1.0f}, + {1.744048f, 0.0f, -0.284043f, 1.0f}, + {2.167933f, -0.146602f, -0.766726f, 1.0f}, + { 1.73703f, -0.271735f, -0.301321f, 1.0f}, + {2.008576f, -0.220971f, -0.541968f, 1.0f}, + {2.018027f, 0.0f, -0.530516f, 1.0f}, + {1.929459f, -0.652202f, -0.729568f, 1.0f}, + {2.153005f, -0.339117f, -0.814842f, 1.0f}, + {1.979537f, -0.458678f, -0.615276f, 1.0f}, + {1.705263f, -0.544232f, -0.396189f, 1.0f}, + {0.967679f, -0.331721f, -0.023461f, 1.0f}, + {1.363154f, 0.0f, -0.100011f, 1.0f}, + {1.355846f, -0.310677f, -0.121696f, 1.0f}, + {1.291995f, -0.798739f, -0.406063f, 1.0f}, + {1.330918f, -0.600588f, -0.2282f, 1.0f}, + {0.955127f, -0.63488f, -0.123777f, 1.0f}, + {1.497638f, -0.897401f, -1.244121f, 1.0f}, + {2.089435f, -0.628692f, -1.029167f, 1.0f}, + {1.595354f, -0.862908f, -0.788319f, 1.0f}, + {1.873638f, -0.769949f, -0.900315f, 1.0f}, + {1.777945f, -0.816516f, -1.259501f, 1.0f}, + {2.056674f, -0.688329f, -1.146204f, 1.0f}, + { 1.8227f, -0.816723f, -1.074334f, 1.0f}, + {1.540647f, -0.902233f, -1.001033f, 1.0f}, + {0.892796f, -0.965274f, -0.59545f, 1.0f}, + {1.238794f, -0.913929f, -0.678421f, 1.0f}, + { 1.14692f, -0.952909f, -1.219003f, 1.0f}, + {1.188917f, -0.959236f, -0.926228f, 1.0f}, + { 0.85702f, -0.998334f, -0.855237f, 1.0f}, + {2.022541f, 0.706737f, -1.265005f, 1.0f}, + {0.812696f, 0.981775f, -1.181052f, 1.0f}, + {2.126068f, 0.506562f, -0.906663f, 1.0f}, + {0.931735f, 0.850309f, -0.309822f, 1.0f}, + {1.656937f, 0.74316f, -0.558319f, 1.0f}, + {2.167932f, 0.146602f, -0.766726f, 1.0f}, + { 1.73703f, 0.271735f, -0.301321f, 1.0f}, + {2.008576f, 0.220971f, -0.541968f, 1.0f}, + {1.929459f, 0.652202f, -0.729568f, 1.0f}, + {2.153005f, 0.339117f, -0.814842f, 1.0f}, + {1.979537f, 0.458678f, -0.615276f, 1.0f}, + {1.705263f, 0.544232f, -0.396189f, 1.0f}, + {0.967679f, 0.331721f, -0.023461f, 1.0f}, + {1.355846f, 0.310677f, -0.121696f, 1.0f}, + {1.291995f, 0.798739f, -0.406063f, 1.0f}, + {1.330918f, 0.600588f, -0.2282f, 1.0f}, + {0.955127f, 0.63488f, -0.123777f, 1.0f}, + {1.497638f, 0.897401f, -1.244121f, 1.0f}, + {2.089435f, 0.628693f, -1.029167f, 1.0f}, + {1.595354f, 0.862908f, -0.788319f, 1.0f}, + {1.873638f, 0.769949f, -0.900315f, 1.0f}, + {1.777945f, 0.816516f, -1.259501f, 1.0f}, + {2.056674f, 0.688329f, -1.146204f, 1.0f}, + { 1.8227f, 0.816723f, -1.074334f, 1.0f}, + {1.540647f, 0.902233f, -1.001033f, 1.0f}, + {0.892796f, 0.965274f, -0.59545f, 1.0f}, + {1.238794f, 0.913929f, -0.678421f, 1.0f}, + { 1.14692f, 0.952909f, -1.219003f, 1.0f}, + {1.188917f, 0.959236f, -0.926228f, 1.0f}, + { 0.85702f, 0.998334f, -0.855237f, 1.0f}, +}; + +s16 D_L01_001DF2B0[74][4][3] = { + { {0, 0, 0}, {0x12, 1, 1}, {1, 3, 3}, {0x11, 2, 2}}, + { {0x11, 2, 4}, {0x10, 4, 5}, {1, 3, 7}, {4, 5, 6}}, + { {0x10, 4, 8}, {0xf, 6, 9}, {4, 5, 0xb}, {6, 7, 0xa}}, + { {0xf, 6, 0xc}, {0xe, 8, 0xd}, {6, 7, 0xf}, {8, 9, 0xe}}, + { {0xe, 8, 0x10}, {0x13, 0xa, 0x11}, {8, 9, 0x13}, {0xa, 0xb, 0x12}}, + { {0xb, 0xc, 0x14}, {0xd, 0xd, 0x15}, {0x13, 0xa, -1}, {0x13, 0xa, 0x16}}, + { {9, 0xe, 0x17}, {0xb, 0xc, 0x18}, {0xe, 8, 0x1a}, {0x13, 0xa, 0x19}}, + { {7, 0xf, 0x1b}, {9, 0xe, 0x1c}, {0xf, 6, 0x1e}, {0xe, 8, 0x1d}}, + { {5, 0x10, 0x1f}, {7, 0xf, 0x20}, {0x10, 4, 0x22}, {0xf, 6, 0x21}}, + { {2, 0x11, 0x23}, {5, 0x10, 0x24}, {0x11, 2, 0x26}, {0x10, 4, 0x25}}, + { {0x12, 1, 0x27}, {3, 0x12, 0x28}, {0x11, 2, 0x2a}, {2, 0x11, 0x29}}, + { {0xc, 0x13, 0x2b}, {0xa, 0xb, 0x2c}, {0x13, 0xa, -1}, {0x13, 0xa, 0x2d}}, + { {0xd, 0xd, 0x2e}, {0xc, 0x13, 0x2f}, {0x13, 0xa, -1}, {0x13, 0xa, 0x30}}, + { {0, 0, 0x31}, {0x14, 0x14, 0x32}, {0x12, 1, 0x34}, {0x23, 0x15, 0x33}}, + { {0x23, 0x15, 0x35}, {0x14, 0x14, 0x36}, {0x22, 0x17, 0x38}, {0x16, 0x16, 0x37}}, + { {0x22, 0x17, 0x39}, {0x16, 0x16, 0x3a}, {0x21, 0x19, 0x3c}, {0x18, 0x18, 0x3b}}, + { {0x21, 0x19, 0x3d}, {0x18, 0x18, 0x3e}, {0x20, 0x1b, 0x40}, {0x1a, 0x1a, 0x3f}}, + { {0x20, 0x1b, 0x41}, {0x1a, 0x1a, 0x42}, {0x24, 0x1d, 0x44}, {0x1c, 0x1c, 0x43}}, + { {0x1d, 0x1e, 0x45}, {0x24, 0x1d, 0x46}, {0x1f, 0x1f, -1}, {0x1f, 0x1f, 0x47}}, + { {0x1b, 0x20, 0x48}, {0x20, 0x1b, 0x49}, {0x1d, 0x1e, 0x4b}, {0x24, 0x1d, 0x4a}}, + { {0x19, 0x21, 0x4c}, {0x21, 0x19, 0x4d}, {0x1b, 0x20, 0x4f}, {0x20, 0x1b, 0x4e}}, + { {0x17, 0x22, 0x50}, {0x22, 0x17, 0x51}, {0x19, 0x21, 0x53}, {0x21, 0x19, 0x52}}, + { {0x15, 0x23, 0x54}, {0x23, 0x15, 0x55}, {0x17, 0x22, 0x57}, {0x22, 0x17, 0x56}}, + { {0x12, 1, 0x58}, {0x23, 0x15, 0x59}, {3, 0x12, 0x5b}, {0x15, 0x23, 0x5a}}, + { {0x1e, 0x24, 0x5c}, {0x24, 0x1d, 0x5d}, {0x1c, 0x1c, -1}, {0x1c, 0x1c, 0x5e}}, + { {0x1f, 0x1f, 0x5f}, {0x24, 0x1d, 0x60}, {0x1e, 0x24, -1}, {0x1e, 0x24, 0x61}}, + { {0x45, 0x25, 0x62}, {0x46, 0x26, 0x63}, {0x27, 0x28, 0x65}, {0x47, 0x27, 0x64}}, + { {0x38, 0x29, 0x66}, {0x39, 0x2a, 0x67}, {0x2a, 0x2c, 0x69}, {0x3a, 0x2b, 0x68}}, + { {0x31, 0x2d, 0x6a}, {0x33, 0x2e, 0x6b}, {0x2b, 0x30, 0x6d}, {0x34, 0x2f, 0x6c}}, + { {0x2f, 0x31, 0x6e}, {0x30, 0x32, 0x6f}, {0x2e, 0x34, 0x71}, {0x2c, 0x33, 0x70}}, + { {0x25, 0x35, 0x72}, {0x30, 0x32, 0x73}, {0x2d, 0x36, 0x75}, {0x2f, 0x31, 0x74}}, + { {0x32, 0x37, 0x76}, {0x33, 0x2e, 0x77}, {0x29, 0x38, 0x79}, {0x31, 0x2d, 0x78}}, + { {0x2d, 0x36, 0x7a}, {0x2f, 0x31, 0x7b}, {0x32, 0x37, 0x7d}, {0x33, 0x2e, 0x7c}}, + { {0x34, 0x2f, 0x7e}, {0x33, 0x2e, 0x7f}, {0x2e, 0x34, 0x81}, {0x2f, 0x31, 0x80}}, + { {0x35, 0x39, 0x82}, {0x37, 0x3a, 0x83}, {0x28, 0x3c, 0x85}, {0x36, 0x3b, 0x84}}, + { {0x36, 0x3b, 0x86}, {0x37, 0x3a, 0x87}, {0x2c, 0x33, 0x89}, {0x2e, 0x34, 0x88}}, + { {0x2b, 0x30, 0x8a}, {0x34, 0x2f, 0x8b}, {0x38, 0x29, 0x8d}, {0x39, 0x2a, 0x8c}}, + { {0x39, 0x2a, 0x8e}, {0x34, 0x2f, 0x8f}, {0x37, 0x3a, 0x91}, {0x2e, 0x34, 0x90}}, + { {0x3a, 0x2b, 0x92}, {0x39, 0x2a, 0x93}, {0x35, 0x39, 0x95}, {0x37, 0x3a, 0x94}}, + { {0x3f, 0x3d, 0x96}, {0x41, 0x3e, 0x97}, {0x3b, 0x40, 0x99}, {0x42, 0x3f, 0x98}}, + { {0x3e, 0x41, 0x9a}, {0x31, 0x2d, 0x9b}, {0x3d, 0x42, 0x9d}, {0x2b, 0x30, 0x9c}}, + { {0x29, 0x38, 0x9e}, {0x31, 0x2d, 0x9f}, {0x3c, 0x43, 0xa1}, {0x3e, 0x41, 0xa0}}, + { {0x40, 0x44, 0xa2}, {0x41, 0x3e, 0xa3}, {0x26, 0x45, 0xa5}, {0x3f, 0x3d, 0xa4}}, + { {0x3c, 0x43, 0xa6}, {0x3e, 0x41, 0xa7}, {0x40, 0x44, 0xa9}, {0x41, 0x3e, 0xa8}}, + { {0x42, 0x3f, 0xaa}, {0x41, 0x3e, 0xab}, {0x3d, 0x42, 0xad}, {0x3e, 0x41, 0xac}}, + { {0x43, 0x46, 0xae}, {0x44, 0x47, 0xaf}, {0x2a, 0x2c, 0xb1}, {0x38, 0x29, 0xb0}}, + { {0x38, 0x29, 0xb2}, {0x44, 0x47, 0xb3}, {0x2b, 0x30, 0xb5}, {0x3d, 0x42, 0xb4}}, + { {0x3b, 0x40, 0xb6}, {0x42, 0x3f, 0xb7}, {0x45, 0x25, 0xb9}, {0x46, 0x26, 0xb8}}, + { {0x46, 0x26, 0xba}, {0x42, 0x3f, 0xbb}, {0x44, 0x47, 0xbd}, {0x3d, 0x42, 0xbc}}, + { {0x47, 0x27, 0xbe}, {0x46, 0x26, 0xbf}, {0x43, 0x46, 0xc1}, {0x44, 0x47, 0xc0}}, + { {0x63, 0x48, 0xc2}, {0x49, 0x49, 0xc3}, {0x64, 0x4b, 0xc5}, {0x65, 0x4a, 0xc4}}, + { {0x56, 0x4c, 0xc6}, {0x4b, 0x4d, 0xc7}, {0x57, 0x4f, 0xc9}, {0x58, 0x4e, 0xc8}}, + { {0x50, 0x50, 0xca}, {0x4c, 0x51, 0xcb}, {0x52, 0x53, 0xcd}, {0x53, 0x52, 0xcc}}, + { {0x4f, 0x54, 0xce}, {0x4e, 0x55, 0xcf}, {0x30, 0x32, 0xd1}, {0x2c, 0x33, 0xd0}}, + { {0x25, 0x35, 0xd2}, {0x4d, 0x56, 0xd3}, {0x30, 0x32, 0xd5}, {0x4f, 0x54, 0xd4}}, + { {0x51, 0x57, 0xd6}, {0x4a, 0x58, 0xd7}, {0x52, 0x53, 0xd9}, {0x50, 0x50, 0xd8}}, + { {0x4d, 0x56, 0xda}, {0x51, 0x57, 0xdb}, {0x4f, 0x54, 0xdd}, {0x52, 0x53, 0xdc}}, + { {0x53, 0x52, 0xde}, {0x4e, 0x55, 0xdf}, {0x52, 0x53, 0xe1}, {0x4f, 0x54, 0xe0}}, + { {0x54, 0x59, 0xe2}, {0x28, 0x3c, 0xe3}, {0x55, 0x5a, 0xe5}, {0x36, 0x3b, 0xe4}}, + { {0x36, 0x3b, 0xe6}, {0x2c, 0x33, 0xe7}, {0x55, 0x5a, 0xe9}, {0x4e, 0x55, 0xe8}}, + { {0x4c, 0x51, 0xea}, {0x56, 0x4c, 0xeb}, {0x53, 0x52, 0xed}, {0x57, 0x4f, 0xec}}, + { {0x57, 0x4f, 0xee}, {0x55, 0x5a, 0xef}, {0x53, 0x52, 0xf1}, {0x4e, 0x55, 0xf0}}, + { {0x58, 0x4e, 0xf2}, {0x54, 0x59, 0xf3}, {0x57, 0x4f, 0xf5}, {0x55, 0x5a, 0xf4}}, + { {0x5d, 0x5b, 0xf6}, {0x59, 0x5c, 0xf7}, {0x5f, 0x5e, 0xf9}, {0x60, 0x5d, 0xf8}}, + { {0x5c, 0x5f, 0xfa}, {0x5b, 0x60, 0xfb}, {0x50, 0x50, 0xfd}, {0x4c, 0x51, 0xfc}}, + { {0x4a, 0x58, 0xfe}, {0x5a, 0x61, 0xff}, {0x50, 0x50, 0x101}, {0x5c, 0x5f, 0x100}}, + {{0x5e, 0x62, 0x102}, {0x48, 0x63, 0x103}, {0x5f, 0x5e, 0x105}, {0x5d, 0x5b, 0x104}}, + {{0x5a, 0x61, 0x106}, {0x5e, 0x62, 0x107}, {0x5c, 0x5f, 0x109}, {0x5f, 0x5e, 0x108}}, + {{0x60, 0x5d, 0x10a}, {0x5b, 0x60, 0x10b}, {0x5f, 0x5e, 0x10d}, {0x5c, 0x5f, 0x10c}}, + {{0x61, 0x64, 0x10e}, {0x4b, 0x4d, 0x10f}, {0x62, 0x65, 0x111}, {0x56, 0x4c, 0x110}}, + {{0x56, 0x4c, 0x112}, {0x4c, 0x51, 0x113}, {0x62, 0x65, 0x115}, {0x5b, 0x60, 0x114}}, + {{0x59, 0x5c, 0x116}, {0x63, 0x48, 0x117}, {0x60, 0x5d, 0x119}, {0x64, 0x4b, 0x118}}, + {{0x64, 0x4b, 0x11a}, {0x62, 0x65, 0x11b}, {0x60, 0x5d, 0x11d}, {0x5b, 0x60, 0x11c}}, + {{0x65, 0x4a, 0x11e}, {0x61, 0x64, 0x11f}, {0x64, 0x4b, 0x121}, {0x62, 0x65, 0x120}}, +}; + +Vec_2d19b0 D_L01_001DFE40[102] = { + { 0.043892f, -0.009545f, 0.994299f, 1.0f}, + { 0.048983f, -0.207782f, 0.971366f, 1.0f}, + {-0.074535f, -0.2135f, 0.967925f, 1.0f}, + {-0.070656f, -0.000525f, 0.991827f, 1.0f}, + { 0.021298f, -0.509048f, 0.827797f, 1.0f}, + {-0.105019f, -0.5399f, 0.790563f, 1.0f}, + {-0.052564f, -0.828934f, 0.501181f, 1.0f}, + {-0.154474f, -0.858711f, 0.431325f, 1.0f}, + {-0.127832f, -0.966468f, 0.196786f, 1.0f}, + {-0.167565f, -0.968997f, 0.173191f, 1.0f}, + {-0.157676f, -0.984946f, 0.036541f, 1.0f}, + {-0.155021f, -0.984194f, 0.058129f, 1.0f}, + {-0.150524f, -0.988348f, -0.018406f, 1.0f}, + {-0.145769f, -0.989247f, -0.008698f, 1.0f}, + {-0.147698f, -0.967732f, 0.184989f, 1.0f}, + {-0.103519f, -0.843822f, 0.466253f, 1.0f}, + { -0.04186f, -0.524474f, 0.80918f, 1.0f}, + {-0.012776f, -0.210641f, 0.969646f, 1.0f}, + {-0.013382f, -0.005035f, 0.993063f, 1.0f}, + {-0.152838f, -0.985704f, 0.0353f, 1.0f}, + { 0.039087f, 0.199356f, 0.972363f, 1.0f}, + {-0.070016f, 0.207511f, 0.970156f, 1.0f}, + { 0.050214f, 0.482619f, 0.852035f, 1.0f}, + {-0.071442f, 0.507868f, 0.826186f, 1.0f}, + { 0.018825f, 0.790385f, 0.564132f, 1.0f}, + {-0.100102f, 0.826775f, 0.499455f, 1.0f}, + { -0.06566f, 0.955842f, 0.255396f, 1.0f}, + {-0.150533f, 0.963685f, 0.193719f, 1.0f}, + {-0.136995f, 0.985319f, 0.056758f, 1.0f}, + {-0.163807f, 0.984249f, 0.043941f, 1.0f}, + {-0.150525f, 0.988348f, -0.018405f, 1.0f}, + {-0.145769f, 0.989247f, -0.008697f, 1.0f}, + {-0.108096f, 0.959763f, 0.224557f, 1.0f}, + {-0.040638f, 0.80858f, 0.531794f, 1.0f}, + {-0.010614f, 0.495243f, 0.839111f, 1.0f}, + {-0.015464f, 0.203434f, 0.971259f, 1.0f}, + { -0.14808f, 0.985875f, 0.037712f, 1.0f}, + { 0.825852f, -0.009367f, 0.561082f, 1.0f}, + { 0.451917f, -0.885225f, -0.110215f, 1.0f}, + { 0.10908f, -0.99334f, -0.037111f, 1.0f}, + { 0.251649f, 0.004132f, 0.964704f, 1.0f}, + { 0.747399f, -0.560285f, 0.324121f, 1.0f}, + { 0.236173f, -0.793311f, 0.519033f, 1.0f}, + { 0.438564f, -0.709622f, 0.491717f, 1.0f}, + { 0.550282f, -0.0018f, 0.820055f, 1.0f}, + { 0.828151f, -0.159923f, 0.527947f, 1.0f}, + { 0.544118f, -0.194104f, 0.794462f, 1.0f}, + { 0.743607f, -0.170514f, 0.624285f, 1.0f}, + { 0.746896f, -0.005337f, 0.651196f, 1.0f}, + { 0.655149f, -0.602965f, 0.403074f, 1.0f}, + { 0.808123f, -0.353001f, 0.459026f, 1.0f}, + { 0.723868f, -0.377724f, 0.551298f, 1.0f}, + { 0.524972f, -0.445634f, 0.69698f, 1.0f}, + { 0.264343f, -0.212708f, 0.929436f, 1.0f}, + { 0.342136f, 0.000919f, 0.931752f, 1.0f}, + { 0.346758f, -0.209906f, 0.898868f, 1.0f}, + { 0.275202f, -0.783456f, 0.51022f, 1.0f}, + { 0.338826f, -0.50075f, 0.772024f, 1.0f}, + { 0.267322f, -0.512681f, 0.793659f, 1.0f}, + { 0.211836f, -0.973555f, -0.056687f, 1.0f}, + { 0.637162f, -0.745307f, 0.142773f, 1.0f}, + { 0.310435f, -0.89984f, 0.251018f, 1.0f}, + { 0.523809f, -0.801371f, 0.204521f, 1.0f}, + { 0.362684f, -0.922382f, -0.088689f, 1.0f}, + { 0.510565f, -0.852823f, -0.028158f, 1.0f}, + { 0.404524f, -0.899609f, 0.008167f, 1.0f}, + { 0.233273f, -0.963499f, 0.04374f, 1.0f}, + { 0.182536f, -0.945613f, 0.246453f, 1.0f}, + { 0.196476f, -0.943929f, 0.24111f, 1.0f}, + { 0.129651f, -0.990456f, -0.041661f, 1.0f}, + { 0.148075f, -0.983089f, 0.049508f, 1.0f}, + { 0.128088f, -0.985575f, 0.056029f, 1.0f}, + { 0.409797f, 0.911873f, 0.023553f, 1.0f}, + { 0.078973f, 0.99499f, -0.061311f, 1.0f}, + { 0.709214f, 0.512195f, 0.467128f, 1.0f}, + { 0.251679f, 0.779591f, 0.524379f, 1.0f}, + { 0.409969f, 0.746511f, 0.483171f, 1.0f}, + { 0.809029f, 0.124801f, 0.568716f, 1.0f}, + { 0.548324f, 0.197648f, 0.7888f, 1.0f}, + { 0.737132f, 0.157022f, 0.639723f, 1.0f}, + { 0.598403f, 0.618245f, 0.458741f, 1.0f}, + { 0.77758f, 0.303378f, 0.540639f, 1.0f}, + { 0.694092f, 0.380493f, 0.583177f, 1.0f}, + { 0.505706f, 0.479578f, 0.684948f, 1.0f}, + { 0.251897f, 0.19753f, 0.939951f, 1.0f}, + { 0.341655f, 0.201792f, 0.90341f, 1.0f}, + { 0.292013f, 0.774158f, 0.520183f, 1.0f}, + { 0.333159f, 0.490262f, 0.778866f, 1.0f}, + { 0.26551f, 0.478978f, 0.813551f, 1.0f}, + { 0.213175f, 0.973423f, -0.055357f, 1.0f}, + { 0.59227f, 0.715208f, 0.343866f, 1.0f}, + { 0.30909f, 0.908283f, 0.233465f, 1.0f}, + { 0.486576f, 0.803106f, 0.275357f, 1.0f}, + { 0.341498f, 0.935733f, -0.02193f, 1.0f}, + { 0.467485f, 0.86027f, 0.1443f, 1.0f}, + { 0.388517f, 0.903663f, 0.076249f, 1.0f}, + { 0.238743f, 0.963588f, 0.028552f, 1.0f}, + { 0.195511f, 0.947508f, 0.219698f, 1.0f}, + { 0.216405f, 0.936535f, 0.23989f, 1.0f}, + { 0.116063f, 0.991121f, -0.052306f, 1.0f}, + { 0.146155f, 0.983871f, 0.034467f, 1.0f}, + { 0.124374f, 0.987623f, 0.020028f, 1.0f}, +}; + +Vec_2d19b0 D_L01_001E0940[102] = {0}; + +f32 D_L01_001E0FA0[102][2] = {0}; + +f32 D_L01_001E12D0[102][2] = {0}; From a6a8d733275de2e0f773207ecc53ce22ac3a103b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:51:53 +0000 Subject: [PATCH 029/213] decomp: define the timed subtitle text tables in C --- config/us/levels/data.tsv | 19 + include/rnc/overlay/shared/ui/text.h | 17 +- .../ui/text/draw_dialog_background_and_text.c | 3545 ++++++++++++++++- src/overlays/shared/ui/text/draw_timed_text.c | 13 +- 4 files changed, 3575 insertions(+), 19 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 316fe2451b..bb71e1a9ab 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -3797,6 +3797,7 @@ D_L00_00166EEC 4 D_L00_00169C80 880 D_L00_0016A040 2048 D_L00_0016C8B0 2 +D_L00_00173080 2928 D_L00_00179AB0 4 D_L00_0017A722 2 D_L00_0017A724 4 @@ -4869,6 +4870,7 @@ D_L01_0016EEC0 512 D_L01_0016EED8 4 D_L01_001734C0 40 D_L01_001734D4 4 +D_L01_00173500 2928 D_L01_00174284 4 D_L01_00174288 4 D_L01_001742A0 4 @@ -5998,6 +6000,7 @@ D_L02_0016F040 512 D_L02_0016F058 4 D_L02_00173640 40 D_L02_00173654 4 +D_L02_00173680 2928 D_L02_00174400 4 D_L02_00174404 4 D_L02_00174408 4 @@ -7000,6 +7003,7 @@ D_L03_0016EB40 512 D_L03_0016EB58 4 D_L03_00173140 40 D_L03_00173154 4 +D_L03_00173180 2928 D_L03_00173F00 4 D_L03_00173F04 4 D_L03_00173F08 4 @@ -8069,6 +8073,7 @@ D_L04_0016EBC0 512 D_L04_0016EBD8 4 D_L04_001731C0 40 D_L04_001731D4 4 +D_L04_00173200 2928 D_L04_00173F80 4 D_L04_00173F84 4 D_L04_00173F88 4 @@ -9214,6 +9219,7 @@ D_L05_0016EE40 512 D_L05_0016EE58 4 D_L05_00173440 40 D_L05_00173454 4 +D_L05_00173480 2928 D_L05_00174200 4 D_L05_00174204 4 D_L05_00174208 4 @@ -10371,6 +10377,7 @@ D_L06_0016F1C0 512 D_L06_0016F1D8 4 D_L06_001737C0 40 D_L06_001737D4 4 +D_L06_00173800 2928 D_L06_00174584 4 D_L06_00174588 4 D_L06_0017459C 4 @@ -11441,6 +11448,7 @@ D_L07_0016EAC0 512 D_L07_0016EAD8 4 D_L07_001730C0 40 D_L07_001730D4 4 +D_L07_00173100 2928 D_L07_00173E84 4 D_L07_00173E88 4 D_L07_00173E9C 4 @@ -12634,6 +12642,7 @@ D_L08_0016F240 512 D_L08_0016F258 4 D_L08_00173840 40 D_L08_00173854 4 +D_L08_00173880 2928 D_L08_00174600 4 D_L08_00174604 4 D_L08_00174608 4 @@ -13875,6 +13884,7 @@ D_L09_0016EBC0 512 D_L09_0016EBD8 4 D_L09_001731C0 40 D_L09_001731D4 4 +D_L09_00173200 2928 D_L09_00173F80 4 D_L09_00173F84 4 D_L09_00173F88 4 @@ -15242,6 +15252,7 @@ D_L10_0016EEC0 512 D_L10_0016EED8 4 D_L10_001734C0 40 D_L10_001734D4 4 +D_L10_00173500 2928 D_L10_00174280 4 D_L10_00174284 4 D_L10_00174288 4 @@ -16357,6 +16368,7 @@ D_L11_0016EA80 32 D_L11_0016F440 512 D_L11_00173A40 40 D_L11_00173A54 4 +D_L11_00173A80 2928 D_L11_00174800 4 D_L11_00174804 4 D_L11_00174808 4 @@ -17585,6 +17597,7 @@ D_L12_0016EEC0 512 D_L12_0016EED8 4 D_L12_001734C0 40 D_L12_001734D4 4 +D_L12_00173500 2928 D_L12_00174280 4 D_L12_00174284 4 D_L12_00174288 4 @@ -18668,6 +18681,7 @@ D_L13_0016ED40 512 D_L13_0016ED58 4 D_L13_00173340 40 D_L13_00173354 4 +D_L13_00173380 2928 D_L13_00174100 4 D_L13_00174104 4 D_L13_00174108 4 @@ -19776,6 +19790,7 @@ D_L14_0016F140 512 D_L14_0016F158 4 D_L14_00173740 40 D_L14_00173754 4 +D_L14_00173780 2928 D_L14_00174500 4 D_L14_00174504 4 D_L14_00174508 4 @@ -20972,6 +20987,7 @@ D_L15_0016F040 512 D_L15_0016F058 4 D_L15_00173640 40 D_L15_00173654 4 +D_L15_00173680 2928 D_L15_00174400 4 D_L15_00174404 4 D_L15_00174408 4 @@ -22105,6 +22121,7 @@ D_L16_0016EE40 512 D_L16_0016EE58 4 D_L16_00173440 40 D_L16_00173454 4 +D_L16_00173480 2928 D_L16_00174200 4 D_L16_00174204 4 D_L16_00174208 4 @@ -23355,6 +23372,7 @@ D_L17_0016F340 512 D_L17_0016F358 4 D_L17_00173940 40 D_L17_00173954 4 +D_L17_00173980 2928 D_L17_00174700 4 D_L17_00174704 4 D_L17_00174708 4 @@ -24545,6 +24563,7 @@ D_L18_0016EA80 32 D_L18_0016F440 512 D_L18_00173A40 40 D_L18_00173A54 4 +D_L18_00173A80 2928 D_L18_00174804 4 D_L18_00174808 4 D_L18_00174820 4 diff --git a/include/rnc/overlay/shared/ui/text.h b/include/rnc/overlay/shared/ui/text.h index 50e743e8aa..3f0237c81e 100644 --- a/include/rnc/overlay/shared/ui/text.h +++ b/include/rnc/overlay/shared/ui/text.h @@ -3,10 +3,25 @@ #include "types.h" +/* One line of timed (subtitle) text: shown from frame `start` for `duration` frames. */ +typedef struct { + s32 text_id; + s16 x; + s16 y; + s16 start; + s16 duration; + s16 mode; + s16 separator_mode; +} LevelTextEntry; + +#define LEVEL_TIMED_TEXT_COUNT 183 + +extern LevelTextEntry timed_text_entries[LEVEL_TIMED_TEXT_COUNT] __asm__("D_L00_00173080"); + void draw_page_contents(void) __asm__("FUN_L00_001f8f50"); void draw_dialog_background_and_text(void) __asm__("FUN_L00_001f8ec8"); void draw_framebuffer_with_timed_text(void) __asm__("FUN_L00_001f8f78"); -void draw_timed_text(void *, s32) __asm__("FUN_L00_001fcca0"); +void draw_timed_text(LevelTextEntry *, s32) __asm__("FUN_L00_001fcca0"); void level_draw_dialog_text(void) __asm__("FUN_L00_002018c8"); #endif /* LOMBYTE_RNC_OVERLAY_SHARED_UI_TEXT_H */ diff --git a/src/overlays/shared/ui/text/draw_dialog_background_and_text.c b/src/overlays/shared/ui/text/draw_dialog_background_and_text.c index c9d7d21a0c..47d98823a1 100644 --- a/src/overlays/shared/ui/text/draw_dialog_background_and_text.c +++ b/src/overlays/shared/ui/text/draw_dialog_background_and_text.c @@ -45,12 +45,11 @@ extern volatile s32 D_L00_0015F628; #include "rnc/overlay/shared/ui/text/draw_dialog_background_and_text_globals.h" -extern u8 timed_text_entries[] __asm__("D_L00_00173080"); -void draw_framebuffer_with_timed_text(void) __asm__("FUN_L00_001f8f78"); +void draw_framebuffer_with_timed_text(void) __asm__("FUN_L00_001f8f78"); void draw_framebuffer_with_timed_text(void) { - s32 i; - u8 *timed_text_entry; + s32 i; + LevelTextEntry *timed_text_entry; if (D_L00_0015F5D8) return; queue_framebuffer_upload(D_L00_0015F628); @@ -62,9 +61,9 @@ void draw_framebuffer_with_timed_text(void) { reset_gs_registers(); setup_gif_paging(0); timed_text_entry = timed_text_entries; - for (i = 0xB6; i >= 0; i--) { + for (i = LEVEL_TIMED_TEXT_COUNT - 1; i >= 0; i--) { draw_timed_text(timed_text_entry, timed_text_frame); - timed_text_entry += 16; + timed_text_entry++; } do_gif_paging(); } @@ -87,3 +86,3537 @@ s32 D_L15_0015F628 = 0; s32 D_L16_0015F628 = 0; s32 D_L17_0015F628 = 0; s32 D_L18_0015F628 = 0; + +LevelTextEntry timed_text_entries[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L01_00173500[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L02_00173680[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L03_00173180[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L04_00173200[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L05_00173480[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L06_00173800[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L07_00173100[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L08_00173880[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L09_00173200[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L10_00173500[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L11_00173A80[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L12_00173500[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L13_00173380[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L14_00173780[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L15_00173680[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L16_00173480[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L17_00173980[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; + +LevelTextEntry D_L18_00173A80[LEVEL_TIMED_TEXT_COUNT] = { + {0x50a9, 0x100, 0x2c, 0x1e, 0x8ac, 0, 1}, + {0x50aa, 0x60, 0x7d, 0x78, 0xf0, -1, 1}, + {0x50ab, 0x1a0, 0x96, 0x82, 0xeb, 1, 1}, + {0x50ac, 0x60, 0xaf, 0x8c, 0xe6, -1, 1}, + {0x50ad, 0x1a0, 0xc8, 0x96, 0xe1, 1, 1}, + {0x50ae, 0x60, 0xe1, 0xa0, 0xdc, -1, 1}, + {0x50af, 0x1a0, 0xfa, 0xaa, 0xd7, 1, 1}, + {0x50b0, 0x60, 0x7d, 0x1a4, 0xf0, -1, 1}, + {0x50b1, 0x1a0, 0x96, 0x1ae, 0xeb, 1, 1}, + {0x50b2, 0x60, 0xaf, 0x1b8, 0xe6, -1, 1}, + {0x50b3, 0x1a0, 0xc8, 0x1c2, 0xe1, 1, 1}, + {0x50b4, 0x60, 0xe1, 0x1cc, 0xdc, -1, 1}, + {0x50b5, 0x1a0, 0xfa, 0x1d6, 0xd7, 1, 1}, + {0x50b6, 0x60, 0x7d, 0x2d0, 0xf0, -1, 1}, + {0x50b7, 0x1a0, 0x96, 0x2da, 0xeb, 1, 1}, + {0x50b8, 0x60, 0xaf, 0x2e4, 0xe6, -1, 1}, + {0x50b9, 0x1a0, 0xc8, 0x2ee, 0xe1, 1, 1}, + {0x50ba, 0x60, 0xe1, 0x2f8, 0xdc, -1, 1}, + {0x50bb, 0x1a0, 0xfa, 0x302, 0xd7, 1, 1}, + {0x50bc, 0x60, 0x7d, 0x3fc, 0xf0, -1, 1}, + {0x50bd, 0x1a0, 0x96, 0x406, 0xeb, 1, 1}, + {0x50be, 0x60, 0xaf, 0x410, 0xe6, -1, 1}, + {0x50bf, 0x1a0, 0xc8, 0x41a, 0xe1, 1, 1}, + {0x50c0, 0x60, 0xe1, 0x424, 0xdc, -1, 1}, + {0x50c1, 0x1a0, 0xfa, 0x42e, 0xd7, 1, 1}, + {0x50c2, 0x60, 0x7d, 0x528, 0xf0, -1, 1}, + {0x50c3, 0x1a0, 0x96, 0x532, 0xeb, 1, 1}, + {0x50c4, 0x60, 0xaf, 0x53c, 0xe6, -1, 1}, + {0x50c5, 0x1a0, 0xc8, 0x546, 0xe1, 1, 1}, + {0x50c6, 0x60, 0xe1, 0x550, 0xdc, -1, 1}, + {0x50c7, 0x1a0, 0xfa, 0x55a, 0xd7, 1, 1}, + {0x50c8, 0x60, 0x7d, 0x654, 0xf0, -1, 1}, + {0x50c9, 0x1a0, 0x96, 0x65e, 0xeb, 1, 1}, + {0x50ca, 0x60, 0xaf, 0x668, 0xe6, -1, 1}, + {0x50cb, 0x1a0, 0xc8, 0x672, 0xe1, 1, 1}, + {0x50cc, 0x60, 0xe1, 0x67c, 0xdc, -1, 1}, + {0x50cd, 0x1a0, 0xfa, 0x686, 0xd7, 1, 1}, + {0x50ce, 0x60, 0x7d, 0x780, 0xf0, -1, 1}, + {0x50cf, 0x1a0, 0x96, 0x78a, 0xeb, 1, 1}, + {0x50d0, 0x60, 0xaf, 0x794, 0xe6, -1, 1}, + {0x50d1, 0x1a0, 0xc8, 0x79e, 0xe1, 1, 1}, + {0x50d2, 0x60, 0xe1, 0x7a8, 0xdc, -1, 1}, + {0x50d3, 0x1a0, 0xfa, 0x7b2, 0xd7, 1, 1}, + {0x50d4, 0x100, 0x5a, 0x906, 0x12c, 0, 1}, + {0x50d5, 0x100, 0x78, 0x915, 0xf0, 0, 1}, + {0x50d6, 0x100, 0x20, 0xa6e, 0xb04, 0, 0}, + {0x50d7, 0x100, 0x78, 0xac8, 0xf0, 0, 0}, + {0x50d8, 0x100, 0xc8, 0xadc, 0xe6, 0, 0}, + {0x50d9, 0x100, 0x118, 0xaf0, 0xdc, 0, 0}, + {0x50da, 0x100, 0x78, 0xbf4, 0xf0, 0, 0}, + {0x50db, 0x100, 0xc8, 0xc08, 0xe6, 0, 0}, + {0x50dc, 0x100, 0x78, 0xd20, 0xf0, 0, 0}, + {0x50dd, 0x100, 0xc8, 0xd34, 0xe6, 0, 0}, + {0x50de, 0x100, 0x118, 0xd48, 0xdc, 0, 0}, + {0x50df, 0x100, 0x78, 0xe4c, 0xf0, 0, 0}, + {0x50e0, 0x100, 0xc8, 0xe60, 0xe6, 0, 0}, + {0x50e1, 0x100, 0x78, 0xf78, 0xf0, 0, 0}, + {0x50e2, 0x100, 0xc8, 0xf8c, 0xe6, 0, 0}, + {0x50e3, 0x100, 0x118, 0xfa0, 0xdc, 0, 0}, + {0x50e4, 0x100, 0x78, 0x10a4, 0xf0, 0, 0}, + {0x50e5, 0x100, 0xc8, 0x10b8, 0xe6, 0, 0}, + {0x50e6, 0x100, 0x118, 0x10cc, 0xdc, 0, 0}, + {0x50e7, 0x100, 0x78, 0x11d0, 0xf0, 0, 0}, + {0x50e8, 0x100, 0xdc, 0x11e4, 0xe6, 0, 0}, + {0x50e9, 0x100, 0x5a, 0x12fc, 0x258, 0, 1}, + {0x50ea, 0x50, 0x78, 0x1301, 0xe5, -1, 1}, + {0x50eb, 0x1b0, 0x8c, 0x1306, 0xe2, 1, 1}, + {0x50ec, 0x50, 0xa0, 0x130b, 0xdf, -1, 1}, + {0x50ed, 0x1b0, 0xb4, 0x1310, 0xdc, 1, 1}, + {0x50ee, 0x50, 0xc8, 0x1315, 0xd9, -1, 1}, + {0x50ef, 0x1b0, 0xdc, 0x131a, 0xd6, 1, 1}, + {0x50f0, 0x50, 0xf0, 0x131f, 0xd3, -1, 1}, + {0x50f1, 0x1b0, 0x104, 0x1324, 0xd0, 1, 1}, + {0x50f2, 0x50, 0x118, 0x1329, 0xcd, -1, 1}, + {0x50f3, 0x1b0, 0x12c, 0x132e, 0xca, 1, 1}, + {0x50f4, 0x50, 0x140, 0x1333, 0xc7, -1, 1}, + {0x50f5, 0x1b0, 0x154, 0x1338, 0xc4, 1, 1}, + {0x50f6, 0x50, 0x168, 0x133d, 0xc1, -1, 1}, + {0x50f7, 0x1b0, 0x17c, 0x1342, 0xbe, 1, 1}, + {0x50f8, 0x50, 0x78, 0x142d, 0xe5, -1, 1}, + {0x50f9, 0x1b0, 0x8c, 0x1432, 0xe2, 1, 1}, + {0x50fa, 0x50, 0xa0, 0x1437, 0xdf, -1, 1}, + {0x50fb, 0x1b0, 0xb4, 0x143c, 0xdc, 1, 1}, + {0x50fc, 0x50, 0xc8, 0x1441, 0xd9, -1, 1}, + {0x50fd, 0x1b0, 0xdc, 0x1446, 0xd6, 1, 1}, + {0x50fe, 0x50, 0xf0, 0x144b, 0xd3, -1, 1}, + {0x50ff, 0x1b0, 0x104, 0x1450, 0xd0, 1, 1}, + {0x5100, 0x50, 0x118, 0x1455, 0xcd, -1, 1}, + {0x5101, 0x1b0, 0x12c, 0x145a, 0xca, 1, 1}, + {0x5102, 0x50, 0x140, 0x145f, 0xc7, -1, 1}, + {0x5103, 0x1b0, 0x154, 0x1464, 0xc4, 1, 1}, + {0x5104, 0x50, 0x168, 0x1469, 0xc1, -1, 1}, + {0x5105, 0x1b0, 0x17c, 0x146e, 0xbe, 1, 1}, + {0x5106, 0x100, 0x20, 0x15ae, 0xc6c, 0, 0}, + {0x5107, 0x100, 0x78, 0x1608, 0xf0, 0, 0}, + {0x5108, 0x100, 0xbe, 0x1612, 0xeb, 0, 0}, + {0x5109, 0x100, 0x104, 0x161c, 0xe6, 0, 0}, + {0x510a, 0x100, 0x78, 0x1734, 0xf0, 0, 0}, + {0x510b, 0x100, 0xbe, 0x173e, 0xeb, 0, 0}, + {0x510c, 0x100, 0x104, 0x1748, 0xe6, 0, 0}, + {0x510d, 0x100, 0x14a, 0x1752, 0xe1, 0, 0}, + {0x510e, 0x100, 0x64, 0x1860, 0xf0, 0, 1}, + {0x510f, 0x60, 0x8c, 0x1865, 0xe5, -1, 1}, + {0x5110, 0x1a0, 0xaa, 0x186a, 0xe2, 1, 1}, + {0x5111, 0x60, 0xc8, 0x186f, 0xdf, -1, 1}, + {0x5112, 0x1a0, 0xe6, 0x1874, 0xdc, 1, 1}, + {0x5113, 0x60, 0x104, 0x1879, 0xd9, -1, 1}, + {0x5114, 0x1a0, 0x122, 0x187e, 0xd6, 1, 1}, + {0x5115, 0x60, 0x140, 0x1883, 0xd3, -1, 1}, + {0x5116, 0x1a0, 0x15e, 0x1888, 0xd0, 1, 1}, + {0x5117, 0x60, 0x17c, 0x188d, 0xcd, -1, 1}, + {0x5118, 0x100, 0x78, 0x198c, 0xf0, 0, 0}, + {0x5119, 0x100, 0xc8, 0x1996, 0xeb, 0, 0}, + {0x511a, 0x100, 0x12c, 0x19a0, 0xe6, 0, 0}, + {0x511b, 0x100, 0x78, 0x1ab8, 0xf0, 0, 0}, + {0x511c, 0x100, 0xc8, 0x1ac2, 0xeb, 0, 0}, + {0x511d, 0x100, 0x118, 0x1acc, 0xe6, 0, 0}, + {0x511e, 0x100, 0x8c, 0x1be4, 0xf0, 0, 0}, + {0x511f, 0x100, 0xf0, 0x1bee, 0xeb, 0, 0}, + {0x5120, 0x100, 0x8c, 0x1d10, 0xf0, 0, 0}, + {0x5121, 0x100, 0xf0, 0x1d1a, 0xeb, 0, 0}, + {0x5122, 0x100, 0x8c, 0x1e3c, 0xf0, 0, 0}, + {0x5123, 0x100, 0xf0, 0x1e46, 0xeb, 0, 0}, + {0x5124, 0x100, 0x8c, 0x1f68, 0xf0, 0, 0}, + {0x5125, 0x100, 0x104, 0x1f72, 0xeb, 0, 0}, + {0x5126, 0x100, 0x78, 0x2094, 0xf0, 0, 0}, + {0x5127, 0x100, 0xb4, 0x209e, 0xeb, 0, 0}, + {0x5128, 0x100, 0xf0, 0x20a8, 0xe6, 0, 0}, + {0x5129, 0x100, 0x12c, 0x20b2, 0xe1, 0, 0}, + {0x5136, 0x100, 0x50, 0x2256, 0x168, 0, 0}, + {0x5137, 0x100, 0x8c, 0x2265, 0x12c, 0, 1}, + {0x5138, 0x100, 0x2c, 0x23fa, 0x9d8, 0, 1}, + {0x5139, 0x100, 0x78, 0x2454, 0xf0, 0, 0}, + {0x513a, 0x100, 0x78, 0x259e, 0xf0, 0, 0}, + {0x513b, 0x100, 0x78, 0x26ac, 0xf0, 0, 0}, + {0x513c, 0x100, 0x78, 0x27f6, 0xf0, 0, 0}, + {0x513d, 0x100, 0x78, 0x2904, 0xf0, 0, 0}, + {0x513e, 0x100, 0x78, 0x2a30, 0xf0, 0, 0}, + {0x513f, 0x100, 0x78, 0x2b5c, 0xf0, 0, 0}, + {0x5140, 0x100, 0x50, 0x2c88, 0xf0, 0, 0}, + {0x5142, 0x100, 0xa0, 0x2c92, 0xeb, 0, 0}, + {0x5141, 0x100, 0xf0, 0x2c9c, 0xe6, 0, 0}, + {0x5143, 0x100, 0x78, 0x2df0, 0x12c, 0, 0}, + {0x5144, 0x100, 0x20, 0x2f58, 0x320, 0, 0}, + {0x5145, 0x50, 0x78, 0x2f5d, 0xe5, -1, 1}, + {0x5146, 0x1b0, 0x8c, 0x2f62, 0xe2, 1, 1}, + {0x5147, 0x50, 0xa0, 0x2f67, 0xdf, -1, 1}, + {0x5148, 0x1b0, 0xb4, 0x2f6c, 0xdc, 1, 1}, + {0x5149, 0x50, 0xc8, 0x2f71, 0xd9, -1, 1}, + {0x514a, 0x1b0, 0xdc, 0x2f76, 0xd6, 1, 1}, + {0x514c, 0x50, 0xf0, 0x2f7b, 0xd3, -1, 1}, + {0x514d, 0x1b0, 0x104, 0x2f80, 0xd0, 1, 1}, + {0x514e, 0x50, 0x118, 0x2f85, 0xcd, -1, 1}, + {0x514f, 0x1b0, 0x12c, 0x2f8a, 0xca, 1, 1}, + {0x5151, 0x50, 0x140, 0x2f8f, 0xc7, -1, 1}, + {0x5152, 0x1b0, 0x154, 0x2f94, 0xc4, 1, 1}, + {0x5153, 0x50, 0x168, 0x2f99, 0xc1, -1, 1}, + {0x514b, 0x100, 0x78, 0x30fc, 0xf0, 0, 0}, + {0x5150, 0x100, 0xc8, 0x3110, 0xe6, 0, 0}, + {0x5154, 0x100, 0x12c, 0x3124, 0xdc, 0, 0}, + {0x515e, 0x100, 0x78, 0x32b4, 0x12c, 0, 0}, + {0x515f, 0x60, 0x64, 0x3458, 0x113, -1, 1}, + {0x5160, 0x1a0, 0x7d, 0x3462, 0x10e, 1, 1}, + {0x5161, 0x60, 0x96, 0x346c, 0x109, -1, 1}, + {0x5162, 0x1a0, 0xaf, 0x3476, 0x104, 1, 1}, + {0x5163, 0x60, 0xc8, 0x3480, 0xff, -1, 1}, + {0x5164, 0x1a0, 0xe1, 0x348a, 0xfa, 1, 1}, + {0x5165, 0x60, 0xfa, 0x3494, 0xf5, -1, 1}, + {0x5166, 0x1a0, 0x113, 0x349e, 0xf0, 1, 1}, + {0x5167, 0x100, 0x20, 0x35c0, 0x2d0, 0, 0}, + {0x5168, 0x50, 0x78, 0x35c5, 0xe5, -1, 1}, + {0x5169, 0x1b0, 0x8c, 0x35ca, 0xe2, 1, 1}, + {0x516a, 0x50, 0xa0, 0x35cf, 0xdf, -1, 1}, + {0x516c, 0x1b0, 0xb4, 0x35d4, 0xdc, 1, 1}, + {0x516d, 0x50, 0xc8, 0x35d9, 0xd9, -1, 1}, + {0x516e, 0x1b0, 0xdc, 0x35de, 0xd6, 1, 1}, + {0x516f, 0x50, 0xf0, 0x35e3, 0xd3, -1, 1}, + {0x5171, 0x1b0, 0x104, 0x35e8, 0xd0, 1, 1}, + {0x5172, 0x50, 0x118, 0x35ed, 0xcd, -1, 1}, + {0x5173, 0x1b0, 0x12c, 0x35f2, 0xca, 1, 1}, + {0x516b, 0x100, 0x78, 0x3764, 0xf0, 0, 0}, + {0x5170, 0x100, 0xc8, 0x3778, 0xe6, 0, 0}, + {0x5174, 0x100, 0x12c, 0x378c, 0xdc, 0, 0}, +}; diff --git a/src/overlays/shared/ui/text/draw_timed_text.c b/src/overlays/shared/ui/text/draw_timed_text.c index 6defbf6b6c..105621b153 100644 --- a/src/overlays/shared/ui/text/draw_timed_text.c +++ b/src/overlays/shared/ui/text/draw_timed_text.c @@ -1,5 +1,6 @@ /* Text: draws timed text lines. */ #include "types.h" +#include "rnc/overlay/shared/ui/text.h" #include "asm.h" #include "rnc/math/asm_helpers.h" #include "rnc/ui/help/get_help_message_text.h" @@ -46,18 +47,6 @@ void draw_timed_text_line(int x, int y, int mode, float scale, float alpha, char } /* Ported from rac1-decomp (src/overlays/shared/draw_001F3A78.c: func_L00_001FCC50), where it is exact; names translated to the US level program. */ -typedef struct { - s32 text_id; - s16 x; - s16 y; - s16 start; - s16 duration; - s16 mode; - s16 separator_mode; -} LevelTextEntry; - -void draw_timed_text(LevelTextEntry *entry, s32 frame) __asm__("FUN_L00_001fcca0"); - void draw_timed_text(LevelTextEntry *timed_text_entry, s32 frame) { enum { TEXT_SEPARATOR_JOIN_WITH_HYPHEN = 1 From 5b005cc776a1b414406e81ef82b64aa06ab9345b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 13:58:46 +0000 Subject: [PATCH 030/213] decomp: define the suck cannon beam rings in C --- config/us/levels/data.tsv | 74 ++++---- src/overlays/shared/weapons/suckcannon.c | 223 +++++++++++++---------- 2 files changed, 162 insertions(+), 135 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index bb71e1a9ab..65b6786614 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -4120,6 +4120,8 @@ D_L00_001E04A0 1632 D_L00_001E0B00 816 D_L00_001E0E30 816 D_L00_001E4C80 4800 +D_L00_001E6008 20 +D_L00_001E6020 3200 D_L00_001E6CE0 64 D_L00_001E6CE0 64 D_L00_001E6CE0 64 @@ -5139,8 +5141,8 @@ D_L01_001FF5E0 4800 D_L01_00200840 1 D_L01_00200890 1 D_L01_002008A0 1 -D_L01_00200968 2 -D_L01_00200980 1 +D_L01_00200968 20 +D_L01_00200980 3200 D_L01_00201660 1504 D_L01_00201C40 752 D_L01_00201F30 1120 @@ -6278,8 +6280,8 @@ D_L02_001D7750 4800 D_L02_001D89B0 1 D_L02_001D8A00 1 D_L02_001D8A10 1 -D_L02_001D8AD8 2 -D_L02_001D8AF0 1 +D_L02_001D8AD8 20 +D_L02_001D8AF0 3200 D_L02_001F3E80 16400 D_L02_001F7EC0 4 D_L02_001F8220 24 @@ -7288,8 +7290,8 @@ D_L03_001D6550 4800 D_L03_001D77B0 1 D_L03_001D7800 1 D_L03_001D7810 1 -D_L03_001D78D8 2 -D_L03_001D78F0 1 +D_L03_001D78D8 20 +D_L03_001D78F0 3200 D_L03_001E0240 4 D_L03_001E05A0 24 D_L03_001E06D0 24 @@ -8342,8 +8344,8 @@ D_L04_001D7390 4800 D_L04_001D85F0 1 D_L04_001D8640 1 D_L04_001D8650 1 -D_L04_001D8718 2 -D_L04_001D8730 1 +D_L04_001D8718 20 +D_L04_001D8730 3200 D_L04_001D93B0 4 D_L04_001D9710 24 D_L04_001D9840 24 @@ -9488,8 +9490,8 @@ D_L05_0020BEC0 4800 D_L05_0020D120 1 D_L05_0020D170 1 D_L05_0020D180 1 -D_L05_0020D248 2 -D_L05_0020D260 1 +D_L05_0020D248 20 +D_L05_0020D260 3200 D_L05_00215C70 64 D_L05_00215CB0 4 D_L05_00216010 24 @@ -10658,8 +10660,8 @@ D_L06_001D8E40 4800 D_L06_001DA0A0 1 D_L06_001DA0F0 1 D_L06_001DA100 1 -D_L06_001DA1C8 2 -D_L06_001DA1E0 1 +D_L06_001DA1C8 20 +D_L06_001DA1E0 3200 D_L06_001DB0F0 1920 D_L06_001DB870 1920 D_L06_001DBFF0 14080 @@ -11728,8 +11730,8 @@ D_L07_001DAE00 4800 D_L07_001DC060 1 D_L07_001DC0B0 1 D_L07_001DC0C0 1 -D_L07_001DC188 2 -D_L07_001DC1A0 1 +D_L07_001DC188 20 +D_L07_001DC1A0 3200 D_L07_001DCE40 161856 D_L07_00204680 72 D_L07_00204700 576 @@ -13049,8 +13051,8 @@ D_L08_001ED720 4800 D_L08_001EE980 1 D_L08_001EE9D0 1 D_L08_001EE9E0 1 -D_L08_001EEAA8 2 -D_L08_001EEAC0 1 +D_L08_001EEAA8 20 +D_L08_001EEAC0 3200 D_L08_001EF7D0 420 D_L08_001EF978 420 D_L08_001EFB20 280 @@ -14397,8 +14399,8 @@ D_L09_00204100 4800 D_L09_00205360 1 D_L09_002053B0 1 D_L09_002053C0 1 -D_L09_00205488 2 -D_L09_002054A0 1 +D_L09_00205488 20 +D_L09_002054A0 3200 D_L09_00206120 4 D_L09_00206480 24 D_L09_002065B0 24 @@ -15489,8 +15491,8 @@ D_L10_001D7F00 4800 D_L10_001D9160 1 D_L10_001D91B0 1 D_L10_001D91C0 1 -D_L10_001D9288 2 -D_L10_001D92A0 1 +D_L10_001D9288 20 +D_L10_001D92A0 3200 D_L10_001D9F20 4 D_L10_001D9FF0 32 D_L10_001DA010 64 @@ -16660,8 +16662,8 @@ D_L11_001D7AD0 4800 D_L11_001D8D30 1 D_L11_001D8D80 1 D_L11_001D8D90 1 -D_L11_001D8E58 2 -D_L11_001D8E70 1 +D_L11_001D8E58 20 +D_L11_001D8E70 3200 D_L11_001DA710 24 D_L11_001DA740 320 D_L11_001DA880 89920 @@ -17847,8 +17849,8 @@ D_L12_001F94A0 4800 D_L12_001FA700 1 D_L12_001FA750 1 D_L12_001FA760 1 -D_L12_001FA828 2 -D_L12_001FA840 1 +D_L12_001FA828 20 +D_L12_001FA840 3200 D_L12_001FB6CC 4 D_L12_001FB6D0 32 D_L12_001FB6F0 64 @@ -18932,8 +18934,8 @@ D_L13_001D7B00 4800 D_L13_001D8D60 1 D_L13_001D8DB0 1 D_L13_001D8DC0 1 -D_L13_001D8E88 2 -D_L13_001D8EA0 1 +D_L13_001D8E88 20 +D_L13_001D8EA0 3200 D_L13_001D9B70 32 D_L13_001D9BC0 98912 D_L13_001F1E20 44 @@ -20128,8 +20130,8 @@ D_L14_001E3FB0 4800 D_L14_001E5210 1 D_L14_001E5260 1 D_L14_001E5270 1 -D_L14_001E5338 2 -D_L14_001E5350 1 +D_L14_001E5338 20 +D_L14_001E5350 3200 D_L14_001E5FD0 32 D_L14_001E5FD0 32 D_L14_001E5FD0 32 @@ -21273,8 +21275,8 @@ D_L15_001D74D0 4800 D_L15_001D8730 1 D_L15_001D8780 1 D_L15_001D8790 1 -D_L15_001D8858 2 -D_L15_001D8870 1 +D_L15_001D8858 20 +D_L15_001D8870 3200 D_L15_001D94F0 32 D_L15_001D9530 64 D_L15_001D9570 64 @@ -22358,8 +22360,8 @@ D_L16_001D69F0 4800 D_L16_001D7C50 1 D_L16_001D7CA0 1 D_L16_001D7CB0 1 -D_L16_001D7D78 2 -D_L16_001D7D90 1 +D_L16_001D7D78 20 +D_L16_001D7D90 3200 D_L16_001D8A28 4 D_L16_001D8A2C 4 D_L16_001D8A30 4 @@ -23668,8 +23670,8 @@ D_L17_001D77F0 4800 D_L17_001D8A50 1 D_L17_001D8AA0 1 D_L17_001D8AB0 1 -D_L17_001D8B78 2 -D_L17_001D8B90 1 +D_L17_001D8B78 20 +D_L17_001D8B90 3200 D_L17_001D9860 32 D_L17_001D9B68 1024 D_L17_001DA040 1776 @@ -24829,8 +24831,8 @@ D_L18_001D7B30 4800 D_L18_001D8D90 1 D_L18_001D8DE0 1 D_L18_001D8DF0 1 -D_L18_001D8EB8 2 -D_L18_001D8ED0 1 +D_L18_001D8EB8 20 +D_L18_001D8ED0 3200 D_L18_001D9B50 32 D_L18_001D9B70 256 D_L18_001D9C70 24 diff --git a/src/overlays/shared/weapons/suckcannon.c b/src/overlays/shared/weapons/suckcannon.c index e91d7e904c..313557be3c 100644 --- a/src/overlays/shared/weapons/suckcannon.c +++ b/src/overlays/shared/weapons/suckcannon.c @@ -413,6 +413,9 @@ typedef union { Q41 q; } V41 __attribute__((aligned(16))); +#define SUCK_BEAM_RING_COUNT 10 +#define SUCK_BEAM_RING_VERTEX_COUNT 20 + typedef struct { u8 pad0[0x34]; u16 flags; @@ -586,19 +589,22 @@ I6 l00_suck_cannon_explosion_second_color_choices __asm__("D_L00_001EA118") = { {0x2f005f7f, 0x2f004f7f, 0x2f003f7f, 0x2f00004f, 0x2f000000, 0x3f000000} }; -extern float D_0015ED6C; -extern int *D_L00_00177F00[]; -extern float frame_scale_sq_macro __asm__("D_0015ED64") MACRO_ADDR; -extern float frame_time_sq_macro __asm__("D_0015ED70") MACRO_ADDR; -extern unsigned char D_0013E629_2DDEA0[] __asm__("D_0013E529"); -extern unsigned char D_001404FC_2DDEA0[] __asm__("D_001403FC"); -extern char D_0013F4D0_2DDEA0[] __asm__("D_0013F3D0"); -extern char D_0013FA90_2DDEA0[] __asm__("D_0013F990"); -extern char D_L00_001EA4B0_2DDEA0[] __asm__("D_L00_001EA130"); -extern char D_L00_001E5EE0[] NOT_SDA; -extern char D_L00_001E6020[] NOT_SDA; +extern float D_0015ED6C; +extern int *D_L00_00177F00[]; +extern float frame_scale_sq_macro __asm__("D_0015ED64") MACRO_ADDR; +extern float frame_time_sq_macro __asm__("D_0015ED70") MACRO_ADDR; +extern unsigned char D_0013E629_2DDEA0[] __asm__("D_0013E529"); +extern unsigned char D_001404FC_2DDEA0[] __asm__("D_001403FC"); +extern char D_0013F4D0_2DDEA0[] __asm__("D_0013F3D0"); +extern char D_0013FA90_2DDEA0[] __asm__("D_0013F990"); +extern char D_L00_001EA4B0_2DDEA0[] __asm__("D_L00_001EA130"); +extern char D_L00_001E5EE0[] NOT_SDA; +/* The beam mesh: SUCK_BEAM_RING_COUNT rings of SUCK_BEAM_RING_VERTEX_COUNT points, + ring 0 at the nozzle, and the alpha of each ring (0..64, fading in and out). */ +extern V41 + suck_beam_rings[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] __asm__("D_L00_001E6020"); extern float suck_beam_texture_v_step __asm__("D_L00_00161B50") __attribute__((sda)); -extern short D_L00_001E6008[] NOT_SDA; +extern s16 suck_beam_ring_alphas[SUCK_BEAM_RING_COUNT] __asm__("D_L00_001E6008"); s32 suck_beam_particles_reset_pending_gp __asm__("D_L00_00161B44") = 1; s32 suck_beam_reset_pending_gp __asm__("D_L00_00161B40") = 1; extern E04 D_L00_001E4C80[]; @@ -613,7 +619,6 @@ extern int suck_beam_reset_pending __asm__("D_L00_00161B40") __ extern int suck_beam_particles_reset_pending __asm__("D_L00_00161B44") __attribute__((sda)); extern int l00_suck_beam_step_blend_elapsed_frames __asm__("D_L00_00161B54") __attribute__((sda)); extern int suck_beam_wave_phase __asm__("D_L00_00161B58") __attribute__((sda)); -extern short D_L00_001E6008[]; extern V41 l00_suck_beam_ring_source_offsets[] __asm__("D_L00_001E4B40"); extern E04 D_L00_001E4C80_lui[] __asm__("D_L00_001E4C80"); extern char D_L00_00161B60[]; @@ -621,7 +626,6 @@ int suck_beam_wave_phase_gp __asm__("D_L00_00161B58") = 0; extern char D_L00_00161B70[]; extern char collision_hit_point[] __asm__("D_L00_00173E60"); extern char D_L00_001E5EE0[]; -extern char D_L00_001E6020[]; extern float D_0015ED60; extern float D_L00_00161B84; extern float D_L00_00161B80; @@ -669,42 +673,6 @@ E04 D_L17_001D77F0[200] = {0}; E04 D_L18_001D7B30[200] = {0}; -s16 D_L01_00200968[1] __attribute__((section(".data"))) = {0}; - -s16 D_L02_001D8AD8[1] __attribute__((section(".data"))) = {0}; - -s16 D_L03_001D78D8[1] __attribute__((section(".data"))) = {0}; - -s16 D_L04_001D8718[1] __attribute__((section(".data"))) = {0}; - -s16 D_L05_0020D248[1] __attribute__((section(".data"))) = {0}; - -s16 D_L06_001DA1C8[1] __attribute__((section(".data"))) = {0}; - -s16 D_L07_001DC188[1] __attribute__((section(".data"))) = {0}; - -s16 D_L08_001EEAA8[1] __attribute__((section(".data"))) = {0}; - -s16 D_L09_00205488[1] __attribute__((section(".data"))) = {0}; - -s16 D_L10_001D9288[1] __attribute__((section(".data"))) = {0}; - -s16 D_L11_001D8E58[1] __attribute__((section(".data"))) = {0}; - -s16 D_L12_001FA828[1] __attribute__((section(".data"))) = {0}; - -s16 D_L13_001D8E88[1] __attribute__((section(".data"))) = {0}; - -s16 D_L14_001E5338[1] __attribute__((section(".data"))) = {0}; - -s16 D_L15_001D8858[1] __attribute__((section(".data"))) = {0}; - -s16 D_L16_001D7D78[1] __attribute__((section(".data"))) = {0}; - -s16 D_L17_001D8B78[1] __attribute__((section(".data"))) = {0}; - -s16 D_L18_001D8EB8[1] __attribute__((section(".data"))) = {0}; - char D_L01_0020B708 NOT_SDA = 0x63; char D_L01_00161EB0[1] = {-37}; @@ -719,7 +687,6 @@ I6 D_L01_0020B838 = { }; char D_L01_00200840 NOT_SDA = 0; -char D_L01_00200980 NOT_SDA = 0; float D_L01_00161ED0 = 0.006f; int D_L01_00161EC4 = 1; int D_L01_00161EC0 = 1; @@ -745,7 +712,6 @@ I6 D_L02_001FACC8 = { }; char D_L02_001D89B0 NOT_SDA = 0; -char D_L02_001D8AF0 NOT_SDA = 0; float D_L02_00161E70 = 0.006f; int D_L02_00161E64 = 1; int D_L02_00161E60 = 1; @@ -771,7 +737,6 @@ I6 D_L03_001E3578 = { }; char D_L03_001D77B0 NOT_SDA = 0; -char D_L03_001D78F0 NOT_SDA = 0; float D_L03_00161B70 = 0.006f; int D_L03_00161B64 = 1; int D_L03_00161B60 = 1; @@ -797,7 +762,6 @@ I6 D_L04_001DC6E8 = { }; char D_L04_001D85F0 NOT_SDA = 0; -char D_L04_001D8730 NOT_SDA = 0; float D_L04_00161CA0 = 0.006f; int D_L04_00161C94 = 1; int D_L04_00161C90 = 1; @@ -823,7 +787,6 @@ I6 D_L05_00218928 = { }; char D_L05_0020D120 NOT_SDA = 0; -char D_L05_0020D260 NOT_SDA = 0; float D_L05_00161E40 = 0.006f; int D_L05_00161E34 = 1; int D_L05_00161E30 = 1; @@ -849,7 +812,6 @@ I6 D_L06_00201588 = { }; char D_L06_001DA0A0 NOT_SDA = 0; -char D_L06_001DA1E0 NOT_SDA = 0; float D_L06_00161CA0 = 0.006f; int D_L06_00161C94 = 1; int D_L06_00161C90 = 1; @@ -875,7 +837,6 @@ I6 D_L07_002114D8 = { }; char D_L07_001DC060 NOT_SDA = 0; -char D_L07_001DC1A0 NOT_SDA = 0; float D_L07_00161AF0 = 0.006f; char D_L07_00161B00 = 0; char D_L07_00161B10 = 0; @@ -899,7 +860,6 @@ I6 D_L08_001FC588 = { }; char D_L08_001EE980 NOT_SDA = 0; -char D_L08_001EEAC0 NOT_SDA = 0; float D_L08_00162140 = 0.006f; int D_L08_00162134 = 1; int D_L08_00162130 = 1; @@ -925,7 +885,6 @@ I6 D_L09_00208E58 = { }; char D_L09_00205360 NOT_SDA = 0; -char D_L09_002054A0 NOT_SDA = 0; float D_L09_00161B90 = 0.006f; int D_L09_00161B84 = 1; int D_L09_00161B80 = 1; @@ -951,7 +910,6 @@ I6 D_L10_001DD058 = { }; char D_L10_001D9160 NOT_SDA = 0; -char D_L10_001D92A0 NOT_SDA = 0; float D_L10_00161B90 = 0.006f; int D_L10_00161B84 = 1; int D_L10_00161B80 = 1; @@ -977,7 +935,6 @@ I6 D_L11_0021B3E8 = { }; char D_L11_001D8D30 NOT_SDA = 0; -char D_L11_001D8E70 NOT_SDA = 0; float D_L11_00161D80 = 0.006f; int D_L11_00161D74 = 1; int D_L11_00161D70 = 1; @@ -1003,7 +960,6 @@ I6 D_L12_0020C888 = { }; char D_L12_001FA700 NOT_SDA = 0; -char D_L12_001FA840 NOT_SDA = 0; float D_L12_00161CA0 = 0.006f; int D_L12_00161C94 = 1; int D_L12_00161C90 = 1; @@ -1029,7 +985,6 @@ I6 D_L13_001F5448 = { }; char D_L13_001D8D60 NOT_SDA = 0; -char D_L13_001D8EA0 NOT_SDA = 0; float D_L13_00161CE0 = 0.006f; int D_L13_00161CD4 = 1; int D_L13_00161CD0 = 1; @@ -1055,7 +1010,6 @@ I6 D_L14_001FCD98 = { }; char D_L14_001E5210 NOT_SDA = 0; -char D_L14_001E5350 NOT_SDA = 0; float D_L14_00161EE0 = 0.006f; int D_L14_00161ED4 = 1; int D_L14_00161ED0 = 1; @@ -1081,7 +1035,6 @@ I6 D_L15_001E3448 = { }; char D_L15_001D8730 NOT_SDA = 0; -char D_L15_001D8870 NOT_SDA = 0; float D_L15_00161E80 = 0.006f; int D_L15_00161E74 = 1; int D_L15_00161E70 = 1; @@ -1107,7 +1060,6 @@ I6 D_L16_001E84D8 = { }; char D_L16_001D7C50 NOT_SDA = 0; -char D_L16_001D7D90 NOT_SDA = 0; float D_L16_00161C00 = 0.006f; int D_L16_00161BF4 = 1; int D_L16_00161BF0 = 1; @@ -1133,7 +1085,6 @@ I6 D_L17_001E6BF8 = { }; char D_L17_001D8A50 NOT_SDA = 0; -char D_L17_001D8B90 NOT_SDA = 0; float D_L17_00161D70 = 0.006f; int D_L17_00161D64 = 1; int D_L17_00161D60 = 1; @@ -1159,7 +1110,6 @@ I6 D_L18_001F2928 = { }; char D_L18_001D8D90 NOT_SDA = 0; -char D_L18_001D8ED0 NOT_SDA = 0; float D_L18_00161E90 = 0.006f; int D_L18_00161E84 = 1; int D_L18_00161E80 = 1; @@ -2786,8 +2736,8 @@ void suck_beam_draw_mesh(void) { suction_effect_texture_v_offset -= 7.0f; next_row_texture_u = row_texture_u + step; for (j = 0; j < 20; j++) { - qcopy(quad_packet.q[0], D_L00_001E6020 + (j * 16 + i * 0x140)); - qcopy(quad_packet.q[1], D_L00_001E6020 + ((j + 1) % 20 * 16 + i * 0x140)); + qcopy(quad_packet.q[0], (char *)suck_beam_rings + (j * 16 + i * 0x140)); + qcopy(quad_packet.q[1], (char *)suck_beam_rings + ((j + 1) % 20 * 16 + i * 0x140)); qcopy(quad_packet.q[2], D_L00_001E5EE0 + (j * 16 + i * 0x140)); qcopy(quad_packet.q[3], D_L00_001E5EE0 + ((j + 1) % 20 * 16 + i * 0x140)); fast_vec_sub(vc, quad_packet.q[0], quad_packet.q[1]); @@ -2800,8 +2750,8 @@ void suck_beam_draw_mesh(void) { } else { next_segment_texture_v = segment_texture_v + 0.05f; am = row_texture_u - step; - y = D_L00_001E6008[i - 1]; - row_alpha_counter = &D_L00_001E6008[i]; + y = suck_beam_ring_alphas[i - 1]; + row_alpha_counter = &suck_beam_ring_alphas[i]; row_alpha_or_packed_color = *row_alpha_counter; for (k = 0; k < 2; k++) { if (row_alpha_or_packed_color < 0) @@ -2837,11 +2787,11 @@ void suck_beam_draw_mesh(void) { vu1_add_g_sregister(0x47, 0x5360B); } -/* Sets suck_beam_reset_pending_gp and suck_beam_particles_reset_pending_gp to 1 and clears D_L00_001E6008. */ +/* Sets suck_beam_reset_pending_gp and suck_beam_particles_reset_pending_gp to 1 and clears suck_beam_ring_alphas. */ void FUN_L00_002ddca0(void) { suck_beam_reset_pending_gp = 1; suck_beam_particles_reset_pending_gp = 1; - (*(short *)D_L00_001E6008) = 0; + suck_beam_ring_alphas[0] = 0; } /* Ported from rac1-decomp (src/overlays/shared/vendor_002D9438.c: func_L00_002DF168), where it is exact; names translated to the US level program. */ @@ -2880,12 +2830,12 @@ void suck_beam_build(char *cannon_moby, char *suction_origin) { (char *)beam_initialization_vectors + 0x30, beam_initialization_vectors, D_L00_00161B84); fast_vec_normalize((char *)beam_initialization_vectors + 0x40, orientation_up_vector, 1.0f); qcopy(D_L00_001E5F40, suction_origin); - D_L00_001E6008[0] = 0; + suck_beam_ring_alphas[0] = 0; for (i = 1; i < 10; i++) { fast_vec_add(D_L00_001E5F40 + i * 0x10, l00_suck_beam_previous_segment_positions + i * 0x10, (char *)beam_initialization_vectors + 0x30); - D_L00_001E6008[i] = 0; + suck_beam_ring_alphas[i] = 0; } clear_u64_value(D_L00_00161B60); beam_initialization_vectors[5] = 0; @@ -2952,19 +2902,19 @@ void suck_beam_update(void *moby, void *position) { n = truncate_float_to_s32(vector_distance_xy(collision_hit_point, position) / D_L00_00161B84); for (i = n; i < 10; i++) { - if (D_L00_001E6008[i] > 64) - D_L00_001E6008[i] = 64; - D_L00_001E6008[i] = (u16)D_L00_001E6008[i] - 4; - if (D_L00_001E6008[i] < 0) - D_L00_001E6008[i] = 0; + if (suck_beam_ring_alphas[i] > 64) + suck_beam_ring_alphas[i] = 64; + suck_beam_ring_alphas[i] = (u16)suck_beam_ring_alphas[i] - 4; + if (suck_beam_ring_alphas[i] < 0) + suck_beam_ring_alphas[i] = 0; } for (k = n - 1; k >= 0; k--) - D_L00_001E6008[k] = D_L00_001E6008[k + 1] + 32; + suck_beam_ring_alphas[k] = suck_beam_ring_alphas[k + 1] + 32; } else { int i; - D_L00_001E6008[0] = (u16)D_L00_001E6008[0] + 4; + suck_beam_ring_alphas[0] = (u16)suck_beam_ring_alphas[0] + 4; for (i = 1; i < 10; i++) - D_L00_001E6008[i] = D_L00_001E6008[i - 1] - 32; + suck_beam_ring_alphas[i] = suck_beam_ring_alphas[i - 1] - 32; } transform_vector_by_basis(&start, &(*(V41 *)D_L00_00161B60), orientation); fast_vec_add(&start, &start, &step); @@ -3003,7 +2953,7 @@ void suck_beam_update(void *moby, void *position) { for (k = 0; k < 20; k++) { fast_vec_scale(&tmp_a, &l00_suck_beam_ring_source_offsets[k], 0.1f); transform_vector_by_basis(&tmp_a, &tmp_a, frame); - fast_vec_add(&((V41 *)D_L00_001E6020)[k], D_L00_001E5F40, &tmp_a); + fast_vec_add(&((V41 *)suck_beam_rings)[k], D_L00_001E5F40, &tmp_a); } } { @@ -3052,8 +3002,7 @@ void suck_beam_update(void *moby, void *position) { 0.1f; fast_vec_scale(&tmp_f, &l00_suck_beam_ring_source_offsets[j], angle); transform_vector_by_basis(&tmp_f, &tmp_f, &interp); - fast_vec_add( - &((V41(*)[20])D_L00_001E6020)[i][j], D_L00_001E5F40 + i * 16, &tmp_f); + fast_vec_add(&suck_beam_rings[i][j], D_L00_001E5F40 + i * 16, &tmp_f); } } fast_vec_normalize(&step, &motion, D_L00_00161B84); @@ -3066,7 +3015,7 @@ void suck_beam_update(void *moby, void *position) { sparks = 0; for (i = 0; i < 200; i++) { if (!D_L00_001E4C80_lui[i].p && count < 5) { - for (segment = 9; segment >= 0 && D_L00_001E6008[segment] < 64; segment--) + for (segment = 9; segment >= 0 && suck_beam_ring_alphas[segment] < 64; segment--) ; if (segment > 0) { if (segment >= 2 && sparks < 2) { @@ -3074,7 +3023,7 @@ void suck_beam_update(void *moby, void *position) { int k = random_integer_below(20); V41 *ring; amount = random_float_between(0.2f, 1.0f); - ring = (V41 *)D_L00_001E6020 + k; + ring = (V41 *)suck_beam_rings + k; lerp_vector(&tmp_a, ring, ring + segment * 20, amount); } lerp_vector(&tmp_c, D_L00_001E5F40, D_L00_001E5F40 + segment * 16, amount); @@ -3168,8 +3117,8 @@ void suck_beam_update(void *moby, void *position) { &tmp_a); j = D_L00_001E4C80_lui[i].angle; fast_vec_sub(&tmp_b, - (char *)((V41 *)D_L00_001E6020) + - D_L00_001E4C80_lui[i].idx * 320 + j * 16, + (char *)suck_beam_rings + D_L00_001E4C80_lui[i].idx * 320 + + j * 16, D_L00_001E5F40 + D_L00_001E4C80_lui[i].idx * 16); fast_vec_sub(&tmp_c, (char *)((V41 *)D_L00_001E5EE0) + @@ -3179,8 +3128,8 @@ void suck_beam_update(void *moby, void *position) { interpolate_vector(&motion, &tmp_b, &tmp_c, amount); j = (j + 19) % 20; fast_vec_sub(&tmp_d, - (char *)((V41 *)D_L00_001E6020) + - D_L00_001E4C80_lui[i].idx * 320 + j * 16, + (char *)suck_beam_rings + D_L00_001E4C80_lui[i].idx * 320 + + j * 16, D_L00_001E5F40 + D_L00_001E4C80_lui[i].idx * 16); fast_vec_sub(&tmp_e, (char *)((V41 *)D_L00_001E5EE0) + @@ -3206,14 +3155,14 @@ void suck_beam_update(void *moby, void *position) { /* Ported from rac1-decomp (src/overlays/shared/vendor_002D9438.c: func_L00_002E0490), where it is exact; names translated to the US level program. */ -/* When D_L00_001E6008[0] > 0: caps the ten counters at 0x40, lowers each by 4, queues 002dd8e8. */ +/* When suck_beam_ring_alphas[0] > 0: caps the ten counters at 0x40, lowers each by 4, queues 002dd8e8. */ void suck_beam_queue_draw(int draw_callback_context) { int i; - if (D_L00_001E6008[0] > 0) { + if (suck_beam_ring_alphas[0] > 0) { for (i = 0; i < 10; i++) { - if (D_L00_001E6008[i] > 0x40) - D_L00_001E6008[i] = 0x40; - D_L00_001E6008[i] = (unsigned short)D_L00_001E6008[i] - 4; + if (suck_beam_ring_alphas[i] > 0x40) + suck_beam_ring_alphas[i] = 0x40; + suck_beam_ring_alphas[i] = (unsigned short)suck_beam_ring_alphas[i] - 4; } add_draw_callback(suck_beam_draw_mesh, draw_callback_context); } @@ -3269,7 +3218,7 @@ void scatter_moby_from_hazards(O_2df1e0 *pickup_moby) { return; if (!(fast_vec_dist(pickup_moby->v10, &hero.motion.pos) < 30.0f)) return; - for (i = 0; i < 10 && D_L00_001E6008[i] >= 8; i++) { + for (i = 0; i < 10 && suck_beam_ring_alphas[i] >= 8; i++) { beam_segment_collection_radius = i * 0.3f + 0.1f; if (beam_segment_collection_radius < 2.0f) beam_segment_collection_radius = 2.0f; @@ -3283,3 +3232,79 @@ void scatter_moby_from_hazards(O_2df1e0 *pickup_moby) { } } } + +s16 suck_beam_ring_alphas[SUCK_BEAM_RING_COUNT] = {0}; + +V41 suck_beam_rings[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L01_00200968[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L01_00200980[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L02_001D8AD8[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L02_001D8AF0[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L03_001D78D8[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L03_001D78F0[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L04_001D8718[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L04_001D8730[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L05_0020D248[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L05_0020D260[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L06_001DA1C8[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L06_001DA1E0[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L07_001DC188[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L07_001DC1A0[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L08_001EEAA8[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L08_001EEAC0[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L09_00205488[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L09_002054A0[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L10_001D9288[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L10_001D92A0[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L11_001D8E58[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L11_001D8E70[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L12_001FA828[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L12_001FA840[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L13_001D8E88[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L13_001D8EA0[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L14_001E5338[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L14_001E5350[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L15_001D8858[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L15_001D8870[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L16_001D7D78[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L16_001D7D90[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L17_001D8B78[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L17_001D8B90[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; + +s16 D_L18_001D8EB8[SUCK_BEAM_RING_COUNT] = {0}; + +V41 D_L18_001D8ED0[SUCK_BEAM_RING_COUNT][SUCK_BEAM_RING_VERTEX_COUNT] = {0}; From 456e36081c37372ba4c159237e3f43997ef8b7ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:11:46 +0000 Subject: [PATCH 031/213] decomp: name map header, screen stripe, vendor strip and missions text region fields --- src/rendering/effects/draw_screen_effect.c | 32 +++++++++---------- src/ui/map/draw_map_screen.c | 28 ++++++++-------- src/ui/menus/missions/draw_missions_menu2.c | 30 ++++++++--------- .../render_vendor_item_icon_strip_pass.c | 30 ++++++++--------- 4 files changed, 60 insertions(+), 60 deletions(-) diff --git a/src/rendering/effects/draw_screen_effect.c b/src/rendering/effects/draw_screen_effect.c index 54abe40c10..138675a3fb 100644 --- a/src/rendering/effects/draw_screen_effect.c +++ b/src/rendering/effects/draw_screen_effect.c @@ -5,12 +5,12 @@ struct Metrics { u8 pad0[4]; s32 color; u64 enable; - s32 unk10; - s32 unk14; - u64 unk18; - s32 unk20; - s32 unk24; - u64 unk28; + s32 stripe1_height; + s32 stripe1_color; + u64 stripe1_alpha; + s32 stripe2_height; + s32 stripe2_color; + u64 stripe2_alpha; }; extern struct Metrics *screen_color_effect_now __asm__("D_0015F350") __attribute__((sda)); @@ -49,36 +49,36 @@ void draw_screen_effect(void) { if (height > 0) { mask = 0xFF000000FFULL; do { - first_stripe_alpha_state = screen_color_effect_now->unk18; + first_stripe_alpha_state = screen_color_effect_now->stripe1_alpha; if (first_stripe_alpha_state != FIRST_STRIPE_ALPHA_STATE_SKIP_WRITE) { vu1_add_g_sregister(0x42, first_stripe_alpha_state & mask); } - first_stripe_color = screen_color_effect_now->unk14; + first_stripe_color = screen_color_effect_now->stripe1_color; if (first_stripe_color & 0xFF000000) { draw_rect_overlay(i, - (i + screen_color_effect_now->unk10 < height - 1) - ? i + screen_color_effect_now->unk10 + (i + screen_color_effect_now->stripe1_height < height - 1) + ? i + screen_color_effect_now->stripe1_height : height - 1, 0, fs_aa_buffer.display_width, (u64)((s64)first_stripe_color << 0x20) >> 0x20); } - i = i + screen_color_effect_now->unk10; - second_stripe_alpha_state = screen_color_effect_now->unk28; + i = i + screen_color_effect_now->stripe1_height; + second_stripe_alpha_state = screen_color_effect_now->stripe2_alpha; if (second_stripe_alpha_state != SECOND_STRIPE_ALPHA_STATE_SKIP_WRITE) { vu1_add_g_sregister(0x42, second_stripe_alpha_state & mask); } - second_stripe_color = screen_color_effect_now->unk24; + second_stripe_color = screen_color_effect_now->stripe2_color; if (second_stripe_color & 0xFF000000) { draw_rect_overlay(i, - (i + screen_color_effect_now->unk20 < height - 1) - ? i + screen_color_effect_now->unk20 + (i + screen_color_effect_now->stripe2_height < height - 1) + ? i + screen_color_effect_now->stripe2_height : height - 1, 0, fs_aa_buffer.display_width, (u64)((s64)second_stripe_color << 0x20) >> 0x20); } - i = i + screen_color_effect_now->unk20; + i = i + screen_color_effect_now->stripe2_height; } while (i < height); } } diff --git a/src/ui/map/draw_map_screen.c b/src/ui/map/draw_map_screen.c index 5d67484f73..3b79262faa 100644 --- a/src/ui/map/draw_map_screen.c +++ b/src/ui/map/draw_map_screen.c @@ -12,13 +12,13 @@ #include "rnc/ui/menus/menu_globals.h" struct MapHdr { - s32 unk0; - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - s32 unk14; - s32 unk18; + s32 mask_offset; + s32 coverage_offset; + s32 pixels_offset; + s32 palette_offset; + s32 tex0_offset; + s32 tex1_offset; + s32 tex2_offset; }; struct MapEntry { @@ -142,19 +142,19 @@ s32 draw_map_screen(struct MenuScreen *screen) { } decompress_wad(level_map_selection.slot[slot], level_map_selection.hdr); hdr = level_map_selection.hdr; - pix = (u8 *)hdr + hdr->unk8; - pal = (u8 *)hdr + hdr->unkC; + pix = (u8 *)hdr + hdr->pixels_offset; + pal = (u8 *)hdr + hdr->palette_offset; map_mask_buffer = acquire_menu_stream_buffer(0); if (map_mask_buffer != 0) { map_header_base = (u8 *)level_map_selection.hdr; - a = map_header_base + hdr->unk0 + 8; + a = map_header_base + hdr->mask_offset + 8; if (level_map_selection.level == current_level_index) { compose_bitmap_from_mask(pal, pix, pal, level_map_selection.mask); } else { if (level_visit_state[level_map_selection.level] != 0) { load_map_chunk(map_mask_buffer, map_coverage_pages + (level_map_selection.level << 11), - map_header_base + hdr->unk4); + map_header_base + hdr->coverage_offset); } else { decode_map_mask(map_mask_buffer, a, a, map_header_base); } @@ -163,9 +163,9 @@ s32 draw_map_screen(struct MenuScreen *screen) { } if (!(screen->data.raw.unk34 & 0x80)) { tbase = (u8 *)level_map_selection.hdr; - texture_block_base = tbase + hdr->unk10; - b = tbase + hdr->unk14 + 0x420; - tex2_pixels = tbase + hdr->unk18 + 0x420; + texture_block_base = tbase + hdr->tex0_offset; + b = tbase + hdr->tex1_offset + 0x420; + tex2_pixels = tbase + hdr->tex2_offset + 0x420; level_map_selection.tex0 = register_8bit_texture(7, 7, texture_block_base + 0x20, diff --git a/src/ui/menus/missions/draw_missions_menu2.c b/src/ui/menus/missions/draw_missions_menu2.c index 958fdd9fce..fd9515de01 100644 --- a/src/ui/menus/missions/draw_missions_menu2.c +++ b/src/ui/menus/missions/draw_missions_menu2.c @@ -5,25 +5,25 @@ struct MissionsMenu { u8 pad_0[0x20]; - s32 unk20; - s32 unk24; + s32 width; + s32 height; u8 pad28[0x8]; s32 sel[1]; }; struct Rect { - u16 unk00; + u16 top; u16 bottom; - u16 unk04; + u16 left; u16 right; - s16 unk08; + s16 anchor_x; s16 anchor_y; - s16 unk0C; - s16 unk0E; - u16 unk10; + s16 measured_width; + s16 rendered_height; + u16 line_advance; u16 flags; - s16 unk14; - s16 unk16; + s16 subpixel_x_sixteenths; + s16 subpixel_y_sixteenths; }; extern void setup_gif_paging(s32) __asm__("func_001F4280"); @@ -73,7 +73,7 @@ s32 draw_missions_menu2(struct MissionsMenu *menu) { wrapped_text_result = font_print_wrapped_small(0x10, mission_text_y, - menu->unk20 - 0x11, + menu->width - 0x11, 0x3E8, col, get_help_message_text(*mission_id_cursor), @@ -94,11 +94,11 @@ s32 draw_missions_menu2(struct MissionsMenu *menu) { } if (mask < 0) { memset(&text_region_settings, 0, 0x18); - text_region_settings.bottom = menu->unk24; - text_region_settings.right = menu->unk20; - text_region_settings.unk08 = menu->unk24 >> 1; + text_region_settings.bottom = menu->height; + text_region_settings.right = menu->width; + text_region_settings.anchor_x = menu->height >> 1; text_region_settings.anchor_y = mission_text_y + 8; - text_region_settings.unk10 = 0x10; + text_region_settings.line_advance = 0x10; text_region_settings.flags = 1; trailing_text_region = text_region_settings; font_print_window_small( diff --git a/src/ui/vendor/render_vendor_item_icon_strip_pass.c b/src/ui/vendor/render_vendor_item_icon_strip_pass.c index c0d76922b4..992b048e26 100644 --- a/src/ui/vendor/render_vendor_item_icon_strip_pass.c +++ b/src/ui/vendor/render_vendor_item_icon_strip_pass.c @@ -3,18 +3,18 @@ struct HudMenuState { u8 pad_0[0x4]; - s32 unk4; + s32 frames; u8 pad_8[0x44]; - s32 unk4C; + s32 scroll; u8 pad_50[0x8]; - s32 unk58; + s32 cursor; u8 pad_5C[0x1B4]; s32 selection_entry_count; }; struct HudItemEntry { u8 pad_0[0x38]; - u16 unk38; + u16 icon; }; extern struct HudMenuState D_001E63C0; @@ -43,9 +43,9 @@ void render_vendor_item_icon_strip_pass(void) { if (D_001E63C0.selection_entry_count < 8) { sprite_x = 0xC; item_index = 0; - slot_x = D_001E63C0.unk58 * 0x38; + slot_x = D_001E63C0.cursor * 0x38; fill_color = - ((SubtractIntegerWithClamp(((D_001E63C0.unk4 * 4) & 0x3F) - 0x20) + 0x40) * 0x10202) | + ((SubtractIntegerWithClamp(((D_001E63C0.frames * 4) & 0x3F) - 0x20) + 0x40) * 0x10202) | 0x80000000; draw_framebuffer_rect(slot_x + 8, 2, slot_x + 0x40, 0x3A, 0x200, 0x80, fill_color); draw_framebuffer_rect(slot_x + 0xA, 4, slot_x + 0x3E, 0x38, 0x200, 0x80, 0x80000000); @@ -56,7 +56,7 @@ void render_vendor_item_icon_strip_pass(void) { item_icon = ((struct HudItemEntry *)(void *)((u8 *)((u8 *)menu_item_info) + selection_purchase_kind_ptr[-1] * 0x4C)) - ->unk38; + ->icon; if (selection_purchase_kind_ptr[0] == 1) { frame_index = get_icon_frame(item_icon, 2); } else { @@ -68,10 +68,10 @@ void render_vendor_item_icon_strip_pass(void) { } while (item_index < D_001E63C0.selection_entry_count); } } else { - if (D_001E63C0.unk4C < 0) { - D_001E63C0.unk4C = (s32)(D_001E63C0.unk4C + 4); - } else if (D_001E63C0.unk4C > 0) { - D_001E63C0.unk4C = (s32)(D_001E63C0.unk4C - 4); + if (D_001E63C0.scroll < 0) { + D_001E63C0.scroll = (s32)(D_001E63C0.scroll + 4); + } else if (D_001E63C0.scroll > 0) { + D_001E63C0.scroll = (s32)(D_001E63C0.scroll - 4); } else { draw_framebuffer_rect( 0xB0, @@ -80,15 +80,15 @@ void render_vendor_item_icon_strip_pass(void) { 0x3A, 0x200, 0x80, - ((SubtractIntegerWithClamp(((D_001E63C0.unk4 * 4) & 0x3F) - 0x20) + 0x40) * + ((SubtractIntegerWithClamp(((D_001E63C0.frames * 4) & 0x3F) - 0x20) + 0x40) * 0x10202) - (s32)0x80000000); draw_framebuffer_rect(0xB2, 4, 0xE6, 0x38, 0x200, 0x80, 0x80000000); } - strip_x = D_001E63C0.unk4C - 0x64; + strip_x = D_001E63C0.scroll - 0x64; slot = -2; do { - first_slot = D_001E63C0.unk58 - 3; + first_slot = D_001E63C0.cursor - 3; entry_offset = ((s32)((D_001E63C0.selection_entry_count * 2) + slot + first_slot) % (s32)D_001E63C0.selection_entry_count) * 0x14; @@ -96,7 +96,7 @@ void render_vendor_item_icon_strip_pass(void) { *(s32 *)(void *)(entry_offset + ((u8 *)&D_001E63C0 + 0xD0)) * 0x4C)) - ->unk38; + ->icon; if (*(s32 *)(void *)(entry_offset + ((u8 *)&D_001E63C0 + 0xD4)) == 1) { strip_frame = get_icon_frame(icon, 2); } else { From b7813e93520c0193fb29b926cd6af5a6847c9f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:13:40 +0000 Subject: [PATCH 032/213] decomp: name sound definition range, pitch and loop fields --- include/rnc/game/startlevel.h | 10 +++++----- src/game/startlevel.c | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/rnc/game/startlevel.h b/include/rnc/game/startlevel.h index d12e8491e6..27f0834943 100644 --- a/include/rnc/game/startlevel.h +++ b/include/rnc/game/startlevel.h @@ -6,13 +6,13 @@ /* A sound definition, 0x20 bytes (MobyClass.sound_defs entries); startlevel fills in the bank loaded from disc_table.sound_bank. */ typedef struct { - s32 unk0; - f32 unk4; /* 0x04: 128.0f in every boot definition */ + s32 min_range; /* 0x00 */ + f32 max_range; /* 0x04: 128.0f in every boot definition */ s32 far_volume; /* 0x08: calculate_voice_distance_volume */ s32 near_volume; /* 0x0C */ - s32 unk10; - s32 unk14; - u8 unk18; + s32 min_pitch; /* 0x10 */ + s32 max_pitch; /* 0x14 */ + u8 loop; /* 0x18 */ u8 attenuation_flags; /* 0x19: bit 0 = quadratic distance falloff, else linear */ s16 sound; /* 0x1A: sound index (sound_update) */ s32 bank; /* 0x1C: bank handle */ diff --git a/src/game/startlevel.c b/src/game/startlevel.c index ef747040d0..b5216e6288 100644 --- a/src/game/startlevel.c +++ b/src/game/startlevel.c @@ -212,21 +212,21 @@ void startlevel(void) { extern __typeof__(startlevel) func_001E9658 __attribute__((alias("FUN_001e9658"))); volatile SoundDef l00_primary_sound_defs[7] = { - {.unk4 = 128.0f, .near_volume = 0x400, .sound = 0}, - {.unk4 = 128.0f, .near_volume = 0x400, .sound = 0}, - {.unk4 = 128.0f, .near_volume = 0x400, .sound = 8}, - {.unk4 = 128.0f, .near_volume = 0x400, .sound = 9}, - {.unk4 = 128.0f, .near_volume = 0x400, .sound = 2}, - {.unk4 = 128.0f, .near_volume = 0x400, .sound = 3}, - {.unk4 = 128.0f, .near_volume = 0x400, .sound = 4}, + {.max_range = 128.0f, .near_volume = 0x400, .sound = 0}, + {.max_range = 128.0f, .near_volume = 0x400, .sound = 0}, + {.max_range = 128.0f, .near_volume = 0x400, .sound = 8}, + {.max_range = 128.0f, .near_volume = 0x400, .sound = 9}, + {.max_range = 128.0f, .near_volume = 0x400, .sound = 2}, + {.max_range = 128.0f, .near_volume = 0x400, .sound = 3}, + {.max_range = 128.0f, .near_volume = 0x400, .sound = 4}, }; volatile SoundDef boot_sound_defs_b[5] = { - {.unk4 = 128.0f, .near_volume = 0x400, .sound = 0}, - {.unk4 = 128.0f, .near_volume = 0x400, .sound = 1}, - {.unk4 = 128.0f, .near_volume = 0x400, .sound = 5}, - {.unk4 = 128.0f, .near_volume = 0x400, .sound = 6}, - {.unk4 = 128.0f, .near_volume = 0x400, .sound = 7}, + {.max_range = 128.0f, .near_volume = 0x400, .sound = 0}, + {.max_range = 128.0f, .near_volume = 0x400, .sound = 1}, + {.max_range = 128.0f, .near_volume = 0x400, .sound = 5}, + {.max_range = 128.0f, .near_volume = 0x400, .sound = 6}, + {.max_range = 128.0f, .near_volume = 0x400, .sound = 7}, }; s32 boot_image_buffer __asm__("D_0015EF5C") MACRO_ADDR = 0; From 11b95036c8c132184d694e58af9a6c8ec8d55774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:05:15 +0000 Subject: [PATCH 033/213] decomp: name bomb, bomber tank, rocket and emitter fields in level 8 --- src/overlays/l08/mobys/bomb.c | 51 ++++++++++---------- src/overlays/l08/mobys/bomber_tank.c | 4 +- src/overlays/l08/mobys/bomber_tank_bomb.c | 8 +-- src/overlays/l08/mobys/effect_emitter.c | 26 +++++----- src/overlays/l08/mobys/path_following_moby.c | 40 ++++++++------- src/overlays/l08/mobys/rocket.c | 24 ++++----- 6 files changed, 79 insertions(+), 74 deletions(-) diff --git a/src/overlays/l08/mobys/bomb.c b/src/overlays/l08/mobys/bomb.c index cb5938b404..5572e6258a 100644 --- a/src/overlays/l08/mobys/bomb.c +++ b/src/overlays/l08/mobys/bomb.c @@ -89,15 +89,15 @@ typedef struct Moby248Vars { u8 pad_0[0x7]; u8 fuse_flash_target_red; u8 pad_8[0x8]; - u8 unk10; + u8 velocity; u8 pad_11[0x7]; - f32 unk18; + f32 velocity_z; u8 pad_1C[0x4]; s32 timer_20; - s32 unk24; - f32 unk28; + s32 bounce_count; + f32 fuse_flash_step; u8 pad_2C[0x4]; - s32 unk30; + s32 thrower; } Moby248Vars; /* Moby class 248 */ @@ -122,15 +122,16 @@ void moby_248_update(char *moby) { if (coll_sphere(0.5f, moby + 0x10, 0x11, moby)) { int sphere_hit_moby = D_L08_00174658_lui; if (sphere_hit_moby != 0 && - (sphere_hit_moby != bomb_vars->unk30 || bomb_vars->unk24 != 0)) { + (sphere_hit_moby != bomb_vars->thrower || bomb_vars->bounce_count != 0)) { if (!(MOBY(moby)->command & 2)) MOBY(moby)->state = BOMB_STATE_EXPLODE_AND_REMOVE; else MOBY(moby)->state = BOMB_STATE_BURST_AND_REMOVE; qcopy((moby + 0x10), ((char *)D_L08_00174660)); FUN_L00_001ff660_c( - &bomb_vars->unk10, &bomb_vars->unk10, ((char *)D_L08_00174660) + 0x20); - fast_vec_normalize(&bomb_vars->unk10, &bomb_vars->unk10, D_0015ED6C + D_0015ED6C); + &bomb_vars->velocity, &bomb_vars->velocity, ((char *)D_L08_00174660) + 0x20); + fast_vec_normalize( + &bomb_vars->velocity, &bomb_vars->velocity, D_0015ED6C + D_0015ED6C); } } } @@ -140,9 +141,9 @@ void moby_248_update(char *moby) { switch (st) { case BOMB_STATE_MOVING: { float velocity_magnitude; - velocity_magnitude = fast_vec_length((&bomb_vars->unk10)); + velocity_magnitude = fast_vec_length((&bomb_vars->velocity)); MOBY(moby)->rot.x = fast_add_rotations(MOBY(moby)->rot.x, velocity_magnitude * 0.5f); - if (bomb_vars->unk24 == 0) { + if (bomb_vars->bounce_count == 0) { float lo = -1.0f; float hi = 1.0f; int *selected_table_entry; @@ -166,27 +167,27 @@ void moby_248_update(char *moby) { qcopy(c.r.start, moby + 0x10); collision_z_offset = 0.16f; c.r.start[2] -= collision_z_offset; - fast_vec_add((moby + 0x10), (moby + 0x10), (&bomb_vars->unk10)); - bomb_vars->unk18 -= bomb_downward_acceleration_gp * D_0015ED70_gp; + fast_vec_add((moby + 0x10), (moby + 0x10), (&bomb_vars->velocity)); + bomb_vars->velocity_z -= bomb_downward_acceleration_gp * D_0015ED70_gp; qcopy(c.r.end, moby + 0x10); c.r.end[2] -= collision_z_offset; c.r.x.moby = moby; c.r.x.flags = 0x810000; c.r.x.st = st; c.r.x.f = 1.0f; - qcopy(c.r.x.v, &bomb_vars->unk10); + qcopy(c.r.x.v, &bomb_vars->velocity); if (collision_line(c.r.start, c.r.end, 0, moby, 0)) { char *collision_result = (char *)&D_L08_00174640; int v = *(int *)(collision_result + 0x18); if (v != 0) { - if (v != bomb_vars->unk30 || bomb_vars->unk24 != 0) { + if (v != bomb_vars->thrower || bomb_vars->bounce_count != 0) { if (!(MOBY(moby)->command & 2)) MOBY(moby)->state = BOMB_STATE_EXPLODE_AND_REMOVE; else MOBY(moby)->state = BOMB_STATE_BURST_AND_REMOVE; qcopy((moby + 0x10), ((char *)D_L08_00174660)); { - char *v = &bomb_vars->unk10; + char *v = &bomb_vars->velocity; FUN_L00_001ff660_c(v, v, ((char *)D_L08_00174660) + 0x20); fast_vec_normalize(v, v, D_0015ED6C + D_0015ED6C); } @@ -198,33 +199,33 @@ void moby_248_update(char *moby) { qcopy((moby + 0x10), collision_result + 0x20); MOBY(moby)->pos.z += collision_z_offset; FUN_L00_001ff660_c( - (&bomb_vars->unk10), (&bomb_vars->unk10), collision_result + 0x40); + (&bomb_vars->velocity), (&bomb_vars->velocity), collision_result + 0x40); fast_vec_cross( - &table_or_bounce_scratch, (&bomb_vars->unk10), collision_result + 0x40); + &table_or_bounce_scratch, (&bomb_vars->velocity), collision_result + 0x40); k = D_0015ED6C * 1.5f; fast_vec_normalize(&table_or_bounce_scratch, &table_or_bounce_scratch, random_float_between(-k, k)); fast_vec_add( - (&bomb_vars->unk10), (&bomb_vars->unk10), &table_or_bounce_scratch); - fast_vec_scale((&bomb_vars->unk10), (&bomb_vars->unk10), 0.4f); - bomb_vars->unk24 += 1; + (&bomb_vars->velocity), (&bomb_vars->velocity), &table_or_bounce_scratch); + fast_vec_scale((&bomb_vars->velocity), (&bomb_vars->velocity), 0.4f); + bomb_vars->bounce_count += 1; bomb_vars->timer_20 = scale_game_frames(0xB4); - if (fast_vec_length((&bomb_vars->unk10)) < D_0015ED6C) { + if (fast_vec_length((&bomb_vars->velocity)) < D_0015ED6C) { int r; MOBY(moby)->state = two; r = scale_game_frames(0x78); bomb_vars->timer_20 = r; - bomb_vars->unk28 = 254.0f / (float)r; - clear_u64_value((&bomb_vars->unk10)); + bomb_vars->fuse_flash_step = 254.0f / (float)r; + clear_u64_value((&bomb_vars->velocity)); } } else { MOBY(moby)->state = BOMB_STATE_EXPLODE_AND_REMOVE; qcopy((moby + 0x10), collision_result + 0x20); FUN_L00_001ff660_c( - (&bomb_vars->unk10), (&bomb_vars->unk10), collision_result + 0x40); + (&bomb_vars->velocity), (&bomb_vars->velocity), collision_result + 0x40); fast_vec_normalize( - (&bomb_vars->unk10), (&bomb_vars->unk10), D_0015ED6C + D_0015ED6C); + (&bomb_vars->velocity), (&bomb_vars->velocity), D_0015ED6C + D_0015ED6C); } } } else if (fast_dec_timer(&bomb_vars->timer_20)) { diff --git a/src/overlays/l08/mobys/bomber_tank.c b/src/overlays/l08/mobys/bomber_tank.c index 5ad3803303..a2c0816e5b 100644 --- a/src/overlays/l08/mobys/bomber_tank.c +++ b/src/overlays/l08/mobys/bomber_tank.c @@ -116,7 +116,7 @@ typedef struct { u8 pad59; u8 unk5A; u8 pad5B[5]; - u8 unk60[0x90]; + u8 entity_matrix[0x90]; Moby *target; /* 0xF0 */ s32 mode; /* 0xF4 */ u8 padF8[8]; @@ -351,7 +351,7 @@ void bomber_tank_update(Moby *moby) { } } fast_vec_sub(velocity, &moby->pos, old_pos); - FUN_L00_00260738(bomber_tank_update_vars->unk60, velocity, &moby->rot, old_rot); + FUN_L00_00260738(bomber_tank_update_vars->entity_matrix, velocity, &moby->rot, old_rot); } /* Per-frame update of a batalia turret moby: damage, its death state and its two helper parts. */ diff --git a/src/overlays/l08/mobys/bomber_tank_bomb.c b/src/overlays/l08/mobys/bomber_tank_bomb.c index 64c2d8baff..bd9c517c9e 100644 --- a/src/overlays/l08/mobys/bomber_tank_bomb.c +++ b/src/overlays/l08/mobys/bomber_tank_bomb.c @@ -64,11 +64,11 @@ char *spawn_bomber_tank_bomb(char *source_moby, typedef struct BomberTankBombVars { u8 pad_0[0x10]; - s32 unk10; + s32 lifetime_timer; s32 unk14; u8 pad_18[0x4]; f32 unk1C; - char *unk20; + char *source_moby; } BomberTankBombVars; char *spawn_bomber_tank_bomb(char *source_moby, char *spawn_position, char *initial_velocity) { @@ -80,8 +80,8 @@ char *spawn_bomber_tank_bomb(char *source_moby, char *spawn_position, char *init MOBY(moby)->draw_dist = 0xFF; moby[0x31] = 1; moby[0x20] = 1; - projectile_vars->unk20 = source_moby; - projectile_vars->unk10 = scale_game_frames(0x12C); + projectile_vars->source_moby = source_moby; + projectile_vars->lifetime_timer = scale_game_frames(0x12C); projectile_vars->unk1C = 1.0f; projectile_vars->unk14 = 0; qcopy(moby + 0x10, spawn_position); diff --git a/src/overlays/l08/mobys/effect_emitter.c b/src/overlays/l08/mobys/effect_emitter.c index 727a67db2b..6cbfc7a1ba 100644 --- a/src/overlays/l08/mobys/effect_emitter.c +++ b/src/overlays/l08/mobys/effect_emitter.c @@ -16,15 +16,15 @@ void effect_emitter_update(struct Moby *moby) __asm__("FUN_L08_00308c90"); typedef struct EffectEmitterVars { u8 pad_0[0x4]; - f32 unk4; + f32 half_width; u8 pad_8[0x4]; f32 unkC; s32 unk10; - s32 unk14; - f32 unk18; - f32 unk1C; - f32 unk20; - f32 unk24; + s32 count_per_frame; + f32 min_speed_y; + f32 max_speed_y; + f32 min_speed_z; + f32 max_speed_z; } EffectEmitterVars; /* Moby class 1641 */ @@ -34,20 +34,20 @@ void effect_emitter_update(struct Moby *moby) { float rotation_basis[12]; float effect_direction[4]; int i; - for (i = 0; i < effect_spawn_settings->unk14; i++) { + for (i = 0; i < effect_spawn_settings->count_per_frame; i++) { effect_position[0] = -1.0f; - effect_position[1] = - random_float_between(-effect_spawn_settings->unk4, effect_spawn_settings->unk4); + effect_position[1] = random_float_between(-effect_spawn_settings->half_width, + effect_spawn_settings->half_width); effect_position[2] = 0; effect_position[3] = 1.0f; euler_rotation_basis(rotation_basis, &moby->rot); transform_vector_by_basis(effect_position, effect_position, rotation_basis); fast_vec_add(effect_position, effect_position, &moby->pos); effect_direction[0] = 0; - effect_direction[1] = random_float_between(effect_spawn_settings->unk18 * frame_time, - effect_spawn_settings->unk1C * frame_time); - effect_direction[2] = random_float_between(effect_spawn_settings->unk20 * frame_time, - effect_spawn_settings->unk24 * frame_time); + effect_direction[1] = random_float_between(effect_spawn_settings->min_speed_y * frame_time, + effect_spawn_settings->max_speed_y * frame_time); + effect_direction[2] = random_float_between(effect_spawn_settings->min_speed_z * frame_time, + effect_spawn_settings->max_speed_z * frame_time); effect_direction[3] = 0; spawn_effect_with_initial_motion(effect_position, effect_direction, diff --git a/src/overlays/l08/mobys/path_following_moby.c b/src/overlays/l08/mobys/path_following_moby.c index 2788d966d9..94ddf15841 100644 --- a/src/overlays/l08/mobys/path_following_moby.c +++ b/src/overlays/l08/mobys/path_following_moby.c @@ -99,12 +99,12 @@ int moby_motion_spark_second_color_end_gp __asm__("D_L08_00161A80") = 0x20601020 typedef struct PathFollowingMobyVars { u8 pad_0[0x4]; - f32 unk4; - f32 unk8; - f32 unkC; - u8 unk10; + f32 path_progress; + f32 path_progress_step; + f32 height_offset; + u8 falling_velocity; u8 pad_11[0x7]; - f32 unk18; + f32 falling_velocity_z; } PathFollowingMobyVars; /* Moby class 438 */ @@ -131,21 +131,23 @@ void path_following_moby_update(char *moby) { float first_path_segment_length = fast_vec_dist((char *)path + 0x10, (char *)path + 0x20); fast_vec_dist((char *)path + 0x10, (char *)path + (*path << 4)); - moby_vars->unk8 = path_following_moby_speed_gp * D_0015ED6C / first_path_segment_length; - moby_vars->unk4 = moby_vars->unk4 * (float)*path; - moby_vars->unkC = randf_sym(0.0f, 5.0f); + moby_vars->path_progress_step = + path_following_moby_speed_gp * D_0015ED6C / first_path_segment_length; + moby_vars->path_progress = moby_vars->path_progress * (float)*path; + moby_vars->height_offset = randf_sym(0.0f, 5.0f); } MOBY(moby)->state = MOBY_STATE_FOLLOW_PATH; MOBY(moby)->update_dist = 0xFF; case MOBY_STATE_FOLLOW_PATH: { float path_point_count; - sample_camera_path(path, 1, moby + 0x10, (float *)&MOBY(moby)->rot, 0, moby_vars->unk4); + sample_camera_path( + path, 1, moby + 0x10, (float *)&MOBY(moby)->rot, 0, moby_vars->path_progress); MOBY(moby)->rot.y = MOBY(moby)->rot.y * 0.5f; - MOBY(moby)->pos.z = MOBY(moby)->pos.z + moby_vars->unkC; - moby_vars->unk4 = moby_vars->unk4 + moby_vars->unk8; + MOBY(moby)->pos.z = MOBY(moby)->pos.z + moby_vars->height_offset; + moby_vars->path_progress = moby_vars->path_progress + moby_vars->path_progress_step; path_point_count = (float)*path; - if (path_point_count < moby_vars->unk4) { - moby_vars->unk4 = moby_vars->unk4 - path_point_count; + if (path_point_count < moby_vars->path_progress) { + moby_vars->path_progress = moby_vars->path_progress - path_point_count; } break; } @@ -154,12 +156,14 @@ void path_following_moby_update(char *moby) { float falling_removal_height = 10.0f; float dd; float falling_rotation_step; - char *falling_velocity = &moby_vars->unk10; + char *falling_velocity = &moby_vars->falling_velocity; falling_rotation_step = D_0015ED6C * 7.3303828f; - moby_vars->unk18 = moby_vars->unk18 - D_0015ED70 * falling_gravity; + moby_vars->falling_velocity_z = + moby_vars->falling_velocity_z - D_0015ED70 * falling_gravity; dd = fast_add_rotations(MOBY(moby)->rot.x, falling_rotation_step); MOBY(moby)->rot.x = MOBY(moby)->rot.x + dd; - MOBY(moby)->rot.y = -fast_arc_tan(vector_length_xy(falling_velocity), moby_vars->unk18); + MOBY(moby)->rot.y = + -fast_arc_tan(vector_length_xy(falling_velocity), moby_vars->falling_velocity_z); fast_vec_add(moby_position, moby_position, falling_velocity); if (MOBY(moby)->pos.z < falling_removal_height) { mark_moby_for_removal(moby); @@ -204,8 +208,8 @@ void path_following_moby_update(char *moby) { queue_dialogue_message(0x53D6, -1); } fast_vec_sub(frame_displacement, moby + 0x10, previous_position); - qcopy(&moby_vars->unk10, frame_displacement); - moby_vars->unk18 = moby_vars->unk18 + (D_0015ED6C + D_0015ED6C); + qcopy(&moby_vars->falling_velocity, frame_displacement); + moby_vars->falling_velocity_z = moby_vars->falling_velocity_z + (D_0015ED6C + D_0015ED6C); spawn_explosion(moby, frame_displacement, moby + 0x10, diff --git a/src/overlays/l08/mobys/rocket.c b/src/overlays/l08/mobys/rocket.c index f8e96fbcdf..ad03878645 100644 --- a/src/overlays/l08/mobys/rocket.c +++ b/src/overlays/l08/mobys/rocket.c @@ -548,12 +548,12 @@ struct Moby *spawn_rocket(void *pos, typedef struct RocketVars { u8 pad_0[0x20]; - u8 unk20; + u8 velocity; u8 pad_21[0x1F]; - f32 unk40; - f32 unk44; - f32 unk48; - struct Moby *unk4C; + f32 pitch; + f32 yaw; + f32 roll; + struct Moby *target; } RocketVars; struct Moby *spawn_rocket(void *pos, struct Moby *target, void *velocity, float pitch, float yaw) { @@ -581,11 +581,11 @@ struct Moby *spawn_rocket(void *pos, struct Moby *target, void *velocity, float moby->draw_dist = 0xFF; moby->scale = scale; set_moby_color(moby, rocket_color_red_gp, rocket_color_green_gp, rocket_color_blue_gp); - projectile_vars->unk40 = pitch; - projectile_vars->unk48 = 70.0f; - projectile_vars->unk44 = yaw; - projectile_vars->unk4C = target_copy; - qcopy(&projectile_vars->unk20, velocity_copy); + projectile_vars->pitch = pitch; + projectile_vars->roll = 70.0f; + projectile_vars->yaw = yaw; + projectile_vars->target = target_copy; + qcopy(&projectile_vars->velocity, velocity_copy); update_entity(moby); } return moby; @@ -600,7 +600,7 @@ void spawn_rocket_explosion_and_debris(char *moby, int transform_index, int spaw if (flag) { spawn_explosion(moby, - &rocket_vars->unk20, + &rocket_vars->velocity, moby + 0x10, 0.0f, 0.0f, @@ -619,7 +619,7 @@ void spawn_rocket_explosion_and_debris(char *moby, int transform_index, int spaw 0); } else { spawn_explosion(moby, - &rocket_vars->unk20, + &rocket_vars->velocity, moby + 0x10, 0.0f, 0.0f, From 7869e399826a28f6fedd6f6e98ab4a80d66e1797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:07:30 +0000 Subject: [PATCH 034/213] decomp: name refueling station and shuttle fields in level 9 --- src/overlays/l09/mobys/refueling_station.c | 19 ++++++++++--------- src/overlays/l09/mobys/shuttle.c | 11 ++++++----- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/overlays/l09/mobys/refueling_station.c b/src/overlays/l09/mobys/refueling_station.c index cae920979e..cc6b732f79 100644 --- a/src/overlays/l09/mobys/refueling_station.c +++ b/src/overlays/l09/mobys/refueling_station.c @@ -164,12 +164,12 @@ void handle_refueling_station_damage(struct Moby *moby, typedef struct RefuelingStationVars { u8 pad_0[0x20]; - u8 unk20; + u8 health; u8 pad_21[0x4F]; - s32 unk70; + s32 explosion_linked_moby_index; s16 timer_74; s16 removal_check_index; - s32 unk78; + s32 command_relay_moby_index; s32 voice; } RefuelingStationVars; @@ -178,7 +178,7 @@ void refueling_station_update(struct Moby *moby) { RefuelingStationVars *station_vars = (RefuelingStationVars *)moby->pvars; float explosion_offset[4]; unsigned char *removal_check_base; - handle_refueling_station_damage(moby, station_vars, &station_vars->unk20); + handle_refueling_station_damage(moby, station_vars, &station_vars->health); switch (moby->state) { case REFUELING_STATION_STATE_INITIALIZE: if (station_vars->removal_check_index != -1 && @@ -198,9 +198,9 @@ void refueling_station_update(struct Moby *moby) { } } if (moby->command == 1) { - if (station_vars->unk78 != -1) { - unsigned char *o = - (unsigned char *)((char *)moby_list + (station_vars->unk78 << 8)); + if (station_vars->command_relay_moby_index != -1) { + unsigned char *o = (unsigned char *)((char *)moby_list + + (station_vars->command_relay_moby_index << 8)); if (o[0x20] == 1) o[0xBC] = o[0x20]; } @@ -219,9 +219,10 @@ void refueling_station_update(struct Moby *moby) { break; case REFUELING_STATION_STATE_EXPLOSION_DELAY: if (fast_dec_timer_s16(&station_vars->timer_74)) { - if (station_vars->unk70 != -1) { + if (station_vars->explosion_linked_moby_index != -1) { unsigned char *o = - (unsigned char *)((char *)moby_list + (station_vars->unk70 << 8)); + (unsigned char *)((char *)moby_list + + (station_vars->explosion_linked_moby_index << 8)); if (o != 0 && o[0x20] != 0xFE && o[0x20] != 0xFD && (*(short *)(o + 0xA6) == 0x494 || *(short *)(o + 0xA6) == 0x49D || *(short *)(o + 0xA6) == 0x4A0)) { diff --git a/src/overlays/l09/mobys/shuttle.c b/src/overlays/l09/mobys/shuttle.c index 32a720d849..5b572b35a5 100644 --- a/src/overlays/l09/mobys/shuttle.c +++ b/src/overlays/l09/mobys/shuttle.c @@ -34,7 +34,7 @@ typedef struct { typedef struct { u8 pad0[0x70]; - u8 unk70[0x38]; + u8 manipulator_rotation[0x38]; /* 0x70: rotation of the manipulator attached at 0x60 */ f32 speed; s32 path; u8 padB0[8]; @@ -67,9 +67,9 @@ typedef struct { typedef struct { u8 pad0[0x70]; - u8 unk70[0x38]; - f32 speed; /* 0xA8 */ - s32 path; /* 0xAC: index into D_L09_001B0630 */ + u8 manipulator_rotation[0x38]; /* 0x70: rotation of the manipulator attached at 0x60 */ + f32 speed; /* 0xA8 */ + s32 path; /* 0xAC: index into D_L09_001B0630 */ u8 padB0[8]; s16 dir; /* 0xB8: > 0 runs the path forward, else backward */ s16 node; /* 0xBA: node being flown to */ @@ -308,7 +308,8 @@ int advance_shuttle_along_path(struct Moby *moby) { shuttle_path_state->yaw_offset = 0.0f; shuttle_path_state->spin = fast_add_rotations(shuttle_path_state->spin, shuttle_path_state->speed); - build_axis_rotation_quaternion(shuttle_path_state->unk70, 0, shuttle_path_state->spin); + build_axis_rotation_quaternion( + shuttle_path_state->manipulator_rotation, 0, shuttle_path_state->spin); if (vector_distance_xy(&moby->pos, &path->node[path->count - 1]) > 8.0f && vector_distance_xy(&moby->pos, &path->node[0]) > 8.0f && !random_integer_below(7)) { qcopy(&puff, &moby->pos); From 3bb4b9b21f04369b9a2b3ab080c30b83c1e052c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:07:30 +0000 Subject: [PATCH 035/213] decomp: name platform, linked hitbox, blarg ship and projectile fields in level 10 --- src/overlays/l10/mobys/blarg_ship.c | 43 ++++++------ src/overlays/l10/mobys/cycling_platform.c | 8 +-- .../l10/mobys/data_processor_linked_effect.c | 36 +++++----- .../l10/mobys/height_adjusted_projectile.c | 27 ++++---- src/overlays/l10/mobys/linked_moby_hitbox.c | 55 +++++++-------- src/overlays/l10/mobys/path_spark_effect.c | 6 +- src/overlays/l10/mobys/sinking_platform.c | 67 ++++++++++--------- src/overlays/l10/mobys/timed_effect_emitter.c | 8 +-- 8 files changed, 130 insertions(+), 120 deletions(-) diff --git a/src/overlays/l10/mobys/blarg_ship.c b/src/overlays/l10/mobys/blarg_ship.c index 017fa3f9bd..b26009cd99 100644 --- a/src/overlays/l10/mobys/blarg_ship.c +++ b/src/overlays/l10/mobys/blarg_ship.c @@ -510,18 +510,18 @@ void update_blarg_ship_hit_reactions_and_targeting(struct Moby *moby) __asm__("F typedef struct BlargShipVars { u8 pad_0[0x20]; - f32 unk20; + f32 health; u8 pad_24[0x2]; s16 unk26; u8 pad_28[0x98]; u8 anim_state; u8 pad_C1[0x6]; - u8 unkC7; + u8 damage_secondary_red; u8 pad_C8[0x8]; - u8 unkD0; + u8 path_search_point; u8 pad_D1[0x3F]; - s32 unk110; - s32 unk114; + s32 target; + s32 target_selection_status; u8 pad_118[0x78]; s32 path_190; } BlargShipVars; @@ -541,10 +541,10 @@ void update_blarg_ship_hit_reactions_and_targeting(struct Moby *moby) { int hit_response_code; dmg = 0.0f; hit_response_code = resolve_moby_hit_response( - moby, ship_hit_record, &pvars->unk20, 5, &ship_hit_processing_status, &dmg, 0, 4); + moby, ship_hit_record, &pvars->health, 5, &ship_hit_processing_status, &dmg, 0, 4); if (ship_hit_record != 0 && ship_hit_processing_status != HIT_STATUS_SKIP_DAMAGE_AND_REACTION && moby->state != BLARG_SHIP_STATE_EXPLODE) { - if ((pvars->unk20 -= dmg) <= 0.0f) { + if ((pvars->health -= dmg) <= 0.0f) { hit_response_code = 1; } if (*(int *)(ship_hit_record + 0x24) & 0x40000) { @@ -554,18 +554,18 @@ void update_blarg_ship_hit_reactions_and_targeting(struct Moby *moby) { case COLOR_UPDATE_ONLY_HIT_RESPONSE: case COLOR_UPDATE_WITHOUT_STATE_CHANGE_HIT_RESPONSE: case COLOR_EFFECT_ONLY_HIT_RESPONSE: - pvars->unkC7 = 0xFA; + pvars->damage_secondary_red = 0xFA; trooper_anim_update(moby, &pvars->anim_state); break; case LETHAL_HIT_RESPONSE: - pvars->unkC7 = 0xFA; + pvars->damage_secondary_red = 0xFA; trooper_anim_update(moby, &pvars->anim_state); moby->state = BLARG_SHIP_STATE_EXPLODE; break; case NO_REACTION_HIT_RESPONSE: break; default: - pvars->unkC7 = 0xFA; + pvars->damage_secondary_red = 0xFA; pvars->unk26 = scale_game_frames(0x3C); trooper_anim_update(moby, &pvars->anim_state); blend_moby_animation(moby, 4, 0, scale_game_frames(6)); @@ -577,27 +577,28 @@ void update_blarg_ship_hit_reactions_and_targeting(struct Moby *moby) { moby->hit_slot = 0xFF; trooper_anim_finish(moby, &pvars->anim_state); if (hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK) { - select_hero_or_gadgebot_target(101.0f, moby, &pvars->unk110); - if (*(char **)&pvars->unk110 == 0) { - pvars->unk114 = 2; + select_hero_or_gadgebot_target(101.0f, moby, &pvars->target); + if (*(char **)&pvars->target == 0) { + pvars->target_selection_status = 2; } else { char *path = ((char *)l10_paths[pvars->path_190]); - if (point_in_path_xy(*(char **)&pvars->unk110 + 0x10, path + 0x10, *(int *)path) == 0) { - pvars->unk110 = 0; - pvars->unk114 = 2; + if (point_in_path_xy(*(char **)&pvars->target + 0x10, path + 0x10, *(int *)path) == 0) { + pvars->target = 0; + pvars->target_selection_status = 2; } else { - pvars->unk114 = 0; + pvars->target_selection_status = 0; } } } else { char *path = ((char *)l10_paths[pvars->path_190]); - if (follow_5968(101.0f, moby, &pvars->unkD0, 0, 0, path + 0x10, *(int *)path) != 2 && + if (follow_5968(101.0f, moby, &pvars->path_search_point, 0, 0, path + 0x10, *(int *)path) != + 2 && moby->visible == 0) { - pvars->unk114 = 2; + pvars->target_selection_status = 2; } } - if (pvars->unk110 == 0) { - pvars->unk110 = (int)hero.moby; + if (pvars->target == 0) { + pvars->target = (int)hero.moby; } } diff --git a/src/overlays/l10/mobys/cycling_platform.c b/src/overlays/l10/mobys/cycling_platform.c index 2fa829a836..038a2be527 100644 --- a/src/overlays/l10/mobys/cycling_platform.c +++ b/src/overlays/l10/mobys/cycling_platform.c @@ -26,7 +26,7 @@ typedef struct CyclingPlatformVars { u8 pad_29[0x15]; s16 unk3E; u8 pad_40[0x60]; - f32 unkA0[4]; + f32 home_position[4]; s32 timer_B0; } CyclingPlatformVars; @@ -53,13 +53,13 @@ void cycling_platform_update(char *platform_moby) { platform_vars->unk3E = 5; platform_vars->unk20 = 0; platform_vars->unk24 = 0; - *(OvlQuad *)&platform_vars->unkA0[0] = *(OvlQuad *)&MOBY(platform_moby)->pos; + *(OvlQuad *)&platform_vars->home_position[0] = *(OvlQuad *)&MOBY(platform_moby)->pos; platform_moby[0x20] = 1; break; case PLATFORM_STATE_RISING: { float lim; MOBY(platform_moby)->pos.z = MOBY(platform_moby)->pos.z + 1.5f / scale_time(45.0f); - lim = platform_vars->unkA0[2] + 1.5f; + lim = platform_vars->home_position[2] + 1.5f; if (lim <= MOBY(platform_moby)->pos.z) { MOBY(platform_moby)->pos.z = lim; platform_moby[0x20] = 2; @@ -76,7 +76,7 @@ void cycling_platform_update(char *platform_moby) { case PLATFORM_STATE_DESCENDING: { float lim; MOBY(platform_moby)->pos.z = MOBY(platform_moby)->pos.z - 1.5f / scale_time(45.0f); - lim = platform_vars->unkA0[2]; + lim = platform_vars->home_position[2]; if (MOBY(platform_moby)->pos.z <= lim) { MOBY(platform_moby)->pos.z = lim; platform_moby[0x20] = 4; diff --git a/src/overlays/l10/mobys/data_processor_linked_effect.c b/src/overlays/l10/mobys/data_processor_linked_effect.c index c219e692c7..458fb60b3b 100644 --- a/src/overlays/l10/mobys/data_processor_linked_effect.c +++ b/src/overlays/l10/mobys/data_processor_linked_effect.c @@ -49,10 +49,10 @@ void data_processor_linked_effect_update(struct Moby *moby) __asm__("FUN_L10_002 typedef struct DataProcessorLinkedEffectVars { u8 pad_0[0x4]; - s32 unk4; - f32 unk8; - s32 unkC; - u8 unk10; + s32 strip_count; + f32 strip_height; + s32 processor_moby_index; + u8 strip_order; u8 pad_11[0x1F]; s32 voice; s32 timer_34; @@ -69,7 +69,7 @@ void data_processor_linked_effect_update(struct Moby *moby) { float position1[4]; int pass, i, copy_index; - if (linked_effect_vars->unkC == -1) { + if (linked_effect_vars->processor_moby_index == -1) { debug_print(l10_data_processor_linked_effect_missing_processor_link_message); debug_print(l10_data_processor_linked_effect_deleted_instance_message, *(short *)&moby->save_id); @@ -90,12 +90,12 @@ void data_processor_linked_effect_update(struct Moby *moby) { } } copy_index = 0; - if (linked_effect_vars->unk4 > 0) { - char *dest = &linked_effect_vars->unk10; + if (linked_effect_vars->strip_count > 0) { + char *dest = &linked_effect_vars->strip_order; do { dest[copy_index] = scratch.order[copy_index]; copy_index++; - } while (copy_index < linked_effect_vars->unk4); + } while (copy_index < linked_effect_vars->strip_count); } { float timer; @@ -112,7 +112,8 @@ void data_processor_linked_effect_update(struct Moby *moby) { break; case MOBY_STATE_ACTIVE_WITH_SOUND: { float half_height, half_width, radius_squared; - half_height = (float)linked_effect_vars->unk4 * linked_effect_vars->unk8 * 0.5f; + half_height = + (float)linked_effect_vars->strip_count * linked_effect_vars->strip_height * 0.5f; half_width = *(float *)linked_effect_vars * 0.5f; *(OvlQuad *)position1 = *(OvlQuad *)&moby->pos; radius_squared = half_height * half_height; @@ -136,7 +137,8 @@ void data_processor_linked_effect_update(struct Moby *moby) { release_voice_slot(voice); } linked_effect_vars->voice = -1; - half_height = (float)linked_effect_vars->unk4 * linked_effect_vars->unk8 * 0.5f; + half_height = + (float)linked_effect_vars->strip_count * linked_effect_vars->strip_height * 0.5f; half_width = *(float *)linked_effect_vars * 0.5f; *(OvlQuad *)scratch.position2 = *(OvlQuad *)&moby->pos; radius_squared = half_height * half_height; @@ -187,8 +189,9 @@ void render_data_processor_linked_effect(u8 *moby) { DataProcessorLinkedEffectVars *linked_effect_render_vars = (DataProcessorLinkedEffectVars *)MOBY(moby)->pvars; char *linked_processor_vars = - *(char **)((linked_effect_render_vars->unkC << 8) + (int)D_L10_0015FFD8 + 0x78); - char strip_transforms[(unsigned int)linked_effect_render_vars->unk4 * 0x40]; + *(char **)((linked_effect_render_vars->processor_moby_index << 8) + (int)D_L10_0015FFD8 + + 0x78); + char strip_transforms[(unsigned int)linked_effect_render_vars->strip_count * 0x40]; struct { unsigned char vertices[0x50]; float matrix1[16]; @@ -226,7 +229,7 @@ void render_data_processor_linked_effect(u8 *moby) { uv2 = matrix2 + 1; { int transform_index; - for (transform_index = 0; transform_index < linked_effect_render_vars->unk4; + for (transform_index = 0; transform_index < linked_effect_render_vars->strip_count; transform_index++) { rotation_matrix(strip_transforms + transform_index * 0x40, moby + 0x40); multiply_matrix(strip_transforms + transform_index * 0x40, @@ -235,7 +238,8 @@ void render_data_processor_linked_effect(u8 *moby) { *(u128_c *)(strip_transforms + transform_index * 0x40 + 0x30) = *(u128_c *)(moby + 0x10); *(float *)(strip_transforms + transform_index * 0x40 + 0x38) += - convert_integer_to_float(transform_index + 1) * linked_effect_render_vars->unk8; + convert_integer_to_float(transform_index + 1) * + linked_effect_render_vars->strip_height; } } { @@ -276,12 +280,12 @@ void render_data_processor_linked_effect(u8 *moby) { phase + *(float *)(linked_processor_vars + 0x12de0); } - for (i = 0; i < linked_effect_render_vars->unk4; i = next_strip_index) { + for (i = 0; i < linked_effect_render_vars->strip_count; i = next_strip_index) { int offset; int age; float progress; unsigned int color; - order = &linked_effect_render_vars->unk10; + order = &linked_effect_render_vars->strip_order; group_age = group * 0x78; age_base = linked_processor_vars + 0x10000; ages = age_base + 0x2c00; diff --git a/src/overlays/l10/mobys/height_adjusted_projectile.c b/src/overlays/l10/mobys/height_adjusted_projectile.c index 4719c0280f..f916aa7ed0 100644 --- a/src/overlays/l10/mobys/height_adjusted_projectile.c +++ b/src/overlays/l10/mobys/height_adjusted_projectile.c @@ -48,10 +48,10 @@ typedef struct HeightAdjustedProjectileVars { u8 timer_10; u8 pad_11[0x1]; s16 height_adjustment_mode; - char *unk14; + char *impact_flag; f32 unk18; - f32 unk1C; - struct Moby *unk20; + f32 height_offset; + struct Moby *shooter; } HeightAdjustedProjectileVars; /* Moby class 859 */ @@ -78,21 +78,22 @@ void height_adjusted_projectile_update(struct Moby *moby) { case HEIGHT_MODE_SKIP_ADJUSTMENT: break; case HEIGHT_MODE_APPROACH_FIXED_HEIGHT: - approach_moby_height(moby, projectile_vars->unk1C); + approach_moby_height(moby, projectile_vars->height_offset); break; case HEIGHT_MODE_FOLLOW_COLLISION_HEIGHT: qcopy(check, &moby->pos); qcopy(raised, &moby->pos); check[2] += 0.1f; - raised[2] -= projectile_vars->unk1C + projectile_vars->unk1C; + raised[2] -= projectile_vars->height_offset + projectile_vars->height_offset; if (collision_line(check, raised, 2, (int)moby, 0)) - approach_moby_height(moby, *(float *)(D_L10_001742C0 + 0x28) + projectile_vars->unk1C); + approach_moby_height( + moby, *(float *)(D_L10_001742C0 + 0x28) + projectile_vars->height_offset); else approach_moby_height(moby, moby->pos.z - 0.1f); break; case HEIGHT_MODE_FOLLOW_SELECTED_MOBY_HEIGHT: if (*(int *)((char *)found + 0x40) != 0) - approach_moby_height(moby, found[2] + projectile_vars->unk1C); + approach_moby_height(moby, found[2] + projectile_vars->height_offset); break; case 4: break; @@ -107,17 +108,17 @@ void height_adjusted_projectile_update(struct Moby *moby) { return; } if (collision_line( - movement_start_position, &moby->pos, 0, *(int *)&projectile_vars->unk20, (int)hit)) { + movement_start_position, &moby->pos, 0, *(int *)&projectile_vars->shooter, (int)hit)) { char *collision = D_L10_001742C0; struct Moby *impacted_moby = *(struct Moby **)(collision + 0x18); if (impacted_moby == 0 || impacted_moby->oclass != 0x359) { qcopy(&moby->pos, collision + 0x20); - if (projectile_vars->unk14 != 0) { + if (projectile_vars->impact_flag != 0) { if (impacted_moby != 0) { - if (impacted_moby == D_001413D0_lui && projectile_vars->unk20 != 0 && - projectile_vars->unk20->state != 0xfe && - projectile_vars->unk20->state != 0xfd) - *projectile_vars->unk14 = 1; + if (impacted_moby == D_001413D0_lui && projectile_vars->shooter != 0 && + projectile_vars->shooter->state != 0xfe && + projectile_vars->shooter->state != 0xfd) + *projectile_vars->impact_flag = 1; } } for (i = 0; i < 5; i++) { diff --git a/src/overlays/l10/mobys/linked_moby_hitbox.c b/src/overlays/l10/mobys/linked_moby_hitbox.c index 272c52488c..694aab1dcf 100644 --- a/src/overlays/l10/mobys/linked_moby_hitbox.c +++ b/src/overlays/l10/mobys/linked_moby_hitbox.c @@ -131,17 +131,17 @@ void linked_moby_hitbox_update(struct Moby *moby) __asm__("FUN_L10_002c9c70"); typedef struct LinkedMobyHitboxVars { u8 pad_0[0x4]; - f32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - s16 unk14; + f32 min_scale; + s32 option_flags; + s32 fade_duration; + s32 target_moby_index; + s16 target_class; s8 target_state_on_activation; s8 target_state_for_hitbox_removal; - s32 unk18; + s32 linked_moby_slots; u8 pad_1C[0x24]; - s32 unk40; - f32 unk44; + s32 fade_timer; + f32 target_initial_alpha; } LinkedMobyHitboxVars; /* Moby class 794 */ @@ -155,11 +155,11 @@ void linked_moby_hitbox_update(struct Moby *moby) { LinkedMobyHitboxVars *linked_hitbox_vars = (LinkedMobyHitboxVars *)moby->pvars; int differences = 0; struct Moby *target = 0; - int *slot = &linked_hitbox_vars->unk18; + int *slot = &linked_hitbox_vars->linked_moby_slots; unsigned char state; - if (linked_hitbox_vars->unk10 != -1) { - target = &D_L10_0015FFD8[linked_hitbox_vars->unk10]; + if (linked_hitbox_vars->target_moby_index != -1) { + target = &D_L10_0015FFD8[linked_hitbox_vars->target_moby_index]; } if ((moby->mission == 0xff || visited52[moby->mission + (D_0015ED84 << 4)] != 0xff) && moby->state != LINKED_HITBOX_STATE_INITIALIZE) { @@ -190,16 +190,16 @@ void linked_moby_hitbox_update(struct Moby *moby) { case LINKED_HITBOX_STATE_INITIALIZE: /* Position flags select opposite copy directions; rotation flags have priority. */ if (target != 0) { - linked_hitbox_vars->unk14 = target->oclass; - linked_hitbox_vars->unk44 = convert_integer_to_float(target->alpha); - if ((linked_hitbox_vars->unk8 & 0x10) != 0) { + linked_hitbox_vars->target_class = target->oclass; + linked_hitbox_vars->target_initial_alpha = convert_integer_to_float(target->alpha); + if ((linked_hitbox_vars->option_flags & 0x10) != 0) { qcopy(&moby->pos, &target->pos); - } else if ((linked_hitbox_vars->unk8 & 0x40) != 0) { + } else if ((linked_hitbox_vars->option_flags & 0x40) != 0) { qcopy(&target->pos, &moby->pos); } - if ((linked_hitbox_vars->unk8 & 0x20) != 0) { + if ((linked_hitbox_vars->option_flags & 0x20) != 0) { qcopy_nc(&moby->rot, &target->rot); - } else if ((linked_hitbox_vars->unk8 & 0x80) != 0) { + } else if ((linked_hitbox_vars->option_flags & 0x80) != 0) { qcopy_nc(&target->rot, &moby->rot); } } else { @@ -228,7 +228,7 @@ void linked_moby_hitbox_update(struct Moby *moby) { } } { - float initial = linked_hitbox_vars->unk4; + float initial = linked_hitbox_vars->min_scale; float now = *(float *)linked_hitbox_vars; float scale = moby->pclass->scale; float size = (now < initial ? initial * scale : now * scale); @@ -240,30 +240,31 @@ void linked_moby_hitbox_update(struct Moby *moby) { if (differences == 0) { if (target != 0 && linked_hitbox_vars->target_state_on_activation != -1) target->state = *(unsigned char *)&linked_hitbox_vars->target_state_on_activation; - linked_hitbox_vars->unk40 = linked_hitbox_vars->unkC; + linked_hitbox_vars->fade_timer = linked_hitbox_vars->fade_duration; moby->state = LINKED_HITBOX_STATE_WAIT_FOR_TARGET_STATE_OR_TIMER; } spawn_linked_hitbox_contact_effects(moby, (HitBox *)linked_hitbox_vars); return; case LINKED_HITBOX_STATE_WAIT_FOR_TARGET_STATE_OR_TIMER: if (target != 0) { - if ((linked_hitbox_vars->unk8 & 2) == 0) { - float now = convert_integer_to_float(linked_hitbox_vars->unk40); - float initial = convert_integer_to_float(linked_hitbox_vars->unkC); - target->alpha = FUN_001fa6d0_2c9c70(linked_hitbox_vars->unk44 * now / initial); + if ((linked_hitbox_vars->option_flags & 2) == 0) { + float now = convert_integer_to_float(linked_hitbox_vars->fade_timer); + float initial = convert_integer_to_float(linked_hitbox_vars->fade_duration); + target->alpha = + FUN_001fa6d0_2c9c70(linked_hitbox_vars->target_initial_alpha * now / initial); } } - if ((linked_hitbox_vars->unk8 & 4) == 0 && target != 0 && + if ((linked_hitbox_vars->option_flags & 4) == 0 && target != 0 && linked_hitbox_vars->target_state_for_hitbox_removal != -1 && target->state == linked_hitbox_vars->target_state_for_hitbox_removal) moby->state = LINKED_HITBOX_STATE_REMOVE; - if ((linked_hitbox_vars->unk8 & 8) == 0 && - FUN_001f9740_2c9c70(&linked_hitbox_vars->unk40) != 0) + if ((linked_hitbox_vars->option_flags & 8) == 0 && + FUN_001f9740_2c9c70(&linked_hitbox_vars->fade_timer) != 0) moby->state = LINKED_HITBOX_STATE_REMOVE; spawn_linked_hitbox_contact_effects(moby, (HitBox *)linked_hitbox_vars); return; case LINKED_HITBOX_STATE_REMOVE: - if (target != 0 && (linked_hitbox_vars->unk8 & 1) == 0) + if (target != 0 && (linked_hitbox_vars->option_flags & 1) == 0) mark_moby_for_removal(target); mark_moby_for_removal(moby); break; diff --git a/src/overlays/l10/mobys/path_spark_effect.c b/src/overlays/l10/mobys/path_spark_effect.c index cec39e5e72..0eb4867807 100644 --- a/src/overlays/l10/mobys/path_spark_effect.c +++ b/src/overlays/l10/mobys/path_spark_effect.c @@ -31,7 +31,7 @@ void path_spark_effect_update(char *moby) __asm__("FUN_L10_002dd3d8"); typedef struct PathSparkEffectVars { u8 pad_0[0x10]; - void *unk10; + void *blast_source; s32 timer_14; } PathSparkEffectVars; @@ -71,9 +71,9 @@ void path_spark_effect_update(char *moby) { convert_integer_to_float(truncate_float_to_s32(10.0f / (frame_time * 5.0f)) / 4) * 0.5f; } if (MOBY(moby)->pclass->scale * 0.25f < MOBY(moby)->scale) { - int count = collect_mobies_in_sphere(moby + 0x10, 0.15f, 16, effect_data->unk10, 0); + int count = collect_mobies_in_sphere(moby + 0x10, 0.15f, 16, effect_data->blast_source, 0); *(OvlQuad *)blast_hit_position = *(OvlQuad *)&MOBY(moby)->pos; - send_blast_hits(effect_data->unk10, + send_blast_hits(effect_data->blast_source, blast_hit_position, nearby_mobys, count, diff --git a/src/overlays/l10/mobys/sinking_platform.c b/src/overlays/l10/mobys/sinking_platform.c index bc6d6789b8..b92e34fd3e 100644 --- a/src/overlays/l10/mobys/sinking_platform.c +++ b/src/overlays/l10/mobys/sinking_platform.c @@ -31,15 +31,15 @@ typedef struct SinkingPlatformVars { u8 pad_29[0x15]; s16 unk3E; u8 pad_40[0x20]; - f32 unk60[4]; + f32 entity_matrix[4]; u8 pad_70[0x30]; - f32 unkA0; - f32 unkA4; - f32 unkA8; - f32 unkAC; - f32 unkB0; - f32 unkB4; - f32 unkB8; + f32 home_z; + f32 vertical_velocity; + f32 bob_phase; + f32 bob_offset; + f32 bob_phase_step; + f32 tilt_phase_1; + f32 tilt_phase_2; s32 timer_BC; } SinkingPlatformVars; @@ -64,35 +64,38 @@ void sinking_platform_update(struct Moby *moby) { platform_vars->unk3E = 5; platform_vars->unk20 = 0; platform_vars->unk24 = 0; - platform_vars->unkA0 = moby->pos.z; - platform_vars->unkA8 = random_angle_radians(); - platform_vars->unkB4 = random_angle_radians(); + platform_vars->home_z = moby->pos.z; + platform_vars->bob_phase = random_angle_radians(); + platform_vars->tilt_phase_1 = random_angle_radians(); { float initial_second_rotation_phase = random_angle_radians(); float bobbing_phase_jitter_limit = frame_time * 0.13962634f; - platform_vars->unkB8 = initial_second_rotation_phase; - platform_vars->unkB0 = + platform_vars->tilt_phase_2 = initial_second_rotation_phase; + platform_vars->bob_phase_step = frame_time * 1.5707964f + randf_sym(0.0f, bobbing_phase_jitter_limit); } moby->state = PLATFORM_STATE_BOBBING; case PLATFORM_STATE_BOBBING: - *(int *)&platform_vars->unkA4 = 0; - update_moby_vertical_oscillation( - 0.1f, platform_vars->unkB0, moby, &platform_vars->unkA8, &platform_vars->unkAC); + *(int *)&platform_vars->vertical_velocity = 0; + update_moby_vertical_oscillation(0.1f, + platform_vars->bob_phase_step, + moby, + &platform_vars->bob_phase, + &platform_vars->bob_offset); update_moby_rotation_oscillation(moby, - &platform_vars->unkB4, - &platform_vars->unkB8, + &platform_vars->tilt_phase_1, + &platform_vars->tilt_phase_2, 0.047123890f, frame_time * 0.34906584f, frame_time * 0.5235988f); break; case PLATFORM_STATE_SINKING_WITH_HERO: { - float a = platform_vars->unkA4 - (frame_time_sq + frame_time_sq); + float a = platform_vars->vertical_velocity - (frame_time_sq + frame_time_sq); float sinking_step_lower_bound = -(frame_time + frame_time); - platform_vars->unkA4 = a; + platform_vars->vertical_velocity = a; if (a < sinking_step_lower_bound) - platform_vars->unkA4 = sinking_step_lower_bound; - moby->pos.z += platform_vars->unkA4; + platform_vars->vertical_velocity = sinking_step_lower_bound; + moby->pos.z += platform_vars->vertical_velocity; if (is_hero_on_moby(moby) == 0) moby->state = PLATFORM_STATE_RETURN_TO_ORIGINAL_HEIGHT; if (platform_vars->timer_BC <= 0) { @@ -102,33 +105,33 @@ void sinking_platform_update(struct Moby *moby) { break; } case PLATFORM_STATE_RETURN_TO_ORIGINAL_HEIGHT: { - float vz = platform_vars->unkA4; + float vz = platform_vars->vertical_velocity; float return_acceleration = frame_time_sq; float remaining_return_height, sq, twice_return_acceleration; if (vz < 0.0f || (twice_return_acceleration = return_acceleration + return_acceleration, - remaining_return_height = platform_vars->unkA0 - moby->pos.z, + remaining_return_height = platform_vars->home_z - moby->pos.z, sq = vz * vz, sq / (twice_return_acceleration + twice_return_acceleration) < remaining_return_height)) { float a = vz + return_acceleration; float mx = frame_time + frame_time; - platform_vars->unkA4 = a; + platform_vars->vertical_velocity = a; if (mx < a) - platform_vars->unkA4 = mx; + platform_vars->vertical_velocity = mx; } else if (0.0f < remaining_return_height) { float a = vz - sq / (remaining_return_height + remaining_return_height); - platform_vars->unkA4 = a; + platform_vars->vertical_velocity = a; if (a < 0.0f) - platform_vars->unkA4 = 0.0f; + platform_vars->vertical_velocity = 0.0f; } - moby->pos.z += platform_vars->unkA4; - if (platform_vars->unkA0 <= moby->pos.z) { - moby->pos.z = platform_vars->unkA0; + moby->pos.z += platform_vars->vertical_velocity; + if (platform_vars->home_z <= moby->pos.z) { + moby->pos.z = platform_vars->home_z; moby->state = PLATFORM_STATE_BOBBING; } break; } } fast_vec_sub(position_delta, &moby->pos, previous_position); - update_entity_matrix(platform_vars->unk60, position_delta, &moby->rot, &moby->rot); + update_entity_matrix(platform_vars->entity_matrix, position_delta, &moby->rot, &moby->rot); } diff --git a/src/overlays/l10/mobys/timed_effect_emitter.c b/src/overlays/l10/mobys/timed_effect_emitter.c index f2fa4925e1..db8f4ccd57 100644 --- a/src/overlays/l10/mobys/timed_effect_emitter.c +++ b/src/overlays/l10/mobys/timed_effect_emitter.c @@ -25,8 +25,8 @@ extern void rotation_matrix(void *, void *) __asm__("FUN_001fa050"); typedef struct TimedEffectEmitterVars { u8 pad_0[0x4]; - s32 unk4; - s32 unk8; + s32 active_duration; + s32 idle_duration; s32 timer_C; s32 voice; } TimedEffectEmitterVars; @@ -46,7 +46,7 @@ void timed_effect_emitter_update(struct Moby *moby) { case MOBY_STATE_WAIT_FOR_ACTIVATION: emitter_vars->voice = -1; if (fast_dec_timer(&emitter_vars->timer_C)) { - emitter_vars->timer_C = emitter_vars->unk4; + emitter_vars->timer_C = emitter_vars->active_duration; moby->state = MOBY_STATE_ACTIVE_WITH_SOUND; } break; @@ -70,7 +70,7 @@ void timed_effect_emitter_update(struct Moby *moby) { } if (fast_dec_timer(&emitter_vars->timer_C)) { int k; - emitter_vars->timer_C = emitter_vars->unk8; + emitter_vars->timer_C = emitter_vars->idle_duration; moby->state = MOBY_STATE_WAIT_FOR_ACTIVATION; k = emitter_vars->voice; if (k != -1) { From 0da62028c106981d6b8e3efdd89b301641bd1328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:09:21 +0000 Subject: [PATCH 036/213] decomp: name volume trigger, switch group, rocket and commando fields in level 13 --- src/overlays/l13/mobys/asteroid.c | 30 ++--- src/overlays/l13/mobys/attached_rocket.c | 40 +++--- src/overlays/l13/mobys/blarg_gunner.c | 10 +- src/overlays/l13/mobys/blarg_space_commando.c | 85 +++++++------ .../l13/mobys/controller_linked_gate.c | 36 +++--- src/overlays/l13/mobys/fighter_jet.c | 6 +- src/overlays/l13/mobys/forcefield.c | 36 +++--- src/overlays/l13/mobys/gemlik_projectile.c | 17 +-- src/overlays/l13/mobys/group_clear_trigger.c | 8 +- src/overlays/l13/mobys/help_hints.c | 9 +- src/overlays/l13/mobys/homing_rocket.c | 26 ++-- .../l13/mobys/hovering_rocket_attacker.c | 113 +++++++++-------- src/overlays/l13/mobys/linked_switch_group.c | 79 ++++++------ src/overlays/l13/mobys/moby_volume_trigger.c | 118 +++++++++--------- 14 files changed, 320 insertions(+), 293 deletions(-) diff --git a/src/overlays/l13/mobys/asteroid.c b/src/overlays/l13/mobys/asteroid.c index eded1ef2d5..25ee0c4743 100644 --- a/src/overlays/l13/mobys/asteroid.c +++ b/src/overlays/l13/mobys/asteroid.c @@ -51,14 +51,14 @@ char *spawn_asteroid_fragment(char *owner, typedef struct AsteroidVars { u8 pad_0[0x30]; - f32 unk30; - f32 unk34; - f32 unk38; + f32 spin_x; + f32 spin_y; + f32 spin_z; u8 pad_3C[0x4]; - s32 unk40; + s32 child; u8 pad_44[0x4]; - char *unk48; - s16 unk4C; + char *owner; + s16 cooldown; s16 splits_remaining; } AsteroidVars; @@ -82,33 +82,33 @@ char *spawn_asteroid_fragment(char *parent_asteroid, qcopy(moby + 0x10, spawn_position); qcopy(moby_data, initial_velocity); MOBY(moby)->scale = scale; - moby_data->unk48 = parent_asteroid; - moby_data->unk40 = 1; - moby_data->unk4C = scale_game_frames(0x1E); + moby_data->owner = parent_asteroid; + moby_data->child = 1; + moby_data->cooldown = scale_game_frames(0x1E); moby_data->splits_remaining = remaining_split_count; MOBY(moby)->collision = 0; spin_increment = random_float_between(-30.0f, 30.0f) * DEG_TO_RAD * frame_time; switch (RandomNext() % 3) { case SPIN_AXIS_X: - moby_data->unk30 = spin_increment; + moby_data->spin_x = spin_increment; break; case SPIN_AXIS_Y: - moby_data->unk34 = spin_increment; + moby_data->spin_y = spin_increment; break; case SPIN_AXIS_Z: - moby_data->unk38 = spin_increment; + moby_data->spin_z = spin_increment; break; } spin_increment = random_float_between(-180.0f, 180.0f) * DEG_TO_RAD * frame_time; switch (RandomNext() % 3) { case SPIN_AXIS_X: - moby_data->unk30 = spin_increment; + moby_data->spin_x = spin_increment; break; case SPIN_AXIS_Y: - moby_data->unk34 = spin_increment; + moby_data->spin_y = spin_increment; break; case SPIN_AXIS_Z: - moby_data->unk38 = spin_increment; + moby_data->spin_z = spin_increment; break; } MOBY(moby)->rot.x = random_angle_radians(); diff --git a/src/overlays/l13/mobys/attached_rocket.c b/src/overlays/l13/mobys/attached_rocket.c index b8ce9cbfe1..0ceee46e83 100644 --- a/src/overlays/l13/mobys/attached_rocket.c +++ b/src/overlays/l13/mobys/attached_rocket.c @@ -50,13 +50,13 @@ void launch_attached_rocket(struct Moby *moby, typedef struct AttachedRocketVars { u8 pad_0[0x10]; - u8 unk10; + u8 launch_position; u8 pad_11[0xF]; - struct Moby *unk20; + struct Moby *source_moby; s16 unk24; s16 attachment_joint_index; - f32 unk28; - s32 unk2C; + f32 max_travel_distance; + s32 distance_reference_moby; } AttachedRocketVars; void launch_attached_rocket(struct Moby *moby, @@ -68,18 +68,18 @@ void launch_attached_rocket(struct Moby *moby, ATTACHED_ROCKET_STATE_FLIGHT = 0 }; AttachedRocketVars *moby_vars = (AttachedRocketVars *)moby->pvars; - char *source_moby = (char *)moby_vars->unk20; + char *source_moby = (char *)moby_vars->source_moby; char *mp; - moby_vars->unk28 = max_travel_distance; + moby_vars->max_travel_distance = max_travel_distance; qcopy(&moby->rot, source_moby + 0x40); mp = &moby->pos; *(OvlQuad *)&moby->rot_row0 = *(OvlQuad *)&MOBY(source_moby)->rot_row0; *(OvlQuad *)&moby->rot_row1 = *(OvlQuad *)&MOBY(source_moby)->rot_row1; *(OvlQuad *)&moby->rot_row2 = *(OvlQuad *)&MOBY(source_moby)->rot_row2; - moby_point_position((void *)moby_vars->unk20, moby_vars->attachment_joint_index, mp); - qcopy(&moby_vars->unk10, mp); + moby_point_position((void *)moby_vars->source_moby, moby_vars->attachment_joint_index, mp); + qcopy(&moby_vars->launch_position, mp); qcopy(moby_vars, pos); - moby_vars->unk2C = distance_reference_moby; + moby_vars->distance_reference_moby = distance_reference_moby; moby->state = ATTACHED_ROCKET_STATE_FLIGHT; moby->flags &= 0xFFFE; moby->collision = moby->pclass->collision; @@ -141,7 +141,7 @@ void attached_rocket_update(struct Moby *moby) { qcopy(&work.old_pos, &moby->pos); if (moby->state == ATTACHED_ROCKET_STATE_ATTACHED) { - source = attached_rocket_vars->unk20; + source = attached_rocket_vars->source_moby; if (source == 0 || source->oclass != 0x65 || source->state == MOBY_STATE_REMOVAL_AT_OR_ABOVE_INSTANCE_END || source->state == MOBY_STATE_REMOVAL_BELOW_INSTANCE_END) @@ -150,11 +150,12 @@ void attached_rocket_update(struct Moby *moby) { *(OvlQuad *)&moby->rot_row0 = *(OvlQuad *)&source->rot_row0; *(OvlQuad *)&moby->rot_row1 = *(OvlQuad *)&source->rot_row1; *(OvlQuad *)&moby->rot_row2 = *(OvlQuad *)&source->rot_row2; - moby_point_position( - attached_rocket_vars->unk20, attached_rocket_vars->attachment_joint_index, &moby->pos); - qcopy(&attached_rocket_vars->unk10, &moby->pos); + moby_point_position(attached_rocket_vars->source_moby, + attached_rocket_vars->attachment_joint_index, + &moby->pos); + qcopy(&attached_rocket_vars->launch_position, &moby->pos); { - struct Moby *source = attached_rocket_vars->unk20; + struct Moby *source = attached_rocket_vars->source_moby; if (source != 0 && source->state != MOBY_STATE_REMOVAL_AT_OR_ABOVE_INSTANCE_END && source->state != MOBY_STATE_REMOVAL_BELOW_INSTANCE_END && (source->flags & 1)) moby->flags |= 1; @@ -195,10 +196,11 @@ void attached_rocket_update(struct Moby *moby) { work.velocity.z = 1.0f; make_hit_descriptor(work.hit, moby, 0x10001, 1.0f, &work.velocity); stationary = attached_rocket_vars->unk24 == 0; - distance = vector_distance_xy(&moby->pos, &attached_rocket_vars->unk10); - other_distance = vector_distance_xy(*(char **)&attached_rocket_vars->unk2C + 0x10, - &attached_rocket_vars->unk10); - if (attached_rocket_vars->unk28 < distance || other_distance < distance) { + distance = vector_distance_xy(&moby->pos, &attached_rocket_vars->launch_position); + other_distance = + vector_distance_xy(*(char **)&attached_rocket_vars->distance_reference_moby + 0x10, + &attached_rocket_vars->launch_position); + if (attached_rocket_vars->max_travel_distance < distance || other_distance < distance) { if (moby->visible != 0) { int i; for (i = 0; i < 3; i++) { @@ -223,7 +225,7 @@ void attached_rocket_update(struct Moby *moby) { goto bounds; { struct Moby *target = (struct Moby *)coll_hit_1638.moby; - if (target != 0 && target == attached_rocket_vars->unk20) + if (target != 0 && target == attached_rocket_vars->source_moby) goto bounds; } qcopy(&moby->pos, &coll_hit_1638.point); diff --git a/src/overlays/l13/mobys/blarg_gunner.c b/src/overlays/l13/mobys/blarg_gunner.c index 3334794589..bd1cb271cd 100644 --- a/src/overlays/l13/mobys/blarg_gunner.c +++ b/src/overlays/l13/mobys/blarg_gunner.c @@ -50,8 +50,8 @@ typedef struct { u8 pad4[0x8]; void *unkC; u8 pad10[0x10]; - f32 unk20; - s16 unk24; + f32 health; + s16 max_health; u8 pad26[2]; u8 unk28; u8 unk29; @@ -77,7 +77,7 @@ struct Moby *spawn_blarg_turret_child(struct Moby *parent) { if (child_moby != 0) { child_vars = (Vars *)child_moby->pvars; child_vars->parent = parent; - child_vars->unk0 = &child_vars->unk20; + child_vars->unk0 = &child_vars->health; child_vars->unkC = child_vars->unk60; child_moby->update_dist = parent->update_dist; child_moby->draw_dist = child_vars->parent->draw_dist; @@ -87,8 +87,8 @@ struct Moby *spawn_blarg_turret_child(struct Moby *parent) { child_moby->command = 0; qcopy(&child_moby->pos, &child_vars->parent->pos); child_moby->scale = child_moby->pclass->scale * parent->scale / parent->pclass->scale; - child_vars->unk20 = 1.0f; - child_vars->unk24 = 1; + child_vars->health = 1.0f; + child_vars->max_health = 1; child_vars->unk29 = 1; child_vars->unk2A = 3; child_vars->unk28 = 0; diff --git a/src/overlays/l13/mobys/blarg_space_commando.c b/src/overlays/l13/mobys/blarg_space_commando.c index 99379140f2..601e39f72f 100644 --- a/src/overlays/l13/mobys/blarg_space_commando.c +++ b/src/overlays/l13/mobys/blarg_space_commando.c @@ -87,19 +87,19 @@ typedef struct { } Shot; typedef struct { - s32 unk0; - f32 unk4; - f32 unk8; - f32 unkC; + s32 collision_radius_1024ths; + f32 step_height; + f32 max_drop; + f32 max_climb; u8 pad10[0x14]; - f32 unk24; + f32 max_speed; u8 pad28[0x18]; } Ctl; typedef struct { u8 pad0[0x20]; - f32 unk20; - s16 unk24; + f32 health; + s16 max_health; u8 pad26[2]; u8 unk28; u8 pad29[7]; @@ -114,11 +114,11 @@ typedef struct { Ctl ctl; /* 0xC0 */ u8 pad100[0x60]; struct Moby *target; /* 0x160 */ - s32 unk164; + s32 target_selection_status; u8 pad168[8]; Vec4 home; /* 0x170 */ u8 pad180[4]; - s32 unk184; + s32 pursuit_timer; f32 turn; /* 0x188 */ u8 pad18C[8]; s32 timer; /* 0x194 */ @@ -126,7 +126,7 @@ typedef struct { u8 pad19C[0xC]; f32 approach_heading_offset; u8 pad1AC[0x34]; - Vec4 unk1E0; + Vec4 muzzle_position; u8 pad1F0[0x210]; u8 unk400[1]; } Vars_309330; @@ -211,22 +211,23 @@ void blarg_space_commando_update(struct Moby *moby) { } switch (moby->state) { case BLARG_SPACE_COMMANDO_INITIALIZE: - blarg_space_commando_vars->unk20 = 2.0f; + blarg_space_commando_vars->health = 2.0f; blarg_space_commando_vars->unk28 = 1; blarg_space_commando_vars->unk58 = 12; blarg_space_commando_vars->unk5A = 8; - blarg_space_commando_vars->unk24 = 2; + blarg_space_commando_vars->max_health = 2; blarg_space_commando_vars->unk30 = 1.5f; FUN_L01_0026d930(&blarg_space_commando_vars->ctl); - blarg_space_commando_vars->ctl.unk8 = 2.0f; - blarg_space_commando_vars->ctl.unkC = 0.5f; - blarg_space_commando_vars->ctl.unk0 = truncate_float_to_s32(D_L13_00161E58_gp * 716.8f); - blarg_space_commando_vars->ctl.unk4 = D_L13_00161E58_gp * 0.7f; - blarg_space_commando_vars->ctl.unk24 = + blarg_space_commando_vars->ctl.max_drop = 2.0f; + blarg_space_commando_vars->ctl.max_climb = 0.5f; + blarg_space_commando_vars->ctl.collision_radius_1024ths = + truncate_float_to_s32(D_L13_00161E58_gp * 716.8f); + blarg_space_commando_vars->ctl.step_height = D_L13_00161E58_gp * 0.7f; + blarg_space_commando_vars->ctl.max_speed = l13_blarg_space_commando_horizontal_speed_limit_base * frame_time * random_float_between(0.95f, 1.05f); qcopy(&blarg_space_commando_vars->home, &moby->pos); - moby_point_position(moby, 0, &blarg_space_commando_vars->unk1E0); + moby_point_position(moby, 0, &blarg_space_commando_vars->muzzle_position); moby->state = BLARG_SPACE_COMMANDO_FACE_TARGET_AND_SELECT_ACTION; break; case BLARG_SPACE_COMMANDO_FACE_TARGET_AND_SELECT_ACTION: @@ -236,7 +237,7 @@ void blarg_space_commando_update(struct Moby *moby) { frame_time_sq * 6.2831855f, frame_time_sq * 6.2831855f, frame_time * 3.1415927f); - if (blarg_space_commando_vars->unk164 != 2) { + if (blarg_space_commando_vars->target_selection_status != 2) { f32 dist = vector_distance_xy(&moby->pos, &target->pos); if (l13_blarg_space_commando_probe_trigger_distance_xy < dist) { if (fast_difference_between_rotations( @@ -259,7 +260,7 @@ void blarg_space_commando_update(struct Moby *moby) { blend_moby_animation(moby, 6, 0, scale_game_frames(10)); } } - } else if (blarg_space_commando_vars->unk184 != 0) { + } else if (blarg_space_commando_vars->pursuit_timer != 0) { moby->state = BLARG_SPACE_COMMANDO_APPROACH_TARGET_UNTIL_BLOCKED_OR_NEAR; if (moby->prev_seq != 1) { blend_moby_animation(moby, 1, 0, scale_game_frames(20)); @@ -278,7 +279,7 @@ void blarg_space_commando_update(struct Moby *moby) { case BLARG_SPACE_COMMANDO_SELECT_ACTION_AFTER_ANIMATION: if (moby->anim_flags & 2) { f32 dist = vector_distance_xy(&moby->pos, &target->pos); - if (blarg_space_commando_vars->unk164 != 2 && dist < 15.0f) { + if (blarg_space_commando_vars->target_selection_status != 2 && dist < 15.0f) { moby->state = BLARG_SPACE_COMMANDO_FACE_TARGET_AND_WAIT_FOR_TIMER; if (moby->prev_seq != 4) { blend_moby_animation(moby, 4, 0, scale_game_frames(20)); @@ -308,12 +309,12 @@ void blarg_space_commando_update(struct Moby *moby) { } } else if (vector_distance_xy(&moby->pos, &target->pos) < l13_blarg_space_commando_probe_trigger_distance_xy) { - moby_point_position(moby, 0, &blarg_space_commando_vars->unk1E0); + moby_point_position(moby, 0, &blarg_space_commando_vars->muzzle_position); moby->state = BLARG_SPACE_COMMANDO_FACE_TARGET_AND_PROBE_DURING_ANIMATION; if (moby->prev_seq != 6) { blend_moby_animation(moby, 6, 0, scale_game_frames(10)); } - } else if (blarg_space_commando_vars->unk184 != 0) { + } else if (blarg_space_commando_vars->pursuit_timer != 0) { moby->state = BLARG_SPACE_COMMANDO_APPROACH_TARGET_UNTIL_BLOCKED_OR_NEAR; if (moby->prev_seq != 1) { blend_moby_animation(moby, 1, 0, scale_game_frames(20)); @@ -341,11 +342,16 @@ void blarg_space_commando_update(struct Moby *moby) { shot.active = 0; shot.valid = 1; shot.oclass = moby->oclass; - sweep_hit_segment( - &point, &origin, &blarg_space_commando_vars->unk1E0, &origin, moby, &shot, 5); + sweep_hit_segment(&point, + &origin, + &blarg_space_commando_vars->muzzle_position, + &origin, + moby, + &shot, + 5); } } - qcopy(&blarg_space_commando_vars->unk1E0, &point); + qcopy(&blarg_space_commando_vars->muzzle_position, &point); if (moby->anim_flags & 2) { moby->state = BLARG_SPACE_COMMANDO_RESUME_SAVED_STATE_AFTER_ANIMATION; moby->command = 1; @@ -431,7 +437,7 @@ void blarg_space_commando_update(struct Moby *moby) { fast_vec_dist(&moby->pos, &direction) < 0.8f) { blocked = 1; } - if (blarg_space_commando_vars->unk184 == 0) { + if (blarg_space_commando_vars->pursuit_timer == 0) { moby->state = BLARG_SPACE_COMMANDO_RETURN_HOME; } else if (blocked != 0) { moby->state = BLARG_SPACE_COMMANDO_PROBE_DURING_ANIMATION_THEN_RESUME_APPROACH; @@ -440,7 +446,7 @@ void blarg_space_commando_update(struct Moby *moby) { } } else if (vector_distance_xy(&moby->pos, &target->pos) < l13_blarg_space_commando_probe_trigger_distance_xy) { - moby_point_position(moby, 0, &blarg_space_commando_vars->unk1E0); + moby_point_position(moby, 0, &blarg_space_commando_vars->muzzle_position); moby->state = BLARG_SPACE_COMMANDO_PROBE_DURING_ANIMATION_THEN_RESUME_APPROACH; if (moby->prev_seq != 6) { blend_moby_animation(moby, 6, 0, scale_game_frames(10)); @@ -462,11 +468,16 @@ void blarg_space_commando_update(struct Moby *moby) { shot.active = 0; shot.valid = 1; shot.oclass = moby->oclass; - sweep_hit_segment( - &point, &origin, &blarg_space_commando_vars->unk1E0, &origin, moby, &shot, 5); + sweep_hit_segment(&point, + &origin, + &blarg_space_commando_vars->muzzle_position, + &origin, + moby, + &shot, + 5); } } - qcopy(&blarg_space_commando_vars->unk1E0, &point); + qcopy(&blarg_space_commando_vars->muzzle_position, &point); if (moby->anim_flags & 2) { moby->state = BLARG_SPACE_COMMANDO_APPROACH_TARGET_UNTIL_BLOCKED_OR_NEAR; if (moby->prev_seq != 1) { @@ -567,9 +578,9 @@ struct WalkerVars_8d10 { s32 start_frame; /* 0x160 */ s32 mode; /* 0x164 */ u8 pad168[8]; - Vec4f home; /* 0x170 */ - s32 path; /* 0x180 */ - s32 idle_timer; /* 0x184 */ + Vec4f home; /* 0x170 */ + s32 path; /* 0x180 */ + s32 pursuit_timer; /* 0x184 */ u8 pad188[8]; f32 range; /* 0x190 */ u8 pad194[8]; @@ -635,11 +646,11 @@ void update_blarg_space_commando_damage_targeting_and_ground_motion(struct Moby moby->scale = moby->pclass->scale * D_L13_00161E58; update_gemlik_trail(moby); if (blarg_space_commando_private_data->init != 0) { - blarg_space_commando_private_data->idle_timer = + blarg_space_commando_private_data->pursuit_timer = truncate_float_to_s32(FUN_001f96b0_8d10(random_float_between(180.0f, 240.0f))); blarg_space_commando_private_data->init = 0; } - fast_dec_timer(&blarg_space_commando_private_data->idle_timer); + fast_dec_timer(&blarg_space_commando_private_data->pursuit_timer); damage = 0.0f; hit = find_moby_hit(moby, 0x330000, 0); code = resolve_moby_hit_response( @@ -707,7 +718,7 @@ void update_blarg_space_commando_damage_targeting_and_ground_motion(struct Moby } moby->hit_slot = 0xFF; trooper_anim_finish(moby, blarg_space_commando_private_data->flash); - if (blarg_space_commando_private_data->idle_timer != 0) { + if (blarg_space_commando_private_data->pursuit_timer != 0) { blarg_space_commando_private_data->range = blarg_space_commando_private_data->far_range; } else { blarg_space_commando_private_data->range = blarg_space_commando_private_data->near_range; diff --git a/src/overlays/l13/mobys/controller_linked_gate.c b/src/overlays/l13/mobys/controller_linked_gate.c index 25c160f14f..8c76ac5de5 100644 --- a/src/overlays/l13/mobys/controller_linked_gate.c +++ b/src/overlays/l13/mobys/controller_linked_gate.c @@ -20,9 +20,9 @@ void controller_linked_gate_update(struct Moby *moby) __asm__("FUN_L13_002f8a78" typedef struct ControllerLinkedGateVars { u8 pad_0[0x10]; - f32 unk10; - s32 unk14; - s32 unk18; + f32 fade; + s32 point_offset; + s32 start_closed; } ControllerLinkedGateVars; /* Moby classes 674, 677, 680 */ @@ -68,13 +68,13 @@ void controller_linked_gate_update(struct Moby *moby) { } set_moby_color(moby, 0x80, 0x80, 0x80); moby->flags |= 0xA08; - if (gate_data->unk18 == 0) { - gate_data->unk10 = 1.0f; + if (gate_data->start_closed == 0) { + gate_data->fade = 1.0f; moby->state = GATE_STATE_OPEN; moby->collision = moby->pclass->collision; moby->alpha = 0x14; } else { - gate_data->unk10 = 0.0f; + gate_data->fade = 0.0f; moby->state = GATE_STATE_CLOSED; moby->collision = 0; moby->alpha = 0; @@ -91,9 +91,9 @@ void controller_linked_gate_update(struct Moby *moby) { moby->state = GATE_STATE_OPENING; moby->collision = moby->pclass->collision; } - gate_data->unk10 -= frame_scale * 0.05f; - if (gate_data->unk10 < 0.0f) { - gate_data->unk10 = 0.0f; + gate_data->fade -= frame_scale * 0.05f; + if (gate_data->fade < 0.0f) { + gate_data->fade = 0.0f; moby->state = GATE_STATE_CLOSED; moby->collision = 0; moby->visible = 0; @@ -113,22 +113,22 @@ void controller_linked_gate_update(struct Moby *moby) { moby->collision = 0; moby->state = GATE_STATE_CLOSING; } - gate_data->unk10 += frame_scale * 0.05f; - if (1.0f < gate_data->unk10) { - gate_data->unk10 = 1.0f; + gate_data->fade += frame_scale * 0.05f; + if (1.0f < gate_data->fade) { + gate_data->fade = 1.0f; moby->state = GATE_STATE_OPEN; moby->collision = moby->pclass->collision; } break; } - moby->alpha = truncate_float_to_s32(gate_data->unk10 * 20.0f); + moby->alpha = truncate_float_to_s32(gate_data->fade * 20.0f); step = 0xC0; - gate_data->unk14 += step; - if (gate_data->unk14 > 0x1000) { - gate_data->unk14 -= 0x1000; + gate_data->point_offset += step; + if (gate_data->point_offset > 0x1000) { + gate_data->point_offset -= 0x1000; step -= 0x1000; - } else if (gate_data->unk14 < 0) { - gate_data->unk14 += 0x1000; + } else if (gate_data->point_offset < 0) { + gate_data->point_offset += 0x1000; step += 0x1000; } offset_moby_class_point_pairs(((unsigned char *)moby->pclass), step, 0); diff --git a/src/overlays/l13/mobys/fighter_jet.c b/src/overlays/l13/mobys/fighter_jet.c index b7b53d983a..4b49c14d0b 100644 --- a/src/overlays/l13/mobys/fighter_jet.c +++ b/src/overlays/l13/mobys/fighter_jet.c @@ -1193,7 +1193,7 @@ typedef struct { float rot_y; float rot_z; char pad4C[0x70]; - unsigned char unkBC; + unsigned char command; } FlightMoby; typedef struct { @@ -1282,7 +1282,7 @@ void update_fighter_jet_flight(void *moby_arg, void *data_arg) { velocity[2] = frame_time_gp * 8.0f; moby->flags &= 0xFEFF; *(u128 *)impulse = *(u128 *)velocity; - if (moby->unkBC == 0) { + if (moby->command == 0) { if (jet_flight_state->launch_frames > scale_game_frames(120)) { pad_state = (char *)D_0013A4E0 + 0x2460; if (*(int *)(pad_state + 0x1B4) & 0x40) { @@ -1439,7 +1439,7 @@ void update_fighter_jet_flight(void *moby_arg, void *data_arg) { velocity, jet_flight_state->speed, jet_flight_state->yaw, -jet_flight_state->pitch); fast_vec_normalize(jet_flight_state->direction, velocity, 1.0f); qcopy(old_pos, moby->pos); - if (moby->unkBC == 0) { + if (moby->command == 0) { fast_vec_add(moby->pos, moby->pos, velocity); } { diff --git a/src/overlays/l13/mobys/forcefield.c b/src/overlays/l13/mobys/forcefield.c index ab240c60d3..e7cdc6a24f 100644 --- a/src/overlays/l13/mobys/forcefield.c +++ b/src/overlays/l13/mobys/forcefield.c @@ -97,10 +97,10 @@ void forcefield_update(struct Moby *m) __asm__("FUN_L13_002ed4a8"); typedef struct ForcefieldVars { u8 pad_0[0x4]; - f32 unk4; + f32 fade; u8 pad_8[0x4]; - s16 unkC; - s16 unkE; + s16 point_offset; + s16 point_light_slot; } ForcefieldVars; /* Moby classes 404, 405 */ @@ -118,8 +118,8 @@ void forcefield_update(struct Moby *moby) { moby->state = FORCEFIELD_STATE_MONITOR_LINKED_MOBY; moby->alpha = 0x14; moby->flags |= 0xA08; - forcefield_data->unkE = -1; - forcefield_data->unk4 = 1.0f; + forcefield_data->point_light_slot = -1; + forcefield_data->fade = 1.0f; set_moby_color(moby, 0x80, 0x80, 0x80); break; case FORCEFIELD_STATE_MONITOR_LINKED_MOBY: @@ -130,38 +130,38 @@ void forcefield_update(struct Moby *moby) { (D_0014C190_257218[current_level_index][((short)MOBY(linked_moby)->save_id) >> 5] >> (MOBY(linked_moby)->save_id & 0x1F)) & 1) { - forcefield_data->unk4 = 1.0f; + forcefield_data->fade = 1.0f; moby->state = FORCEFIELD_STATE_FADE_OUT; } } else { - forcefield_data->unk4 = 1.0f; + forcefield_data->fade = 1.0f; moby->state = FORCEFIELD_STATE_FADE_OUT; stub_printf(forcefield_missing_trigger_format, moby->oclass, ((short)moby->save_id)); } spawn_forcefield_contact_effects(moby, forcefield_data); break; case FORCEFIELD_STATE_FADE_OUT: - forcefield_data->unk4 -= frame_scale * 0.05f; - if (forcefield_data->unk4 < 0.0f) + forcefield_data->fade -= frame_scale * 0.05f; + if (forcefield_data->fade < 0.0f) moby->state = FORCEFIELD_STATE_REMOVE; else - moby->alpha = truncate_float_to_s32(forcefield_data->unk4 * 20.0f); + moby->alpha = truncate_float_to_s32(forcefield_data->fade * 20.0f); break; case FORCEFIELD_STATE_REMOVE: - if (forcefield_data->unkE != -1) { - release_point_light_slot(forcefield_data->unkE); - forcefield_data->unkE = -1; + if (forcefield_data->point_light_slot != -1) { + release_point_light_slot(forcefield_data->point_light_slot); + forcefield_data->point_light_slot = -1; } mark_moby_for_removal(moby); return; } wrap_adjusted_step = 0xC0; - forcefield_data->unkC += 0xC0; - if (forcefield_data->unkC > 0x1000) { - forcefield_data->unkC -= 0x1000; + forcefield_data->point_offset += 0xC0; + if (forcefield_data->point_offset > 0x1000) { + forcefield_data->point_offset -= 0x1000; wrap_adjusted_step = -0xF40; - } else if (forcefield_data->unkC < 0) { - forcefield_data->unkC += 0x1000; + } else if (forcefield_data->point_offset < 0) { + forcefield_data->point_offset += 0x1000; wrap_adjusted_step = 0x10C0; } offset_moby_class_point_pairs(((void *)moby->pclass), wrap_adjusted_step, 0); diff --git a/src/overlays/l13/mobys/gemlik_projectile.c b/src/overlays/l13/mobys/gemlik_projectile.c index c6a215aafd..ad9e12ceaa 100644 --- a/src/overlays/l13/mobys/gemlik_projectile.c +++ b/src/overlays/l13/mobys/gemlik_projectile.c @@ -95,11 +95,11 @@ void gemlik_projectile_update(struct Moby *moby) __asm__("FUN_L13_00306300"); typedef struct GemlikProjectileVars { u8 pad_0[0xC]; - f32 unkC; - f32 unk10[4]; - void *unk20; + f32 deflected_marker; /* 31337.6 once the hero has knocked it back */ + f32 launch_position[4]; + void *owner; s32 unk24; - f32 unk28; + f32 max_travel_distance; s32 timer_2C; } GemlikProjectileVars; @@ -128,13 +128,13 @@ void gemlik_projectile_update(struct Moby *moby) { work.velocity.z = 1.0f; flags = 0x10001; hero_bytes = (unsigned char *)((char *)((char *)&hero)); - if (hero_bytes[0x1FF6] != 0 && projectile_vars->unkC != 31337.6015625f && + if (hero_bytes[0x1FF6] != 0 && projectile_vars->deflected_marker != 31337.6015625f && fast_vec_dist(&moby->pos, hero_bytes + 0x80) < 2.0f) { fast_vec_normalize(projectile_vars, projectile_vars, 0.5f); fast_vec_sub(&moby->pos, &moby->pos, projectile_vars); qzero(projectile_vars); projectile_vars->timer_2C = 5; - projectile_vars->unkC = 31337.6015625f; + projectile_vars->deflected_marker = 31337.6015625f; for (i = 0; i < 6; i++) { unsigned char *hero_base = (unsigned char *)((char *)((char *)&hero)); ent = ((char **)(hero_base + 0x2020))[i]; @@ -170,7 +170,8 @@ void gemlik_projectile_update(struct Moby *moby) { work.hit[0x18] = 1; work.hit[0x19] = 1; stationary = projectile_vars->unk24 == 0; - if (projectile_vars->unk28 < vector_distance_xy(&moby->pos, projectile_vars->unk10) || + if (projectile_vars->max_travel_distance < + vector_distance_xy(&moby->pos, projectile_vars->launch_position) || fast_dec_timer(&projectile_vars->timer_2C) != 0) { if (moby->visible != 0) { int i; @@ -193,7 +194,7 @@ void gemlik_projectile_update(struct Moby *moby) { } goto remove; } - if (collision_line(&work.old_pos, &moby->pos, stationary, projectile_vars->unk20, work.hit) == + if (collision_line(&work.old_pos, &moby->pos, stationary, projectile_vars->owner, work.hit) == 0) goto bounds; qcopy(&moby->pos, &coll_hit_1638.point); diff --git a/src/overlays/l13/mobys/group_clear_trigger.c b/src/overlays/l13/mobys/group_clear_trigger.c index ba32bbb635..2ed46cdda0 100644 --- a/src/overlays/l13/mobys/group_clear_trigger.c +++ b/src/overlays/l13/mobys/group_clear_trigger.c @@ -40,8 +40,8 @@ void group_clear_trigger_update(struct Moby *moby) __asm__("FUN_L13_0030af50"); typedef struct GroupClearTriggerVars { u8 pad_0[0x20]; - s32 unk20; - s32 unk24; + s32 clear_state; + s32 clear_command; s32 clip_volume_28; } GroupClearTriggerVars; @@ -66,9 +66,9 @@ void group_clear_trigger_update(struct Moby *moby) { is_point_inside_clip_volume(clip_volume_subject_base + 0x80, moby_vars->clip_volume_28) == 0) return; - if (moby_vars->unk20 != -1) + if (moby_vars->clear_state != -1) moby->state = ((char *)moby_vars)[0x20]; - if (moby_vars->unk24 == -1) + if (moby_vars->clear_command == -1) return; moby->command = ((char *)moby_vars)[0x24]; } diff --git a/src/overlays/l13/mobys/help_hints.c b/src/overlays/l13/mobys/help_hints.c index 1fc24e7e20..1a7b765b48 100644 --- a/src/overlays/l13/mobys/help_hints.c +++ b/src/overlays/l13/mobys/help_hints.c @@ -23,8 +23,8 @@ void help_hints_update(struct Moby *moby) __asm__("FUN_L13_002f3778"); typedef struct HelpHintsVars { u8 pad_0[0x4]; - s32 unk4; - s32 unk8; + s32 linked_moby_index; + s32 clip_volume; } HelpHintsVars; /* Moby class 558 */ @@ -36,7 +36,7 @@ void help_hints_update(struct Moby *moby) { if (help_request_state[0] == 0 && help_request_state[9] == -1) { unsigned int hero_control_mode = *(unsigned int *)(&hero.state.control_mode); if ((hero_control_mode < 2 || hero_control_mode == 9) ? D_L13_0015F5C4 == 0 : 0) { - int linked_moby_index = linked_moby_volume_config->unk4; + int linked_moby_index = linked_moby_volume_config->linked_moby_index; char *linked_moby; if (linked_moby_index != -1) { linked_moby = moby_base + (linked_moby_index << 8); @@ -75,7 +75,8 @@ void help_hints_update(struct Moby *moby) { } } } - if (is_point_inside_clip_volume(&hero.motion.pos, linked_moby_volume_config->unk8) != 0) { + if (is_point_inside_clip_volume(&hero.motion.pos, linked_moby_volume_config->clip_volume) != + 0) { hero.vent_updraft = 0; } else { hero.vent_updraft = 1; diff --git a/src/overlays/l13/mobys/homing_rocket.c b/src/overlays/l13/mobys/homing_rocket.c index 836505c933..079cbfd1af 100644 --- a/src/overlays/l13/mobys/homing_rocket.c +++ b/src/overlays/l13/mobys/homing_rocket.c @@ -25,14 +25,14 @@ unsigned char *spawn_level_13_homing_rocket(char *owner_moby, typedef struct Level13HomingRocketVars { u8 pad_0[0x10]; - f32 unk10[4]; - char *unk20; - char *unk24; - s32 unk28; - f32 unk2C; + f32 target_position[4]; + char *owner; + char *target; + s32 expiry_timer; + f32 scale; s32 unk30; s32 unk34; - f32 unk38; + f32 max_speed; } Level13HomingRocketVars; unsigned char *spawn_level_13_homing_rocket(char *owner_moby, @@ -53,16 +53,16 @@ unsigned char *spawn_level_13_homing_rocket(char *owner_moby, MOBY(moby)->draw_dist = 0xFF; MOBY(moby)->visible = 1; MOBY(moby)->state = HOMING_ROCKET_STATE_INITIAL; - homing_rocket_vars->unk24 = target; - homing_rocket_vars->unk20 = owner_moby; + homing_rocket_vars->target = target; + homing_rocket_vars->owner = owner_moby; qcopy(moby + 0x10, rocket_spawn_position); qcopy(moby + 0x40, initial_rotation); { float *sp = &scale; - homing_rocket_vars->unk2C = *sp; + homing_rocket_vars->scale = *sp; } - homing_rocket_vars->unk38 = max_speed; - homing_rocket_vars->unk28 = initial_expiry_countdown; + homing_rocket_vars->max_speed = max_speed; + homing_rocket_vars->expiry_timer = initial_expiry_countdown; homing_rocket_vars->unk30 = 0; homing_rocket_vars->unk34 = 0; qcopy(homing_rocket_vars, ((char *)MOBY(owner_moby)->pvars) + 0xC0); @@ -70,8 +70,8 @@ unsigned char *spawn_level_13_homing_rocket(char *owner_moby, blend_moby_animation(moby, 1, 0, 10); } fast_vec_add(moby + 0x10, moby + 0x10, homing_rocket_vars); - if (homing_rocket_vars->unk24 != 0) { - qcopy(homing_rocket_vars->unk10, homing_rocket_vars->unk24 + 0x10); + if (homing_rocket_vars->target != 0) { + qcopy(homing_rocket_vars->target_position, homing_rocket_vars->target + 0x10); } MOBY(moby)->scale = MOBY(moby)->pclass->scale; update_entity(moby); diff --git a/src/overlays/l13/mobys/hovering_rocket_attacker.c b/src/overlays/l13/mobys/hovering_rocket_attacker.c index ea787c35e3..22adff0b21 100644 --- a/src/overlays/l13/mobys/hovering_rocket_attacker.c +++ b/src/overlays/l13/mobys/hovering_rocket_attacker.c @@ -89,24 +89,24 @@ typedef struct HoveringRocketAttackerVars { u8 pad_61[0x6]; u8 hit_reaction_interpolation_target; u8 pad_68[0x8]; - f32 unk70[4]; + f32 path_search_point[4]; u8 pad_80[0x30]; u8 *target; - s32 unkB4; + s32 target_selection_status; u8 pad_B8[0x8]; f32 hover_center[4]; - s32 unkD0; - s32 unkD4; - f32 unkD8; - u8 unkDC; + s32 search_path; + s32 table_point; + f32 target_range; + u8 yaw_velocity; u8 pad_DD[0xB]; s32 timer; - f32 unkEC; - f32 unkF0; - s32 unkF4; + f32 rocket_max_travel_distance; + f32 move_speed; + s32 fire_second_rocket; u8 *rocket1; u8 *rocket0; - f32 unk100[4]; + f32 hover_oscillation[4]; s32 voice_handle; } HoveringRocketAttackerVars; @@ -137,7 +137,7 @@ void hovering_rocket_attacker_update(unsigned char *moby) { moby_data->health = 4.0f; moby_data->max_health = 4; moby_data->unk28 = 3; - moby_data->unkEC = 15.0f; + moby_data->rocket_max_travel_distance = 15.0f; moby_data->unk58 = 50; moby_data->unk5A = 0; MOBY(moby)->draw_dist = 255; @@ -147,37 +147,38 @@ void hovering_rocket_attacker_update(unsigned char *moby) { MOBY(moby)->command = 0; moby_data->rocket0 = create_attached_rocket(moby, 0); moby_data->rocket1 = create_attached_rocket(moby, 1); - if (moby_data->unkD4 != -1) + if (moby_data->table_point != -1) MOBY(moby)->state = WAIT_TO_MOVE_TO_TABLE_POINT; else MOBY(moby)->state = TRACK_TARGET_BEFORE_ATTACK; - moby_data->unk100[0] = random_angle_radians(); - moby_data->unk100[2] = random_angle_radians(); - moby_data->unk100[3] = random_angle_radians(); + moby_data->hover_oscillation[0] = random_angle_radians(); + moby_data->hover_oscillation[2] = random_angle_radians(); + moby_data->hover_oscillation[3] = random_angle_radians(); moby_data->voice_handle = -1; break; case WAIT_TO_MOVE_TO_TABLE_POINT: - if (moby_data->unkB4 == 2) + if (moby_data->target_selection_status == 2) return; MOBY(moby)->command = 0; MOBY(moby)->state = MOVE_TO_TABLE_POINT; break; case MOVE_TO_TABLE_POINT: - index = moby_data->unkD4 * 128; + index = moby_data->table_point * 128; moby_position = (float *)&MOBY(moby)->pos; z[0] = 0.0f; distance_or_target_yaw = fast_vec_dist(moby_position, (char *)l13_cuboids + index + 0x30); - fast_vec_sub( - scratch_vector, (char *)l13_cuboids + moby_data->unkD4 * 128 + 0x30, moby_position); + fast_vec_sub(scratch_vector, + (char *)l13_cuboids + moby_data->table_point * 128 + 0x30, + moby_position); advance_accelerated_scalar(distance_or_target_yaw, frame_time_sq * 10.0f, frame_time_sq * 10.0f, frame_time * 20.0f, z, - &moby_data->unkF0); - fast_vec_normalize(scratch_vector, scratch_vector, moby_data->unkF0); + &moby_data->move_speed); + fast_vec_normalize(scratch_vector, scratch_vector, moby_data->move_speed); fast_vec_add(moby_position, moby_position, scratch_vector); - if (distance_or_target_yaw < 0.1f && moby_data->unkF0 < 0.01f) { + if (distance_or_target_yaw < 0.1f && moby_data->move_speed < 0.01f) { if (MOBY(moby)->prev_seq != 0) blend_moby_animation(moby, 0, 0, 10); MOBY(moby)->command = 0; @@ -189,14 +190,14 @@ void hovering_rocket_attacker_update(unsigned char *moby) { distance_or_target_yaw = fast_arc_tan(*(float *)(target + 0x10) - MOBY(moby)->pos.x, *(float *)(target + 0x14) - MOBY(moby)->pos.y); approach_angle(moby_yaw, - (float *)&moby_data->unkDC, + (float *)&moby_data->yaw_velocity, distance_or_target_yaw, frame_time_sq * 4.712389f, frame_time_sq * 4.712389f, frame_time * 10.12291f); - if (moby_data->unkB4 == 2) + if (moby_data->target_selection_status == 2) return; - moby_data->unkEC = 15.0f; + moby_data->rocket_max_travel_distance = 15.0f; MOBY(moby)->command = 1; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, 0); @@ -207,7 +208,7 @@ void hovering_rocket_attacker_update(unsigned char *moby) { distance_or_target_yaw = fast_arc_tan(*(float *)(target + 0x10) - MOBY(moby)->pos.x, *(float *)(target + 0x14) - MOBY(moby)->pos.y); approach_angle(moby_yaw, - (float *)&moby_data->unkDC, + (float *)&moby_data->yaw_velocity, distance_or_target_yaw, frame_time_sq * 12.566371f, frame_time_sq * 25.132742f, @@ -231,7 +232,7 @@ void hovering_rocket_attacker_update(unsigned char *moby) { case FIRE_ALTERNATING_SHOTS: if (fast_dec_timer(&moby_data->timer)) { moby_data->timer = scale_game_frames(60); - if (moby_data->unkF4 != 0) + if (moby_data->fire_second_rocket != 0) moby_point_position(moby, 1, scratch_vector); else moby_point_position(moby, 0, scratch_vector); @@ -239,33 +240,35 @@ void hovering_rocket_attacker_update(unsigned char *moby) { fast_vec_normalize(shot_direction_vector, shot_direction_vector, hovering_rocket_attacker_launch_vector_speed_gp * frame_time); - if (moby_data->unkF4 != 0) { + if (moby_data->fire_second_rocket != 0) { if ((void *)moby_data->rocket1) { launch_attached_rocket((void *)moby_data->rocket1, shot_direction_vector, target, - moby_data->unkEC); + moby_data->rocket_max_travel_distance); allocate_voice_for_target_entry(0, 0, (int)moby); } moby_data->rocket1 = create_attached_rocket(moby, 1); - moby_data->unkF4 = 0; + moby_data->fire_second_rocket = 0; } else { if ((void *)moby_data->rocket0) { launch_attached_rocket((void *)moby_data->rocket0, shot_direction_vector, target, - moby_data->unkEC); + moby_data->rocket_max_travel_distance); allocate_voice_for_target_entry(0, 0, (int)moby); } moby_data->rocket0 = create_attached_rocket(moby, 0); - moby_data->unkF4 = 1; + moby_data->fire_second_rocket = 1; } - moby_data->unkEC += 5.0f; - if (vector_distance_xy(moby + 0x10, target + 0x10) < moby_data->unkEC) - moby_data->unkEC = vector_distance_xy(moby + 0x10, target + 0x10); + moby_data->rocket_max_travel_distance += 5.0f; + if (vector_distance_xy(moby + 0x10, target + 0x10) < + moby_data->rocket_max_travel_distance) + moby_data->rocket_max_travel_distance = + vector_distance_xy(moby + 0x10, target + 0x10); } - if (moby_data->unkB4 != 2) + if (moby_data->target_selection_status != 2) return; if (MOBY(moby)->prev_seq != 4) blend_moby_animation(moby, 4, 0, 2); @@ -279,7 +282,7 @@ void hovering_rocket_attacker_update(unsigned char *moby) { blend_moby_animation(moby, 5, 0, 2); break; case SELECT_ATTACK_RESTART_OR_EXIT: - if (moby_data->unkB4 == 2) { + if (moby_data->target_selection_status == 2) { if (MOBY(moby)->prev_seq != 6) blend_moby_animation(moby, 6, 0, 2); MOBY(moby)->command = 6; @@ -292,7 +295,7 @@ void hovering_rocket_attacker_update(unsigned char *moby) { case WAIT_TO_COMPLETE_ATTACK_EXIT_SEQUENCE: if (!(MOBY(moby)->anim_flags & 2)) return; - if (moby_data->unkB4 == 2) { + if (moby_data->target_selection_status == 2) { if (MOBY(moby)->prev_seq != 0) blend_moby_animation(moby, 0, 0, 2); MOBY(moby)->state = TRACK_TARGET_BEFORE_ATTACK; @@ -407,16 +410,19 @@ void update_hovering_rocket_attacker_common(unsigned char *moby) { moby_data->voice_handle = -1; moby_data->voice_handle = FUN_L13_002c2d30_allocate(1, 4, moby); } - update_moby_vertical_oscillation( - 0.5f, frame_time * 1.39626336f, moby, moby_data->unk100, &moby_data->unk100[1]); + update_moby_vertical_oscillation(0.5f, + frame_time * 1.39626336f, + moby, + moby_data->hover_oscillation, + &moby_data->hover_oscillation[1]); update_moby_rotation_oscillation(moby, - &moby_data->unk100[2], - &moby_data->unk100[3], + &moby_data->hover_oscillation[2], + &moby_data->hover_oscillation[3], 0.104719758f, frame_time * 0.314159274f, frame_time * 0.366519153f); - MOBY(moby)->pos.x = moby_data->hover_center[0] + fast_sin(moby_data->unk100[2]); - MOBY(moby)->pos.y = moby_data->hover_center[1] + fast_sin(moby_data->unk100[3]); + MOBY(moby)->pos.x = moby_data->hover_center[0] + fast_sin(moby_data->hover_oscillation[2]); + MOBY(moby)->pos.y = moby_data->hover_center[1] + fast_sin(moby_data->hover_oscillation[3]); *(OvlQuad *)z = 0; fl = random_float_between(4.5f, 5.5f); downward_effect_z = -(fl * frame_time); @@ -531,27 +537,28 @@ void update_hovering_rocket_attacker_common(unsigned char *moby) { MOBY(moby)->hit_slot = 0xFF; trooper_anim_finish(moby, &moby_data->anim_state); if (MOBY(moby)->state == UPDATE_ATTACK_SEQUENCE) { - moby_data->unkD8 = 50.0f; + moby_data->target_range = 50.0f; } else { - moby_data->unkD8 = 40.0f; + moby_data->target_range = 40.0f; } { - char *target_selection_point_table = D_L13_001B07B0[moby_data->unkD0]; - target_selection_status = FUN_L00_0025ff38(moby_data->unkD8, + char *target_selection_point_table = D_L13_001B07B0[moby_data->search_path]; + target_selection_status = FUN_L00_0025ff38(moby_data->target_range, moby, - moby_data->unk70, + moby_data->path_search_point, 0, 0, target_selection_point_table + 0x10, *(int *)target_selection_point_table); } if (target_selection_status != TARGET_SELECTION_NO_TARGET) { - if (moby_data->unkD8 < vector_distance_xy(moby + 0x10, moby_data->unk70) || - 8.0f < absolute_float(MOBY(moby)->pos.z - moby_data->unk70[2])) { - moby_data->unkB4 = 2; + if (moby_data->target_range < + vector_distance_xy(moby + 0x10, moby_data->path_search_point) || + 8.0f < absolute_float(MOBY(moby)->pos.z - moby_data->path_search_point[2])) { + moby_data->target_selection_status = 2; } else if (MOBY(moby)->state != WAIT_TO_MOVE_TO_TABLE_POINT && collision_line(moby + 0x10, D_0013F350 + 0xD0, 2, moby, 0) != 0) { - moby_data->unkB4 = 2; + moby_data->target_selection_status = 2; } } if (*(int *)&moby_data->target == 0) { diff --git a/src/overlays/l13/mobys/linked_switch_group.c b/src/overlays/l13/mobys/linked_switch_group.c index fe68f3afba..be1a67639d 100644 --- a/src/overlays/l13/mobys/linked_switch_group.c +++ b/src/overlays/l13/mobys/linked_switch_group.c @@ -103,19 +103,19 @@ extern char linked_switch_closed_debug_format[] __asm__("D_L13_001F4DD0"); typedef struct { u8 pad0[0x20]; - float unk20; - short unk24; + float health; + short max_health; u8 pad26[0x4A]; - short unk70; - short unk72; - short unk74; + short group_timer; + short tick_sound_timer; + short hit; short opened_color_flash_timer; - u8 unk78; + u8 flash_blue; u8 is_group_follower; u8 reported_hit_count; u8 enumerated_group_entry_count; - int unk7C; - char *unk80; + int group_time_limit; + char *group_leader; short opened_state_duration; } SwitchVars; @@ -135,8 +135,8 @@ void linked_switch_group_update(char *moby) { SwitchVars *switch_vars = ((SwitchVars *)MOBY(moby)->pvars); int hit = 0; - if (switch_vars->unk74 == 0 && (unsigned char)(MOBY(moby)->state - 1) < 2) { - hit = process_linked_switch_damage((struct Moby *)moby, switch_vars, &switch_vars->unk20); + if (switch_vars->hit == 0 && (unsigned char)(MOBY(moby)->state - 1) < 2) { + hit = process_linked_switch_damage((struct Moby *)moby, switch_vars, &switch_vars->health); } switch ((unsigned char)MOBY(moby)->state) { case INITIALIZE_LINKED_GROUP: @@ -145,24 +145,24 @@ void linked_switch_group_update(char *moby) { char *linked; switch_vars->enumerated_group_entry_count = 0; - switch_vars->unk80 = moby; + switch_vars->group_leader = moby; get_first_moby_in_group(iter, (unsigned char)MOBY(moby)->group, 0, 0); while ((linked = *iter) != 0) { linked = iter[0]; if (linked != moby && *(short *)(linked + 0xA6) == 0xE7) { SwitchVars *other_data = *(SwitchVars **)(linked + 0x78); - other_data->unk80 = moby; + other_data->group_leader = moby; other_data->is_group_follower = 1; } switch_vars->enumerated_group_entry_count++; get_next_moby_in_group(iter, iter[0], 0, 0); } } - switch_vars->unk70 = 0; - switch_vars->unk72 = 0; + switch_vars->group_timer = 0; + switch_vars->tick_sound_timer = 0; switch_vars->reported_hit_count = 0; - switch_vars->unk74 = 0; + switch_vars->hit = 0; switch_vars->opened_color_flash_timer = 0; set_moby_color(moby, 0x80, 0x80, 0x80); @@ -170,36 +170,36 @@ void linked_switch_group_update(char *moby) { break; case MONITOR_LINKED_GROUP_HITS: case WAIT_FOR_LINKED_GROUP_COMPLETION: - if (switch_vars->unk74 == 0 && hit != 0) { + if (switch_vars->hit == 0 && hit != 0) { char *linked; SwitchVars *linked_data; - linked = switch_vars->unk80; + linked = switch_vars->group_leader; linked_data = *(SwitchVars **)(linked + 0x78); if ((unsigned char)linked[0x20] == 1) { switch_vars->reported_hit_count = 0; linked[0x20] = 2; - if (linked_data->unk7C > 0) { - linked_data->unk70 = scale_game_frames(switch_vars->unk7C); + if (linked_data->group_time_limit > 0) { + linked_data->group_timer = scale_game_frames(switch_vars->group_time_limit); } } linked_data->reported_hit_count++; allocate_voice_for_target_entry(3, 0, moby); set_moby_color(moby, 0, 0xFF, 0); - switch_vars->unk74 = 1; + switch_vars->hit = 1; } if ((unsigned char)MOBY(moby)->state == WAIT_FOR_LINKED_GROUP_COMPLETION) { if (switch_vars->reported_hit_count >= switch_vars->enumerated_group_entry_count) { set_moby_list_state((unsigned char)MOBY(moby)->group, 4); allocate_voice_for_target_entry(1, 0, moby); - switch_vars->unk70 = switch_vars->opened_state_duration; + switch_vars->group_timer = switch_vars->opened_state_duration; debug_print( D_L13_001F4D90, ((short)MOBY(moby)->save_id), MOBY(moby)->oclass, frame_count); MOBY(moby)->state = UPDATE_OPENED_STATE; } else { - if (switch_vars->unk7C >= 0) { - if (fast_dec_timer_s16(&switch_vars->unk70) != 0) { + if (switch_vars->group_time_limit >= 0) { + if (fast_dec_timer_s16(&switch_vars->group_timer) != 0) { switch_vars->reported_hit_count = 0; - switch_vars->unk74 = 0; + switch_vars->hit = 0; allocate_voice_for_target_entry(2, 0, moby); set_moby_list_state((unsigned char)MOBY(moby)->group, 3); @@ -208,11 +208,12 @@ void linked_switch_group_update(char *moby) { MOBY(moby)->oclass, frame_count); MOBY(moby)->state = RESET_HIT_STATE; - } else if (fast_dec_timer_s16(&switch_vars->unk72) != 0) { + } else if (fast_dec_timer_s16(&switch_vars->tick_sound_timer) != 0) { allocate_voice_for_target_entry(0, 0, moby); - switch_vars->unk72 = MIN(scale_game_frames(0x2D), - scale_game_frames(5) + - switch_vars->unk70 / scale_game_frames(0x28)); + switch_vars->tick_sound_timer = + MIN(scale_game_frames(0x2D), + scale_game_frames(5) + + switch_vars->group_timer / scale_game_frames(0x28)); } } } @@ -222,16 +223,16 @@ void linked_switch_group_update(char *moby) { set_moby_color(moby, 0x80, 0x80, 0x80); switch_vars->reported_hit_count = 0; - switch_vars->unk74 = 0; - switch_vars->unk20 = (float)switch_vars->unk24; + switch_vars->hit = 0; + switch_vars->health = (float)switch_vars->max_health; MOBY(moby)->state = MONITOR_LINKED_GROUP_HITS; break; case UPDATE_OPENED_STATE: - if (switch_vars->is_group_follower == 0 && switch_vars->unk70 != -1) { - if (fast_dec_timer_s16(&switch_vars->unk70) != 0) { + if (switch_vars->is_group_follower == 0 && switch_vars->group_timer != -1) { + if (fast_dec_timer_s16(&switch_vars->group_timer) != 0) { switch_vars->reported_hit_count = 0; - switch_vars->unk74 = 0; + switch_vars->hit = 0; allocate_voice_for_target_entry(2, 0, moby); set_moby_list_state((unsigned char)MOBY(moby)->group, 3); @@ -240,21 +241,21 @@ void linked_switch_group_update(char *moby) { MOBY(moby)->oclass, frame_count); MOBY(moby)->state = RESET_HIT_STATE; - } else if (fast_dec_timer_s16(&switch_vars->unk72) != 0) { + } else if (fast_dec_timer_s16(&switch_vars->tick_sound_timer) != 0) { allocate_voice_for_target_entry(0, 0, moby); - switch_vars->unk72 = + switch_vars->tick_sound_timer = MIN(scale_game_frames(0x2D), - scale_game_frames(5) + switch_vars->unk70 / scale_game_frames(0x28)); + scale_game_frames(5) + switch_vars->group_timer / scale_game_frames(0x28)); } } if (fast_dec_timer_s16(&switch_vars->opened_color_flash_timer) != 0) { switch_vars->opened_color_flash_timer = scale_game_frames(0x14); - if (switch_vars->unk78 != 0) { + if (switch_vars->flash_blue != 0) { set_moby_color(moby, 0, 0xFF, 0); - switch_vars->unk78 = 0; + switch_vars->flash_blue = 0; } else { set_moby_color(moby, 0, 0, 0xFF); - switch_vars->unk78 = 1; + switch_vars->flash_blue = 1; } } break; diff --git a/src/overlays/l13/mobys/moby_volume_trigger.c b/src/overlays/l13/mobys/moby_volume_trigger.c index 24720e0b4a..4b3c666989 100644 --- a/src/overlays/l13/mobys/moby_volume_trigger.c +++ b/src/overlays/l13/mobys/moby_volume_trigger.c @@ -23,35 +23,35 @@ void moby_volume_trigger_update(char *moby) __asm__("FUN_L13_002b0e80"); typedef struct MobyVolumeTriggerVars { u8 pad_0[0x4]; - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - s32 unk14; - s32 unk18; - s32 unk1C; - s32 unk20; - s8 unk24; + s32 first_moby; + s32 second_moby; + s32 third_moby; + s32 fourth_moby; + s32 first_moby_list; + s32 second_moby_list; + s32 third_moby_list; + s32 fourth_moby_list; + s8 first_moby_entry_state; s8 second_moby_entry_state; s8 third_moby_entry_state; s8 fourth_moby_entry_state; - s8 unk28; - s8 unk29; - s8 unk2A; + s8 first_moby_exit_state; + s8 second_moby_exit_state; + s8 third_moby_exit_state; s8 fourth_moby_exit_state; - s8 unk2C; + s8 first_list_entry_state; s8 second_list_entry_state; s8 third_list_entry_state; s8 fourth_list_entry_state; - s8 unk30; + s8 first_list_exit_state; s8 second_list_exit_state; s8 third_list_exit_state; s8 fourth_list_exit_state; - s8 unk34; + s8 trigger_entry_state; s8 trigger_exit_state; - s8 unk36; + s8 trigger_entry_command; s8 trigger_exit_command; - s8 unk38; + s8 hero_inside; } MobyVolumeTriggerVars; /* Moby class 6 */ @@ -63,26 +63,28 @@ void moby_volume_trigger_update(char *moby) { return; } if (is_point_inside_clip_volume(&hero.motion.pos, *(int *)volume_trigger_vars) != 0) { - if (volume_trigger_vars->unk38 == 0) { + if (volume_trigger_vars->hero_inside == 0) { { - int uid = volume_trigger_vars->unk4; + int uid = volume_trigger_vars->first_moby; if (uid != -1) { char *m = moby_base + (uid << 8); if (m != 0) { unsigned char st = m[0x20]; if (st != 0xFE) { if (st != 0xFD) { - if (volume_trigger_vars->unk24 != -1) - m[0x20] = volume_trigger_vars->unk24; + if (volume_trigger_vars->first_moby_entry_state != -1) + m[0x20] = volume_trigger_vars->first_moby_entry_state; } } } } } - if (volume_trigger_vars->unk14 != -1 && volume_trigger_vars->unk2C != -1) - set_moby_list_state(volume_trigger_vars->unk14, volume_trigger_vars->unk2C); + if (volume_trigger_vars->first_moby_list != -1 && + volume_trigger_vars->first_list_entry_state != -1) + set_moby_list_state(volume_trigger_vars->first_moby_list, + volume_trigger_vars->first_list_entry_state); { - int uid = volume_trigger_vars->unk8; + int uid = volume_trigger_vars->second_moby; if (uid != -1) { char *m = moby_base + (uid << 8); if (m != 0) { @@ -96,12 +98,12 @@ void moby_volume_trigger_update(char *moby) { } } } - if (volume_trigger_vars->unk18 != -1 && + if (volume_trigger_vars->second_moby_list != -1 && volume_trigger_vars->second_list_entry_state != -1) - set_moby_list_state(volume_trigger_vars->unk18, + set_moby_list_state(volume_trigger_vars->second_moby_list, volume_trigger_vars->second_list_entry_state); { - int uid = volume_trigger_vars->unkC; + int uid = volume_trigger_vars->third_moby; if (uid != -1) { char *m = moby_base + (uid << 8); if (m != 0) { @@ -115,12 +117,12 @@ void moby_volume_trigger_update(char *moby) { } } } - if (volume_trigger_vars->unk1C != -1 && + if (volume_trigger_vars->third_moby_list != -1 && volume_trigger_vars->third_list_entry_state != -1) - set_moby_list_state(volume_trigger_vars->unk1C, + set_moby_list_state(volume_trigger_vars->third_moby_list, volume_trigger_vars->third_list_entry_state); { - int uid = volume_trigger_vars->unk10; + int uid = volume_trigger_vars->fourth_moby; if (uid != -1) { char *m = moby_base + (uid << 8); if (m != 0) { @@ -134,75 +136,77 @@ void moby_volume_trigger_update(char *moby) { } } } - if (volume_trigger_vars->unk20 != -1 && + if (volume_trigger_vars->fourth_moby_list != -1 && volume_trigger_vars->fourth_list_entry_state != -1) - set_moby_list_state(volume_trigger_vars->unk20, + set_moby_list_state(volume_trigger_vars->fourth_moby_list, volume_trigger_vars->fourth_list_entry_state); - if (volume_trigger_vars->unk34 != -1) - MOBY(moby)->state = volume_trigger_vars->unk34; - if (volume_trigger_vars->unk36 != -1) - MOBY(moby)->command = volume_trigger_vars->unk36; - volume_trigger_vars->unk38 = 1; + if (volume_trigger_vars->trigger_entry_state != -1) + MOBY(moby)->state = volume_trigger_vars->trigger_entry_state; + if (volume_trigger_vars->trigger_entry_command != -1) + MOBY(moby)->command = volume_trigger_vars->trigger_entry_command; + volume_trigger_vars->hero_inside = 1; } } else { - if (volume_trigger_vars->unk38 == 1) { + if (volume_trigger_vars->hero_inside == 1) { { - int uid = volume_trigger_vars->unk4; + int uid = volume_trigger_vars->first_moby; if (uid != -1) { char *m = moby_base + (uid << 8); if (m != 0) { unsigned char st = m[0x20]; if (st != 0xFE) { if (st != 0xFD) { - if (volume_trigger_vars->unk28 != -1) - m[0x20] = volume_trigger_vars->unk28; + if (volume_trigger_vars->first_moby_exit_state != -1) + m[0x20] = volume_trigger_vars->first_moby_exit_state; } } } } } - if (volume_trigger_vars->unk14 != -1 && volume_trigger_vars->unk30 != -1) - set_moby_list_state(volume_trigger_vars->unk14, volume_trigger_vars->unk30); + if (volume_trigger_vars->first_moby_list != -1 && + volume_trigger_vars->first_list_exit_state != -1) + set_moby_list_state(volume_trigger_vars->first_moby_list, + volume_trigger_vars->first_list_exit_state); { - int uid = volume_trigger_vars->unk8; + int uid = volume_trigger_vars->second_moby; if (uid != -1) { char *m = moby_base + (uid << 8); if (m != 0) { unsigned char st = m[0x20]; if (st != 0xFE) { if (st != 0xFD) { - if (volume_trigger_vars->unk29 != -1) - m[0x20] = volume_trigger_vars->unk29; + if (volume_trigger_vars->second_moby_exit_state != -1) + m[0x20] = volume_trigger_vars->second_moby_exit_state; } } } } } - if (volume_trigger_vars->unk18 != -1 && + if (volume_trigger_vars->second_moby_list != -1 && volume_trigger_vars->second_list_exit_state != -1) - set_moby_list_state(volume_trigger_vars->unk18, + set_moby_list_state(volume_trigger_vars->second_moby_list, volume_trigger_vars->second_list_exit_state); { - int uid = volume_trigger_vars->unkC; + int uid = volume_trigger_vars->third_moby; if (uid != -1) { char *m = moby_base + (uid << 8); if (m != 0) { unsigned char st = m[0x20]; if (st != 0xFE) { if (st != 0xFD) { - if (volume_trigger_vars->unk2A != -1) - m[0x20] = volume_trigger_vars->unk2A; + if (volume_trigger_vars->third_moby_exit_state != -1) + m[0x20] = volume_trigger_vars->third_moby_exit_state; } } } } } - if (volume_trigger_vars->unk1C != -1 && + if (volume_trigger_vars->third_moby_list != -1 && volume_trigger_vars->third_list_exit_state != -1) - set_moby_list_state(volume_trigger_vars->unk1C, + set_moby_list_state(volume_trigger_vars->third_moby_list, volume_trigger_vars->third_list_exit_state); { - int uid = volume_trigger_vars->unk10; + int uid = volume_trigger_vars->fourth_moby; if (uid != -1) { char *m = moby_base + (uid << 8); if (m != 0) { @@ -216,15 +220,15 @@ void moby_volume_trigger_update(char *moby) { } } } - if (volume_trigger_vars->unk20 != -1 && + if (volume_trigger_vars->fourth_moby_list != -1 && volume_trigger_vars->fourth_list_exit_state != -1) - set_moby_list_state(volume_trigger_vars->unk20, + set_moby_list_state(volume_trigger_vars->fourth_moby_list, volume_trigger_vars->fourth_list_exit_state); if (volume_trigger_vars->trigger_exit_state != -1) MOBY(moby)->state = volume_trigger_vars->trigger_exit_state; if (volume_trigger_vars->trigger_exit_command != -1) MOBY(moby)->command = volume_trigger_vars->trigger_exit_command; - volume_trigger_vars->unk38 = 0; + volume_trigger_vars->hero_inside = 0; } } } From 5d52a7fa47e17eae5d815e77fe52d60c6612220e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:10:45 +0000 Subject: [PATCH 037/213] decomp: name cutscene trigger and scientist fields in level 15 --- .../l15/mobys/quartu_cutscene_trigger.c | 14 +++++----- src/overlays/l15/mobys/ultramech_scientist.c | 26 ++++++++++--------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/overlays/l15/mobys/quartu_cutscene_trigger.c b/src/overlays/l15/mobys/quartu_cutscene_trigger.c index 20ab0366f2..443c2bd63d 100644 --- a/src/overlays/l15/mobys/quartu_cutscene_trigger.c +++ b/src/overlays/l15/mobys/quartu_cutscene_trigger.c @@ -39,8 +39,8 @@ void quartu_cutscene_trigger_update(struct Moby *moby) __asm__("FUN_L15_002eb4c0 typedef struct QuartuCutsceneTriggerVars { u8 pad_0[0x4]; - s32 unk4; - s32 unk8; + s32 camera_cuboid; + s32 watched_moby_index; } QuartuCutsceneTriggerVars; /* Moby class 1419 */ @@ -62,7 +62,7 @@ void quartu_cutscene_trigger_update(struct Moby *moby) { break; if (is_point_inside_clip_volume(&hero.motion.pos, *(int *)trigger_data) == 0) break; - if (((unsigned char *)l15_moby_array)[(trigger_data->unk8 << 8) + 0x20] != 3) + if (((unsigned char *)l15_moby_array)[(trigger_data->watched_moby_index << 8) + 0x20] != 3) break; start_scene(3); moby->state = CUTSCENE_TRIGGER_WAIT_FOR_FIRST_SCENE; @@ -80,8 +80,8 @@ void quartu_cutscene_trigger_update(struct Moby *moby) { start_scene(4); moby->state = CUTSCENE_TRIGGER_FINALIZE_AND_SAVE; update_hero_item_moby_flags(); - if (trigger_data->unk4 != -1) { - char *o = D_L15_001600EC + (trigger_data->unk4 << 7); + if (trigger_data->camera_cuboid != -1) { + char *o = D_L15_001600EC + (trigger_data->camera_cuboid << 7); set_race_camera(o + 0x30, o + 0x70, 0, 1); } } @@ -89,8 +89,8 @@ void quartu_cutscene_trigger_update(struct Moby *moby) { case CUTSCENE_TRIGGER_FINALIZE_AND_SAVE: if (D_L15_0015F5C4 != 2) { unlock_planet(0x11); - if (trigger_data->unk4 != -1) { - char *o = D_L15_001600EC + (trigger_data->unk4 << 7); + if (trigger_data->camera_cuboid != -1) { + char *o = D_L15_001600EC + (trigger_data->camera_cuboid << 7); jet_reset_camera(o + 0x30, o + 0x70); } queue_planet_unlock_message(0x11); diff --git a/src/overlays/l15/mobys/ultramech_scientist.c b/src/overlays/l15/mobys/ultramech_scientist.c index db2ac35709..10e2341012 100644 --- a/src/overlays/l15/mobys/ultramech_scientist.c +++ b/src/overlays/l15/mobys/ultramech_scientist.c @@ -76,21 +76,21 @@ typedef struct UltramechScientistVars { s16 unk36; u8 pad_38[0x108]; s32 unk140; - s32 unk144; + s32 first_pre_scene_moby_group_index; s32 pre_scene_moby_group_index; s32 scene_animation_moby_index; - s32 unk150; + s32 camera_reset_cuboid; s32 pre_scene_camera_transform_index; s32 moby_to_remove_index; s32 timer_15C; u8 primary_gaze_joint_animation; u8 pad_161[0x63]; f32 primary_gaze_pitch_target; - f32 unk1C8; + f32 primary_gaze_yaw_target; u8 pad_1CC[0x4]; - f32 unk1D0; + f32 head_scale; u8 pad_1D4[0xC]; - u8 unk1E0; + u8 secondary_gaze_joint_animation; u8 pad_1E1[0x67]; f32 secondary_gaze_yaw_target; u8 pad_24C[0x14]; @@ -249,10 +249,11 @@ void ultramech_scientist_update(struct Moby *moby) { } moby->anim_speed = 1.0f; if (ultramech_scientist_private_data->unk4 == 0) { - if (ultramech_scientist_private_data->unk150 != -1) { + if (ultramech_scientist_private_data->camera_reset_cuboid != -1) { char *paths = D_L15_001600EC; - FUN_L00_00284e50(paths + (ultramech_scientist_private_data->unk150 << 7) + 0x30, - paths + (ultramech_scientist_private_data->unk150 << 7) + 0x70); + FUN_L00_00284e50( + paths + (ultramech_scientist_private_data->camera_reset_cuboid << 7) + 0x30, + paths + (ultramech_scientist_private_data->camera_reset_cuboid << 7) + 0x70); } moby->state = ULTRAMECH_SCIENTIST_WAIT_FOR_PRE_SCENE_CONDITIONS; } else { @@ -278,7 +279,8 @@ void ultramech_scientist_update(struct Moby *moby) { } } } - if (count_active_moby_group_members(ultramech_scientist_private_data->unk144, 0x40) != 0) { + if (count_active_moby_group_members( + ultramech_scientist_private_data->first_pre_scene_moby_group_index, 0x40) != 0) { break; } if (count_active_moby_group_members( @@ -435,12 +437,12 @@ void ultramech_scientist_update(struct Moby *moby) { } else if (pitch < -0.5235988f) { pitch = -0.5235988f; } - ultramech_scientist_private_data->unk1C8 = yaw * 0.5f; + ultramech_scientist_private_data->primary_gaze_yaw_target = yaw * 0.5f; ultramech_scientist_private_data->primary_gaze_pitch_target = pitch * 1.25f; ultramech_scientist_private_data->secondary_gaze_yaw_target = yaw * 0.5f; } if (big_head_cheat_enabled_macro[0] != 0) { - ultramech_scientist_private_data->unk1D0 = 2.75f; + ultramech_scientist_private_data->head_scale = 2.75f; } update_joint_animation(moby, &ultramech_scientist_private_data->primary_gaze_joint_animation, @@ -448,7 +450,7 @@ void ultramech_scientist_update(struct Moby *moby) { ease_rate * frame_scale_sq_gp, ease_limit * frame_scale_sq_gp); update_joint_animation(moby, - &ultramech_scientist_private_data->unk1E0, + &ultramech_scientist_private_data->secondary_gaze_joint_animation, 0, ease_rate * frame_scale_sq_gp, ease_limit * frame_scale_sq_gp); From d7c974865ce69c9ccbc678fc71633899b5f67b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:10:45 +0000 Subject: [PATCH 038/213] decomp: name hoverboard dummy, chomper, conveyor and bomb fields in level 16 --- src/overlays/l16/mobys/bomb.c | 16 ++-- src/overlays/l16/mobys/chicken_relocator.c | 8 +- src/overlays/l16/mobys/chomper.c | 45 ++++++----- src/overlays/l16/mobys/conveyor_belt.c | 54 ++++++------- src/overlays/l16/mobys/gadgetron_ceo.c | 12 +-- .../l16/mobys/path_following_rocket.c | 26 +++---- .../l16/mobys/test_dummy_on_hoverboard.c | 77 ++++++++++--------- 7 files changed, 122 insertions(+), 116 deletions(-) diff --git a/src/overlays/l16/mobys/bomb.c b/src/overlays/l16/mobys/bomb.c index d2c783bbe4..c36741fb90 100644 --- a/src/overlays/l16/mobys/bomb.c +++ b/src/overlays/l16/mobys/bomb.c @@ -183,10 +183,10 @@ typedef struct ThrownBombVars { u8 pad_0[0xC]; s16 unkC; s16 unkE; - f32 unk10[4]; - s32 unk20; - f32 unk24; - s32 unk28; + f32 velocity[4]; + s32 thrower; + f32 gravity; + s32 fuse_timer; } ThrownBombVars; unsigned char *spawn_thrown_bomb( @@ -204,13 +204,13 @@ unsigned char *spawn_thrown_bomb( moby[0x31] = 1; moby[0x20] = 1; MOBY(moby)->draw_dist = 0xFF; - thrown_bomb_data->unk20 = thrower_moby; - thrown_bomb_data->unk24 = gravity; - thrown_bomb_data->unk28 = fuse_frames; + thrown_bomb_data->thrower = thrower_moby; + thrown_bomb_data->gravity = gravity; + thrown_bomb_data->fuse_timer = fuse_frames; thrown_bomb_data->unkC = scale_game_frames(5); thrown_bomb_data->unkE = scale_game_frames(0xF); qcopy(moby + 0x10, spawn_position); - qcopy(thrown_bomb_data->unk10, initial_velocity); + qcopy(thrown_bomb_data->velocity, initial_velocity); MOBY(moby)->rot.x = random_float_between(-180.0f, 180.0f) * DEG_TO_RAD; MOBY(moby)->rot.z = fast_arc_tan(initial_velocity[0], initial_velocity[1]) + 1.5707964f; update_entity(moby); diff --git a/src/overlays/l16/mobys/chicken_relocator.c b/src/overlays/l16/mobys/chicken_relocator.c index 0bebec367a..4638492354 100644 --- a/src/overlays/l16/mobys/chicken_relocator.c +++ b/src/overlays/l16/mobys/chicken_relocator.c @@ -78,8 +78,8 @@ void reposition_moby_with_collision_check(struct Moby *moby, typedef struct ChickenRelocatorVars { u8 pad_0[0x4]; - s32 unk4; - s32 unk8; + s32 target_moby_index; + s32 clip_volume; s32 timer_C; u8 pad_10[0x56]; s16 reposition_timer; @@ -212,9 +212,9 @@ void chicken_relocator_update(struct Moby *moby) { char *target; int target_status; float pos[4]; - if (!is_point_inside_clip_volume(hero_position, target_cycle_data->unk8)) + if (!is_point_inside_clip_volume(hero_position, target_cycle_data->clip_volume)) return; - target = D_L16_0015FFD8 + (target_cycle_data->unk4 << 8); + target = D_L16_0015FFD8 + (target_cycle_data->target_moby_index << 8); switch (moby->state) { case TARGET_CYCLE_INITIALIZE_DELAY: moby->state = TARGET_CYCLE_WAIT_TO_TRIGGER; diff --git a/src/overlays/l16/mobys/chomper.c b/src/overlays/l16/mobys/chomper.c index eb91936bb2..68f3a9687d 100644 --- a/src/overlays/l16/mobys/chomper.c +++ b/src/overlays/l16/mobys/chomper.c @@ -69,8 +69,8 @@ void chomper_update(struct Moby *m) __asm__("FUN_L16_002e5e08"); typedef struct ChomperVars { u8 pad_0[0x20]; - f32 unk20; - u16 unk24; + f32 health; + u16 max_health; u8 pad_26[0x2]; u8 unk28; u8 pad_29[0x2F]; @@ -82,15 +82,18 @@ typedef struct ChomperVars { u8 pad_CA[0x6]; s32 unkD0; u8 pad_D4[0x4C]; - u8 unk120; + u8 motion; u8 pad_121[0x5F]; - f32 unk180[4]; + f32 path_search_point[4]; u8 pad_190[0x34]; s32 pursuit_target_selection_status; u8 pad_1C8[0x8]; - f32 unk1D0[4]; + f32 home_position[4]; u8 pad_1E0[0x10]; - f32 unk1F0[4]; + s32 path; /* 0x1F0: index into D_L16_001B0930, -1: none */ + f32 yaw_velocity; + f32 heading_offset; + u8 pad_1FC[0x4]; u8 pad_200[0x4]; f32 travel_distance_velocity; f32 previous_height_drop; @@ -109,17 +112,17 @@ void chomper_update(struct Moby *chomper_moby) { } switch (chomper_moby->state) { case CHOMPER_INITIALIZE: - if (*(int *)&chomper_data->unk1F0[0] == -1) { + if (chomper_data->path == -1) { mark_moby_for_removal(chomper_moby); return; } - chomper_data->unk24 = 1; + chomper_data->max_health = 1; chomper_data->unk28 = 0; - chomper_data->unk20 = 1.0f; + chomper_data->health = 1.0f; chomper_data->unkD0 = (int)&D_L16_00161E48; if (rand() & 1) chomper_moby->flags |= 0x8000; - qcopy(chomper_data->unk1D0, &chomper_moby->pos); + qcopy(chomper_data->home_position, &chomper_moby->pos); chomper_moby->state = CHOMPER_WAIT_TO_APPROACH_TARGET; if (chomper_moby->prev_seq != 2) blend_moby_animation(chomper_moby, 2, 0, scale_game_frames(20)); @@ -137,7 +140,7 @@ void chomper_update(struct Moby *chomper_moby) { case 3: break; case CHOMPER_APPROACH_TARGET: - if (move_chomper_toward_position(chomper_moby, chomper_data->unk180) < 1.25f) { + if (move_chomper_toward_position(chomper_moby, chomper_data->path_search_point) < 1.25f) { chomper_moby->state = CHOMPER_FACE_TARGET; if (chomper_moby->prev_seq != 1) blend_moby_animation(chomper_moby, 1, 0, scale_game_frames(20)); @@ -146,10 +149,10 @@ void chomper_update(struct Moby *chomper_moby) { break; case CHOMPER_FACE_TARGET: { float *yaw = &chomper_moby->rot.z; - float angle = fast_arc_tan(chomper_data->unk180[0] - chomper_moby->pos.x, - chomper_data->unk180[1] - chomper_moby->pos.y); + float angle = fast_arc_tan(chomper_data->path_search_point[0] - chomper_moby->pos.x, + chomper_data->path_search_point[1] - chomper_moby->pos.y); approach_angle(yaw, - &chomper_data->unk1F0[1], + &chomper_data->yaw_velocity, angle, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, @@ -157,7 +160,7 @@ void chomper_update(struct Moby *chomper_moby) { if (is_value_within_interpolated_window(chomper_moby, 13.0f)) { collect_mobies_in_sphere_at_moby_point(chomper_moby, 0, 1, 0.333f, 1.0f, 1.0f, 0, 1, 0); } else if ((chomper_moby->anim_flags & 2) && - fast_vec_dist(&chomper_moby->pos, chomper_data->unk180) > 1.5f) { + fast_vec_dist(&chomper_moby->pos, chomper_data->path_search_point) > 1.5f) { chomper_moby->state = CHOMPER_APPROACH_TARGET; if (chomper_moby->prev_seq != 0) blend_moby_animation(chomper_moby, 0, 0, scale_game_frames(20)); @@ -165,7 +168,7 @@ void chomper_update(struct Moby *chomper_moby) { break; } case CHOMPER_RETURN_HOME: - if (move_chomper_toward_position(chomper_moby, chomper_data->unk1D0) < 1.0f) { + if (move_chomper_toward_position(chomper_moby, chomper_data->home_position) < 1.0f) { chomper_moby->state = CHOMPER_WAIT_TO_APPROACH_TARGET; if (chomper_moby->prev_seq != 2) blend_moby_animation(chomper_moby, 2, 0, scale_game_frames(20)); @@ -173,13 +176,13 @@ void chomper_update(struct Moby *chomper_moby) { chomper_moby->state = CHOMPER_APPROACH_TARGET; break; case 7: - if (FUN_L00_002dc9f0(chomper_moby, &chomper_data->unk120)) { + if (FUN_L00_002dc9f0(chomper_moby, &chomper_data->motion)) { chomper_moby->state = CHOMPER_WAIT_TO_APPROACH_TARGET; chomper_data->unkC8 = 0; } break; case CHOMPER_KNOCKBACK: - if (step_moby_motion(chomper_moby, &chomper_data->unk120) & 0x140) { + if (step_moby_motion(chomper_moby, &chomper_data->motion) & 0x140) { cart_burst(chomper_moby, &chomper_moby->pos, 6, 0.5f, 13.0f); FUN_L00_00257470(chomper_moby, 0, -1); mark_moby_for_removal(chomper_moby); @@ -339,12 +342,12 @@ float move_chomper_toward_position(void *m_v, void *t_v) { float oldz; float target_yaw = fast_arc_tan(target_position[0] - MOBY(moby)->pos.x, target_position[1] - MOBY(moby)->pos.y); - target_yaw = fast_add_rotations(target_yaw, moby_data->unk1F0[2]); + target_yaw = fast_add_rotations(target_yaw, moby_data->heading_offset); oldz = MOBY(moby)->pos.z; interpolated_travel_distance = 0.0f; distance_to_target = fast_vec_dist(moby + 0x10, target_position); approach_angle((float *)&MOBY(moby)->rot.z, - &moby_data->unk1F0[1], + &moby_data->yaw_velocity, target_yaw, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, @@ -359,7 +362,7 @@ float move_chomper_toward_position(void *m_v, void *t_v) { movement_delta[2] = moby_data->previous_height_drop - frame_time_sq * 10.0f; FUN_L00_00258830(moby, movement_delta, 0.5f, 0.5f, 0.0f, 0x10); resolve_point_path_segment_xy_clearance( - 0.333f, *(void **)&moby_data->unk1F0[0], moby + 0x10, moby + 0x10); + 0.333f, *(void **)&moby_data->path, moby + 0x10, moby + 0x10); moby_data->previous_height_drop = oldz - MOBY(moby)->pos.z; return distance_to_target; } diff --git a/src/overlays/l16/mobys/conveyor_belt.c b/src/overlays/l16/mobys/conveyor_belt.c index b714afa36b..beeb163ec1 100644 --- a/src/overlays/l16/mobys/conveyor_belt.c +++ b/src/overlays/l16/mobys/conveyor_belt.c @@ -41,12 +41,12 @@ void conveyor_belt_update(struct Moby *m) __asm__("FUN_L16_002c9878"); typedef struct ConveyorBeltVars { u8 pad_0[0x5C]; s32 unk5C; - s32 unk60; + s32 belt_cuboid; s32 clip_volume_64; s32 clip_volume_68; - f32 unk6C; - f32 unk70; - s32 unk74; + f32 belt_speed; + f32 uv_scroll; + s32 voice; } ConveyorBeltVars; /* Moby class 471 */ @@ -65,18 +65,18 @@ void conveyor_belt_update(struct Moby *moby) { conveyor_data->unk5C |= 4; moby->visible = 0; moby->flags |= one; - if (conveyor_data->unk60 == -1) { + if (conveyor_data->belt_cuboid == -1) { moby->flags |= 2; } else { moby->state = CONVEYOR_BELT_STATE_APPROACH_NEGATED_SPEED; } - conveyor_data->unk74 = -1; + conveyor_data->voice = -1; break; case CONVEYOR_BELT_STATE_APPROACH_NEGATED_SPEED: target = -(conveyor_belt_base_speed_gp * D_0015ED6C); - if (conveyor_data->unk6C != target) { - approach_value(&conveyor_data->unk6C, target, frame_time_sq * 12.0f); - fast_vec_normalize(conveyor_motion_vector, &moby->rot_row0, conveyor_data->unk6C); + if (conveyor_data->belt_speed != target) { + approach_value(&conveyor_data->belt_speed, target, frame_time_sq * 12.0f); + fast_vec_normalize(conveyor_motion_vector, &moby->rot_row0, conveyor_data->belt_speed); update_conveyor_group_motion_transforms(moby->group, conveyor_motion_vector); } if (is_point_inside_clip_volume(&hero.motion.pos, conveyor_data->clip_volume_68)) @@ -85,9 +85,9 @@ void conveyor_belt_update(struct Moby *moby) { break; case CONVEYOR_BELT_STATE_APPROACH_BASE_SPEED: target = conveyor_belt_base_speed_gp * D_0015ED6C; - if (conveyor_data->unk6C != target) { - approach_value(&conveyor_data->unk6C, target, frame_time_sq * 12.0f); - fast_vec_normalize(conveyor_motion_vector, &moby->rot_row0, conveyor_data->unk6C); + if (conveyor_data->belt_speed != target) { + approach_value(&conveyor_data->belt_speed, target, frame_time_sq * 12.0f); + fast_vec_normalize(conveyor_motion_vector, &moby->rot_row0, conveyor_data->belt_speed); update_conveyor_group_motion_transforms(moby->group, conveyor_motion_vector); } if (is_point_inside_clip_volume(&hero.motion.pos, conveyor_data->clip_volume_64)) @@ -125,7 +125,7 @@ void update_conveyor_group_voice(struct Moby *moby) { } } while (*group_entry++ >= 0); if (fast_vec_dist(nearest + 0x10, D_L16_001671C0) < 64.0f) { - int voice_slot_index = moby_data->unk74; + int voice_slot_index = moby_data->voice; char *slot; if (voice_slot_index >= 0) { char *target; @@ -133,18 +133,18 @@ void update_conveyor_group_voice(struct Moby *moby) { target = *(char **)(slot + 0x88); if (target && *(short *)(target + 0xA6) == 0x1D7) { fast_vec_normalize(voice_position_offset, nearest + 0xE0, 2.5f); - fast_vec_add((char *)&voice_pool + 0x90 + moby_data->unk74 * 0x70, + fast_vec_add((char *)&voice_pool + 0x90 + moby_data->voice * 0x70, voice_position_offset, nearest + 0x10); - *(char **)((char *)&voice_pool + 0x88 + moby_data->unk74 * 0x70) = nearest; + *(char **)((char *)&voice_pool + 0x88 + moby_data->voice * 0x70) = nearest; return; } } voice_slot_index = allocate_voice_for_target_entry(0, 13, nearest); - moby_data->unk74 = voice_slot_index; + moby_data->voice = voice_slot_index; if (voice_slot_index >= 0) { fast_vec_normalize(voice_position_offset, &moby->rot_row2, 2.5f); - fast_vec_add((char *)&voice_pool + 0x90 + moby_data->unk74 * 0x70, + fast_vec_add((char *)&voice_pool + 0x90 + moby_data->voice * 0x70, voice_position_offset, &moby->pos); } @@ -206,17 +206,17 @@ extern void draw_geometry_quad_u(void *, void *, int) __asm__("draw_geometry_qua void draw_conveyor_belt_strips(struct Moby *moby) { L16RibbonPacket_u packets[2]; ConveyorBeltVars *conveyor_data = (ConveyorBeltVars *)moby->pvars; - float scale = fast_vec_length(D_L16_001600EC_m + ((conveyor_data->unk60) << 7)) * 2.001f; + float scale = fast_vec_length(D_L16_001600EC_m + ((conveyor_data->belt_cuboid) << 7)) * 2.001f; int count = truncate_float_to_s32(scale); float step = 2.0f / scale; int period, tint, color, limit, j; float phase; long modebits, flags; - (conveyor_data->unk70) = (conveyor_data->unk70) + (conveyor_data->unk6C); - if ((conveyor_data->unk70) > 1.0f) - (conveyor_data->unk70) -= 1.0f; - else if ((conveyor_data->unk70) < 0.0f) - (conveyor_data->unk70) += 1.0f; + (conveyor_data->uv_scroll) = (conveyor_data->uv_scroll) + (conveyor_data->belt_speed); + if ((conveyor_data->uv_scroll) > 1.0f) + (conveyor_data->uv_scroll) -= 1.0f; + else if ((conveyor_data->uv_scroll) < 0.0f) + (conveyor_data->uv_scroll) += 1.0f; modebits = 0x8000000000L; period = scale_game_frames(120); flags = 0xFF9000000260L; @@ -246,7 +246,7 @@ void draw_conveyor_belt_strips(struct Moby *moby) { for (vertex = 0; vertex < 4; vertex++) { packets[0].uv[vertex].u = D_L16_001D2FF0[vertex][0]; packets[0].uv[vertex].v = D_L16_001D2FF0[vertex][1]; - packets[1].uv[vertex].u = D_L16_001D3010[vertex][0] - (conveyor_data->unk70); + packets[1].uv[vertex].u = D_L16_001D3010[vertex][0] - (conveyor_data->uv_scroll); packets[1].uv[vertex].v = D_L16_001D3010[vertex][1]; packets[0].color[vertex] = tint; packets[1].color[vertex] = color; @@ -279,8 +279,10 @@ void draw_conveyor_belt_strips(struct Moby *moby) { packets[1].color[1] = color; packets[1].color[0] = color; } - draw_geometry_quad_u(&packets[0], D_L16_001600EC_m + ((conveyor_data->unk60) << 7), 0); - draw_geometry_quad_u(&packets[1], D_L16_001600EC_m + ((conveyor_data->unk60) << 7), 0); + draw_geometry_quad_u( + &packets[0], D_L16_001600EC_m + ((conveyor_data->belt_cuboid) << 7), 0); + draw_geometry_quad_u( + &packets[1], D_L16_001600EC_m + ((conveyor_data->belt_cuboid) << 7), 0); { float *point = packets[0].point[0]; for (j = 3; j >= 0; j--) { diff --git a/src/overlays/l16/mobys/gadgetron_ceo.c b/src/overlays/l16/mobys/gadgetron_ceo.c index 7e65642a5c..3df5d67ad7 100644 --- a/src/overlays/l16/mobys/gadgetron_ceo.c +++ b/src/overlays/l16/mobys/gadgetron_ceo.c @@ -400,20 +400,20 @@ extern void jet_group_state(int, int, int, int) __asm__("FUN_L13_002650a8"); typedef struct GadgetronCeoVars { u8 pad_0[0x60]; - s32 unk60; + s32 challenge_groups; u8 pad_64[0x3C]; - s32 unkA0; + s32 non_challenge_groups; } GadgetronCeoVars; void activate_gadgetron_ceo_challenge_environment(struct Moby *moby) { GadgetronCeoVars *ceo_environment_group_data = (GadgetronCeoVars *)moby->pvars; - int *group_index_entry = &ceo_environment_group_data->unk60; + int *group_index_entry = &ceo_environment_group_data->challenge_groups; int i; for (i = 15; i >= 0; i--) { jet_group_state(*group_index_entry, 1, 1, 1); group_index_entry++; } - group_index_entry = &ceo_environment_group_data->unkA0; + group_index_entry = &ceo_environment_group_data->non_challenge_groups; for (i = 7; i >= 0; i--) { jet_group_state(*group_index_entry, 0, 0, 0); group_index_entry++; @@ -428,12 +428,12 @@ void restore_gadgetron_ceo_non_challenge_environment(struct Moby *moby) { GadgetronCeoVars *ceo_environment_data = (GadgetronCeoVars *)moby->pvars; int *group_index_entry; int i; - group_index_entry = &ceo_environment_data->unk60; + group_index_entry = &ceo_environment_data->challenge_groups; for (i = 15; i >= 0; i--) { jet_group_state(group_index_entry[0], 0, 0, 0); group_index_entry++; } - group_index_entry = &ceo_environment_data->unkA0; + group_index_entry = &ceo_environment_data->non_challenge_groups; for (i = 7; i >= 0; i--) { jet_group_state(group_index_entry[0], 1, 1, 0); group_index_entry++; diff --git a/src/overlays/l16/mobys/path_following_rocket.c b/src/overlays/l16/mobys/path_following_rocket.c index 1ae0b612d5..95fb094674 100644 --- a/src/overlays/l16/mobys/path_following_rocket.c +++ b/src/overlays/l16/mobys/path_following_rocket.c @@ -34,10 +34,10 @@ void path_following_rocket_update(struct Moby *moby) __asm__("FUN_L16_002c3d38") typedef struct PathFollowingRocketVars { u8 pad_0[0x4]; - s32 unk4; - f32 unk8; - f32 unkC; - f32 unk10; + s32 path; + f32 speed; + f32 path_step; + f32 path_progress; s16 voice; s16 proximity_voice_requested; } PathFollowingRocketVars; @@ -51,15 +51,15 @@ void path_following_rocket_update(struct Moby *moby) { ROCKET_STATE_WAIT_FOR_RESET = 3 }; PathFollowingRocketVars *rocket_path_data = (PathFollowingRocketVars *)moby->pvars; - char *path = D_L16_001B0930[rocket_path_data->unk4]; + char *path = D_L16_001B0930[rocket_path_data->path]; switch (moby->state) { case ROCKET_STATE_INITIALIZE: - if (*(int *)rocket_path_data == -1 || rocket_path_data->unk4 == -1) { + if (*(int *)rocket_path_data == -1 || rocket_path_data->path == -1) { mark_moby_for_removal(moby); break; } - rocket_path_data->unkC = - rocket_path_data->unk8 * D_0015ED6C / fast_vec_dist(path + 0x10, path + 0x20); + rocket_path_data->path_step = + rocket_path_data->speed * D_0015ED6C / fast_vec_dist(path + 0x10, path + 0x20); moby->state = ROCKET_STATE_WAIT_FOR_TRIGGER; moby->update_dist = 100; moby->command = 0; @@ -75,13 +75,13 @@ void path_following_rocket_update(struct Moby *moby) { break; } case ROCKET_STATE_FOLLOW_PATH: - rocket_path_data->unk10 += rocket_path_data->unkC; - if ((float)(*(int *)path - 1) <= rocket_path_data->unk10) { + rocket_path_data->path_progress += rocket_path_data->path_step; + if ((float)(*(int *)path - 1) <= rocket_path_data->path_progress) { moby->update_dist = 0xFF; moby->state = ROCKET_STATE_WAIT_FOR_RESET; } else { sample_camera_path( - (int *)path, 0, &moby->pos, &moby->rot.x, 0, rocket_path_data->unk10); + (int *)path, 0, &moby->pos, &moby->rot.x, 0, rocket_path_data->path_progress); } if (moby->command) moby->collision = 0; @@ -106,9 +106,9 @@ void path_following_rocket_update(struct Moby *moby) { pos[3] = 3.0f; if (fast_bsphere_check((char *)pos, 64.0f) == -1) { moby->command = 0; - *(int *)&rocket_path_data->unk10 = 0; + *(int *)&rocket_path_data->path_progress = 0; sample_camera_path( - (int *)path, 0, &moby->pos, &moby->rot.x, 0, rocket_path_data->unk10); + (int *)path, 0, &moby->pos, &moby->rot.x, 0, rocket_path_data->path_progress); moby->visible = 1; moby->flags &= ~1; moby->collision = moby->pclass->collision; diff --git a/src/overlays/l16/mobys/test_dummy_on_hoverboard.c b/src/overlays/l16/mobys/test_dummy_on_hoverboard.c index 865010c886..bf9c0c9bd3 100644 --- a/src/overlays/l16/mobys/test_dummy_on_hoverboard.c +++ b/src/overlays/l16/mobys/test_dummy_on_hoverboard.c @@ -150,41 +150,41 @@ typedef struct HoverboardDummyVars { u8 pad_2C[0x34]; u8 manipulator0; u8 pad_61[0x67]; - f32 unkC8; + f32 manipulator0_target_rotation_z; u8 pad_CC[0x14]; u8 manipulator2; u8 pad_E1[0x63]; - f32 unk144; + f32 manipulator2_target_rotation_y; u8 pad_148[0x18]; u8 manipulator1; u8 pad_161[0x67]; - f32 unk1C8; + f32 manipulator1_target_rotation_z; u8 pad_1CC[0x14]; u8 manipulator3; u8 pad_1E1[0x67]; f32 manipulator3_target_rotation_z; u8 pad_24C[0x14]; f32 movement_position[4]; - f32 unk270[4]; + f32 jump_landing_position[4]; f32 previous_render_position[4]; u8 pad_290[0x20]; s32 path; f32 normal_speed_target; f32 boost_speed_target; f32 forward_speed; - char *unk2C0; + char *path_nodes; s32 yaw_spring_velocity; - f32 unk2C8; + f32 vertical_velocity; s32 race_competitor_index; u8 pad_2D0[0xC]; s32 timer_2DC; u8 pad_2E0[0x4]; s32 jump_timer; - f32 unk2E8; + f32 bob_phase; u8 pad_2EC[0x4]; s16 jump_landing_node_index; s16 reactivation_timer_frames; - s16 unk2F4; + s16 path_node_index; u16 boost_timer_frames; } HoverboardDummyVars; @@ -267,9 +267,9 @@ void prepare_hoverboard_dummy_path_jump(struct Moby *moby) __asm__("FUN_L16_002c void prepare_hoverboard_dummy_path_jump(struct Moby *moby) { HoverboardDummyVars *hoverboard_dummy_path_jump_data = (HoverboardDummyVars *)moby->pvars; - if (hoverboard_dummy_path_jump_data->unk2C8 <= 0.0f) { - int path_node_index = hoverboard_dummy_path_jump_data->unk2F4; - char *tab = hoverboard_dummy_path_jump_data->unk2C0; + if (hoverboard_dummy_path_jump_data->vertical_velocity <= 0.0f) { + int path_node_index = hoverboard_dummy_path_jump_data->path_node_index; + char *tab = hoverboard_dummy_path_jump_data->path_nodes; int path_node_byte_offset = path_node_index * 16; if (*(float *)(tab + path_node_byte_offset + 0x1C) == 1.0f) { while (1) { @@ -277,12 +277,12 @@ void prepare_hoverboard_dummy_path_jump(struct Moby *moby) { if (*(float *)(tab + path_node_byte_offset + 0x1C) == 2.0f) break; path_node_index = offset_path_index(tab, path_node_index, 1, 1); - tab = hoverboard_dummy_path_jump_data->unk2C0; + tab = hoverboard_dummy_path_jump_data->path_nodes; path_node_byte_offset = path_node_index * 16; } hoverboard_dummy_path_jump_data->jump_landing_node_index = path_node_index; - qcopy(hoverboard_dummy_path_jump_data->unk270, - hoverboard_dummy_path_jump_data->unk2C0 + (short)path_node_index * 16 + 0x10); + qcopy(hoverboard_dummy_path_jump_data->jump_landing_position, + hoverboard_dummy_path_jump_data->path_nodes + (short)path_node_index * 16 + 0x10); hoverboard_dummy_path_jump_data->jump_timer = 1; } } @@ -584,7 +584,7 @@ void test_dummy_on_hoverboard_update(unsigned char *moby) { MOBY(moby)->update_dist = 24; MOBY(moby)->flags |= 0x41; path = D_L16_001B0930[hoverboard_dummy_data->path]; - hoverboard_dummy_data->unk2C0 = path; + hoverboard_dummy_data->path_nodes = path; FUN_L16_002cf9d0_c((Level16VendorVectorMoby *)moby, 0, path_node_or_explosion_position); qcopy(moby + 0x10, path_node_or_explosion_position); qcopy(hoverboard_dummy_data->movement_position, moby + 0x10); @@ -609,7 +609,7 @@ void test_dummy_on_hoverboard_update(unsigned char *moby) { hoverboard_dummy_data->normal_speed_target *= slow; hoverboard_dummy_data->boost_speed_target *= slow; } - hoverboard_dummy_data->unk2E8 = random_angle_radians(); + hoverboard_dummy_data->bob_phase = random_angle_radians(); hoverboard_dummy_data->unk29 = 0; MOBY(moby)->state = HOVERBOARD_DUMMY_STATE_WAIT_FOR_RACE; break; @@ -619,9 +619,9 @@ void test_dummy_on_hoverboard_update(unsigned char *moby) { MOBY(moby)->update_dist = 255; MOBY(moby)->collision = MOBY(moby)->pclass->collision; MOBY(moby)->flags &= ~0x41; - hoverboard_dummy_data->unk2F4 = 0; + hoverboard_dummy_data->path_node_index = 0; *(short *)&hoverboard_dummy_data->boost_timer_frames = scale_game_frames(180); - *(int *)&hoverboard_dummy_data->unk2C8 = 0; + *(int *)&hoverboard_dummy_data->vertical_velocity = 0; hoverboard_dummy_data->yaw_spring_velocity = 0; hoverboard_dummy_data->jump_timer = 0; hoverboard_dummy_data->timer_2DC = 0; @@ -699,37 +699,38 @@ void test_dummy_on_hoverboard_update(unsigned char *moby) { if (hoverboard_dummy_data->jump_timer != 0) { (hoverboard_dummy_data->jump_timer)++; if (hoverboard_dummy_data->jump_timer < scale_game_frames(17)) { - i = hoverboard_dummy_data->unk2F4; + i = hoverboard_dummy_data->path_node_index; distance = 0.0f; while (i < hoverboard_dummy_data->jump_landing_node_index) { char *path; next_jump_path_node_index = - offset_path_index(hoverboard_dummy_data->unk2C0, i, 1, 1); - path = hoverboard_dummy_data->unk2C0; + offset_path_index(hoverboard_dummy_data->path_nodes, i, 1, 1); + path = hoverboard_dummy_data->path_nodes; distance += vector_distance_xy(path + (i * 16 + 16), path + (next_jump_path_node_index * 16 + 16)); i = next_jump_path_node_index; } { short last = hoverboard_dummy_data->jump_landing_node_index; - short first = hoverboard_dummy_data->unk2F4; - char *path = hoverboard_dummy_data->unk2C0; + short first = hoverboard_dummy_data->path_node_index; + char *path = hoverboard_dummy_data->path_nodes; float rise = *(float *)(path - (-(last * 16)) + 0x18) - *(float *)(path - (-(first * 16)) + 0x18); duration = distance / hoverboard_dummy_data->forward_speed; target = rise / duration + frame_time_sq * 21.0f * duration * 0.5f; } - if (hoverboard_dummy_data->unk2C8 < 0.0f) { - hoverboard_dummy_data->unk2C8 = 0.0f; + if (hoverboard_dummy_data->vertical_velocity < 0.0f) { + hoverboard_dummy_data->vertical_velocity = 0.0f; } - approach_value(&hoverboard_dummy_data->unk2C8, target, frame_time_sq * 110.0f); + approach_value( + &hoverboard_dummy_data->vertical_velocity, target, frame_time_sq * 110.0f); } } FUN_L16_002d0058_c((L16LeapMoby *)moby); FUN_L16_002cf9d0_c((Level16VendorVectorMoby *)moby, - hoverboard_dummy_data->unk2F4, + hoverboard_dummy_data->path_node_index, path_node_or_explosion_position); angle = fast_arc_tan(path_node_or_explosion_position[0] - MOBY(moby)->pos.x, path_node_or_explosion_position[1] - MOBY(moby)->pos.y); @@ -769,14 +770,14 @@ void test_dummy_on_hoverboard_update(unsigned char *moby) { } z = probe_ground_height(hoverboard_dummy_data->movement_position, 0, 0.5f); gap = hoverboard_dummy_data->movement_position[2] - z; - if (gap > 0.0f || hoverboard_dummy_data->unk2C8 > 0.0f) { - hoverboard_dummy_data->unk2C8 -= frame_time_sq * 21.0f; + if (gap > 0.0f || hoverboard_dummy_data->vertical_velocity > 0.0f) { + hoverboard_dummy_data->vertical_velocity -= frame_time_sq * 21.0f; } else if (absolute_float(gap) < 0.5f) { - hoverboard_dummy_data->unk2C8 = 0.0f; + hoverboard_dummy_data->vertical_velocity = 0.0f; hoverboard_dummy_data->movement_position[2] = z; hoverboard_dummy_data->jump_timer = 0; } - hoverboard_dummy_data->movement_position[2] += hoverboard_dummy_data->unk2C8; + hoverboard_dummy_data->movement_position[2] += hoverboard_dummy_data->vertical_velocity; if (fast_dec_timer_s16(&hoverboard_dummy_data->boost_timer_frames)) { speed = hoverboard_dummy_data->normal_speed_target; if (z < hoverboard_dummy_data->movement_position[2]) { @@ -802,7 +803,7 @@ void test_dummy_on_hoverboard_update(unsigned char *moby) { hoverboard_dummy_data->boost_speed_target, frame_time_sq * 20.0f); } - if (gap < 0.2f && hoverboard_dummy_data->unk2C8 < 0.0f) { + if (gap < 0.2f && hoverboard_dummy_data->vertical_velocity < 0.0f) { hoverboard_dummy_data->movement_position[2] = z; hoverboard_dummy_data->jump_timer = 0; } @@ -820,9 +821,9 @@ void test_dummy_on_hoverboard_update(unsigned char *moby) { float coefficient = frame_scale_sq; hoverboard_dummy_data->manipulator3_target_rotation_z = rate * 30.0f; - hoverboard_dummy_data->unkC8 = rate * 20.0f; - hoverboard_dummy_data->unk1C8 = rate * 50.0f; - hoverboard_dummy_data->unk144 = rate * 40.0f; + hoverboard_dummy_data->manipulator0_target_rotation_z = rate * 20.0f; + hoverboard_dummy_data->manipulator1_target_rotation_z = rate * 50.0f; + hoverboard_dummy_data->manipulator2_target_rotation_y = rate * 40.0f; update_joint_animation(coefficient * 0.02f, coefficient * 0.3f, moby, @@ -849,10 +850,10 @@ void test_dummy_on_hoverboard_update(unsigned char *moby) { float bob_time = D_0015ED6C; MOBY(moby)->pos.z += 0.25f; - hoverboard_dummy_data->unk2E8 = - fast_add_rotations(hoverboard_dummy_data->unk2E8, bob_time * 6.108652f); + hoverboard_dummy_data->bob_phase = + fast_add_rotations(hoverboard_dummy_data->bob_phase, bob_time * 6.108652f); } - MOBY(moby)->pos.z += fast_sin(hoverboard_dummy_data->unk2E8) * 0.08f; + MOBY(moby)->pos.z += fast_sin(hoverboard_dummy_data->bob_phase) * 0.08f; fast_vec_sub(ahead, moby + 0x10, hoverboard_dummy_data->previous_render_position); qcopy(hoverboard_dummy_data->previous_render_position, moby + 0x10); moby_point_position(moby, (D_L16_0015F5CC & 1) | 4, impact); From 81df50164e6abefcfd07e939c604729dc56310d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:12:13 +0000 Subject: [PATCH 039/213] decomp: name camera box watcher, fleet beam and blarg ship fields in level 17 --- src/overlays/l17/mobys/blarg_ship.c | 85 +++++----- src/overlays/l17/mobys/camera_box_watcher.c | 145 ++++++++++-------- .../l17/mobys/dreks_fleet_turret_shot.c | 24 +-- src/overlays/l17/mobys/fleet_backdrop.c | 20 +-- src/overlays/l17/mobys/fleet_beam.c | 133 ++++++++-------- 5 files changed, 213 insertions(+), 194 deletions(-) diff --git a/src/overlays/l17/mobys/blarg_ship.c b/src/overlays/l17/mobys/blarg_ship.c index 15089f938a..daa77f053b 100644 --- a/src/overlays/l17/mobys/blarg_ship.c +++ b/src/overlays/l17/mobys/blarg_ship.c @@ -39,22 +39,22 @@ void blarg_ship_update(struct Moby *moby) __asm__("FUN_L17_002f40d8"); typedef struct BlargShipVars { u8 pad_0[0x60]; - s32 unk60; - s32 unk64; - f32 unk68; - f32 unk6C; + s32 path; + s32 path_node; + f32 path_t; + f32 speed; f32 unk70; f32 unk74; f32 unk78; u8 pad_7C[0x8]; - s32 unk84; - s32 unk88; - f32 unk8C; - f32 unk90; - f32 unk94; - s32 unk98; + s32 reactivation_frames; + s32 formation_slot; + f32 yaw_velocity; + f32 pitch_velocity; + f32 aim_lead; + s32 approach_frames; u8 pad_9C[0x14]; - f32 unkB0[4]; + f32 previous_hero_position[4]; } BlargShipVars; /* Moby class 1843 */ @@ -91,9 +91,9 @@ void blarg_ship_update(struct Moby *moby) { case BLARG_SHIP_INITIALIZE: moby->draw_dist = 0xFF; moby->update_dist = 0xFF; - if (moby_pvars->unk88 == 0) { + if (moby_pvars->formation_slot == 0) { moby->state = BLARG_SHIP_FOLLOW_PATH; - moby_pvars->unk6C = randf_sym(0.3f, 0.5f); + moby_pvars->speed = randf_sym(0.3f, 0.5f); moby_pvars->unk70 = random_angle_radians(); moby_pvars->unk74 = randf_sym(60.0f, 120.0f) * DEG_TO_RAD * frame_time; moby_pvars->unk78 = random_float_between(8.0f, 12.0f); @@ -106,16 +106,16 @@ void blarg_ship_update(struct Moby *moby) { case BLARG_SHIP_FOLLOW_PATH: case BLARG_SHIP_BURST_AND_HIDE: update_moby_trail_points(moby); - moby_pvars->unk68 += moby_pvars->unk6C; - if (moby_pvars->unk68 > 1.0f) { - moby_pvars->unk68 -= 1.0f; - moby_pvars->unk64 = - (moby_pvars->unk64 + 1) % **(int **)(D_L17_001B0DB0 + moby_pvars->unk60 * 4); - } else if (moby_pvars->unk68 < 0.0f) { - moby_pvars->unk68 += 1.0f; - moby_pvars->unk64 = - (moby_pvars->unk64 + **(int **)(D_L17_001B0DB0 + moby_pvars->unk60 * 4) - 1) % - **(int **)(D_L17_001B0DB0 + moby_pvars->unk60 * 4); + moby_pvars->path_t += moby_pvars->speed; + if (moby_pvars->path_t > 1.0f) { + moby_pvars->path_t -= 1.0f; + moby_pvars->path_node = + (moby_pvars->path_node + 1) % **(int **)(D_L17_001B0DB0 + moby_pvars->path * 4); + } else if (moby_pvars->path_t < 0.0f) { + moby_pvars->path_t += 1.0f; + moby_pvars->path_node = + (moby_pvars->path_node + **(int **)(D_L17_001B0DB0 + moby_pvars->path * 4) - 1) % + **(int **)(D_L17_001B0DB0 + moby_pvars->path * 4); } fast_add_rotations(moby_pvars->unk70, moby_pvars->unk74); update_moby_path_transform(moby); @@ -143,8 +143,8 @@ void blarg_ship_update(struct Moby *moby) { scratch_vector[3] = 3.0f; if (fast_bsphere_check((char *)&moby->pos, 512.0f) == -1) { if (fast_vec_dist(&moby->pos, &hero.motion.pos) > 32.0f) { - moby_pvars->unk84 += 1; - if (scale_game_frames(60) < moby_pvars->unk84) { + moby_pvars->reactivation_frames += 1; + if (scale_game_frames(60) < moby_pvars->reactivation_frames) { moby->state = BLARG_SHIP_FOLLOW_PATH; if (moby->prev_seq) { blend_moby_animation(moby, 0, 0, scale_game_frames(10)); @@ -153,10 +153,10 @@ void blarg_ship_update(struct Moby *moby) { moby->collision = moby->pclass->collision; } } else { - moby_pvars->unk84 = 0; + moby_pvars->reactivation_frames = 0; } } else { - moby_pvars->unk84 = 0; + moby_pvars->reactivation_frames = 0; } break; case BLARG_SHIP_INACTIVE: @@ -171,10 +171,11 @@ void blarg_ship_update(struct Moby *moby) { clamped_euler_angles[1] = -0.2617994f; } euler_rotation_basis(rotation_basis_row0, clamped_euler_angles); - fast_vec_sub(hero_position_delta, &hero.motion.pos, moby_pvars->unkB0); - qcopy(moby_pvars->unkB0, &hero.motion.pos); + fast_vec_sub(hero_position_delta, &hero.motion.pos, moby_pvars->previous_hero_position); + qcopy(moby_pvars->previous_hero_position, &hero.motion.pos); fast_vec_add(&moby->pos, &moby->pos, hero_position_delta); - offset_angle = fast_add_rotations(0.7853982f, (float)moby_pvars->unk88 * 1.5707964f); + offset_angle = + fast_add_rotations(0.7853982f, (float)moby_pvars->formation_slot * 1.5707964f); fast_vec_normalize(scratch_vector, rotation_basis_row1, fast_sin(offset_angle) * 8.0f); fast_vec_add(movement_target_position, D_L17_001676C0, scratch_vector); fast_vec_normalize(scratch_vector, rotation_basis_row2, fast_cos(offset_angle) * 8.0f); @@ -185,35 +186,35 @@ void blarg_ship_update(struct Moby *moby) { movement_target_distance = fast_vec_length(scratch_vector); if (*(char *)&hero.ship_flags & 2) { advance_accelerated_scalar(&movement_distance_accumulator, - &moby_pvars->unk6C, + &moby_pvars->speed, movement_target_distance, frame_time_sq + frame_time_sq, frame_time_sq * 20.0f, frame_time); } else if (moby->command) { advance_accelerated_scalar(&movement_distance_accumulator, - &moby_pvars->unk6C, + &moby_pvars->speed, movement_target_distance, frame_time_sq + frame_time_sq, frame_time_sq * 20.0f, frame_time * 15.0f); } else { advance_accelerated_scalar(&movement_distance_accumulator, - &moby_pvars->unk6C, + &moby_pvars->speed, movement_target_distance, frame_time_sq + frame_time_sq, frame_time_sq * 20.0f, frame_time * 5.0f); } - FUN_L00_0025f730(scratch_vector, moby_pvars->unk6C); + FUN_L00_0025f730(scratch_vector, moby_pvars->speed); fast_vec_add(&moby->pos.x, &moby->pos.x, scratch_vector); if (moby->command) { if (moby->visible) { - moby_pvars->unk98 += 1; + moby_pvars->approach_frames += 1; } if (fast_vec_dist(movement_target_position, &moby->pos.x) < 2.0f) { moby->command = 0; - } else if (scale_game_frames(120) < moby_pvars->unk98) { + } else if (scale_game_frames(120) < moby_pvars->approach_frames) { moby->command = 0; } } else { @@ -225,7 +226,7 @@ void blarg_ship_update(struct Moby *moby) { target_rotation_angle = fast_arc_tan(hero_relative_position[0], hero_relative_position[1]); approach_angle(yaw, - &moby_pvars->unk8C, + &moby_pvars->yaw_velocity, target_rotation_angle, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, @@ -233,15 +234,15 @@ void blarg_ship_update(struct Moby *moby) { target_rotation_angle = -fast_arc_tan(vector_length_xy(hero_relative_position), hero_relative_position[2]); approach_angle(pitch, - &moby_pvars->unk90, + &moby_pvars->pitch_velocity, target_rotation_angle, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, frame_time * 12.566371f); if (D_L17_0015F5CC % 10 == 0) { FUN_0022da68(2, 0, (int)moby); - approach_value(&moby_pvars->unk94, 0.0f, 0.25f); - fast_vec_normalize(sB0, hero_position_delta, moby_pvars->unk94); + approach_value(&moby_pvars->aim_lead, 0.0f, 0.25f); + fast_vec_normalize(sB0, hero_position_delta, moby_pvars->aim_lead); fast_vec_add(sB0, sB0, hero_position); if (D_L17_0015F5CC % 20 == 0) { transform_vector_by_basis( @@ -273,8 +274,8 @@ void blarg_ship_update(struct Moby *moby) { } break; case BLARG_SHIP_BURST_AND_DEACTIVATE: - fast_vec_sub(scratch_vector, &hero.motion.pos, moby_pvars->unkB0); - qcopy(moby_pvars->unkB0, &hero.motion.pos); + fast_vec_sub(scratch_vector, &hero.motion.pos, moby_pvars->previous_hero_position); + qcopy(moby_pvars->previous_hero_position, &hero.motion.pos); fast_vec_add(&moby->pos, &moby->pos, scratch_vector); cart_burst(moby, &moby->pos, -1, 2.0f, 13.0f); if (random_integer_below(2)) { diff --git a/src/overlays/l17/mobys/camera_box_watcher.c b/src/overlays/l17/mobys/camera_box_watcher.c index 0a072f6a23..059aa0a075 100644 --- a/src/overlays/l17/mobys/camera_box_watcher.c +++ b/src/overlays/l17/mobys/camera_box_watcher.c @@ -44,32 +44,32 @@ void fleet_camera_box_watcher_update(struct Moby *moby) __asm__("FUN_L17_002f26d typedef struct CameraBoxWatcherVars { u8 pad_0[0xC]; - s32 unkC; + s32 dwell_frames; s32 moby_indices; u8 pad_14[0xC]; s32 clip_volumes; u8 pad_24[0x8]; - s32 unk2C; - s32 unk30; + s32 special_state_dwell_frames; + s32 last_help_clip_volume; u8 pad_34[0x4]; - s32 unk38; - s32 unk3C; - s32 unk40; - s32 unk44; + s32 dwell_help_delay; + s32 camera_sequence_clip_volume; + s32 second_camera_target_cuboid; + s32 first_camera_target_cuboid; s32 unk48; - u8 unk4C; + u8 camera_sequence_done; u8 pad_4D[0x3]; s32 unk50; u8 pad_54[0x4]; - s32 unk58; - s32 unk5C; - s32 unk60; + s32 mission; + s32 camera_timer; + s32 sequence_entry_clip_volume; s32 first_followup_clip_volume_index; - s32 unk68; - s32 unk6C; - s32 unk70; - s32 unk74; - s32 unk78; + s32 second_followup_clip_volume_index; + s32 clip_volume_sequence_state; + s32 scan_moby_index; + s32 scan_outside_count; + s32 scan_clip_volume; } CameraBoxWatcherVars; /* Moby class 1470 */ @@ -101,13 +101,13 @@ void fleet_camera_box_watcher_update(struct Moby *moby) { unsigned char *sk; int wrap; - clip_volume_sequence_state = pvars->unk6C; + clip_volume_sequence_state = pvars->clip_volume_sequence_state; switch (clip_volume_sequence_state) { case CLIP_VOLUME_SEQUENCE_WAIT_FOR_ENTRY: { char *h = (char *)&hero.motion.pos; - if (is_point_inside_clip_volume(h, pvars->unk60)) { + if (is_point_inside_clip_volume(h, pvars->sequence_entry_clip_volume)) { if (*(int *)(h + 0x200C) == 0x11) { - pvars->unk6C = 1; + pvars->clip_volume_sequence_state = 1; } } break; @@ -117,10 +117,11 @@ void fleet_camera_box_watcher_update(struct Moby *moby) { int hero_current_state = h->state.current; if (hero_current_state == HERO_STATE_HURT_WITH_DISPLACEMENT_VELOCITY || hero_current_state == HERO_STATE_OPTIONAL_IDLE_ANIMATION) { - pvars->unk6C = 0; + pvars->clip_volume_sequence_state = 0; } else if (is_point_inside_clip_volume(&h->motion.pos, pvars->first_followup_clip_volume_index) || - is_point_inside_clip_volume(&h->motion.pos, pvars->unk68)) { + is_point_inside_clip_volume(&h->motion.pos, + pvars->second_followup_clip_volume_index)) { if (D_0013D408[0x1C] == 0) { D_0013D408[0x1C] = 1; allocate_voice_for_bank_entry(1, 0, 0); @@ -135,23 +136,23 @@ void fleet_camera_box_watcher_update(struct Moby *moby) { for (j = 0; j < 30; j++) { char *mb; sk = D_0013D408; - mb = D_L17_0015FFD8 + (pvars->unk70 << 8); + mb = D_L17_0015FFD8 + (pvars->scan_moby_index << 8); if ((*(short *)(mb + 0xA6) == 0x2C || *(short *)(mb + 0xA6) == 0x566) && *(signed char *)(mb + 0x20) >= 0 && - !is_point_inside_clip_volume(mb + 0x10, pvars->unk78)) { - pvars->unk74 += 1; + !is_point_inside_clip_volume(mb + 0x10, pvars->scan_clip_volume)) { + pvars->scan_outside_count += 1; } - next_moby_index = pvars->unk70 + 1; + next_moby_index = pvars->scan_moby_index + 1; wrap = D_L17_0015FFD8 + (next_moby_index << 8) < fleet_moby_array_end; - pvars->unk70 = next_moby_index; + pvars->scan_moby_index = next_moby_index; if (!wrap) { - if (pvars->unk74 == 0 && sk[0x1B] == 0) { + if (pvars->scan_outside_count == 0 && sk[0x1B] == 0) { sk[0x1B] = 1; allocate_voice_for_bank_entry(1, 0, 0); queue_dialogue_message(0x53D6, -1); } - pvars->unk70 = 0; - pvars->unk74 = 0; + pvars->scan_moby_index = 0; + pvars->scan_outside_count = 0; } } } @@ -159,15 +160,16 @@ void fleet_camera_box_watcher_update(struct Moby *moby) { switch (moby->state) { case CAMERA_BOX_WATCHER_INITIALIZE: moby->update_dist = 0xFF; - pvars->unk38 = scale_game_frames(600); - pvars->unk4C = 0; - if (pvars->unk44 == -1 || pvars->unk40 == -1 || pvars->unk3C == -1 || pvars->unk48 == -1) { + pvars->dwell_help_delay = scale_game_frames(600); + pvars->camera_sequence_done = 0; + if (pvars->first_camera_target_cuboid == -1 || pvars->second_camera_target_cuboid == -1 || + pvars->camera_sequence_clip_volume == -1 || pvars->unk48 == -1) { DebugPrint(fleet_camera_box_configuration_error_format, - pvars->unk3C, + pvars->camera_sequence_clip_volume, pvars->unk48, - pvars->unk40, - pvars->unk44); - pvars->unk4C = 1; + pvars->second_camera_target_cuboid, + pvars->first_camera_target_cuboid); + pvars->camera_sequence_done = 1; } moby->state = CAMERA_BOX_WATCHER_MONITOR; break; @@ -180,7 +182,8 @@ void fleet_camera_box_watcher_update(struct Moby *moby) { if (is_point_inside_clip_volume( &hero.motion.pos, *(int *)((u8 *)pvars + clip_volume_entry_byte_offset))) { found = 1; - if (pvars->unk30 != *(int *)((u8 *)pvars + clip_volume_entry_byte_offset)) { + if (pvars->last_help_clip_volume != + *(int *)((u8 *)pvars + clip_volume_entry_byte_offset)) { pending_help_clip_volume_index = *(int *)((u8 *)pvars + clip_volume_entry_byte_offset); moby_indices = &pvars->moby_indices; @@ -190,10 +193,10 @@ void fleet_camera_box_watcher_update(struct Moby *moby) { } } if (found) { - pvars->unkC += 1; + pvars->dwell_frames += 1; } else { - pvars->unkC = 0; - pvars->unk30 = -1; + pvars->dwell_frames = 0; + pvars->last_help_clip_volume = -1; } if (checked_moby_index != -1) { checked_moby = D_L17_0015FFD8 + (checked_moby_index << 8); @@ -208,16 +211,16 @@ void fleet_camera_box_watcher_update(struct Moby *moby) { if (MOBY(checked_moby)->state == 3) goto skip1; } - if (pvars->unkC > pvars->unk38 && pending_help_clip_volume_index != -1 && + if (pvars->dwell_frames > pvars->dwell_help_delay && pending_help_clip_volume_index != -1 && ((unsigned int)hero.state.control_mode < 2 || hero.state.control_mode == 9) && fleet_help_request_gate_state[0] == 0 && fleet_help_request_gate_state[9] == -1 && D_0013D4DF != 0) { - pvars->unk38 = scale_game_frames(0x708); + pvars->dwell_help_delay = scale_game_frames(0x708); if (*(int *)(((char *)&fleet_dwell_help_gate_value)) >= 0) { help_request(0x3A9A, 0x7D); } - pvars->unk30 = pending_help_clip_volume_index; - pvars->unkC = 0; + pvars->last_help_clip_volume = pending_help_clip_volume_index; + pvars->dwell_frames = 0; } skip1: if (is_point_inside_clip_volume(&hero.motion.pos, pvars->clip_volumes) && @@ -236,27 +239,30 @@ void fleet_camera_box_watcher_update(struct Moby *moby) { clip_volume_index_ptr = (int *)((u8 *)pvars + 0x20 + clip_volume_entry_byte_offset); if (is_point_inside_clip_volume(&hero.motion.pos, *clip_volume_index_ptr)) { found = 1; - if (pvars->unk30 != *clip_volume_index_ptr) { + if (pvars->last_help_clip_volume != *clip_volume_index_ptr) { pending_help_clip_volume_index = *clip_volume_index_ptr; } break; } } - if (!found || (pvars->unk2C += 1, hero.state.current == 0x35)) { - pvars->unk2C = 0; - pvars->unk30 = -1; + if (!found || (pvars->special_state_dwell_frames += 1, hero.state.current == 0x35)) { + pvars->special_state_dwell_frames = 0; + pvars->last_help_clip_volume = -1; } - if (scale_game_frames(0xE10) < pvars->unk2C && pending_help_clip_volume_index != -1 && - hero_is_in_special_state() && fleet_help_request_gate_state[0] == 0 && - fleet_help_request_gate_state[9] == -1 && item_unlocked[0xBC] != 0) { + if (scale_game_frames(0xE10) < pvars->special_state_dwell_frames && + pending_help_clip_volume_index != -1 && hero_is_in_special_state() && + fleet_help_request_gate_state[0] == 0 && fleet_help_request_gate_state[9] == -1 && + item_unlocked[0xBC] != 0) { help_request(0x4E2E, 0x78); - pvars->unk30 = pending_help_clip_volume_index; - pvars->unk2C = 0; + pvars->last_help_clip_volume = pending_help_clip_volume_index; + pvars->special_state_dwell_frames = 0; } - if (pvars->unk58 != 0xFF && visited52[pvars->unk58 + (current_level_index << 4)] == 0xFF) { - pvars->unk4C = 1; + if (pvars->mission != 0xFF && + visited52[pvars->mission + (current_level_index << 4)] == 0xFF) { + pvars->camera_sequence_done = 1; } - if (pvars->unk4C == 0 && is_point_inside_clip_volume(&hero.motion.pos, pvars->unk3C)) { + if (pvars->camera_sequence_done == 0 && + is_point_inside_clip_volume(&hero.motion.pos, pvars->camera_sequence_clip_volume)) { clear_active_help_record(); if (*(int *)(((char *)&D_00141DC4)) >= 0) { help_request(0x4268, 0x8B); @@ -264,7 +270,7 @@ void fleet_camera_box_watcher_update(struct Moby *moby) { if (fleet_help_request_gate_state[0] != 0 || fleet_help_request_gate_state[9] != -1) { pvars->unk50 = 0; moby->state = CAMERA_BOX_WATCHER_ALIGN_FIRST_TARGET; - pvars->unk5C = scale_game_frames(0xB4); + pvars->camera_timer = scale_game_frames(0xB4); hero_set_state(0x72, 0); } } @@ -273,33 +279,40 @@ void fleet_camera_box_watcher_update(struct Moby *moby) { char *cam; set_follow_camera_blend_output_flags(); set_follow_camera_angle_blend_from_position( - (int)(D_L17_001600EC + (pvars->unk44 << 7) + 0x30), 0.02617994f, 0.0f); + (int)(D_L17_001600EC + (pvars->first_camera_target_cuboid << 7) + 0x30), + 0.02617994f, + 0.0f); cam = (char *)&l17_camera; target_heading = fast_arc_tan( - *(float *)(D_L17_001600EC + ((pvars->unk44 << 7) + 0x30)) - *(float *)(cam + 0x140), - *(float *)(D_L17_001600EC + ((pvars->unk44 << 7) + 0x34)) - *(float *)(cam + 0x144)); + *(float *)(D_L17_001600EC + ((pvars->first_camera_target_cuboid << 7) + 0x30)) - + *(float *)(cam + 0x140), + *(float *)(D_L17_001600EC + ((pvars->first_camera_target_cuboid << 7) + 0x34)) - + *(float *)(cam + 0x144)); if (fast_difference_between_rotations(*(float *)(cam + 0x158), target_heading) < 0.034906585f) { moby->state = CAMERA_BOX_WATCHER_WAIT_AND_ALIGN_SECOND_TARGET; - pvars->unk5C = scale_game_frames(0x3C); + pvars->camera_timer = scale_game_frames(0x3C); } break; } case CAMERA_BOX_WATCHER_WAIT_AND_ALIGN_SECOND_TARGET: set_follow_camera_blend_output_flags(); - if (fast_dec_timer(&pvars->unk5C)) { + if (fast_dec_timer(&pvars->camera_timer)) { char *cam; set_follow_camera_angle_blend_from_position( - (int)(D_L17_001600EC + (pvars->unk40 << 7) + 0x30), 0.02617994f, 0.0f); + (int)(D_L17_001600EC + (pvars->second_camera_target_cuboid << 7) + 0x30), + 0.02617994f, + 0.0f); cam = (char *)&l17_camera; target_heading = fast_arc_tan( - *(float *)(D_L17_001600EC + ((pvars->unk40 << 7) + 0x30)) - *(float *)(cam + 0x140), - *(float *)(D_L17_001600EC + ((pvars->unk40 << 7) + 0x34)) - + *(float *)(D_L17_001600EC + ((pvars->second_camera_target_cuboid << 7) + 0x30)) - + *(float *)(cam + 0x140), + *(float *)(D_L17_001600EC + ((pvars->second_camera_target_cuboid << 7) + 0x34)) - *(float *)(cam + 0x144)); if (fast_difference_between_rotations(*(float *)(cam + 0x158), target_heading) < 0.034906585f) { enter_hero_idle_state_for_current_vehicle_mode(); - pvars->unk4C = 1; + pvars->camera_sequence_done = 1; moby->state = CAMERA_BOX_WATCHER_MONITOR; } } diff --git a/src/overlays/l17/mobys/dreks_fleet_turret_shot.c b/src/overlays/l17/mobys/dreks_fleet_turret_shot.c index 26ef1da3a3..1e975a9702 100644 --- a/src/overlays/l17/mobys/dreks_fleet_turret_shot.c +++ b/src/overlays/l17/mobys/dreks_fleet_turret_shot.c @@ -125,12 +125,12 @@ void fleet_turret_shot_update(struct Moby *moby) __asm__("FUN_L17_002e8e0 typedef struct FleetTurretShotVars { u8 pad_0[0x10]; - f32 unk10; - f32 unk14; + f32 target_x; + f32 target_y; u8 pad_18[0x20]; s32 timer_38; - s32 unk3C; - f32 unk40; + s32 source_moby; + f32 speed; } FleetTurretShotVars; /* Moby class 1368 */ @@ -158,19 +158,19 @@ void fleet_turret_shot_update(struct Moby *moby) { case DRONE_STATE_FLIGHT: moby->draw_dist = 0; moby->visible = 0; - target_position = &drone_vars->unk10; + target_position = &drone_vars->target_x; *(OvlQuad *)lowered_hero_position = *(OvlQuad *)(&hero.motion.body_center); lowered_hero_position[2] = lowered_hero_position[2] - 0.5f; if (vector_distance_xy(lowered_hero_position, target_position) < 8.0f) { lerp_vector(target_position, lowered_hero_position, target_position, 0.99f); } if (vector_distance_xy(&moby->pos, target_position) > 4.0f) { - if (fast_difference_between_rotations(moby->rot.z, - fast_arc_tan(drone_vars->unk10 - moby->pos.x, - drone_vars->unk14 - moby->pos.y)) < - 0.7853982f) { + if (fast_difference_between_rotations( + moby->rot.z, + fast_arc_tan(drone_vars->target_x - moby->pos.x, + drone_vars->target_y - moby->pos.y)) < 0.7853982f) { fast_vec_sub(flight_offset_scratch, target_position, &moby->pos); - fast_vec_normalize(drone_vars, flight_offset_scratch, drone_vars->unk40); + fast_vec_normalize(drone_vars, flight_offset_scratch, drone_vars->speed); } } fast_vec_scale(flight_offset_scratch, drone_vars, -20.0f); @@ -194,7 +194,7 @@ void fleet_turret_shot_update(struct Moby *moby) { FUN_L00_001f0d60_q(0.5f, &moby->pos, 0, moby) != 0) { hit = *(int *)(r + 0x18); if (hit != 0) { - if (hit != drone_vars->unk3C) { + if (hit != drone_vars->source_moby) { g = &hero; if (g->magnetic_floor != 0 && hit == ((int)g->moby)) { unsigned char *rec = D_00141968_x_q; @@ -230,7 +230,7 @@ void fleet_turret_shot_update(struct Moby *moby) { moby->state = DRONE_STATE_SPARKS_UNTIL_REMOVAL; return; } - } else if (vector_distance_xy(&moby->pos, *(char **)&drone_vars->unk3C + 0x10) > + } else if (vector_distance_xy(&moby->pos, *(char **)&drone_vars->source_moby + 0x10) > 10.0f) { qcopy(&moby->pos, r + 0x20); drone_vars->timer_38 = scale_game_frames(0x1E); diff --git a/src/overlays/l17/mobys/fleet_backdrop.c b/src/overlays/l17/mobys/fleet_backdrop.c index 645dc7b6a2..74faf3efc1 100644 --- a/src/overlays/l17/mobys/fleet_backdrop.c +++ b/src/overlays/l17/mobys/fleet_backdrop.c @@ -63,9 +63,9 @@ void draw_fleet_backdrop_quads(struct Moby *moby) __asm__("FUN_L17_002f32f0"); typedef struct FleetBackdropAnimationVars { u8 pad_0[0x10]; - f32 unk10; - f32 unk14; - f32 unk18; + f32 endpoint_x; + f32 endpoint_y; + f32 endpoint_z; u8 pad_1C[0xC]; f32 unk28; u8 pad_2C[0x18]; @@ -87,11 +87,11 @@ void draw_fleet_backdrop_quads(struct Moby *moby) { float *quad_vertex_v_coordinates; vu1_add_g_sregister(0x47, 0x513F1); vb = &vv[2]; - backdrop_endpoint_position = &backdrop_pvars->unk10; + backdrop_endpoint_position = &backdrop_pvars->endpoint_x; pu = &pkt.uv[0]; quad_vertex_v_coordinates = &pkt.uv[1]; D_L17_0016D3E4 = 8192000.0f; - backdrop_pvars->unk14 = -8000.0f; + backdrop_pvars->endpoint_y = -8000.0f; for (i = 0; i < 2; i++) { fast_vec_sub(vb, backdrop_pvars, backdrop_endpoint_position); fast_vec_sub(&vv[0], backdrop_pvars, D_L17_001676C0); @@ -137,11 +137,11 @@ void draw_fleet_backdrop_quads(struct Moby *moby) { for (k = 0; k < 5; k++) { float quad_side_length = backdrop_quad_side_lengths[k]; float uv_rotation_angle = backdrop_quad_uv_rotation_angles[k]; - float x = backdrop_pvars->unk10 - quad_side_length * 0.5f; + float x = backdrop_pvars->endpoint_x - quad_side_length * 0.5f; float z; ((float *)&pkt)[0] = x; - ((float *)&pkt)[1] = backdrop_pvars->unk14 + 1000.0f; - z = backdrop_pvars->unk18 + quad_side_length * 0.5f; + ((float *)&pkt)[1] = backdrop_pvars->endpoint_y + 1000.0f; + z = backdrop_pvars->endpoint_z + quad_side_length * 0.5f; ((float *)&pkt)[3] = 1.0f; ((float *)&pkt)[2] = z; pkt.m[3] = pkt.m[0]; @@ -239,9 +239,9 @@ void fleet_backdrop_animation_update(struct Moby *moby) { fast_vec_add(vector_sum, offset_accumulator, pvar_angle_offset); *(OvlQuad *)offset_accumulator = *(OvlQuad *)vector_sum; fast_vec_add(vector_sum, moby_pvars, offset_accumulator); - *(OvlQuad *)&moby_pvars->unk10 = *(OvlQuad *)vector_sum; + *(OvlQuad *)&moby_pvars->endpoint_x = *(OvlQuad *)vector_sum; moby->update_dist = 0xFF; - moby_pvars->unk10 -= 300.0f; + moby_pvars->endpoint_x -= 300.0f; } else { for (i = 0; i < 5; i++) { backdrop_quad_color_blend_factors[i] += diff --git a/src/overlays/l17/mobys/fleet_beam.c b/src/overlays/l17/mobys/fleet_beam.c index f34bce0c39..ea6c9553cb 100644 --- a/src/overlays/l17/mobys/fleet_beam.c +++ b/src/overlays/l17/mobys/fleet_beam.c @@ -75,20 +75,20 @@ void fleet_beam_update(struct Moby *beam_moby) __asm__("FUN_L17_002a8da0 typedef struct FleetBeamVars { u8 pad_0[0x10]; - f32 unk10[4]; - f32 unk20[4]; - f32 unk30[4]; + f32 beam_start[4]; + f32 beam_end[4]; + f32 beam_offset[4]; s32 clip_volume; - s32 unk44; - f32 unk48; - f32 unk4C; - f32 unk50; - f32 unk54; + s32 oscillation_cuboid; + f32 oscillation_speed; + f32 beam_width; + f32 oscillation_t; + f32 oscillation_step; f32 anim_start; - f32 unk5C; + f32 anim_frames_per_radian; s32 unk60; u8 pad_64[0x4]; - s32 unk68; + s32 oscillation_moby_index; } FleetBeamVars; /* Moby class 99 */ @@ -120,24 +120,26 @@ void fleet_beam_update(struct Moby *beam_moby) { switch (beam_moby->state) { case BEAM_INITIALIZE: beam_vars->anim_start = animation_start(beam_moby->class_slot, 0); - beam_vars->unk5C = + beam_vars->anim_frames_per_radian = (animation_end(beam_moby->class_slot, 0) - beam_vars->anim_start) / 6.2831855f; - k = beam_vars->unk44; + k = beam_vars->oscillation_cuboid; if (k != -1) { qcopy(beam_vars, &beam_moby->pos); - beam_vars->unk54 = beam_vars->unk48 * frame_time / - fast_vec_dist(beam_vars, D_L17_001600EC + (k << 7) + 0x30); + beam_vars->oscillation_step = + beam_vars->oscillation_speed * frame_time / + fast_vec_dist(beam_vars, D_L17_001600EC + (k << 7) + 0x30); beam_moby->state = BEAM_UPDATE_OSCILLATING; - } else if ((j = beam_vars->unk68) != -1) { + } else if ((j = beam_vars->oscillation_moby_index) != -1) { qcopy(beam_vars, &beam_moby->pos); - beam_vars->unk54 = beam_vars->unk48 * frame_time / - fast_vec_dist(beam_vars, D_L17_0015FFD0[2] + (j << 8) + 0x10); + beam_vars->oscillation_step = + beam_vars->oscillation_speed * frame_time / + fast_vec_dist(beam_vars, D_L17_0015FFD0[2] + (j << 8) + 0x10); beam_moby->state = BEAM_UPDATE_OSCILLATING; } else { beam_moby->state = BEAM_UPDATE_STATIONARY; } beam_vars->unk60 = 0; - beam_vars->unk4C = 0.1f; + beam_vars->beam_width = 0.1f; *(OvlQuad *)beam_vector_scratch = 0; beam_vector_scratch[0] = 13.0f; transform_vector_by_basis(beam_vector_scratch, beam_vector_scratch, &beam_moby->rot_row0); @@ -147,7 +149,7 @@ void fleet_beam_update(struct Moby *beam_moby) { *(OvlQuad *)beam_endpoint_and_offset_scratch = *(OvlQuad *)D_L17_00174760; } fast_vec_sub(beam_geometry_scratch, beam_endpoint_and_offset_scratch, &beam_moby->pos); - *(OvlQuad *)&beam_vars->unk30[0] = *(OvlQuad *)beam_geometry_scratch; + *(OvlQuad *)&beam_vars->beam_offset[0] = *(OvlQuad *)beam_geometry_scratch; break; case BEAM_UPDATE_STATIONARY: if (beam_vars->clip_volume == -1 || @@ -156,24 +158,24 @@ void fleet_beam_update(struct Moby *beam_moby) { } break; case BEAM_UPDATE_OSCILLATING: - beam_vars->unk50 += beam_vars->unk54; - if (beam_vars->unk50 > 1.0f) { - beam_vars->unk50 = 1.0f; - beam_vars->unk54 = -beam_vars->unk54; - } else if (beam_vars->unk50 < 0.0f) { - beam_vars->unk50 = 0.0f; - beam_vars->unk54 = -beam_vars->unk54; + beam_vars->oscillation_t += beam_vars->oscillation_step; + if (beam_vars->oscillation_t > 1.0f) { + beam_vars->oscillation_t = 1.0f; + beam_vars->oscillation_step = -beam_vars->oscillation_step; + } else if (beam_vars->oscillation_t < 0.0f) { + beam_vars->oscillation_t = 0.0f; + beam_vars->oscillation_step = -beam_vars->oscillation_step; } - if (beam_vars->unk68 != -1) { + if (beam_vars->oscillation_moby_index != -1) { lerp_vector(&beam_moby->pos, beam_vars, - ((char *(*)[64])D_L17_0015FFD8)[beam_vars->unk68][0x1E], - beam_vars->unk50); + ((char *(*)[64])D_L17_0015FFD8)[beam_vars->oscillation_moby_index][0x1E], + beam_vars->oscillation_t); } else { lerp_vector(&beam_moby->pos, beam_vars, - D_L17_001600EC + (beam_vars->unk44 << 7) + 0x30, - beam_vars->unk50); + D_L17_001600EC + (beam_vars->oscillation_cuboid << 7) + 0x30, + beam_vars->oscillation_t); } if (beam_vars->clip_volume == -1 || is_point_inside_clip_volume(&hero.motion.pos, beam_vars->clip_volume)) { @@ -188,44 +190,44 @@ void fleet_beam_update(struct Moby *beam_moby) { } flag = 1; fast_vec_sub(beam_geometry_scratch, beam_endpoint_and_offset_scratch, &beam_moby->pos); - *(OvlQuad *)&beam_vars->unk30[0] = *(OvlQuad *)beam_geometry_scratch; + *(OvlQuad *)&beam_vars->beam_offset[0] = *(OvlQuad *)beam_geometry_scratch; } break; } *(OvlQuad *)beam_vector_scratch = 0; beam_vector_scratch[0] = 12.0f; transform_vector_by_basis(beam_vector_scratch, beam_vector_scratch, &beam_moby->rot_row0); - fast_vec_add(beam_geometry_scratch, &beam_moby->pos, beam_vars->unk30); + fast_vec_add(beam_geometry_scratch, &beam_moby->pos, beam_vars->beam_offset); *(OvlQuad *)beam_endpoint_and_offset_scratch = *(OvlQuad *)beam_geometry_scratch; if (beam_vars->unk60 != 0) { - fast_vec_normalize(beam_vars->unk20, + fast_vec_normalize(beam_vars->beam_end, beam_vector_scratch, -(*(float *)&fleet_beam_endpoint_axis_offset - 0.2f)); fast_vec_normalize(*(char **)&beam_vars->unk60 + 0x10, beam_vector_scratch, -*(float *)&fleet_beam_endpoint_axis_offset); - fast_vec_add(beam_geometry_scratch, beam_vars->unk20, beam_endpoint_and_offset_scratch); + fast_vec_add(beam_geometry_scratch, beam_vars->beam_end, beam_endpoint_and_offset_scratch); beam_endpoint_record = *(char **)&beam_vars->unk60; - *(OvlQuad *)&beam_vars->unk20[0] = *(OvlQuad *)beam_geometry_scratch; + *(OvlQuad *)&beam_vars->beam_end[0] = *(OvlQuad *)beam_geometry_scratch; fast_vec_add( beam_geometry_scratch, beam_endpoint_record + 0x10, beam_endpoint_and_offset_scratch); *(OvlQuad *)(beam_endpoint_record + 0x10) = *(OvlQuad *)beam_geometry_scratch; } else { - *(OvlQuad *)&beam_vars->unk20[0] = *(OvlQuad *)beam_endpoint_and_offset_scratch; + *(OvlQuad *)&beam_vars->beam_end[0] = *(OvlQuad *)beam_endpoint_and_offset_scratch; } if (flag) { - beam_vars->unk4C = + beam_vars->beam_width = fast_cos(fast_add_rotations( 3.1415927f, (compute_interpolated_record_value(beam_moby) - beam_vars->anim_start) / - beam_vars->unk5C)) * + beam_vars->anim_frames_per_radian)) * 0.02f + 0.09f; - fast_vec_normalize(beam_vars->unk10, beam_vector_scratch, 0.2f); - fast_vec_sub(beam_endpoint_position_scratch, &beam_moby->pos, beam_vars->unk10); - *(OvlQuad *)&beam_vars->unk10[0] = *(OvlQuad *)beam_endpoint_position_scratch; - signed_beam_length = fast_vec_length(beam_vars->unk30); - lerp_vector(beam_geometry_scratch, beam_vars->unk10, beam_vars->unk20, 0.5f); + fast_vec_normalize(beam_vars->beam_start, beam_vector_scratch, 0.2f); + fast_vec_sub(beam_endpoint_position_scratch, &beam_moby->pos, beam_vars->beam_start); + *(OvlQuad *)&beam_vars->beam_start[0] = *(OvlQuad *)beam_endpoint_position_scratch; + signed_beam_length = fast_vec_length(beam_vars->beam_offset); + lerp_vector(beam_geometry_scratch, beam_vars->beam_start, beam_vars->beam_end, 0.5f); beam_geometry_scratch[3] = signed_beam_length * 0.5f; if (fast_bsphere_check((char *)beam_geometry_scratch, 32.0f) != -1) { fast_vec_sub(hero_offset, &hero.motion.pos, &beam_moby->pos); @@ -238,29 +240,32 @@ void fleet_beam_update(struct Moby *beam_moby) { 0x10001, 1.0f, hero_offset); - collision_line( - &beam_moby->pos, beam_vars->unk20, 9, beam_moby, hit_descriptor_and_vector_scratch); - signed_beam_length = fast_vec_length(beam_vars->unk30); - *(OvlQuad *)beam_endpoint_position_scratch = *(OvlQuad *)&beam_vars->unk10[0]; + collision_line(&beam_moby->pos, + beam_vars->beam_end, + 9, + beam_moby, + hit_descriptor_and_vector_scratch); + signed_beam_length = fast_vec_length(beam_vars->beam_offset); + *(OvlQuad *)beam_endpoint_position_scratch = *(OvlQuad *)&beam_vars->beam_start[0]; for (i = 0; i < 7; i++) { fast_vec_scale(beam_endpoint_and_offset_scratch, - beam_vars->unk30, + beam_vars->beam_offset, random_float_between(0.0f, 0.9f)); add_vectors(hit_descriptor_and_vector_scratch, beam_endpoint_and_offset_scratch, beam_endpoint_position_scratch); fast_vec_normalize( beam_vector_scratch, - beam_vars->unk30, + beam_vars->beam_offset, random_float_between(frame_time * 10.0f, signed_beam_length / 20.0f)); spawn_fleet_beam_particle( beam_moby, beam_endpoint_and_offset_scratch, beam_vector_scratch); } signed_beam_length = -signed_beam_length; - *(OvlQuad *)beam_endpoint_position_scratch = *(OvlQuad *)&beam_vars->unk20[0]; + *(OvlQuad *)beam_endpoint_position_scratch = *(OvlQuad *)&beam_vars->beam_end[0]; for (i = 0; i < 8; i++) { fast_vec_scale(beam_endpoint_and_offset_scratch, - beam_vars->unk30, + beam_vars->beam_offset, random_float_between(0.0f, 0.9f)); fast_vec_sub(hit_descriptor_and_vector_scratch, beam_endpoint_position_scratch, @@ -269,18 +274,18 @@ void fleet_beam_update(struct Moby *beam_moby) { *(OvlQuad *)hit_descriptor_and_vector_scratch; fast_vec_normalize( beam_vector_scratch, - beam_vars->unk30, + beam_vars->beam_offset, random_float_between(frame_time * 10.0f, signed_beam_length / 20.0f)); spawn_fleet_beam_particle( beam_moby, beam_endpoint_and_offset_scratch, beam_vector_scratch); } fast_vec_normalize(beam_vector_scratch, - beam_vars->unk30, + beam_vars->beam_offset, -random_float_between(frame_time * 0.5f, frame_time)); beam_vector_scratch[0] += random_float_between(-0.01f, 0.01f); beam_vector_scratch[1] += random_float_between(-0.01f, 0.01f); beam_vector_scratch[2] += random_float_between(-0.01f, 0.01f); - spawn_fleet_beam_particle(0, beam_vars->unk20, beam_vector_scratch); + spawn_fleet_beam_particle(0, beam_vars->beam_end, beam_vector_scratch); } add_draw_callback(draw_fleet_beam_quad, beam_moby); } @@ -312,13 +317,13 @@ void draw_fleet_beam_quad(struct Moby *moby) { char beam_end_to_start_vector[16]; char quad_vertex_scratch[16]; int i; - fast_vec_sub(beam_end_to_start_vector, moby_vars->unk10, moby_vars->unk20); - fast_vec_sub(beam_start_vertex_offset, moby_vars->unk10, D_L17_001676C0); - fast_vec_sub(beam_end_vertex_offset, moby_vars->unk20, D_L17_001676C0); + fast_vec_sub(beam_end_to_start_vector, moby_vars->beam_start, moby_vars->beam_end); + fast_vec_sub(beam_start_vertex_offset, moby_vars->beam_start, D_L17_001676C0); + fast_vec_sub(beam_end_vertex_offset, moby_vars->beam_end, D_L17_001676C0); fast_vec_cross(beam_start_vertex_offset, beam_start_vertex_offset, beam_end_to_start_vector); - fast_vec_normalize(beam_start_vertex_offset, beam_start_vertex_offset, moby_vars->unk4C); + fast_vec_normalize(beam_start_vertex_offset, beam_start_vertex_offset, moby_vars->beam_width); fast_vec_cross(beam_end_vertex_offset, beam_end_vertex_offset, beam_end_to_start_vector); - fast_vec_normalize(beam_end_vertex_offset, beam_end_vertex_offset, moby_vars->unk4C); + fast_vec_normalize(beam_end_vertex_offset, beam_end_vertex_offset, moby_vars->beam_width); quad_primitive.z78 = get_effect_texture(0xE); quad_primitive.q80 = 0xFF9000000260L; quad_primitive.q88 = 0x8000000048L; @@ -331,13 +336,13 @@ void draw_fleet_beam_quad(struct Moby *moby) { quad_primitive.f[i].a = D_L17_001E6620_a95b8[i].a; quad_primitive.f[i].b = D_L17_001E6620_a95b8[i].b; } - fast_vec_sub(quad_vertex_scratch, moby_vars->unk10, beam_start_vertex_offset); + fast_vec_sub(quad_vertex_scratch, moby_vars->beam_start, beam_start_vertex_offset); *(OvlQuad *)(quad_primitive.pad + 0) = *(OvlQuad *)quad_vertex_scratch; - fast_vec_add(quad_vertex_scratch, moby_vars->unk10, beam_start_vertex_offset); + fast_vec_add(quad_vertex_scratch, moby_vars->beam_start, beam_start_vertex_offset); *(OvlQuad *)(quad_primitive.pad + 0x10) = *(OvlQuad *)quad_vertex_scratch; - fast_vec_sub(quad_vertex_scratch, moby_vars->unk20, beam_end_vertex_offset); + fast_vec_sub(quad_vertex_scratch, moby_vars->beam_end, beam_end_vertex_offset); *(OvlQuad *)(quad_primitive.pad + 0x20) = *(OvlQuad *)quad_vertex_scratch; - fast_vec_add(quad_vertex_scratch, moby_vars->unk20, beam_end_vertex_offset); + fast_vec_add(quad_vertex_scratch, moby_vars->beam_end, beam_end_vertex_offset); *(OvlQuad *)(quad_primitive.pad + 0x30) = *(OvlQuad *)quad_vertex_scratch; func_L00_001FD1D8_a95b8(&quad_primitive, 0, 0); } From 815d191b1fe7910db032bc8019a04dd8ea451a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:13:27 +0000 Subject: [PATCH 040/213] decomp: name camera transition, missile, rocket tank and gadgebot knockback fields in level 18 --- src/overlays/l18/mobys/camera_transition.c | 128 ++++++++++---------- src/overlays/l18/mobys/child_carrier.c | 16 +-- src/overlays/l18/mobys/drek_fight_missile.c | 27 +++-- src/overlays/l18/mobys/gadgebot.c | 27 +++-- src/overlays/l18/mobys/rocket_tank.c | 26 ++-- 5 files changed, 115 insertions(+), 109 deletions(-) diff --git a/src/overlays/l18/mobys/camera_transition.c b/src/overlays/l18/mobys/camera_transition.c index 7134c02583..7f513d26b3 100644 --- a/src/overlays/l18/mobys/camera_transition.c +++ b/src/overlays/l18/mobys/camera_transition.c @@ -47,25 +47,25 @@ void boss_camera_transition_update(struct Moby *moby) __asm__("FUN_L18_002df608" typedef struct BossCameraTransitionVars { u8 pad_0[0x10]; - u8 unk10; + u8 end_position; u8 pad_11[0xF]; - u8 unk20; + u8 start_rotation; u8 pad_21[0x3]; - f32 unk24; - f32 unk28; + f32 start_rotation_y; + f32 start_rotation_z; u8 pad_2C[0x4]; - f32 unk30[4]; + f32 end_rotation[4]; u8 unk40; u8 pad_41[0xB]; f32 unk4C; u8 pad_50[0x10]; - f32 unk60; + f32 transition_progress; s32 transition_progress_rate; - f32 unk68; - f32 unk6C; - f32 unk70; + f32 progress_acceleration; + f32 ramp; + f32 max_progress_rate; s32 timer_74; - s32 unk78; + s32 transition_mode; } BossCameraTransitionVars; /* Moby class 644 */ @@ -89,9 +89,9 @@ void boss_camera_transition_update(struct Moby *moby) { break; case STATE_PRE_TRANSITION_RAMP_UP: D_L18_0017EF08 = 1; - approach_value(&transition_private_vars->unk6C, 1.0f, (*(float *)&frame_time) * 4.0f); + approach_value(&transition_private_vars->ramp, 1.0f, (*(float *)&frame_time) * 4.0f); { - float t = transition_private_vars->unk6C; + float t = transition_private_vars->ramp; if (D_L18_0015F3FC_d < t) { D_L18_0015F3FC_d = t; } @@ -102,8 +102,8 @@ void boss_camera_transition_update(struct Moby *moby) { FUN_L00_00216f90_q( &transition_private_vars->unk40, transition_scratch_vectors, 0x72, 1); FUN_L00_002eaaa0_q( - transition_private_vars, &transition_private_vars->unk20, 1, 0, 0); - if (transition_private_vars->unk78 == 1) { + transition_private_vars, &transition_private_vars->start_rotation, 1, 0, 0); + if (transition_private_vars->transition_mode == 1) { help_request(0x4650, 0x85); moby->state = STATE_INTERPOLATE_TRANSITION_WITH_RAMP_UP; } else { @@ -115,34 +115,36 @@ void boss_camera_transition_update(struct Moby *moby) { case STATE_INTERPOLATE_TRANSITION: D_L18_0017EF08 = 1; if (fast_dec_timer(&transition_private_vars->timer_74)) { - advance_accelerated_scalar(&transition_private_vars->unk60, + advance_accelerated_scalar(&transition_private_vars->transition_progress, (float *)&transition_private_vars->transition_progress_rate, 1.0f, - transition_private_vars->unk68, - transition_private_vars->unk68, - transition_private_vars->unk70); + transition_private_vars->progress_acceleration, + transition_private_vars->progress_acceleration, + transition_private_vars->max_progress_rate); } lerp_vector(transition_scratch_vectors, transition_private_vars, - &transition_private_vars->unk10, - transition_private_vars->unk60); + &transition_private_vars->end_position, + transition_private_vars->transition_progress); clear_u64_value(transition_scratch_vectors + 4); - transition_scratch_vectors[5] = fast_subtract_rotations(transition_private_vars->unk30[1], - transition_private_vars->unk24) * - transition_private_vars->unk60; transition_scratch_vectors[5] = - fast_add_rotations(transition_private_vars->unk24, transition_scratch_vectors[5]); - transition_scratch_vectors[6] = fast_subtract_rotations(transition_private_vars->unk30[2], - transition_private_vars->unk28) * - transition_private_vars->unk60; + fast_subtract_rotations(transition_private_vars->end_rotation[1], + transition_private_vars->start_rotation_y) * + transition_private_vars->transition_progress; + transition_scratch_vectors[5] = fast_add_rotations( + transition_private_vars->start_rotation_y, transition_scratch_vectors[5]); transition_scratch_vectors[6] = - fast_add_rotations(transition_private_vars->unk28, transition_scratch_vectors[6]); + fast_subtract_rotations(transition_private_vars->end_rotation[2], + transition_private_vars->start_rotation_z) * + transition_private_vars->transition_progress; + transition_scratch_vectors[6] = fast_add_rotations( + transition_private_vars->start_rotation_z, transition_scratch_vectors[6]); FUN_L00_002ea9d8_q(transition_scratch_vectors); set_camera_rotation(transition_scratch_vectors + 4); - approach_value(&transition_private_vars->unk6C, 0.0f, (*(float *)&frame_time) * 4.0f); + approach_value(&transition_private_vars->ramp, 0.0f, (*(float *)&frame_time) * 4.0f); { - float transition_progress = transition_private_vars->unk60; - D_L18_0015F3FC_d = transition_private_vars->unk6C; + float transition_progress = transition_private_vars->transition_progress; + D_L18_0015F3FC_d = transition_private_vars->ramp; if (1.0f <= transition_progress) { camera_transition_active = 0; clear_u64_value(transition_scratch_vectors + 8); @@ -162,40 +164,42 @@ void boss_camera_transition_update(struct Moby *moby) { break; case STATE_INTERPOLATE_TRANSITION_WITH_RAMP_UP: if (fast_dec_timer(&transition_private_vars->timer_74)) { - advance_accelerated_scalar(&transition_private_vars->unk60, + advance_accelerated_scalar(&transition_private_vars->transition_progress, (float *)&transition_private_vars->transition_progress_rate, 1.0f, - transition_private_vars->unk68, - transition_private_vars->unk68, - transition_private_vars->unk70); + transition_private_vars->progress_acceleration, + transition_private_vars->progress_acceleration, + transition_private_vars->max_progress_rate); } lerp_vector(transition_scratch_vectors, transition_private_vars, - &transition_private_vars->unk10, - transition_private_vars->unk60); + &transition_private_vars->end_position, + transition_private_vars->transition_progress); clear_u64_value(transition_scratch_vectors + 4); - transition_scratch_vectors[5] = fast_subtract_rotations(transition_private_vars->unk30[1], - transition_private_vars->unk24) * - transition_private_vars->unk60; transition_scratch_vectors[5] = - fast_add_rotations(transition_private_vars->unk24, transition_scratch_vectors[5]); - transition_scratch_vectors[6] = fast_subtract_rotations(transition_private_vars->unk30[2], - transition_private_vars->unk28) * - transition_private_vars->unk60; + fast_subtract_rotations(transition_private_vars->end_rotation[1], + transition_private_vars->start_rotation_y) * + transition_private_vars->transition_progress; + transition_scratch_vectors[5] = fast_add_rotations( + transition_private_vars->start_rotation_y, transition_scratch_vectors[5]); transition_scratch_vectors[6] = - fast_add_rotations(transition_private_vars->unk28, transition_scratch_vectors[6]); + fast_subtract_rotations(transition_private_vars->end_rotation[2], + transition_private_vars->start_rotation_z) * + transition_private_vars->transition_progress; + transition_scratch_vectors[6] = fast_add_rotations( + transition_private_vars->start_rotation_z, transition_scratch_vectors[6]); FUN_L00_002ea9d8_q(transition_scratch_vectors); set_camera_rotation(transition_scratch_vectors + 4); - if (1.0f <= transition_private_vars->unk60 || - (0.2f < transition_private_vars->unk60 && D_L18_00179E10[0] == 0 && + if (1.0f <= transition_private_vars->transition_progress || + (0.2f < transition_private_vars->transition_progress && D_L18_00179E10[0] == 0 && D_L18_00179E10[9] == -1)) { float t; - approach_value(&transition_private_vars->unk6C, 1.0f, (*(float *)&frame_time) * 4.0f); - t = transition_private_vars->unk6C; + approach_value(&transition_private_vars->ramp, 1.0f, (*(float *)&frame_time) * 4.0f); + t = transition_private_vars->ramp; D_L18_0015F3FC_d = t; if (1.0f <= t) { camera_transition_active = 0; - transition_private_vars->unk60 = 1.0f; + transition_private_vars->transition_progress = 1.0f; clear_u64_value(transition_scratch_vectors + 8); transition_scratch_vectors[10] = transition_private_vars->unk4C; FUN_L00_00216f90_q( @@ -210,14 +214,14 @@ void boss_camera_transition_update(struct Moby *moby) { &transition_private_vars->unk40, transition_scratch_vectors + 8, 0x72, 1); return; } else { - approach_value(&transition_private_vars->unk6C, 0.0f, (*(float *)&frame_time) * 4.0f); - D_L18_0015F3FC_d = transition_private_vars->unk6C; + approach_value(&transition_private_vars->ramp, 0.0f, (*(float *)&frame_time) * 4.0f); + D_L18_0015F3FC_d = transition_private_vars->ramp; } break; case STATE_POST_TRANSITION_RAMP_DOWN: - if (0.0f < transition_private_vars->unk6C) { - approach_value(&transition_private_vars->unk6C, 0.0f, (*(float *)&frame_time) * 4.0f); - D_L18_0015F3FC_d = transition_private_vars->unk6C; + if (0.0f < transition_private_vars->ramp) { + approach_value(&transition_private_vars->ramp, 0.0f, (*(float *)&frame_time) * 4.0f); + D_L18_0015F3FC_d = transition_private_vars->ramp; } else { moby->state = STATE_IDLE; } @@ -253,19 +257,19 @@ void start_camera_transition(struct Moby *moby, int transition_mode) { BossCameraTransitionVars *position_rotation_transition_vars = (BossCameraTransitionVars *)moby->pvars; - *(int *)&position_rotation_transition_vars->unk60 = 0; + *(int *)&position_rotation_transition_vars->transition_progress = 0; position_rotation_transition_vars->transition_progress_rate = 0; qcopy(position_rotation_transition_vars, transition_start_position); - qcopy(&position_rotation_transition_vars->unk10, transition_target_position); - qcopy(&position_rotation_transition_vars->unk20, transition_start_rotation); - qcopy(position_rotation_transition_vars->unk30, transition_target_rotation); + qcopy(&position_rotation_transition_vars->end_position, transition_target_position); + qcopy(&position_rotation_transition_vars->start_rotation, transition_start_rotation); + qcopy(position_rotation_transition_vars->end_rotation, transition_target_rotation); qcopy(&position_rotation_transition_vars->unk40, transition_setup_vector); moby->state = CAMERA_TRANSITION_STATE_PRE_TRANSITION_RAMP_UP; - position_rotation_transition_vars->unk68 = frame_time_sq * 0.333f; - position_rotation_transition_vars->unk70 = + position_rotation_transition_vars->progress_acceleration = frame_time_sq * 0.333f; + position_rotation_transition_vars->max_progress_rate = 1.0f / (float)scale_game_frames(invulnerability_duration_frames); position_rotation_transition_vars->timer_74 = scale_game_frames(transition_delay_frames); - position_rotation_transition_vars->unk78 = transition_mode; + position_rotation_transition_vars->transition_mode = transition_mode; hero.invulnerable_frames = scale_game_frames(invulnerability_duration_frames); } diff --git a/src/overlays/l18/mobys/child_carrier.c b/src/overlays/l18/mobys/child_carrier.c index bffc54a83a..6a9514d08e 100644 --- a/src/overlays/l18/mobys/child_carrier.c +++ b/src/overlays/l18/mobys/child_carrier.c @@ -16,10 +16,10 @@ void child_carrier_update(char *moby) __asm__("FUN_L18_002fa728"); typedef struct ChildCarrierVars { u8 pad_0[0x20]; - f32 unk20[4]; + f32 entity_matrix[4]; u8 pad_30[0x30]; - f32 unk60[4]; - u8 unk70; + f32 previous_position[4]; + u8 previous_rotation; u8 pad_71[0xF]; s32 unk80; char *carried_child_moby; @@ -39,10 +39,10 @@ void child_carrier_update(char *moby) { MOBY(moby)->state = UPDATE_TRANSFORM_FROM_HISTORY; break; case UPDATE_TRANSFORM_FROM_HISTORY: - fast_vec_sub(position_delta, moby + 0x10, transform_and_child_vars->unk60); - update_entity_matrix(transform_and_child_vars->unk20, + fast_vec_sub(position_delta, moby + 0x10, transform_and_child_vars->previous_position); + update_entity_matrix(transform_and_child_vars->entity_matrix, position_delta, - &transform_and_child_vars->unk70, + &transform_and_child_vars->previous_rotation, moby + 0x40); break; } @@ -59,8 +59,8 @@ void child_carrier_update(char *moby) { MOBY(moby)->scale / MOBY(moby)->pclass->scale; } } - qcopy(transform_and_child_vars->unk60, moby + 0x10); - qcopy(&transform_and_child_vars->unk70, moby + 0x40); + qcopy(transform_and_child_vars->previous_position, moby + 0x10); + qcopy(&transform_and_child_vars->previous_rotation, moby + 0x40); child = transform_and_child_vars->carried_child_moby; if (child != 0) { qcopy(child + 0x10, moby + 0x10); diff --git a/src/overlays/l18/mobys/drek_fight_missile.c b/src/overlays/l18/mobys/drek_fight_missile.c index 81f1811b05..68b95ddc03 100644 --- a/src/overlays/l18/mobys/drek_fight_missile.c +++ b/src/overlays/l18/mobys/drek_fight_missile.c @@ -101,11 +101,11 @@ typedef struct DrekFightMissileVars { u8 pad_0[0x110]; u8 wander_destination_position; u8 pad_111[0xF]; - u8 unk120; + u8 dive_target_position; u8 pad_121[0x7]; - f32 unk128; + f32 dive_target_ground_z; u8 pad_12C[0x4]; - f32 unk130[4]; + f32 dive_start_velocity[4]; u8 pad_140[0x4]; f32 unk144; u8 pad_148[0x4]; @@ -146,9 +146,10 @@ void drek_fight_missile_update(struct Moby *moby) { missile_vars->unk15C = initialization_frame_time * 10.0f; missile_vars->effect_color_phase = random_angle_radians(); moby->draw_dist = 0xFF; - qcopy(&missile_vars->unk120, &moby->pos); - missile_vars->unk128 += 5.0f; - missile_vars->unk128 = probe_ground_height(&missile_vars->unk120, 0, 0.5f); + qcopy(&missile_vars->dive_target_position, &moby->pos); + missile_vars->dive_target_ground_z += 5.0f; + missile_vars->dive_target_ground_z = + probe_ground_height(&missile_vars->dive_target_position, 0, 0.5f); select_drek_fight_missile_wander_target(moby, &missile_vars->wander_destination_position); moby->state = DREK_MISSILE_WAIT_FOR_ACTIVATION; moby->flags |= 1; @@ -166,26 +167,26 @@ void drek_fight_missile_update(struct Moby *moby) { return; } moby->state = DREK_MISSILE_DIVE; - missile_vars->unk130[0] = + missile_vars->dive_start_velocity[0] = fast_cos(moby->rot.z) * (*(float *)&l18_drek_missile_wander_horizontal_speed_gp * frame_time); - missile_vars->unk130[1] = + missile_vars->dive_start_velocity[1] = fast_sin(moby->rot.z) * (*(float *)&l18_drek_missile_wander_horizontal_speed_gp * frame_time); - missile_vars->unk130[2] = missile_vars->unk144; + missile_vars->dive_start_velocity[2] = missile_vars->unk144; missile_vars->dive_motion_blend_factor = 0; break; } case DREK_MISSILE_DIVE: { float dive_movement_step[4]; float ground_check_position[4]; - fast_vec_sub(dive_movement_step, &missile_vars->unk120, &moby->pos); + fast_vec_sub(dive_movement_step, &missile_vars->dive_target_position, &moby->pos); fast_vec_normalize(dive_movement_step, dive_movement_step, *(float *)&l18_drek_missile_dive_speed_gp * frame_time); approach_value((float *)&missile_vars->dive_motion_blend_factor, 1.0f, frame_time); lerp_vector(dive_movement_step, - missile_vars->unk130, + missile_vars->dive_start_velocity, dive_movement_step, *(float *)&missile_vars->dive_motion_blend_factor); fast_vec_add(&moby->pos, &moby->pos, dive_movement_step); @@ -194,12 +195,12 @@ void drek_fight_missile_update(struct Moby *moby) { fast_vec_normalize(ground_check_position, &moby->rot_row0, 1.0f); fast_vec_add(ground_check_position, ground_check_position, &moby->pos); update_drek_fight_missile_trail_and_queue_effects(moby); - if (ground_check_position[2] < missile_vars->unk128) { + if (ground_check_position[2] < missile_vars->dive_target_ground_z) { float minimum_missile_height; func_0022ED80_2F0F78(1, 0, (int)moby); moby->state = DREK_MISSILE_WAIT_TO_EXPLODE; missile_vars->timer_160 = scale_game_frames(0x5A); - minimum_missile_height = missile_vars->unk128 + 0.7f; + minimum_missile_height = missile_vars->dive_target_ground_z + 0.7f; if (moby->pos.z < minimum_missile_height) { moby->pos.z = minimum_missile_height; } diff --git a/src/overlays/l18/mobys/gadgebot.c b/src/overlays/l18/mobys/gadgebot.c index 8b228044c3..fa4f102a24 100644 --- a/src/overlays/l18/mobys/gadgebot.c +++ b/src/overlays/l18/mobys/gadgebot.c @@ -265,19 +265,19 @@ typedef struct { unsigned char anim_flags; /* 0x67 */ char pad68[8]; char fall[0x10]; /* 0x70 */ - float unk80; + float knockback_gravity; float death_fall_horizontal_speed_approach_step; - float unk88; + float knockback_speed; float death_fall_initial_vertical_speed; int death_fall_collision_radius_fixed_point; - int unk94; - float unk98; + int knockback_motion_flags; + float knockback_collision_z_offset; char pad9C[0x11]; unsigned char unkAD; /* 0xAD */ char padAE[0xE]; float unkBC; - float unkC0; - float unkC4; + float knockback_apex_animation_frame; + float knockback_landing_animation_frame; char padC8[0xB8]; u128 target; /* 0x180 */ char pad190[0x30]; @@ -358,26 +358,27 @@ void update_gadgebot_damage_target_and_glow(struct Moby *moby) { fall_setup_value_or_path_slot_address = 0x200; sentry_vars->death_fall_collision_radius_fixed_point = fall_setup_value_or_path_slot_address; - sentry_vars->unk98 = 0.5f; - sentry_vars->unk80 = gadgebot_death_fall_gravity_gp * frame_time_sq; + sentry_vars->knockback_collision_z_offset = 0.5f; + sentry_vars->knockback_gravity = gadgebot_death_fall_gravity_gp * frame_time_sq; sentry_vars->death_fall_horizontal_speed_approach_step = gadgebot_death_fall_horizontal_speed_approach_rate_gp * frame_time_sq; - sentry_vars->unk88 = gadgebot_death_fall_base_horizontal_speed_gp * frame_time; + sentry_vars->knockback_speed = + gadgebot_death_fall_base_horizontal_speed_gp * frame_time; sentry_vars->death_fall_initial_vertical_speed = gadgebot_death_fall_base_vertical_speed_gp * frame_time; reaction_value_or_path_address = 0x29; - sentry_vars->unk94 = reaction_value_or_path_address; + sentry_vars->knockback_motion_flags = reaction_value_or_path_address; sentry_vars->unkAD = 0; sentry_vars->unkBC = frame_time + frame_time; moby->flags &= ~0x1000; v.q = *(u128 *)(coll + 0x10); trooper_knockback_arc(&v, &angle, - &sentry_vars->unk88, + &sentry_vars->knockback_speed, &sentry_vars->death_fall_initial_vertical_speed); trooper_start_knockback(moby, sentry_vars->fall, 3, 1, 0, angle); - sentry_vars->unkC0 = 7.5f; - sentry_vars->unkC4 = 15.0f; + sentry_vars->knockback_apex_animation_frame = 7.5f; + sentry_vars->knockback_landing_animation_frame = 15.0f; moby->state = GADGEBOT_DEATH_FALL; moby->collision = 0; sentry_vars->anim_flags = 0x78; diff --git a/src/overlays/l18/mobys/rocket_tank.c b/src/overlays/l18/mobys/rocket_tank.c index 62c43a54f9..b60a1338e7 100644 --- a/src/overlays/l18/mobys/rocket_tank.c +++ b/src/overlays/l18/mobys/rocket_tank.c @@ -416,15 +416,15 @@ void update_rocket_tank_path_movement(struct Moby *moby) __asm__("FUN_L18_002f86 typedef struct RocketTankVars { u8 pad_0[0x100]; - s32 unk100; + s32 path; u8 pad_104[0x1C]; - s32 unk120; + s32 path_node; u8 pad_124[0x4]; - f32 unk128; + f32 yaw_velocity; f32 path_movement_step_length; u8 pad_130[0x8]; - char *unk138; - char *unk13C; + char *attached_moby_0; + char *attached_moby_1; } RocketTankVars; void update_rocket_tank_path_movement(struct Moby *moby) { @@ -434,11 +434,11 @@ void update_rocket_tank_path_movement(struct Moby *moby) { float path_target_yaw, target_movement_step, z, sc; char *attached_moby; qcopy(path_target_position, - (char *)D_L18_001B0EB0[moby_vars->unk100] + moby_vars->unk120 * 16 + 0x10); + (char *)D_L18_001B0EB0[moby_vars->path] + moby_vars->path_node * 16 + 0x10); path_target_yaw = fast_arc_tan(path_target_position[0] - moby->pos.x, path_target_position[1] - moby->pos.y); approach_angle(&moby->rot.z, - &moby_vars->unk128, + &moby_vars->yaw_velocity, path_target_yaw, frame_time_sq * 3.1415927f, frame_time_sq * 3.1415927f, @@ -452,8 +452,8 @@ void update_rocket_tank_path_movement(struct Moby *moby) { fast_vec_normalize(movement_step, &moby->rot_row0, moby_vars->path_movement_step_length); FUN_L00_00258830((int)moby, (int)movement_step, 0.5f, 0.5f, z, 0); if (fast_vec_dist(&moby->pos, path_target_position) < 1.0f) { - int k = random_integer_below(*D_L18_001B0EB0[moby_vars->unk100] - 1) + 1; - moby_vars->unk120 = (moby_vars->unk120 + k) % *D_L18_001B0EB0[moby_vars->unk100]; + int k = random_integer_below(*D_L18_001B0EB0[moby_vars->path] - 1) + 1; + moby_vars->path_node = (moby_vars->path_node + k) % *D_L18_001B0EB0[moby_vars->path]; } sc = moby_vars->path_movement_step_length / (*(float *)&rocket_tank_attached_moby_speed_reference_gp * frame_time); @@ -461,19 +461,19 @@ void update_rocket_tank_path_movement(struct Moby *moby) { sc = 2.0f; else if (sc < z) sc = z; - attached_moby = moby_vars->unk138; + attached_moby = moby_vars->attached_moby_0; if (attached_moby) { char *q; MOBY(attached_moby)->anim_speed = sc; - q = moby_vars->unk138; + q = moby_vars->attached_moby_0; qcopy(q + 0x40, &moby->rot); qcopy(q + 0x10, &moby->pos); } - attached_moby = moby_vars->unk13C; + attached_moby = moby_vars->attached_moby_1; if (attached_moby) { char *q; MOBY(attached_moby)->anim_speed = sc; - q = moby_vars->unk13C; + q = moby_vars->attached_moby_1; qcopy(q + 0x40, &moby->rot); qcopy(q + 0x10, &moby->pos); } From d507d5696624bfbeb5274c449d80ae91fd44fb10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:14:18 +0000 Subject: [PATCH 041/213] decomp: name decoy glove, metal detector and doom bot fields in shared weapons --- src/overlays/shared/weapons/decoy_glove.c | 51 ++++++++++--------- .../shared/weapons/doom_bot_movement.c | 22 ++++---- src/overlays/shared/weapons/metal_detector.c | 6 +-- 3 files changed, 40 insertions(+), 39 deletions(-) diff --git a/src/overlays/shared/weapons/decoy_glove.c b/src/overlays/shared/weapons/decoy_glove.c index 8d2f661223..376a53e720 100644 --- a/src/overlays/shared/weapons/decoy_glove.c +++ b/src/overlays/shared/weapons/decoy_glove.c @@ -20,9 +20,9 @@ typedef struct DecoyGloveVars { u8 pad0[0x40]; - u8 unk40[0x10]; - char *unk50; - s32 unk54; + u8 decoy_position[0x10]; + char *held_decoy; + s32 throw_cooldown; } DecoyGloveVars; typedef struct Hero Hero; @@ -239,27 +239,28 @@ void decoy_glove_update(unsigned char *moby) { FUN_L00_0024f7c8(moby, 0, vb); build_moby_bone_transform(moby, 0, vd); transform_vector(vc, va, vd); - fast_vec_add(&glove_vars->unk40, vb, vc); + fast_vec_add(&glove_vars->decoy_position, vb, vc); - tracked_target_moby = glove_vars->unk50; + tracked_target_moby = glove_vars->held_decoy; if (tracked_target_moby) { MOBY(tracked_target_moby)->collision_disable = 1; - if (D_0013E539_lui && *(short *)(glove_vars->unk50 + 0xA6) != 0x76C) { + if (D_0013E539_lui && *(short *)(glove_vars->held_decoy + 0xA6) != 0x76C) { qzero(&loc); - mine_spawn_drops(glove_vars->unk50, D_L00_001B0830); - ((void (*)(void *))mark_moby_for_removal)(glove_vars->unk50); - *(int *)&glove_vars->unk50 = spawn_decoy(moby, &glove_vars->unk40, &loc); + mine_spawn_drops(glove_vars->held_decoy, D_L00_001B0830); + ((void (*)(void *))mark_moby_for_removal)(glove_vars->held_decoy); + *(int *)&glove_vars->held_decoy = spawn_decoy(moby, &glove_vars->decoy_position, &loc); } - if (glove_vars->unk50 != 0 && *(unsigned char *)(glove_vars->unk50 + 0x20) != 0xFE && - *(unsigned char *)(glove_vars->unk50 + 0x20) != 0xFD) + if (glove_vars->held_decoy != 0 && + *(unsigned char *)(glove_vars->held_decoy + 0x20) != 0xFE && + *(unsigned char *)(glove_vars->held_decoy + 0x20) != 0xFD) goto target_valid; } - *(int *)&glove_vars->unk50 = 0; + *(int *)&glove_vars->held_decoy = 0; target_valid: hero_data = &hero; if (hero_data->state.current == 1) hero_set_state(0x1E, 1); - if (fast_dec_timer((int *)(&glove_vars->unk54))) { + if (fast_dec_timer((int *)(&glove_vars->throw_cooldown))) { if (hero_data->item_use_locked == 0) { if (hero_data->item_anim_active && hero_data->item_anim_frames == scale_game_frames(0x11)) @@ -280,12 +281,12 @@ void decoy_glove_update(unsigned char *moby) { use_ammo(-1, 1); MOBY(moby)->state = DECOY_GLOVE_RELEASE_DECOY; L3D34: - *(u128_D3B20 *)&loc = *(u128_D3B20 *)(&glove_vars->unk40); + *(u128_D3B20 *)&loc = *(u128_D3B20 *)(&glove_vars->decoy_position); decoy_glove_aim_throw((int)moby, (void *)glove_vars, (float *)&loc); switch (MOBY(moby)->state) { case DECOY_GLOVE_INITIALIZE: - *(int *)&glove_vars->unk50 = 0; + *(int *)&glove_vars->held_decoy = 0; if (!(MOBY(moby)->anim_flags & 2)) MOBY(moby)->state = DECOY_GLOVE_WAIT_FOR_MOBY_FLAG; else @@ -297,7 +298,7 @@ void decoy_glove_update(unsigned char *moby) { case DECOY_GLOVE_TARGET_FOLLOW_AND_SPAWN: break; case DECOY_GLOVE_RELEASE_DECOY: - if (glove_vars->unk50) { + if (glove_vars->held_decoy) { char *stats = ((char *)&item_usage); if (*(unsigned short *)(stats + 0xC8) <= 0xFFFE) *(unsigned short *)(stats + 0xC8) = *(unsigned short *)(stats + 0xC8) + 1; @@ -305,15 +306,15 @@ void decoy_glove_update(unsigned char *moby) { *(unsigned short *)(stats + 0xCA) = scale_game_frames(D_0015EEA4) / 600; *(unsigned int *)(stats + 0xCC) = (*(unsigned int *)(stats + 0xCC) | (1 << D_0015ED84)) | 0x80000000; - release_moby_with_collision_check((float *)(&glove_vars->unk40), - glove_vars->unk50, - *(char **)(glove_vars->unk50 + 0x78) + 0x10); - *(int *)&glove_vars->unk50 = 0; + release_moby_with_collision_check((float *)(&glove_vars->decoy_position), + glove_vars->held_decoy, + *(char **)(glove_vars->held_decoy + 0x78) + 0x10); + *(int *)&glove_vars->held_decoy = 0; } else { allocate_voice_for_target_entry(0, 0, (int)moby); } MOBY(moby)->state = DECOY_GLOVE_WAIT_AFTER_RELEASE; - glove_vars->unk54 = scale_game_frames(0x14); + glove_vars->throw_cooldown = scale_game_frames(0x14); break; case DECOY_GLOVE_WAIT_AFTER_RELEASE: { struct Hero *h = &hero; @@ -330,18 +331,18 @@ void decoy_glove_update(unsigned char *moby) { break; } - if (glove_vars->unk50) { - qcopy(glove_vars->unk50 + 0x10, &glove_vars->unk40); + if (glove_vars->held_decoy) { + qcopy(glove_vars->held_decoy + 0x10, &glove_vars->decoy_position); return; } if (get_ammo(-1)) { qzero(&loc); - *(int *)&glove_vars->unk50 = spawn_decoy(moby, &glove_vars->unk40, &loc); + *(int *)&glove_vars->held_decoy = spawn_decoy(moby, &glove_vars->decoy_position, &loc); } else { struct Hero *h = &hero; if (h->item_anim_active) { qzero(&loc); - *(int *)&glove_vars->unk50 = spawn_decoy(moby, &glove_vars->unk40, &loc); + *(int *)&glove_vars->held_decoy = spawn_decoy(moby, &glove_vars->decoy_position, &loc); } } } diff --git a/src/overlays/shared/weapons/doom_bot_movement.c b/src/overlays/shared/weapons/doom_bot_movement.c index 2d7af3c635..5363738285 100644 --- a/src/overlays/shared/weapons/doom_bot_movement.c +++ b/src/overlays/shared/weapons/doom_bot_movement.c @@ -64,12 +64,12 @@ typedef struct { typedef struct { u8 pad0[0x18]; - Hit *unk18; + Hit *moby; } XD; typedef struct Cls_2C0CF8 { char pad0[0x24]; - float unk24; /* 0x24 */ + float scale; /* 0x24 */ } Cls_2C0CF8; typedef struct Mob_2C0CF8 { @@ -435,9 +435,9 @@ f32 select_moby_heading_by_collision_probes(Mob *moby, } } } else { - if ((*(XD *)D_L00_00173E40).unk18 == x->p38 || - ((*(XD *)D_L00_00173E40).unk18 != 0 && (*(XD *)D_L00_00173E40).unk18->p24 != 0 && - (*(XD *)D_L00_00173E40).unk18->p24->h46 == 5)) { + if ((*(XD *)D_L00_00173E40).moby == x->p38 || + ((*(XD *)D_L00_00173E40).moby != 0 && (*(XD *)D_L00_00173E40).moby->p24 != 0 && + (*(XD *)D_L00_00173E40).moby->p24->h46 == 5)) { *probe_distance_score_out = 100.0f; return arc; } @@ -585,7 +585,7 @@ int try_start_moby_hop(Mob_2C0CF8 *moby, Blk *block, void *target, int check_lin can_halve = 1; func_001F9BF0_2C0CF8(jump, target, moby->pos); - func_L00_001FF5B0_2C0CF8(moby->spatial_scale * 5.2f / moby->p24->unk24, jump, jump); + func_L00_001FF5B0_2C0CF8(moby->spatial_scale * 5.2f / moby->p24->scale, jump, jump); func_001F9BD8_2C0CF8(land, moby->pos, jump); func_001F9C30_2C0CF8(half, jump, 0.5f); half_length = func_001F9CE8_2C0CF8(half); @@ -601,7 +601,7 @@ int try_start_moby_hop(Mob_2C0CF8 *moby, Blk *block, void *target, int check_lin } return 0; } - if (moby->spatial_scale * 3.0f / moby->p24->unk24 < jump[2]) { + if (moby->spatial_scale * 3.0f / moby->p24->scale < jump[2]) { if (can_halve) { return try_start_moby_hop(moby, block, half, 1); } @@ -617,18 +617,18 @@ int try_start_moby_hop(Mob_2C0CF8 *moby, Blk *block, void *target, int check_lin } return 0; } - land[2] = land[2] + moby->spatial_scale * 0.025f / moby->p24->unk24; + land[2] = land[2] + moby->spatial_scale * 0.025f / moby->p24->scale; if (probe_moby_raised_sphere_collision(moby, 6, land)) { if (can_halve) { return try_start_moby_hop(moby, block, half, 1); } return 0; } - land[2] = land[2] - moby->spatial_scale * 0.025f / moby->p24->unk24; + land[2] = land[2] - moby->spatial_scale * 0.025f / moby->p24->scale; qcopy_nc(from, moby->pos); - from[2] = from[2] + moby->spatial_scale * 0.2f / moby->p24->unk24; + from[2] = from[2] + moby->spatial_scale * 0.2f / moby->p24->scale; qcopy_nc(to, land); - to[2] = to[2] + moby->spatial_scale * 0.2f / moby->p24->unk24; + to[2] = to[2] + moby->spatial_scale * 0.2f / moby->p24->scale; if (check_line) { if (func_L00_001EFFF0_2C0CF8(from, to, 6, moby, 0) == 0) { if (can_halve) { diff --git a/src/overlays/shared/weapons/metal_detector.c b/src/overlays/shared/weapons/metal_detector.c index 2345281a48..4bb32a0c2a 100644 --- a/src/overlays/shared/weapons/metal_detector.c +++ b/src/overlays/shared/weapons/metal_detector.c @@ -70,7 +70,7 @@ typedef struct Vars2d2ee8 { s32 unk24; /* 0x24 */ s32 unk28; /* 0x28 */ u8 pad2C[4]; - Vec4 unk30; /* 0x30 */ + Vec4 bone3_position; /* 0x30: build_moby_bone_transform(moby, 3) */ } Vars2d2ee8; typedef struct TargetVars2d2ee8 { @@ -340,10 +340,10 @@ void metal_detector_update(struct Moby *moby) { *(u128 *)scratch_vector = 0; build_quaternion_from_axis_rotations(u, scratch_vector); } - qcopy(&metal_detector_vars->unk30, v); + qcopy(&metal_detector_vars->bone3_position, v); quaternion_nlerp(D_L00_001E1170, D_L00_001E1170, u, 0.1f); build_moby_bone_transform(moby, 3, scratch_vector); - qcopy(&metal_detector_vars->unk30, scratch_vector); + qcopy(&metal_detector_vars->bone3_position, scratch_vector); if (controller_state_lui.pressed & 0x20) { metal_detector_vars->unk24 = 0; metal_detector_vars->unk28 = 0; From dcf39af1e04e4071e13213b89468bc7814f28e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:16:19 +0000 Subject: [PATCH 042/213] decomp: name the moby bolt count Spawners split their own count across the mobys they spawn, the crate code zeroes it around the bolt drop, and the sand shark nest subtracts a bolts stat from it. --- include/rnc/mobys/moby.h | 2 +- src/overlays/l02/mobys/sand_shark_nest.c | 6 +++--- src/overlays/l12/mobys/blarg_trooper.c | 2 +- src/overlays/l16/mobys/test_dummy.c | 2 +- src/overlays/shared/enemies/bomb_spawner_bomb.c | 14 +++++++------- src/overlays/shared/enemies/frog.c | 2 +- src/overlays/shared/enemies/spawner_egg.c | 14 +++++++------- .../shared/mobys/evaluate_moby_animation_pose.c | 4 ++-- src/overlays/shared/pickups/crate.c | 14 +++++++------- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/include/rnc/mobys/moby.h b/include/rnc/mobys/moby.h index 1ace2fbcd7..9644be8fa3 100644 --- a/include/rnc/mobys/moby.h +++ b/include/rnc/mobys/moby.h @@ -87,7 +87,7 @@ struct Moby { u8 mission; /* 0xB0: index into the level's D_0014C050 row (0xFF: not spawned) */ u8 padB1; u16 save_id; /* index into the level collected[]/killed[] tables and save bits D_0014C190[level][id >> 5] */ - s16 unkB4; + s16 bolts; /* bolts it drops; spawners split theirs across the mobys they spawn */ u8 padB6[2]; void * parent; /* 0xB8: spawner (bolt source record); its byte 0xB1 is a per-level id (FUN_L00_002a6b70) */ diff --git a/src/overlays/l02/mobys/sand_shark_nest.c b/src/overlays/l02/mobys/sand_shark_nest.c index 6cb21f82d4..ff5d488e49 100644 --- a/src/overlays/l02/mobys/sand_shark_nest.c +++ b/src/overlays/l02/mobys/sand_shark_nest.c @@ -171,9 +171,9 @@ void sand_shark_nest_update(unsigned char *moby) { } switch (MOBY(moby)->state) { case SAND_SHARK_NEST_INITIALIZE: - MOBY(moby)->unkB4 -= bolt_source_stats_lui[2][moby[0xB1]].bolts; - if (MOBY(moby)->unkB4 <= 0) { - MOBY(moby)->unkB4 = 1; + MOBY(moby)->bolts -= bolt_source_stats_lui[2][moby[0xB1]].bolts; + if (MOBY(moby)->bolts <= 0) { + MOBY(moby)->bolts = 1; } MOBY(moby)->state = SAND_SHARK_NEST_WAIT_FOR_SPAWN; nest_vars->f20 = 3.0f; diff --git a/src/overlays/l12/mobys/blarg_trooper.c b/src/overlays/l12/mobys/blarg_trooper.c index 7bc95812bd..db095378f9 100644 --- a/src/overlays/l12/mobys/blarg_trooper.c +++ b/src/overlays/l12/mobys/blarg_trooper.c @@ -695,7 +695,7 @@ typedef struct { } Level12VendorData; void remove_blarg_trooper_and_attachment(struct Moby *moby) { - moby->unkB4 = 0; + moby->bolts = 0; FUN_L00_00257470(moby, 0, -1); if (((Level12VendorData *)moby->pvars)->child != 0) { mark_moby_for_removal(((Level12VendorData *)moby->pvars)->child); diff --git a/src/overlays/l16/mobys/test_dummy.c b/src/overlays/l16/mobys/test_dummy.c index 57ba7a69d7..0ae59c0fdd 100644 --- a/src/overlays/l16/mobys/test_dummy.c +++ b/src/overlays/l16/mobys/test_dummy.c @@ -165,7 +165,7 @@ void test_dummy_update(unsigned char *moby) { case TEST_DUMMY_STATE_INITIALIZE: /* set up: lives, home position, the held child for the variant */ dummy_data->respawn_request_state = 1; if (dummy_data->lives > 0) { - MOBY(moby)->unkB4 /= dummy_data->lives; + MOBY(moby)->bolts /= dummy_data->lives; } moby[0x20] = 1; moby[0x31] = 0; diff --git a/src/overlays/shared/enemies/bomb_spawner_bomb.c b/src/overlays/shared/enemies/bomb_spawner_bomb.c index 65bef4c3bc..ff94900ae3 100644 --- a/src/overlays/shared/enemies/bomb_spawner_bomb.c +++ b/src/overlays/shared/enemies/bomb_spawner_bomb.c @@ -157,15 +157,15 @@ struct Moby *revive_spawner_pooled_child(struct Moby *spawner_moby, Vec4 *at, s3 target->unk68 = 0; target->unk6C = 0; } - if (spawner_moby->unkB4 < current_moby->unkB4) { - current_moby->unkB4 = spawner_moby->unkB4; + if (spawner_moby->bolts < current_moby->bolts) { + current_moby->bolts = spawner_moby->bolts; } - if (current_moby->unkB4 <= 0) { - current_moby->unkB4 = 1; + if (current_moby->bolts <= 0) { + current_moby->bolts = 1; } - spawner_moby->unkB4 -= current_moby->unkB4; - if (spawner_moby->unkB4 < 0) { - spawner_moby->unkB4 = 1; + spawner_moby->bolts -= current_moby->bolts; + if (spawner_moby->bolts < 0) { + spawner_moby->bolts = 1; } current_moby->collision = ((SpawnClass *)current_moby->pclass)->collision; copy_hero_moby_field_38(current_moby); diff --git a/src/overlays/shared/enemies/frog.c b/src/overlays/shared/enemies/frog.c index 741a4541c6..e24be6147a 100644 --- a/src/overlays/shared/enemies/frog.c +++ b/src/overlays/shared/enemies/frog.c @@ -309,7 +309,7 @@ void frog_update(unsigned char *moby) { frog_instance_vars->target_selection_frame_slot = spawn_count % 8; l06_frog_frame_slot_assignment_count = spawn_count + 1; if (divisor != 0) { - MOBY(moby)->unkB4 = MOBY(moby)->unkB4 / divisor; + MOBY(moby)->bolts = MOBY(moby)->bolts / divisor; } MOBY(moby)->flags |= 0x100; frog_instance_vars->unk58 = truncate_float_to_s32(8.0f); diff --git a/src/overlays/shared/enemies/spawner_egg.c b/src/overlays/shared/enemies/spawner_egg.c index 3e01308df9..df2f329785 100644 --- a/src/overlays/shared/enemies/spawner_egg.c +++ b/src/overlays/shared/enemies/spawner_egg.c @@ -125,14 +125,14 @@ struct Moby *respawn_spawner_child(struct Moby *parent_spawner_moby, Vec4 *pos) *(volatile s32 *)((u8 *)child_suck_cannon_record + 0x94) = 0; *(volatile s16 *)((u8 *)child_suck_cannon_record + 0x68) = 0; } - if (parent_spawner_moby->unkB4 < spawned_moby->unkB4) - spawned_moby->unkB4 = parent_spawner_moby->unkB4; - if (spawned_moby->unkB4 < 1) - spawned_moby->unkB4 = 1; - left = (u16)parent_spawner_moby->unkB4 - (u16)spawned_moby->unkB4; - parent_spawner_moby->unkB4 = left; + if (parent_spawner_moby->bolts < spawned_moby->bolts) + spawned_moby->bolts = parent_spawner_moby->bolts; + if (spawned_moby->bolts < 1) + spawned_moby->bolts = 1; + left = (u16)parent_spawner_moby->bolts - (u16)spawned_moby->bolts; + parent_spawner_moby->bolts = left; if ((s16)left < 0) - parent_spawner_moby->unkB4 = 1; + parent_spawner_moby->bolts = 1; { struct Moby *target = ((struct Moby *volatile *)&spawned_moby)[0]; target->collision = target->pclass->collision; diff --git a/src/overlays/shared/mobys/evaluate_moby_animation_pose.c b/src/overlays/shared/mobys/evaluate_moby_animation_pose.c index 51a7985791..fd30eb463f 100644 --- a/src/overlays/shared/mobys/evaluate_moby_animation_pose.c +++ b/src/overlays/shared/mobys/evaluate_moby_animation_pose.c @@ -121,11 +121,11 @@ void FUN_L00_00257470(unsigned char *moby, int flags, int trajectory_target_inde int cnt; unsigned char *g; - amt = MOBY(moby)->unkB4; + amt = MOBY(moby)->bolts; debug_print(D_L00_001E8F00, MOBY(moby)->oclass, ((short)MOBY(moby)->save_id), - MOBY(moby)->unkB4, + MOBY(moby)->bolts, *(short *)(moby + 0xB6)); if (moby[0xB1] == 0xFE) { return; diff --git a/src/overlays/shared/pickups/crate.c b/src/overlays/shared/pickups/crate.c index c1ecb67e6e..45555cae6b 100644 --- a/src/overlays/shared/pickups/crate.c +++ b/src/overlays/shared/pickups/crate.c @@ -386,11 +386,11 @@ void crate_update(struct Moby *moby) { s16 hit_moby_class_id = hit_contact->hit.s.moby->oclass; if (hit_moby_class_id == 0x2CD || hit_moby_class_id == 0x22C) { - s16 saved = moby->unkB4; + s16 saved = moby->bolts; - moby->unkB4 = 0; + moby->bolts = 0; crate_drop_bolts(moby); - moby->unkB4 = saved; + moby->bolts = saved; break; } } @@ -429,8 +429,8 @@ void crate_update(struct Moby *moby) { moby->collision = 0; moby->flags &= ~0x1000; moby->visible = 0; - if (moby->unkB4 >= 2) { - moby->unkB4 = 1; + if (moby->bolts >= 2) { + moby->bolts = 1; } moby->state = CRATE_STATE_WAIT_RESPAWN; if (D_0015ED84 == 0x12) { @@ -1004,8 +1004,8 @@ void crate_drop_bolts(u8 *crate_moby) { } } } - if (MOBY(crate_moby)->unkB4) - MOBY(crate_moby)->unkB4 = 0; + if (MOBY(crate_moby)->bolts) + MOBY(crate_moby)->bolts = 0; mark_moby_for_removal_cf(crate_moby, 0x100, -1); } From a0790ae6650987e17a57ca0725ff1ceca67e0079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:11:11 +0000 Subject: [PATCH 043/213] decomp: define the nanotech ball meshes in C --- config/us/levels/data.tsv | 152 + src/overlays/shared/pickups/nanotech_ball.c | 15002 +++++++++++++++++- 2 files changed, 15131 insertions(+), 23 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 65b6786614..3f2d44f161 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -4119,6 +4119,14 @@ D_L00_001DF9A0 1632 D_L00_001E04A0 1632 D_L00_001E0B00 816 D_L00_001E0E30 816 +D_L00_001E14C0 4640 +D_L00_001E26E0 2320 +D_L00_001E2FF0 1160 +D_L00_001E3480 1536 +D_L00_001E3A80 256 +D_L00_001E3B80 256 +D_L00_001E3C80 32 +D_L00_001E3DA0 3480 D_L00_001E4C80 4800 D_L00_001E6008 20 D_L00_001E6020 3200 @@ -5137,6 +5145,14 @@ D_L01_001FB740 384 D_L01_001FB8C0 640 D_L01_001FBB40 320 D_L01_001FBC80 384 +D_L01_001FBE20 4640 +D_L01_001FD040 2320 +D_L01_001FD950 1160 +D_L01_001FDDE0 1536 +D_L01_001FE3E0 256 +D_L01_001FE4E0 256 +D_L01_001FE5E0 32 +D_L01_001FE700 3480 D_L01_001FF5E0 4800 D_L01_00200840 1 D_L01_00200890 1 @@ -6276,6 +6292,14 @@ D_L02_001D33B0 64 D_L02_001D33B0 64 D_L02_001D33B0 64 D_L02_001D33B0 64 +D_L02_001D3F90 4640 +D_L02_001D51B0 2320 +D_L02_001D5AC0 1160 +D_L02_001D5F50 1536 +D_L02_001D6550 256 +D_L02_001D6650 256 +D_L02_001D6750 32 +D_L02_001D6870 3480 D_L02_001D7750 4800 D_L02_001D89B0 1 D_L02_001D8A00 1 @@ -7286,6 +7310,14 @@ D_L03_001D2C4C 4 D_L03_001D2C50 4 D_L03_001D2C54 4 D_L03_001D2D40 1 +D_L03_001D2D90 4640 +D_L03_001D3FB0 2320 +D_L03_001D48C0 1160 +D_L03_001D4D50 1536 +D_L03_001D5350 256 +D_L03_001D5450 256 +D_L03_001D5550 32 +D_L03_001D5670 3480 D_L03_001D6550 4800 D_L03_001D77B0 1 D_L03_001D7800 1 @@ -8340,6 +8372,14 @@ D_L04_001D3010 4 D_L04_001D3020 4 D_L04_001D3030 4 D_L04_001D3040 4 +D_L04_001D3BD0 4640 +D_L04_001D4DF0 2320 +D_L04_001D5700 1160 +D_L04_001D5B90 1536 +D_L04_001D6190 256 +D_L04_001D6290 256 +D_L04_001D6390 32 +D_L04_001D64B0 3480 D_L04_001D7390 4800 D_L04_001D85F0 1 D_L04_001D8640 1 @@ -9478,6 +9518,14 @@ D_L05_001D2FEC 4 D_L05_001D2FF0 4 D_L05_001D2FF4 4 D_L05_001D30E0 1 +D_L05_001D3130 4640 +D_L05_001D4350 2320 +D_L05_001D4C60 1160 +D_L05_001D50F0 1536 +D_L05_001D56F0 256 +D_L05_001D57F0 256 +D_L05_001D58F0 32 +D_L05_001D5A10 3480 D_L05_001D6880 215808 D_L05_0020B380 96 D_L05_0020B3E0 24 @@ -10656,6 +10704,14 @@ D_L06_001D4AC0 4 D_L06_001D4AD0 4 D_L06_001D4AE0 4 D_L06_001D4AF0 4 +D_L06_001D5680 4640 +D_L06_001D68A0 2320 +D_L06_001D71B0 1160 +D_L06_001D7640 1536 +D_L06_001D7C40 256 +D_L06_001D7D40 256 +D_L06_001D7E40 32 +D_L06_001D7F60 3480 D_L06_001D8E40 4800 D_L06_001DA0A0 1 D_L06_001DA0F0 1 @@ -11726,6 +11782,14 @@ D_L07_001D06A0 3840 D_L07_001D15A0 4 D_L07_001D15D0 4 D_L07_001D7550 1 +D_L07_001D75A0 4640 +D_L07_001D87C0 2320 +D_L07_001D90D0 1160 +D_L07_001D9560 1536 +D_L07_001D9B60 256 +D_L07_001D9C60 256 +D_L07_001D9D60 32 +D_L07_001D9E80 3480 D_L07_001DAE00 4800 D_L07_001DC060 1 D_L07_001DC0B0 1 @@ -13047,6 +13111,14 @@ D_L08_001E93A0 4 D_L08_001E93B0 4 D_L08_001E93C0 4 D_L08_001E93D0 4 +D_L08_001E9F60 4640 +D_L08_001EB180 2320 +D_L08_001EBA90 1160 +D_L08_001EBF20 1536 +D_L08_001EC520 256 +D_L08_001EC620 256 +D_L08_001EC720 32 +D_L08_001EC840 3480 D_L08_001ED720 4800 D_L08_001EE980 1 D_L08_001EE9D0 1 @@ -14395,6 +14467,14 @@ D_L09_001F6170 552 D_L09_001F63C0 320 D_L09_001FC780 16400 D_L09_002008F0 1 +D_L09_00200940 4640 +D_L09_00201B60 2320 +D_L09_00202470 1160 +D_L09_00202900 1536 +D_L09_00202F00 256 +D_L09_00203000 256 +D_L09_00203100 32 +D_L09_00203220 3480 D_L09_00204100 4800 D_L09_00205360 1 D_L09_002053B0 1 @@ -15487,6 +15567,14 @@ D_L10_001D1A00 4 D_L10_001D4060 4 D_L10_001D4064 4 D_L10_001D46F0 1 +D_L10_001D4740 4640 +D_L10_001D5960 2320 +D_L10_001D6270 1160 +D_L10_001D6700 1536 +D_L10_001D6D00 256 +D_L10_001D6E00 256 +D_L10_001D6F00 32 +D_L10_001D7020 3480 D_L10_001D7F00 4800 D_L10_001D9160 1 D_L10_001D91B0 1 @@ -16658,6 +16746,14 @@ D_L11_001D3750 4 D_L11_001D3760 4 D_L11_001D3770 4 D_L11_001D3780 4 +D_L11_001D4310 4640 +D_L11_001D5530 2320 +D_L11_001D5E40 1160 +D_L11_001D62D0 1536 +D_L11_001D68D0 256 +D_L11_001D69D0 256 +D_L11_001D6AD0 32 +D_L11_001D6BF0 3480 D_L11_001D7AD0 4800 D_L11_001D8D30 1 D_L11_001D8D80 1 @@ -17845,6 +17941,14 @@ D_L12_001F5B9C 4 D_L12_001F5BA0 4 D_L12_001F5BA4 4 D_L12_001F5C90 1 +D_L12_001F5CE0 4640 +D_L12_001F6F00 2320 +D_L12_001F7810 1160 +D_L12_001F7CA0 1536 +D_L12_001F82A0 256 +D_L12_001F83A0 256 +D_L12_001F84A0 32 +D_L12_001F85C0 3480 D_L12_001F94A0 4800 D_L12_001FA700 1 D_L12_001FA750 1 @@ -18930,6 +19034,14 @@ D_L13_001D3780 4 D_L13_001D3790 4 D_L13_001D37A0 4 D_L13_001D37B0 4 +D_L13_001D4340 4640 +D_L13_001D5560 2320 +D_L13_001D5E70 1160 +D_L13_001D6300 1536 +D_L13_001D6900 256 +D_L13_001D6A00 256 +D_L13_001D6B00 32 +D_L13_001D6C20 3480 D_L13_001D7B00 4800 D_L13_001D8D60 1 D_L13_001D8DB0 1 @@ -20126,6 +20238,14 @@ D_L14_001E0350 96 D_L14_001E03B0 176 D_L14_001E04D0 4 D_L14_001E0510 4 +D_L14_001E07F0 4640 +D_L14_001E1A10 2320 +D_L14_001E2320 1160 +D_L14_001E27B0 1536 +D_L14_001E2DB0 256 +D_L14_001E2EB0 256 +D_L14_001E2FB0 32 +D_L14_001E30D0 3480 D_L14_001E3FB0 4800 D_L14_001E5210 1 D_L14_001E5260 1 @@ -21271,6 +21391,14 @@ D_L15_001D1FA0 4 D_L15_001D1FD0 4 D_L15_001D2000 4 D_L15_001D36C0 1 +D_L15_001D3D10 4640 +D_L15_001D4F30 2320 +D_L15_001D5840 1160 +D_L15_001D5CD0 1536 +D_L15_001D62D0 256 +D_L15_001D63D0 256 +D_L15_001D64D0 32 +D_L15_001D65F0 3480 D_L15_001D74D0 4800 D_L15_001D8730 1 D_L15_001D8780 1 @@ -22356,6 +22484,14 @@ D_L16_001D19D0 4 D_L16_001D1A00 4 D_L16_001D3130 64 D_L16_001D31E0 1 +D_L16_001D3230 4640 +D_L16_001D4450 2320 +D_L16_001D4D60 1160 +D_L16_001D51F0 1536 +D_L16_001D57F0 256 +D_L16_001D58F0 256 +D_L16_001D59F0 32 +D_L16_001D5B10 3480 D_L16_001D69F0 4800 D_L16_001D7C50 1 D_L16_001D7CA0 1 @@ -23666,6 +23802,14 @@ D_L17_001D3CA0 16 D_L17_001D3DE0 4 D_L17_001D3E40 1 D_L17_001D3F70 32 +D_L17_001D4030 4640 +D_L17_001D5250 2320 +D_L17_001D5B60 1160 +D_L17_001D5FF0 1536 +D_L17_001D65F0 256 +D_L17_001D66F0 256 +D_L17_001D67F0 32 +D_L17_001D6910 3480 D_L17_001D77F0 4800 D_L17_001D8A50 1 D_L17_001D8AA0 1 @@ -24827,6 +24971,14 @@ D_L18_001D3790 4 D_L18_001D37A0 4 D_L18_001D4310 32 D_L18_001D4330 32 +D_L18_001D4370 4640 +D_L18_001D5590 2320 +D_L18_001D5EA0 1160 +D_L18_001D6330 1536 +D_L18_001D6930 256 +D_L18_001D6A30 256 +D_L18_001D6B30 32 +D_L18_001D6C50 3480 D_L18_001D7B30 4800 D_L18_001D8D90 1 D_L18_001D8DE0 1 diff --git a/src/overlays/shared/pickups/nanotech_ball.c b/src/overlays/shared/pickups/nanotech_ball.c index 2360ffd052..a85e3cb82c 100644 --- a/src/overlays/shared/pickups/nanotech_ball.c +++ b/src/overlays/shared/pickups/nanotech_ball.c @@ -127,6 +127,9 @@ typedef struct { typedef f32 V4[4] __attribute__((aligned(16))); +/* The ball mesh: 290 points drawn as three strips. */ +#define NANOTECH_BALL_MESH_VERTEX_COUNT 290 + typedef struct Hero Hero; typedef struct Moby Moby; @@ -297,14 +300,14 @@ extern float l00_nanotech_ball_state_one_quad_uv_vector_length __asm__("D_L00_00 __attribute__((sda)); extern float D_L00_00161AEC_gp __asm__("D_L00_00161AEC") __attribute__((sda)); extern char D_L00_00161AF0_macro[] __asm__("D_L00_00161AF0") MACRO_ADDR; -extern char nanotech_ball_mesh_source_vertices[] __asm__("D_L00_001E14C0"); -extern char nanotech_ball_mesh_texcoords[] __asm__("D_L00_001E26E0"); -extern char nanotech_ball_mesh_vertex_colors[] __asm__("D_L00_001E2FF0"); -extern char nanotech_ball_pulse_quad_source_vertices[] __asm__("D_L00_001E3480"); -extern char nanotech_ball_pulse_quad_vertex_indices[] __asm__("D_L00_001E3A80"); -extern char nanotech_ball_state_one_quad_source_vertices[] __asm__("D_L00_001E3B80"); -extern char nanotech_ball_state_one_quad_vertex_indices[] __asm__("D_L00_001E3C80"); -extern char nanotech_ball_transformed_mesh_vertices[] __asm__("D_L00_001E3DA0"); +extern Vec4f nanotech_ball_mesh_source_vertices[290] __asm__("D_L00_001E14C0"); +extern f32 nanotech_ball_mesh_texcoords[290][2] __asm__("D_L00_001E26E0"); +extern u32 nanotech_ball_mesh_vertex_colors[290] __asm__("D_L00_001E2FF0"); +extern Vec4f nanotech_ball_pulse_quad_source_vertices[96] __asm__("D_L00_001E3480"); +extern s16 nanotech_ball_pulse_quad_vertex_indices[32][4] __asm__("D_L00_001E3A80"); +extern Vec4f nanotech_ball_state_one_quad_source_vertices[16] __asm__("D_L00_001E3B80"); +extern s16 nanotech_ball_state_one_quad_vertex_indices[4][4] __asm__("D_L00_001E3C80"); +extern Vec3 nanotech_ball_transformed_mesh_vertices[290] __asm__("D_L00_001E3DA0"); extern int D_L00_00173E40_lui[]; float D_L01_00161DD0 = 1.0f; @@ -1684,13 +1687,13 @@ void draw_nanotech_ball(Moby *moby) { vu1_add_g_sregister(0x14, 0xff9000000260ULL); vu1_add_g_sregister(0x4a, 0); font_queue_vu_state(); - for (j = 0; j < 0x122; j++) { - transform_vector(&vertex, nanotech_ball_mesh_source_vertices + j * 16, basis); + for (j = 0; j < NANOTECH_BALL_MESH_VERTEX_COUNT; j++) { + transform_vector(&vertex, &nanotech_ball_mesh_source_vertices[j], basis); { float x = vertex[0], y = vertex[1], z = vertex[2]; - ((Vec3 *)nanotech_ball_transformed_mesh_vertices)[j].x = x; - ((Vec3 *)nanotech_ball_transformed_mesh_vertices)[j].y = y; - ((Vec3 *)nanotech_ball_transformed_mesh_vertices)[j].z = z; + nanotech_ball_transformed_mesh_vertices[j].x = x; + nanotech_ball_transformed_mesh_vertices[j].y = y; + nanotech_ball_transformed_mesh_vertices[j].z = z; } } FUN_L00_001fde98(0x94, @@ -1699,14 +1702,14 @@ void draw_nanotech_ball(Moby *moby) { nanotech_ball_mesh_texcoords, 1); FUN_L00_001fde98(0x6d, - nanotech_ball_transformed_mesh_vertices + 0x6d8, - nanotech_ball_mesh_vertex_colors + 0x248, - nanotech_ball_mesh_texcoords + 0x490, + &nanotech_ball_transformed_mesh_vertices[146], + &nanotech_ball_mesh_vertex_colors[146], + nanotech_ball_mesh_texcoords[146], 1); FUN_L00_001fde98(0x24, - nanotech_ball_transformed_mesh_vertices + 0xbe8, - nanotech_ball_mesh_vertex_colors + 0x3f8, - nanotech_ball_mesh_texcoords + 0x7f0, + &nanotech_ball_transformed_mesh_vertices[254], + &nanotech_ball_mesh_vertex_colors[254], + nanotech_ball_mesh_texcoords[254], 1); quad.texture[1] = get_effect_texture(0xb); quad.texture[3] = 0x8000000048ULL; @@ -1717,7 +1720,7 @@ void draw_nanotech_ball(Moby *moby) { quad.colors[1] = color; quad.colors[0] = color; for (i = 0; i < 32; i++) { - indices = (short *)(nanotech_ball_pulse_quad_vertex_indices + i * 8); + indices = nanotech_ball_pulse_quad_vertex_indices[i]; j = 0; inner = (char *)quad.points; outer = (char *)quad.points; @@ -1725,11 +1728,11 @@ void draw_nanotech_ball(Moby *moby) { short index = *indices; if (j >= 2) fast_vec_scale(outer, - nanotech_ball_pulse_quad_source_vertices + index * 16, + &nanotech_ball_pulse_quad_source_vertices[index], l00_nanotech_ball_pulse_quad_base_scale * D_L00_00161AEC_gp); else fast_vec_scale(inner, - nanotech_ball_pulse_quad_source_vertices + index * 16, + &nanotech_ball_pulse_quad_source_vertices[index], l00_nanotech_ball_pulse_quad_base_scale); inner += 16; outer += 16; @@ -1769,7 +1772,7 @@ void draw_nanotech_ball(Moby *moby) { corner = (char *)quad.points; for (j = 3; j >= 0; j--) { transform_vector( - corner, nanotech_ball_state_one_quad_source_vertices + (*row++) * 16, basis); + corner, &nanotech_ball_state_one_quad_source_vertices[*row++], basis); fast_vec_sub(view_dir, corner, g_debug_camera); corner += 16; view_dir[1] = view_dir[2]; @@ -1787,3 +1790,14956 @@ void draw_nanotech_ball(Moby *moby) { } vu1_add_g_sregister(0x47, 0x5360b); } + +f32 nanotech_ball_mesh_texcoords[290][2] __asm__("D_L00_001E26E0") = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 nanotech_ball_mesh_vertex_colors[290] __asm__("D_L00_001E2FF0") = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 nanotech_ball_pulse_quad_vertex_indices[32][4] __asm__("D_L00_001E3A80") = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 nanotech_ball_state_one_quad_vertex_indices[4][4] __asm__("D_L00_001E3C80") = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 nanotech_ball_transformed_mesh_vertices[290] __asm__("D_L00_001E3DA0") = {0}; + +f32 D_L01_001FD040[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L01_001FD950[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L01_001FE3E0[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L01_001FE5E0[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L01_001FE700[290] = {0}; + +f32 D_L02_001D51B0[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L02_001D5AC0[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L02_001D6550[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L02_001D6750[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L02_001D6870[290] = {0}; + +f32 D_L03_001D3FB0[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L03_001D48C0[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L03_001D5350[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L03_001D5550[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L03_001D5670[290] = {0}; + +f32 D_L04_001D4DF0[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L04_001D5700[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L04_001D6190[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L04_001D6390[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L04_001D64B0[290] = {0}; + +f32 D_L05_001D4350[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L05_001D4C60[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L05_001D56F0[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L05_001D58F0[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L05_001D5A10[290] = {0}; + +f32 D_L06_001D68A0[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L06_001D71B0[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L06_001D7C40[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L06_001D7E40[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L06_001D7F60[290] = {0}; + +f32 D_L07_001D87C0[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L07_001D90D0[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L07_001D9B60[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L07_001D9D60[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L07_001D9E80[290] = {0}; + +f32 D_L08_001EB180[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L08_001EBA90[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L08_001EC520[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L08_001EC720[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L08_001EC840[290] = {0}; + +f32 D_L09_00201B60[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L09_00202470[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L09_00202F00[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L09_00203100[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L09_00203220[290] = {0}; + +f32 D_L10_001D5960[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L10_001D6270[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L10_001D6D00[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L10_001D6F00[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L10_001D7020[290] = {0}; + +f32 D_L11_001D5530[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L11_001D5E40[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L11_001D68D0[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L11_001D6AD0[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L11_001D6BF0[290] = {0}; + +f32 D_L12_001F6F00[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L12_001F7810[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L12_001F82A0[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L12_001F84A0[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L12_001F85C0[290] = {0}; + +f32 D_L13_001D5560[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L13_001D5E70[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L13_001D6900[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L13_001D6B00[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L13_001D6C20[290] = {0}; + +f32 D_L14_001E1A10[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L14_001E2320[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L14_001E2DB0[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L14_001E2FB0[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L14_001E30D0[290] = {0}; + +f32 D_L15_001D4F30[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L15_001D5840[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L15_001D62D0[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L15_001D64D0[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L15_001D65F0[290] = {0}; + +f32 D_L16_001D4450[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L16_001D4D60[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L16_001D57F0[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L16_001D59F0[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L16_001D5B10[290] = {0}; + +f32 D_L17_001D5250[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L17_001D5B60[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L17_001D65F0[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L17_001D67F0[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L17_001D6910[290] = {0}; + +f32 D_L18_001D5590[290][2] = { + { 0.5f, 0.0f}, + {0.568975f, 0.009607f}, + {0.597545f, 0.009607f}, + { 0.59012f, 0.009607f}, + {0.691342f, 0.03806f}, + {0.676777f, 0.03806f}, + {0.777785f, 0.084265f}, + { 0.75664f, 0.084265f}, + {0.853553f, 0.146447f}, + {0.826641f, 0.146447f}, + {0.915735f, 0.222215f}, + {0.884089f, 0.222215f}, + { 0.96194f, 0.308658f}, + {0.926777f, 0.308658f}, + {0.990393f, 0.402455f}, + {0.953064f, 0.402455f}, + { 1.0f, 0.5f}, + { 0.96194f, 0.5f}, + {0.990393f, 0.597545f}, + {0.953064f, 0.597545f}, + { 0.96194f, 0.691342f}, + {0.926777f, 0.691342f}, + {0.915735f, 0.777785f}, + {0.884089f, 0.777785f}, + {0.853553f, 0.853553f}, + {0.826641f, 0.853553f}, + {0.777785f, 0.915735f}, + { 0.75664f, 0.915735f}, + {0.691342f, 0.96194f}, + {0.676777f, 0.96194f}, + {0.597545f, 0.990393f}, + { 0.59012f, 0.990393f}, + { 0.5f, 1.0f}, + { 0.59012f, 0.990393f}, + {0.568975f, 0.990393f}, + {0.676777f, 0.96194f}, + {0.635299f, 0.96194f}, + { 0.75664f, 0.915735f}, + {0.696424f, 0.915735f}, + {0.826641f, 0.853553f}, + { 0.75f, 0.853553f}, + {0.884089f, 0.777785f}, + {0.793969f, 0.777785f}, + {0.926777f, 0.691342f}, + {0.826641f, 0.691342f}, + {0.953064f, 0.597545f}, + { 0.84676f, 0.597545f}, + { 0.96194f, 0.5f}, + {0.853553f, 0.5f}, + {0.953064f, 0.402455f}, + { 0.84676f, 0.402455f}, + {0.926777f, 0.308658f}, + {0.826641f, 0.308658f}, + {0.884089f, 0.222215f}, + {0.793969f, 0.222215f}, + {0.826641f, 0.146447f}, + { 0.75f, 0.146447f}, + { 0.75664f, 0.084265f}, + {0.696424f, 0.084265f}, + {0.676777f, 0.03806f}, + {0.635299f, 0.03806f}, + { 0.59012f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.568975f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.537329f, 0.009607f}, + {0.635299f, 0.03806f}, + {0.573223f, 0.03806f}, + {0.696424f, 0.084265f}, + {0.606304f, 0.084265f}, + { 0.75f, 0.146447f}, + {0.635299f, 0.146447f}, + {0.793969f, 0.222215f}, + {0.659095f, 0.222215f}, + {0.826641f, 0.308658f}, + {0.676777f, 0.308658f}, + { 0.84676f, 0.402455f}, + {0.687665f, 0.402455f}, + {0.853553f, 0.5f}, + {0.691342f, 0.5f}, + { 0.84676f, 0.597545f}, + {0.687665f, 0.597545f}, + {0.826641f, 0.691342f}, + {0.676777f, 0.691342f}, + {0.793969f, 0.777785f}, + {0.659095f, 0.777785f}, + { 0.75f, 0.853553f}, + {0.635299f, 0.853553f}, + {0.696424f, 0.915735f}, + {0.606304f, 0.915735f}, + {0.635299f, 0.96194f}, + {0.573223f, 0.96194f}, + {0.568975f, 0.990393f}, + {0.537329f, 0.990393f}, + { 0.5f, 1.0f}, + {0.537329f, 0.990393f}, + { 0.5f, 0.990393f}, + {0.573223f, 0.96194f}, + { 0.5f, 0.96194f}, + {0.606304f, 0.915735f}, + { 0.5f, 0.915735f}, + {0.635299f, 0.853553f}, + { 0.5f, 0.853553f}, + {0.659095f, 0.777785f}, + { 0.5f, 0.777785f}, + {0.676777f, 0.691342f}, + { 0.5f, 0.691342f}, + {0.687665f, 0.597545f}, + { 0.5f, 0.597545f}, + {0.691342f, 0.5f}, + { 0.5f, 0.5f}, + {0.687665f, 0.402455f}, + { 0.5f, 0.402455f}, + {0.676777f, 0.308658f}, + { 0.5f, 0.308658f}, + {0.659095f, 0.222215f}, + { 0.5f, 0.222215f}, + {0.635299f, 0.146447f}, + { 0.5f, 0.146447f}, + {0.606304f, 0.084265f}, + { 0.5f, 0.084265f}, + {0.573223f, 0.03806f}, + { 0.5f, 0.03806f}, + {0.537329f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.568975f, 0.009607f}, + { 0.5f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.5f, 0.009607f}, + {0.431025f, 0.009607f}, + { 0.5f, 0.009607f}, + {0.462671f, 0.009607f}, + { 0.5f, 0.03806f}, + {0.426777f, 0.03806f}, + { 0.5f, 0.084265f}, + {0.393696f, 0.084265f}, + { 0.5f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.5f, 0.222215f}, + {0.340905f, 0.222215f}, + { 0.5f, 0.308658f}, + {0.323223f, 0.308658f}, + { 0.5f, 0.402455f}, + {0.312335f, 0.402455f}, + { 0.5f, 0.5f}, + {0.308658f, 0.5f}, + { 0.5f, 0.597545f}, + {0.312335f, 0.597545f}, + { 0.5f, 0.691342f}, + {0.323223f, 0.691342f}, + { 0.5f, 0.777785f}, + {0.340905f, 0.777785f}, + { 0.5f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.5f, 0.915735f}, + {0.393696f, 0.915735f}, + { 0.5f, 0.96194f}, + {0.426777f, 0.96194f}, + { 0.5f, 0.990393f}, + {0.462671f, 0.990393f}, + { 0.5f, 1.0f}, + {0.431025f, 0.990393f}, + {0.402455f, 0.990393f}, + { 0.40988f, 0.990393f}, + {0.308658f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.222215f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.146447f, 0.853553f}, + {0.173359f, 0.853553f}, + {0.084265f, 0.777785f}, + {0.115911f, 0.777785f}, + { 0.03806f, 0.691342f}, + {0.073223f, 0.691342f}, + {0.009607f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.0f, 0.5f}, + { 0.03806f, 0.5f}, + {0.009607f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.03806f, 0.308658f}, + {0.073223f, 0.308658f}, + {0.084265f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.146447f, 0.146447f}, + {0.173359f, 0.146447f}, + {0.222215f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.308658f, 0.03806f}, + {0.323223f, 0.03806f}, + {0.402455f, 0.009607f}, + { 0.40988f, 0.009607f}, + { 0.5f, 0.0f}, + { 0.40988f, 0.009607f}, + {0.431025f, 0.009607f}, + {0.323223f, 0.03806f}, + {0.431025f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.462671f, 0.009607f}, + {0.364701f, 0.03806f}, + {0.426777f, 0.03806f}, + {0.364701f, 0.03806f}, + {0.393696f, 0.084265f}, + {0.364701f, 0.03806f}, + {0.303576f, 0.084265f}, + {0.323223f, 0.03806f}, + {0.303576f, 0.084265f}, + { 0.24336f, 0.084265f}, + {0.303576f, 0.084265f}, + {0.173359f, 0.146447f}, + {0.303576f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.393696f, 0.084265f}, + { 0.25f, 0.146447f}, + {0.364701f, 0.146447f}, + { 0.25f, 0.146447f}, + {0.340905f, 0.222215f}, + { 0.25f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.146447f}, + {0.206031f, 0.222215f}, + {0.115911f, 0.222215f}, + {0.206031f, 0.222215f}, + {0.073223f, 0.308658f}, + {0.206031f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.340905f, 0.222215f}, + {0.173359f, 0.308658f}, + {0.323223f, 0.308658f}, + {0.173359f, 0.308658f}, + {0.312335f, 0.402455f}, + {0.173359f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.073223f, 0.308658f}, + { 0.15324f, 0.402455f}, + {0.046936f, 0.402455f}, + { 0.15324f, 0.402455f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.402455f}, + {0.146447f, 0.5f}, + {0.312335f, 0.402455f}, + {0.146447f, 0.5f}, + {0.308658f, 0.5f}, + {0.146447f, 0.5f}, + {0.312335f, 0.597545f}, + {0.146447f, 0.5f}, + { 0.15324f, 0.597545f}, + { 0.03806f, 0.5f}, + { 0.15324f, 0.597545f}, + {0.046936f, 0.597545f}, + { 0.15324f, 0.597545f}, + {0.073223f, 0.691342f}, + { 0.15324f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.312335f, 0.597545f}, + {0.173359f, 0.691342f}, + {0.323223f, 0.691342f}, + {0.173359f, 0.691342f}, + {0.340905f, 0.777785f}, + {0.173359f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.073223f, 0.691342f}, + {0.206031f, 0.777785f}, + {0.115911f, 0.777785f}, + {0.206031f, 0.777785f}, + {0.173359f, 0.853553f}, + {0.206031f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.340905f, 0.777785f}, + { 0.25f, 0.853553f}, + {0.364701f, 0.853553f}, + { 0.25f, 0.853553f}, + {0.393696f, 0.915735f}, + { 0.25f, 0.853553f}, + {0.303576f, 0.915735f}, + {0.173359f, 0.853553f}, + {0.303576f, 0.915735f}, + { 0.24336f, 0.915735f}, + {0.364701f, 0.96194f}, + {0.323223f, 0.96194f}, + {0.364701f, 0.96194f}, + { 0.40988f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.431025f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.462671f, 0.990393f}, + {0.364701f, 0.96194f}, + {0.426777f, 0.96194f}, + {0.303576f, 0.915735f}, + {0.393696f, 0.915735f}, +}; + +u32 D_L18_001D5EA0[290] = { + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, 0x50804040, + 0x50804040, 0x50804040}; + +s16 D_L18_001D6930[32][4] = { + { 2, 0, 0x21, 0x20}, + { 1, 3, 0x22, 0x23}, + { 4, 2, 0x25, 0x24}, + { 3, 5, 0x26, 0x27}, + { 6, 4, 0x29, 0x28}, + { 5, 7, 0x2a, 0x2b}, + { 8, 6, 0x2d, 0x2c}, + { 7, 9, 0x2e, 0x2f}, + { 0xa, 8, 0x31, 0x30}, + { 9, 0xb, 0x32, 0x33}, + { 0xc, 0xa, 0x35, 0x34}, + { 0xb, 0xd, 0x36, 0x37}, + { 0xe, 0xc, 0x39, 0x38}, + { 0xd, 0xf, 0x3a, 0x3b}, + {0x10, 0xe, 0x3d, 0x3c}, + { 0xf, 0x11, 0x3e, 0x3f}, + {0x12, 0x10, 0x41, 0x40}, + {0x11, 0x13, 0x42, 0x43}, + {0x14, 0x12, 0x45, 0x44}, + {0x13, 0x15, 0x46, 0x47}, + {0x16, 0x14, 0x49, 0x48}, + {0x15, 0x17, 0x4a, 0x4b}, + {0x18, 0x16, 0x4d, 0x4c}, + {0x17, 0x19, 0x4e, 0x4f}, + {0x1a, 0x18, 0x51, 0x50}, + {0x19, 0x1b, 0x52, 0x53}, + {0x1c, 0x1a, 0x55, 0x54}, + {0x1b, 0x1d, 0x56, 0x57}, + { 0, 0x1e, 0x59, 0x58}, + {0x1e, 1, 0x5a, 0x5b}, + {0x1f, 0x1c, 0x5d, 0x5c}, + {0x1d, 0x1f, 0x5e, 0x5f}, +}; + +s16 D_L18_001D6B30[4][4] = { + { 0, 1, 3, 2}, + { 4, 5, 7, 6}, + { 8, 9, 0xb, 0xa}, + {0xc, 0xd, 0xf, 0xe}, +}; + +Vec3 D_L18_001D6C50[290] = {0}; + +Vec4f nanotech_ball_mesh_source_vertices[290] __asm__("D_L00_001E14C0") = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f nanotech_ball_pulse_quad_source_vertices[96] __asm__("D_L00_001E3480") = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f nanotech_ball_state_one_quad_source_vertices[16] __asm__("D_L00_001E3B80") = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L01_001FBE20[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L01_001FDDE0[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L01_001FE4E0[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L02_001D3F90[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L02_001D5F50[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L02_001D6650[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L03_001D2D90[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L03_001D4D50[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L03_001D5450[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L04_001D3BD0[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L04_001D5B90[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L04_001D6290[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L05_001D3130[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L05_001D50F0[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L05_001D57F0[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L06_001D5680[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L06_001D7640[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L06_001D7D40[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L07_001D75A0[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L07_001D9560[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L07_001D9C60[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L08_001E9F60[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L08_001EBF20[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L08_001EC620[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L09_00200940[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L09_00202900[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L09_00203000[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L10_001D4740[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L10_001D6700[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L10_001D6E00[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L11_001D4310[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L11_001D62D0[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L11_001D69D0[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L12_001F5CE0[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L12_001F7CA0[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L12_001F83A0[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L13_001D4340[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L13_001D6300[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L13_001D6A00[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L14_001E07F0[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L14_001E27B0[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L14_001E2EB0[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L15_001D3D10[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L15_001D5CD0[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L15_001D63D0[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L16_001D3230[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L16_001D51F0[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L16_001D58F0[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L17_001D4030[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L17_001D5FF0[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L17_001D66F0[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; + +Vec4f D_L18_001D4370[290] = { + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + { -0.0f, -0.058527f, 0.294236f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + { -0.0f, -0.114805f, 0.277164f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + { -0.0f, -0.166671f, 0.249441f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + { -0.0f, -0.212132f, 0.212132f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { -0.0f, -0.249441f, 0.166671f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + { -0.0f, -0.277164f, 0.114805f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + { -0.0f, -0.294236f, 0.058527f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + { -0.0f, -0.3f, 0.0f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + { -0.0f, -0.294236f, -0.058527f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + { -0.0f, -0.277164f, -0.114805f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + { -0.0f, -0.249441f, -0.166671f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + { -0.0f, -0.212132f, -0.212132f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { -0.0f, -0.166671f, -0.249441f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + { -0.0f, -0.114805f, -0.277164f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + { -0.0f, -0.058527f, -0.294236f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.022397f, -0.054072f, -0.294236f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.043934f, -0.106066f, -0.277164f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.063782f, -0.153984f, -0.249441f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.081179f, -0.195984f, -0.212132f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.095457f, -0.230453f, -0.166671f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.106066f, -0.256066f, -0.114805f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.112599f, -0.271838f, -0.058527f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.114805f, -0.277164f, 0.0f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.112599f, -0.271838f, 0.058527f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.106066f, -0.256066f, 0.114805f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.095457f, -0.230453f, 0.166671f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.081179f, -0.195984f, 0.212132f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.063782f, -0.153984f, 0.249441f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.043934f, -0.106066f, 0.277164f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.022397f, -0.054072f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.081179f, -0.081179f, 0.277164f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.117854f, -0.117854f, 0.249441f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + { 0.15f, -0.15f, 0.212132f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.176381f, -0.176381f, 0.166671f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.195984f, -0.195984f, 0.114805f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.208056f, -0.208056f, 0.058527f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.212132f, -0.212132f, 0.0f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + {0.208056f, -0.208056f, -0.058527f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.195984f, -0.195984f, -0.114805f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.176381f, -0.176381f, -0.166671f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + { 0.15f, -0.15f, -0.212132f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.117854f, -0.117854f, -0.249441f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.081179f, -0.081179f, -0.277164f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.041385f, -0.041385f, -0.294236f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.054072f, -0.022397f, -0.294236f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.106066f, -0.043934f, -0.277164f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.153984f, -0.063782f, -0.249441f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.195984f, -0.081179f, -0.212132f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.230453f, -0.095457f, -0.166671f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.256066f, -0.106066f, -0.114805f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.271838f, -0.112599f, -0.058527f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.277164f, -0.114805f, 0.0f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.271838f, -0.112599f, 0.058527f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.256066f, -0.106066f, 0.114805f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.230453f, -0.095457f, 0.166671f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.195984f, -0.081179f, 0.212132f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.153984f, -0.063782f, 0.249441f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.106066f, -0.043934f, 0.277164f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.054072f, -0.022397f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, -0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.058527f, 0.0f, 0.294236f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.114805f, 0.0f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.166671f, 0.0f, 0.249441f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.212132f, 0.0f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + {0.249441f, 0.0f, 0.166671f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.277164f, 0.0f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.294236f, 0.0f, 0.058527f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + { 0.3f, 0.0f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.294236f, 0.0f, -0.058527f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.277164f, 0.0f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.249441f, 0.0f, -0.166671f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.212132f, 0.0f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + {0.166671f, 0.0f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + {0.114805f, 0.0f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.058527f, 0.0f, -0.294236f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + { 0.0f, 0.0f, -0.3f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + { 0.0f, 0.058527f, -0.294236f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + { 0.0f, 0.114805f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + { 0.0f, 0.166671f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + { 0.0f, 0.212132f, -0.212132f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + { 0.0f, 0.249441f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + { 0.0f, 0.277164f, -0.114805f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + { 0.0f, 0.294235f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + { 0.0f, 0.3f, 0.0f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + { 0.0f, 0.294235f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + { 0.0f, 0.277164f, 0.114805f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + { 0.0f, 0.249441f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + { 0.0f, 0.212132f, 0.212132f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + { 0.0f, 0.166671f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + { 0.0f, 0.114805f, 0.277164f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + { 0.0f, 0.058527f, 0.294236f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + { 0.0f, 0.0f, 0.3f, 1.0f}, + {0.022397f, 0.054072f, 0.294236f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.041385f, 0.041385f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.054072f, 0.022397f, 0.294236f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.106066f, 0.043934f, 0.277164f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + {0.081179f, 0.081179f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.043934f, 0.106066f, 0.277164f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.063782f, 0.153984f, 0.249441f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.117854f, 0.117854f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.153984f, 0.063782f, 0.249441f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.195984f, 0.081179f, 0.212132f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + { 0.15f, 0.15f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.081179f, 0.195984f, 0.212132f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.095457f, 0.230453f, 0.166671f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.176381f, 0.176381f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.230453f, 0.095457f, 0.166671f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.256066f, 0.106066f, 0.114805f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.195984f, 0.195984f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.106066f, 0.256066f, 0.114805f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.112599f, 0.271838f, 0.058527f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, 0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.277164f, 0.114805f, 0.0f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.212132f, 0.212132f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.114805f, 0.277164f, 0.0f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.112599f, 0.271838f, -0.058527f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.208056f, 0.208056f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.271838f, 0.112599f, -0.058527f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.256066f, 0.106066f, -0.114805f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + {0.195984f, 0.195984f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.106066f, 0.256066f, -0.114805f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.095457f, 0.230453f, -0.166671f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.176381f, 0.176381f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.230453f, 0.095457f, -0.166671f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.195984f, 0.081179f, -0.212132f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, + { 0.15f, 0.15f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.081179f, 0.195984f, -0.212132f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.063782f, 0.153984f, -0.249441f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.043934f, 0.106066f, -0.277164f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.022397f, 0.054072f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.041385f, 0.041385f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.054072f, 0.022397f, -0.294236f, 1.0f}, + {0.081179f, 0.081179f, -0.277164f, 1.0f}, + {0.106066f, 0.043934f, -0.277164f, 1.0f}, + {0.117854f, 0.117854f, -0.249441f, 1.0f}, + {0.153984f, 0.063782f, -0.249441f, 1.0f}, +}; + +Vec4f D_L18_001D6330[96] = { + { 0.0f, 0.19509f, -0.980785f, 1.0f}, + { -0.0f, -0.19509f, -0.980785f, 1.0f}, + { 0.0f, 0.382683f, -0.92388f, 1.0f}, + { -0.0f, -0.382683f, -0.92388f, 1.0f}, + { 0.0f, 0.55557f, -0.83147f, 1.0f}, + { -0.0f, -0.55557f, -0.83147f, 1.0f}, + { 0.0f, 0.707107f, -0.707107f, 1.0f}, + { -0.0f, -0.707107f, -0.707107f, 1.0f}, + { 0.0f, 0.831469f, -0.55557f, 1.0f}, + { -0.0f, -0.83147f, -0.55557f, 1.0f}, + { 0.0f, 0.923879f, -0.382683f, 1.0f}, + { -0.0f, -0.923879f, -0.382683f, 1.0f}, + { 0.0f, 0.980785f, -0.19509f, 1.0f}, + { -0.0f, -0.980785f, -0.19509f, 1.0f}, + { 0.0f, 1.0f, 0.0f, 1.0f}, + { -0.0f, -1.0f, 0.0f, 1.0f}, + { 0.0f, 0.980785f, 0.19509f, 1.0f}, + { -0.0f, -0.980785f, 0.19509f, 1.0f}, + { 0.0f, 0.923879f, 0.382683f, 1.0f}, + { -0.0f, -0.923879f, 0.382683f, 1.0f}, + { 0.0f, 0.831469f, 0.55557f, 1.0f}, + { -0.0f, -0.83147f, 0.55557f, 1.0f}, + { 0.0f, 0.707107f, 0.707107f, 1.0f}, + { -0.0f, -0.707107f, 0.707107f, 1.0f}, + { 0.0f, 0.55557f, 0.83147f, 1.0f}, + { -0.0f, -0.55557f, 0.83147f, 1.0f}, + { 0.0f, 0.382683f, 0.92388f, 1.0f}, + { -0.0f, -0.382683f, 0.92388f, 1.0f}, + { 0.0f, 0.19509f, 0.980785f, 1.0f}, + { -0.0f, -0.19509f, 0.980785f, 1.0f}, + { 0.0f, 0.0f, -1.0f, 1.0f}, + { 0.0f, 0.0f, 1.0f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.497488f, -1.201043f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.497488f, -1.201043f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.722241f, -1.08091f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { -0.0f, -0.722241f, -1.08091f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { 0.0f, 0.919239f, -0.919239f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { -0.0f, -0.919239f, -0.919239f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.08091f, -0.722241f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.08091f, -0.722241f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { 0.0f, 1.201043f, -0.497488f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + { -0.0f, -1.201043f, -0.497488f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + {1e-06f, 1.27502f, -0.253617f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, -0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + {1e-06f, 1.299999f, 0.0f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { -0.0f, -1.3f, 0.0f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + {1e-06f, 1.27502f, 0.253617f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.275021f, 0.253617f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.201043f, 0.497488f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { -0.0f, -1.201043f, 0.497488f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { 0.0f, 1.08091f, 0.722241f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { -0.0f, -1.08091f, 0.722241f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.919239f, 0.919239f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.919239f, 0.919239f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.722241f, 1.08091f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.722241f, 1.08091f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.497488f, 1.201043f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, -0.497488f, 1.201043f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { 0.0f, 0.253617f, -1.275021f, 1.0f}, + { -0.0f, 0.0f, -1.3f, 1.0f}, + { -0.0f, -0.253617f, -1.275021f, 1.0f}, + { 0.0f, 0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, + { -0.0f, -0.253617f, 1.275021f, 1.0f}, + { -0.0f, 0.0f, 1.3f, 1.0f}, +}; + +Vec4f D_L18_001D6A30[16] = { + { 0.435037f, 0.499805f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.123765f, 1.0f}, + {-0.434805f, 0.500037f, 0.890586f, 1.0f}, + { 0.435037f, 0.499805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.123765f, 1.0f}, + {-0.500037f, -0.434805f, 0.890586f, 1.0f}, + {-0.499805f, 0.435037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.123765f, 1.0f}, + { 0.434805f, -0.500037f, 0.890586f, 1.0f}, + {-0.435037f, -0.499805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.123765f, 1.0f}, + { 0.500037f, 0.434805f, 0.890586f, 1.0f}, + { 0.499805f, -0.435037f, 0.890586f, 1.0f}, +}; From 3a675ea520cdf3ebe9c5f76bea06e87ef1943b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:14:31 +0000 Subject: [PATCH 044/213] decomp: keep draw_timed_text's label beside its definition --- src/overlays/shared/ui/text/draw_timed_text.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/overlays/shared/ui/text/draw_timed_text.c b/src/overlays/shared/ui/text/draw_timed_text.c index 105621b153..dd59101015 100644 --- a/src/overlays/shared/ui/text/draw_timed_text.c +++ b/src/overlays/shared/ui/text/draw_timed_text.c @@ -47,6 +47,8 @@ void draw_timed_text_line(int x, int y, int mode, float scale, float alpha, char } /* Ported from rac1-decomp (src/overlays/shared/draw_001F3A78.c: func_L00_001FCC50), where it is exact; names translated to the US level program. */ +void draw_timed_text(LevelTextEntry *entry, s32 frame) __asm__("FUN_L00_001fcca0"); + void draw_timed_text(LevelTextEntry *timed_text_entry, s32 frame) { enum { TEXT_SEPARATOR_JOIN_WITH_HYPHEN = 1 From d6277af40a1c8e7fcb0965a386ed13ef7c00e29c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:19:32 +0000 Subject: [PATCH 045/213] decomp: define the level help history lists in C --- config/us/levels/data.tsv | 37 +-- .../build_reversed_active_message_list.c | 211 ++++++++++++++---- 2 files changed, 181 insertions(+), 67 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 3f2d44f161..6eb704c8b7 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -4065,6 +4065,7 @@ D_L00_001B21B8 4 D_L00_001B21B8 4 D_L00_001B21B8 4 D_L00_001B21B8 4 +D_L00_001B3D40 1812 D_L00_001B9DDC 4 D_L00_001BA620 3075 D_L00_001BB280 3075 @@ -5027,7 +5028,7 @@ D_L01_001B2608 4 D_L01_001B260C 4 D_L01_001B2620 4 D_L01_001B2638 4 -D_L01_001B41C0 12 +D_L01_001B41C0 1812 D_L01_001B4C50 1 D_L01_001BA248 4 D_L01_001BA258 4 @@ -6216,7 +6217,7 @@ D_L02_001B278C 4 D_L02_001B27A0 4 D_L02_001B27A8 4 D_L02_001B27B8 4 -D_L02_001B4340 12 +D_L02_001B4340 1812 D_L02_001B4DD0 1 D_L02_001BA3C8 4 D_L02_001BA3D8 4 @@ -7229,7 +7230,7 @@ D_L03_001B228C 4 D_L03_001B22A0 4 D_L03_001B22A8 4 D_L03_001B22B8 4 -D_L03_001B3E40 12 +D_L03_001B3E40 1812 D_L03_001B48D0 1 D_L03_001B9EC8 4 D_L03_001B9ED8 4 @@ -8298,7 +8299,7 @@ D_L04_001B2318 4 D_L04_001B2320 4 D_L04_001B2328 4 D_L04_001B2338 4 -D_L04_001B3EC0 12 +D_L04_001B3EC0 1812 D_L04_001B4950 1 D_L04_001B9F48 4 D_L04_001B9F58 4 @@ -9426,7 +9427,7 @@ D_L05_001B260C 4 D_L05_001B2620 4 D_L05_001B2628 4 D_L05_001B2638 4 -D_L05_001B41C0 12 +D_L05_001B41C0 1812 D_L05_001B4C50 1 D_L05_001BA248 4 D_L05_001BA258 4 @@ -10619,7 +10620,7 @@ D_L06_001B290C 4 D_L06_001B2920 4 D_L06_001B2928 4 D_L06_001B2938 4 -D_L06_001B44C0 12 +D_L06_001B44C0 1812 D_L06_001B4F50 1 D_L06_001BA548 4 D_L06_001BA558 4 @@ -11702,7 +11703,7 @@ D_L07_001B220C 4 D_L07_001B2218 4 D_L07_001B2220 4 D_L07_001B2238 4 -D_L07_001B3DC0 12 +D_L07_001B3DC0 1812 D_L07_001B4850 1 D_L07_001B9E48 4 D_L07_001B9E58 4 @@ -12907,7 +12908,7 @@ D_L08_001B29A4 4 D_L08_001B29A8 4 D_L08_001B29B4 4 D_L08_001B29B8 4 -D_L08_001B4540 12 +D_L08_001B4540 1812 D_L08_001B4FD0 1 D_L08_001BA5C8 4 D_L08_001BA5D8 4 @@ -14155,7 +14156,7 @@ D_L09_001B230C 4 D_L09_001B2318 4 D_L09_001B2320 4 D_L09_001B2338 4 -D_L09_001B3EC0 12 +D_L09_001B3EC0 1812 D_L09_001B4950 1 D_L09_001B9F48 4 D_L09_001B9F58 4 @@ -15496,7 +15497,7 @@ D_L10_001B260C 4 D_L10_001B2618 4 D_L10_001B2620 4 D_L10_001B2638 4 -D_L10_001B41C0 12 +D_L10_001B41C0 1812 D_L10_001B4C50 1 D_L10_001BA248 4 D_L10_001BA258 4 @@ -16665,7 +16666,7 @@ D_L11_001B2B8C 4 D_L11_001B2BA0 4 D_L11_001B2BA8 4 D_L11_001B2BB8 4 -D_L11_001B4740 12 +D_L11_001B4740 1812 D_L11_001B51D0 1 D_L11_001BA7E0 4 D_L11_001BADB8 12 @@ -17855,7 +17856,7 @@ D_L12_001B2620 4 D_L12_001B2624 4 D_L12_001B2628 4 D_L12_001B2638 4 -D_L12_001B41C0 12 +D_L12_001B41C0 1812 D_L12_001B4C50 1 D_L12_001BA248 4 D_L12_001BA258 4 @@ -18952,7 +18953,7 @@ D_L13_001B2498 4 D_L13_001B24A0 4 D_L13_001B24A8 4 D_L13_001B24B8 4 -D_L13_001B4040 12 +D_L13_001B4040 1812 D_L13_001B4AD0 1 D_L13_001BA0C8 4 D_L13_001BA0D8 4 @@ -20122,7 +20123,7 @@ D_L14_001B28A0 4 D_L14_001B28A4 4 D_L14_001B28A8 4 D_L14_001B28B8 4 -D_L14_001B4440 12 +D_L14_001B4440 1812 D_L14_001B4ED0 1 D_L14_001BA4C8 4 D_L14_001BA4D8 4 @@ -21310,7 +21311,7 @@ D_L15_001B278C 4 D_L15_001B2794 4 D_L15_001B27A0 4 D_L15_001B27B8 4 -D_L15_001B4340 12 +D_L15_001B4340 1812 D_L15_001B4DD0 1 D_L15_001BA3C8 4 D_L15_001BA3D8 4 @@ -22411,7 +22412,7 @@ D_L16_001B2608 4 D_L16_001B260C 4 D_L16_001B2620 4 D_L16_001B2638 4 -D_L16_001B41C0 12 +D_L16_001B41C0 1812 D_L16_001B4C50 1 D_L16_001BA248 4 D_L16_001BA258 4 @@ -23719,7 +23720,7 @@ D_L17_001B2A98 4 D_L17_001B2AA0 4 D_L17_001B2AA8 4 D_L17_001B2AB8 4 -D_L17_001B4640 12 +D_L17_001B4640 1812 D_L17_001B50D0 1 D_L17_001BA6C8 4 D_L17_001BA6D8 4 @@ -24898,7 +24899,7 @@ D_L18_001B2B8C 4 D_L18_001B2B94 4 D_L18_001B2BA0 4 D_L18_001B2BB8 4 -D_L18_001B4740 12 +D_L18_001B4740 1812 D_L18_001B51D0 1 D_L18_001BA7E0 4 D_L18_001BADB8 12 diff --git a/src/overlays/shared/ui/menus/build_reversed_active_message_list.c b/src/overlays/shared/ui/menus/build_reversed_active_message_list.c index 4ccb746295..bd7ce08aeb 100644 --- a/src/overlays/shared/ui/menus/build_reversed_active_message_list.c +++ b/src/overlays/shared/ui/menus/build_reversed_active_message_list.c @@ -3,63 +3,176 @@ #include "asm.h" #include "rnc/data_labels.h" #include "rnc/ui/help/message_state.h" +#include "rnc/ui/menus/menu_screen.h" -typedef struct { - s16 a; - s16 b; - s32 c; - s32 d; -} E_27adb0; - -extern u16 message_list_value_lookup[] __asm__("D_L00_00179452"); -extern E_27adb0 D_L00_001B3D40[]; -/* Fills D_L00_001B3D40 from the D_00141E08 table in reverse order, then ends it with 0. */ +extern u16 message_list_value_lookup[] __asm__("D_L00_00179452"); +/* The level's help history list: one row per help entry shown so far, newest + first, then a 0 text that ends it. */ +extern struct MenuTextItem level_help_history_items[151] __asm__("D_L00_001B3D40"); +/* Fills level_help_history_items from the D_00141E08 table in reverse order, then ends it with 0. */ s32 build_reversed_active_message_list(void) __asm__("FUN_L00_0027adb0"); s32 build_reversed_active_message_list(void) { s32 i, j; for (i = 0; i < active_message_record_count; i = j) { j = i + 1; - D_L00_001B3D40[i].b = 1; - D_L00_001B3D40[i].a = *(u16 *)((char *)message_list_value_lookup + - active_message_records[active_message_record_count - j] * 4); + level_help_history_items[i].action = MENU_ACTION_NO_OP; + level_help_history_items[i].text = + *(u16 *)((char *)message_list_value_lookup + + active_message_records[active_message_record_count - j] * 4); } - D_L00_001B3D40[*(volatile s32 *)&active_message_record_count].a = 0; + level_help_history_items[*(volatile s32 *)&active_message_record_count].text = 0; return 0; } -E_27adb0 D_L01_001B41C0 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L02_001B4340 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L03_001B3E40 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L04_001B3EC0 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L05_001B41C0 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L06_001B44C0 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L07_001B3DC0 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L08_001B4540 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L09_001B3EC0 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L10_001B41C0 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L11_001B4740 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L12_001B41C0 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L13_001B4040 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L14_001B4440 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L15_001B4340 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L16_001B41C0 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L17_001B4640 = {0x5277, 1, 0, 0}; - -E_27adb0 D_L18_001B4740 = {0x5277, 1, 0, 0}; +struct MenuTextItem level_help_history_items[151] __asm__("D_L00_001B3D40") = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L01_001B41C0[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L02_001B4340[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L03_001B3E40[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L04_001B3EC0[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L05_001B41C0[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L06_001B44C0[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L07_001B3DC0[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L08_001B4540[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L09_001B3EC0[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L10_001B41C0[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L11_001B4740[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L12_001B41C0[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L13_001B4040[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L14_001B4440[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L15_001B4340[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L16_001B41C0[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L17_001B4640[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; + +struct MenuTextItem D_L18_001B4740[151] = { + {0x5277, MENU_ACTION_NO_OP}, + {0x5278, MENU_ACTION_NO_OP}, + {0x52b9, MENU_ACTION_NO_OP}, + {0x52c0, MENU_ACTION_NO_OP}, + /* Filled at run time from the help log. */ +}; From 835fc4bbffefc4b4be254dd372343e86689cda2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:27:01 +0000 Subject: [PATCH 046/213] decomp: share the ground movement control block of walking enemies --- .../shared/mobys/ground_move_control.h | 35 ++++ src/overlays/l03/mobys/mine_layer.c | 109 ++++++------ src/overlays/l13/mobys/blarg_space_commando.c | 79 ++++----- .../shared/enemies/blarg_paratrooper.c | 157 ++++++++--------- .../shared/enemies/blarg_space_commando.c | 91 +++++----- src/overlays/shared/enemies/gadgebot.c | 164 ++++++++---------- src/overlays/shared/enemies/large_amoeboid.c | 137 +++++++-------- src/overlays/shared/enemies/sand_mouse.c | 54 +++--- src/overlays/shared/enemies/sandmouse.c | 101 +++++------ src/overlays/shared/enemies/seeker.c | 73 ++++---- .../shared/math/interpolation/spring_turn.c | 69 +++----- .../mobys/count_active_moby_group_members.c | 30 ++-- 12 files changed, 515 insertions(+), 584 deletions(-) create mode 100644 include/rnc/overlay/shared/mobys/ground_move_control.h diff --git a/include/rnc/overlay/shared/mobys/ground_move_control.h b/include/rnc/overlay/shared/mobys/ground_move_control.h new file mode 100644 index 0000000000..5db3a01a98 --- /dev/null +++ b/include/rnc/overlay/shared/mobys/ground_move_control.h @@ -0,0 +1,35 @@ +#ifndef LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_GROUND_MOVE_CONTROL_H +#define LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_GROUND_MOVE_CONTROL_H + +#include "types.h" + +/* Movement control block of a moby walking on the ground toward a target. + * init_ground_move_control (FUN_L01_0026d930) sets the defaults, + * step_mover (FUN_L00_00259028) turns the moby and moves it with + * move_moby_with_ground_and_collision_checks (FUN_L00_00258b50). */ +struct GroundMoveControl { + s32 collision_radius_1024ths; /* 0x00: radius in 1/1024 units for the collision move */ + f32 step_height; /* 0x04 */ + f32 max_drop; /* 0x08: move undone when the ground drops more */ + f32 max_climb; /* 0x0C: move undone when the ground rises more */ + f32 speed; /* 0x10: along the heading; accelerated, braked, clamped */ + f32 turn_velocity; /* 0x14: spring_turn velocity of rot.z */ + f32 vertical_velocity; /* 0x18: minus gravity each step */ + f32 acceleration; /* 0x1C */ + f32 brake; /* 0x20: fraction of speed removed near the target */ + f32 max_speed; /* 0x24 */ + f32 heading_tolerance; /* 0x28: moves only while the heading error is smaller */ + f32 arrive_distance; /* 0x2C: result flag 4 when the target is closer */ + f32 ground_probe_depth; /* 0x30: ground probe goes this far below pos.z */ + f32 unk34; + s32 movement_option_flags; /* 0x38: 1 no gravity, 4 use move_heading, 0x20 probe flag */ + f32 turn_spring; /* 0x3C: spring_turn spring strength */ + f32 turn_damping; /* 0x40 */ + f32 max_turn_step; /* 0x44 */ + s32 move_timer; /* 0x48: frames left to move; refilled while facing the target */ + f32 move_heading; /* 0x4C: heading used with movement option 4 */ +}; + +void init_ground_move_control(struct GroundMoveControl *) __asm__("FUN_L01_0026d930"); + +#endif /* LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_GROUND_MOVE_CONTROL_H */ diff --git a/src/overlays/l03/mobys/mine_layer.c b/src/overlays/l03/mobys/mine_layer.c index be622e3449..c6aead7c09 100644 --- a/src/overlays/l03/mobys/mine_layer.c +++ b/src/overlays/l03/mobys/mine_layer.c @@ -13,6 +13,7 @@ #include "qcopy.h" #include "rnc/overlay/l03/mobys/select_moby_target_with_hero_fallback.h" #include "rnc/overlay/l03/mobys/mine_layer_globals.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" /* Patrol state of the l03 trooper: walks back and forth along a rail path. */ enum { @@ -34,54 +35,43 @@ typedef struct { /* Pvars of the l03 trooper. */ typedef struct { - u8 pad0[0x20]; - f32 health; /* 0x20 */ - s16 unk24; - u8 pad26[2]; - u8 unk28; - u8 unk29; - u8 pad2A[0xE]; - s32 alerted; /* 0x38: set when it is hit */ - u8 pad3C[4]; - u8 effect[0x18]; /* 0x40: debris record (spawn_explosion, FUN_L00_00259028) */ - u8 unk58; - u8 pad59; - u8 unk5A; - u8 pad5B[5]; - u8 anim[0x10]; /* 0x60: animation driver */ - u8 knockback[0x10]; /* 0x70 */ - f32 kb_speed; /* 0x80 */ - u8 pad84[4]; - f32 kb_lift; /* 0x88 */ - f32 kb_gravity; /* 0x8C */ - u8 pad90[4]; - s32 kb_frames; /* 0x94 */ - u8 pad98[0x15]; - u8 kb_landed; /* 0xAD */ - u8 padAE[0x12]; - f32 kb_min; /* 0xC0 */ - f32 kb_max; /* 0xC4 */ - u8 padC8[8]; - u8 walk[8]; /* 0xD0: walk driver (FUN_L01_0026d930, FUN_L00_00259028) */ - f32 walk_max_drop; - f32 walk_max_climb; - u8 padE0[8]; - f32 fall_speed; /* 0xE8 */ - u8 padEC[8]; - f32 walk_max_speed; - u8 padF8[0x14]; - f32 walk_turn_spring; - f32 patrol_turn_damping_factor; - f32 patrol_turn_step_limit; - u8 pad118[8]; - TrooperPatrol patrol; /* 0x120 */ - u8 pad138[0x18]; - u8 turn[4]; /* 0x150: turn driver (FUN_L00_00258278) */ - s16 fire_timer; /* 0x154 */ - s16 patrol_timer; /* 0x156 */ - u8 pad158[4]; - s32 alert_timer; /* 0x15C */ - u8 unk160[0x10]; /* 0x160: FUN_L00_00263ac8 record */ + u8 pad0[0x20]; + f32 health; /* 0x20 */ + s16 unk24; + u8 pad26[2]; + u8 unk28; + u8 unk29; + u8 pad2A[0xE]; + s32 alerted; /* 0x38: set when it is hit */ + u8 pad3C[4]; + u8 effect[0x18]; /* 0x40: debris record (spawn_explosion, FUN_L00_00259028) */ + u8 unk58; + u8 pad59; + u8 unk5A; + u8 pad5B[5]; + u8 anim[0x10]; /* 0x60: animation driver */ + u8 knockback[0x10]; /* 0x70 */ + f32 kb_speed; /* 0x80 */ + u8 pad84[4]; + f32 kb_lift; /* 0x88 */ + f32 kb_gravity; /* 0x8C */ + u8 pad90[4]; + s32 kb_frames; /* 0x94 */ + u8 pad98[0x15]; + u8 kb_landed; /* 0xAD */ + u8 padAE[0x12]; + f32 kb_min; /* 0xC0 */ + f32 kb_max; /* 0xC4 */ + u8 padC8[8]; + struct GroundMoveControl walk; /* 0xD0 */ + TrooperPatrol patrol; /* 0x120 */ + u8 pad138[0x18]; + u8 turn[4]; /* 0x150: turn driver (FUN_L00_00258278) */ + s16 fire_timer; /* 0x154 */ + s16 patrol_timer; /* 0x156 */ + u8 pad158[4]; + s32 alert_timer; /* 0x15C */ + u8 unk160[0x10]; /* 0x160: FUN_L00_00263ac8 record */ } TrooperVars; s32 mine_layer_fire_interval_frames_gp __asm__("D_L03_00161918") = 0x12c; @@ -98,7 +88,6 @@ extern void FUN_L00_00263ac8(struct Moby *, int, void *, f32); void handle_mine_layer_damage(struct Moby *m) __asm__("FUN_L03_002ca808"); char *spawn_mine_layer_projectile(char *p, void *pos, float *dir) __asm__("FUN_L03_002cc888"); -extern void FUN_L01_0026d930(void *); extern void blend_moby_animation(struct Moby *, int, int, int) __asm__("FUN_00212f90"); extern void FUN_L00_00258278(f32, f32, f32, f32, struct Moby *, void *); extern void step_mover_2e3f20(struct Moby *, void *, void *, void *) __asm__("FUN_L00_00259028"); @@ -159,15 +148,15 @@ void mine_layer_update(struct Moby *mine_layer_moby) { } switch (mine_layer_moby->state) { case MINE_LAYER_INITIALIZE: - FUN_L01_0026d930(mine_layer_vars->walk); - mine_layer_vars->walk_turn_spring = frame_time_sq * 6.2831855f; - mine_layer_vars->patrol_turn_step_limit = frame_time * 6.2831855f; - mine_layer_vars->patrol_turn_damping_factor = frame_time_sq * 18.849556f; - mine_layer_vars->walk_max_speed = frame_time * 5.0f; + init_ground_move_control(&mine_layer_vars->walk); + mine_layer_vars->walk.turn_spring = frame_time_sq * 6.2831855f; + mine_layer_vars->walk.max_turn_step = frame_time * 6.2831855f; + mine_layer_vars->walk.turn_damping = frame_time_sq * 18.849556f; + mine_layer_vars->walk.max_speed = frame_time * 5.0f; mine_layer_vars->unk58 = 8; mine_layer_vars->unk5A = 8; - mine_layer_vars->walk_max_climb = 2.0f; - mine_layer_vars->walk_max_drop = 2.0f; + mine_layer_vars->walk.max_climb = 2.0f; + mine_layer_vars->walk.max_drop = 2.0f; mine_layer_vars->health = 2.0f; mine_layer_vars->unk24 = 2; mine_layer_vars->unk28 = 1; @@ -213,7 +202,7 @@ void mine_layer_update(struct Moby *mine_layer_moby) { pt = &mine_layer_vars->patrol; patrol_point_index = pt->idx; step_mover_2e3f20(mine_layer_moby, - mine_layer_vars->walk, + &mine_layer_vars->walk, &pt->path->points[patrol_point_index], mine_layer_vars->effect); mine_layer_moby->anim_speed = mine_layer_patrol_animation_speed_gp; @@ -325,13 +314,13 @@ void mine_layer_update(struct Moby *mine_layer_moby) { break; } if (mine_layer_moby->state < MINE_LAYER_KNOCKBACK_AND_RECOVER) { - mine_layer_vars->fall_speed += frame_time_sq * 9.8f; - mine_layer_moby->pos.z -= mine_layer_vars->fall_speed - 2.0f; + mine_layer_vars->walk.vertical_velocity += frame_time_sq * 9.8f; + mine_layer_moby->pos.z -= mine_layer_vars->walk.vertical_velocity - 2.0f; ground = probe_ground_height(&mine_layer_moby->pos, 0, 0.5f); mine_layer_moby->pos.z -= 2.0f; if (mine_layer_moby->pos.z < ground) { mine_layer_moby->pos.z = ground; - mine_layer_vars->fall_speed = 0.0f; + mine_layer_vars->walk.vertical_velocity = 0.0f; } else if (mine_layer_moby->pos.z < 5.0f) { qcopy(muzzle, &mine_layer_moby->pos); muzzle[2] += 0.5f; diff --git a/src/overlays/l13/mobys/blarg_space_commando.c b/src/overlays/l13/mobys/blarg_space_commando.c index 601e39f72f..b88cd73cc5 100644 --- a/src/overlays/l13/mobys/blarg_space_commando.c +++ b/src/overlays/l13/mobys/blarg_space_commando.c @@ -22,6 +22,7 @@ #include "rnc/rendering/effects/spawn_spark.h" #include "rnc/rendering/vu1_registers.h" #include "rnc/rendering/effect_texture.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" enum { BLARG_SPACE_COMMANDO_INITIALIZE = 0, @@ -87,48 +88,38 @@ typedef struct { } Shot; typedef struct { - s32 collision_radius_1024ths; - f32 step_height; - f32 max_drop; - f32 max_climb; - u8 pad10[0x14]; - f32 max_speed; - u8 pad28[0x18]; -} Ctl; - -typedef struct { - u8 pad0[0x20]; - f32 health; - s16 max_health; - u8 pad26[2]; - u8 unk28; - u8 pad29[7]; - f32 unk30; - u8 pad34[0x24]; - u8 unk58; - u8 pad59; - u8 unk5A; - u8 pad5B[5]; - Vec4 vel; /* 0x60 */ - u8 pad70[0x50]; - Ctl ctl; /* 0xC0 */ - u8 pad100[0x60]; - struct Moby *target; /* 0x160 */ - s32 target_selection_status; - u8 pad168[8]; - Vec4 home; /* 0x170 */ - u8 pad180[4]; - s32 pursuit_timer; - f32 turn; /* 0x188 */ - u8 pad18C[8]; - s32 timer; /* 0x194 */ - s32 path; /* 0x198 */ - u8 pad19C[0xC]; - f32 approach_heading_offset; - u8 pad1AC[0x34]; - Vec4 muzzle_position; - u8 pad1F0[0x210]; - u8 unk400[1]; + u8 pad0[0x20]; + f32 health; + s16 max_health; + u8 pad26[2]; + u8 unk28; + u8 pad29[7]; + f32 unk30; + u8 pad34[0x24]; + u8 unk58; + u8 pad59; + u8 unk5A; + u8 pad5B[5]; + Vec4 vel; /* 0x60 */ + u8 pad70[0x50]; + struct GroundMoveControl ctl; /* 0xC0 */ + u8 pad110[0x50]; + struct Moby *target; /* 0x160 */ + s32 target_selection_status; + u8 pad168[8]; + Vec4 home; /* 0x170 */ + u8 pad180[4]; + s32 pursuit_timer; + f32 turn; /* 0x188 */ + u8 pad18C[8]; + s32 timer; /* 0x194 */ + s32 path; /* 0x198 */ + u8 pad19C[0xC]; + f32 approach_heading_offset; + u8 pad1AC[0x34]; + Vec4 muzzle_position; + u8 pad1F0[0x210]; + u8 unk400[1]; } Vars_309330; extern int move_moby_with_ground_and_collision_checks( @@ -169,8 +160,6 @@ resolve_point_path_segment_xy_clearance(int, void *, void *, float) __asm__("FUN extern void FUN_L00_00263ac8(float, struct Moby *, int, void *); -extern void FUN_L01_0026d930(void *); - extern void FUN_L13_00308d10_c(struct Moby *) __asm__("FUN_L13_00308d10"); extern void FUN_L13_00309370_c(char *m) __asm__("FUN_L13_00309370"); @@ -217,7 +206,7 @@ void blarg_space_commando_update(struct Moby *moby) { blarg_space_commando_vars->unk5A = 8; blarg_space_commando_vars->max_health = 2; blarg_space_commando_vars->unk30 = 1.5f; - FUN_L01_0026d930(&blarg_space_commando_vars->ctl); + init_ground_move_control(&blarg_space_commando_vars->ctl); blarg_space_commando_vars->ctl.max_drop = 2.0f; blarg_space_commando_vars->ctl.max_climb = 0.5f; blarg_space_commando_vars->ctl.collision_radius_1024ths = diff --git a/src/overlays/shared/enemies/blarg_paratrooper.c b/src/overlays/shared/enemies/blarg_paratrooper.c index dc0bb8351f..f568804bdf 100644 --- a/src/overlays/shared/enemies/blarg_paratrooper.c +++ b/src/overlays/shared/enemies/blarg_paratrooper.c @@ -23,6 +23,7 @@ #include "rnc/world/collision/collision_line.h" #include "rnc/mobys/resolve_moby_hit_response.h" #include "rnc/overlay/shared/world/level_path.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" typedef struct Moby Moby; @@ -36,74 +37,61 @@ typedef struct { } Hero302618; typedef struct Paratrooper302618 { - u8 pad0[0x20]; - float health; /* 0x20: hit damage is taken from it */ - short f24; - u8 pad26[0x2]; - unsigned char f28; - unsigned char f29; - u8 pad2A[0x4]; - unsigned char removal_status; - u8 pad2F[0x9]; - s32 unk38; - u8 pad3C[0x1c]; - unsigned char f58; - u8 pad59[0x1]; - unsigned char f5A; - u8 pad5B[0x5]; - u8 trooper_anim[0x7]; - u8 hit_flash_red; - u8 pad68[0x8]; - u8 motion[0x10]; - f32 knockback_gravity; - u8 pad84[0x4]; - f32 knockback_speed; - f32 knockback_z_speed; - s32 knockback_collision_radius; - s32 knockback_motion_flags; - f32 knockback_collision_z_offset; - u8 pad9C[0x11]; - u8 unkAD; - u8 padAE[0x12]; - f32 knockback_apex_animation_frame; - f32 knockback_landing_animation_frame; - u8 padC8[0x8]; - int fD0; - u8 padD4[0x4]; - float fD8; - float fDC; - float fE0; - u8 padE4[0x10]; - f32 unkF4; - float fF8; - float fFC; - u8 pad100[0xc]; - float f10C; - float f110; - float f114; - u8 pad118[0x8]; - u8 path_search_point[0x8]; - f32 path_search_point_z; - u8 pad12C[0x34]; - char *target_moby; - int target_selection_status; - u8 pad168[0x68]; - int wake_path_index; - int jump_path_index; - s16 target_range_boost_timer; - short hop_count; - f32 target_range; - u8 pad1E0[0x4]; - f32 base_target_range; - float projectile_pitch_divisor; - int projectile_fire_timer; - int waypoint_transition_timer; - int destination_waypoint_index; - char *bone_attachment_moby; - int patrol_path_index; - u8 pad200[0xc]; - short patrol_waypoint_step; - short projectile_pattern_index; + u8 pad0[0x20]; + float health; /* 0x20: hit damage is taken from it */ + short f24; + u8 pad26[0x2]; + unsigned char f28; + unsigned char f29; + u8 pad2A[0x4]; + unsigned char removal_status; + u8 pad2F[0x9]; + s32 unk38; + u8 pad3C[0x1c]; + unsigned char f58; + u8 pad59[0x1]; + unsigned char f5A; + u8 pad5B[0x5]; + u8 trooper_anim[0x7]; + u8 hit_flash_red; + u8 pad68[0x8]; + u8 motion[0x10]; + f32 knockback_gravity; + u8 pad84[0x4]; + f32 knockback_speed; + f32 knockback_z_speed; + s32 knockback_collision_radius; + s32 knockback_motion_flags; + f32 knockback_collision_z_offset; + u8 pad9C[0x11]; + u8 unkAD; + u8 padAE[0x12]; + f32 knockback_apex_animation_frame; + f32 knockback_landing_animation_frame; + u8 padC8[0x8]; + struct GroundMoveControl move_control; /* 0xD0 */ + u8 path_search_point[0x8]; + f32 path_search_point_z; + u8 pad12C[0x34]; + char *target_moby; + int target_selection_status; + u8 pad168[0x68]; + int wake_path_index; + int jump_path_index; + s16 target_range_boost_timer; + short hop_count; + f32 target_range; + u8 pad1E0[0x4]; + f32 base_target_range; + float projectile_pitch_divisor; + int projectile_fire_timer; + int waypoint_transition_timer; + int destination_waypoint_index; + char *bone_attachment_moby; + int patrol_path_index; + u8 pad200[0xc]; + short patrol_waypoint_step; + short projectile_pattern_index; } Paratrooper302618; extern float D_0015ED6C; @@ -136,7 +124,6 @@ extern float turn302618(void *, float, void *, float, float, float) __asm__("FUN extern void FUN_L00_00263ac8_c(float, void *, int, void *) __asm__("FUN_L00_00263ac8"); extern void FUN_L00_0025a120_c(void *) __asm__("FUN_L00_0025a120"); extern void debug_print(char *, int) __asm__("FUN_001e93b0"); -extern void FUN_L01_0026d930_c(void *) __asm__("FUN_L01_0026d930"); extern void step_mover_2e3f20(void *, void *, void *, void *) __asm__("FUN_L00_00259028"); extern void FUN_L00_0025f730(void *, float); extern void @@ -249,15 +236,17 @@ void blarg_paratrooper_update(char *moby) { debug_print(paratrooper_invalid_jump_path_format, (*(short *)((char *)(moby) + 0xB2))); goto delete_moby; } - FUN_L01_0026d930_c((char *)paratrooper_private_state + 0xD0); - paratrooper_private_state->fDC = 0.5f; - paratrooper_private_state->fD8 = 0.5f; - paratrooper_private_state->fD0 = truncate_float_to_s32(512.0f); + init_ground_move_control(¶trooper_private_state->move_control); + paratrooper_private_state->move_control.max_climb = 0.5f; + paratrooper_private_state->move_control.max_drop = 0.5f; + paratrooper_private_state->move_control.collision_radius_1024ths = + truncate_float_to_s32(512.0f); turn_rate = D_0015ED70 * 6.981317f; - paratrooper_private_state->f110 = paratrooper_private_state->f10C = turn_rate; - paratrooper_private_state->f114 = D_0015ED6C * 8.726646f; - paratrooper_private_state->fF8 = 0.34906584f; - paratrooper_private_state->fFC = 0.2f; + paratrooper_private_state->move_control.turn_damping = + paratrooper_private_state->move_control.turn_spring = turn_rate; + paratrooper_private_state->move_control.max_turn_step = D_0015ED6C * 8.726646f; + paratrooper_private_state->move_control.heading_tolerance = 0.34906584f; + paratrooper_private_state->move_control.arrive_distance = 0.2f; if (random302618() & 1) (*(unsigned short *)((char *)(moby) + 0x34)) |= 0x8000; qcopy(&MOBY(moby)->pos, @@ -287,19 +276,19 @@ void blarg_paratrooper_update(char *moby) { if (vector_distance_xy(&MOBY(moby)->pos, path + 0x10 + paratrooper_private_state->destination_waypoint_index * 16) < - paratrooper_private_state->fE0) { + paratrooper_private_state->move_control.speed) { short direction = paratrooper_private_state->patrol_waypoint_step; int index = paratrooper_private_state->destination_waypoint_index + direction; paratrooper_private_state->destination_waypoint_index = index; if (index >= (*(int *)((char *)(path) + 0)) || index < 0) { - paratrooper_private_state->fE0 = 0.0f; + paratrooper_private_state->move_control.speed = 0.0f; paratrooper_private_state->patrol_waypoint_step = -direction; paratrooper_private_state->destination_waypoint_index = index + 2 * paratrooper_private_state->patrol_waypoint_step; } } step_mover_2e3f20(moby, - (char *)paratrooper_private_state + 0xD0, + ¶trooper_private_state->move_control, path + 0x10 + paratrooper_private_state->destination_waypoint_index * 16, pos); if (target && @@ -322,12 +311,12 @@ void blarg_paratrooper_update(char *moby) { &MOBY(moby)->pos, ((char *)l08_paths[paratrooper_private_state->jump_path_index]) + 0x10 + paratrooper_private_state->destination_waypoint_index * 16); - if (distance < 1.0f || distance < paratrooper_private_state->fE0) { - paratrooper_private_state->fE0 = 0.0f; + if (distance < 1.0f || distance < paratrooper_private_state->move_control.speed) { + paratrooper_private_state->move_control.speed = 0.0f; (*(unsigned char *)((char *)(moby) + 0x20)) = 3; } else { step_mover_2e3f20(moby, - (char *)paratrooper_private_state + 0xD0, + ¶trooper_private_state->move_control, ((char *)l08_paths[paratrooper_private_state->jump_path_index]) + 0x10 + paratrooper_private_state->destination_waypoint_index * 16, pos); @@ -655,7 +644,7 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { float timer_scale = D_L08_001621B0 * frame_time; ((Moby *)moby)->scale = *(float *)(((char *)MOBY(moby)->pclass) + 0x24) * l08_paratrooper_model_scale_multiplier; - paratrooper_instance_state->unkF4 = timer_scale; + paratrooper_instance_state->move_control.max_speed = timer_scale; } if (paratrooper_instance_state->bone_attachment_moby == 0) { diff --git a/src/overlays/shared/enemies/blarg_space_commando.c b/src/overlays/shared/enemies/blarg_space_commando.c index 4496be91bf..7f7dcd30e7 100644 --- a/src/overlays/shared/enemies/blarg_space_commando.c +++ b/src/overlays/shared/enemies/blarg_space_commando.c @@ -15,6 +15,7 @@ #include "rnc/rendering/vu1_registers.h" #include "rnc/game/interpolated_record.h" #include "rnc/mobys/animation/blend_moby_animation.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" /* Movement controller block at vars + 0xC0 (FUN_L01_0026d930 init, FUN_L00_00258b50 step). */ enum { @@ -33,17 +34,6 @@ enum { BLARG_COMMANDO_STATE_DEATH_KNOCKBACK = 16 }; -typedef struct { - s32 collision_radius_1024ths; - f32 step_height; - f32 max_drop; - f32 max_climb; - u8 pad10[0x14]; - f32 max_speed; - u8 pad28[0x10]; - s32 flags; /* 0x38 */ -} MoveCtl; - typedef struct { u8 pad0[0x18]; u8 unk18; @@ -54,42 +44,42 @@ typedef struct { /* pvars of blarg_space_commando_update */ typedef struct { - u8 pad0[0x20]; - f32 unk20; - s16 unk24; - u8 pad26[2]; - u8 unk28; - u8 unk29; - u8 pad2A[6]; - f32 unk30; - u8 pad34[0xC]; - Vec4 unk40; - u8 pad50[8]; - u8 unk58; - u8 pad59; - u8 unk5A; - u8 pad5B[5]; - Vec4 vel; /* 0x60 */ - u8 pad70[0x50]; - MoveCtl ctl; /* 0xC0 */ - u8 padFC[0x64]; - struct Moby *target; /* 0x160 */ - s32 target_selection_status; - u8 pad168[8]; - Vec4 home; /* 0x170 */ - u8 pad180[8]; - s32 pursuit_timer; - f32 turn_speed; /* 0x18C */ - u8 pad190[0xC]; - s32 timer; /* 0x19C */ - u8 pad1A0[4]; - s32 path; /* 0x1A4 */ - s32 route; /* 0x1A8 */ - s32 volume; /* 0x1AC */ - u8 pad1B0[0x50]; - Vec4 melee_sweep_previous_position; - u8 pad210[0x210]; - u8 unk420[1]; + u8 pad0[0x20]; + f32 unk20; + s16 unk24; + u8 pad26[2]; + u8 unk28; + u8 unk29; + u8 pad2A[6]; + f32 unk30; + u8 pad34[0xC]; + Vec4 unk40; + u8 pad50[8]; + u8 unk58; + u8 pad59; + u8 unk5A; + u8 pad5B[5]; + Vec4 vel; /* 0x60 */ + u8 pad70[0x50]; + struct GroundMoveControl ctl; /* 0xC0 */ + u8 pad110[0x50]; + struct Moby *target; /* 0x160 */ + s32 target_selection_status; + u8 pad168[8]; + Vec4 home; /* 0x170 */ + u8 pad180[8]; + s32 pursuit_timer; + f32 turn_speed; /* 0x18C */ + u8 pad190[0xC]; + s32 timer; /* 0x19C */ + u8 pad1A0[4]; + s32 path; /* 0x1A4 */ + s32 route; /* 0x1A8 */ + s32 volume; /* 0x1AC */ + u8 pad1B0[0x50]; + Vec4 melee_sweep_previous_position; + u8 pad210[0x210]; + u8 unk420[1]; } Moby1068Vars; extern f32 D_L06_00161FA8 __attribute__((sda)); @@ -106,7 +96,7 @@ extern f32 D_L06_0015F580[] MACRO_ADDR; extern void moby_point_position(struct Moby *, s32, void *) __asm__("FUN_L00_0024f7c8"); extern void FUN_L00_00258278(struct Moby *, f32, f32 *, f32, f32, f32); extern s32 move_moby_with_ground_and_collision_checks( - struct Moby *, MoveCtl *, void *, void *, f32) __asm__("FUN_L00_00258b50"); + struct Moby *, struct GroundMoveControl *, void *, void *, f32) __asm__("FUN_L00_00258b50"); extern void make_hit_descriptor(ShotInfo *, struct Moby *, s32, void *, f32) __asm__("FUN_L00_00259888"); extern void sweep_hit_segment( @@ -138,7 +128,6 @@ resolve_point_path_segment_xy_clearance(s32, void *, void *, f32) __asm__("FUN_L extern void FUN_L00_00263ac8(struct Moby *, s32, void *, f32); extern void FUN_L00_00263fd8(struct Moby *, s32, void *, void *, s32, s32, f32, f32 *, f32 *, f32 *); -extern void FUN_L01_0026d930(MoveCtl *); extern void FUN_L06_002feb40_u(struct Moby *) __asm__("FUN_L06_002feb40"); extern void FUN_L06_002ff100_u(struct Moby *) __asm__("FUN_L06_002ff100"); @@ -177,14 +166,14 @@ void blarg_space_commando_update(struct Moby *moby) { blarg_commando_state->unk24 = 2; blarg_commando_state->unk58 = truncate_float_to_s32(12.0f); blarg_commando_state->unk5A = truncate_float_to_s32(13.6f); - FUN_L01_0026d930(&blarg_commando_state->ctl); + init_ground_move_control(&blarg_commando_state->ctl); blarg_commando_state->ctl.max_drop = 2.0f; blarg_commando_state->ctl.max_climb = 0.5f; blarg_commando_state->ctl.collision_radius_1024ths = truncate_float_to_s32(D_L06_00161FA8 * 307.2f); blarg_commando_state->ctl.step_height = D_L06_00161FA8 * 0.3f; blarg_commando_state->ctl.max_speed = movement_max_horizontal_speed_gp * frame_time; - blarg_commando_state->ctl.flags |= 8; + blarg_commando_state->ctl.movement_option_flags |= 8; qcopy(&blarg_commando_state->home, &moby->pos); moby->state = BLARG_COMMANDO_STATE_SELECT_ACTION; break; diff --git a/src/overlays/shared/enemies/gadgebot.c b/src/overlays/shared/enemies/gadgebot.c index e5eda25add..60b062cdd9 100644 --- a/src/overlays/shared/enemies/gadgebot.c +++ b/src/overlays/shared/enemies/gadgebot.c @@ -24,6 +24,7 @@ #include "rnc/overlay/shared/enemies/gadgebot_spawn_container.h" #include "rnc/overlay/shared/enemies/gadgebot_spawn_pad.h" #include "rnc/overlay/shared/math/random/random_int_between.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" enum { GADGEBOT_ABSORPTION_DISABLED = 2 @@ -99,83 +100,60 @@ typedef struct GbMoby { char pD0[0x30]; } GbMoby; -typedef struct { - int collision_radius_1024ths; - float step_height; - float max_drop; - float max_climb; - float speed; - float turn_step; - float vertical_velocity; - float acceleration; - float brake; - float max_speed; - float heading_tolerance; - float arrive_distance; - float ground_probe_depth; - float unk34; - int movement_option_flags; - float turn_spring; - float turn_damping; - float max_turn_step; - int move_timer; - float move_heading; -} GbCtl; - typedef struct { int id[16]; int node[16]; } GbPaths; typedef struct { - float follow_anchor[4] __attribute__((aligned(16))); - float unk10; - float unk14; - float unk18; - char p1C[0x14]; - GbCtl ctl; - char knockback_motion[0x60]; - float home_position[4] __attribute__((aligned(16))); - float stall_check_position[4] __attribute__((aligned(16))); - unsigned char scale_manipulator; - unsigned char scale_manipulator_attached; - char p102[0x1E]; - float scale_manipulator_scale_x; - float scale_manipulator_scale_y; - float scale_manipulator_scale_z; - char p12C[0x44]; - GbMoby *spawn_container_moby; - GbMoby *target; /* nearest mine/box moby found by FUN_L06_002f2910 (0: none) */ - char p178[4]; - float approach_heading_offset; - char p180[4]; - int follow_frame_count; - float stall_hero_distance; - int attack_target_search_frame; - short unk190; - char p192[2]; - int attack_substate_timer; - short has_target; - short target_searched; /* set once FUN_L06_002f2910 has run the search */ - GbMoby *collision_contact_moby; - char p1A0[0x40]; - GbPaths paths; - char p260[0x1C]; - int selected_path_slot; - char p280[4]; - float collision_correction_speed; - float ground_spring_velocity; - float glow_pulse_angle; - char p290[0x10]; - int follow_gate_moby_indices[8]; - int follow_gate_volumes[8]; - GbVec position_history_latest; - GbVec position_history_previous; - float ground_height_change_limit; - GbMoby *absorption_owner_moby; - float manipulator_scale; - int target_group; /* moby group searched for targets (-1: whole level list) */ - int configured_path_count; + float follow_anchor[4] __attribute__((aligned(16))); + float unk10; + float unk14; + float unk18; + char p1C[0x14]; + struct GroundMoveControl ctl; + char knockback_motion[0x60]; + float home_position[4] __attribute__((aligned(16))); + float stall_check_position[4] __attribute__((aligned(16))); + unsigned char scale_manipulator; + unsigned char scale_manipulator_attached; + char p102[0x1E]; + float scale_manipulator_scale_x; + float scale_manipulator_scale_y; + float scale_manipulator_scale_z; + char p12C[0x44]; + GbMoby *spawn_container_moby; + GbMoby *target; /* nearest mine/box moby found by FUN_L06_002f2910 (0: none) */ + char p178[4]; + float approach_heading_offset; + char p180[4]; + int follow_frame_count; + float stall_hero_distance; + int attack_target_search_frame; + short unk190; + char p192[2]; + int attack_substate_timer; + short has_target; + short target_searched; /* set once FUN_L06_002f2910 has run the search */ + GbMoby *collision_contact_moby; + char p1A0[0x40]; + GbPaths paths; + char p260[0x1C]; + int selected_path_slot; + char p280[4]; + float collision_correction_speed; + float ground_spring_velocity; + float glow_pulse_angle; + char p290[0x10]; + int follow_gate_moby_indices[8]; + int follow_gate_volumes[8]; + GbVec position_history_latest; + GbVec position_history_previous; + float ground_height_change_limit; + GbMoby *absorption_owner_moby; + float manipulator_scale; + int target_group; /* moby group searched for targets (-1: whole level list) */ + int configured_path_count; } GbVars; typedef struct { @@ -335,23 +313,23 @@ void gadgebot_update(GbMoby *moby) { GADGEBOT_INTERACTION_SEARCH_TARGET = 0, GADGEBOT_INTERACTION_APPROACH_TARGET = 1 }; - float movement_displacement_output[4]; - float raised_position_snapshot[4]; - float save0[4]; - float save1[4]; - float vector_and_hit_scratch[4]; - float position_and_displacement_scratch[4]; - float temporary_position[4]; - float path_and_attack_vector[4]; - float attack_probe_near_position[4]; - float owner_radial_angle; - float step; - GbVars *gadgebot_vars = moby->vars; - GbCtl *movement_control; - int flags; - float hero_distance; - float dz; - int interaction_result; + float movement_displacement_output[4]; + float raised_position_snapshot[4]; + float save0[4]; + float save1[4]; + float vector_and_hit_scratch[4]; + float position_and_displacement_scratch[4]; + float temporary_position[4]; + float path_and_attack_vector[4]; + float attack_probe_near_position[4]; + float owner_radial_angle; + float step; + GbVars *gadgebot_vars = moby->vars; + struct GroundMoveControl *movement_control; + int flags; + float hero_distance; + float dz; + int interaction_result; flags = 0; movement_control = &gadgebot_vars->ctl; @@ -608,7 +586,7 @@ void gadgebot_update(GbMoby *moby) { fast_arc_tan(position_and_displacement_scratch[0] - moby->pos[0], position_and_displacement_scratch[1] - moby->pos[1]), gadgebot_vars->approach_heading_offset), - &gadgebot_vars->ctl.turn_step, + &gadgebot_vars->ctl.turn_velocity, frame_scale_sq * 0.07f, frame_scale_sq * 0.3f, frame_time * 5.2359877f); @@ -685,7 +663,7 @@ void gadgebot_update(GbMoby *moby) { FUN_L00_00258278((char *)moby, fast_arc_tan(hero.motion.pos.f[0] - moby->pos[0], hero.motion.pos.f[1] - moby->pos[1]), - &gadgebot_vars->ctl.turn_step, + &gadgebot_vars->ctl.turn_velocity, frame_scale_sq * 0.05f, frame_scale_sq * 0.3f, frame_time * 3.4906585f); @@ -703,7 +681,7 @@ void gadgebot_update(GbMoby *moby) { FUN_L00_00258278( (char *)moby, fast_arc_tan(hero.motion.pos.f[0] - moby->pos[0], hero.motion.pos.f[1] - moby->pos[1]), - &gadgebot_vars->ctl.turn_step, + &gadgebot_vars->ctl.turn_velocity, frame_scale_sq * 0.05f, frame_scale_sq * 0.3f, frame_time * 3.4906585f); @@ -791,7 +769,7 @@ void gadgebot_update(GbMoby *moby) { } FUN_L00_00258278((char *)moby, approach_heading, - &gadgebot_vars->ctl.turn_step, + &gadgebot_vars->ctl.turn_velocity, frame_scale_sq * 0.07f, frame_scale_sq * 0.3f, frame_time * 5.2359877f); @@ -905,7 +883,7 @@ void gadgebot_update(GbMoby *moby) { FUN_L00_00258278((char *)moby, fast_arc_tan(vector_and_hit_scratch[0] - moby->pos[0], vector_and_hit_scratch[1] - moby->pos[1]), - &gadgebot_vars->ctl.turn_step, + &gadgebot_vars->ctl.turn_velocity, frame_scale_sq * 0.07f, frame_scale_sq * 0.3f, frame_time * 5.2359877f); diff --git a/src/overlays/shared/enemies/large_amoeboid.c b/src/overlays/shared/enemies/large_amoeboid.c index 9a6a38b820..89ee6f4a39 100644 --- a/src/overlays/shared/enemies/large_amoeboid.c +++ b/src/overlays/shared/enemies/large_amoeboid.c @@ -22,6 +22,7 @@ #include "rnc/overlay/shared/enemies/large_amoeboid_data/spawn_amoeboid_movement_particles.h" #include "rnc/overlay/shared/enemies/large_amoeboid_data/spawn_amoeboid_burst_sparks_2.h" #include "rnc/overlay/shared/enemies/large_amoeboid_data/spawn_amoeboid_burst_sparks.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" enum { LARGE_AMOEBOID_INITIALIZE = 0, @@ -41,65 +42,59 @@ enum { }; typedef struct LargeAmoeboidVars { - u8 pad0[0x20]; - f32 health; - u8 pad24[0x5]; - s8 unk29; - u8 pad2A[0x6]; - f32 unk30; - u8 pad34[0x4]; - s32 unk38; - u8 pad3C[0x4]; - u8 move_displacement[0x18]; - s8 unk58; - u8 pad59[0x1]; - s8 unk5A; - u8 pad5B[0x5]; - u8 motion[0x10]; - f32 knockback_gravity; - u8 pad74[0xc]; - s32 knockback_collision_radius; - s32 knockback_motion_flags; - f32 knockback_collision_z_offset; - u8 pad8C[0x11]; - s8 unk9D; - u8 pad9E[0x8a]; - u16 unk128; - u8 pad12A[0x6]; - void *unk130; - u8 pad134[0x3c]; - s32 move_control; - u8 pad174[0x4]; - f32 move_max_drop; - f32 move_max_climb; - u8 pad180[0x14]; - f32 move_max_speed; - u8 pad198[0x28]; - f32 path_search_point[4]; - u8 pad1D0[0x30]; - char *target; - s32 target_selection_status; - u8 pad208[0x8]; - f32 home_pos[4]; /* 0x210: position at spawn */ - u8 turn_velocity[0x4]; - f32 base_target_search_radius; - f32 effective_target_search_radius; - s32 pursuit_timer; - s32 starts_active; - f32 path_heading_offset; - u8 pad238[0x4]; - f32 move_speed; - s32 path_ids; - s32 path_index; - s32 alternate_target_list_index; - s32 target_region_path_index; - f32 size_scale; /* 0x250: 1, 0.7 or 0.49 by amoeboid size */ - f32 glow_cycle_phase; - s32 removal_height_table_index; - s32 activation_volume; - s32 target_search_gate_moby_index; - u8 pad264[0xc]; - u8 unk270[0x4]; + u8 pad0[0x20]; + f32 health; + u8 pad24[0x5]; + s8 unk29; + u8 pad2A[0x6]; + f32 unk30; + u8 pad34[0x4]; + s32 unk38; + u8 pad3C[0x4]; + u8 move_displacement[0x18]; + s8 unk58; + u8 pad59[0x1]; + s8 unk5A; + u8 pad5B[0x5]; + u8 motion[0x10]; + f32 knockback_gravity; + u8 pad74[0xc]; + s32 knockback_collision_radius; + s32 knockback_motion_flags; + f32 knockback_collision_z_offset; + u8 pad8C[0x11]; + s8 unk9D; + u8 pad9E[0x8a]; + u16 unk128; + u8 pad12A[0x6]; + void *unk130; + u8 pad134[0x3c]; + struct GroundMoveControl move_control; /* 0x170 */ + f32 path_search_point[4]; + u8 pad1D0[0x30]; + char *target; + s32 target_selection_status; + u8 pad208[0x8]; + f32 home_pos[4]; /* 0x210: position at spawn */ + u8 turn_velocity[0x4]; + f32 base_target_search_radius; + f32 effective_target_search_radius; + s32 pursuit_timer; + s32 starts_active; + f32 path_heading_offset; + u8 pad238[0x4]; + f32 move_speed; + s32 path_ids; + s32 path_index; + s32 alternate_target_list_index; + s32 target_region_path_index; + f32 size_scale; /* 0x250: 1, 0.7 or 0.49 by amoeboid size */ + f32 glow_cycle_phase; + s32 removal_height_table_index; + s32 activation_volume; + s32 target_search_gate_moby_index; + u8 pad264[0xc]; + u8 unk270[0x4]; } LargeAmoeboidVars; typedef int u128_2F0040 __attribute__((mode(TI))); @@ -137,7 +132,6 @@ void spawn_amoeboid_burst_sparks(unsigned char *moby, f32 *mode) __asm__( extern void spawn_amoeboid_burst_sparks(unsigned char *, float *) __asm__("FUN_L01_002ef770"); extern int follow_path(int *, int, int, float, void *, void *, void *) __asm__("FUN_L01_00276fe8"); -extern void FUN_L01_0026d930(void *); extern void move_moby_with_ground_and_collision_checks( void *, void *, void *, void *, float) __asm__("FUN_L00_00258b50"); extern int path_8808(int, void *, void *, void *) __asm__("FUN_L00_00261b48"); @@ -305,13 +299,13 @@ void large_amoeboid_update(unsigned char *moby) { } if (large_amoeboid_vars->base_target_search_radius == 0.0f) large_amoeboid_vars->base_target_search_radius = 15.0f; - FUN_L01_0026d930(&large_amoeboid_vars->move_control); - large_amoeboid_vars->move_max_climb = 2.0f; - large_amoeboid_vars->move_max_drop = 2.0f; + init_ground_move_control(&large_amoeboid_vars->move_control); + large_amoeboid_vars->move_control.max_climb = 2.0f; + large_amoeboid_vars->move_control.max_drop = 2.0f; result = truncate_float_to_s32(large_amoeboid_vars->size_scale * 0.8f * 1024.0f); angle = large_amoeboid_vars->move_speed * frame_time_gp; - large_amoeboid_vars->move_control = result; - large_amoeboid_vars->move_max_speed = angle; + large_amoeboid_vars->move_control.collision_radius_1024ths = result; + large_amoeboid_vars->move_control.max_speed = angle; if (large_amoeboid_vars->starts_active != 0) { MOBY(moby)->state = LARGE_AMOEBOID_TRY_ACQUIRE_TARGET_PATH; MOBY(moby)->flags |= 0x1000; @@ -357,7 +351,7 @@ void large_amoeboid_update(unsigned char *moby) { blend_moby_animation(moby, 1, 0, 5); return; } - large_amoeboid_vars->move_max_speed = + large_amoeboid_vars->move_control.max_speed = large_amoeboid_vars->move_speed * 0.5f * frame_time_gp; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, 5); @@ -397,7 +391,7 @@ void large_amoeboid_update(unsigned char *moby) { angle = random_float_between(-0.34906584f, 0.34906584f); distance = large_amoeboid_vars->move_speed * frame_time_gp; large_amoeboid_vars->path_heading_offset = angle; - large_amoeboid_vars->move_max_speed = distance; + large_amoeboid_vars->move_control.max_speed = distance; } else { large_amoeboid_vars->target_selection_status = 2; } @@ -458,7 +452,7 @@ void large_amoeboid_update(unsigned char *moby) { distance = vector_distance_xy(&MOBY(moby)->pos, target_position); if (distance < large_amoeboid_path_lunge_distance_threshold_gp) { MOBY(moby)->state = LARGE_AMOEBOID_LUNGE_AT_TARGET; - large_amoeboid_vars->move_max_speed = + large_amoeboid_vars->move_control.max_speed = (large_amoeboid_vars->move_speed + large_amoeboid_vars->move_speed) * frame_time_gp; if (MOBY(moby)->prev_seq != 2) blend_moby_animation(moby, 2, 0, scale_game_frames(10)); @@ -549,7 +543,8 @@ void large_amoeboid_update(unsigned char *moby) { MOBY(moby)->state = LARGE_AMOEBOID_WAIT_FOR_ANIMATION_BEFORE_RESUMING_PATH; if (MOBY(moby)->prev_seq != 3) blend_moby_animation(moby, 3, 0, scale_game_frames(10)); - large_amoeboid_vars->move_max_speed = large_amoeboid_vars->move_speed * frame_time_gp; + large_amoeboid_vars->move_control.max_speed = + large_amoeboid_vars->move_speed * frame_time_gp; } break; } @@ -624,7 +619,7 @@ void large_amoeboid_update(unsigned char *moby) { move); if (path_hit != 0) { FUN_0022da68(4, 0, (char *)moby); - large_amoeboid_vars->move_max_speed = + large_amoeboid_vars->move_control.max_speed = large_amoeboid_vars->move_speed * frame_time_gp; MOBY(moby)->state = LARGE_AMOEBOID_WAIT_FOR_ANIMATION_BEFORE_RESTARTING_PATH; if (MOBY(moby)->prev_seq != 5) @@ -648,7 +643,7 @@ void large_amoeboid_update(unsigned char *moby) { angle = random_float_between(-0.34906584f, 0.34906584f); distance = large_amoeboid_vars->move_speed * frame_time_gp; large_amoeboid_vars->path_heading_offset = angle; - large_amoeboid_vars->move_max_speed = distance; + large_amoeboid_vars->move_control.max_speed = distance; } break; case LARGE_AMOEBOID_WAIT_FOR_ACTIVATION_VOLUME: diff --git a/src/overlays/shared/enemies/sand_mouse.c b/src/overlays/shared/enemies/sand_mouse.c index 4621dd9e15..8c7cf85bbf 100644 --- a/src/overlays/shared/enemies/sand_mouse.c +++ b/src/overlays/shared/enemies/sand_mouse.c @@ -24,6 +24,7 @@ #include "rnc/overlay/shared/enemies/sand_mouse_data/update_hover_moby_steering.h" #include "rnc/overlay/shared/enemies/sand_mouse_data/sand_mouse_update.h" #include "rnc/world/collision/collision_line.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" enum { SAND_MOUSE_INITIALIZE = 0, @@ -68,14 +69,10 @@ typedef struct { void *tgt; } Data; +/* Ground movement shared by the sand mice; owner is the sand mouse using it. */ typedef struct { - int collision_radius_1024ths; - float step_height, max_drop, max_climb, speed, yaw_speed, vertical_velocity, acceleration, - brake, max_speed, heading_tolerance, arrive_distance, ground_probe_depth; - int unk34, movement_option_flags; - float turn_spring, turn_damping, max_turn_step; - int move_timer, move_heading; - void *owner; + struct GroundMoveControl move; + void *owner; /* 0x50 */ } Mover; typedef struct { @@ -129,7 +126,6 @@ extern int rand(void) __asm__("FUN_001160d8"); extern char sand_mouse_already_completed_message[] __asm__("D_L01_0020AE80"); extern char sand_mouse_missing_start_house_message[] __asm__("D_L01_0020AEA0"); extern void debug_print(char *) __asm__("FUN_001e93b0"); -extern void initialize_mover_2e3f20(void *) __asm__("FUN_L01_0026d930"); extern void rig_probe_setup(void *, int, int *, float *, float *, int *) __asm__("FUN_L01_00263a28"); extern void @@ -557,28 +553,28 @@ void sand_mouse_update(struct Moby *moby) { } qcopy(sand_mouse_vars->start, ((float *)&moby->pos)); qcopy(sand_mouse_vars->home, ((float *)&moby->pos)); - initialize_mover_2e3f20((char *)&mover_2e3f20); + init_ground_move_control(&mover_2e3f20.move); { int kind; float collision_probe_extent; int flag; rig_probe_setup(moby, 0, &kind, va, &collision_probe_extent, &flag); - mover_2e3f20.yaw_speed = frame_scale * 0.4f; - mover_2e3f20.max_drop = 0.15f; - mover_2e3f20.max_climb = 0.15f; - mover_2e3f20.speed = frame_scale * 0.01f; - mover_2e3f20.max_speed = frame_time * 2.7f; - mover_2e3f20.acceleration = frame_scale * 0.01f; - mover_2e3f20.collision_radius_1024ths = + mover_2e3f20.move.turn_velocity = frame_scale * 0.4f; + mover_2e3f20.move.max_drop = 0.15f; + mover_2e3f20.move.max_climb = 0.15f; + mover_2e3f20.move.speed = frame_scale * 0.01f; + mover_2e3f20.move.max_speed = frame_time * 2.7f; + mover_2e3f20.move.acceleration = frame_scale * 0.01f; + mover_2e3f20.move.collision_radius_1024ths = truncate_float_to_s32(collision_probe_extent * 1024.0f) + 1; - mover_2e3f20.movement_option_flags |= 8; - mover_2e3f20.step_height = 0.3f; - mover_2e3f20.ground_probe_depth = 0.005f; - mover_2e3f20.turn_spring = frame_time_sq * 11.519173f; - mover_2e3f20.turn_damping = frame_time_sq * 3.1415927f; - mover_2e3f20.max_turn_step = frame_time * 11.519173f; - mover_2e3f20.move_timer = scale_game_frames(4); - mover_2e3f20.heading_tolerance = 3.1415927f; + mover_2e3f20.move.movement_option_flags |= 8; + mover_2e3f20.move.step_height = 0.3f; + mover_2e3f20.move.ground_probe_depth = 0.005f; + mover_2e3f20.move.turn_spring = frame_time_sq * 11.519173f; + mover_2e3f20.move.turn_damping = frame_time_sq * 3.1415927f; + mover_2e3f20.move.max_turn_step = frame_time * 11.519173f; + mover_2e3f20.move.move_timer = scale_game_frames(4); + mover_2e3f20.move.heading_tolerance = 3.1415927f; } moby->state = SAND_MOUSE_WAIT_FOR_HERO_IN_VOLUME; moby->draw_dist = 0; @@ -604,7 +600,7 @@ void sand_mouse_update(struct Moby *moby) { hero_2e3f20->pos[1] - moby->pos.y); approach_w(moby, desired_facing_yaw, - &mover_2e3f20.yaw_speed, + &mover_2e3f20.move.turn_velocity, frame_time_sq * 11.519173f, frame_time_sq * 3.1415927f, frame_time * 11.519173f); @@ -621,7 +617,7 @@ void sand_mouse_update(struct Moby *moby) { hero_2e3f20->helper->state != 0xFD) { hero_2e3f20->helper->state = 1; } - *(void **)((char *)&mover_2e3f20 + 0x50) = moby; + mover_2e3f20.owner = moby; l01_hero_set_state(0x1F, 0); set_hero_animation(0, 0, (float)scale_game_frames(6)); if (sand_mouse_vars->parent != -1) { @@ -655,7 +651,7 @@ void sand_mouse_update(struct Moby *moby) { sand_mouse_vars->target[1] - moby->pos.y); approach_w(moby, desired_facing_yaw, - &mover_2e3f20.yaw_speed, + &mover_2e3f20.move.turn_velocity, frame_time_sq * 11.519173f, frame_time_sq * 3.1415927f, frame_time * 11.519173f); @@ -668,7 +664,7 @@ void sand_mouse_update(struct Moby *moby) { } if (vector_distance_xy(((float *)&moby->pos), sand_mouse_vars->home) > 0.4f && sand_mouse_vars->timer == 0) { - *(float *)((char *)&mover_2e3f20 + 4) = 0.7f; + mover_2e3f20.move.step_height = 0.7f; if (moby->prev_seq != 3) { blend_moby_animation(moby, 3, 0, scale_game_frames(3)); } @@ -775,7 +771,7 @@ void sand_mouse_update(struct Moby *moby) { sand_mouse_vars->target[1] - moby->pos.y); approach_w(moby, desired_facing_yaw, - &mover_2e3f20.yaw_speed, + &mover_2e3f20.move.turn_velocity, frame_time_sq * 11.519173f, frame_time_sq * 3.1415927f, frame_time * 11.519173f); diff --git a/src/overlays/shared/enemies/sandmouse.c b/src/overlays/shared/enemies/sandmouse.c index 2b7bf3e3a4..4a9070df4a 100644 --- a/src/overlays/shared/enemies/sandmouse.c +++ b/src/overlays/shared/enemies/sandmouse.c @@ -18,6 +18,7 @@ #include "rnc/overlay/l01/hero/hero_set_state.h" #include "rnc/overlay/shared/world/collision.h" #include "rnc/overlay/shared/game/level_save_state.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" enum { SANDMOUSE_STATE_INITIALIZE = 0, @@ -258,24 +259,14 @@ struct HoverVars { struct Moby *target; /* 0x60: set by FUN_L01_0030d5f0 */ }; -/* steering constants */ -struct HoverTuning { - s32 collision_radius_1024ths; /* passed to FUN_L00_00258ad0 (move_moby_with_collision_integer_radius) */ - f32 step_height, max_drop, max_climb, speed; - f32 yaw_speed; /* 0x14: turn speed FUN_L00_00258278 keeps (D_L01_001DEB4C) */ - f32 vertical_velocity, acceleration, brake, max_speed, heading_tolerance, arrive_distance; - f32 ground_probe_depth; - f32 unk34; - s32 movement_option_flags; - f32 turn_spring, turn_damping, max_turn_step; - s32 move_timer; - s32 move_heading; - struct Moby *owner; /* 0x50 */ +/* Ground movement shared by the sandmice; owner is the sandmouse using it. */ +struct SandmouseMoveControl { + struct GroundMoveControl move; + struct Moby *owner; /* 0x50 */ }; -extern struct HoverTuning D_L01_001DEB38; -extern f32 D_L01_001DEB4C NOT_SDA; -extern f32 sandmouse_target_yaw_spring_strength_degrees_gp __asm__("D_L01_001620C4") +extern struct SandmouseMoveControl D_L01_001DEB38; +extern f32 sandmouse_target_yaw_spring_strength_degrees_gp __asm__("D_L01_001620C4") __attribute__((sda)); extern f32 sandmouse_target_yaw_damping_degrees_gp __asm__("D_L01_001620C8") __attribute__((sda)); extern f32 sandmouse_target_yaw_turn_limit_degrees_gp __asm__("D_L01_001620CC") @@ -300,14 +291,14 @@ void update_sandmouse_hover_movement(struct Moby *moby, struct HoverVars *hover_ HOVER_COMMAND_FACE_GOAL = 0, HOVER_COMMAND_MOVE_TO_GOAL = 2 }; - Vec4 steering_correction; - f32 reference_distance; - f32 k; - f32 bearing_yaw; - f32 velocity_magnitude; - s32 hit; - s16 stuck_frames; - struct HoverTuning *hover_tuning; + Vec4 steering_correction; + f32 reference_distance; + f32 k; + f32 bearing_yaw; + f32 velocity_magnitude; + s32 hit; + s16 stuck_frames; + struct SandmouseMoveControl *move_control; fast_vec_sub(&steering_correction, hover_vars, &moby->pos); if (moby->state == SANDMOUSE_STATE_FADE_OUT) { @@ -321,7 +312,7 @@ void update_sandmouse_hover_movement(struct Moby *moby, struct HoverVars *hover_ bearing_yaw = fast_arc_tan(hover_vars->goal.f[0] - moby->pos.x, hover_vars->goal.f[1] - moby->pos.y); FUN_L00_00258278(moby, - &D_L01_001DEB4C, + &D_L01_001DEB38.move.turn_velocity, bearing_yaw, frame_time_sq * 6.2831855f, frame_time_sq * 3.1415927f, @@ -335,7 +326,7 @@ void update_sandmouse_hover_movement(struct Moby *moby, struct HoverVars *hover_ bearing_yaw = fast_arc_tan(hover_vars->goal.f[0] - moby->pos.x, hover_vars->goal.f[1] - moby->pos.y); FUN_L00_00258278(moby, - &D_L01_001DEB4C, + &D_L01_001DEB38.move.turn_velocity, bearing_yaw, frame_time_sq * 6.2831855f, frame_time_sq * 3.1415927f, @@ -344,7 +335,7 @@ void update_sandmouse_hover_movement(struct Moby *moby, struct HoverVars *hover_ bearing_yaw = fast_arc_tan(hover_vars->target->pos.x - moby->pos.x, hover_vars->target->pos.y - moby->pos.y); FUN_L00_00258278(moby, - &D_L01_001DEB4C, + &D_L01_001DEB38.move.turn_velocity, bearing_yaw, sandmouse_target_yaw_spring_strength_degrees_gp * DEG_TO_RAD * frame_time_sq, @@ -363,12 +354,12 @@ void update_sandmouse_hover_movement(struct Moby *moby, struct HoverVars *hover_ if (moby->state == SANDMOUSE_STATE_FADE_OUT) { clamp_vector_length(&hover_vars->vel, &hover_vars->vel, frame_time * 2.7f); } - hover_tuning = &D_L01_001DEB38; + move_control = &D_L01_001DEB38; hit = move_moby_with_collision_integer_radius(moby, &hover_vars->vel, 1.0f, - hover_tuning->ground_probe_depth, - hover_tuning->collision_radius_1024ths, + move_control->move.ground_probe_depth, + move_control->move.collision_radius_1024ths, 0); velocity_magnitude = fast_vec_length(&hover_vars->vel); if (hit == 0) { @@ -395,9 +386,10 @@ void update_sandmouse_hover_movement(struct Moby *moby, struct HoverVars *hover_ } break; } - hover_tuning = &D_L01_001DEB38; - moby->rot.x += (normalize_angle(hover_tuning->yaw_speed * D_L01_001620D0) - moby->rot.x) * - sandmouse_hover_rotation_x_blend_factor_gp; + move_control = &D_L01_001DEB38; + moby->rot.x += + (normalize_angle(move_control->move.turn_velocity * D_L01_001620D0) - moby->rot.x) * + sandmouse_hover_rotation_x_blend_factor_gp; moby->rot.y += (normalize_angle(fast_vec_length(&hover_vars->vel) * sandmouse_hover_velocity_to_rotation_y_scale_gp) - moby->rot.y) * @@ -500,7 +492,7 @@ typedef struct { extern char voice_pool_lui[] __asm__("D_0013E550") NOT_SDA; extern struct Moby *D_L01_001742D8 NOT_SDA; extern LevelSaveState l01_save_state_lui __asm__("D_L01_001BB6B0") NOT_SDA; -extern struct HoverTuning D_L01_001DEB38_lui __asm__("D_L01_001DEB38") NOT_SDA; +extern struct SandmouseMoveControl D_L01_001DEB38_lui __asm__("D_L01_001DEB38") NOT_SDA; extern char *D_L01_0015FFD8; extern char *D_L01_00167280 NOT_SDA; extern char D_0013F350[] NOT_SDA; @@ -531,7 +523,6 @@ extern void set_hero_animation(f32, int, int) __asm__("FUN_L extern void FUN_L00_00258278_df40(void *, f32, void *, f32, f32, f32) __asm__("FUN_L00_00258278"); extern void jet_animate(void *, f32) __asm__("FUN_L00_00259fe8"); extern void add_random_offset_to_vector_xyz(void *, f32) __asm__("FUN_L00_0025f8e0"); -extern void FUN_L01_0026d930(void *); extern void compute_sand_mouse_approach_target(void *, void *) __asm__("FUN_L01_002e30b8"); extern void blend_moby_animation(void *, s32, s32, s32) __asm__("FUN_00212f90"); void compute_sandmouse_follow_goal(void *unused, float *p) __asm__("FUN_L01_0030d260"); @@ -612,22 +603,22 @@ void sandmouse_update(Moby *sandmouse_moby) { } qcopy(&sandmouse_vars->a20, &sandmouse_moby->pos); qcopy(&sandmouse_vars->a30, &sandmouse_moby->pos); - FUN_L01_0026d930(&D_L01_001DEB38_lui); - D_L01_001DEB38_lui.collision_radius_1024ths = 500; - D_L01_001DEB38_lui.max_drop = 0.15f; - D_L01_001DEB38_lui.max_climb = 0.15f; - D_L01_001DEB38_lui.yaw_speed = frame_scale * 0.4f; - D_L01_001DEB38_lui.speed = frame_scale * 0.01f; - D_L01_001DEB38_lui.max_speed = frame_time * 2.7f; - D_L01_001DEB38_lui.acceleration = frame_scale * 0.01f; - D_L01_001DEB38_lui.step_height = 0.3f; - D_L01_001DEB38_lui.ground_probe_depth = 0.005f; - D_L01_001DEB38_lui.movement_option_flags |= 8; - D_L01_001DEB38_lui.turn_spring = frame_time_sq * 6.2831855f; - D_L01_001DEB38_lui.turn_damping = frame_time_sq * 3.1415927f; - D_L01_001DEB38_lui.max_turn_step = frame_time * 11.519173f; - D_L01_001DEB38_lui.move_timer = scale_game_frames(4); - D_L01_001DEB38_lui.heading_tolerance = 3.1415927f; + init_ground_move_control(&D_L01_001DEB38_lui.move); + D_L01_001DEB38_lui.move.collision_radius_1024ths = 500; + D_L01_001DEB38_lui.move.max_drop = 0.15f; + D_L01_001DEB38_lui.move.max_climb = 0.15f; + D_L01_001DEB38_lui.move.turn_velocity = frame_scale * 0.4f; + D_L01_001DEB38_lui.move.speed = frame_scale * 0.01f; + D_L01_001DEB38_lui.move.max_speed = frame_time * 2.7f; + D_L01_001DEB38_lui.move.acceleration = frame_scale * 0.01f; + D_L01_001DEB38_lui.move.step_height = 0.3f; + D_L01_001DEB38_lui.move.ground_probe_depth = 0.005f; + D_L01_001DEB38_lui.move.movement_option_flags |= 8; + D_L01_001DEB38_lui.move.turn_spring = frame_time_sq * 6.2831855f; + D_L01_001DEB38_lui.move.turn_damping = frame_time_sq * 3.1415927f; + D_L01_001DEB38_lui.move.max_turn_step = frame_time * 11.519173f; + D_L01_001DEB38_lui.move.move_timer = scale_game_frames(4); + D_L01_001DEB38_lui.move.heading_tolerance = 3.1415927f; sandmouse_moby->state = SANDMOUSE_STATE_WAIT_FOR_ACTIVATION; sandmouse_moby->draw_dist = 0; break; @@ -664,7 +655,7 @@ void sandmouse_update(Moby *sandmouse_moby) { *(f32 *)(hero_bytes + 0x84) - sandmouse_moby->pos.y); FUN_L00_00258278_df40(sandmouse_moby, angle_to_hero, - &D_L01_001DEB4C, + &D_L01_001DEB38.move.turn_velocity, frame_time_sq * 6.2831855f, frame_time_sq * 3.1415927f, frame_time * 11.519173f); @@ -736,7 +727,7 @@ void sandmouse_update(Moby *sandmouse_moby) { } if (0.6f < vector_distance_xy(&sandmouse_moby->pos, &sandmouse_vars->a30) && sandmouse_vars->timer == 0) { - D_L01_001DEB38_lui.step_height = 0.7f; + D_L01_001DEB38_lui.move.step_height = 0.7f; compute_sandmouse_follow_goal(sandmouse_moby, sandmouse_vars); update_sandmouse_hover_movement(sandmouse_moby, (struct HoverVars *)sandmouse_vars); movement_result_flags = sandmouse_vars->stuck < 0x15; @@ -747,7 +738,7 @@ void sandmouse_update(Moby *sandmouse_moby) { sandmouse_vars->goal.f[1] - sandmouse_moby->pos.y); FUN_L00_00258278_df40(sandmouse_moby, goal_bearing_yaw, - &D_L01_001DEB38_lui.yaw_speed, + &D_L01_001DEB38_lui.move.turn_velocity, frame_time_sq * 6.2831855f, frame_time_sq * 3.1415927f, frame_time * 11.519173f); @@ -905,7 +896,7 @@ void sandmouse_update(Moby *sandmouse_moby) { sandmouse_vars->goal.f[1] - sandmouse_moby->pos.y); FUN_L00_00258278_df40(sandmouse_moby, goal_bearing_yaw, - &D_L01_001DEB38_lui.yaw_speed, + &D_L01_001DEB38_lui.move.turn_velocity, frame_time_sq * 6.2831855f, frame_time_sq * 3.1415927f, frame_time * 11.519173f); diff --git a/src/overlays/shared/enemies/seeker.c b/src/overlays/shared/enemies/seeker.c index 9ed268b143..0729355053 100644 --- a/src/overlays/shared/enemies/seeker.c +++ b/src/overlays/shared/enemies/seeker.c @@ -16,6 +16,7 @@ #include "rnc/overlay/shared/mobys/step_moby_motion.h" #include "rnc/mobys/animation/blend_moby_animation.h" #include "rnc/mobys/resolve_moby_hit_response.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" /* Per-instance variables of the oClass 52 moby (moby->pvars). */ enum { @@ -30,37 +31,32 @@ enum { }; typedef struct { - u8 pad0[0x20]; - f32 health; - s16 unk24; - u8 pad26[2]; - u8 unk28; - u8 pad29[0x2F]; - u8 unk58; - u8 pad59; - u8 unk5A; - u8 pad5B[0x15]; - Vec4 vel; - u8 pad80[0x50]; - s32 move_control; - u8 padD4[4]; - f32 move_max_drop; - f32 move_max_climb; - u8 padE0[0x14]; - f32 speed; - u8 padF8[0x68]; - struct Moby *target; - s32 target_selection_status; - u8 pad168[0x18]; - s32 bound_path; - s32 timer; - u8 pad188[4]; - f32 heading_speed; - u8 pad190[4]; - s32 voice; - s32 moving; - u8 pad19C[0xE4]; - u8 unk280[1]; + u8 pad0[0x20]; + f32 health; + s16 unk24; + u8 pad26[2]; + u8 unk28; + u8 pad29[0x2F]; + u8 unk58; + u8 pad59; + u8 unk5A; + u8 pad5B[0x15]; + Vec4 vel; + u8 pad80[0x50]; + struct GroundMoveControl move_control; /* 0xD0 */ + u8 pad120[0x40]; + struct Moby *target; + s32 target_selection_status; + u8 pad168[0x18]; + s32 bound_path; + s32 timer; + u8 pad188[4]; + f32 heading_speed; + u8 pad190[4]; + s32 voice; + s32 moving; + u8 pad19C[0xE4]; + u8 unk280[1]; } Moby52Vars; #include "rnc/overlay/shared/enemies/seeker_globals.h" @@ -96,7 +92,6 @@ extern void spawn_explosion(struct Moby *, s32, s32) __asm__("FUN_L00_0025e450"); extern void FUN_L00_00263ac8(struct Moby *, s32, void *, f32); -extern void FUN_L01_0026d930(void *); extern void FUN_L01_0026e090(s32, s32); extern void update_seeker_damage_and_target(struct Moby *) __asm__("FUN_L09_002c6230"); @@ -142,11 +137,11 @@ void seeker_update(struct Moby *moby) { mark_moby_for_removal(moby); break; } - FUN_L01_0026d930(&seeker_instance_vars->move_control); - seeker_instance_vars->move_max_climb = 0.5f; - seeker_instance_vars->move_max_drop = 0.5f; - seeker_instance_vars->move_control = truncate_float_to_s32(512.0f); - seeker_instance_vars->speed = frame_time * 7.75f; + init_ground_move_control(&seeker_instance_vars->move_control); + seeker_instance_vars->move_control.max_climb = 0.5f; + seeker_instance_vars->move_control.max_drop = 0.5f; + seeker_instance_vars->move_control.collision_radius_1024ths = truncate_float_to_s32(512.0f); + seeker_instance_vars->move_control.max_speed = frame_time * 7.75f; moby->state = SEEKER_STATE_IDLE_HOVER; if (moby->prev_seq != 1) { blend_moby_animation(moby, 1, 0, scale_game_frames(10)); @@ -217,8 +212,8 @@ void seeker_update(struct Moby *moby) { seeker_instance_vars->moving = 0; } if (seeker_instance_vars->moving != 0) { - vel.f[0] = fast_cos(moby->rot.z) * seeker_instance_vars->speed; - vel.f[1] = fast_sin(moby->rot.z) * seeker_instance_vars->speed; + vel.f[0] = fast_cos(moby->rot.z) * seeker_instance_vars->move_control.max_speed; + vel.f[1] = fast_sin(moby->rot.z) * seeker_instance_vars->move_control.max_speed; vel.f[2] = 0.0f; vertical_follow_adjustment = hero.motion.pos.f[2] + 0.8f - z; if (moby->pos.z < hero.motion.pos.f[2] + 0.8f) { diff --git a/src/overlays/shared/math/interpolation/spring_turn.c b/src/overlays/shared/math/interpolation/spring_turn.c index c80a058e69..d55bbafbe5 100644 --- a/src/overlays/shared/math/interpolation/spring_turn.c +++ b/src/overlays/shared/math/interpolation/spring_turn.c @@ -426,26 +426,7 @@ void move_moby_with_collision_integer_radius(int moby, } #include "rnc/math/vector.h" - -typedef struct { - s32 collision_radius_1024ths; - f32 step_height; - f32 max_drop; - f32 max_climb; - f32 speed; - f32 turn_step; - f32 vertical_velocity; - f32 acceleration; - f32 brake; - f32 max_speed; - f32 heading_tolerance; - f32 arrive_distance; - f32 ground_probe_depth; - f32 unk34; - s32 movement_option_flags; - u8 pad3C[0x4C - 0x3C]; - f32 move_heading; -} Ctl; +#include "rnc/overlay/shared/mobys/ground_move_control.h" typedef struct { u8 pad00[0x10]; @@ -468,11 +449,12 @@ extern s32 FUN_L00_002583f0_c(void *, void *, s32, f32, f32) __asm__("FUN_L00_00 extern s32 FUN_L00_00258ad0_c(void *, void *, f32, s32, f32, s32) __asm__("FUN_L00_00258ad0"); extern f32 frame_time_sq_gp __asm__("D_0015ED70") __attribute__((sda)); -s32 move_moby_with_ground_and_collision_checks(Obj *m, Ctl *c, void *v, Vec4 *out, f32 f) __asm__("FUN_L00_00258b50"); +s32 move_moby_with_ground_and_collision_checks( + Obj *m, struct GroundMoveControl *c, void *v, Vec4 *out, f32 f) __asm__("FUN_L00_00258b50"); -s32 move_moby_with_ground_and_collision_checks(Obj *moby, - Ctl *movement_control, - void *target_position, +s32 move_moby_with_ground_and_collision_checks(Obj *moby, + struct GroundMoveControl *movement_control, + void *target_position, Vec4 *movement_displacement_vector_output, f32 f) { @@ -603,41 +585,44 @@ s32 move_moby_with_ground_and_collision_checks(Obj *moby, } void approach_w(unsigned char *, float *, float, float, float, float) __asm__("FUN_L00_00258278"); -int move_w(unsigned char *, char *, float *, void *, float) __asm__("FUN_L00_00258b50"); -int step_mover_2e3f20(unsigned char *m, char *c, float *tgt, void *out) __asm__("FUN_L00_00259028"); -int step_mover_2e3f20(unsigned char *moby, - char *movement_control, - float *target_position, +int move_w(unsigned char *, struct GroundMoveControl *, float *, void *, float) __asm__("FUN_L00_00258b50"); +int step_mover_2e3f20(unsigned char *m, + struct GroundMoveControl *c, + float *tgt, + void *out) __asm__("FUN_L00_00259028"); +int step_mover_2e3f20(unsigned char *moby, + struct GroundMoveControl *movement_control, + float *target_position, void *movement_displacement_output) { int navigation_result_flags = 0; float target_heading, heading_error; clear_u64_value(movement_displacement_output); - if (fast_vec_dist(&MOBY(moby)->pos, target_position) < *(float *)(movement_control + 0x2C)) + if (fast_vec_dist(&MOBY(moby)->pos, target_position) < movement_control->arrive_distance) navigation_result_flags = 4; target_heading = fast_arc_tan(target_position[0] - MOBY(moby)->pos.x, target_position[1] - MOBY(moby)->pos.y); approach_w(moby, - (float *)(movement_control + 0x14), + &movement_control->turn_velocity, target_heading, - *(float *)(movement_control + 0x3C), - *(float *)(movement_control + 0x40), - *(float *)(movement_control + 0x44)); + movement_control->turn_spring, + movement_control->turn_damping, + movement_control->max_turn_step); heading_error = fast_difference_between_rotations(target_heading, MOBY(moby)->rot.z); - if (*(float *)(movement_control + 0x28) <= heading_error) + if (movement_control->heading_tolerance <= heading_error) navigation_result_flags |= 0x10; - fast_dec_timer(movement_control + 0x48); - if (heading_error < *(float *)(movement_control + 0x28) && - *(int *)(movement_control + 0x48) < scale_game_frames(4)) { - *(int *)(movement_control + 0x48) = scale_game_frames(4); + fast_dec_timer(&movement_control->move_timer); + if (heading_error < movement_control->heading_tolerance && + movement_control->move_timer < scale_game_frames(4)) { + movement_control->move_timer = scale_game_frames(4); } - if (*(int *)(movement_control + 0x48) != 0) { + if (movement_control->move_timer != 0) { navigation_result_flags |= move_w(moby, movement_control, target_position, movement_displacement_output, - (*(float *)(movement_control + 0x28) - heading_error) / - *(float *)(movement_control + 0x28)); + (movement_control->heading_tolerance - heading_error) / + movement_control->heading_tolerance); if (0.1f < heading_error) navigation_result_flags &= ~2; } diff --git a/src/overlays/shared/mobys/count_active_moby_group_members.c b/src/overlays/shared/mobys/count_active_moby_group_members.c index c382efc519..d687b5982f 100644 --- a/src/overlays/shared/mobys/count_active_moby_group_members.c +++ b/src/overlays/shared/mobys/count_active_moby_group_members.c @@ -2,24 +2,24 @@ #include "types.h" #include "asm.h" #include "rnc/overlay/shared/world/level_labels.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" /* Ported from rac1-decomp (src/overlays/shared/mobyutil_0026E8E0.c: func_L01_0026E8E0), where it is exact; names translated to the US level program. */ -void FUN_L01_0026d930(char *p); - -void FUN_L01_0026d930(char *destination) { - *(int *)(destination + 0x0) = 0x280; - *(float *)(destination + 0x4) = 1.0f; - *(float *)(destination + 0x8) = 0.5f; - *(float *)(destination + 0xC) = 0.5f; - *(int *)(destination + 0x14) = 0; - *(int *)(destination + 0x10) = 0; - *(int *)(destination + 0x18) = 0; - *(float *)(destination + 0x24) = 2.7f; - *(float *)(destination + 0x20) = 0.3f; - *(float *)(destination + 0x1C) = 0.3f; - *(float *)(destination + 0x28) = 1.57f; - *(float *)(destination + 0x2C) = 0.1f; +/* Sets the default ground movement tuning: radius 0.625, small steps and turns. */ +void init_ground_move_control(struct GroundMoveControl *control) { + control->collision_radius_1024ths = 0x280; + control->step_height = 1.0f; + control->max_drop = 0.5f; + control->max_climb = 0.5f; + control->turn_velocity = 0.0f; + control->speed = 0.0f; + control->vertical_velocity = 0.0f; + control->max_speed = 2.7f; + control->brake = 0.3f; + control->acceleration = 0.3f; + control->heading_tolerance = 1.57f; + control->arrive_distance = 0.1f; } #include "sda.h" From bf837cbe3728c55db5d636d5369bc0a318c34184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:32:20 +0000 Subject: [PATCH 047/213] decomp: share the knockback motion block of enemies --- .../overlay/shared/mobys/knockback_motion.h | 36 +++ src/overlays/l00/mobys/veldin_robot_enemy.c | 126 +++++----- src/overlays/l01/mobys/birdbot.c | 230 +++++++++--------- src/overlays/l02/mobys/constructorbot.c | 82 +++---- src/overlays/l02/mobys/sand_shark.c | 134 +++++----- src/overlays/l04/mobys/big_axebot.c | 144 +++++------ src/overlays/l05/mobys/extermibot.c | 132 +++++----- src/overlays/l11/mobys/psytcopus.c | 128 +++++----- src/overlays/l11/mobys/puffoid.c | 222 ++++++++--------- src/overlays/l18/mobys/gadgebot.c | 74 +++--- .../shared/enemies/blarg_paratrooper.c | 70 +++--- src/overlays/shared/enemies/frog.c | 120 +++++---- src/overlays/shared/enemies/large_amoeboid.c | 26 +- src/overlays/shared/mobys/step_moby_motion.c | 214 ++++++++-------- 14 files changed, 817 insertions(+), 921 deletions(-) create mode 100644 include/rnc/overlay/shared/mobys/knockback_motion.h diff --git a/include/rnc/overlay/shared/mobys/knockback_motion.h b/include/rnc/overlay/shared/mobys/knockback_motion.h new file mode 100644 index 0000000000..2e003dc4b4 --- /dev/null +++ b/include/rnc/overlay/shared/mobys/knockback_motion.h @@ -0,0 +1,36 @@ +#ifndef LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_KNOCKBACK_MOTION_H +#define LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_KNOCKBACK_MOTION_H + +#include "types.h" + +/* Ballistic motion of a knocked-back enemy (usually at pvars + 0x70). + * trooper_start_knockback (FUN_L00_0025c558) launches it and + * step_moby_motion (FUN_L00_0025c698) moves the moby along it each frame. */ +struct KnockbackMotion { + f32 velocity[4]; /* 0x00: added to pos each step; [2] loses gravity */ + f32 gravity; /* 0x10: per step; scaled by 0.75 after each bounce */ + f32 speed_approach_step; /* 0x14: horizontal speed moves toward target_speed by it */ + f32 speed; /* 0x18: horizontal launch speed */ + f32 vertical_speed; /* 0x1C: launch vertical speed, also the upward cap */ + s32 collision_radius_1024ths; /* 0x20 */ + s32 flags; /* 0x24: 2 blend ex, 4 no turn, 0x10, 0x20 no collision */ + f32 collision_z_offset; /* 0x28: collision sphere height above pos */ + s16 timer; /* 0x2C: 300 frames at launch */ + u8 particle_mode; /* 0x2E: 1 spawns shape point particles */ + u8 particle_count; /* 0x2F */ + f32 restitution; /* 0x30: bounce off steep walls */ + u8 pad34[8]; + u8 active; /* 0x3C: set at launch */ + u8 unk3D; /* cleared when the hit reaction is set up */ + s16 phase; /* 0x3E: 0 rising, 1 falling, 2 grounded */ + f32 turn_target; /* 0x40: launch angle + pi, spring_turn target */ + f32 turn_velocity; /* 0x44 */ + f32 max_turn_step; /* 0x48 */ + f32 target_speed; /* 0x4C: horizontal speed while airborne */ + f32 apex_animation_frame; /* 0x50: -1 for none */ + f32 landing_animation_frame; /* 0x54: -1 for none */ + u8 pad58[4]; + f32 ground_bounces; /* 0x5C: counts bounces after first touching the ground */ +}; + +#endif /* LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_KNOCKBACK_MOTION_H */ diff --git a/src/overlays/l00/mobys/veldin_robot_enemy.c b/src/overlays/l00/mobys/veldin_robot_enemy.c index 690d597dff..eba46d4dc2 100644 --- a/src/overlays/l00/mobys/veldin_robot_enemy.c +++ b/src/overlays/l00/mobys/veldin_robot_enemy.c @@ -25,6 +25,7 @@ #include "qcopy.h" #include "rnc/overlay/shared/world/collision.h" #include "rnc/overlay/l00/mobys/veldin_robot_enemy_globals.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" enum { VELDIN_ROBOT_STATE_INITIALIZE = 0, @@ -52,54 +53,40 @@ typedef struct { typedef struct ElectroidMoby ElectroidMoby; typedef struct { - u8 pad0[0x20]; - f32 health; - s16 unk24; - s16 unk26; - u8 hit_response_class; - u8 unk29; - u8 pad2A[0x38 - 0x2A]; - s32 retimer; - u8 pad3C[0x58 - 0x3C]; - u8 unk58; - u8 pad59; - u8 unk5A; - u8 pad5B[0x60 - 0x5B]; - u8 move[7]; - u8 damage_secondary_red; - u8 pad68[8]; - u8 motion[0x10]; - f32 knockback_gravity; - f32 knockback_xy_speed_step; - f32 knockback_speed; - f32 knockback_vertical_speed; - s32 knockback_collision_radius; - s32 unk94; - f32 knockback_collision_z_offset; - u8 pad9C[0xAD - 0x9C]; - u8 unkAD; - u8 padAE[0xBC - 0xAE]; - f32 unkBC; - f32 knockback_apex_animation_frame; - f32 knockback_landing_animation_frame; - u8 padC8[8]; - ElectroidVec targetPos; - u8 padE0[0x110 - 0xE0]; - ElectroidMoby *target; - s32 target_selection_status; - u8 pad118[0x120 - 0x118]; - u8 manipulator[0x1A0 - 0x120]; - u128 spawnPos; - u8 pad1B0[4]; - s32 targeting_path_index; - s32 pathIdx; - s32 candidate_target_moby_index; - u8 pad1C0[0x1D0 - 0x1C0]; - f32 turnVel; - f32 speed; - s16 timer; - s16 extended_range_timer; - s32 pathPt; + u8 pad0[0x20]; + f32 health; + s16 unk24; + s16 unk26; + u8 hit_response_class; + u8 unk29; + u8 pad2A[0x38 - 0x2A]; + s32 retimer; + u8 pad3C[0x58 - 0x3C]; + u8 unk58; + u8 pad59; + u8 unk5A; + u8 pad5B[0x60 - 0x5B]; + u8 move[7]; + u8 damage_secondary_red; + u8 pad68[8]; + struct KnockbackMotion knockback; /* 0x70 */ + ElectroidVec targetPos; + u8 padE0[0x110 - 0xE0]; + ElectroidMoby *target; + s32 target_selection_status; + u8 pad118[0x120 - 0x118]; + u8 manipulator[0x1A0 - 0x120]; + u128 spawnPos; + u8 pad1B0[4]; + s32 targeting_path_index; + s32 pathIdx; + s32 candidate_target_moby_index; + u8 pad1C0[0x1D0 - 0x1C0]; + f32 turnVel; + f32 speed; + s16 timer; + s16 extended_range_timer; + s32 pathPt; } ElectroidVars; struct ElectroidMoby { @@ -375,13 +362,13 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { } break; case VELDIN_ROBOT_STATE_DAMAGE_KNOCKBACK: - if (step_moby_motion(moby, vars->motion) & 0x140) { + if (step_moby_motion(moby, &vars->knockback) & 0x140) { moby->state = VELDIN_ROBOT_STATE_FACE_TARGET; ELECTROID_ANIM(moby, 1, scale_game_frames_s32(10)); } break; case VELDIN_ROBOT_STATE_DEATH_KNOCKBACK: - if (step_moby_motion(moby, vars->motion) & 0x140) { + if (step_moby_motion(moby, &vars->knockback) & 0x140) { cart_burst(moby, &moby->pos, -1, 0.75f, 13.0f); spawn_moby_break_fragments(moby, 0x7AB, 1, 0x7AB, 1, 4, 0); FUN_L00_00263fd8(moby, @@ -476,38 +463,39 @@ void update_veldin_robot_damage_and_targeting(ElectroidMoby *moby) { hit_reaction(moby, coll, &vars->health, 0, &hit, &dmg, 0, 4); if (hit != 1 && moby->state != VELDIN_ROBOT_STATE_DEATH_KNOCKBACK && dmg != 0.0f) { vars->health -= dmg; - vars->knockback_collision_radius = 0x200; - vars->knockback_gravity = veldin_robot_knockback_gravity_gp * frame_time_sq; - vars->knockback_xy_speed_step = veldin_robot_knockback_xy_speed_step_gp * frame_time_sq; - vars->knockback_speed = veldin_robot_knockback_xy_scale_gp * frame_time; - vars->knockback_vertical_speed = veldin_robot_knockback_z_scale_gp * frame_time; - vars->unkAD = 0; - vars->unk94 = 9; - vars->unkBC = frame_time + frame_time; - vars->knockback_collision_z_offset = 0.5f; + vars->knockback.collision_radius_1024ths = 0x200; + vars->knockback.gravity = veldin_robot_knockback_gravity_gp * frame_time_sq; + vars->knockback.speed_approach_step = + veldin_robot_knockback_xy_speed_step_gp * frame_time_sq; + vars->knockback.speed = veldin_robot_knockback_xy_scale_gp * frame_time; + vars->knockback.vertical_speed = veldin_robot_knockback_z_scale_gp * frame_time; + vars->knockback.unk3D = 0; + vars->knockback.flags = 9; + vars->knockback.target_speed = frame_time + frame_time; + vars->knockback.collision_z_offset = 0.5f; if (vars->health <= 0.0f) { - vars->unk94 = 0x29; + vars->knockback.flags = 0x29; moby->flags &= ~0x1000; hit_position.q = coll->pos.q; trooper_knockback_arc( - &hit_position, &angle, &vars->knockback_speed, &vars->knockback_vertical_speed); - trooper_start_knockback(moby, vars->motion, 0xB, 1, 0, angle); - vars->knockback_apex_animation_frame = 7.0f; - vars->knockback_landing_animation_frame = 16.0f; + &hit_position, &angle, &vars->knockback.speed, &vars->knockback.vertical_speed); + trooper_start_knockback(moby, &vars->knockback, 0xB, 1, 0, angle); + vars->knockback.apex_animation_frame = 7.0f; + vars->knockback.landing_animation_frame = 16.0f; moby->state = VELDIN_ROBOT_STATE_DEATH_KNOCKBACK; moby->collision = 0; vars->damage_secondary_red = 0x78; trooper_anim_update(moby, anim); FUN_L00_00257470(moby, 0, -1); } else { - vars->knockback_speed = veldin_robot_knockback_xy_scale_gp * frame_time * 0.35f; - vars->knockback_vertical_speed = veldin_robot_knockback_z_scale_gp * frame_time * 0.5f; + vars->knockback.speed = veldin_robot_knockback_xy_scale_gp * frame_time * 0.35f; + vars->knockback.vertical_speed = veldin_robot_knockback_z_scale_gp * frame_time * 0.5f; hit_position.q = coll->pos.q; trooper_knockback_arc( - &hit_position, &unused, &vars->knockback_speed, &vars->knockback_vertical_speed); + &hit_position, &unused, &vars->knockback.speed, &vars->knockback.vertical_speed); trooper_start_knockback( - moby, vars->motion, 8, 1, 0, fast_arc_tan(coll->pos.f[0], coll->pos.f[1])); - vars->knockback_landing_animation_frame = vars->knockback_apex_animation_frame = -1.0f; + moby, &vars->knockback, 8, 1, 0, fast_arc_tan(coll->pos.f[0], coll->pos.f[1])); + vars->knockback.landing_animation_frame = vars->knockback.apex_animation_frame = -1.0f; moby->state = VELDIN_ROBOT_STATE_DAMAGE_KNOCKBACK; vars->damage_secondary_red = 0xFA; vars->unk26 = scale_game_frames(0x3C); diff --git a/src/overlays/l01/mobys/birdbot.c b/src/overlays/l01/mobys/birdbot.c index c15b71c270..02330c282a 100644 --- a/src/overlays/l01/mobys/birdbot.c +++ b/src/overlays/l01/mobys/birdbot.c @@ -2,6 +2,7 @@ #include "types.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "sda.h" #include "rnc/math/asm_helpers.h" @@ -296,83 +297,70 @@ typedef struct { } PeCursor; typedef struct { - char pad0[0x20]; - float f20; - short initial_health; - short hit_reaction_cooldown; - unsigned char hit_response_profile_index; - unsigned char b29; - char pad2A[0xE]; - int w38; - char pad3C[4]; - Vec4 v40; - char pad50[8]; - unsigned char b58; - char pad59; - unsigned char b5A; - char pad5B[5]; - char x60[7]; - unsigned char b67; - char pad68[8]; - char x70[0x10]; - float knockback_gravity_step; - float f84; - float knockback_horizontal_launch_step; - float knockback_vertical_launch_step; - int w90; - int w94; - float knockback_collision_height_offset; - char pad9C[0x11]; - unsigned char bAD; - char padAE[0x12]; - float knockback_animation_target_frame; - float knockback_animation_stop_frame; - char padC8[8]; - char xD0[8]; - float fD8; - float fDC; - char padE0[8]; - float fall_motion_step; - float fEC; - char padF0[4]; - float fF4; - char padF8[0x14]; - float f10C; - float f110; - float f114; - char pad118[8]; - PeCursor side; - char pad138[0x18]; - PeCursor main; - char pad168[0x18]; - Vec4 projectile_aim_point; - int firing_retry_timer; - float yaw_turn_step; - float projectile_aim_distance; - char pad19C[4]; - float combat_target_radius; - short burst_shots_fired; - short steering_path_node_index; - float deployment_trigger_radius; - short ordered_path_traversal; - short path_has_stop_nodes; - char pad1B0[4]; - int skip_initial_height_lift; - float path_movement_step_length; - float pitch_turn_step; - int deployment_trigger_volume_index; - int deployment_mount_cuboid_index; - int mount_release_timer; - float previous_animation_frame; - Vec4 deployment_motion_delta; - unsigned short h1E0; - short h1E2; - int deployment_destination_cuboid_index; - int deployment_trigger_override; - short deployment_vertical_steering_timer; - short skip_path_braking; - char pad1F0[0x10]; - unsigned char x200[1]; + char pad0[0x20]; + float f20; + short initial_health; + short hit_reaction_cooldown; + unsigned char hit_response_profile_index; + unsigned char b29; + char pad2A[0xE]; + int w38; + char pad3C[4]; + Vec4 v40; + char pad50[8]; + unsigned char b58; + char pad59; + unsigned char b5A; + char pad5B[5]; + char x60[7]; + unsigned char b67; + char pad68[8]; + struct KnockbackMotion knockback; /* 0x70 */ + char xD0[8]; + float fD8; + float fDC; + char padE0[8]; + float fall_motion_step; + float fEC; + char padF0[4]; + float fF4; + char padF8[0x14]; + float f10C; + float f110; + float f114; + char pad118[8]; + PeCursor side; + char pad138[0x18]; + PeCursor main; + char pad168[0x18]; + Vec4 projectile_aim_point; + int firing_retry_timer; + float yaw_turn_step; + float projectile_aim_distance; + char pad19C[4]; + float combat_target_radius; + short burst_shots_fired; + short steering_path_node_index; + float deployment_trigger_radius; + short ordered_path_traversal; + short path_has_stop_nodes; + char pad1B0[4]; + int skip_initial_height_lift; + float path_movement_step_length; + float pitch_turn_step; + int deployment_trigger_volume_index; + int deployment_mount_cuboid_index; + int mount_release_timer; + float previous_animation_frame; + Vec4 deployment_motion_delta; + unsigned short h1E0; + short h1E2; + int deployment_destination_cuboid_index; + int deployment_trigger_override; + short deployment_vertical_steering_timer; + short skip_path_braking; + char pad1F0[0x10]; + unsigned char x200[1]; } PeVars; typedef struct PeMoby { @@ -587,23 +575,27 @@ void birdbot_update(PeMoby *birdbot_moby) { break; case BIRDBOT_HIT_REACTION_FATAL_KNOCKBACK: case BIRDBOT_HIT_REACTION_FORCE_FATAL_KNOCKBACK: - birdbot_vars->knockback_collision_height_offset = 0.3f; - birdbot_vars->f84 = frame_time_sq * 10.0f; - birdbot_vars->knockback_gravity_step = frame_time_sq * 40.0f; - birdbot_vars->knockback_horizontal_launch_step = - square_root(birdbot_vars->f84 * 2.0f * 10.0f); - birdbot_vars->knockback_vertical_launch_step = frame_time * 15.0f; - birdbot_vars->knockback_animation_target_frame = 5.0f; - birdbot_vars->knockback_animation_stop_frame = 10.0f; - birdbot_vars->w94 = 1; - birdbot_vars->bAD = 0; + birdbot_vars->knockback.collision_z_offset = 0.3f; + birdbot_vars->knockback.speed_approach_step = frame_time_sq * 10.0f; + birdbot_vars->knockback.gravity = frame_time_sq * 40.0f; + birdbot_vars->knockback.speed = + square_root(birdbot_vars->knockback.speed_approach_step * 2.0f * 10.0f); + birdbot_vars->knockback.vertical_speed = frame_time * 15.0f; + birdbot_vars->knockback.apex_animation_frame = 5.0f; + birdbot_vars->knockback.landing_animation_frame = 10.0f; + birdbot_vars->knockback.flags = 1; + birdbot_vars->knockback.unk3D = 0; *(u128 *)&va = *(u128 *)&hit->pos; trooper_knockback_arc(&va, &knockback_heading, - &birdbot_vars->knockback_horizontal_launch_step, - &birdbot_vars->knockback_vertical_launch_step); - FUN_L00_0025c558_u( - knockback_heading, birdbot_moby, birdbot_vars->x70, 9, scale_game_frames(2), 0); + &birdbot_vars->knockback.speed, + &birdbot_vars->knockback.vertical_speed); + FUN_L00_0025c558_u(knockback_heading, + birdbot_moby, + &birdbot_vars->knockback, + 9, + scale_game_frames(2), + 0); birdbot_vars->b67 = 0xB4; birdbot_moby->state = BIRDBOT_STATE_FATAL_KNOCKBACK; birdbot_moby->h34 &= 0xEFFF; @@ -612,23 +604,24 @@ void birdbot_update(PeMoby *birdbot_moby) { break; case BIRDBOT_HIT_REACTION_NONFATAL_KNOCKBACK: case BIRDBOT_HIT_REACTION_ANIMATED_NONFATAL_KNOCKBACK: - birdbot_vars->w90 = 0x200; + birdbot_vars->knockback.collision_radius_1024ths = 0x200; birdbot_vars->b67 = 0x78; - birdbot_vars->knockback_collision_height_offset = 0.5f; - birdbot_vars->knockback_gravity_step = 0.008f; - birdbot_vars->knockback_horizontal_launch_step = - square_root(birdbot_vars->f84 * 2.0f * 1.5f); - birdbot_vars->w94 = 1; - birdbot_vars->knockback_animation_target_frame = 5.0f; - birdbot_vars->knockback_vertical_launch_step = frame_time * 8.5f; - birdbot_vars->knockback_animation_stop_frame = 10.0f; - birdbot_vars->bAD = 0; + birdbot_vars->knockback.collision_z_offset = 0.5f; + birdbot_vars->knockback.gravity = 0.008f; + birdbot_vars->knockback.speed = + square_root(birdbot_vars->knockback.speed_approach_step * 2.0f * 1.5f); + birdbot_vars->knockback.flags = 1; + birdbot_vars->knockback.apex_animation_frame = 5.0f; + birdbot_vars->knockback.vertical_speed = frame_time * 8.5f; + birdbot_vars->knockback.landing_animation_frame = 10.0f; + birdbot_vars->knockback.unk3D = 0; *(u128 *)&va = *(u128 *)&hit->pos; trooper_knockback_arc(&va, &knockback_heading, - &birdbot_vars->knockback_horizontal_launch_step, - &birdbot_vars->knockback_vertical_launch_step); - FUN_L00_0025c558_u(knockback_heading, birdbot_moby, birdbot_vars->x70, 0xC, 6, 0); + &birdbot_vars->knockback.speed, + &birdbot_vars->knockback.vertical_speed); + FUN_L00_0025c558_u( + knockback_heading, birdbot_moby, &birdbot_vars->knockback, 0xC, 6, 0); if (birdbot_moby->target_animation_sequence != 0xB) { blend_moby_animation(birdbot_moby, 0xB, 0, scale_game_frames(6)); } @@ -637,22 +630,23 @@ void birdbot_update(PeMoby *birdbot_moby) { break; case BIRDBOT_HIT_REACTION_LOW_SPEED_NONFATAL_KNOCKBACK: case BIRDBOT_HIT_REACTION_LOW_SPEED_NONFATAL_KNOCKBACK_NO_BLEND: - birdbot_vars->w90 = 0x200; + birdbot_vars->knockback.collision_radius_1024ths = 0x200; birdbot_vars->b67 = 0xFA; - birdbot_vars->knockback_gravity_step = 0.008f; - birdbot_vars->knockback_horizontal_launch_step = - square_root(birdbot_vars->f84 * 2.0f * 1.5f); - birdbot_vars->w94 = 1; - birdbot_vars->knockback_vertical_launch_step = frame_time * 5.0f; - birdbot_vars->knockback_animation_target_frame = 7.0f; - birdbot_vars->knockback_animation_stop_frame = 13.5f; - birdbot_vars->bAD = 0; + birdbot_vars->knockback.gravity = 0.008f; + birdbot_vars->knockback.speed = + square_root(birdbot_vars->knockback.speed_approach_step * 2.0f * 1.5f); + birdbot_vars->knockback.flags = 1; + birdbot_vars->knockback.vertical_speed = frame_time * 5.0f; + birdbot_vars->knockback.apex_animation_frame = 7.0f; + birdbot_vars->knockback.landing_animation_frame = 13.5f; + birdbot_vars->knockback.unk3D = 0; *(u128 *)&va = *(u128 *)&hit->pos; trooper_knockback_arc(&va, &knockback_heading, - &birdbot_vars->knockback_horizontal_launch_step, - &birdbot_vars->knockback_vertical_launch_step); - FUN_L00_0025c558_u(knockback_heading, birdbot_moby, birdbot_vars->x70, 0xE, 6, 0); + &birdbot_vars->knockback.speed, + &birdbot_vars->knockback.vertical_speed); + FUN_L00_0025c558_u( + knockback_heading, birdbot_moby, &birdbot_vars->knockback, 0xE, 6, 0); birdbot_moby->state = BIRDBOT_STATE_NONFATAL_KNOCKBACK; trooper_anim_update(birdbot_moby, (short *)birdbot_vars->x60); break; @@ -1175,7 +1169,7 @@ void birdbot_update(PeMoby *birdbot_moby) { (u128 *)&birdbot_position_before_update); break; case BIRDBOT_STATE_NONFATAL_KNOCKBACK: - if (step_moby_motion(birdbot_moby, birdbot_vars->x70) & 0x40) { + if (step_moby_motion(birdbot_moby, &birdbot_vars->knockback) & 0x40) { if (fast_vec_dist(&birdbot_moby->pos, (Vec4 *)birdbot_vars->main.path + (idx + 1)) > 0.25f) { int i; @@ -1224,7 +1218,7 @@ void birdbot_update(PeMoby *birdbot_moby) { break; case BIRDBOT_STATE_FATAL_KNOCKBACK: birdbot_moby->h34 &= 0xEFFF; - if ((step_moby_motion(birdbot_moby, birdbot_vars->x70) & 6) || + if ((step_moby_motion(birdbot_moby, &birdbot_vars->knockback) & 6) || birdbot_moby->pos.f[0] < 2.0f || birdbot_moby->pos.f[0] > 1021.0f || birdbot_moby->pos.f[1] < 2.0f || birdbot_moby->pos.f[1] > 1021.0f || birdbot_moby->pos.f[2] < 2.0f || birdbot_moby->pos.f[2] > 1021.0f) { diff --git a/src/overlays/l02/mobys/constructorbot.c b/src/overlays/l02/mobys/constructorbot.c index ddae7c7b44..b0adbbc2a4 100644 --- a/src/overlays/l02/mobys/constructorbot.c +++ b/src/overlays/l02/mobys/constructorbot.c @@ -12,6 +12,7 @@ #include "qcopy.h" #include "rnc/overlay/shared/world/cuboid.h" #include "rnc/overlay/l02/mobys/constructorbot_globals.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" extern int random_int_between(int, int) __asm__("FUN_L00_00257b90"); @@ -561,31 +562,16 @@ extern int select_moby_target_goal(char *a, char *o, float best) __asm__("FUN_L0 /* pvars of the class FUN_L02_002d85b8 serves (only the fields it touches). */ typedef struct { - char pad0[0x20]; - float hp; /* 0x20 */ - char pad24[0x3C]; - short anim[3]; /* 0x60: passed to trooper_anim_update / trooper_anim_finish */ - unsigned char pad66; - unsigned char flash; /* 0x67 */ - char pad68[8]; - char knock[0x10]; /* 0x70: passed to trooper_start_knockback */ - float knockback_gravity_step; /* 0x80 */ - float knockback_horizontal_speed_approach_step; - float knockback_initial_horizontal_speed; - float knockback_initial_vertical_speed; - int knockback_collision_radius_fixed; /* 0x90 */ - int i94; - float knockback_collision_center_z_offset; - char pad9C[4]; - float knockback_collision_restitution; /* 0xA0 */ - char padA4[9]; - unsigned char bAD; /* 0xAD */ - char padAE[0xE]; - float knockback_horizontal_target_speed; /* 0xBC */ - float knockback_ascent_animation_target_frame; - float knockback_descent_animation_target_frame; - char padC8[0x158]; - char *target; /* 0x220 */ + char pad0[0x20]; + float hp; /* 0x20 */ + char pad24[0x3C]; + short anim[3]; /* 0x60: passed to trooper_anim_update / trooper_anim_finish */ + unsigned char pad66; + unsigned char flash; /* 0x67 */ + char pad68[8]; + struct KnockbackMotion knockback; /* 0x70 */ + char padD0[0x150]; + char *target; /* 0x220 */ } Vars85b8; /* Hit reaction: takes damage, flinches or dies (knocked away from the hero), then retargets. */ @@ -606,26 +592,26 @@ void handle_constructorbot_damage_and_retargeting(void *owner_moby) { resolve_moby_hit_response(moby, hit_record, &moby_vars->hp, 0, &hit, &dmg, 0, 4); if (hit != 1 && ((unsigned char *)moby)[0x20] != 0x11) { moby_vars->hp -= dmg; - moby_vars->knockback_collision_radius_fixed = truncate_float_to_s32(614.4f); - moby_vars->knockback_collision_center_z_offset = 0.6f; + moby_vars->knockback.collision_radius_1024ths = truncate_float_to_s32(614.4f); + moby_vars->knockback.collision_z_offset = 0.6f; if (0.0f < moby_vars->hp) { if (dmg < 1.0f) { moby_vars->flash = 100; } else { - void *k = moby_vars->knock; + void *k = &moby_vars->knockback; moby_vars->flash = 0x78; - moby_vars->knockback_gravity_step = constructorbot_gravity_gp * frame_time_sq; - moby_vars->knockback_horizontal_speed_approach_step = + moby_vars->knockback.gravity = constructorbot_gravity_gp * frame_time_sq; + moby_vars->knockback.speed_approach_step = constructorbot_hit_knockback_horizontal_speed_approach_rate_gp * frame_time_sq; - moby_vars->knockback_initial_horizontal_speed = + moby_vars->knockback.speed = constructorbot_hit_knockback_horizontal_speed_gp * D_0015ED6C; - moby_vars->knockback_initial_vertical_speed = + moby_vars->knockback.vertical_speed = constructorbot_hit_knockback_vertical_speed_gp * D_0015ED6C; - moby_vars->knockback_horizontal_target_speed = + moby_vars->knockback.target_speed = constructorbot_knockback_horizontal_target_speed_gp * D_0015ED6C; - moby_vars->knockback_collision_restitution = 0.5f; - moby_vars->i94 = 25; - moby_vars->bAD = 0; + moby_vars->knockback.restitution = 0.5f; + moby_vars->knockback.flags = 25; + moby_vars->knockback.unk3D = 0; trooper_start_knockback(fast_arc_tan(MOBY(moby)->pos.x - hero.motion.pos.f[0], MOBY(moby)->pos.y - hero.motion.pos.f[1]), moby, @@ -633,23 +619,23 @@ void handle_constructorbot_damage_and_retargeting(void *owner_moby) { 0xB, 1, 0); - moby_vars->knockback_ascent_animation_target_frame = 6.5f; - moby_vars->knockback_descent_animation_target_frame = 11.0f; + moby_vars->knockback.apex_animation_frame = 6.5f; + moby_vars->knockback.landing_animation_frame = 11.0f; moby[0x20] = 0x10; } } else { - void *k2 = moby_vars->knock; - moby_vars->knockback_gravity_step = constructorbot_gravity_gp * frame_time_sq; - moby_vars->knockback_horizontal_speed_approach_step = + void *k2 = &moby_vars->knockback; + moby_vars->knockback.gravity = constructorbot_gravity_gp * frame_time_sq; + moby_vars->knockback.speed_approach_step = constructorbot_death_knockback_horizontal_speed_approach_rate_gp * frame_time_sq; - moby_vars->knockback_initial_horizontal_speed = + moby_vars->knockback.speed = constructorbot_death_knockback_horizontal_speed_gp * D_0015ED6C; - moby_vars->knockback_initial_vertical_speed = + moby_vars->knockback.vertical_speed = constructorbot_death_knockback_vertical_speed_gp * D_0015ED6C; - moby_vars->knockback_horizontal_target_speed = + moby_vars->knockback.target_speed = constructorbot_knockback_horizontal_target_speed_gp * D_0015ED6C; - moby_vars->i94 = 9; - moby_vars->bAD = 0; + moby_vars->knockback.flags = 9; + moby_vars->knockback.unk3D = 0; trooper_start_knockback(fast_arc_tan(MOBY(moby)->pos.x - hero.motion.pos.f[0], MOBY(moby)->pos.y - hero.motion.pos.f[1]), moby, @@ -657,8 +643,8 @@ void handle_constructorbot_damage_and_retargeting(void *owner_moby) { 0xE, 1, 0); - moby_vars->knockback_ascent_animation_target_frame = 6.5f; - moby_vars->knockback_descent_animation_target_frame = 13.0f; + moby_vars->knockback.apex_animation_frame = 6.5f; + moby_vars->knockback.landing_animation_frame = 13.0f; MOBY(moby)->flags &= 0xEFFF; moby_vars->flash = 0xFA; moby[0x20] = 0x11; diff --git a/src/overlays/l02/mobys/sand_shark.c b/src/overlays/l02/mobys/sand_shark.c index 5e43e85deb..66bda748f1 100644 --- a/src/overlays/l02/mobys/sand_shark.c +++ b/src/overlays/l02/mobys/sand_shark.c @@ -9,6 +9,7 @@ #include "rnc/math/random.h" #include "rnc/mobys/moby_spawn.h" #include "rnc/mobys/animation/blend_moby_animation.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/overlay/shared/math/quad.h" #include "rnc/overlay/l02/mobys/sand_shark_globals.h" @@ -1200,56 +1201,48 @@ void emit_sand_shark_single_particle(Vec4 *from) { /* pvars of the class FUN_L02_002d5c88 updates (only the fields it touches). */ typedef struct { - char pad0[0x20]; - float hp; /* 0x20 */ - char pad24[0xA]; - unsigned char relaunch_request_state; /* 0x2E: 2 = respawn requested */ - char pad2F[9]; - int target_range_timer_refresh_request; /* 0x38 */ - char pad3C[0xD4]; - short anim[3]; /* 0x110: passed to trooper_anim_update / trooper_anim_finish */ - char pad116; - unsigned char hit_flash_target_red; /* 0x117 */ - char pad118[8]; - char knock[0x10]; /* 0x120: passed to trooper_start_knockback */ - float knockback_gravity_per_update; /* 0x130 */ - float knockback_horizontal_speed_approach_step; - float knockback_horizontal_speed; - float knockback_initial_vertical_speed; - int knockback_collision_radius; /* 0x140 */ - int knockback_flags; - float knockback_collision_z_offset; - int spawner_active_shark_count; /* 0x14C: count kept by the spawner moby */ - char pad150[0xD]; - unsigned char b15D; /* 0x15D */ - char pad15E[0xE]; - float knockback_target_horizontal_speed; /* 0x16C */ - float knockback_ascent_animation_target; - float knockback_descent_animation_target; - char pad178[0x58]; - float tgt[4]; /* 0x1D0: point followed along the path */ - char pad1E0[0x30]; - int selected_target_moby; /* 0x210 */ - int target_selection_status; - char pad218[8]; - float home[4]; /* 0x220 */ - char pad230[0x1C]; - float base_target_selection_range; /* 0x24C */ - float effective_target_selection_range; - char pad254[8]; - short t25C; /* 0x25C */ - short t25E; - char pad260[0x1C]; - int selected_relaunch_moby; /* 0x27C */ - int entry_moby_state; - char pad284[4]; - int spawning_moby_index; /* 0x288: spawner moby index, -1 if none */ - char pad28C[4]; - int configured_path_index; /* 0x290: path index */ - char pad294[8]; - int death_landing_particles_emitted; /* 0x29C */ + char pad0[0x20]; + float hp; /* 0x20 */ + char pad24[0xA]; + unsigned char relaunch_request_state; /* 0x2E: 2 = respawn requested */ + char pad2F[9]; + int target_range_timer_refresh_request; /* 0x38 */ + char pad3C[0xD4]; + short anim[3]; /* 0x110: passed to trooper_anim_update / trooper_anim_finish */ + char pad116; + unsigned char hit_flash_target_red; /* 0x117 */ + char pad118[8]; + struct KnockbackMotion knockback; /* 0x120 */ + char pad180[0x50]; + float tgt[4]; /* 0x1D0: point followed along the path */ + char pad1E0[0x30]; + int selected_target_moby; /* 0x210 */ + int target_selection_status; + char pad218[8]; + float home[4]; /* 0x220 */ + char pad230[0x1C]; + float base_target_selection_range; /* 0x24C */ + float effective_target_selection_range; + char pad254[8]; + short t25C; /* 0x25C */ + short t25E; + char pad260[0x1C]; + int selected_relaunch_moby; /* 0x27C */ + int entry_moby_state; + char pad284[4]; + int spawning_moby_index; /* 0x288: spawner moby index, -1 if none */ + char pad28C[4]; + int configured_path_index; /* 0x290: path index */ + char pad294[8]; + int death_landing_particles_emitted; /* 0x29C */ } Vars5c88; +/* pvars of the moby that spawned a sand shark */ +typedef struct { + char pad0[0x14C]; + int active_shark_count; /* 0x14C */ +} SandSharkSpawnerVars; + #include "rnc/overlay/l02/mobys/sand_shark_data/handle_sand_shark_damage_and_targeting.h" extern int *D_L02_001B0AB0_5c88[] __asm__("D_L02_001B0AB0"); @@ -1291,8 +1284,9 @@ void handle_sand_shark_damage_and_targeting(unsigned char *moby) { if (moby_vars->relaunch_request_state == SAND_SHARK_RELAUNCH_REQUEST_PENDING) { moby_vars->relaunch_request_state = SAND_SHARK_RELAUNCH_REQUEST_CONSUMED; if (moby_vars->spawning_moby_index >= 0) { - (*(Vars5c88 **)((moby_vars->spawning_moby_index << 8) + D_L02_0015FFD8 + 0x78)) - ->spawner_active_shark_count -= 1; + (*(SandSharkSpawnerVars **)((moby_vars->spawning_moby_index << 8) + D_L02_0015FFD8 + + 0x78)) + ->active_shark_count -= 1; } if ((moby_vars->selected_relaunch_moby = select_group_class_29c_moby(moby)) == 0) { mark_moby_for_removal(moby); @@ -1323,19 +1317,18 @@ void handle_sand_shark_damage_and_targeting(unsigned char *moby) { moby_vars->hp -= dmg; if (moby_vars->hp <= 0.0f) { moby_vars->hp -= dmg; - moby_vars->knockback_collision_radius = 0x200; - moby_vars->knockback_gravity_per_update = - sand_shark_death_knockback_gravity_gp * frame_time_sq; - moby_vars->knockback_horizontal_speed_approach_step = + moby_vars->knockback.collision_radius_1024ths = 0x200; + moby_vars->knockback.gravity = sand_shark_death_knockback_gravity_gp * frame_time_sq; + moby_vars->knockback.speed_approach_step = sand_shark_death_knockback_horizontal_speed_approach_rate_gp * frame_time_sq; - moby_vars->knockback_horizontal_speed = + moby_vars->knockback.speed = sand_shark_death_knockback_horizontal_speed_gp * D_0015ED6C; - moby_vars->knockback_initial_vertical_speed = + moby_vars->knockback.vertical_speed = sand_shark_death_knockback_vertical_speed_gp * D_0015ED6C; - moby_vars->b15D = 0; - moby_vars->knockback_flags = 9; - moby_vars->knockback_target_horizontal_speed = 2.0f * D_0015ED6C; - moby_vars->knockback_collision_z_offset = 0.5f; + moby_vars->knockback.unk3D = 0; + moby_vars->knockback.flags = 9; + moby_vars->knockback.target_speed = 2.0f * D_0015ED6C; + moby_vars->knockback.collision_z_offset = 0.5f; qcopy(&ground_probe_position, moby + 0x10); ground_probe_position.f[2] += 2.0f; ground_height = probe_ground_height(&ground_probe_position, 0, 0.5f); @@ -1344,23 +1337,24 @@ void handle_sand_shark_damage_and_targeting(unsigned char *moby) { } if (moby_vars->spawning_moby_index >= 0) { extern int D_L02_0015FFD8_s __asm__("D_L02_0015FFD8") __attribute__((sda)); - (*(Vars5c88 **)((moby_vars->spawning_moby_index << 8) + D_L02_0015FFD8_s + 0x78)) - ->spawner_active_shark_count -= 1; - moby_vars->b15D = 0; + (*(SandSharkSpawnerVars **)((moby_vars->spawning_moby_index << 8) + + D_L02_0015FFD8_s + 0x78)) + ->active_shark_count -= 1; + moby_vars->knockback.unk3D = 0; } else { ground_probe_position.f[2] += 0.01f; } - moby_vars->knockback_flags |= 0x20; + moby_vars->knockback.flags |= 0x20; MOBY(moby)->flags &= 0xEFFF; hit_knockback_vector.q = *(OvlQuad *)(hit_record + 0x10); trooper_knockback_arc(&hit_knockback_vector, &k, - &moby_vars->knockback_horizontal_speed, - &moby_vars->knockback_initial_vertical_speed); - trooper_start_knockback(k, moby, moby_vars->knock, 6, 1, 0); - moby_vars->knockback_collision_z_offset = 0.85f; - moby_vars->knockback_ascent_animation_target = 7.0f; - moby_vars->knockback_descent_animation_target = 14.0f; + &moby_vars->knockback.speed, + &moby_vars->knockback.vertical_speed); + trooper_start_knockback(k, moby, &moby_vars->knockback, 6, 1, 0); + moby_vars->knockback.collision_z_offset = 0.85f; + moby_vars->knockback.apex_animation_frame = 7.0f; + moby_vars->knockback.landing_animation_frame = 14.0f; moby[0x20] = 0x18; MOBY(moby)->collision = 0; moby_vars->hit_flash_target_red = 0x78; diff --git a/src/overlays/l04/mobys/big_axebot.c b/src/overlays/l04/mobys/big_axebot.c index effdf52e8e..78476ef43a 100644 --- a/src/overlays/l04/mobys/big_axebot.c +++ b/src/overlays/l04/mobys/big_axebot.c @@ -17,6 +17,7 @@ #include "rnc/overlay/shared/enemies/trooper_set_knockback.h" #include "rnc/overlay/shared/world/level_path.h" #include "rnc/overlay/shared/math/quad.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" /* Ported from rac1-decomp (src/overlays/l04_eudora/vendor_0029FCF0.c: func_L04_002BB670), where it is exact; names translated to the US level program. */ @@ -120,67 +121,54 @@ typedef struct Manip_B7B0 { } Manip_B7B0; typedef struct D_B7B0 { - char pad00[0x20]; - float hp; - short f24; - char pad26[2]; - unsigned char f28; - unsigned char f29; - char pad2A[4]; - unsigned char f2E; - char pad2F; - float f30; - char pad34[4]; - int extended_detection_request; - char pad3C[0x1C]; - unsigned char f58; - char pad59; - unsigned char f5A; - char pad5B[0x55]; - char hit_transition_state[7]; - unsigned char fB7; - char padB8[8]; - float fC0[4]; - float knockback_gravity_step; - float knockback_horizontal_deceleration; - float knockback_initial_horizontal_displacement; - float knockback_initial_vertical_displacement; - int fE0; - int knockback_motion_flags; - float knockback_collision_height_offset; - char padEC[0x11]; - unsigned char fFD; - char padFE[0x12]; - float knockback_ascent_target_frame; - float knockback_descent_target_frame; - char pad118[8]; - Manip_B7B0 recoil_manipulator; - Manip_B7B0 aim_manipulator; - char leg_rig_state[0x250]; - V4_B7B0 home; - unsigned char start_waiting_for_target; - unsigned char last_non_hit_recovery_state; - short idle_action_delay_timer; - short hit_response_cooldown_timer; - unsigned char extended_detection_timer; - unsigned char alert_voice_cooldown_timer; - float recoil_pitch_angle; - char pad40C[4]; - float yaw_turn_velocity; - float movement_yaw; - float hit_recovery_displacement; - int movement_boundary_path_index; - float fall_displacement; - struct M_B7B0 *attached_axe_moby; - float tracked_aim_yaw; - float recoil_displacement; - int path_trigger_volume_index; - int approach_path_index; - short path_waypoint_index; - short path_follow_started; - float detection_range; - char pad440[8]; - int recoil_pose_cooldown_timer; + char pad00[0x20]; + float hp; + short f24; + char pad26[2]; + unsigned char f28; + unsigned char f29; + char pad2A[4]; + unsigned char f2E; + char pad2F; + float f30; + char pad34[4]; + int extended_detection_request; + char pad3C[0x1C]; + unsigned char f58; + char pad59; + unsigned char f5A; + char pad5B[0x55]; + char hit_transition_state[7]; + unsigned char fB7; + char padB8[8]; + struct KnockbackMotion knockback; /* 0xC0 */ + Manip_B7B0 recoil_manipulator; + Manip_B7B0 aim_manipulator; + char leg_rig_state[0x250]; + V4_B7B0 home; + unsigned char start_waiting_for_target; + unsigned char last_non_hit_recovery_state; + short idle_action_delay_timer; + short hit_response_cooldown_timer; + unsigned char extended_detection_timer; + unsigned char alert_voice_cooldown_timer; + float recoil_pitch_angle; + char pad40C[4]; + float yaw_turn_velocity; + float movement_yaw; + float hit_recovery_displacement; + int movement_boundary_path_index; + float fall_displacement; + struct M_B7B0 *attached_axe_moby; + float tracked_aim_yaw; + float recoil_displacement; + int path_trigger_volume_index; + int approach_path_index; + short path_waypoint_index; + short path_follow_started; + float detection_range; + char pad440[8]; + int recoil_pose_cooldown_timer; } D_B7B0; typedef struct M_B7B0 { @@ -389,11 +377,11 @@ void big_axebot_update(M_B7B0 *moby) { knockback_yaw = fast_arc_tan(moby->pos[0] - h->motion.pos.f[0], moby->pos[1] - h->motion.pos.f[1]); } - data->knockback_horizontal_deceleration = frame_time_sq * 12.0f; - data->knockback_gravity_step = frame_time_sq * 35.0f; - data->knockback_initial_horizontal_displacement = frame_time * 7.0f; - data->knockback_motion_flags = 9; - data->fFD = 0; + data->knockback.speed_approach_step = frame_time_sq * 12.0f; + data->knockback.gravity = frame_time_sq * 35.0f; + data->knockback.speed = frame_time * 7.0f; + data->knockback.flags = 9; + data->knockback.unk3D = 0; data->hp -= dmg; if (data->hp <= 0.0f) { hit_reaction_result = 1; @@ -442,9 +430,9 @@ void big_axebot_update(M_B7B0 *moby) { (char *)moby, (void *)5, 0, (void *)scale_game_frames(6)); set_big_axebot_and_axe_animation_speed(moby, 2.0f); moby->state = BIG_AXEBOT_STATE_HIT_RECOVERY; - trooper_start_knockback(knockback_yaw, moby, data->fC0, 5, 1, 0); - data->knockback_ascent_target_frame = 5.0f; - data->knockback_descent_target_frame = 10.0f; + trooper_start_knockback(knockback_yaw, moby, &data->knockback, 5, 1, 0); + data->knockback.apex_animation_frame = 5.0f; + data->knockback.landing_animation_frame = 10.0f; data->recoil_displacement = 3.4f / scale_time(7.0f); data->fB7 = 0x78; trooper_anim_update(moby, (short *)data->hit_transition_state); @@ -465,17 +453,17 @@ void big_axebot_update(M_B7B0 *moby) { data->extended_detection_timer = scale_game_frames(0xF0); break; case BIG_AXEBOT_HIT_REACTION_FATAL: - data->knockback_collision_height_offset = 1.0f; - data->fE0 = 0x400; - trooper_set_knockback(data->fC0, 5.7f, 4.0f); + data->knockback.collision_z_offset = 1.0f; + data->knockback.collision_radius_1024ths = 0x400; + trooper_set_knockback(&data->knockback, 5.7f, 4.0f); *(OvlQuad *)vector_quaternion_scratch = *(OvlQuad *)hit->pos; trooper_knockback_arc(vector_quaternion_scratch, &knockback_yaw, - &data->knockback_initial_horizontal_displacement, - &data->knockback_initial_vertical_displacement); - trooper_start_knockback(knockback_yaw, moby, data->fC0, 7, 1, 0); - data->knockback_ascent_target_frame = 12.0f; - data->knockback_descent_target_frame = 25.0f; + &data->knockback.speed, + &data->knockback.vertical_speed); + trooper_start_knockback(knockback_yaw, moby, &data->knockback, 7, 1, 0); + data->knockback.apex_animation_frame = 12.0f; + data->knockback.landing_animation_frame = 25.0f; moby->state = BIG_AXEBOT_STATE_DYING; data->fB7 = 0x78; trooper_anim_update(moby, (short *)data->hit_transition_state); @@ -874,7 +862,7 @@ void big_axebot_update(M_B7B0 *moby) { } break; case BIG_AXEBOT_STATE_DYING: - if ((step_moby_motion(moby, data->fC0) & 0x40) || moby->pos[2] < 1.0f) { + if ((step_moby_motion(moby, &data->knockback) & 0x40) || moby->pos[2] < 1.0f) { mark_moby_for_removal_cf((char *)moby); if (data->attached_axe_moby != 0) { mark_moby_for_removal(data->attached_axe_moby); diff --git a/src/overlays/l05/mobys/extermibot.c b/src/overlays/l05/mobys/extermibot.c index 077a88fb6f..852fa76196 100644 --- a/src/overlays/l05/mobys/extermibot.c +++ b/src/overlays/l05/mobys/extermibot.c @@ -8,6 +8,7 @@ #include "rnc/overlay/shared/mobys/select_auto_aim_target_moby.h" #include "rnc/overlay/shared/mobys/build_symmetric_adjacency_masks.h" #include "qcopy.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" enum { EXTERMIBOT_INITIALIZE = 0, @@ -671,56 +672,44 @@ typedef struct Path_3047E8 { } Path_3047E8; typedef struct Wing { - char pad0[0x20]; - float hp; - char pad1[0x14]; - int targeting_range_boost_pending; - char pad2[0x24]; - short f60[3]; - char pad3[0x1]; - unsigned char hit_flash_target; - char pad4[0x8]; - char f70[16]; - float knockback_gravity; - char pad5[0x4]; - float knockback_xy_magnitude; - float knockback_z_magnitude; - int knockback_collision_radius_fixed_point; - int knockback_motion_flags; - float knockback_collision_z_offset; - char pad6[0x11]; - unsigned char bAD; - char pad7[0x12]; - float knockback_apex_animation_target; - float knockback_landing_animation_target; - char pad8[0x58]; - char selected_target_position_xy[8]; - float selected_target_position_z; - char pad9[0x34]; - struct Moby *target; - int target_selection_status; - char pad10[0x8]; - char first_joint_animation[16]; - char pad11[0x54]; - float first_joint_target_pitch; - float first_joint_target_yaw; - char pad12[0x14]; - char second_joint_animation[16]; - char pad13[0x58]; - float second_joint_target_yaw; - char pad14[0x14]; - char start_position[16]; - char pad15[0x1C]; - float base_targeting_range; - float effective_targeting_range; - char pad16[0xC]; - int targeting_range_boost_timer; - char pad17[0x14]; - int target_group_index; - int targeting_path_index; - char pad18[0x4]; - int path_stuck_timer; - float glow_pulse_phase; + char pad0[0x20]; + float hp; + char pad1[0x14]; + int targeting_range_boost_pending; + char pad2[0x24]; + short f60[3]; + char pad3[0x1]; + unsigned char hit_flash_target; + char pad4[0x8]; + struct KnockbackMotion knockback; /* 0x70 */ + char pad8[0x50]; + char selected_target_position_xy[8]; + float selected_target_position_z; + char pad9[0x34]; + struct Moby *target; + int target_selection_status; + char pad10[0x8]; + char first_joint_animation[16]; + char pad11[0x54]; + float first_joint_target_pitch; + float first_joint_target_yaw; + char pad12[0x14]; + char second_joint_animation[16]; + char pad13[0x58]; + float second_joint_target_yaw; + char pad14[0x14]; + char start_position[16]; + char pad15[0x1C]; + float base_targeting_range; + float effective_targeting_range; + char pad16[0xC]; + int targeting_range_boost_timer; + char pad17[0x14]; + int target_group_index; + int targeting_path_index; + char pad18[0x4]; + int path_stuck_timer; + float glow_pulse_phase; } Wing; int l05_extermibot_glow_color_start __asm__("D_L05_00161A74") = 0x80004000; @@ -816,11 +805,11 @@ void handle_extermibot_hits_and_update_targeting(Moby *moby) { hit_response = 1; } k = truncate_float_to_s32(D_L05_00161A98_gp * 409.6f); - moby_data->knockback_collision_z_offset = D_L05_00161A98_gp * 0.4f; - moby_data->knockback_gravity = extermibot_knockback_gravity_gp * D_0015ED70; - moby_data->knockback_collision_radius_fixed_point = k; - moby_data->knockback_motion_flags = 9; - moby_data->bAD = 0; + moby_data->knockback.collision_z_offset = D_L05_00161A98_gp * 0.4f; + moby_data->knockback.gravity = extermibot_knockback_gravity_gp * D_0015ED70; + moby_data->knockback.collision_radius_1024ths = k; + moby_data->knockback.flags = 9; + moby_data->knockback.unk3D = 0; switch (hit_response) { case EXTERMIBOT_HIT_NO_RESPONSE: case EXTERMIBOT_HIT_NO_REACTION: @@ -835,39 +824,40 @@ void handle_extermibot_hits_and_update_targeting(Moby *moby) { case EXTERMIBOT_HIT_START_NONLETHAL_KNOCKBACK: case EXTERMIBOT_HIT_START_NONLETHAL_KNOCKBACK_AND_FLASH: case EXTERMIBOT_HIT_START_KNOCKBACK_WITH_FLASH: - moby_data->knockback_apex_animation_target = 5.0f; - moby_data->knockback_xy_magnitude = - extermibot_nonlethal_knockback_xy_scale_gp * D_0015ED6C; - moby_data->knockback_z_magnitude = + moby_data->knockback.apex_animation_frame = 5.0f; + moby_data->knockback.speed = extermibot_nonlethal_knockback_xy_scale_gp * D_0015ED6C; + moby_data->knockback.vertical_speed = extermibot_nonlethal_knockback_z_scale_gp * D_0015ED6C; - moby_data->knockback_landing_animation_target = 10.0f; + moby_data->knockback.landing_animation_frame = 10.0f; nonlethal_knockback_heading = fast_arc_tan(moby->pos.x - hit_record->who->pos.x, moby->pos.y - hit_record->who->pos.y); *(u128_3047E8 *)working_vector = hit_record->dir; trooper_knockback_arc(working_vector, &nonlethal_knockback_heading, - &moby_data->knockback_xy_magnitude, - &moby_data->knockback_z_magnitude); - trooper_start_knockback(moby, moby_data->f70, nonlethal_knockback_heading, 5, 1, 0); + &moby_data->knockback.speed, + &moby_data->knockback.vertical_speed); + trooper_start_knockback( + moby, &moby_data->knockback, nonlethal_knockback_heading, 5, 1, 0); moby->state = EXTERMIBOT_NONLETHAL_KNOCKBACK; moby_data->hit_flash_target = 0x78; break; case EXTERMIBOT_HIT_LETHAL: case EXTERMIBOT_HIT_DEATH_KNOCKBACK: moby->flags &= 0xEFFF; - moby_data->knockback_gravity = extermibot_death_knockback_gravity_gp * D_0015ED70; - moby_data->knockback_xy_magnitude = extermibot_death_knockback_xy_scale_gp * D_0015ED6C; - moby_data->knockback_z_magnitude = extermibot_death_knockback_z_scale_gp * D_0015ED6C; - moby_data->knockback_apex_animation_target = 5.5f; - moby_data->knockback_landing_animation_target = 11.0f; + moby_data->knockback.gravity = extermibot_death_knockback_gravity_gp * D_0015ED70; + moby_data->knockback.speed = extermibot_death_knockback_xy_scale_gp * D_0015ED6C; + moby_data->knockback.vertical_speed = + extermibot_death_knockback_z_scale_gp * D_0015ED6C; + moby_data->knockback.apex_animation_frame = 5.5f; + moby_data->knockback.landing_animation_frame = 11.0f; death_knockback_heading = fast_arc_tan(moby->pos.x - hit_record->who->pos.x, moby->pos.y - hit_record->who->pos.y); *(u128_3047E8 *)working_vector = hit_record->dir; trooper_knockback_arc(working_vector, &death_knockback_heading, - &moby_data->knockback_xy_magnitude, - &moby_data->knockback_z_magnitude); - trooper_start_knockback(moby, moby_data->f70, death_knockback_heading, 6, 1, 0); + &moby_data->knockback.speed, + &moby_data->knockback.vertical_speed); + trooper_start_knockback(moby, &moby_data->knockback, death_knockback_heading, 6, 1, 0); moby->state = EXTERMIBOT_DEATH_KNOCKBACK; moby_data->hit_flash_target = 0xF0; if (hit_record->who != 0 && *(struct Moby **)&hit_record->who->pclass != 0 && diff --git a/src/overlays/l11/mobys/psytcopus.c b/src/overlays/l11/mobys/psytcopus.c index 8251dcdd30..d7d2f6e149 100644 --- a/src/overlays/l11/mobys/psytcopus.c +++ b/src/overlays/l11/mobys/psytcopus.c @@ -10,6 +10,7 @@ #include "rnc/math/asm_helpers.h" #include "rnc/mobys/moby_spawn.h" #include "rnc/mobys/animation/blend_moby_animation.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" enum { PSYTCOPUS_STATE_INITIALIZE = 0, @@ -28,53 +29,40 @@ extern int resolve_moby_hit_response(void *, void *, float *, int, int *, int, /* pvars of the moby run by psytcopus_update (FUN_L11_00310698 does its hit handling) */ struct PokiPathVars { - u8 pad_00[0x20]; - f32 health; /* 0x20 */ - s16 unk24; /* 0x24 */ - u8 pad_26[2]; - u8 hit_response_class; /* 0x28 */ - u8 pad_29; - u8 unk2A; /* 0x2A */ - u8 pad_2B[0x2D]; - u8 unk58; /* 0x58 */ - u8 pad_59; - u8 unk5A; /* 0x5A */ - u8 pad_5B[5]; - u8 move[7]; /* 0x60: passed to trooper_anim_update / trooper_anim_finish */ - u8 hit_reaction_channel_target; /* 0x67 */ - u8 pad_68[8]; - u8 motion[0x10]; /* 0x70: passed to trooper_start_knockback / step_moby_motion */ - f32 knockback_gravity; /* 0x80 */ - f32 knockback_speed_approach_step; /* 0x84 */ - f32 knockback_speed; /* 0x88 */ - f32 knockback_vertical_speed; /* 0x8C */ - s32 knockback_collision_radius; /* 0x90 */ - s32 unk94; /* 0x94 */ - f32 knockback_collision_z_offset; /* 0x98 */ - u8 pad_9C[0x11]; - u8 unkAD; /* 0xAD */ - u8 pad_AE[0x12]; - f32 knockback_apex_animation_frame; /* 0xC0 */ - f32 knockback_landing_animation_frame; /* 0xC4 */ - u8 pad_C8[8]; - Vec4f goal; /* 0xD0 */ - u8 pad_E0[0x30]; - struct Moby *target; /* 0x110 */ - s32 unk114; /* 0x114 */ - u8 pad_118[0x18]; - s32 unk130; /* 0x130 */ - s32 start_path; /* 0x134 */ - u8 pad_138[4]; - s32 path_index; /* 0x13C */ - f32 reach; /* 0x140 */ - u8 pad_144[8]; - f32 yaw_turn_velocity; /* 0x14C */ - u8 pad_150[8]; - s32 knockback_extension_timer; /* 0x158 */ - u8 pad_15C[4]; - void *held_projectile; /* 0x160 */ - u8 pad_164[0x7C]; - u8 manipulator[0x10]; /* 0x1E0 */ + u8 pad_00[0x20]; + f32 health; /* 0x20 */ + s16 unk24; /* 0x24 */ + u8 pad_26[2]; + u8 hit_response_class; /* 0x28 */ + u8 pad_29; + u8 unk2A; /* 0x2A */ + u8 pad_2B[0x2D]; + u8 unk58; /* 0x58 */ + u8 pad_59; + u8 unk5A; /* 0x5A */ + u8 pad_5B[5]; + u8 move[7]; /* 0x60: passed to trooper_anim_update / trooper_anim_finish */ + u8 hit_reaction_channel_target; /* 0x67 */ + u8 pad_68[8]; + struct KnockbackMotion knockback; /* 0x70 */ + Vec4f goal; /* 0xD0 */ + u8 pad_E0[0x30]; + struct Moby *target; /* 0x110 */ + s32 unk114; /* 0x114 */ + u8 pad_118[0x18]; + s32 unk130; /* 0x130 */ + s32 start_path; /* 0x134 */ + u8 pad_138[4]; + s32 path_index; /* 0x13C */ + f32 reach; /* 0x140 */ + u8 pad_144[8]; + f32 yaw_turn_velocity; /* 0x14C */ + u8 pad_150[8]; + s32 knockback_extension_timer; /* 0x158 */ + u8 pad_15C[4]; + void *held_projectile; /* 0x160 */ + u8 pad_164[0x7C]; + u8 manipulator[0x10]; /* 0x1E0 */ }; extern struct Moby *D_001413D0 NOT_SDA; @@ -234,7 +222,7 @@ void psytcopus_update(struct Moby *psytcopus) { } break; case PSYTCOPUS_STATE_KNOCKBACK: - knockback_result_flags = FUN_L00_0025c698_p(psytcopus, psytcopus_vars->motion); + knockback_result_flags = FUN_L00_0025c698_p(psytcopus, &psytcopus_vars->knockback); if (knockback_result_flags & 0x41) { path = (s32 *)l11_paths[psytcopus_vars->path_index]; if (FUN_L00_00259740_p(&psytcopus->pos, path + 4, *path) != 0) { @@ -253,7 +241,7 @@ void psytcopus_update(struct Moby *psytcopus) { } break; case PSYTCOPUS_STATE_DEATH_KNOCKBACK: - if (FUN_L00_0025c698_p(psytcopus, psytcopus_vars->motion) & 0x160) { + if (FUN_L00_0025c698_p(psytcopus, &psytcopus_vars->knockback) & 0x160) { FUN_L00_0025f3e8_p(psytcopus, &psytcopus->pos, -1, 1.0f, 10.0f); FUN_L00_00257470_p(psytcopus, 0, -1); mark_moby_for_removal(psytcopus); @@ -311,12 +299,12 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { if (psytcopus_vars->health <= 0.0f) { hit_reaction = 1; } - psytcopus_vars->knockback_collision_radius = truncate_float_to_s32(512.0f); - psytcopus_vars->knockback_collision_z_offset = 0.5f; - psytcopus_vars->knockback_gravity = psytcopus_knockback_base_gravity_gp * frame_time_sq; - psytcopus_vars->knockback_speed_approach_step = 0.0005f; - psytcopus_vars->unk94 = 9; - psytcopus_vars->unkAD = 0; + psytcopus_vars->knockback.collision_radius_1024ths = truncate_float_to_s32(512.0f); + psytcopus_vars->knockback.collision_z_offset = 0.5f; + psytcopus_vars->knockback.gravity = psytcopus_knockback_base_gravity_gp * frame_time_sq; + psytcopus_vars->knockback.speed_approach_step = 0.0005f; + psytcopus_vars->knockback.flags = 9; + psytcopus_vars->knockback.unk3D = 0; switch (hit_reaction) { case HIT_REACTION_NONE: case HIT_REACTION_NO_RESPONSE: @@ -331,12 +319,12 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { case HIT_REACTION_KNOCKBACK_WITH_PROJECTILE_CANCELLATION_AND_TIMER_EXTENSION: case HIT_REACTION_KNOCKBACK_WITH_SOURCE_RELATIVE_HEADING: case HIT_REACTION_KNOCKBACK_WITH_SOURCE_RELATIVE_HEADING_AND_TIMER_EXTENSION: - psytcopus_vars->knockback_speed = + psytcopus_vars->knockback.speed = psytcopus_hurt_knockback_base_horizontal_speed_gp * frame_time; - psytcopus_vars->knockback_vertical_speed = + psytcopus_vars->knockback.vertical_speed = psytcopus_hurt_knockback_base_vertical_speed_gp * frame_time; - psytcopus_vars->knockback_apex_animation_frame = 3.0f; - psytcopus_vars->knockback_landing_animation_frame = 6.0f; + psytcopus_vars->knockback.apex_animation_frame = 3.0f; + psytcopus_vars->knockback.landing_animation_frame = 6.0f; source_to_psytcopus_heading = fast_arc_tan( psytcopus->pos.x - (*(struct Moby **)(psytcopus_hit_record + 0x20))->pos.x, psytcopus->pos.y - (*(struct Moby **)(psytcopus_hit_record + 0x20))->pos.y); @@ -344,9 +332,9 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { angle1 = source_to_psytcopus_heading; FUN_L00_0025ab48_p(&projectile_and_hit_vector_scratch, &angle1, - &psytcopus_vars->knockback_speed, - &psytcopus_vars->knockback_vertical_speed); - FUN_L00_0025c558_p(psytcopus, psytcopus_vars->motion, 5, 1, 0, angle1); + &psytcopus_vars->knockback.speed, + &psytcopus_vars->knockback.vertical_speed); + FUN_L00_0025c558_p(psytcopus, &psytcopus_vars->knockback, 5, 1, 0, angle1); psytcopus->state = PSYTCOPUS_STATE_KNOCKBACK; psytcopus_vars->hit_reaction_channel_target = 0x78; if (psytcopus_vars->held_projectile != 0) { @@ -358,13 +346,13 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { case HIT_REACTION_DEATH: case HIT_REACTION_DEATH_KNOCKBACK: psytcopus->flags &= 0xEFFF; - psytcopus_vars->knockback_gravity = psytcopus_knockback_base_gravity_gp * frame_time_sq; - psytcopus_vars->knockback_speed = + psytcopus_vars->knockback.gravity = psytcopus_knockback_base_gravity_gp * frame_time_sq; + psytcopus_vars->knockback.speed = psytcopus_death_knockback_base_horizontal_speed_gp * frame_time; - psytcopus_vars->knockback_vertical_speed = + psytcopus_vars->knockback.vertical_speed = psytcopus_death_knockback_base_vertical_speed_gp * frame_time; - psytcopus_vars->knockback_apex_animation_frame = 4.0f; - psytcopus_vars->knockback_landing_animation_frame = 10.0f; + psytcopus_vars->knockback.apex_animation_frame = 4.0f; + psytcopus_vars->knockback.landing_animation_frame = 10.0f; source_to_psytcopus_heading = fast_arc_tan( psytcopus->pos.x - (*(struct Moby **)(psytcopus_hit_record + 0x20))->pos.x, psytcopus->pos.y - (*(struct Moby **)(psytcopus_hit_record + 0x20))->pos.y); @@ -372,9 +360,9 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { angle2 = source_to_psytcopus_heading; FUN_L00_0025ab48_p(&projectile_and_hit_vector_scratch, &angle2, - &psytcopus_vars->knockback_speed, - &psytcopus_vars->knockback_vertical_speed); - FUN_L00_0025c558_p(psytcopus, psytcopus_vars->motion, 6, 1, 0, angle2); + &psytcopus_vars->knockback.speed, + &psytcopus_vars->knockback.vertical_speed); + FUN_L00_0025c558_p(psytcopus, &psytcopus_vars->knockback, 6, 1, 0, angle2); psytcopus->state = PSYTCOPUS_STATE_DEATH_KNOCKBACK; psytcopus_vars->hit_reaction_channel_target = 0xF0; if (psytcopus_vars->held_projectile != 0) { diff --git a/src/overlays/l11/mobys/puffoid.c b/src/overlays/l11/mobys/puffoid.c index 671c7c4324..c036f8238f 100644 --- a/src/overlays/l11/mobys/puffoid.c +++ b/src/overlays/l11/mobys/puffoid.c @@ -12,6 +12,8 @@ #include "rnc/mobys/moby_spawn.h" #include "rnc/world/collision/ground_probe.h" #include "rnc/mobys/animation/blend_moby_animation.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" #include "rnc/overlay/shared/world/level_path.h" #include "rnc/overlay/shared/camera/level_camera.h" @@ -47,54 +49,47 @@ enum { }; typedef struct { - u8 pad00[0x20]; - f32 hp; /* 0x20 */ - s16 unk24; /* 0x24 */ - u8 pad26[2]; - u8 hit_response_class; /* 0x28 */ - u8 unk29; /* 0x29 */ - u8 pad2A[6]; - f32 unk30; /* 0x30 */ - u8 pad34[0xC]; - f32 vel[4]; /* 0x40: jump velocity; [2] falls by D_L11_001622F0 * frame_time_sq */ - u8 pad50[8]; - u8 unk58; /* 0x58 */ - u8 pad59; - u8 unk5A; /* 0x5A */ - u8 pad5B[0x6D]; - s16 unkC8; /* 0xC8 */ - u8 padCA[6]; - void *unkD0; /* 0xD0 */ - u8 padD4[0x4C]; - u8 motion[0x5C]; /* 0x120: step_moby_motion / FUN_L00_002dc9f0 state */ - f32 smoke; /* 0x17C: nonzero: dying states give off smoke */ - s32 unk180; /* 0x180: block set up by FUN_L01_0026d930 */ - f32 unk184; /* 0x184 */ - f32 unk188; /* 0x188 */ - f32 unk18C; /* 0x18C */ - u8 pad190[0x28]; - s32 unk1B8; /* 0x1B8 */ - u8 pad1BC[0x14]; - f32 goal[4]; /* 0x1D0 */ - u8 pad1E0[0x30]; - struct Moby *target; /* 0x210 */ - s32 unk214; /* 0x214: 2 = target in range */ - u8 pad218[8]; - f32 home[4]; /* 0x220 */ - s32 path_index; /* 0x230: path index for FUN_L00_00261968 / the landing check */ - s32 path; /* 0x234: index into l11_paths */ - s32 mode; /* 0x238: start mode */ - u8 pad23C[8]; - s32 timer; /* 0x244 */ - u8 pad248[4]; - f32 chase_heading_offset_radians; /* 0x24C: heading offset for FUN_L11_00315f58 */ - f32 yaw_turn_velocity; /* 0x250: turn speed */ - s32 carrier; /* 0x254: moby index of the carrier, or < 0 */ - f32 carrier_jump_local_x_threshold; /* 0x258 */ - s32 point; /* 0x25C: current path point */ - f32 wander_destination[4]; /* 0x260 */ - u8 pad270[0x10]; - u8 manipulator[0x10]; /* 0x280 */ + u8 pad00[0x20]; + f32 hp; /* 0x20 */ + s16 unk24; /* 0x24 */ + u8 pad26[2]; + u8 hit_response_class; /* 0x28 */ + u8 unk29; /* 0x29 */ + u8 pad2A[6]; + f32 unk30; /* 0x30 */ + u8 pad34[0xC]; + f32 vel[4]; /* 0x40: jump velocity; [2] falls by D_L11_001622F0 * frame_time_sq */ + u8 pad50[8]; + u8 unk58; /* 0x58 */ + u8 pad59; + u8 unk5A; /* 0x5A */ + u8 pad5B[0x6D]; + s16 unkC8; /* 0xC8 */ + u8 padCA[6]; + void *unkD0; /* 0xD0 */ + u8 padD4[0x4C]; + struct KnockbackMotion knockback; /* 0x120: step_moby_motion / FUN_L00_002dc9f0 state */ + struct GroundMoveControl move_control; /* 0x180 */ + f32 goal[4]; /* 0x1D0 */ + u8 pad1E0[0x30]; + struct Moby *target; /* 0x210 */ + s32 unk214; /* 0x214: 2 = target in range */ + u8 pad218[8]; + f32 home[4]; /* 0x220 */ + s32 path_index; /* 0x230: path index for FUN_L00_00261968 / the landing check */ + s32 path; /* 0x234: index into l11_paths */ + s32 mode; /* 0x238: start mode */ + u8 pad23C[8]; + s32 timer; /* 0x244 */ + u8 pad248[4]; + f32 chase_heading_offset_radians; /* 0x24C: heading offset for FUN_L11_00315f58 */ + f32 yaw_turn_velocity; /* 0x250: turn speed */ + s32 carrier; /* 0x254: moby index of the carrier, or < 0 */ + f32 carrier_jump_local_x_threshold; /* 0x258 */ + s32 point; /* 0x25C: current path point */ + f32 wander_destination[4]; /* 0x260 */ + u8 pad270[0x10]; + u8 manipulator[0x10]; /* 0x280 */ } CreatureVars_4318; extern char *D_L11_0015FFD8_4318 __asm__("D_L11_0015FFD8"); @@ -112,7 +107,6 @@ extern void update_moby_target_heading_and_conditional_movement( extern short count_group_puffoids_in_states_13_to_17(struct Moby *self) __asm__("FUN_L11_00316090"); extern void spawn_4318(struct Moby *, int, void *, float) __asm__("FUN_L00_00263ac8"); extern void FUN_L00_0025a120_4318(struct Moby *) __asm__("FUN_L00_0025a120"); -extern void FUN_L01_0026d930_4318(void *) __asm__("FUN_L01_0026d930"); extern int rand(void) __asm__("FUN_001160d8"); extern float FUN_L00_00259710(void *); extern int point_in_path_xy(void *, void *, int) __asm__("FUN_L00_00259740"); @@ -167,12 +161,12 @@ void puffoid_update(struct Moby *moby) { puffoid_vars->unk5A = truncate_float_to_s32(2.0f); puffoid_vars->unk29 = 1; puffoid_vars->unkD0 = &D_L11_001622C0; - FUN_L01_0026d930_4318(&puffoid_vars->unk180); - puffoid_vars->unk18C = 0.5f; - puffoid_vars->unk188 = 0.5f; - puffoid_vars->unk180 = truncate_float_to_s32(512.0f); - puffoid_vars->unk184 = 0.5f; - puffoid_vars->unk1B8 |= 0x10; + init_ground_move_control(&puffoid_vars->move_control); + puffoid_vars->move_control.max_climb = 0.5f; + puffoid_vars->move_control.max_drop = 0.5f; + puffoid_vars->move_control.collision_radius_1024ths = truncate_float_to_s32(512.0f); + puffoid_vars->move_control.step_height = 0.5f; + puffoid_vars->move_control.movement_option_flags |= 0x10; if (rand() & 1) { moby->flags |= 0x8000; } @@ -375,7 +369,7 @@ void puffoid_update(struct Moby *moby) { } break; case PUFFOID_STATE_KNOCKBACK: { - int hit = FUN_L00_0025c698_4318(moby, puffoid_vars->motion); + int hit = FUN_L00_0025c698_4318(moby, &puffoid_vars->knockback); if (hit & 0x40) { char *path; if (moby->pos.z < 222.0f) { @@ -400,7 +394,7 @@ void puffoid_update(struct Moby *moby) { break; } case PUFFOID_STATE_DEATH_KNOCKBACK: - if (FUN_L00_0025c698_4318(moby, puffoid_vars->motion) & 0x160) { + if (FUN_L00_0025c698_4318(moby, &puffoid_vars->knockback) & 0x160) { clear_u64_value(pos); spawn_color_swapped_explosion_burst(moby, &moby->pos, -1, 0.5f, 10.0f); mark_moby_for_removal(moby); @@ -534,7 +528,7 @@ void puffoid_update(struct Moby *moby) { &moby->rot, &moby->pos, &moby->rot); - hit = FUN_L00_0025c698_4318(moby, puffoid_vars->motion); + hit = FUN_L00_0025c698_4318(moby, &puffoid_vars->knockback); if (hit & 0x40) { char *path; if (moby->pos.z < 222.0f) { @@ -565,7 +559,7 @@ void puffoid_update(struct Moby *moby) { &moby->rot, &moby->pos, &moby->rot); - if (FUN_L00_0025c698_4318(moby, puffoid_vars->motion) & 0x160) { + if (FUN_L00_0025c698_4318(moby, &puffoid_vars->knockback) & 0x160) { clear_u64_value(pos); spawn_color_swapped_explosion_burst(moby, &moby->pos, -1, 0.5f, 10.0f); mark_moby_for_removal(moby); @@ -637,13 +631,13 @@ void puffoid_update(struct Moby *moby) { break; } case PUFFOID_STATE_WAIT_TO_RESUME_COMMAND: - if (puffoid_vars->unkC8 != 0 && FUN_L00_002dc9f0_4318(moby, puffoid_vars->motion)) { + if (puffoid_vars->unkC8 != 0 && FUN_L00_002dc9f0_4318(moby, &puffoid_vars->knockback)) { moby->state = moby->command; puffoid_vars->unkC8 = 0; } break; } - if (puffoid_vars->smoke != 0.0f) { + if (puffoid_vars->knockback.ground_bounces != 0.0f) { if (moby->state == PUFFOID_STATE_KNOCKBACK || moby->state == PUFFOID_STATE_DEATH_KNOCKBACK || moby->state == PUFFOID_STATE_CARRIER_KNOCKBACK || @@ -688,44 +682,32 @@ extern float l11_puffoid_horizontal_speed_limit __asm__("D_L11_001622FC") __attr /* Private variables of the moby FUN_L11_00315968 updates (only the fields it uses). */ struct L11PatrolVars { - u8 pad0[0x20]; - f32 hp; /* 0x20 */ - u8 pad24[0x14]; - s32 retimer; /* 0x38: nonzero restarts the timer at 0x244 */ - u8 pad3C[0xD4]; - u8 move[7]; /* 0x110: movement state (trooper_anim_update / trooper_anim_finish) */ - u8 hit_flash_red_target; /* 0x117 */ - u8 pad118[8]; - u8 motion[0x10]; /* 0x120 */ - f32 knockback_gravity; /* 0x130 */ - f32 knockback_speed_approach_step; /* 0x134 */ - f32 knockback_speed; /* 0x138 */ - f32 knockback_vertical_speed; /* 0x13C */ - s32 knockback_collision_radius; /* 0x140 */ - s32 unk144; /* 0x144 */ - f32 knockback_collision_z_offset; /* 0x148 */ - u8 pad14C[0x11]; - u8 unk15D; /* 0x15D */ - u8 pad15E[0x12]; - f32 knockback_apex_animation_frame; /* 0x170 */ - f32 knockback_landing_animation_frame; /* 0x174 */ - u8 pad178[0x2C]; - f32 horizontal_movement_step_limit; /* 0x1A4 */ - u8 pad1A8[0x28]; - Vec4f goal; /* 0x1D0 */ - u8 pad1E0[0x30]; - struct Moby *target; /* 0x210 */ - s32 unk214; /* 0x214 */ - u8 pad218[0x18]; - s32 path_index; /* 0x230 */ - s32 path2_index; /* 0x234 */ - u8 pad238[4]; - f32 range; /* 0x23C */ - u8 pad240[4]; - s32 timer; /* 0x244 */ - f32 reach; /* 0x248 */ - u8 pad24C[8]; - s32 carrier; /* 0x254: listed moby index, -1: none */ + u8 pad0[0x20]; + f32 hp; /* 0x20 */ + u8 pad24[0x14]; + s32 retimer; /* 0x38: nonzero restarts the timer at 0x244 */ + u8 pad3C[0xD4]; + u8 move[7]; /* 0x110: movement state (trooper_anim_update / trooper_anim_finish) */ + u8 hit_flash_red_target; /* 0x117 */ + u8 pad118[8]; + struct KnockbackMotion knockback; /* 0x120 */ + u8 pad180[0x24]; + f32 horizontal_movement_step_limit; /* 0x1A4 */ + u8 pad1A8[0x28]; + Vec4f goal; /* 0x1D0 */ + u8 pad1E0[0x30]; + struct Moby *target; /* 0x210 */ + s32 unk214; /* 0x214 */ + u8 pad218[0x18]; + s32 path_index; /* 0x230 */ + s32 path2_index; /* 0x234 */ + u8 pad238[4]; + f32 range; /* 0x23C */ + u8 pad240[4]; + s32 timer; /* 0x244 */ + f32 reach; /* 0x248 */ + u8 pad24C[8]; + s32 carrier; /* 0x254: listed moby index, -1: none */ }; /* What find_moby_hit reports about the moby's last hit. */ @@ -813,13 +795,13 @@ void update_puffoid_damage_and_path_goal(struct Moby *moby) { if (patrol_vars->hp <= 0.0f) { kind = HIT_RESPONSE_DEATH; } - patrol_vars->knockback_collision_radius = truncate_float_to_s32(512.0f); - patrol_vars->knockback_collision_z_offset = 0.2f; - patrol_vars->knockback_speed_approach_step = 0.0f; - patrol_vars->knockback_gravity = + patrol_vars->knockback.collision_radius_1024ths = truncate_float_to_s32(512.0f); + patrol_vars->knockback.collision_z_offset = 0.2f; + patrol_vars->knockback.speed_approach_step = 0.0f; + patrol_vars->knockback.gravity = puffoid_hit_motion_time_squared_scale_gp * frame_time_sq; - patrol_vars->unk144 = 9; - patrol_vars->unk15D = 0; + patrol_vars->knockback.flags = 9; + patrol_vars->knockback.unk3D = 0; switch (kind) { case HIT_RESPONSE_NO_ADDITIONAL_REACTION: break; @@ -834,19 +816,19 @@ void update_puffoid_damage_and_path_goal(struct Moby *moby) { case HIT_RESPONSE_KNOCKBACK_ARC: case HIT_RESPONSE_KNOCKBACK_MOTION: { float yaw; - patrol_vars->knockback_speed = + patrol_vars->knockback.speed = puffoid_hit_knockback_horizontal_scale_gp * frame_time; - patrol_vars->knockback_vertical_speed = + patrol_vars->knockback.vertical_speed = puffoid_hit_knockback_vertical_scale_gp * frame_time; - patrol_vars->knockback_apex_animation_frame = 7.5f; - patrol_vars->knockback_landing_animation_frame = 11.0f; + patrol_vars->knockback.apex_animation_frame = 7.5f; + patrol_vars->knockback.landing_animation_frame = 11.0f; yaw = fast_arc_tan(moby->pos.x - hit->moby->pos.x, moby->pos.y - hit->moby->pos.y); position_scratch.q = hit->pos.q; trooper_knockback_arc(&position_scratch, &yaw, - &patrol_vars->knockback_speed, - &patrol_vars->knockback_vertical_speed); - trooper_start_knockback(moby, patrol_vars->motion, 3, 1, 0, yaw); + &patrol_vars->knockback.speed, + &patrol_vars->knockback.vertical_speed); + trooper_start_knockback(moby, &patrol_vars->knockback, 3, 1, 0, yaw); if (moby->state < PUFFOID_STATE_WAIT_FOR_CARRIER_JUMP) { moby->state = PUFFOID_STATE_KNOCKBACK; } else { @@ -859,21 +841,21 @@ void update_puffoid_damage_and_path_goal(struct Moby *moby) { case HIT_RESPONSE_DEATH_KNOCKBACK: { float yaw; moby->flags &= ~0x1000; - patrol_vars->knockback_gravity = + patrol_vars->knockback.gravity = puffoid_hit_motion_time_squared_scale_gp * frame_time_sq; - patrol_vars->knockback_speed = + patrol_vars->knockback.speed = puffoid_death_knockback_horizontal_scale_gp * frame_time; - patrol_vars->knockback_vertical_speed = + patrol_vars->knockback.vertical_speed = puffoid_death_knockback_vertical_scale_gp * frame_time; - patrol_vars->knockback_apex_animation_frame = 7.5f; - patrol_vars->knockback_landing_animation_frame = 11.0f; + patrol_vars->knockback.apex_animation_frame = 7.5f; + patrol_vars->knockback.landing_animation_frame = 11.0f; yaw = fast_arc_tan(moby->pos.x - hit->moby->pos.x, moby->pos.y - hit->moby->pos.y); position_scratch.q = hit->pos.q; trooper_knockback_arc(&position_scratch, &yaw, - &patrol_vars->knockback_speed, - &patrol_vars->knockback_vertical_speed); - trooper_start_knockback(moby, patrol_vars->motion, 3, 1, 0, yaw); + &patrol_vars->knockback.speed, + &patrol_vars->knockback.vertical_speed); + trooper_start_knockback(moby, &patrol_vars->knockback, 3, 1, 0, yaw); if (moby->state < PUFFOID_STATE_WAIT_FOR_CARRIER_JUMP) { moby->state = PUFFOID_STATE_DEATH_KNOCKBACK; } else { diff --git a/src/overlays/l18/mobys/gadgebot.c b/src/overlays/l18/mobys/gadgebot.c index fa4f102a24..a251453a49 100644 --- a/src/overlays/l18/mobys/gadgebot.c +++ b/src/overlays/l18/mobys/gadgebot.c @@ -18,6 +18,7 @@ #include "rnc/hero/hero.h" #include "rnc/math_consts.h" #include "rnc/overlay/shared/world/level_labels.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" enum { GADGEBOT_INITIALIZE = 0, @@ -258,35 +259,22 @@ extern int FUN_L00_0025ff38_c100(float, void *, void *, int, int, int *, int) __asm__("FUN_L00_0025ff38"); typedef struct { - char pad0[0x20]; - float health; /* 0x20 */ - char pad24[0x3C]; - char anim[0x7]; /* 0x60 */ - unsigned char anim_flags; /* 0x67 */ - char pad68[8]; - char fall[0x10]; /* 0x70 */ - float knockback_gravity; - float death_fall_horizontal_speed_approach_step; - float knockback_speed; - float death_fall_initial_vertical_speed; - int death_fall_collision_radius_fixed_point; - int knockback_motion_flags; - float knockback_collision_z_offset; - char pad9C[0x11]; - unsigned char unkAD; /* 0xAD */ - char padAE[0xE]; - float unkBC; - float knockback_apex_animation_frame; - float knockback_landing_animation_frame; - char padC8[0xB8]; - u128 target; /* 0x180 */ - char pad190[0x30]; - struct Moby *target_moby; /* 0x1C0 */ - int target_mode; /* 0x1C4 */ - char pad1C8[0x18]; - int path; /* 0x1E0 */ - char pad1E4[0x14]; - float spin; /* 0x1F8 */ + char pad0[0x20]; + float health; /* 0x20 */ + char pad24[0x3C]; + char anim[0x7]; /* 0x60 */ + unsigned char anim_flags; /* 0x67 */ + char pad68[8]; + struct KnockbackMotion knockback; /* 0x70 */ + char padD0[0xB0]; + u128 target; /* 0x180 */ + char pad190[0x30]; + struct Moby *target_moby; /* 0x1C0 */ + int target_mode; /* 0x1C4 */ + char pad1C8[0x18]; + int path; /* 0x1E0 */ + char pad1E4[0x14]; + float spin; /* 0x1F8 */ } SentryVars_c100; extern int gadgebot_joint_glows_last_queued_frame_gp __asm__("D_L18_00162604") __attribute__((sda)); @@ -356,29 +344,29 @@ void update_gadgebot_damage_target_and_glow(struct Moby *moby) { moby->state = GADGEBOT_EXPLODE; } else { fall_setup_value_or_path_slot_address = 0x200; - sentry_vars->death_fall_collision_radius_fixed_point = + sentry_vars->knockback.collision_radius_1024ths = fall_setup_value_or_path_slot_address; - sentry_vars->knockback_collision_z_offset = 0.5f; - sentry_vars->knockback_gravity = gadgebot_death_fall_gravity_gp * frame_time_sq; - sentry_vars->death_fall_horizontal_speed_approach_step = + sentry_vars->knockback.collision_z_offset = 0.5f; + sentry_vars->knockback.gravity = gadgebot_death_fall_gravity_gp * frame_time_sq; + sentry_vars->knockback.speed_approach_step = gadgebot_death_fall_horizontal_speed_approach_rate_gp * frame_time_sq; - sentry_vars->knockback_speed = + sentry_vars->knockback.speed = gadgebot_death_fall_base_horizontal_speed_gp * frame_time; - sentry_vars->death_fall_initial_vertical_speed = + sentry_vars->knockback.vertical_speed = gadgebot_death_fall_base_vertical_speed_gp * frame_time; reaction_value_or_path_address = 0x29; - sentry_vars->knockback_motion_flags = reaction_value_or_path_address; - sentry_vars->unkAD = 0; - sentry_vars->unkBC = frame_time + frame_time; + sentry_vars->knockback.flags = reaction_value_or_path_address; + sentry_vars->knockback.unk3D = 0; + sentry_vars->knockback.target_speed = frame_time + frame_time; moby->flags &= ~0x1000; v.q = *(u128 *)(coll + 0x10); trooper_knockback_arc(&v, &angle, - &sentry_vars->knockback_speed, - &sentry_vars->death_fall_initial_vertical_speed); - trooper_start_knockback(moby, sentry_vars->fall, 3, 1, 0, angle); - sentry_vars->knockback_apex_animation_frame = 7.5f; - sentry_vars->knockback_landing_animation_frame = 15.0f; + &sentry_vars->knockback.speed, + &sentry_vars->knockback.vertical_speed); + trooper_start_knockback(moby, &sentry_vars->knockback, 3, 1, 0, angle); + sentry_vars->knockback.apex_animation_frame = 7.5f; + sentry_vars->knockback.landing_animation_frame = 15.0f; moby->state = GADGEBOT_DEATH_FALL; moby->collision = 0; sentry_vars->anim_flags = 0x78; diff --git a/src/overlays/shared/enemies/blarg_paratrooper.c b/src/overlays/shared/enemies/blarg_paratrooper.c index f568804bdf..96bd78bc05 100644 --- a/src/overlays/shared/enemies/blarg_paratrooper.c +++ b/src/overlays/shared/enemies/blarg_paratrooper.c @@ -24,6 +24,7 @@ #include "rnc/mobys/resolve_moby_hit_response.h" #include "rnc/overlay/shared/world/level_path.h" #include "rnc/overlay/shared/mobys/ground_move_control.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" typedef struct Moby Moby; @@ -55,20 +56,7 @@ typedef struct Paratrooper302618 { u8 trooper_anim[0x7]; u8 hit_flash_red; u8 pad68[0x8]; - u8 motion[0x10]; - f32 knockback_gravity; - u8 pad84[0x4]; - f32 knockback_speed; - f32 knockback_z_speed; - s32 knockback_collision_radius; - s32 knockback_motion_flags; - f32 knockback_collision_z_offset; - u8 pad9C[0x11]; - u8 unkAD; - u8 padAE[0x12]; - f32 knockback_apex_animation_frame; - f32 knockback_landing_animation_frame; - u8 padC8[0x8]; + struct KnockbackMotion knockback; /* 0x70 */ struct GroundMoveControl move_control; /* 0xD0 */ u8 path_search_point[0x8]; f32 path_search_point_z; @@ -686,12 +674,12 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { turn = truncate_float_to_s32(512.0f); { float pose_scale = D_L08_00162184 * frame_time_sq; - paratrooper_instance_state->knockback_collision_radius = turn; - paratrooper_instance_state->knockback_collision_z_offset = 0.5f; - paratrooper_instance_state->knockback_motion_flags = 9; - paratrooper_instance_state->knockback_gravity = pose_scale; + paratrooper_instance_state->knockback.collision_radius_1024ths = turn; + paratrooper_instance_state->knockback.collision_z_offset = 0.5f; + paratrooper_instance_state->knockback.flags = 9; + paratrooper_instance_state->knockback.gravity = pose_scale; } - paratrooper_instance_state->unkAD = 0; + paratrooper_instance_state->knockback.unk3D = 0; if ((unsigned)reaction < 12) { switch (reaction) { @@ -710,10 +698,10 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { case 8: { float pose_scale = l08_paratrooper_recovery_knockback_xy_speed * frame_time; float timer_scale = frame_time * 3.0f; - paratrooper_instance_state->knockback_speed = pose_scale; - paratrooper_instance_state->knockback_z_speed = timer_scale; - paratrooper_instance_state->knockback_apex_animation_frame = 5.0f; - paratrooper_instance_state->knockback_landing_animation_frame = 10.0f; + paratrooper_instance_state->knockback.speed = pose_scale; + paratrooper_instance_state->knockback.vertical_speed = timer_scale; + paratrooper_instance_state->knockback.apex_animation_frame = 5.0f; + paratrooper_instance_state->knockback.landing_animation_frame = 10.0f; } { char *hit_moby = *(char **)(target + 0x20); @@ -723,12 +711,13 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { angle = fast_arc_tan(dx, dy); *(u128 *)pos = *(u128 *)(target + 0x10); knock_angle = angle; - trooper_knockback_arc(pos, - &knock_angle, - (float *)(¶trooper_instance_state->knockback_speed), - (float *)(¶trooper_instance_state->knockback_z_speed)); + trooper_knockback_arc( + pos, + &knock_angle, + (float *)(¶trooper_instance_state->knockback.speed), + (float *)(¶trooper_instance_state->knockback.vertical_speed)); trooper_start_knockback( - moby, ¶trooper_instance_state->motion, knock_angle, 8, 1, 0); + moby, ¶trooper_instance_state->knockback, knock_angle, 8, 1, 0); MOBY(moby)->state = PARATROOPER_STATE_KNOCKBACK_RECOVERY; paratrooper_instance_state->hit_flash_red = 0x78; break; @@ -744,13 +733,13 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { pose_scale = pose_rate * frame_time_sq; timer_scale = timer_rate * step; angle_scale = angle_rate * step; - paratrooper_instance_state->knockback_collision_z_offset = 0.25f; - paratrooper_instance_state->knockback_z_speed = angle_scale; - paratrooper_instance_state->knockback_gravity = pose_scale; - paratrooper_instance_state->knockback_speed = timer_scale; - paratrooper_instance_state->knockback_apex_animation_frame = 11.0f; - paratrooper_instance_state->knockback_landing_animation_frame = push_limit; - paratrooper_instance_state->knockback_collision_radius = 0x200; + paratrooper_instance_state->knockback.collision_z_offset = 0.25f; + paratrooper_instance_state->knockback.vertical_speed = angle_scale; + paratrooper_instance_state->knockback.gravity = pose_scale; + paratrooper_instance_state->knockback.speed = timer_scale; + paratrooper_instance_state->knockback.apex_animation_frame = 11.0f; + paratrooper_instance_state->knockback.landing_animation_frame = push_limit; + paratrooper_instance_state->knockback.collision_radius_1024ths = 0x200; } { char *hit_moby = *(char **)(target + 0x20); @@ -760,12 +749,13 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { angle = fast_arc_tan(dx, dy); *(u128 *)pos = *(u128 *)(target + 0x10); second_knock_angle = angle; - trooper_knockback_arc(pos, - &second_knock_angle, - (float *)(¶trooper_instance_state->knockback_speed), - (float *)(¶trooper_instance_state->knockback_z_speed)); + trooper_knockback_arc( + pos, + &second_knock_angle, + (float *)(¶trooper_instance_state->knockback.speed), + (float *)(¶trooper_instance_state->knockback.vertical_speed)); trooper_start_knockback( - moby, ¶trooper_instance_state->motion, second_knock_angle, 12, 1, 0); + moby, ¶trooper_instance_state->knockback, second_knock_angle, 12, 1, 0); MOBY(moby)->state = PARATROOPER_STATE_DEATH_EFFECTS_AND_REMOVE; paratrooper_instance_state->hit_flash_red = 0xf0; spawn_randomized_bolt_drop(moby, 2, 3, 0, -1); diff --git a/src/overlays/shared/enemies/frog.c b/src/overlays/shared/enemies/frog.c index e24be6147a..a70067ef4e 100644 --- a/src/overlays/shared/enemies/frog.c +++ b/src/overlays/shared/enemies/frog.c @@ -20,6 +20,7 @@ #include "rnc/overlay/shared/enemies/frog_data/update_frog_health_respawn_and_target.h" #include "rnc/overlay/shared/enemies/frog_data/spawn_moby_directional_spark_bursts_2.h" #include "rnc/overlay/shared/enemies/frog_data/spawn_moby_directional_spark_bursts.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" enum { FROG_STATE_INITIALIZE = 0, @@ -39,56 +40,47 @@ enum { }; typedef struct FrogVars { - u8 pad0[0x29]; - s8 unk29; - u8 pad2A[0x2e]; - s8 unk58; - u8 pad59[0x1]; - s8 unk5A; - u8 pad5B[0x6d]; - s16 unkC8; - u8 padCA[0x6]; - short *unkD0; - u8 padD4[0x4c]; - u8 motion[0x10]; - f32 knockback_gravity; - s32 knockback_speed_approach_rate; - f32 knockback_speed; - f32 knockback_vertical_speed; - s32 knockback_collision_radius; - s32 knockback_motion_flags; - s32 motion_collision_height_offset; - u8 pad14C[0x11]; - s8 unk15D; - u8 pad15E[0x62]; - unsigned char *target; - s32 pursuit_target_mode; - u8 pad1C8[0xc]; - f32 turn_angle; - f32 turn_range_degrees; - u8 pad1DC[0x8]; - f32 movement_speed; - s16 blink_countdown; - s16 hidden; - s32 unk1EC; - u8 pad1F0[0x8]; - s32 path_index; - s32 wander_destination_timer; - s16 spawns_child; - s16 initialize_in_respawn; - u8 pad204[0x4]; - s16 path_point; - s16 target_selection_frame_slot; - char *child; - f32 home_position[4]; - u8 home_rotation[0x10]; - u8 wander_destination[0x10]; - s16 unk240; - s16 unk242; - f32 unk244; - f32 glow_animation_phase; - f32 path_activation_distance_xy; - u8 unk250[0x4]; + u8 pad0[0x29]; + s8 unk29; + u8 pad2A[0x2e]; + s8 unk58; + u8 pad59[0x1]; + s8 unk5A; + u8 pad5B[0x6d]; + s16 unkC8; + u8 padCA[0x6]; + short *unkD0; + u8 padD4[0x4c]; + struct KnockbackMotion knockback; /* 0x120 */ + u8 pad180[0x40]; + unsigned char *target; + s32 pursuit_target_mode; + u8 pad1C8[0xc]; + f32 turn_angle; + f32 turn_range_degrees; + u8 pad1DC[0x8]; + f32 movement_speed; + s16 blink_countdown; + s16 hidden; + s32 unk1EC; + u8 pad1F0[0x8]; + s32 path_index; + s32 wander_destination_timer; + s16 spawns_child; + s16 initialize_in_respawn; + u8 pad204[0x4]; + s16 path_point; + s16 target_selection_frame_slot; + char *child; + f32 home_position[4]; + u8 home_rotation[0x10]; + u8 wander_destination[0x10]; + s16 unk240; + s16 unk242; + f32 unk244; + f32 glow_animation_phase; + f32 path_activation_distance_xy; + u8 unk250[0x4]; } FrogVars; struct MobyHit { @@ -319,10 +311,10 @@ void frog_update(unsigned char *moby) { qcopy(&frog_instance_vars->home_rotation, moby + 0x40); frog_instance_vars->path_point = 0; wait = random_float_between(0.5f, 3.0f); - frog_instance_vars->knockback_gravity = D_0015ED70 * 20.0f; - frog_instance_vars->motion_collision_height_offset = 0; - frog_instance_vars->knockback_speed_approach_rate = 0; - frog_instance_vars->knockback_collision_radius = 0x200; + frog_instance_vars->knockback.gravity = D_0015ED70 * 20.0f; + frog_instance_vars->knockback.collision_z_offset = 0; + frog_instance_vars->knockback.speed_approach_step = 0; + frog_instance_vars->knockback.collision_radius_1024ths = 0x200; frog_instance_vars->unk244 = wait; frog_instance_vars->glow_animation_phase = random_angle_radians(); frog_instance_vars->unkD0 = D_L06_00161BF0; @@ -413,18 +405,18 @@ void frog_update(unsigned char *moby) { home_distance_xy = vector_distance_xy(&MOBY(moby)->pos, &frog_instance_vars->home_position); return_speed = home_distance_xy / (float)scale_game_frames(30); - frog_instance_vars->knockback_speed = return_speed; - frog_instance_vars->knockback_vertical_speed = + frog_instance_vars->knockback.speed = return_speed; + frog_instance_vars->knockback.vertical_speed = FUN_L00_0025abf0(&MOBY(moby)->pos, &frog_instance_vars->home_position, 0, return_speed, - -frog_instance_vars->knockback_gravity); - frog_instance_vars->unk15D = 3; - frog_instance_vars->knockback_motion_flags = 5; + -frog_instance_vars->knockback.gravity); + frog_instance_vars->knockback.unk3D = 3; + frog_instance_vars->knockback.flags = 5; trooper_start_knockback( moby, - &frog_instance_vars->motion, + &frog_instance_vars->knockback, 2, 1, 0, @@ -437,8 +429,8 @@ void frog_update(unsigned char *moby) { case FROG_STATE_JUMP_TO_HOME: set_vector_unit_z(A); blend_frog_rotation_to_facing_frame( - (char *)moby, A, (float *)(&frog_instance_vars->motion)); - if (step_moby_motion(moby, &frog_instance_vars->motion) & 1) { + (char *)moby, A, (float *)(&frog_instance_vars->knockback)); + if (step_moby_motion(moby, &frog_instance_vars->knockback) & 1) { MOBY(moby)->state = FROG_STATE_LANDING_ANIMATION; if (MOBY(moby)->prev_seq != 3) blend_moby_animation(moby, 3, 0, 1); @@ -447,7 +439,7 @@ void frog_update(unsigned char *moby) { } break; case FROG_STATE_AIRBORNE_MOTION: { - int hit = step_moby_motion(moby, &frog_instance_vars->motion); + int hit = step_moby_motion(moby, &frog_instance_vars->knockback); if (hit & 1) { MOBY(moby)->state = FROG_STATE_LANDING_ANIMATION; if (MOBY(moby)->prev_seq != 3) @@ -611,7 +603,7 @@ void frog_update(unsigned char *moby) { } break; case FROG_STATE_SUCK_CANNON_HELD: - if (FUN_L00_002dc9f0(moby, &frog_instance_vars->motion) != 0) { + if (FUN_L00_002dc9f0(moby, &frog_instance_vars->knockback) != 0) { MOBY(moby)->state = FROG_STATE_WANDER; if (MOBY(moby)->prev_seq != 0) blend_moby_animation(moby, 0, 0, scale_game_frames(10)); diff --git a/src/overlays/shared/enemies/large_amoeboid.c b/src/overlays/shared/enemies/large_amoeboid.c index 89ee6f4a39..684211acba 100644 --- a/src/overlays/shared/enemies/large_amoeboid.c +++ b/src/overlays/shared/enemies/large_amoeboid.c @@ -23,6 +23,7 @@ #include "rnc/overlay/shared/enemies/large_amoeboid_data/spawn_amoeboid_burst_sparks_2.h" #include "rnc/overlay/shared/enemies/large_amoeboid_data/spawn_amoeboid_burst_sparks.h" #include "rnc/overlay/shared/mobys/ground_move_control.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" enum { LARGE_AMOEBOID_INITIALIZE = 0, @@ -56,15 +57,8 @@ typedef struct LargeAmoeboidVars { u8 pad59[0x1]; s8 unk5A; u8 pad5B[0x5]; - u8 motion[0x10]; - f32 knockback_gravity; - u8 pad74[0xc]; - s32 knockback_collision_radius; - s32 knockback_motion_flags; - f32 knockback_collision_z_offset; - u8 pad8C[0x11]; - s8 unk9D; - u8 pad9E[0x8a]; + struct KnockbackMotion knockback; /* 0x60 */ + u8 padC0[0x68]; u16 unk128; u8 pad12A[0x6]; void *unk130; @@ -608,7 +602,7 @@ void large_amoeboid_update(unsigned char *moby) { return; } case LARGE_AMOEBOID_PROCESS_KNOCKBACK: - result = step_moby_motion(moby, &large_amoeboid_vars->motion); + result = step_moby_motion(moby, &large_amoeboid_vars->knockback); if (result & 1) { path_hit = follow_path((int *)(&large_amoeboid_vars->path_ids), 1, @@ -665,7 +659,7 @@ void large_amoeboid_update(unsigned char *moby) { } return; case LARGE_AMOEBOID_PROCESS_SUCK_CANNON_INTERACTION: - if (FUN_L00_002dc9f0(moby, &large_amoeboid_vars->motion)) { + if (FUN_L00_002dc9f0(moby, &large_amoeboid_vars->knockback)) { MOBY(moby)->state = LARGE_AMOEBOID_TRY_ACQUIRE_TARGET_PATH; large_amoeboid_vars->unk128 = 0; } @@ -748,12 +742,12 @@ void process_amoeboid_hits_and_update_targeting(char *moby) { fixed_scale = 1024.0f; rate = 0.008f; moby_vars->health = moby_vars->health - hit_decrement; - moby_vars->unk9D = 0; - moby_vars->knockback_gravity = rate; - moby_vars->knockback_motion_flags = 8; - moby_vars->knockback_collision_radius = + moby_vars->knockback.unk3D = 0; + moby_vars->knockback.gravity = rate; + moby_vars->knockback.flags = 8; + moby_vars->knockback.collision_radius_1024ths = truncate_float_to_s32(moby_vars->size_scale * size_multiplier * fixed_scale); - moby_vars->knockback_collision_z_offset = moby_vars->size_scale * size_multiplier; + moby_vars->knockback.collision_z_offset = moby_vars->size_scale * size_multiplier; spawn_amoeboid_burst_sparks((unsigned char *)moby, (float *)(hit_record + 0x10)); if (0.0f < moby_vars->health) { spawned = activate_smaller_amoeboid(moby); diff --git a/src/overlays/shared/mobys/step_moby_motion.c b/src/overlays/shared/mobys/step_moby_motion.c index bcf97d45c8..d476232f58 100644 --- a/src/overlays/shared/mobys/step_moby_motion.c +++ b/src/overlays/shared/mobys/step_moby_motion.c @@ -15,6 +15,7 @@ #include "rnc/world/collision/collision_hit_material.h" #include "rnc/overlay/shared/props/grow_and_fade_out.h" #include "rnc/mobys/moby.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" /* Ported from rac1-decomp (src/overlays/shared/mobyutil_00258BC8.c: func_L00_0025D288), where it is exact; names translated to the US level program. */ @@ -129,51 +130,32 @@ void spawn_particles_at_shape_points(void *source_object, } } -typedef struct { - f32 f0; - f32 f4; - f32 vertical_motion_step; - f32 fC; - u8 p10[8]; - f32 f18; - f32 f1C; - u8 p20[4]; - u32 motion_flags; - u8 p28[4]; - s16 h2C; - u8 p2E[0xE]; - u8 b3C; - u8 p3D; - s16 motion_phase; - f32 f40; - int w44; -} B_25c558; - void blend_moby_animation_ex(void *, int, int, int, int) __asm__("FUN_002130d8"); -void trooper_start_knockback(u8 *a, B_25c558 *b, int c, int d, int e, float f) __asm__("FUN_L00_0025c558"); -void trooper_start_knockback(u8 *moby, - B_25c558 *knockback_state, - int animation_index, - int animation_timing_divisor, - int animation_frame_index, +void trooper_start_knockback( + u8 *a, struct KnockbackMotion *b, int c, int d, int e, float f) __asm__("FUN_L00_0025c558"); +void trooper_start_knockback(u8 *moby, + struct KnockbackMotion *knockback_state, + int animation_index, + int animation_timing_divisor, + int animation_frame_index, float knockback_angle) { float *moby_vars_record; - knockback_state->f0 = fast_cos(knockback_angle) * knockback_state->f18; - knockback_state->f4 = fast_sin(knockback_angle) * knockback_state->f18; - knockback_state->vertical_motion_step = knockback_state->f1C; - knockback_state->fC = 1.0f; - knockback_state->f40 = fast_add_rotations(knockback_angle, 3.1415927f); - knockback_state->w44 = 0; - knockback_state->h2C = scale_game_frames(300); - knockback_state->motion_phase = 0; - knockback_state->b3C = 1; + knockback_state->velocity[0] = fast_cos(knockback_angle) * knockback_state->speed; + knockback_state->velocity[1] = fast_sin(knockback_angle) * knockback_state->speed; + knockback_state->velocity[2] = knockback_state->vertical_speed; + knockback_state->velocity[3] = 1.0f; + knockback_state->turn_target = fast_add_rotations(knockback_angle, 3.1415927f); + knockback_state->turn_velocity = 0.0f; + knockback_state->timer = scale_game_frames(300); + knockback_state->phase = 0; + knockback_state->active = 1; moby_vars_record = get_moby_target_info(moby); if (moby_vars_record && *moby_vars_record == 0.0f) { - knockback_state->motion_flags |= 0x20; + knockback_state->flags |= 0x20; MOBY(moby)->collision = 0; } - if (knockback_state->motion_flags & 2) + if (knockback_state->flags & 2) blend_moby_animation_ex( moby, animation_index, animation_frame_index, animation_timing_divisor, 1); else @@ -206,9 +188,9 @@ extern int collision_line(void *, void *, int, void *, int) __asm__("FUN_001ef extern int func_L00_001F10E0_l(void *, float, int, void *) __asm__("FUN_L00_001f0d60"); extern int func_L00_001F2BE8_d6f0(float, void *, int, void *, void *) __asm__("FUN_L00_001f2868"); -int step_moby_motion(char *moby, char *st) __asm__("FUN_L00_0025c698"); +int step_moby_motion(char *moby, struct KnockbackMotion *st) __asm__("FUN_L00_0025c698"); -int step_moby_motion(char *moby, char *motion_state) { +int step_moby_motion(char *moby, struct KnockbackMotion *motion_state) { enum { MOTION_RISING = 0, MOTION_FALLING = 1, @@ -230,53 +212,52 @@ int step_moby_motion(char *moby, char *motion_state) { rr, one; int result_count, i; - *(float *)(motion_state + 0x8) = - *(float *)(motion_state + 0x8) - *(float *)(motion_state + 0x10); - if (*(unsigned char *)(motion_state + 0x2E) == 1) { - if (*(unsigned char *)(motion_state + 0x2F) != 0) { + motion_state->velocity[2] = motion_state->velocity[2] - motion_state->gravity; + if (motion_state->particle_mode == 1) { + if (motion_state->particle_count != 0) { spawn_particles_at_shape_points( - moby, motion_state, (void *)(int)*(unsigned char *)(motion_state + 0x2F)); + moby, motion_state->velocity, (void *)(int)motion_state->particle_count); } } - horizontal_motion_magnitude = vector_length_xy(motion_state); - motion_or_record_value = - (*(short *)(motion_state + 0x3E) == 2) ? 0.0f : *(float *)(motion_state + 0x4C); + horizontal_motion_magnitude = vector_length_xy(motion_state->velocity); + motion_or_record_value = (motion_state->phase == 2) ? 0.0f : motion_state->target_speed; approach_value( - &horizontal_motion_magnitude, motion_or_record_value, *(float *)(motion_state + 0x14)); - set_vector_length_xy((float *)motion_state, (float *)motion_state, horizontal_motion_magnitude); - if (*(float *)(motion_state + 0x1C) < *(float *)(motion_state + 0x8)) { - *(float *)(motion_state + 0x8) = *(float *)(motion_state + 0x1C); + &horizontal_motion_magnitude, motion_or_record_value, motion_state->speed_approach_step); + set_vector_length_xy( + motion_state->velocity, motion_state->velocity, horizontal_motion_magnitude); + if (motion_state->vertical_speed < motion_state->velocity[2]) { + motion_state->velocity[2] = motion_state->vertical_speed; } qcopy(height_probe_position, &MOBY(moby)->pos); - height_probe_position[2] = height_probe_position[2] + *(float *)(motion_state + 0x28); + height_probe_position[2] = height_probe_position[2] + motion_state->collision_z_offset; ground_reference_height = probe_ground_height(height_probe_position, 0, 0.5f); if (collision_hit_material() == 0) { - if (*(float *)(motion_state + 0x5C) == 0.0f && + if (motion_state->ground_bounces == 0.0f && ground_reference_height <= height_probe_position[2] && - height_probe_position[2] + *(float *)(motion_state + 0x8) < ground_reference_height) { - *(float *)(motion_state + 0x5C) = 1.0f; + height_probe_position[2] + motion_state->velocity[2] < ground_reference_height) { + motion_state->ground_bounces = 1.0f; height_probe_position[2] = ground_reference_height; spawn_burst_moby(height_probe_position, 3.0f); } ground_reference_height = func_L00_0025A748_f(&MOBY(moby)->pos); } else { - if ((*(int *)(motion_state + 0x24) & 0x10) || *(short *)(motion_state + 0x3E) == 2) { - fast_vec_add(collision_probe_position, &MOBY(moby)->pos, motion_state); + if ((motion_state->flags & 0x10) || motion_state->phase == 2) { + fast_vec_add(collision_probe_position, &MOBY(moby)->pos, motion_state->velocity); if (func_L00_0025A748_f(collision_probe_position) < ground_reference_height - 0.25f) { - set_vector_length_xy((float *)motion_state, (float *)motion_state, 0.0f); + set_vector_length_xy(motion_state->velocity, motion_state->velocity, 0.0f); } } } - if (*(float *)(motion_state + 0x5C) != 0.0f) { - if (*(float *)(motion_state + 0x5C) < 4.0f) { - fast_vec_scale(motion_state, motion_state, 0.7f); + if (motion_state->ground_bounces != 0.0f) { + if (motion_state->ground_bounces < 4.0f) { + fast_vec_scale(motion_state->velocity, motion_state->velocity, 0.7f); } - if (*(float *)(motion_state + 0x5C) < 7.0f) { - *(float *)(motion_state + 0x5C) = *(float *)(motion_state + 0x5C) + 1.0f; - *(float *)(motion_state + 0x10) = *(float *)(motion_state + 0x10) * 0.75f; + if (motion_state->ground_bounces < 7.0f) { + motion_state->ground_bounces = motion_state->ground_bounces + 1.0f; + motion_state->gravity = motion_state->gravity * 0.75f; } } if (MOBY(moby)->pos.x < 2.0f || 1021.0f < MOBY(moby)->pos.x || MOBY(moby)->pos.y < 2.0f || @@ -284,15 +265,15 @@ int step_moby_motion(char *moby, char *motion_state) { flags = 0x100; } - if (*(float *)(motion_state + 0x54) != -1.0f && *(float *)(motion_state + 0x50) != -1.0f) { - switch (*(short *)(motion_state + 0x3E)) { + if (motion_state->landing_animation_frame != -1.0f && + motion_state->apex_animation_frame != -1.0f) { + switch (motion_state->phase) { case MOTION_RISING: { float ratio; - ratio = - absolute_float(*(float *)(motion_state + 0x8) / *(float *)(motion_state + 0x10)); + ratio = absolute_float(motion_state->velocity[2] / motion_state->gravity); if (2.0f < ratio) { motion_or_record_value = compute_interpolated_record_value(moby); - rr = (*(float *)(motion_state + 0x50) - motion_or_record_value) / ratio; + rr = (motion_state->apex_animation_frame - motion_or_record_value) / ratio; if (0.0f < rr) { approach_value((float *)&MOBY(moby)->anim_speed, rr, frame_scale * 0.1f); } @@ -301,17 +282,17 @@ int step_moby_motion(char *moby, char *motion_state) { } case MOTION_FALLING: motion_or_record_value = compute_interpolated_record_value(moby); - if (*(float *)(motion_state + 0x54) <= motion_or_record_value) { + if (motion_state->landing_animation_frame <= motion_or_record_value) { *(int *)(moby + 0x58) = 0; } else { - float negative_half_gravity_step = *(float *)(motion_state + 0x10) * -0.5f; + float negative_half_gravity_step = motion_state->gravity * -0.5f; landing_prediction_divisor = 60.0f; - result_count = solve_quadratic_equation( - &larger_quadratic_root, - &smaller_quadratic_root, - negative_half_gravity_step, - *(float *)(motion_state + 0x8) - negative_half_gravity_step, - MOBY(moby)->pos.z - ground_reference_height); + result_count = + solve_quadratic_equation(&larger_quadratic_root, + &smaller_quadratic_root, + negative_half_gravity_step, + motion_state->velocity[2] - negative_half_gravity_step, + MOBY(moby)->pos.z - ground_reference_height); if (result_count > 0 && 0.0f < larger_quadratic_root && larger_quadratic_root < landing_prediction_divisor) { landing_prediction_divisor = larger_quadratic_root; @@ -320,7 +301,7 @@ int step_moby_motion(char *moby, char *motion_state) { landing_prediction_divisor = 0.0001f; } motion_or_record_value = compute_interpolated_record_value(moby); - rr = (*(float *)(motion_state + 0x54) - motion_or_record_value) / + rr = (motion_state->landing_animation_frame - motion_or_record_value) / landing_prediction_divisor; if (2.0f < rr) { rr = 2.0f; @@ -339,92 +320,97 @@ int step_moby_motion(char *moby, char *motion_state) { if (MOBY(moby)->anim_flags & 2) { flags |= 0x40; } - if (!(*(int *)(motion_state + 0x24) & 4)) { + if (!(motion_state->flags & 4)) { FUN_L00_00258278(moby, - (float *)(motion_state + 0x44), - *(float *)(motion_state + 0x40), + &motion_state->turn_velocity, + motion_state->turn_target, 0.02f, 0.3f, - *(float *)(motion_state + 0x48)); + motion_state->max_turn_step); } i = 0; qcopy(eye, &MOBY(moby)->pos); - eye[2] = eye[2] + *(float *)(motion_state + 0x28); - fast_vec_add(&MOBY(moby)->pos, &MOBY(moby)->pos, motion_state); + eye[2] = eye[2] + motion_state->collision_z_offset; + fast_vec_add(&MOBY(moby)->pos, &MOBY(moby)->pos, motion_state->velocity); qcopy(collision_probe_position, &MOBY(moby)->pos); - collision_probe_position[2] = collision_probe_position[2] + *(float *)(motion_state + 0x28); - fast_vec_add(predicted_query_position, collision_probe_position, motion_state); - result_count = func_L00_001F2BE8_d6f0(convert_integer_to_float(*(int *)(motion_state + 0x20)) * - 0.0010742187732830644f, - predicted_query_position, - 16, - moby, - 0); + collision_probe_position[2] = collision_probe_position[2] + motion_state->collision_z_offset; + fast_vec_add(predicted_query_position, collision_probe_position, motion_state->velocity); + result_count = func_L00_001F2BE8_d6f0( + convert_integer_to_float(motion_state->collision_radius_1024ths) * 0.0010742187732830644f, + predicted_query_position, + 16, + moby, + 0); if (i < result_count) { int **pp = D_L00_00177F00; int k = result_count; do { if (is_moby_in_class_range_500_to_540(*pp) == 0) { - if (*(int *)(motion_state + 0x24) & 0x20) { - if (*(short *)(motion_state + 0x3E) == 2) { + if (motion_state->flags & 0x20) { + if (motion_state->phase == 2) { flags |= 0x100; } } } else { - spawn_nearby_effect( - (char *)*pp, 1.0f, (int)moby, 0x10000, &MOBY(moby)->pos, motion_state); + spawn_nearby_effect((char *)*pp, + 1.0f, + (int)moby, + 0x10000, + &MOBY(moby)->pos, + motion_state->velocity); } pp++; } while (--k != 0); } sc = 0.0009765625f; - motion_or_record_value = fast_vec_length(motion_state); - if ((float)*(int *)(motion_state + 0x20) * sc < motion_or_record_value) { + motion_or_record_value = fast_vec_length(motion_state->velocity); + if ((float)motion_state->collision_radius_1024ths * sc < motion_or_record_value) { collision_line(eye, collision_probe_position, 36, moby, 0); qcopy(collision_probe_position, &D_94C8_60); } if (func_L00_001F10E0_l(collision_probe_position, - convert_integer_to_float(*(int *)(motion_state + 0x20)) * sc, + convert_integer_to_float(motion_state->collision_radius_1024ths) * sc, 36, moby) != 0) { flags |= 2; collision_result_position = (Vec4 *)&coll_hit_position; qcopy(&MOBY(moby)->pos, collision_result_position); one = 1.0f; - MOBY(moby)->pos.z = MOBY(moby)->pos.z - *(float *)(motion_state + 0x28); + MOBY(moby)->pos.z = MOBY(moby)->pos.z - motion_state->collision_z_offset; fast_vec_normalize(surface_normal, (char *)collision_result_position + 0x10, one); if (0.7070000171661377f <= surface_normal[2]) { - float motion_normal_dot = fast_vec_dot(motion_state, surface_normal); + float motion_normal_dot = fast_vec_dot(motion_state->velocity, surface_normal); if (motion_normal_dot < 0.0f) { collision_metadata = (char *)collision_result_position - 0x30; if (*(int *)(collision_metadata + 0x18) == 0 || *(int *)(collision_metadata + 0x1C) > 0) { flags |= 1; - *(short *)(motion_state + 0x3E) = 2; + motion_state->phase = 2; } fast_vec_normalize(normal_response_vector, surface_normal, motion_normal_dot); - fast_vec_sub(motion_state, motion_state, normal_response_vector); - if (*(short *)(motion_state + 0x3E) == 2) { - f6c = fast_vec_length(motion_state); - approach_value(&f6c, 0.0f, *(float *)(motion_state + 0x10)); - fast_vec_normalize(motion_state, motion_state, f6c); + fast_vec_sub( + motion_state->velocity, motion_state->velocity, normal_response_vector); + if (motion_state->phase == 2) { + f6c = fast_vec_length(motion_state->velocity); + approach_value(&f6c, 0.0f, motion_state->gravity); + fast_vec_normalize(motion_state->velocity, motion_state->velocity, f6c); } } } else { - float normal_response_scale = fast_vec_dot(motion_state, surface_normal); + float normal_response_scale = fast_vec_dot(motion_state->velocity, surface_normal); if (normal_response_scale < 0.0f) { - normal_response_scale = - normal_response_scale * -(*(float *)(motion_state + 0x30) + one); + normal_response_scale = normal_response_scale * -(motion_state->restitution + one); fast_vec_normalize(normal_response_vector, surface_normal, normal_response_scale); - fast_vec_add(motion_state, motion_state, normal_response_vector); + fast_vec_add( + motion_state->velocity, motion_state->velocity, normal_response_vector); } } } - if (*(short *)(motion_state + 0x3E) == 0) { - if (*(float *)(motion_state + 0x8) < 0.0f) { - *(short *)(motion_state + 0x3E) = 1; + if (motion_state->phase == 0) { + if (motion_state->velocity[2] < 0.0f) { + motion_state->phase = 1; } } return flags; From bfc43c33fc7a9ba26109a0d36704f9a097fb15e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:32:20 +0000 Subject: [PATCH 048/213] decomp: name grindrail camera path, rate and basis fields --- src/overlays/shared/camera/grindrail_camera.c | 155 ++++++++++-------- 1 file changed, 85 insertions(+), 70 deletions(-) diff --git a/src/overlays/shared/camera/grindrail_camera.c b/src/overlays/shared/camera/grindrail_camera.c index a8547132a8..3b1a3c4e66 100644 --- a/src/overlays/shared/camera/grindrail_camera.c +++ b/src/overlays/shared/camera/grindrail_camera.c @@ -31,10 +31,10 @@ typedef struct { typedef struct { Vec4 vel; /* 0x00 */ u8 pad10[0x10]; - f32 unk20; /* 0x20 */ - f32 unk24; /* 0x24 */ - f32 unk28; /* 0x28 */ - s16 unk2C; /* 0x2C */ + f32 pitch_rate; /* 0x20: eased toward the path rate */ + f32 unk24; /* 0x24 */ + f32 unk28; /* 0x28 */ + s16 unk2C; /* 0x2C */ u8 pad2E[0x22]; } CameraView; @@ -59,11 +59,11 @@ typedef struct { } CameraBlend; typedef struct { - Vec4 axis; /* 0x00 */ - f32 unk10; /* 0x10 */ - f32 unk14; /* 0x14 */ - s32 unk18; /* 0x18 */ - s16 mode; /* 0x1C */ + Vec4 axis; /* 0x00 */ + f32 position_rate; /* 0x10: eased toward the path node speed */ + f32 unk14; /* 0x14 */ + s32 unk18; /* 0x18 */ + s16 mode; /* 0x1C */ u8 pad1E[2]; f32 unk20; /* 0x20 */ s32 unk24; /* 0x24 */ @@ -98,14 +98,14 @@ typedef struct { typedef struct { f32 lead; /* 0x00 */ u8 pad4[0x1C]; - s32 track_path; /* 0x20: D_L01_001B0930 path the first path is measured along */ - s32 target; /* 0x24: row of l01_splines */ - s32 path; /* 0x28: D_L01_001B0930 path */ - s32 look_path; /* 0x2C: D_L01_001B0930 path measured along the target's path */ - s32 kind; /* 0x30 */ - s16 ready; /* 0x34: paths prepared */ - s16 unk36; /* 0x36: 1 when the camera starts on the far side of a kind 3 path */ - f32 unk38; /* 0x38 */ + s32 track_path; /* 0x20: D_L01_001B0930 path the first path is measured along */ + s32 target; /* 0x24: row of l01_splines */ + s32 path; /* 0x28: D_L01_001B0930 path */ + s32 look_path; /* 0x2C: D_L01_001B0930 path measured along the target's path */ + s32 kind; /* 0x30 */ + s16 ready; /* 0x34: paths prepared */ + s16 far_side; /* 0x36: 1 when the camera starts on the far side of a kind 3 path */ + f32 position_lead; /* 0x38: distance the camera position is sampled ahead along its path */ } CameraPreset; typedef struct { @@ -148,7 +148,7 @@ void reset_camera_state_and_prepare_preset_paths(Camera *destination_camera) { spring->unk4 = 0.5f; spring->height = 2.0f; orbit = destination_camera->orbit; - orbit->unk10 = 0.01f; + orbit->position_rate = 0.01f; orbit->unk14 = 0.175f; orbit->unk18 = 0; orbit->mode = 0; @@ -156,7 +156,7 @@ void reset_camera_state_and_prepare_preset_paths(Camera *destination_camera) { orbit->unk24 = 0; clear_u64_value(orbit); view = &destination_camera->orbit->view; - view->unk20 = 0.01f; + view->pitch_rate = 0.01f; view->unk24 = 0.3f; view->unk28 = 0.2f; view->unk2C = 0; @@ -261,16 +261,16 @@ typedef struct { typedef struct { char p00[0x20]; - float unk20; + float pitch_rate; char p24[0x10]; - float unk34; + float pitch_velocity; char p38[0x18]; } SubA; typedef struct { float pos[4]; char p10[0x3C]; - float unk4C; + float dist; char p50[0x80]; } SubB; @@ -278,13 +278,13 @@ typedef struct { int idx; float t; int p08[2]; - int unk10; + int hero_range_node; /* path node whose segment range holds the hero */ } SubC; typedef struct { float vel[3]; float unk0C; - float unk10; + float position_rate; char p14[0x1C]; SubA a; SubB b; @@ -292,15 +292,15 @@ typedef struct { } Data; typedef struct { - float unk0[4]; - float unk10[4]; - float unk20[4]; + float forward[4]; + float right[4]; + float up[4]; float pos[4]; - float unk40[4]; + float prev_forward[4]; char p50[0x20]; Data *data; char p74[0x10]; - short unk84; + short preset; } Cam; extern CameraPresetRow *l01_camera_preset_rows_macro __asm__("D_L01_0015EF50") MACRO_ADDR; @@ -326,14 +326,15 @@ void update_camera_position_and_orientation_from_paths(Cam *camera_to_update) { SubA *look = &data->a; SubB *follow = &data->b; SubC *progress = &data->c; - CameraPreset *camera_path_preset = l01_camera_preset_rows_macro[camera_to_update->unk84].preset; - float rate = 0.01f; - int mode = camera_path_preset->kind; - int path_index = camera_path_preset->track_path; - float lead = camera_path_preset->lead; - float pitch_error; - float look_length; - float pitch_step; + CameraPreset *camera_path_preset = + l01_camera_preset_rows_macro[camera_to_update->preset].preset; + float rate = 0.01f; + int mode = camera_path_preset->kind; + int path_index = camera_path_preset->track_path; + float lead = camera_path_preset->lead; + float pitch_error; + float look_length; + float pitch_step; if (mode == CAMERA_PRESET_KIND_RAIL_SEGMENT_SYNC) { Path *path; @@ -396,7 +397,7 @@ void update_camera_position_and_orientation_from_paths(Cam *camera_to_update) { } previous_path_node_index = i; } - progress->unk10 = i; + progress->hero_range_node = i; sum = 0.0f; j = (i - 1 + pathB->n) % pathB->n; hero_length = pathB->nodes[i].y; @@ -424,19 +425,31 @@ void update_camera_position_and_orientation_from_paths(Cam *camera_to_update) { rate *= speed_scale; speed_scale *= 0.01f; } - if (absolute_float(data->unk10 - speed_scale) < 0.00015f) { - data->unk10 = speed_scale; - } else if (data->unk10 < speed_scale) { - data->unk10 = data->unk10 + 0.00015f; + if (absolute_float(data->position_rate - speed_scale) < 0.00015f) { + data->position_rate = speed_scale; + } else if (data->position_rate < speed_scale) { + data->position_rate = data->position_rate + 0.00015f; } else { - data->unk10 = data->unk10 - 0.00015f; + data->position_rate = data->position_rate - 0.00015f; } - camera_to_update->pos[0] = cam_interp_values( - camera_to_update->pos[0], look_target[0], &data->vel[0], data->unk10, 0.175f, 0.0f); - camera_to_update->pos[1] = cam_interp_values( - camera_to_update->pos[1], look_target[1], &data->vel[1], data->unk10, 0.175f, 0.0f); - camera_to_update->pos[2] = cam_interp_values( - camera_to_update->pos[2], look_target[2], &data->vel[2], data->unk10, 0.175f, 0.0f); + camera_to_update->pos[0] = cam_interp_values(camera_to_update->pos[0], + look_target[0], + &data->vel[0], + data->position_rate, + 0.175f, + 0.0f); + camera_to_update->pos[1] = cam_interp_values(camera_to_update->pos[1], + look_target[1], + &data->vel[1], + data->position_rate, + 0.175f, + 0.0f); + camera_to_update->pos[2] = cam_interp_values(camera_to_update->pos[2], + look_target[2], + &data->vel[2], + data->position_rate, + 0.175f, + 0.0f); } else { Path *path = ((Path *)l01_paths[path_index]); @@ -452,10 +465,10 @@ void update_camera_position_and_orientation_from_paths(Cam *camera_to_update) { 20.0f, 1.0f, 0.0f); - if (camera_path_preset->unk36 == 1) { - lead_offset = -(camera_path_preset->unk38 * 4.0f); + if (camera_path_preset->far_side == 1) { + lead_offset = -(camera_path_preset->position_lead * 4.0f); } else { - lead_offset = camera_path_preset->unk38; + lead_offset = camera_path_preset->position_lead; } sample_path(path, path_point, &segment, &fraction, lead_offset, 1); qcopy(camera_goal, path_point); @@ -469,7 +482,7 @@ void update_camera_position_and_orientation_from_paths(Cam *camera_to_update) { path_point, &hero_segment, &hero_fraction, - camera_path_preset->unk38, + camera_path_preset->position_lead, 1); FUN_L00_0025df68( path, path_point, camera_goal, &segment, &fraction, 0, 20.0f, 1.0f, 0.0f); @@ -514,32 +527,34 @@ void update_camera_position_and_orientation_from_paths(Cam *camera_to_update) { lead, 1); } - fast_vec_normalize(look_offset, camera_basis_reference_direction, follow->unk4C); + fast_vec_normalize(look_offset, camera_basis_reference_direction, follow->dist); fast_vec_add(path_point, look_offset, look_target); fast_vec_sub(look_dir, path_point, camera_to_update->pos); look_length = fast_vec_length(look_dir); if (look_length != 0.0f) { fast_vec_scale(look_dir, look_dir, 1.0f / look_length); - pitch_error = 1.5707964f - fast_arc_sin(fast_vec_dot(look_dir, camera_to_update->unk0)); + pitch_error = 1.5707964f - fast_arc_sin(fast_vec_dot(look_dir, camera_to_update->forward)); } else { pitch_error = 0.0f; } - if (absolute_float(look->unk20 - rate) < 0.00015f) { - look->unk20 = rate; - } else if (look->unk20 < rate) { - look->unk20 = look->unk20 + 0.00015f; + if (absolute_float(look->pitch_rate - rate) < 0.00015f) { + look->pitch_rate = rate; + } else if (look->pitch_rate < rate) { + look->pitch_rate = look->pitch_rate + 0.00015f; } else { - look->unk20 = look->unk20 - 0.00015f; + look->pitch_rate = look->pitch_rate - 0.00015f; } - pitch_step = rope_spring_turn(&look->unk34, 0.0f, pitch_error, look->unk20, 0.175f, 0.0f); - fast_vec_cross(delta, look_dir, camera_to_update->unk40); - build_look_at_matrix(camera_to_update->unk0, camera_to_update->unk40, delta, pitch_step); - fast_vec_normalize(camera_to_update->unk40, camera_to_update->unk0, 1.0f); - fast_vec_normalize(camera_to_update->unk0, camera_to_update->unk0, 1.0f); + pitch_step = + rope_spring_turn(&look->pitch_velocity, 0.0f, pitch_error, look->pitch_rate, 0.175f, 0.0f); + fast_vec_cross(delta, look_dir, camera_to_update->prev_forward); + build_look_at_matrix( + camera_to_update->forward, camera_to_update->prev_forward, delta, pitch_step); + fast_vec_normalize(camera_to_update->prev_forward, camera_to_update->forward, 1.0f); + fast_vec_normalize(camera_to_update->forward, camera_to_update->forward, 1.0f); fast_vec_cross( - camera_to_update->unk10, camera_to_update->unk0, camera_basis_reference_direction); - fast_vec_normalize(camera_to_update->unk10, camera_to_update->unk10, 1.0f); - fast_vec_cross(camera_to_update->unk20, camera_to_update->unk10, camera_to_update->unk0); + camera_to_update->right, camera_to_update->forward, camera_basis_reference_direction); + fast_vec_normalize(camera_to_update->right, camera_to_update->right, 1.0f); + fast_vec_cross(camera_to_update->up, camera_to_update->right, camera_to_update->forward); } extern Camera *D_L01_00167284 NOT_SDA; @@ -572,7 +587,7 @@ void initialize_camera_transform_and_paths(Camera *destination_camera) { } } - camera_preset->unk36 = 0; + camera_preset->far_side = 0; if (camera_preset->kind == CAMERA_PRESET_KIND_GRINDRAIL_PATH) { CameraPath *path; s32 next; @@ -590,7 +605,7 @@ void initialize_camera_transform_and_paths(Camera *destination_camera) { fast_vec_normalize(&delta, &delta, 1.0f); fast_vec_sub(&to_camera, (char *)destination_camera + 0x30, &D_0013F3D0_315de0); if (0.0f < fast_vec_dot(&to_camera, &delta)) - camera_preset->unk36 = 1; + camera_preset->far_side = 1; } } } From e084a63025c93b099793d838594ec9e60c65a051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:36:58 +0000 Subject: [PATCH 049/213] decomp: name pause menu state and level map fields in shared ui and game --- include/rnc/game/overlay_game_state.h | 66 ++++--- .../shared/game/run_level_main_loop.c | 23 ++- .../decompress_and_relocate_selected_groups.c | 4 +- .../shared/ui/menus/initialize_pause_menu.c | 184 +++++++++--------- .../shared/ui/menus/pause_menu_entry_input.c | 10 +- 5 files changed, 146 insertions(+), 141 deletions(-) diff --git a/include/rnc/game/overlay_game_state.h b/include/rnc/game/overlay_game_state.h index 6d6c327db1..b02796840e 100644 --- a/include/rnc/game/overlay_game_state.h +++ b/include/rnc/game/overlay_game_state.h @@ -7,56 +7,58 @@ struct Mth; struct NO; +/* A pause menu page; the level copy of struct MenuPage (rnc/ui/menus/menu_system.h). */ struct Own { - s32 ids[14]; - struct Own *unk38; - s32 unk3C; - struct Mth *unk40; + s32 ids[14]; /* 0x00: animation per page moby */ + struct Own *back; /* 0x38: page for the back button (pad 0x10); 0 = none */ + s32 state; /* 0x3C */ + struct Mth *focus; /* 0x40: object with input focus */ struct NO *objs[14]; u8 pad7C[4]; - struct Mth *unk80; + struct Mth *pending_focus; /* 0x80 */ }; -/* Shared Level 00 state; previously separate allocation, HUD and voice views. */ +/* Shared Level 00 state of the pause menu; the level copy of struct MenuSystem + (rnc/ui/menus/menu_system.h), whose names it uses. */ struct GameState { s32 state; struct Own *owner; - struct Own *unk8; - s32 unkC; - s32 unk10; - s32 unk14; - s32 saved_texture_start; - u8 pad1C[0x14]; - s32 saved_items[4]; - Vec4 v40; - Vec4 v50; - u8 pad60[0x6C]; - s32 saved_seq_count; - struct Own *unkD0; + struct Own *next; /* 0x08: requested page */ + s32 close_request; /* 0x0C: action on close: 2 level, 3..6 movies and scenes, 7 slideshow */ + s32 graphics_workspace; /* 0x10: compressed HUD data and draw buffer chunks */ + s32 timer; /* 0x14: 12 on a page switch, 2 on close; counts down */ + s32 saved_texture_start; + u8 pad1C[0x14]; + s32 saved_items[4]; + Vec4 saved_camera_position; /* 0x40: g_debug_camera.position while paused */ + Vec4 saved_camera_angles; /* 0x50 */ + u8 pad60[0x6C]; + s32 saved_seq_count; + struct Own *previous; /* 0xD0: page left by the last switch */ u8 padD4[4]; - s32 unkD8; + s32 goodies_tab_shown; /* 0xD8: page moby 6 is drawn only while set */ u8 padDC[8]; - void *unkE4; - f32 unkE8; + void *travel_level; /* 0xE4: level, movie or scene for close_request */ + f32 saved_tan_half_fov; /* 0xE8 */ void *unkEC; struct Own *pending_owner; s32 pending_state; u8 padF8[4]; - s32 first_base; /* 0xFC: render archive allocation */ - s32 second_base; /* 0x100 */ - s32 unk104; - s32 unk108; - s32 unk10C; + s32 first_base; /* 0xFC: render archive allocation */ + s32 second_base; /* 0x100 */ + s32 preview_workspace; /* 0x104: decompression destination */ + s32 help_text_buffer; /* 0x108 */ + s32 stream_buffer_base; /* 0x10C */ s32 progress; u8 pad114[0x124 - 0x114]; - s32 unk124; + s32 close_locked; /* 0x124: nonzero blocks back from closing the menu */ u8 pad128[0x130 - 0x128]; - s32 unk130; + s32 saved_decode_mode; /* 0x130: decode_mode before a menu movie */ u8 pad134[0x13C - 0x134]; - s32 unk13C; - s32 unk140; - s32 unk144; - s32 stash_handles[20]; /* 0x148: FUN_L00_00276078 */ + s32 memcard_icon_hidden; /* 0x13C: skips the busy card icon for one frame */ + s32 resource_table_class; /* 0x140: oclass at the last resource table select */ + s32 last_resource_table_toggle; /* 0x144 */ + s32 stash_handles[20]; /* 0x148: FUN_L00_00276078 */ }; extern struct GameState D_L00_001B9CF0 __attribute__((section(".data"))); diff --git a/src/overlays/shared/game/run_level_main_loop.c b/src/overlays/shared/game/run_level_main_loop.c index a10462fc8e..149a293a7f 100644 --- a/src/overlays/shared/game/run_level_main_loop.c +++ b/src/overlays/shared/game/run_level_main_loop.c @@ -233,7 +233,7 @@ void run_level_main_loop(void) { run_state_handler(); if (memory_card_state.state >= MEMCARD_REQUEST_FORMAT || memory_card_state.pending_state >= MEMCARD_QUERY_INFO) { - if (D_L00_001B9CF0.unk13C == 0) { + if (D_L00_001B9CF0.memcard_icon_hidden == 0) { int rotation_period_frames = 55; float size; float sprite_rotation_radians; @@ -257,7 +257,7 @@ void run_level_main_loop(void) { do_gif_paging(); } } - D_L00_001B9CF0.unk13C = 0; + D_L00_001B9CF0.memcard_icon_hidden = 0; flush_debug_text_queue(); noop_main_callback(level_frame_callback_args, 0x10); noop_main_callback(level_frame_callback_args, 0x10); @@ -341,13 +341,13 @@ typedef struct { s32 second_raw; u8 pad18[0xc]; s32 active; - s32 unk28; + s32 coverage_enabled; /* 0x28: set while the level has a map archive */ u8 pad2c[4]; MapChunkSlot slots[8]; u8 padB0[4]; - f32 unkB4[20]; - s32 unk104[20]; - s32 map_parameter_pair_second_values[20]; + f32 zoom[20]; /* 0xB4: per map, the level copy of struct MapState */ + s32 pan_x[20]; /* 0x104 */ + s32 pan_y[20]; /* 0x154 */ u8 pad1a4[0x80]; s32 archive_index; s32 load_state; @@ -408,10 +408,9 @@ void initialize_level_map_archive(void) { { int i; for (i = 0; i < 20; i++) { - D_L00_001841F0.unk104[i] = map_parameter_pair_defaults[i * 2]; - D_L00_001841F0.unkB4[i] = 0.65f; - D_L00_001841F0.map_parameter_pair_second_values[i] = - map_parameter_pair_defaults[i * 2 + 1]; + D_L00_001841F0.pan_x[i] = map_parameter_pair_defaults[i * 2]; + D_L00_001841F0.zoom[i] = 0.65f; + D_L00_001841F0.pan_y[i] = map_parameter_pair_defaults[i * 2 + 1]; } } level = current_level_index; @@ -442,7 +441,7 @@ void initialize_level_map_archive(void) { } if (file->size != 0) { state = &D_L00_001841F0; - state->unk28 = 1; + state->coverage_enabled = 1; heap_tag = (int)render_archive_source_file; archive_base = ((int **)&D_L00_00173E08)[0]; archive = (int *)((int)archive_base + 0x9A800); @@ -492,7 +491,7 @@ void initialize_level_map_archive(void) { D_L00_001841F0.scratch_data = 0; D_L00_001841F0.mask_data = 0; D_L00_001841F0.second_data = 0; - D_L00_001841F0.unk28 = 0; + D_L00_001841F0.coverage_enabled = 0; } } diff --git a/src/overlays/shared/ui/hud/decompress_and_relocate_selected_groups.c b/src/overlays/shared/ui/hud/decompress_and_relocate_selected_groups.c index 3c948f6208..0e555270ac 100644 --- a/src/overlays/shared/ui/hud/decompress_and_relocate_selected_groups.c +++ b/src/overlays/shared/ui/hud/decompress_and_relocate_selected_groups.c @@ -33,8 +33,8 @@ void decompress_and_relocate_selected_groups(int mode) { HUD_DECOMPRESS_BOTH_OPTIONAL_BANKS = 2 }; G_234fd0 *decompression_slot_state = &D_L00_0017E4D8_lui; - int decompression_destination = D_L00_001B9CF0.unk104; - void *compressed_data_buffer = (void *)D_L00_001B9CF0.unk10; + int decompression_destination = D_L00_001B9CF0.preview_workspace; + void *compressed_data_buffer = (void *)D_L00_001B9CF0.graphics_workspace; { int slot_1_size; if ((slot_1_size = decompression_slot_state->t->sz[1])) { diff --git a/src/overlays/shared/ui/menus/initialize_pause_menu.c b/src/overlays/shared/ui/menus/initialize_pause_menu.c index 22b8033f9b..44d585daea 100644 --- a/src/overlays/shared/ui/menus/initialize_pause_menu.c +++ b/src/overlays/shared/ui/menus/initialize_pause_menu.c @@ -118,8 +118,8 @@ typedef struct { u8 pad0[0x224]; s32 transition_target_level; u8 pad228[0x18]; - s32 unk240; - s32 unk244; + s32 map_image_vram; /* 0x240: 512x512 map image, the level copy of struct MapState */ + s32 tex_clut_vram; /* 0x244: CLUT after the image */ s32 texture_slots[4]; } G841F0; @@ -224,53 +224,53 @@ void initialize_pause_menu(void) { D_L00_00173E40_lui[4] |= 0x80000000; state_id = state->state; - state->unk124 = 0; - state->unkD0 = 0; + state->close_locked = 0; + state->previous = 0; if (state_id == 10) { D_L00_001B9CF0.state = PAUSE_MENU_STATE_CLOSE_ON_ACTION; page = &l00_pause_menu_close_on_action_page_owner; state->owner = page; - state->unk8 = page; + state->next = page; small_buffers = 1; } else if (state_id == 14) { D_L00_001B9CF0.state = PAUSE_MENU_STATE_LEVEL_TRANSITION_ON_ACTION; page = &l00_pause_menu_level_transition_on_action_page_owner; state->owner = page; - state->unk8 = page; + state->next = page; small_buffers = 1; } else if (state_id == 0x21) { D_L00_001B9CF0.state = PAUSE_MENU_STATE_EXIT_GUARDED; page = &l00_pause_menu_exit_guarded_page_owner; state->owner = page; - state->unk8 = page; - state->unk124 = 1; + state->next = page; + state->close_locked = 1; } else if (state_id == 0x23) { page = &l00_pause_menu_state_preserving_entry_page_owner; state->owner = page; - state->unk8 = page; + state->next = page; } else if (state_id == 0x2D) { page = &D_L00_001B86C8; D_L00_001B9CF0.state = SCENE_STATE_DEFAULT; state->owner = page; - state->unk8 = page; + state->next = page; } else { page = &l00_pause_menu_default_page_owner; D_L00_001B9CF0.state = SCENE_STATE_DEFAULT; state->owner = page; - state->unk8 = page; + state->next = page; } if (D_L00_001B9CF0.pending_owner != 0) { s32 pending_state; - decode_mode = D_L00_001B9CF0.unk130; + decode_mode = D_L00_001B9CF0.saved_decode_mode; D_L00_001B9CF0.owner = D_L00_001B9CF0.pending_owner; - D_L00_001B9CF0.unk8 = D_L00_001B9CF0.pending_owner; + D_L00_001B9CF0.next = D_L00_001B9CF0.pending_owner; pending_state = D_L00_001B9CF0.pending_state; D_L00_001B9CF0.state = pending_state; if (pending_state == PAUSE_MENU_STATE_CLOSE_ON_ACTION || pending_state == PAUSE_MENU_STATE_LEVEL_TRANSITION_ON_ACTION) { small_buffers = 1; - D_L00_001841F0.transition_target_level = (s32)D_L00_001B9CF0.unkE4; + D_L00_001841F0.transition_target_level = (s32)D_L00_001B9CF0.travel_level; } D_L00_001B9CF0.pending_owner = 0; D_L00_001B9CF0.pending_state = PAUSE_MENU_PENDING_STATE_CLEARED; @@ -284,13 +284,13 @@ void initialize_pause_menu(void) { qzero(row); } qzero(&D_L00_00180260); - qcopy(&D_L00_001B9CF0.v40, &g_debug_camera.position); - qcopy(&D_L00_001B9CF0.v50, &g_debug_camera.angles); + qcopy(&D_L00_001B9CF0.saved_camera_position, &g_debug_camera.position); + qcopy(&D_L00_001B9CF0.saved_camera_angles, &g_debug_camera.angles); { f32 unk21C = 524288.0f; f32 unk228 = 255.0f; f32 tan_half_fov = 0.63f; - D_L00_001B9CF0.unkE8 = ((ViewSettings *)D_L00_0016CA40)->tan_half_fov; + D_L00_001B9CF0.saved_tan_half_fov = ((ViewSettings *)D_L00_0016CA40)->tan_half_fov; ((ViewSettings *)D_L00_0016CA40)->tan_half_fov = tan_half_fov; ((ViewSettings *)D_L00_0016CA40)->unk21C = unk21C; ((ViewSettings *)D_L00_0016CA40)->unk228 = unk228; @@ -312,10 +312,10 @@ void initialize_pause_menu(void) { second_b = second_a + 0xE0000; D_L00_001B9CF0.first_base = first_b + 0x11800; D_L00_001611CC = 0x30000; - D_L00_001B9CF0.unk104 = first_a; - D_L00_001B9CF0.unk10 = second_a; - D_L00_001B9CF0.unk108 = first_b; - D_L00_001B9CF0.unk10C = second_b; + D_L00_001B9CF0.preview_workspace = first_a; + D_L00_001B9CF0.graphics_workspace = second_a; + D_L00_001B9CF0.help_text_buffer = first_b; + D_L00_001B9CF0.stream_buffer_base = second_b; D_L00_001B9CF0.second_base = second_b; initialize_menu_stream_buffers(0); } else { @@ -328,10 +328,10 @@ void initialize_pause_menu(void) { second_c = second_b + 0x11800; D_L00_001B9CF0.first_base = first_c; D_L00_001611CC = 0x60000; - D_L00_001B9CF0.unk104 = first_a; - D_L00_001B9CF0.unk10 = second_a; - D_L00_001B9CF0.unk108 = first_b; - D_L00_001B9CF0.unk10C = second_b; + D_L00_001B9CF0.preview_workspace = first_a; + D_L00_001B9CF0.graphics_workspace = second_a; + D_L00_001B9CF0.help_text_buffer = first_b; + D_L00_001B9CF0.stream_buffer_base = second_b; D_L00_001B9CF0.second_base = second_c; initialize_menu_stream_buffers(1); } @@ -350,14 +350,15 @@ void initialize_pause_menu(void) { } else { decompress_and_relocate_selected_groups(0); } - transfer_draw_buffer_chunks(D_L00_001B9CF0.unk10, draw_buffer_address, frame_size << 11); + transfer_draw_buffer_chunks( + D_L00_001B9CF0.graphics_workspace, draw_buffer_address, frame_size << 11); texture_start = gs_texture_allocation_start; D_L00_001B9CF0.saved_texture_start = texture_start; if (D_L00_001B9CF0.state == PAUSE_MENU_STATE_CLOSE_ON_ACTION || D_L00_001B9CF0.state == PAUSE_MENU_STATE_LEVEL_TRANSITION_ON_ACTION) { - D_L00_001841F0.unk240 = texture_start; + D_L00_001841F0.map_image_vram = texture_start; texture_region_end = texture_start + 0x40000; - D_L00_001841F0.unk244 = texture_region_end; + D_L00_001841F0.tex_clut_vram = texture_region_end; gs_texture_allocation_start = texture_region_end + 0x400; for (j = 0; j < 4; j++) { s32 start = gs_texture_allocation_start; @@ -366,8 +367,8 @@ void initialize_pause_menu(void) { } } else { s32 count; - D_L00_001841F0.unk240 = 0; - D_L00_001841F0.unk244 = 0; + D_L00_001841F0.map_image_vram = 0; + D_L00_001841F0.tex_clut_vram = 0; slot = &D_L00_001841F0.texture_slots[3]; for (count = 0; count < 4; count++) { *slot = 0; @@ -477,7 +478,7 @@ void close_pause_menu(void) { 9999999); hud_keep_visible(handle, scale_game_frames(0xb4)); D_L00_001B9CF0.state = PAUSE_MENU_STATE_RESTORE_GAMEPLAY_AND_DISPATCH_ACTION; - D_L00_001B9CF0.unk14 = 2; + D_L00_001B9CF0.timer = 2; { s32 value = D_L00_001B9CF0.saved_seq_count; if (value < ((u8 *)D_L00_00197300[0])[0xc]) { @@ -533,9 +534,9 @@ void update_pause_menu(void) { break; } if (D_L00_001B9CF0.state == PAUSE_MENU_STATE_RESTORE_GAMEPLAY_AND_DISPATCH_ACTION) { - if (D_L00_001B9CF0.unk14 != 0) { - D_L00_001B9CF0.unk14 = D_L00_001B9CF0.unk14 - 1; - if (D_L00_001B9CF0.unk14 != 0) { + if (D_L00_001B9CF0.timer != 0) { + D_L00_001B9CF0.timer = D_L00_001B9CF0.timer - 1; + if (D_L00_001B9CF0.timer != 0) { return; } } @@ -544,54 +545,55 @@ void update_pause_menu(void) { } D_L00_0015F578 = 0x1E000; select_level_vu_chain(); - qcopy(&g_debug_camera.position, &D_L00_001B9CF0.v40); - qcopy(&g_debug_camera.angles, &D_L00_001B9CF0.v50); - D_L00_0016CAF0_lui = D_L00_001B9CF0.unkE8; + qcopy(&g_debug_camera.position, &D_L00_001B9CF0.saved_camera_position); + qcopy(&g_debug_camera.angles, &D_L00_001B9CF0.saved_camera_angles); + D_L00_0016CAF0_lui = D_L00_001B9CF0.saved_tan_half_fov; select_moby_context(0); - if (D_L00_001B9CF0.unk140 != 0) { + if (D_L00_001B9CF0.resource_table_class != 0) { D_L00_0016000C = -1; - select_world_object_resource_tables(D_L00_001B9CF0.unk140, D_L00_001B9CF0.unk144); + select_world_object_resource_tables(D_L00_001B9CF0.resource_table_class, + D_L00_001B9CF0.last_resource_table_toggle); } update_fog(); D_L00_0015F5D8 = 1; - D_L00_001B9CF0.unk108 = 0; - D_L00_001B9CF0.unk10C = 0; - D_L00_001B9CF0.unk104 = 0; - D_L00_001B9CF0.unk10 = 0; - if (D_L00_001B9CF0.unkC == 2) { + D_L00_001B9CF0.help_text_buffer = 0; + D_L00_001B9CF0.stream_buffer_base = 0; + D_L00_001B9CF0.preview_workspace = 0; + D_L00_001B9CF0.graphics_workspace = 0; + if (D_L00_001B9CF0.close_request == 2) { debug_print(level_transition_debug_format, D_L00_001841F0.transition_target_level); prepare_target_level_transition(D_L00_001841F0.transition_target_level); - } else if (D_L00_001B9CF0.unkC == 3) { + } else if (D_L00_001B9CF0.close_request == 3) { previous_decode_mode = decode_mode; decode_mode = 2; - D_L00_001B9CF0.unk130 = previous_decode_mode; + D_L00_001B9CF0.saved_decode_mode = previous_decode_mode; fade_to_black(scale_game_frames(0x10)); D_L00_0015F5C4 = 0; - queue_scene_movie_with_game_language(D_L00_001B9CF0.unkE4); - } else if (D_L00_001B9CF0.unkC == 4) { + queue_scene_movie_with_game_language(D_L00_001B9CF0.travel_level); + } else if (D_L00_001B9CF0.close_request == 4) { previous_decode_mode = decode_mode; decode_mode = 1; - D_L00_001B9CF0.unk130 = previous_decode_mode; + D_L00_001B9CF0.saved_decode_mode = previous_decode_mode; fade_to_black(scale_game_frames(0x10)); D_L00_0015F5C4 = 0; - queue_movie_with_game_language(D_L00_001B9CF0.unkE4); - } else if (D_L00_001B9CF0.unkC == 6) { + queue_movie_with_game_language(D_L00_001B9CF0.travel_level); + } else if (D_L00_001B9CF0.close_request == 6) { previous_decode_mode = decode_mode; decode_mode = 1; - D_L00_001B9CF0.unk130 = previous_decode_mode; + D_L00_001B9CF0.saved_decode_mode = previous_decode_mode; fade_to_black(scale_game_frames(0x10)); D_L00_0015F5C4 = 0; - queue_language_zero_movie(D_L00_001B9CF0.unkE4); - } else if (D_L00_001B9CF0.unkC == 5) { + queue_language_zero_movie(D_L00_001B9CF0.travel_level); + } else if (D_L00_001B9CF0.close_request == 5) { previous_decode_mode = decode_mode; decode_mode = 1; - D_L00_001B9CF0.unk130 = previous_decode_mode; + D_L00_001B9CF0.saved_decode_mode = previous_decode_mode; fade_to_black(scale_game_frames(0x10)); D_L00_0015F5C4 = 0; - start_scene(D_L00_001B9CF0.unkE4); - } else if (D_L00_001B9CF0.unkC == 7) { + start_scene(D_L00_001B9CF0.travel_level); + } else if (D_L00_001B9CF0.close_request == 7) { previous_decode_mode = decode_mode; - D_L00_001B9CF0.unk130 = previous_decode_mode; + D_L00_001B9CF0.saved_decode_mode = previous_decode_mode; fade_to_black(scale_game_frames(0x10)); D_L00_0015F5C4 = 0; start_slideshow(); @@ -599,7 +601,7 @@ void update_pause_menu(void) { D_L00_0015F5C4 = 0; } snd_continue_all_sounds_in_group(0x1D); - if (D_L00_001B9CF0.unkC != 2) { + if (D_L00_001B9CF0.close_request != 2) { music_unpause(); } snd_flush_sound_commands(); @@ -620,12 +622,12 @@ void update_pause_menu(void) { } process_unlock_code_input(); if (D_L00_001B9CF0.state == PAUSE_MENU_STATE_PAGE_TRANSITION) { - D_L00_001B9CF0.unk14 = (D_L00_001B9CF0.unk14 < 1) ? 0 : D_L00_001B9CF0.unk14 - 1; - if (D_L00_001B9CF0.unk14 == 0) { - u8p = D_L00_001B9CF0.unk8; - D_L00_001B9CF0.unk8 = 0; + D_L00_001B9CF0.timer = (D_L00_001B9CF0.timer < 1) ? 0 : D_L00_001B9CF0.timer - 1; + if (D_L00_001B9CF0.timer == 0) { + u8p = D_L00_001B9CF0.next; + D_L00_001B9CF0.next = 0; D_L00_001B9CF0.owner = u8p; - D_L00_001B9CF0.state = u8p->unk3C; + D_L00_001B9CF0.state = u8p->state; for (i = 0; i < 14; i++) { owner_callback_object = D_L00_001B9CF0.owner->objs[i]; if (owner_callback_object != 0 && owner_callback_object->f8 != 0) { @@ -634,8 +636,8 @@ void update_pause_menu(void) { } goto L2; } - } else if (D_L00_001B9CF0.unk8 != 0) { - if (D_L00_001B9CF0.owner == D_L00_001B9CF0.unk8) { + } else if (D_L00_001B9CF0.next != 0) { + if (D_L00_001B9CF0.owner == D_L00_001B9CF0.next) { allocate_voice_for_target_entry(3, 0x11, l00_pause_menu_page_mobys[0]); } else { allocate_voice_for_target_entry(4, 0x11, l00_pause_menu_page_mobys[0]); @@ -646,8 +648,8 @@ void update_pause_menu(void) { owner_callback_object->fC(owner_callback_object, 0); } } - flag = (D_L00_001B9CF0.unk8 == D_L00_001B9CF0.owner->unk38); - if (D_L00_001B9CF0.owner == D_L00_001B9CF0.unk8 && + flag = (D_L00_001B9CF0.next == D_L00_001B9CF0.owner->back); + if (D_L00_001B9CF0.owner == D_L00_001B9CF0.next && D_L00_001B9CF0.owner != &l00_pause_menu_exit_guarded_page_owner && D_L00_001B9CF0.owner != &D_L00_001B7DD0 && D_L00_001B9CF0.owner != &D_L00_001B80E0 && D_L00_001B9CF0.owner != &l00_pause_menu_self_transition_animation_guard_page_owner && @@ -657,8 +659,8 @@ void update_pause_menu(void) { } } for (j = 0; j < 14; j++) { - if (D_L00_001B9CF0.unk8->objs[j] != 0) { - D_L00_001B9CF0.unk8->objs[j]->f14 = l00_pause_menu_page_mobys[j]; + if (D_L00_001B9CF0.next->objs[j] != 0) { + D_L00_001B9CF0.next->objs[j]->f14 = l00_pause_menu_page_mobys[j]; } if (flag) { s32 n = D_L00_001B9CF0.owner->ids[j]; @@ -667,13 +669,13 @@ void update_pause_menu(void) { l00_pause_menu_page_mobys[j]->pclass->seqs[n]->frame_count - 1); l00_pause_menu_page_mobys[j]->anim_speed = -1.0f; } else { - set_moby_animation(l00_pause_menu_page_mobys[j], D_L00_001B9CF0.unk8->ids[j], 0); + set_moby_animation(l00_pause_menu_page_mobys[j], D_L00_001B9CF0.next->ids[j], 0); l00_pause_menu_page_mobys[j]->anim_speed = 1.0f; } } D_L00_001B9CF0.state = PAUSE_MENU_STATE_PAGE_TRANSITION; - D_L00_001B9CF0.unk14 = 12; - D_L00_001B9CF0.unkD0 = D_L00_001B9CF0.owner; + D_L00_001B9CF0.timer = 12; + D_L00_001B9CF0.previous = D_L00_001B9CF0.owner; D_L00_001B9CF0.owner = 0; } L2: @@ -682,18 +684,18 @@ void update_pause_menu(void) { for (k = 0; k < 14; k++) { if (objs != 0 && objs[k] != 0 && objs[k]->f0 != 0) { if (objs[k]->f0(objs[k]) != 0) { - D_L00_001B9CF0.unkC = ((u32)(D_L00_001B9CF0.state - 15) < 2) ? 2 : 1; + D_L00_001B9CF0.close_request = ((u32)(D_L00_001B9CF0.state - 15) < 2) ? 2 : 1; } } } - if (D_L00_001B9CF0.owner != 0 && D_L00_001B9CF0.owner->unk80 != 0) { - active_callback_object = D_L00_001B9CF0.owner->unk40; + if (D_L00_001B9CF0.owner != 0 && D_L00_001B9CF0.owner->pending_focus != 0) { + active_callback_object = D_L00_001B9CF0.owner->focus; if (active_callback_object->fC != 0) { active_callback_object->fC(active_callback_object, 1); } - D_L00_001B9CF0.owner->unk40 = D_L00_001B9CF0.owner->unk80; - D_L00_001B9CF0.owner->unk80 = 0; - active_callback_object = D_L00_001B9CF0.owner->unk40; + D_L00_001B9CF0.owner->focus = D_L00_001B9CF0.owner->pending_focus; + D_L00_001B9CF0.owner->pending_focus = 0; + active_callback_object = D_L00_001B9CF0.owner->focus; if (active_callback_object->f8 != 0) { active_callback_object->f8(active_callback_object, 1); } @@ -701,7 +703,7 @@ void update_pause_menu(void) { } update_visible_mobys(); sound_update(); - if (D_L00_001B9CF0.unkC != 0) { + if (D_L00_001B9CF0.close_request != 0) { close_pause_menu(); } } @@ -761,7 +763,8 @@ void draw_pause_menu_pages(int transfer_only) { append_gif_transfer_packet(); page_objects = 0; never = 0; - append_draw_buffer_upload_packets(D_L00_001B9CF0.unk10, draw_buffer_address, frame_size << 11); + append_draw_buffer_upload_packets( + D_L00_001B9CF0.graphics_workspace, draw_buffer_address, frame_size << 11); if (transfer_only != 0) { return; } @@ -776,7 +779,7 @@ void draw_pause_menu_pages(int transfer_only) { stash_moby_class_dists(); for (i = 0; i < 14; i++) { if (pause_menu_page_render_enabled[i] != 0 && l00_pause_menu_page_mobys[i] != 0 && - (i != 6 || D_L00_001B9CF0.unkD8 != 0)) { + (i != 6 || D_L00_001B9CF0.goodies_tab_shown != 0)) { draw_moby_list((int)l00_pause_menu_page_mobys[i], 1); } } @@ -792,7 +795,7 @@ void draw_pause_menu_pages(int transfer_only) { if (l00_pause_menu_page_mobys[k] == 0 || pause_menu_page_render_enabled[k] == 0) { continue; } - if (k == 6 && D_L00_001B9CF0.unkD8 == 0) { + if (k == 6 && D_L00_001B9CF0.goodies_tab_shown == 0) { continue; } page_data = *(PageMobyData **)((char *)l00_pause_menu_page_mobys[k] + 0x78); @@ -841,7 +844,7 @@ void draw_pause_menu_pages(int transfer_only) { if (pause_menu_page_render_enabled[j] == 0 || *(int *)(page_objects[j] + 4) == 0) { continue; } - if (j == 6 && D_L00_001B9CF0.unkD8 == 0) { + if (j == 6 && D_L00_001B9CF0.goodies_tab_shown == 0) { continue; } if (pass == 0 && !(flags & 2)) { @@ -939,7 +942,7 @@ void draw_pause_menu_pages(int transfer_only) { setup_gif_paging(0); for (flashing_panel_index = 0; flashing_panel_index < 14; flashing_panel_index++) { if (pause_menu_page_render_enabled[flashing_panel_index] != 0 && - (flashing_panel_index != 6 || D_L00_001B9CF0.unkD8 != 0)) { + (flashing_panel_index != 6 || D_L00_001B9CF0.goodies_tab_shown != 0)) { draw_menu_flashing_panel((int)l00_pause_menu_page_mobys[flashing_panel_index]); } } @@ -951,17 +954,18 @@ int process_active_menu_object_actions(int x) __asm__("FUN_L00_002779c8"); int process_active_menu_object_actions(int x) { int transition_owner; - if ((s32)D_L00_001B9CF0.owner->unk40 != x) { + if ((s32)D_L00_001B9CF0.owner->focus != x) { return 0; } - if ((((s32)controller_state_lui.pressed_unmasked) & 0xD00) && D_L00_001B9CF0.unk124 == 0) { + if ((((s32)controller_state_lui.pressed_unmasked) & 0xD00) && + D_L00_001B9CF0.close_locked == 0) { return 1; } if (((s32)controller_state_lui.pressed_unmasked) & 0x10) { - transition_owner = (s32)D_L00_001B9CF0.owner->unk38; + transition_owner = (s32)D_L00_001B9CF0.owner->back; if (transition_owner != 0) { - D_L00_001B9CF0.unk8 = (struct Own *)transition_owner; - } else if (D_L00_001B9CF0.unk124 == 0) { + D_L00_001B9CF0.next = (struct Own *)transition_owner; + } else if (D_L00_001B9CF0.close_locked == 0) { return -1; } } diff --git a/src/overlays/shared/ui/menus/pause_menu_entry_input.c b/src/overlays/shared/ui/menus/pause_menu_entry_input.c index b466b8318b..ef8f066832 100644 --- a/src/overlays/shared/ui/menus/pause_menu_entry_input.c +++ b/src/overlays/shared/ui/menus/pause_menu_entry_input.c @@ -14,7 +14,7 @@ s32 pause_menu_entry_input(s32 object_address) __asm__("FU s32 pause_menu_entry_input(s32 object_address) { s32 flags_snapshot = ((s32)((volatile struct PadState *)&controller_state)->pressed_unmasked); - s32 owner_unk38_address; + s32 back_page_address; struct GameState *game_state; if (flags_snapshot & 0xD00) { if (*(s32 *)(object_address + 0x30) & 0x20) { @@ -27,10 +27,10 @@ s32 pause_menu_entry_input(s32 object_address) { D_L00_00184414 = current_level_index; } game_state = &D_L00_001B9CF0; - owner_unk38_address = (s32)game_state->owner->unk38; - if (owner_unk38_address != 0) { - game_state->unk8 = (struct Own *)owner_unk38_address; - } else if (game_state->unk124 == 0) { + back_page_address = (s32)game_state->owner->back; + if (back_page_address != 0) { + game_state->next = (struct Own *)back_page_address; + } else if (game_state->close_locked == 0) { return -1; } } From a284b337c44a4402aa861dd8a0ed7e526db07b37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:36:58 +0000 Subject: [PATCH 050/213] decomp: name particle fields in shared rendering --- .../shared/rendering/effects/particles.c | 203 +++++++++--------- 1 file changed, 103 insertions(+), 100 deletions(-) diff --git a/src/overlays/shared/rendering/effects/particles.c b/src/overlays/shared/rendering/effects/particles.c index e815669a65..34a480131b 100644 --- a/src/overlays/shared/rendering/effects/particles.c +++ b/src/overlays/shared/rendering/effects/particles.c @@ -540,7 +540,7 @@ void send_blast_hits(void *, typedef struct { int particle_path_reference; - float unk4, unk8, fc; + float path_distance, path_speed, fc; /* distance along the path, added to it each frame */ int i10; void *blast_source_moby; } Q_272438; @@ -555,12 +555,12 @@ void update_timed_sphere_probed_particle(struct EffectParticle *particle) { float x, y; int sphere_probe_result; previous_particle_position = *particle_position; - particle_data->unk4 += particle_data->unk8; + particle_data->path_distance += particle_data->path_speed; path_sample_at_distance(particle_data->particle_path_reference, &x, &y, particle_position, - particle_data->unk4, + particle_data->path_distance, particle_data->fc); if (fast_dec_timer_s16(&particle->life)) { free_effect_particle(particle); @@ -609,7 +609,7 @@ typedef struct { s32 particle_size_bits; u8 v10[16]; u8 v20[12]; - f32 unk2C; + f32 secondary_position_w; /* 0x2C: w of the second point */ S_2725d8 s; } P_2725d8; @@ -642,7 +642,7 @@ P_2725d8 *spawn_moby_point_attached_particle(u8 *owner_moby, particle->b2 = *D_L00_001B215C; moby_point_position(owner_moby, attachment_point_selector, particle->v10); qcopy(particle->v20, particle->v10); - particle->unk2C = secondary_position_w; + particle->secondary_position_w = secondary_position_w; *(f32 *)((u8 *)particle + 0x1C) = primary_position_w; s = &particle->s; particle->s.o = owner_moby; @@ -666,7 +666,7 @@ typedef struct { u8 pad0[0x10]; u128_2726d8 pos; u8 pad20[0xC]; - f32 unk2C; + f32 secondary_position_w; /* 0x2C: w of the second point */ Q_2726d8 q; } P_2726d8; @@ -682,7 +682,7 @@ void update_moby_point_attached_particle(P_2726d8 *particle) { return; } sc = q->xC * random_float_between(0.5f, 1.0f); - save = particle->unk2C; + save = particle->secondary_position_w; qcopy(&position_delta, &particle->pos); moby_point_position(particle->q.owner, q->x4, &particle->pos); fast_vec_sub(&position_delta, &position_delta, &particle->pos); @@ -695,7 +695,7 @@ void update_moby_point_attached_particle(P_2726d8 *particle) { fast_vec_normalize(&position_delta, &position_delta, target_length); fast_vec_add((u8 *)particle + 0x20, &particle->pos, &position_delta); *(f32 *)((u8 *)particle + 0x1C) = sc; - particle->unk2C = save; + particle->secondary_position_w = save; } void update_expanding_damped_rgb_fading_particle(struct EffectParticle *) __asm__("FUN_L00_00272838"); @@ -807,7 +807,7 @@ typedef float V_272bc0[4] __attribute__((aligned(16))); typedef struct { char p0[0x88]; - float unk88; + float pos_z; /* 0x88: hero.motion.pos.f[2] */ char p1[0x2080 - 0x8C]; int hit_recipient_moby; } P_272bc0; @@ -881,7 +881,7 @@ void update_color_tween_emitter_particle(struct EffectParticle *particle) { reference_position = (unsigned char *)(*(V_272bc0 *)D_0013F3D0); if (vector_distance_xy(particle->pos.f, reference_position) < 0.3f) { reference_position_owner = (P_272bc0 *)(reference_position - 0x80); - if (reference_position_owner->unk88 < particle->pos.f[2] + 1.2f) { + if (reference_position_owner->pos_z < particle->pos.f[2] + 1.2f) { fast_vec_sub(particle_vector_scratch, reference_position, particle->pos.f); fast_vec_normalize(particle_vector_scratch, particle_vector_scratch, 1.0f); particle_vector_scratch[2] = 1.0f; @@ -1034,11 +1034,11 @@ unsigned char *spawn_moving_hero_relative_alpha_fade_particle(float *pos, typedef struct { u8 p0[4]; - u32 w4; - u8 b8; + u32 color; + u8 spin; u8 p9; - s16 hA; - f32 unkC; + s16 life; + f32 size; f32 x, y, z; } Part_273298; @@ -1077,16 +1077,16 @@ void update_moving_hero_relative_alpha_fade_particle(Part_273298 *particle) { } if (particle->x < 2.0f || 1021.0f < particle->x || particle->y < 2.0f || 1021.0f < particle->y || particle->z < 2.0f || 1021.0f < particle->z || - fast_dec_timer_s16(&particle->hA)) { + fast_dec_timer_s16(&particle->life)) { free_effect_particle(particle); return; } - color_without_alpha = particle->w4 & 0xFFFFFF; - remaining_frames_minus_one = convert_integer_to_float(particle->hA - 1); - particle->w4 = + color_without_alpha = particle->color & 0xFFFFFF; + remaining_frames_minus_one = convert_integer_to_float(particle->life - 1); + particle->color = FUN_001fa6e0_273298(color_without_alpha, - particle->w4, - remaining_frames_minus_one / convert_integer_to_float(particle->hA)); + particle->color, + remaining_frames_minus_one / convert_integer_to_float(particle->life)); } typedef struct { @@ -1096,20 +1096,20 @@ typedef struct { typedef struct { T_273448 *m; - f32 unk4; - f32 unk8; - s16 hC; - s16 hE; - f32 unk10; - f32 unk14; + f32 alpha; /* 0x04: 0..1, top byte of the colour */ + f32 spin_phase; /* 0x08: spin = spin_phase * 255 */ + s16 texture_frame; /* 0x0C: index into D_L00_001B2174, wraps at 16 */ + s16 moby_point; /* 0x0E */ + f32 alpha_step; /* 0x10: negated at the top of the pulse */ + f32 camera_offset; /* 0x14: distance toward the camera, eased to 1 */ } E_273448; typedef struct { - u8 b0, b1, b2, b3; - u32 w4; - u8 b8, b9; - s16 hA; - f32 unkC; + u8 b0, b1, texture, blend; + u32 color; + u8 spin, b9; + s16 life; + f32 size; f32 pos[4] __attribute__((aligned(16))); E_273448 e; } P_273448; @@ -1127,35 +1127,35 @@ void update_moby_point_attached_alpha_pulse_particle(P_273448 *particle) { return; } e = &particle->e; - if (fast_dec_timer_s16(&particle->hA) || e->m == 0 || e->m->attachment_owner_status < 0) { + if (fast_dec_timer_s16(&particle->life) || e->m == 0 || e->m->attachment_owner_status < 0) { goto kill; } - e->hC = (e->hC + 1) & 0xF; - if (particle->unkC < 159600.0f) { - particle->unkC += frame_scale * 3989.99976f; - if (159600.0f < particle->unkC) { - particle->unkC = 159600.0f; + e->texture_frame = (e->texture_frame + 1) & 0xF; + if (particle->size < 159600.0f) { + particle->size += frame_scale * 3989.99976f; + if (159600.0f < particle->size) { + particle->size = 159600.0f; } - } else if (159600.0f < particle->unkC) { - particle->unkC -= frame_scale * 15959.999f; - if (particle->unkC < 159600.0f) { - particle->unkC = 159600.0f; + } else if (159600.0f < particle->size) { + particle->size -= frame_scale * 15959.999f; + if (particle->size < 159600.0f) { + particle->size = 159600.0f; } } - e->unk8 += frame_scale * 0.001f; - particle->b8 = truncate_float_to_s32(e->unk8 * 255.0f); - particle->b2 = D_L00_001B2174_lui[e->hC]; - if (particle->unkC <= 159600.0f || 0.0f < e->unk10) { - f32 *alpha_fraction_ptr = &e->unk4; + e->spin_phase += frame_scale * 0.001f; + particle->spin = truncate_float_to_s32(e->spin_phase * 255.0f); + particle->texture = D_L00_001B2174_lui[e->texture_frame]; + if (particle->size <= 159600.0f || 0.0f < e->alpha_step) { + f32 *alpha_fraction_ptr = &e->alpha; *alpha_fraction_ptr += alpha_fraction_ptr[3]; } { f32 x; - if (particle->unkC <= 159600.0f) { - x = e->unk4; + if (particle->size <= 159600.0f) { + x = e->alpha; alpha_reversal_threshold = 0.3f; } else { - x = e->unk4; + x = e->alpha; alpha_reversal_threshold = 0.15f; } if (!(alpha_reversal_threshold < x)) { @@ -1165,15 +1165,16 @@ void update_moby_point_attached_alpha_pulse_particle(P_273448 *particle) { return; } } else { - e->unk10 = -e->unk10; - e->unk4 = x + e->unk10; + e->alpha_step = -e->alpha_step; + e->alpha = x + e->alpha_step; } } - particle->w4 = (particle->w4 & 0xFFFFFF) + (truncate_float_to_s32(e->unk4 * 256.0f) << 24); - e->unk14 += (1.0f - e->unk14) * (frame_scale * 0.175f); - moby_point_position(e->m, e->hE, attachment_world_position); + particle->color = + (particle->color & 0xFFFFFF) + (truncate_float_to_s32(e->alpha * 256.0f) << 24); + e->camera_offset += (1.0f - e->camera_offset) * (frame_scale * 0.175f); + moby_point_position(e->m, e->moby_point, attachment_world_position); fast_vec_sub(camera_directed_offset, g_debug_camera, attachment_world_position); - fast_vec_normalize(camera_directed_offset, camera_directed_offset, e->unk14); + fast_vec_normalize(camera_directed_offset, camera_directed_offset, e->camera_offset); fast_vec_add(particle->pos, attachment_world_position, camera_directed_offset); } /* Ported from rac1-decomp (src/overlays/shared/partupd_00272158.c: func_L00_002745A8), where it is exact; names translated to the US level program. */ @@ -1583,10 +1584,10 @@ typedef struct { } __attribute__((aligned(16))) V_274518; typedef struct { - f32 unk0, unk4, unk8; - u8 *iC; - f32 unk10; - f32 unk14; + f32 offset_x, offset_y, offset_z; /* 0x00: offset from the anchor moby */ + u8 *iC; /* 0x0C: anchor moby */ + f32 orbit_angle; /* 0x10: orbit about the anchor */ + f32 wobble_angle; /* 0x14: small circle on the orbit */ s16 position_offset_multiplier; s16 alpha_fade_decrement; s16 trail_particle_mode; @@ -1623,9 +1624,9 @@ void update_mode_controlled_orbiting_trail_particle(M_274518 *particle) { goto kill; if (r->iC == 0) return; - position_offset_scratch.x = particle->r.unk0; - position_offset_scratch.y = r->unk4; - position_offset_scratch.z = r->unk8; + position_offset_scratch.x = particle->r.offset_x; + position_offset_scratch.y = r->offset_y; + position_offset_scratch.z = r->offset_z; fast_vec_scale(&position_offset_scratch, &position_offset_scratch, convert_integer_to_float(r->position_offset_multiplier)); @@ -1646,9 +1647,9 @@ void update_mode_controlled_orbiting_trail_particle(M_274518 *particle) { FUN_L00_002743a8_274518( 0, particle->v10, scale_game_frames(10), z, z, 0, particle->particle_alpha, 0); } else { - position_offset_scratch.x = r->unk0; - position_offset_scratch.y = r->unk4; - position_offset_scratch.z = r->unk8; + position_offset_scratch.x = r->offset_x; + position_offset_scratch.y = r->offset_y; + position_offset_scratch.z = r->offset_z; z = 0.0f; spawned_particle = FUN_L00_002743a8_274518((s32)r->iC, particle->v10, @@ -1665,25 +1666,25 @@ void update_mode_controlled_orbiting_trail_particle(M_274518 *particle) { return; qcopy(particle->v10, r->iC + 0x10); k1 = 2.25f; - position_offset_scratch.x = fast_cos(r->unk10) * k1; + position_offset_scratch.x = fast_cos(r->orbit_angle) * k1; k2 = 0.28f; - position_offset_scratch.y = fast_sin(r->unk10) * k1; + position_offset_scratch.y = fast_sin(r->orbit_angle) * k1; position_offset_scratch.z = position_offset_scratch.x; position_offset_scratch.x = 0.0f; - secondary_position_offset.x = fast_cos(r->unk14) * k2; - secondary_position_offset.y = fast_sin(r->unk14) * k2; + secondary_position_offset.x = fast_cos(r->wobble_angle) * k2; + secondary_position_offset.y = fast_sin(r->wobble_angle) * k2; secondary_position_offset.z = secondary_position_offset.x; secondary_position_offset.x = 0.0f; clear_u64_value(&rotation_angles); - rotation_angles.y = r->unk10; + rotation_angles.y = r->orbit_angle; euler_rotation_matrix(secondary_offset_rotation_matrix, &rotation_angles); transform_vector( &secondary_position_offset, &secondary_position_offset, secondary_offset_rotation_matrix); fast_vec_add(&position_offset_scratch, &position_offset_scratch, &secondary_position_offset); transform_vector_by_basis(&position_offset_scratch, &position_offset_scratch, r->iC + 0xC0); fast_vec_add(particle->v10, particle->v10, &position_offset_scratch); - r->unk10 = fast_add_rotations(r->unk10, frame_time * 0.9599310755729675f); - r->unk14 = fast_add_rotations(r->unk14, frame_time * 4.363323211669922f); + r->orbit_angle = fast_add_rotations(r->orbit_angle, frame_time * 0.9599310755729675f); + r->wobble_angle = fast_add_rotations(r->wobble_angle, frame_time * 4.363323211669922f); } typedef struct { @@ -1691,8 +1692,8 @@ typedef struct { u8 b4; u8 offset_length_jitter_percent; s16 expected_owner_identity; - float unk8; - float unkC; + float max_position_w; /* 0x08: pos.w is a random 5..100% of it */ + float offset_length; /* 0x0C: second point distance along the bone */ } S_274818; void update_randomized_moby_point_attached_particle(struct EffectParticle *) __asm__("FUN_L00_00274818"); @@ -1711,14 +1712,16 @@ void update_randomized_moby_point_attached_particle(struct EffectParticle *parti } attachment_position = particle->pos.f; one = 1.0f; - randomized_primary_position_w = attachment_data->unk8 * random_float_between(0.05f, one); + randomized_primary_position_w = + attachment_data->max_position_w * random_float_between(0.05f, one); save = *(float *)(particle->data + 0xC); moby_point_position(attachment_data->o, attachment_data->b4, attachment_position); build_moby_bone_transform(attachment_data->o, attachment_data->b4, attachment_vector_scratch); x = convert_integer_to_float(attachment_data->offset_length_jitter_percent); x = random_float_between(-x, x); - fast_vec_normalize( - &attachment_offset, attachment_vector_scratch, (x / 100.0f - one) * attachment_data->unkC); + fast_vec_normalize(&attachment_offset, + attachment_vector_scratch, + (x / 100.0f - one) * attachment_data->offset_length); fast_vec_add(particle->data, attachment_position, &attachment_offset); particle->pos.f[3] = randomized_primary_position_w; *(float *)(particle->data + 0xC) = save; @@ -1949,7 +1952,7 @@ typedef struct { int n; int i14; int i18; - float unk1C; + float unk1C; /* a tenth (a twentieth when n >= 0) of the starting size */ } Q_275158; extern unsigned char *D_L00_001B21A0 NOT_SDA; @@ -2382,14 +2385,14 @@ void update_moving_fading_particle(struct EffectParticle *particle) { typedef struct { u8 p0[4]; - u32 w4; - u8 b8; + u32 color; + u8 spin; u8 p9; - s16 hA; - f32 unkC; - f32 unk10; - f32 unk14; - f32 unk18; + s16 life; + f32 size; + f32 x; + f32 y; + f32 z; u8 p1C[4]; int w20; } Part; @@ -2399,26 +2402,26 @@ void update_mode_controlled_shrinking_color_tween_particle(Part *particle) __asm void update_mode_controlled_shrinking_color_tween_particle(Part *particle) { float remaining_frames_minus_one; - if (particle->unk10 < 2.0f || 1021.0f < particle->unk10 || particle->unk14 < 2.0f || - 1021.0f < particle->unk14 || particle->unk18 < 2.0f || 1021.0f < particle->unk18 || - fast_dec_timer_s16(&particle->hA)) { + if (particle->x < 2.0f || 1021.0f < particle->x || particle->y < 2.0f || + 1021.0f < particle->y || particle->z < 2.0f || 1021.0f < particle->z || + fast_dec_timer_s16(&particle->life)) { free_effect_particle(particle); return; } if (particle->w20) { - particle->unkC *= 0.99f; - remaining_frames_minus_one = convert_integer_to_float(particle->hA - 1); - particle->w4 = FUN_001fa6e0_00275eb0(0x30FFFFFF, - particle->w4, - remaining_frames_minus_one / - convert_integer_to_float(particle->hA)); + particle->size *= 0.99f; + remaining_frames_minus_one = convert_integer_to_float(particle->life - 1); + particle->color = FUN_001fa6e0_00275eb0(0x30FFFFFF, + particle->color, + remaining_frames_minus_one / + convert_integer_to_float(particle->life)); } else { - particle->unkC *= 0.95f; - remaining_frames_minus_one = convert_integer_to_float(particle->hA - 1); - particle->w4 = FUN_001fa6e0_00275eb0(0x603F1008, - particle->w4, - remaining_frames_minus_one / - convert_integer_to_float(particle->hA)); + particle->size *= 0.95f; + remaining_frames_minus_one = convert_integer_to_float(particle->life - 1); + particle->color = FUN_001fa6e0_00275eb0(0x603F1008, + particle->color, + remaining_frames_minus_one / + convert_integer_to_float(particle->life)); } } From 0f4b3dcb005475dcd0ef09da70e9dea976bcf548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:36:59 +0000 Subject: [PATCH 051/213] decomp: name hud wobble and message box fields in shared ui --- .../ui/hud/draw_hud_item_selector_panel.c | 47 ++++++++++--------- .../shared/ui/text/level_draw_dialog_text.c | 24 ++++++---- 2 files changed, 38 insertions(+), 33 deletions(-) diff --git a/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c b/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c index bcea9efcf9..c053ca0e60 100644 --- a/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c +++ b/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c @@ -923,11 +923,12 @@ void initialize_hud_element_with_counters(char *hud_element) { /* Updates the health HUD element: advances the wobble counters in its HudCounter (+0x80), clamps the target (+0x78) to +0x08, and steps the two digits (+0x70, +0x71) up or down. */ /* Ported from rac1-decomp (src/overlays/shared/hud_00235960.c: func_L00_00239FC0), where it is exact; names translated to the US level program. */ +/* Wobble of a HUD icon: phase swings 0..0xFFF, its velocity accelerates toward the middle. */ typedef struct { - short unk0; - short unk2; - short unk4; - short unk6; + short frame; /* counts 0..59 */ + short phase; /* 0..0xFFF */ + short velocity; /* added to phase, clamped to +-60 */ + short acceleration; /* +1 or -1, flips at the middle of the swing */ } HudCounter; extern s32 l00_hud_panel_visibility_counter_limit_gp __asm__("D_L00_0015F7F0") __attribute__((sda)); @@ -945,30 +946,30 @@ void update_health_hud_animation_and_visibility(HudElem *hud_element) { unclamped_target_value = *hud_element->value_source; hud_element->target_value = unclamped_target_value > -1 ? unclamped_target_value : 0; animation_counters = hud_element->animation_counters; - animation_counters->unk0 = (animation_counters->unk0 + 1) % 60; - animation_counters->unk2 += animation_counters->unk4; - animation_counters->unk4 += animation_counters->unk6; - if (animation_counters->unk4 > 60) { - animation_counters->unk4 = 60; - } else if (animation_counters->unk4 < -60) { - animation_counters->unk4 = -60; + animation_counters->frame = (animation_counters->frame + 1) % 60; + animation_counters->phase += animation_counters->velocity; + animation_counters->velocity += animation_counters->acceleration; + if (animation_counters->velocity > 60) { + animation_counters->velocity = 60; + } else if (animation_counters->velocity < -60) { + animation_counters->velocity = -60; } - if (animation_counters->unk2 >= 0x800) { - if (animation_counters->unk4 > 0) { - animation_counters->unk6 = -1; + if (animation_counters->phase >= 0x800) { + if (animation_counters->velocity > 0) { + animation_counters->acceleration = -1; } } - if (animation_counters->unk2 >= 0x1000) { - animation_counters->unk2 = 0xFFF; + if (animation_counters->phase >= 0x1000) { + animation_counters->phase = 0xFFF; } health_icon_animation_counters = animation_counters; - if (health_icon_animation_counters->unk2 < 0x7FF) { - if (health_icon_animation_counters->unk4 < 0) { - health_icon_animation_counters->unk6 = 1; + if (health_icon_animation_counters->phase < 0x7FF) { + if (health_icon_animation_counters->velocity < 0) { + health_icon_animation_counters->acceleration = 1; } } - if (health_icon_animation_counters->unk2 < 0) { - health_icon_animation_counters->unk2 = 0; + if (health_icon_animation_counters->phase < 0) { + health_icon_animation_counters->phase = 0; } if (hud_element->target_value > hud_element->max_value) { hud_element->target_value = hud_element->max_value; @@ -1172,13 +1173,13 @@ s32 draw_health_hud_panel(Hud *hud_element) { extern HudCounter l00_bolt_hud_icon_animation_counters __asm__("D_L00_0015FAB8"); extern void initialize_numeric_hud_timer_and_base_dimensions(HudElem *) __asm__("FUN_L00_0023a760"); -/* Runs FUN_L00_0023a760 on e, points its unk80 at D_L00_0015FAB8 and clears that entry. */ +/* Runs FUN_L00_0023a760 on e, points its animation_counters (+0x80) at D_L00_0015FAB8 and clears its frame. */ void initialize_bolt_counter_hud(HudElem *hud_element) __asm__("FUN_L00_00239cc8"); void initialize_bolt_counter_hud(HudElem *hud_element) { initialize_numeric_hud_timer_and_base_dimensions(hud_element); hud_element->animation_counters = &l00_bolt_hud_icon_animation_counters; - l00_bolt_hud_icon_animation_counters.unk0 = 0; + l00_bolt_hud_icon_animation_counters.frame = 0; } typedef struct T00239d00 { diff --git a/src/overlays/shared/ui/text/level_draw_dialog_text.c b/src/overlays/shared/ui/text/level_draw_dialog_text.c index 5f3aef1cb6..fcef538d3b 100644 --- a/src/overlays/shared/ui/text/level_draw_dialog_text.c +++ b/src/overlays/shared/ui/text/level_draw_dialog_text.c @@ -25,9 +25,9 @@ typedef struct { char *line1; /* 0x0C */ char *line2; /* 0x10 */ u8 pad14[8]; - s32 choice; /* 0x1C */ - s32 unk20; /* 0x20 */ - s32 unk24; /* 0x24 */ + s32 choice; /* 0x1C */ + s32 grow_counter; /* 0x20: the results box scale is it / 8, 0.1..1 */ + s32 fade_counter; /* 0x24: fades the frame over 30 frames, tweens the result colours over 8 */ } MessageBox; extern MessageBox l00_message_box __asm__("D_L00_00173040"); @@ -142,8 +142,10 @@ void level_draw_dialog_text(void) { box.anchor_y = 0x136 - box.rendered_height; font_print_window( &box, color, text_cursor, -1, get_effect_texture(1), dialog_font_glyph_metrics); - tint = fast_tween_color( - 0x20FFFF, 0x8020FFFF, 1.0f - (f32)l00_message_box.unk24 / (f32)scale_game_frames(30)); + tint = + fast_tween_color(0x20FFFF, + 0x8020FFFF, + 1.0f - (f32)l00_message_box.fade_counter / (f32)scale_game_frames(30)); font_print_center(0x100, 0x140, tint, get_help_message_text(0x524A), -1); mid = (y + box.anchor_y) >> 1; vu1_add_g_sregister(0x47, 0x3004B); @@ -299,8 +301,10 @@ void level_draw_dialog_text(void) { fast_tween_color(dialog_text_tween_start_color, dialog_text_tween_end_color, alpha), text, -1); - tint = fast_tween_color( - 0x20FFFF, 0x8020FFFF, 1.0f - (f32)l00_message_box.unk24 / (f32)scale_game_frames(30)); + tint = + fast_tween_color(0x20FFFF, + 0x8020FFFF, + 1.0f - (f32)l00_message_box.fade_counter / (f32)scale_game_frames(30)); if (left != 0) { font_print_center(0xCA, box.bottom - 0x14, tint, get_help_message_text(left), -1); } @@ -379,7 +383,7 @@ void level_draw_dialog_text(void) { 3.14159f) * 0.5f + 0.5f); - scale = (f32)l00_message_box.unk20 * 0.125f; + scale = (f32)l00_message_box.grow_counter * 0.125f; if (scale > 1.0f) { scale = 1.0f; } else if (scale < 0.1f) { @@ -388,8 +392,8 @@ void level_draw_dialog_text(void) { results_label_color = results_label_tween_start_color; first_place_or_record_color = first_place_or_record_tween_start_color; other_place_or_no_record_color = other_place_or_no_record_tween_start_color; - if (l00_message_box.unk24 != 0) { - color_blend_factor = (f32)l00_message_box.unk24 * 0.125f; + if (l00_message_box.fade_counter != 0) { + color_blend_factor = (f32)l00_message_box.fade_counter * 0.125f; if (color_blend_factor > 1.0f) { color_blend_factor = 1.0f; } else if (color_blend_factor < 0.0f) { From 94e5a6ed08f55142d5acc572b7b67b40d78f87f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:36:59 +0000 Subject: [PATCH 052/213] decomp: name cutscene trigger fields in shared cutscenes --- .../shared/cutscenes/cutscene_trigger.c | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/src/overlays/shared/cutscenes/cutscene_trigger.c b/src/overlays/shared/cutscenes/cutscene_trigger.c index 2502d8cea1..26569fe22f 100644 --- a/src/overlays/shared/cutscenes/cutscene_trigger.c +++ b/src/overlays/shared/cutscenes/cutscene_trigger.c @@ -18,14 +18,14 @@ #include "rnc/overlay/shared/world/level_labels.h" typedef struct CutsceneTriggerVars { - u8 pad0[0x10]; - u8 unk10[0x10]; - s32 unk20; - s32 unk24; - s32 unk28; - s32 unk2C; - s32 unk30; - s32 unk34; + u8 camera_position[0x10]; /* 0x00: copied from the camera cuboid */ + u8 camera_rotation[0x10]; /* 0x10 */ + s32 clip_volume; /* 0x20: the hero entering it starts the sequence */ + s32 camera_cuboid; /* 0x24: row of l01_cuboids the camera sits at; -1 is an error */ + s32 race_camera_cuboid; /* 0x28: row for set_race_camera, -1 uses the hero */ + s32 timer; /* 0x2C: length in frames, then counts down */ + s32 blend_from_camera; /* 0x30: nonzero blends in from the current camera */ + s32 blend_frames; /* 0x34: jet_mount transition length */ } CutsceneTriggerVars; typedef struct { @@ -104,14 +104,14 @@ void cutscene_trigger_update(char *moby) { func_L01_002FC890_m(moby); switch (((unsigned char *)moby)[0x20]) { case CUTSCENE_TRIGGER_INITIALIZE: - if (trigger_vars->unk24 == -1) { + if (trigger_vars->camera_cuboid == -1) { debug_print(cutscene_camera_init_position_error_format, MOBY(moby)->oclass, *(unsigned short *)(moby + 0xA8)); mark_moby_for_removal(moby); return; } - trigger_vars->unk2C = scale_game_frames(trigger_vars->unk2C); + trigger_vars->timer = scale_game_frames(trigger_vars->timer); MOBY(moby)->state = CUTSCENE_TRIGGER_WAIT_FOR_TRIGGER; { int ff = 0xFF; @@ -133,37 +133,38 @@ void cutscene_trigger_update(char *moby) { break; } hero_position = (char *)&hero.motion.pos; - if (is_point_inside_clip_volume(hero_position, trigger_vars->unk20) == 0 && + if (is_point_inside_clip_volume(hero_position, trigger_vars->clip_volume) == 0 && ((unsigned char *)moby)[0xBC] != 1) break; qcopy(saved_camera_position, camera_pos); qcopy(saved_camera_rotation, camera_pos + 0x10); - if (trigger_vars->unk28 == -1) { + if (trigger_vars->race_camera_cuboid == -1) { set_race_camera(hero_position, hero_position + 0x10, 0x72, 1); } else { - LevelCuboid *o = &l01_cuboids[trigger_vars->unk28]; + LevelCuboid *o = &l01_cuboids[trigger_vars->race_camera_cuboid]; set_race_camera(&o->pos, &o->rot, 0x72, 1); } - if (trigger_vars->unk30 != 0) { - jet_mount(saved_camera_position, saved_camera_rotation, 2, trigger_vars->unk34, 0); + if (trigger_vars->blend_from_camera != 0) { + jet_mount( + saved_camera_position, saved_camera_rotation, 2, trigger_vars->blend_frames, 0); } else { - LevelCuboid *o = &l01_cuboids[trigger_vars->unk24]; + LevelCuboid *o = &l01_cuboids[trigger_vars->camera_cuboid]; jet_mount(&o->pos, &o->rot, 0, 0, 0); } cutscene_active = 1; MOBY(moby)->state = CUTSCENE_TRIGGER_ACTIVE; MOBY(moby)->command = 1; { - int o = trigger_vars->unk24 << 7; + int o = trigger_vars->camera_cuboid << 7; char *record_table_base = (char *)l01_cuboids; qcopy(trigger_vars, (char *)(o + (int)record_table_base) + 0x30); - qcopy(&trigger_vars->unk10, (char *)(o + (int)record_table_base) + 0x70); + qcopy(&trigger_vars->camera_rotation, (char *)(o + (int)record_table_base) + 0x70); } break; } case CUTSCENE_TRIGGER_ACTIVE: - if (fast_dec_timer(&trigger_vars->unk2C) != 0 || ((unsigned char *)moby)[0xBC] != 1) { - if (trigger_vars->unk30 != 0) { + if (fast_dec_timer(&trigger_vars->timer) != 0 || ((unsigned char *)moby)[0xBC] != 1) { + if (trigger_vars->blend_from_camera != 0) { jet_end_mount(2); } else { jet_end_mount(0); @@ -174,7 +175,7 @@ void cutscene_trigger_update(char *moby) { MOBY(moby)->command = 0; } else { set_camera_position(trigger_vars); - set_camera_rotation(&trigger_vars->unk10); + set_camera_rotation(&trigger_vars->camera_rotation); } break; case CUTSCENE_TRIGGER_WAIT_FOR_REARM: From 730661512deb557569d3b68280a660f50d5a9105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:36:59 +0000 Subject: [PATCH 053/213] decomp: name follow camera approach fields in shared camera --- .../shared/camera/follow_camera_setup.c | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/src/overlays/shared/camera/follow_camera_setup.c b/src/overlays/shared/camera/follow_camera_setup.c index ff72f51c54..13b6e1375b 100644 --- a/src/overlays/shared/camera/follow_camera_setup.c +++ b/src/overlays/shared/camera/follow_camera_setup.c @@ -30,30 +30,32 @@ extern float l00_follow_camera_collision_probe_count __asm__("D_L00_00161CE0") _ extern float l00_follow_camera_collision_probe_scale __asm__("D_L00_00161CE4") __attribute__((sda)); extern float D_L00_00161D1C_gp __asm__("D_L00_00161D1C") __attribute__((sda)); +/* FollowCamTail (rnc/camera/follow_cam.h), from saved state + 0x130 */ typedef struct { char pad0[0x2C]; - float unk2C; + float eye_distance; /* 0x15C */ char pad30[0xC]; - short unk3C; - short unk3E; - int unk40; + short eye_distance_override; /* 0x16C: eye_distance eases to eye_distance_target */ + short distance_override; /* 0x16E: distance eases to distance_target */ + int eye_distance_target; /* 0x170 */ char pad44[8]; - int unk4C; + int distance_target; /* 0x17C */ char pad50[8]; float unk58; } CamOrbit; +/* FollowCamBlock (rnc/camera/follow_cam.h), from saved state + 0x40 */ typedef struct { - char pad0[0xB4]; - int unkB4; - char padB8[0x1E]; - unsigned char unkD6; + char pad0[0xB4]; + int look_height_target; /* 0xF4: look_height eases to it while the override is pending */ + char padB8[0x1E]; + unsigned char blending_in; /* 0x116 */ char padD7[3]; short target_height_override_pending; - float unkDC; - float unkE0; - float unkE4; - float unkE8; + float lateral_stiffness; /* 0x11C */ + float lateral_damping; /* 0x120 */ + float up_stiffness; /* 0x124 */ + float up_damping; /* 0x128 */ } CamTarget; typedef struct { @@ -149,20 +151,20 @@ void follow_camera_approach(unsigned char *moby) { 0.2f, 0.0f); } - ((CamOrbit *)orbit)->unk3C = 0; - ((CamOrbit *)orbit)->unk3E = 0; - ((CamOrbit *)orbit)->unk40 = 0; - ((CamOrbit *)orbit)->unk4C = 0; - ((CamOrbit *)orbit)->unk58 = ((CamOrbit *)default_orbit)->unk2C; + ((CamOrbit *)orbit)->eye_distance_override = 0; + ((CamOrbit *)orbit)->distance_override = 0; + ((CamOrbit *)orbit)->eye_distance_target = 0; + ((CamOrbit *)orbit)->distance_target = 0; + ((CamOrbit *)orbit)->unk58 = ((CamOrbit *)default_orbit)->eye_distance; ((CamTarget *)target)->target_height_override_pending = 0; - ((CamTarget *)target)->unkB4 = 0; + ((CamTarget *)target)->look_height_target = 0; (*(Cam_2e5e38 **)(moby + 0x70))->unk10 = 1; (*(Cam_2e5e38 **)(moby + 0x70))->unk22 = 0; - ((CamTarget *)target)->unkDC = D_L00_00161CA0_gp; - ((CamTarget *)target)->unkE4 = D_L00_00161CA0_gp; - ((CamTarget *)target)->unkE0 = 0.2f; - ((CamTarget *)target)->unkE8 = 0.2f; - ((CamTarget *)target)->unkD6 = 0; + ((CamTarget *)target)->lateral_stiffness = D_L00_00161CA0_gp; + ((CamTarget *)target)->up_stiffness = D_L00_00161CA0_gp; + ((CamTarget *)target)->lateral_damping = 0.2f; + ((CamTarget *)target)->up_damping = 0.2f; + ((CamTarget *)target)->blending_in = 0; spring_reset = (CamSpring *)(*(unsigned char **)(moby + 0x70) + 0x1D0); spring_reset->unk44 = l00_follow_camera_collision_probe_step_growth_factor; spring_reset->unk3C = l00_follow_camera_collision_probe_scale; From 429f195dd856d0a1442131ec320cceaa7abb9429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:40:17 +0000 Subject: [PATCH 054/213] decomp: name hoverboard and moby camera fields in shared camera --- .../shared/camera/hoverboard_camera.c | 78 +++++++++---------- .../shared/camera/moby_controlled_camera.c | 16 ++-- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/overlays/shared/camera/hoverboard_camera.c b/src/overlays/shared/camera/hoverboard_camera.c index 1de31f87a2..31d2dba8ea 100644 --- a/src/overlays/shared/camera/hoverboard_camera.c +++ b/src/overlays/shared/camera/hoverboard_camera.c @@ -185,23 +185,23 @@ typedef struct { s32 unk18; /* 0x18 */ s16 mode; /* 0x1C: 0 waiting, 1 orbiting */ u8 pad1E[0x12]; - CameraView view; /* 0x30 */ - CameraFocus focus; /* 0x80 */ - CameraSpring spring; /* 0xE0 */ - CameraTrack track; /* 0x100 */ - f32 goal[3]; /* 0x150: yaw, pitch, distance */ - f32 vel[3]; /* 0x15C */ - f32 accel[3]; /* 0x168 */ - f32 damp[3]; /* 0x174 */ - f32 dist; /* 0x180 */ - f32 spring_dist; /* 0x184 */ - f32 spring_height; /* 0x188 */ - f32 unk18C; /* 0x18C */ - f32 unk190; /* 0x190 */ - f32 unk194; /* 0x194 */ + CameraView view; /* 0x30 */ + CameraFocus focus; /* 0x80 */ + CameraSpring spring; /* 0xE0 */ + CameraTrack track; /* 0x100 */ + f32 goal[3]; /* 0x150: yaw, pitch, distance */ + f32 vel[3]; /* 0x15C */ + f32 accel[3]; /* 0x168 */ + f32 damp[3]; /* 0x174 */ + f32 dist; /* 0x180 */ + f32 spring_dist; /* 0x184 */ + f32 spring_height; /* 0x188 */ + f32 airborne_focus_dist; /* 0x18C: focus.dist while the hero is high in the air */ + f32 airborne_spring_dist; /* 0x190 */ + f32 airborne_spring_height; /* 0x194 */ u8 pad198[0x18]; - Vec4 unk1B0; /* 0x1B0 */ - Vec4 unk1C0; /* 0x1C0 */ + Vec4 bias; /* 0x1B0: offset added to the camera goal, eased to 0 */ + Vec4 bias_vel; /* 0x1C0 */ } CameraOrbit; typedef struct { @@ -214,26 +214,26 @@ typedef struct { u8 pad5C[0x14]; CameraOrbit *orbit; /* 0x70 */ u8 pad74[0xA]; - s16 unk7E; /* 0x7E: cleared after a preset reset */ - u8 pad80[4]; - s16 preset; /* 0x84: row of D_L05_0015EF50 */ + s16 transition_state; /* 0x7E: UpdateCam.transition_state, cleared after a preset reset */ + u8 pad80[4]; + s16 preset; /* 0x84: row of D_L05_0015EF50 */ } Camera; /* Camera preset: distances, angle limits and damping. */ typedef struct { f32 unk0; /* 0x00 */ u8 pad4[0x1C]; - f32 unk20; /* 0x20 */ - f32 unk24; /* 0x24 */ - f32 spring_dist; /* 0x28 */ - f32 spring_height; /* 0x2C */ - f32 dist; /* 0x30 */ - f32 unk34; /* 0x34 */ - f32 unk38; /* 0x38 */ - f32 unk3C; /* 0x3C */ - f32 unk40; /* 0x40 */ - f32 unk44; /* 0x44 */ - f32 height_vel; /* 0x48: spring velocity of the camera height */ + f32 unk20; /* 0x20 */ + f32 unk24; /* 0x24 */ + f32 spring_dist; /* 0x28 */ + f32 spring_height; /* 0x2C */ + f32 dist; /* 0x30 */ + f32 airborne_spring_dist; /* 0x34 */ + f32 airborne_spring_height; /* 0x38 */ + f32 airborne_focus_dist; /* 0x3C */ + f32 unk40; /* 0x40 */ + f32 unk44; /* 0x44 */ + f32 height_vel; /* 0x48: spring velocity of the camera height */ } CameraPreset; typedef struct { @@ -261,11 +261,11 @@ void reset_hero_follow_camera_from_preset(Camera *camera_to_reset) { orbit_state->spring_dist = preset->spring_dist; orbit_state->spring_height = preset->spring_height; orbit_state->dist = preset->dist; - orbit_state->unk190 = preset->unk34; - orbit_state->unk194 = preset->unk38; - orbit_state->unk18C = preset->unk3C; - clear_u64_value(&orbit_state->unk1B0); - clear_u64_value(&orbit_state->unk1C0); + orbit_state->airborne_spring_dist = preset->airborne_spring_dist; + orbit_state->airborne_spring_height = preset->airborne_spring_height; + orbit_state->airborne_focus_dist = preset->airborne_focus_dist; + clear_u64_value(&orbit_state->bias); + clear_u64_value(&orbit_state->bias_vel); focus = &camera_to_reset->orbit->focus; focus->state = 5; focus->unk44 = D_001413D0[0]; @@ -301,13 +301,13 @@ void reset_hero_follow_camera_from_preset(Camera *camera_to_reset) { set_camera_follow_parameters(preset->spring_dist, preset->spring_height, preset->dist, - preset->unk34, - preset->unk38, - preset->unk3C, + preset->airborne_spring_dist, + preset->airborne_spring_height, + preset->airborne_focus_dist, preset->unk40, preset->unk44); build_hero_follow_camera_transform((char *)camera_to_reset); - camera_to_reset->unk7E = 0; + camera_to_reset->transition_state = 0; } extern float FUN_001ebd78(void *, float, float, float, float, float); diff --git a/src/overlays/shared/camera/moby_controlled_camera.c b/src/overlays/shared/camera/moby_controlled_camera.c index cbe193d540..ac08c719bd 100644 --- a/src/overlays/shared/camera/moby_controlled_camera.c +++ b/src/overlays/shared/camera/moby_controlled_camera.c @@ -31,7 +31,7 @@ typedef struct MobyCameraControl { f32 camera_distance; f32 camera_height; s16 mode; - s16 unk3E; + s16 idle_frames; /* counts up while active_frames is past the stick hold time */ f32 heading; s32 target_group; char *target; /* 0x48: moby the camera follows */ @@ -315,7 +315,7 @@ void apply_moby_camera_control(char *moby) { count = moby_camera_control_record->active_frames; if (count >= duration) { active = 0; - moby_camera_control_record->unk3E += 1; + moby_camera_control_record->idle_frames += 1; if (duration + scale_game_frames(30) < count) { scale = 0.1f; active = 1; @@ -323,12 +323,12 @@ void apply_moby_camera_control(char *moby) { } if (moby_camera_control_record->active_frames >= end) { active = 1; - moby_camera_control_record->unk3E = 0; + moby_camera_control_record->idle_frames = 0; moby_camera_control_record->active_frames = 1; } if (frames < moby_camera_control_record->active_frames && moby_camera_control_record->active_frames < duration) { - moby_camera_control_record->unk3E = duration; + moby_camera_control_record->idle_frames = duration; moby_camera_control_record->active_frames = frames; } } else if ((unsigned short)(moby_camera_control_record->mode - 1) < 2) { @@ -337,8 +337,8 @@ void apply_moby_camera_control(char *moby) { if (controller_state.analog[0] != 0.0f || controller_state.analog[1] != 0.0f) moby_camera_control_record->active_frames = duration; if (moby_camera_control_record->active_frames >= duration) { - int waited = (unsigned short)moby_camera_control_record->unk3E + 1; - moby_camera_control_record->unk3E = waited; + int waited = (unsigned short)moby_camera_control_record->idle_frames + 1; + moby_camera_control_record->idle_frames = waited; if ((short)waited >= count) { if (test_moby_camera_target_angle_limits(moby, 30.0f, 0.0f) != 0) moby_camera_control_record->active_frames = end; @@ -350,12 +350,12 @@ void apply_moby_camera_control(char *moby) { } if (moby_camera_control_record->active_frames >= end) { active = 1; - moby_camera_control_record->unk3E = 0; + moby_camera_control_record->idle_frames = 0; moby_camera_control_record->active_frames = 1; } if (frames < moby_camera_control_record->active_frames && moby_camera_control_record->active_frames < duration) { - moby_camera_control_record->unk3E = duration; + moby_camera_control_record->idle_frames = duration; moby_camera_control_record->active_frames = frames; } } else if (frames < moby_camera_control_record->active_frames) { From 7c3617f4b3937f22121293520bf23bc96e5c021b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:40:17 +0000 Subject: [PATCH 055/213] decomp: name enemy health, max health and hit response class fields --- src/overlays/l03/mobys/kerwan_path_enemy.c | 20 +++++++++---------- src/overlays/l03/mobys/mine_layer.c | 8 ++++---- src/overlays/l04/mobys/big_axebot.c | 8 ++++---- src/overlays/l04/mobys/circular_saw_enemy.c | 8 ++++---- src/overlays/l05/mobys/extermibot.c | 4 ++-- src/overlays/l06/mobys/alien_queen.c | 4 ++-- src/overlays/l06/mobys/alien_snapper.c | 14 ++++++------- src/overlays/l10/mobys/blarg_ship.c | 12 +++++------ src/overlays/l10/mobys/darter.c | 12 +++++------ src/overlays/l10/mobys/screamer.c | 12 +++++------ src/overlays/l10/mobys/toxic_crab.c | 12 +++++------ src/overlays/l11/mobys/psytcopus.c | 6 +++--- src/overlays/l11/mobys/puffoid.c | 6 +++--- src/overlays/l13/mobys/blarg_space_commando.c | 4 ++-- .../l13/mobys/hovering_rocket_attacker.c | 4 ++-- src/overlays/l15/mobys/helicopter.c | 8 ++++---- src/overlays/l15/mobys/ultramech_unlimited.c | 18 ++++++++--------- src/overlays/l16/mobys/test_dummy.c | 16 +++++++-------- .../l18/mobys/drek_final_boss_robot.c | 12 +++++------ .../shared/enemies/blarg_paratrooper.c | 8 ++++---- .../shared/enemies/blarg_space_commando.c | 12 +++++------ src/overlays/shared/enemies/seeker.c | 8 ++++---- src/overlays/shared/enemies/sentrybot.c | 8 ++++---- 23 files changed, 112 insertions(+), 112 deletions(-) diff --git a/src/overlays/l03/mobys/kerwan_path_enemy.c b/src/overlays/l03/mobys/kerwan_path_enemy.c index 4839b0cd71..6b41b7107b 100644 --- a/src/overlays/l03/mobys/kerwan_path_enemy.c +++ b/src/overlays/l03/mobys/kerwan_path_enemy.c @@ -180,10 +180,10 @@ typedef struct { typedef struct Data2C8398 { char p00[0x20]; - float f20; - short s24; + float health; + short max_health; char p26[2]; - unsigned char b28; + unsigned char hit_response_class; unsigned char b29; char p2A[6]; float f30; @@ -466,10 +466,10 @@ void kerwan_path_enemy_update(Moby2C8398 *m) { moby_data->mv.path_node_proximity_distance = moby_data->mv.f24 * truncate_float_to_s32_cf(15.0f); moby_data->mv.i38 = 9; - moby_data->f20 = 3.0f; - moby_data->s24 = truncate_float_to_s32(3.0f); + moby_data->health = 3.0f; + moby_data->max_health = truncate_float_to_s32(3.0f); moby_data->b29 = 1; - moby_data->b28 = 2; + moby_data->hit_response_class = 2; moby_data->f30 = 1.75f; moby_data->q.f28 = 0.7f; moby_data->q.collision_radius_fixed = truncate_float_to_s32(716.8f); @@ -1302,7 +1302,7 @@ void kerwan_path_enemy_update(Moby2C8398 *m) { } m->i94 = *(int *)(m->p24 + 0x10); m->flags = (m->flags & 0xFFBE) | 0x1000; - moby_data->f20 = convert_integer_to_float(moby_data->s24); + moby_data->health = convert_integer_to_float(moby_data->max_health); qcopy(m->pos, moby_data->pf.path + 0x10); m->state = ENEMY_WAIT_FOR_ACTIVATION; break; @@ -1523,7 +1523,7 @@ void update_kerwan_path_enemy_hit_reaction(Moby2C8398 *moby) { } hit = find_moby_hit(moby, 0x330000, 0); hit_response_code = - resolve_moby_hit_response(moby, hit, &moby_data->f20, 0, &kind, &damage, 0, 4); + resolve_moby_hit_response(moby, hit, &moby_data->health, 0, &kind, &damage, 0, 4); if (hit != 0 && kind != HIT_REACTION_SUPPRESSED && moby->state != ENEMY_DEATH_KNOCKBACK) { hit_record_source_moby = *(char **)(hit + 0x20); if (hit_record_source_moby != 0) { @@ -1538,8 +1538,8 @@ void update_kerwan_path_enemy_hit_reaction(Moby2C8398 *moby) { angle = fast_arc_tan(moby->pos[0] - hero.motion.pos.f[0], moby->pos[1] - hero.motion.pos.f[1]); } - moby_data->f20 -= damage; - if (moby_data->f20 <= 0.0f) { + moby_data->health -= damage; + if (moby_data->health <= 0.0f) { hit_response_code = 1; } switch (hit_response_code) { diff --git a/src/overlays/l03/mobys/mine_layer.c b/src/overlays/l03/mobys/mine_layer.c index c6aead7c09..1a27d7df94 100644 --- a/src/overlays/l03/mobys/mine_layer.c +++ b/src/overlays/l03/mobys/mine_layer.c @@ -37,9 +37,9 @@ typedef struct { typedef struct { u8 pad0[0x20]; f32 health; /* 0x20 */ - s16 unk24; + s16 max_health; u8 pad26[2]; - u8 unk28; + u8 hit_response_class; u8 unk29; u8 pad2A[0xE]; s32 alerted; /* 0x38: set when it is hit */ @@ -158,8 +158,8 @@ void mine_layer_update(struct Moby *mine_layer_moby) { mine_layer_vars->walk.max_climb = 2.0f; mine_layer_vars->walk.max_drop = 2.0f; mine_layer_vars->health = 2.0f; - mine_layer_vars->unk24 = 2; - mine_layer_vars->unk28 = 1; + mine_layer_vars->max_health = 2; + mine_layer_vars->hit_response_class = 1; mine_layer_vars->unk29 = 0; path = l03_paths[mine_layer_vars->patrol.path_index]; mine_layer_vars->patrol.path = path; diff --git a/src/overlays/l04/mobys/big_axebot.c b/src/overlays/l04/mobys/big_axebot.c index 78476ef43a..f2307ed5b2 100644 --- a/src/overlays/l04/mobys/big_axebot.c +++ b/src/overlays/l04/mobys/big_axebot.c @@ -123,9 +123,9 @@ typedef struct Manip_B7B0 { typedef struct D_B7B0 { char pad00[0x20]; float hp; - short f24; + short max_health; char pad26[2]; - unsigned char f28; + unsigned char hit_response_class; unsigned char f29; char pad2A[4]; unsigned char f2E; @@ -495,8 +495,8 @@ void big_axebot_update(M_B7B0 *moby) { switch (moby->state) { case BIG_AXEBOT_STATE_INITIALIZE: data->hp = 3.0f; - data->f24 = 3; - data->f28 = 2; + data->max_health = 3; + data->hit_response_class = 2; data->f2E = 1; data->f29 = 0; data->f30 = 1.5f; diff --git a/src/overlays/l04/mobys/circular_saw_enemy.c b/src/overlays/l04/mobys/circular_saw_enemy.c index dae68f7a3c..fdf0986ae5 100644 --- a/src/overlays/l04/mobys/circular_saw_enemy.c +++ b/src/overlays/l04/mobys/circular_saw_enemy.c @@ -321,9 +321,9 @@ typedef float V4_35F0[4] __attribute__((aligned(16))); typedef struct D_35F0 { char pad00[0x20]; float hp; - short f24; + short max_health; char pad26[2]; - unsigned char f28; + unsigned char hit_response_class; unsigned char f29; char pad2A[4]; unsigned char f2E; @@ -680,8 +680,8 @@ void circular_saw_enemy_update(M_35F0 *moby) { case CIRCULAR_SAW_STATE_INITIALIZE: { float k; data->hp = 1.0f; - data->f24 = 1; - data->f28 = 0; + data->max_health = 1; + data->hit_response_class = 0; data->f2E = 1; data->f29 = 0; data->f30 = 0.75f; diff --git a/src/overlays/l05/mobys/extermibot.c b/src/overlays/l05/mobys/extermibot.c index 852fa76196..75cce4e482 100644 --- a/src/overlays/l05/mobys/extermibot.c +++ b/src/overlays/l05/mobys/extermibot.c @@ -103,7 +103,7 @@ typedef struct ExtermibotVars { f32 health; s16 max_health; u8 pad_26[0x2]; - u8 unk28; + u8 hit_response_class; u8 unk29; u8 pad_2A[0x6]; f32 unk30; @@ -186,7 +186,7 @@ void extermibot_update(unsigned char *moby) { moby_data->health = 2.0f; moby_data->unk29 = 0; moby_data->target_pursuit_timer = 0; - moby_data->unk28 = 1; + moby_data->hit_response_class = 1; moby_data->unk30 = 1.0f; moby_data->max_health = 2; moby_data->unk58 = truncate_float_to_s32(14.0f); diff --git a/src/overlays/l06/mobys/alien_queen.c b/src/overlays/l06/mobys/alien_queen.c index 2b85009bbe..a471c17fb2 100644 --- a/src/overlays/l06/mobys/alien_queen.c +++ b/src/overlays/l06/mobys/alien_queen.c @@ -360,7 +360,7 @@ typedef struct AlienQueenVars { f32 health; s16 max_health; u8 pad_26[0x2]; - u8 unk28; + u8 hit_response_class; u8 unk29; u8 pad_2A[0x4]; u8 death_control_flags; @@ -439,7 +439,7 @@ void alien_queen_update(unsigned char *moby) { alien_queen_update_vars->health = 30.0f; alien_queen_update_vars->max_health = 0x1E; alien_queen_update_vars->unk29 = 1; - alien_queen_update_vars->unk28 = 3; + alien_queen_update_vars->hit_response_class = 3; alien_queen_update_vars->death_control_flags = 1; alien_queen_update_vars->unk58 = truncate_float_to_s32(14.0f); alien_queen_update_vars->unk5A = truncate_float_to_s32(18.4f); diff --git a/src/overlays/l06/mobys/alien_snapper.c b/src/overlays/l06/mobys/alien_snapper.c index 0fee5f0d22..93ce169bf7 100644 --- a/src/overlays/l06/mobys/alien_snapper.c +++ b/src/overlays/l06/mobys/alien_snapper.c @@ -82,11 +82,11 @@ extern char D_0013F350[]; /* Ported from rac1-decomp (src/overlays/l06_blarg/vendor_002B5990.c: func_L06_002F91A8), where it is exact; names translated to the US level program. */ typedef struct { u8 pad0[0x20]; - f32 f20; /* 0x20 */ - s16 f24; /* 0x24 */ + f32 health; /* 0x20 */ + s16 max_health; /* 0x24 */ u8 pad26[2]; - u8 f28; /* 0x28 */ - u8 f29; /* 0x29 */ + u8 hit_response_class; /* 0x28 */ + u8 f29; /* 0x29 */ u8 pad2A[0x2E]; u8 f58; /* 0x58 */ u8 pad59; @@ -302,10 +302,10 @@ void alien_snapper_update(Moby *moby) { moby->scale = moby->pclass->scale * D_L06_00161EB0; switch (moby->state) { case ALIEN_SNAPPER_STATE_INITIALIZE: - snapper_behavior->f28 = 3; + snapper_behavior->hit_response_class = 3; snapper_behavior->f29 = 1; - snapper_behavior->f20 = 4.0f; - snapper_behavior->f24 = 4; + snapper_behavior->health = 4.0f; + snapper_behavior->max_health = 4; snapper_behavior->f58 = truncate_float_to_s32(10.0f); snapper_behavior->f5A = truncate_float_to_s32(14.0f); moby->flags |= 0x5000; diff --git a/src/overlays/l10/mobys/blarg_ship.c b/src/overlays/l10/mobys/blarg_ship.c index b26009cd99..b114e7db53 100644 --- a/src/overlays/l10/mobys/blarg_ship.c +++ b/src/overlays/l10/mobys/blarg_ship.c @@ -103,10 +103,10 @@ typedef struct Ship_5E48 { typedef struct ShipD_5E48 { char p0[0x20]; - float f20; - short s24; + float health; + short max_health; char p26[2]; - unsigned char b28; + unsigned char hit_response_class; unsigned char b29; char p2A[0x16]; char a40[0xB0]; @@ -218,9 +218,9 @@ void blarg_ship_update(Ship_5E48 *ship) { switch (ship->state) { case BLARG_SHIP_STATE_INITIALIZE: ship->s34 |= 0x1000; - d->f20 = 9.0f; - d->s24 = truncate_float_to_s32(9.0f); - d->b28 = 3; + d->health = 9.0f; + d->max_health = truncate_float_to_s32(9.0f); + d->hit_response_class = 3; d->b29 = 0; d->pitch_turn_velocity = 0.0f; ship->s32 = 0x7F; diff --git a/src/overlays/l10/mobys/darter.c b/src/overlays/l10/mobys/darter.c index b3e1526487..58d033aba9 100644 --- a/src/overlays/l10/mobys/darter.c +++ b/src/overlays/l10/mobys/darter.c @@ -79,10 +79,10 @@ typedef struct Hero Hero_2e01a8; typedef struct Vars_2e01a8 { char p0[0x20]; - float f20; - short h24; + float health; + short max_health; char p26[2]; - unsigned char b28; + unsigned char hit_response_class; unsigned char b29; char p2A[6]; float f30; @@ -164,9 +164,9 @@ void darter_update(Moby *moby) { switch (moby->state) { case DARTER_STATE_INITIALIZE: darter_vars->f30 = 0.25f; - darter_vars->f20 = 1.0f; - darter_vars->h24 = 1; - darter_vars->b28 = 0; + darter_vars->health = 1.0f; + darter_vars->max_health = 1; + darter_vars->hit_response_class = 0; darter_vars->b29 = 1; moby->flags |= 0x1000; qcopy(&darter_vars->home, &moby->pos); diff --git a/src/overlays/l10/mobys/screamer.c b/src/overlays/l10/mobys/screamer.c index 977605655f..38cd9dcfc6 100644 --- a/src/overlays/l10/mobys/screamer.c +++ b/src/overlays/l10/mobys/screamer.c @@ -41,10 +41,10 @@ typedef struct Moby Moby; typedef struct D_2E0630 { char p0[0x20]; - float f20; - short h24; + float health; + short max_health; char p26[2]; - unsigned char b28; + unsigned char hit_response_class; unsigned char b29; char p2A[6]; float f30; @@ -118,9 +118,9 @@ void screamer_update(Moby *moby) { switch (moby->state) { case SCREAMER_STATE_INITIALIZE: screamer_data->f30 = 0.5f; - screamer_data->f20 = 1.0f; - screamer_data->h24 = 1; - screamer_data->b28 = 0; + screamer_data->health = 1.0f; + screamer_data->max_health = 1; + screamer_data->hit_response_class = 0; screamer_data->b29 = 1; moby->flags |= 0x1000; qcopy(&screamer_data->home, &moby->pos); diff --git a/src/overlays/l10/mobys/toxic_crab.c b/src/overlays/l10/mobys/toxic_crab.c index d2394a1f50..88c483d638 100644 --- a/src/overlays/l10/mobys/toxic_crab.c +++ b/src/overlays/l10/mobys/toxic_crab.c @@ -90,10 +90,10 @@ typedef struct { typedef struct Crab2E30F8 { char p000[0x20]; - float f20; - short s24; + float health; + short max_health; char p26[2]; - unsigned char b28; + unsigned char hit_response_class; unsigned char b29; char p2A[6]; float f30; @@ -273,10 +273,10 @@ void toxic_crab_update(Moby2E30F8 *m) { return; } crab_data->f30 = 0.5f; - crab_data->s24 = 5; + crab_data->max_health = 5; crab_data->b29 = 1; - crab_data->f20 = 5.0f; - crab_data->b28 = 3; + crab_data->health = 5.0f; + crab_data->hit_response_class = 3; crab_data->b58 = truncate_float_to_s32(10.0f); crab_data->b5A = truncate_float_to_s32(16.0f); m->moby_flags |= 0x5000; diff --git a/src/overlays/l11/mobys/psytcopus.c b/src/overlays/l11/mobys/psytcopus.c index d7d2f6e149..084163b10a 100644 --- a/src/overlays/l11/mobys/psytcopus.c +++ b/src/overlays/l11/mobys/psytcopus.c @@ -30,8 +30,8 @@ extern int resolve_moby_hit_response(void *, void *, float *, int, int *, int, /* pvars of the moby run by psytcopus_update (FUN_L11_00310698 does its hit handling) */ struct PokiPathVars { u8 pad_00[0x20]; - f32 health; /* 0x20 */ - s16 unk24; /* 0x24 */ + f32 health; /* 0x20 */ + s16 max_health; /* 0x24 */ u8 pad_26[2]; u8 hit_response_class; /* 0x28 */ u8 pad_29; @@ -123,7 +123,7 @@ void psytcopus_update(struct Moby *psytcopus) { } switch (psytcopus->state) { case PSYTCOPUS_STATE_INITIALIZE: - psytcopus_vars->unk24 = 3; + psytcopus_vars->max_health = 3; psytcopus_vars->health = 3.0f; psytcopus_vars->hit_response_class = 2; psytcopus_vars->unk2A = 6; diff --git a/src/overlays/l11/mobys/puffoid.c b/src/overlays/l11/mobys/puffoid.c index c036f8238f..4119277e4e 100644 --- a/src/overlays/l11/mobys/puffoid.c +++ b/src/overlays/l11/mobys/puffoid.c @@ -50,8 +50,8 @@ enum { typedef struct { u8 pad00[0x20]; - f32 hp; /* 0x20 */ - s16 unk24; /* 0x24 */ + f32 hp; /* 0x20 */ + s16 max_health; /* 0x24 */ u8 pad26[2]; u8 hit_response_class; /* 0x28 */ u8 unk29; /* 0x29 */ @@ -154,7 +154,7 @@ void puffoid_update(struct Moby *moby) { switch (moby->state) { case PUFFOID_STATE_INITIALIZE: puffoid_vars->hp = 2.0f; - puffoid_vars->unk24 = 2; + puffoid_vars->max_health = 2; puffoid_vars->hit_response_class = 1; puffoid_vars->unk30 = 0.25f; puffoid_vars->unk58 = truncate_float_to_s32(8.0f); diff --git a/src/overlays/l13/mobys/blarg_space_commando.c b/src/overlays/l13/mobys/blarg_space_commando.c index b88cd73cc5..69571ae12f 100644 --- a/src/overlays/l13/mobys/blarg_space_commando.c +++ b/src/overlays/l13/mobys/blarg_space_commando.c @@ -92,7 +92,7 @@ typedef struct { f32 health; s16 max_health; u8 pad26[2]; - u8 unk28; + u8 hit_response_class; u8 pad29[7]; f32 unk30; u8 pad34[0x24]; @@ -201,7 +201,7 @@ void blarg_space_commando_update(struct Moby *moby) { switch (moby->state) { case BLARG_SPACE_COMMANDO_INITIALIZE: blarg_space_commando_vars->health = 2.0f; - blarg_space_commando_vars->unk28 = 1; + blarg_space_commando_vars->hit_response_class = 1; blarg_space_commando_vars->unk58 = 12; blarg_space_commando_vars->unk5A = 8; blarg_space_commando_vars->max_health = 2; diff --git a/src/overlays/l13/mobys/hovering_rocket_attacker.c b/src/overlays/l13/mobys/hovering_rocket_attacker.c index 22adff0b21..3d7a96bd3e 100644 --- a/src/overlays/l13/mobys/hovering_rocket_attacker.c +++ b/src/overlays/l13/mobys/hovering_rocket_attacker.c @@ -79,7 +79,7 @@ typedef struct HoveringRocketAttackerVars { f32 health; s16 max_health; u8 pad_26[0x2]; - u8 unk28; + u8 hit_response_class; u8 pad_29[0x2F]; u8 unk58; u8 pad_59[0x1]; @@ -136,7 +136,7 @@ void hovering_rocket_attacker_update(unsigned char *moby) { MOBY(moby)->flags |= 0x5000; moby_data->health = 4.0f; moby_data->max_health = 4; - moby_data->unk28 = 3; + moby_data->hit_response_class = 3; moby_data->rocket_max_travel_distance = 15.0f; moby_data->unk58 = 50; moby_data->unk5A = 0; diff --git a/src/overlays/l15/mobys/helicopter.c b/src/overlays/l15/mobys/helicopter.c index 89968cdacb..d1a918d07b 100644 --- a/src/overlays/l15/mobys/helicopter.c +++ b/src/overlays/l15/mobys/helicopter.c @@ -313,9 +313,9 @@ float compute_helicopter_flocking_steering_point(struct Moby *moby, typedef struct { u8 pad0[0x20]; f32 health; - s16 unk24; + s16 max_health; u8 pad26[2]; - u8 unk28; + u8 hit_response_class; u8 pad29[5]; u8 unk2E; u8 pad2F; @@ -474,8 +474,8 @@ void helicopter_update(struct Moby *moby) { moby->shadow_range = 0x20; helicopter_instance_vars->height = moby->pos.z; helicopter_instance_vars->health = 3.0f; - helicopter_instance_vars->unk24 = truncate_float_to_s32(3.0f); - helicopter_instance_vars->unk28 = 2; + helicopter_instance_vars->max_health = truncate_float_to_s32(3.0f); + helicopter_instance_vars->hit_response_class = 2; helicopter_instance_vars->unk58 = 0x19; helicopter_instance_vars->unk30 = 1.0f; helicopter_instance_vars->unk2E = 1; diff --git a/src/overlays/l15/mobys/ultramech_unlimited.c b/src/overlays/l15/mobys/ultramech_unlimited.c index 5d9a54fb29..7c35c26920 100644 --- a/src/overlays/l15/mobys/ultramech_unlimited.c +++ b/src/overlays/l15/mobys/ultramech_unlimited.c @@ -170,10 +170,10 @@ struct UMoby { struct UData { char pad0[0x20]; - float f20; - short h24; + float health; + short max_health; char pad26[2]; - unsigned char b28; + unsigned char hit_response_class; unsigned char b29; char pad2A[6]; float f30; @@ -326,9 +326,9 @@ void ultramech_unlimited_update(UMoby *ultramech_moby) { FUN_L00_00263ac8(2.5f, (int)ultramech_moby, 6, ultramech_vars->v200); switch (ultramech_moby->state) { case ULTRAMECH_INITIALIZE: - ultramech_vars->f20 = 12.0f; - ultramech_vars->h24 = 0xC; - ultramech_vars->b28 = 3; + ultramech_vars->health = 12.0f; + ultramech_vars->max_health = 0xC; + ultramech_vars->hit_response_class = 3; ultramech_vars->h3E |= 2; ultramech_vars->f30 = 6.0f; ultramech_vars->b29 = 0; @@ -1035,17 +1035,17 @@ void process_ultramech_hits_and_update_target(void *ultramech_instance) { } } } - code = FUN_00249d60(ultramech_moby, slot, &ultramech_vars->f20, 0, &kind, &impact, 0, 4); + code = FUN_00249d60(ultramech_moby, slot, &ultramech_vars->health, 0, &kind, &impact, 0, 4); if (slot != 0) { if (kind != HIT_CLASSIFICATION_NO_DAMAGE && (state = ultramech_moby->state) != 10 && state != ULTRAMECH_DEAD_WAIT_FOR_RESET && *(short *)(*(char **)(slot + 0x20) + 0xA6) != 0x350) { - ultramech_vars->f20 -= impact; + ultramech_vars->health -= impact; if (*(unsigned short *)(slot + 0x2A) == 0x100) code = 9; if (ultramech_moby->state == ULTRAMECH_FOLLOW_ENTRY_PATH) code = 9; - if (ultramech_vars->f20 <= 0.0f) + if (ultramech_vars->health <= 0.0f) code = 1; hit = truncate_float_to_s32(2560.0f); { diff --git a/src/overlays/l16/mobys/test_dummy.c b/src/overlays/l16/mobys/test_dummy.c index 0ae59c0fdd..611593f466 100644 --- a/src/overlays/l16/mobys/test_dummy.c +++ b/src/overlays/l16/mobys/test_dummy.c @@ -61,10 +61,10 @@ extern char *D_L16_001B0930[]; typedef struct { char pad00[0x20]; - float f20; - short h24; + float health; + short max_health; char pad26[2]; - unsigned char b28; + unsigned char hit_response_class; char pad29[5]; unsigned char respawn_request_state; char pad2F[0x41]; @@ -173,9 +173,9 @@ void test_dummy_update(unsigned char *moby) { if (random_integer_below(2)) { MOBY(moby)->flags |= 0x8000; } - dummy_data->b28 = 1; - dummy_data->h24 = 2; - dummy_data->f20 = 2.0f; + dummy_data->hit_response_class = 1; + dummy_data->max_health = 2; + dummy_data->health = 2.0f; dummy_data->glow_pulse_phase = random_angle_radians(); dummy_data->route = find_nearest_test_dummy_door(dummy_data->iCC, moby + 0x10); qcopy(dummy_data->spawn, moby + 0x10); @@ -413,7 +413,7 @@ void test_dummy_update(unsigned char *moby) { char *position = (char *)moby + 16; char *moby_rotation = (char *)moby + 0x40; float burst; - dummy_data->f20 = 2.0f; + dummy_data->health = 2.0f; dummy_data->timer = scale_game_frames(60); burst = frame_time_sq * 12.0f; FUN_L00_00263fd8(moby, @@ -471,7 +471,7 @@ void test_dummy_update(unsigned char *moby) { if (moby[0x53] != 9) { blend_moby_animation(moby, 9, 0, scale_game_frames(10)); } - dummy_data->f20 = 2.0f; + dummy_data->health = 2.0f; MOBY(moby)->flags |= 0x1000; } MOBY(moby)->pos.z = dummy_data->spawn[2] + D_0015ED6C * 3.0f * (float)dummy_data->timer; diff --git a/src/overlays/l18/mobys/drek_final_boss_robot.c b/src/overlays/l18/mobys/drek_final_boss_robot.c index 491f18a944..5ba342317a 100644 --- a/src/overlays/l18/mobys/drek_final_boss_robot.c +++ b/src/overlays/l18/mobys/drek_final_boss_robot.c @@ -195,10 +195,10 @@ typedef struct BossMoby { typedef struct BossData { char p0[0x20]; - float f20; - short f24; + float health; + short max_health; char p26[2]; - unsigned char f28; + unsigned char hit_response_class; char p29[7]; float f30; char p34[0x3C]; @@ -484,10 +484,10 @@ void drek_final_boss_robot_update(BossMoby *moby) { moby->f32 = 0x200; moby->f34 |= 0x41; moby->collision_data = 0; - boss_data->f28 = 3; - boss_data->f20 = 500.0f; + boss_data->hit_response_class = 3; + boss_data->health = 500.0f; boss_data->f30 = 4.0f; - boss_data->f24 = 500; + boss_data->max_health = 500; boss_data->active_movement_path = D_L18_001B0EB0[boss_data->f260[3]]; boss_data->platform_target_group_index = boss_data->f204[0]; boss_data->path_point_index = 1; diff --git a/src/overlays/shared/enemies/blarg_paratrooper.c b/src/overlays/shared/enemies/blarg_paratrooper.c index 96bd78bc05..c07ce2306b 100644 --- a/src/overlays/shared/enemies/blarg_paratrooper.c +++ b/src/overlays/shared/enemies/blarg_paratrooper.c @@ -40,9 +40,9 @@ typedef struct { typedef struct Paratrooper302618 { u8 pad0[0x20]; float health; /* 0x20: hit damage is taken from it */ - short f24; + short max_health; u8 pad26[0x2]; - unsigned char f28; + unsigned char hit_response_class; unsigned char f29; u8 pad2A[0x4]; unsigned char removal_status; @@ -210,10 +210,10 @@ void blarg_paratrooper_update(char *moby) { case PARATROOPER_STATE_INITIALIZE: { float turn_rate; paratrooper_private_state->f29 = 0; - paratrooper_private_state->f28 = 1; + paratrooper_private_state->hit_response_class = 1; paratrooper_private_state->removal_status = 1; paratrooper_private_state->health = 2.0f; - paratrooper_private_state->f24 = 2; + paratrooper_private_state->max_health = 2; paratrooper_private_state->f58 = truncate_float_to_s32(15.0f); paratrooper_private_state->f5A = truncate_float_to_s32(12.0f); if (paratrooper_private_state->wake_path_index == -1) { diff --git a/src/overlays/shared/enemies/blarg_space_commando.c b/src/overlays/shared/enemies/blarg_space_commando.c index 7f7dcd30e7..d16596621e 100644 --- a/src/overlays/shared/enemies/blarg_space_commando.c +++ b/src/overlays/shared/enemies/blarg_space_commando.c @@ -45,10 +45,10 @@ typedef struct { /* pvars of blarg_space_commando_update */ typedef struct { u8 pad0[0x20]; - f32 unk20; - s16 unk24; + f32 health; + s16 max_health; u8 pad26[2]; - u8 unk28; + u8 hit_response_class; u8 unk29; u8 pad2A[6]; f32 unk30; @@ -159,11 +159,11 @@ void blarg_space_commando_update(struct Moby *moby) { moby->anim_speed = 1.0f; switch (moby->state) { case BLARG_COMMANDO_STATE_INITIALIZE: - blarg_commando_state->unk28 = 1; - blarg_commando_state->unk20 = 2.0f; + blarg_commando_state->hit_response_class = 1; + blarg_commando_state->health = 2.0f; blarg_commando_state->unk30 = 2.0f; blarg_commando_state->unk29 = 1; - blarg_commando_state->unk24 = 2; + blarg_commando_state->max_health = 2; blarg_commando_state->unk58 = truncate_float_to_s32(12.0f); blarg_commando_state->unk5A = truncate_float_to_s32(13.6f); init_ground_move_control(&blarg_commando_state->ctl); diff --git a/src/overlays/shared/enemies/seeker.c b/src/overlays/shared/enemies/seeker.c index 0729355053..d5e9c0ab56 100644 --- a/src/overlays/shared/enemies/seeker.c +++ b/src/overlays/shared/enemies/seeker.c @@ -33,9 +33,9 @@ enum { typedef struct { u8 pad0[0x20]; f32 health; - s16 unk24; + s16 max_health; u8 pad26[2]; - u8 unk28; + u8 hit_response_class; u8 pad29[0x2F]; u8 unk58; u8 pad59; @@ -128,8 +128,8 @@ void seeker_update(struct Moby *moby) { switch (moby->state) { case SEEKER_STATE_INITIALIZE: seeker_instance_vars->health = 3.0f; - seeker_instance_vars->unk24 = 3; - seeker_instance_vars->unk28 = 2; + seeker_instance_vars->max_health = 3; + seeker_instance_vars->hit_response_class = 2; seeker_instance_vars->unk5A = 6; seeker_instance_vars->unk58 = 8; if (seeker_instance_vars->bound_path == -1) { diff --git a/src/overlays/shared/enemies/sentrybot.c b/src/overlays/shared/enemies/sentrybot.c index bec76d49f1..d38d04c3a1 100644 --- a/src/overlays/shared/enemies/sentrybot.c +++ b/src/overlays/shared/enemies/sentrybot.c @@ -82,9 +82,9 @@ typedef struct SentrybotKnockback { typedef struct SentrybotVars { u8 pad0[0x20]; f32 health; /* 0x20: hit damage is taken from it */ - s16 unk24; + s16 max_health; u8 pad26[2]; - u8 unk28; + u8 hit_response_class; u8 unk29; u8 pad2A[0xE]; s32 unk38; /* 0x38: set: restart target_countdown */ @@ -356,9 +356,9 @@ void sentrybot_update(unsigned char *moby) { mark_moby_for_removal(moby); return; } - sentrybot_instance_data->unk24 = 3; + sentrybot_instance_data->max_health = 3; sentrybot_instance_data->health = 3.0f; - sentrybot_instance_data->unk28 = 2; + sentrybot_instance_data->hit_response_class = 2; sentrybot_instance_data->unk29 = 0; qcopy(&sentrybot_instance_data->home_pos, &MOBY(moby)->pos); sentrybot_instance_data->home_yaw = MOBY(moby)->rot.z; From e6722ab43cd055eb6e2e6bd1b7fedcc9c9c48f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:41:51 +0000 Subject: [PATCH 056/213] decomp: name more enemy health and hit response class fields --- src/overlays/l00/mobys/veldin_robot_enemy.c | 4 ++-- src/overlays/l01/mobys/birdbot.c | 12 ++++++------ src/overlays/l13/mobys/blarg_gunner.c | 4 ++-- src/overlays/l13/mobys/robosquawker.c | 16 ++++++++-------- src/overlays/l16/mobys/chomper.c | 4 ++-- src/overlays/shared/enemies/armed_transport.c | 8 ++++---- .../shared/enemies/blarg_elite_commando.c | 8 ++++---- src/overlays/shared/enemies/plasmabot.c | 8 ++++---- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/overlays/l00/mobys/veldin_robot_enemy.c b/src/overlays/l00/mobys/veldin_robot_enemy.c index eba46d4dc2..5227be2ea7 100644 --- a/src/overlays/l00/mobys/veldin_robot_enemy.c +++ b/src/overlays/l00/mobys/veldin_robot_enemy.c @@ -55,7 +55,7 @@ typedef struct ElectroidMoby ElectroidMoby; typedef struct { u8 pad0[0x20]; f32 health; - s16 unk24; + s16 max_health; s16 unk26; u8 hit_response_class; u8 unk29; @@ -202,7 +202,7 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { vars->unk29 = 0; vars->health = 2.0f; vars->hit_response_class = 1; - vars->unk24 = 2; + vars->max_health = 2; vars->unk58 = truncate_float_to_s32(14.0f); vars->unk5A = truncate_float_to_s32(8.0f); vars->pathPt = 1; diff --git a/src/overlays/l01/mobys/birdbot.c b/src/overlays/l01/mobys/birdbot.c index 02330c282a..fb4334b084 100644 --- a/src/overlays/l01/mobys/birdbot.c +++ b/src/overlays/l01/mobys/birdbot.c @@ -298,7 +298,7 @@ typedef struct { typedef struct { char pad0[0x20]; - float f20; + float health; short initial_health; short hit_reaction_cooldown; unsigned char hit_response_profile_index; @@ -541,7 +541,7 @@ void birdbot_update(PeMoby *birdbot_moby) { flag ? birdbot_vars->combat_target_radius * 2.0f : birdbot_vars->combat_target_radius; select_moby_combat_target(birdbot_moby, &selected_combat_target, target_search_radius); hit = find_moby_hit(birdbot_moby, 0x210000, 0); - kind = FUN_L00_0025a478_u(birdbot_moby, hit, &birdbot_vars->f20, 0, &hits, &dmg, 0, 4); + kind = FUN_L00_0025a478_u(birdbot_moby, hit, &birdbot_vars->health, 0, &hits, &dmg, 0, 4); fast_dec_timer_s16(&birdbot_vars->hit_reaction_cooldown); if (hit != 0 && birdbot_vars->hit_reaction_cooldown == 0) { if (hit->src != 0) { @@ -561,8 +561,8 @@ void birdbot_update(PeMoby *birdbot_moby) { birdbot_moby->pos.f[1] - player->motion.pos.f[1]); } birdbot_vars->h1E2 = scale_game_frames(0x258); - birdbot_vars->f20 -= dmg; - if (birdbot_vars->f20 <= 0.0f) { + birdbot_vars->health -= dmg; + if (birdbot_vars->health <= 0.0f) { kind = BIRDBOT_HIT_REACTION_FATAL_KNOCKBACK; } switch (kind) { @@ -707,8 +707,8 @@ void birdbot_update(PeMoby *birdbot_moby) { birdbot_vars->fF4 = fall; birdbot_vars->fDC = 2.0f; birdbot_vars->fD8 = 2.0f; - birdbot_vars->f20 = 2.0f; - birdbot_vars->initial_health = truncate_float_to_s32(birdbot_vars->f20); + birdbot_vars->health = 2.0f; + birdbot_vars->initial_health = truncate_float_to_s32(birdbot_vars->health); birdbot_vars->b29 = 0; birdbot_vars->hit_response_profile_index = 1; clear_u64_value(&birdbot_vars->v40); diff --git a/src/overlays/l13/mobys/blarg_gunner.c b/src/overlays/l13/mobys/blarg_gunner.c index bd1cb271cd..9886aedc2e 100644 --- a/src/overlays/l13/mobys/blarg_gunner.c +++ b/src/overlays/l13/mobys/blarg_gunner.c @@ -53,7 +53,7 @@ typedef struct { f32 health; s16 max_health; u8 pad26[2]; - u8 unk28; + u8 hit_response_class; u8 unk29; u8 unk2A; u8 pad2B[5]; @@ -91,7 +91,7 @@ struct Moby *spawn_blarg_turret_child(struct Moby *parent) { child_vars->max_health = 1; child_vars->unk29 = 1; child_vars->unk2A = 3; - child_vars->unk28 = 0; + child_vars->hit_response_class = 0; child_vars->unk30 = 0.9f; update_entity(child_moby); copy_hero_moby_field_38(child_moby); diff --git a/src/overlays/l13/mobys/robosquawker.c b/src/overlays/l13/mobys/robosquawker.c index 087d00d48e..3c838476b8 100644 --- a/src/overlays/l13/mobys/robosquawker.c +++ b/src/overlays/l13/mobys/robosquawker.c @@ -261,10 +261,10 @@ typedef struct { typedef struct { char pad0[0x20]; - float f20; - short h24; + float health; + short max_health; short damage_cooldown_frames; - unsigned char b28; + unsigned char hit_response_class; unsigned char b29; char pad2A[0xE]; int alert_refresh_requested; @@ -528,7 +528,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { dmg = 0.0f; hit = FUN_L00_0025a420(robosquawker_moby, 0x330000, 0); resolve_moby_hit_response( - robosquawker_moby, hit, &robosquawker_vars->f20, 0, &hits, &dmg, 0, 4); + robosquawker_moby, hit, &robosquawker_vars->health, 0, &hits, &dmg, 0, 4); fast_dec_timer_s16(&robosquawker_vars->damage_cooldown_frames); if (robosquawker_vars->damage_cooldown_frames < scale_game_frames(0x2D) && hit != 0 && robosquawker_moby->state != ROBOSQUAWKER_STATE_DEATH_KNOCKBACK) { @@ -545,7 +545,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { robosquawker_moby->pos.f[1] - selected_target_record.pos.f[1]); robosquawker_vars->motion_bounce_restitution = 0.5f; robosquawker_vars->motion_collision_radius_fixed_point = 0x202; - robosquawker_vars->f20 -= hit->damage_amount; + robosquawker_vars->health -= hit->damage_amount; robosquawker_vars->motion_gravity_step = 0.0055f; robosquawker_vars->motion_horizontal_speed_change_limit = 0.0011f; robosquawker_vars->motion_horizontal_launch_step = @@ -554,7 +554,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { robosquawker_damage_knockback_vertical_speed_gp * frame_time; robosquawker_vars->motion_behavior_flags = 9; robosquawker_vars->b15D = 0; - if (robosquawker_vars->f20 <= 0.0f) { + if (robosquawker_vars->health <= 0.0f) { robosquawker_moby->h34 &= 0xEFFF; robosquawker_vars->motion_horizontal_launch_step = frame_time * 10.0f; robosquawker_vars->motion_vertical_launch_step = frame_time * 5.5f; @@ -618,8 +618,8 @@ void robosquawker_update(RsMoby *robosquawker_moby) { robosquawker_vars->alert_timer_frames = 0; robosquawker_vars->h208 = 0; robosquawker_vars->b29 = 0; - robosquawker_vars->f20 = 1.0f; - robosquawker_vars->h24 = 1; + robosquawker_vars->health = 1.0f; + robosquawker_vars->max_health = 1; robosquawker_vars->b58 = 8; robosquawker_vars->b5A = 4; FUN_L01_0026d930((char *)&robosquawker_vars->w180); diff --git a/src/overlays/l16/mobys/chomper.c b/src/overlays/l16/mobys/chomper.c index 68f3a9687d..e4a8df890d 100644 --- a/src/overlays/l16/mobys/chomper.c +++ b/src/overlays/l16/mobys/chomper.c @@ -72,7 +72,7 @@ typedef struct ChomperVars { f32 health; u16 max_health; u8 pad_26[0x2]; - u8 unk28; + u8 hit_response_class; u8 pad_29[0x2F]; u8 unk58; u8 pad_59[0x1]; @@ -117,7 +117,7 @@ void chomper_update(struct Moby *chomper_moby) { return; } chomper_data->max_health = 1; - chomper_data->unk28 = 0; + chomper_data->hit_response_class = 0; chomper_data->health = 1.0f; chomper_data->unkD0 = (int)&D_L16_00161E48; if (rand() & 1) diff --git a/src/overlays/shared/enemies/armed_transport.c b/src/overlays/shared/enemies/armed_transport.c index 45b35ccf14..bfdc84978b 100644 --- a/src/overlays/shared/enemies/armed_transport.c +++ b/src/overlays/shared/enemies/armed_transport.c @@ -32,9 +32,9 @@ enum { typedef struct ArmedTransportVars { u8 pad0[0x20]; f32 health; - s16 unk24; + s16 max_health; u8 pad26[0x2]; - s8 unk28; + s8 hit_response_class; u8 pad29[0x37]; u8 trooper_anim[0x7]; u8 hit_animation_secondary_red; @@ -184,8 +184,8 @@ void armed_transport_update(char *transport_moby) { MOBY(transport_moby)->draw_dist = 255; MOBY(transport_moby)->update_dist = 255; transport_data->health = 12.0f; - transport_data->unk24 = 12; - transport_data->unk28 = 3; + transport_data->max_health = 12; + transport_data->hit_response_class = 3; if (transport_data->path_index != -1) compute_armed_transport_path_headings(D_L16_001B0930[transport_data->path_index]); if (transport_data->second_path_index != -1) diff --git a/src/overlays/shared/enemies/blarg_elite_commando.c b/src/overlays/shared/enemies/blarg_elite_commando.c index bfd7195c88..8b085044ed 100644 --- a/src/overlays/shared/enemies/blarg_elite_commando.c +++ b/src/overlays/shared/enemies/blarg_elite_commando.c @@ -43,9 +43,9 @@ enum { typedef struct L16DamageData { u8 pad0[0x20]; float health; - s16 unk24; + s16 max_health; u8 pad26[0x2]; - s8 unk28; + s8 hit_response_class; s8 unk29; u8 pad2A[0x6]; f32 unk30; @@ -245,8 +245,8 @@ void blarg_elite_commando_update(char *commando_moby) { case COMMANDO_STATE_INITIALIZE: *(int *)&commando_data->bobbing_amplitude = 0; commando_data->unk29 = 1; - commando_data->unk24 = 3; - commando_data->unk28 = 2; + commando_data->max_health = 3; + commando_data->hit_response_class = 2; commando_data->unk30 = 1.5f; commando_data->health = 3.0f; commando_data->bobbing_x_phase = random_angle_radians(); diff --git a/src/overlays/shared/enemies/plasmabot.c b/src/overlays/shared/enemies/plasmabot.c index 27b3ab8186..62dd53f978 100644 --- a/src/overlays/shared/enemies/plasmabot.c +++ b/src/overlays/shared/enemies/plasmabot.c @@ -57,9 +57,9 @@ enum { typedef struct PlasmabotVars { u8 pad0[0x20]; f32 health; - s16 unk24; + s16 max_health; s16 stagger_reaction_duration_frames; - s8 unk28; + s8 hit_response_class; s8 unk29; u8 pad2A[0x6]; f32 unk30; @@ -460,11 +460,11 @@ void plasmabot_update(char *moby) { qcopy(&MOBY(moby)->pos, (char *)l14_paths[plasmabot_update_private_vars->path_index] + 0x10); } - plasmabot_update_private_vars->unk28 = 1; + plasmabot_update_private_vars->hit_response_class = 1; plasmabot_update_private_vars->unk29 = 0; plasmabot_update_private_vars->health = 2.0f; plasmabot_update_private_vars->unk30 = 1.25f; - plasmabot_update_private_vars->unk24 = 2; + plasmabot_update_private_vars->max_health = 2; plasmabot_update_private_vars->unk58 = truncate_float_to_s32(15.0f); plasmabot_update_private_vars->unk5A = truncate_float_to_s32(16.0f); plasmabot_update_private_vars->path_traversal_direction = 1.0f; From 5129ac578d479529b1f564f77272f1a5ec8196d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:46:16 +0000 Subject: [PATCH 057/213] decomp: name chicken, devastator missile and mine fields in shared weapons --- include/rnc/overlay/shared/weapons/mine.h | 26 +-- .../shared/weapons/gold_devastator_missile.c | 100 ++++++------ src/overlays/shared/weapons/mine.c | 151 +++++++++--------- .../shared/weapons/morphoray_chicken.c | 81 +++++----- 4 files changed, 183 insertions(+), 175 deletions(-) diff --git a/include/rnc/overlay/shared/weapons/mine.h b/include/rnc/overlay/shared/weapons/mine.h index 88866edf9c..6942cabfdd 100644 --- a/include/rnc/overlay/shared/weapons/mine.h +++ b/include/rnc/overlay/shared/weapons/mine.h @@ -22,24 +22,24 @@ struct W910 { char p10[0x20]; M910 *owner; short h34; - short h36; + short prediction_done; /* 0x36: set once the owner stops the impact preview */ char p38[8]; - float f40; + float homing_speed; /* 0x40: grows toward frame_time * 4 */ char p44[4]; - int i48; - M910 *p4C; - short h50; - short h52; - M910 *p54; - int i58; + int homing_phase_timer; /* 0x48: frames of the rise or fall phase */ + M910 *attached_moby; /* 0x4C: moby the mine came to rest on */ + short in_water; /* 0x50: set by the splash; gravity is a tenth */ + short homing_phase; /* 0x52: 1 rise, 2 fall, 0 level */ + M910 *target; /* 0x54 */ + int homing_timer; /* 0x58: the mine explodes when it runs out */ int i5C; float f60; float f64; - int i68; - float f6C; - float f70; - int i74; - int i78; + int voice; /* 0x68: -1 none */ + float bob_amplitude; /* 0x6C: set at the first bounce, decays to 0.05 */ + float bob_phase; /* 0x70 */ + int bob_start_frame; /* 0x74: frame of the first bounce; the bob ramps in from it */ + int extended_range; /* 0x78: nonzero triples the target range for one frame */ }; struct M910 { diff --git a/src/overlays/shared/weapons/gold_devastator_missile.c b/src/overlays/shared/weapons/gold_devastator_missile.c index 49a5e5b1e8..4617eaca8b 100644 --- a/src/overlays/shared/weapons/gold_devastator_missile.c +++ b/src/overlays/shared/weapons/gold_devastator_missile.c @@ -24,23 +24,23 @@ typedef struct GoldDevastatorMissileVars { u8 pad0[0x8]; - f32 unk8; + f32 previous_target_z; /* 0x08: z of previous_target (Missile1688) */ u8 padC[0x4]; - unsigned char *unk10; - s32 unk14; - unsigned char *unk18; - f32 unk1C; - f32 unk20; - s32 unk24; - s32 unk28; - f32 unk2C; - f32 unk30; - f32 unk34; - s32 unk38; - s16 unk3C; - s16 unk3E; + unsigned char *owner; /* 0x10 */ + s32 life; /* 0x14 */ + unsigned char *target; /* 0x18 */ + f32 target_height; /* 0x1C */ + f32 speed; /* 0x20 */ + s32 yaw_velocity; /* 0x24 */ + s32 pitch_velocity; /* 0x28 */ + f32 yaw; /* 0x2C */ + f32 pitch; /* 0x30 */ + f32 desired_speed; /* 0x34 */ + s32 track_velocity; /* 0x38 */ + s16 turn_time; /* 0x3C */ + s16 turn_period; /* 0x3E */ u8 pad40[0x8]; - f32 unk48; + f32 limit; /* 0x48 */ } GoldDevastatorMissileVars; typedef struct { @@ -69,15 +69,15 @@ typedef struct { VU v; s32 w10; s32 w14; - char *owner; - f32 f1C; - s32 w20; - s32 w24; - s32 w28; - f32 f2C; - f32 f30; + char *target; /* 0x18: same layout as Missile1688 */ + f32 target_height; + s32 speed; + s32 yaw_velocity; + s32 pitch_velocity; + f32 yaw; + f32 pitch; s32 w34; - s32 w38; + s32 track_velocity; } O; typedef u32 VQ1688 __attribute__((mode(TI), aligned(16))); @@ -434,43 +434,43 @@ unsigned char *spawn_devastator_missile(unsigned char *missile_source_moby, MOBY(missile_moby)->rot.z = initial_yaw; MOBY(missile_moby)->rot.y = initial_pitch; MOBY(missile_moby)->state = DEVASTATOR_MISSILE_STATE_FLYING; - missile_data->unk10 = missile_source_moby; + missile_data->owner = missile_source_moby; qcopy(&MOBY(missile_moby)->pos, spawn_position); default_desired_speed = frame_time * 20.0f; - missile_data->unk38 = 1; - missile_data->unk48 = 70.0f; - missile_data->unk34 = default_desired_speed; - missile_data->unk24 = 0; - missile_data->unk28 = 0; - missile_data->unk18 = target_moby; - missile_data->unk20 = default_desired_speed / 3.0f; + missile_data->track_velocity = 1; + missile_data->limit = 70.0f; + missile_data->desired_speed = default_desired_speed; + missile_data->yaw_velocity = 0; + missile_data->pitch_velocity = 0; + missile_data->target = target_moby; + missile_data->speed = default_desired_speed / 3.0f; if (target_moby != 0) { target_aim_record = get_moby_target_info(target_moby); if (target_aim_record != 0) { *(unsigned short *)(target_aim_record + 0x1E) |= 0x80; if (target_aim_record[0xB]) { - missile_data->unk38 = 0; + missile_data->track_velocity = 0; } if (target_aim_record[0xC]) { - missile_data->unk34 = (float)target_aim_record[0xC] * frame_time; + missile_data->desired_speed = (float)target_aim_record[0xC] * frame_time; } - if (frame_time * 20.0f < missile_data->unk34) { - missile_data->unk48 = 140.0f; + if (frame_time * 20.0f < missile_data->desired_speed) { + missile_data->limit = 140.0f; } } } - missile_data->unk2C = guidance_yaw; - missile_data->unk30 = guidance_pitch; - missile_data->unk14 = FUN_001f96f8_2afc70(300); + missile_data->yaw = guidance_yaw; + missile_data->pitch = guidance_pitch; + missile_data->life = FUN_001f96f8_2afc70(300); if (target_moby != 0) { qcopy(missile_data, &MOBY(target_moby)->pos); - missile_data->unk1C = target_height_offset; - missile_data->unk8 += target_height_offset; + missile_data->target_height = target_height_offset; + missile_data->previous_target_z += target_height_offset; } x = FUN_001f9af0_2afc70(D_0013F490_lui); turn_period = FUN_001f96f8_2afc70(frame_time * 0.1f < x ? 0x3C : 0xF); - missile_data->unk3E = turn_period; - missile_data->unk3C = turn_period; + missile_data->turn_period = turn_period; + missile_data->turn_time = turn_period; if (missile_source_moby != 0 && MOBY(missile_source_moby)->state != 0xFE && MOBY(missile_source_moby)->state != 0xFD) { collision_start.q = ((V_2afc70 *)&MOBY(missile_source_moby)->pos)->q; @@ -592,17 +592,17 @@ void select_gold_devastator_missile_target(char *gold_missile_moby, if (find_listed_moby_by_data_id(candidate_moby) != 0) goto next; z = 0.5f; - gold_missile_data->owner = candidate_moby; + gold_missile_data->target = candidate_moby; if (candidate_aim_record_address != 0) z = *(f32 *)(candidate_aim_record_address + 0x10); - gold_missile_data->f2C = angh; - gold_missile_data->w38 = flag; - gold_missile_data->f30 = pitch; - gold_missile_data->w24 = 0; - gold_missile_data->w28 = 0; - gold_missile_data->w20 = 0; + gold_missile_data->yaw = angh; + gold_missile_data->track_velocity = flag; + gold_missile_data->pitch = pitch; + gold_missile_data->yaw_velocity = 0; + gold_missile_data->pitch_velocity = 0; + gold_missile_data->speed = 0; qcopy(gold_missile_data, opos); - gold_missile_data->f1C = z; + gold_missile_data->target_height = z; } next: i++; diff --git a/src/overlays/shared/weapons/mine.c b/src/overlays/shared/weapons/mine.c index 302748179e..e4962d03fe 100644 --- a/src/overlays/shared/weapons/mine.c +++ b/src/overlays/shared/weapons/mine.c @@ -33,20 +33,20 @@ enum { typedef struct MineVars { u8 pad0[0x30]; - s32 unk30; + s32 owner; u8 pad34[0x2]; - s16 unk36; + s16 prediction_done; f32 unk38; f32 unk3C; u8 pad40[0x1c]; s32 unk5C; f32 unk60; f32 unk64; - s32 unk68; - f32 unk6C; - f32 unk70; - s32 unk74; - s32 unk78; + s32 voice; + f32 bob_amplitude; + f32 bob_phase; + s32 bob_start_frame; + s32 extended_range; } MineVars; typedef float V910[4] __attribute__((aligned(16))); @@ -418,9 +418,9 @@ unsigned char *spawn_mine(int mine_owner_moby, OvlQuad *spawn_position) { MOBY(mine_moby)->visible = 1; MOBY(mine_moby)->scale = MOBY(mine_moby)->scale * 0.5f; MOBY(mine_moby)->state = MINE_STATE_OWNER_ATTACHED; - mine_vars->unk30 = mine_owner_moby; - mine_vars->unk36 = 0; - mine_vars->unk78 = 0; + mine_vars->owner = mine_owner_moby; + mine_vars->prediction_done = 0; + mine_vars->extended_range = 0; qcopy(&MOBY(mine_moby)->pos, spawn_position); clear_u64_value(mine_vars); { @@ -438,11 +438,11 @@ unsigned char *spawn_mine(int mine_owner_moby, OvlQuad *spawn_position) { mine_vars->unk3C = frame_scaled_random_sample; mine_vars->unk64 = z; mine_vars->unk60 = z; - mine_vars->unk70 = z; - mine_vars->unk6C = z; + mine_vars->bob_phase = z; + mine_vars->bob_amplitude = z; mine_vars->unk5C = x; - mine_vars->unk74 = 0; - mine_vars->unk68 = -1; + mine_vars->bob_start_frame = 0; + mine_vars->voice = -1; MOBY(mine_moby)->collision = 0; } update_entity(mine_moby); @@ -667,7 +667,7 @@ void mine_update(M910 *mine_moby) { return; } if (v->owner != 0 && v->owner->state != 0xFE && v->owner->state != 0xFD && - v->owner->cls == 0xBE && v->h36 == 0 && 0.0f < fast_vec_length(v)) { + v->owner->cls == 0xBE && v->prediction_done == 0 && 0.0f < fast_vec_length(v)) { if (hero.ground_moby == 0 || FUN_002141f8_cf(hero.ground_moby) == 0) { predict_mine_impact(v, mine_moby, 1); } else if (predict_mine_impact(v, mine_moby, 0) == 0) { @@ -707,7 +707,7 @@ void mine_update(M910 *mine_moby) { qcopy(&mine_pre_motion_position, &mine_moby->pos); if (!(mine_state_snapshot & 4)) { fast_vec_add(&mine_moby->pos, &mine_moby->pos, v); - if (v->h50 == 0) { + if (v->in_water == 0) { v->vel.f[2] -= frame_time_sq * 9.8f; } else { v->vel.f[2] -= frame_time_sq * 9.8f / 10.0f; @@ -732,19 +732,19 @@ void mine_update(M910 *mine_moby) { q.cls = mine_moby->cls; mine_moby->pos.f[2] -= 0.4f; q.dir[2] = 1.0f; - k = convert_integer_to_float(D_L00_0015F5CC - v->i74); + k = convert_integer_to_float(D_L00_0015F5CC - v->bob_start_frame); k = k / scale_time(*(float *)&mine_bounce_ramp_duration); if (1.0f < k) { k = 1.0f; } else if (k < 0.0f) { k = 0.0f; } - mine_moby->pos.f[2] -= v->f6C * fast_sin(v->f70) * k; + mine_moby->pos.f[2] -= v->bob_amplitude * fast_sin(v->bob_phase) * k; if (!(mine_moby->state & 4) && collision_line( &mine_pre_motion_position, &mine_moby->pos, 0x10, (int)mine_moby, (int)&q) != 0) { - if (v->h50 == 0 && collision_hit_material() == 0 && v->vel.f[2] < 0.0f) { + if (v->in_water == 0 && collision_hit_material() == 0 && v->vel.f[2] < 0.0f) { V910 t; V910 n; { @@ -758,7 +758,7 @@ void mine_update(M910 *mine_moby) { mine_moby->pos.f[1], 0.5f, -0.35f); - v->h50 = 1; + v->in_water = 1; clear_u64_value((float *)v); v->vel.f[2] = frame_time * -1.5f; t[0] = mine_moby->pos.f[0]; @@ -780,7 +780,7 @@ void mine_update(M910 *mine_moby) { spawn_debris_chunk(t, n, random_integer_below(2), life); } } - } else if (v->h50 != 0 || collision_hit_material() != 0) { + } else if (v->in_water != 0 || collision_hit_material() != 0) { V910 t; V910 n; V910 r; @@ -820,7 +820,7 @@ void mine_update(M910 *mine_moby) { } else if ((coll_hit.moby != 0 && coll_hit.moby != hero.moby && coll_hit.moby != v->owner) || coll_hit.i1C > 0) { - if (v->h50 != 0 || collision_hit_material() == 0 || + if (v->in_water != 0 || collision_hit_material() == 0 || v->vel.f[2] < frame_time * -9.8f) { mine_moby->bBC = 1; qcopy(&mine_moby->pos, &coll_hit.pos); @@ -840,16 +840,16 @@ void mine_update(M910 *mine_moby) { reflect_vector(v, v, &coll_hit.nrm); scale_vector_xyz(v, v, 0.6f); v->vel.f[2] *= 0.5f; - if (v->f6C == 0.0f) { + if (v->bob_amplitude == 0.0f) { float ph; - v->f6C = absolute_float(ov[2]) * 2.0f; + v->bob_amplitude = absolute_float(ov[2]) * 2.0f; ph = -2.3561945f; if (0.0f < ov[2]) { ph = 0.7853982f; } - v->f70 = ph; - v->i74 = D_L00_0015F5CC; + v->bob_phase = ph; + v->bob_start_frame = D_L00_0015F5CC; } fast_vec_normalize(t, &coll_hit.nrm, 1.0f); if (0.707f < fast_vec_dot(t, &up) && ov[2] < 0.0f) { @@ -864,7 +864,7 @@ void mine_update(M910 *mine_moby) { mine_moby->state |= 4; mine_moby->i94 = *(int *)(mine_moby->p24 + 0x10); if (coll_hit.moby != 0 && hd != 0) { - v->p4C = coll_hit.moby; + v->attached_moby = coll_hit.moby; } } } @@ -889,15 +889,16 @@ void mine_update(M910 *mine_moby) { } else if (mine_moby->state & 4) { float fz = probe_ground_height(&mine_moby->pos, 0, 0.5f); - if (v->p4C != 0) { - if (!(v->p4C != 0 && v->p4C->state != 0xFE && v->p4C->state != 0xFD)) { + if (v->attached_moby != 0) { + if (!(v->attached_moby != 0 && v->attached_moby->state != 0xFE && + v->attached_moby->state != 0xFD)) { mine_moby->bBC = 1; - v->p4C = 0; + v->attached_moby = 0; } else if (coll_hit_moby != 0) { hd = (M910 *)FUN_002141f8_cf((unsigned char *)coll_hit_moby); if (hd != 0) { FUN_L00_00260400(mine_moby, - v->p4C, + v->attached_moby, &mine_moby->pos, &mine_moby->rx, &mine_moby->pos, @@ -908,7 +909,7 @@ void mine_update(M910 *mine_moby) { int s; mine_moby->state = MINE_STATE_FREE_MOTION; - s = v->i68; + s = v->voice; if (s != -1) { char *tab = ((char *)&voice_pool); char *e = tab + s * 0x70; @@ -919,9 +920,9 @@ void mine_update(M910 *mine_moby) { } } v->vel.f[2] = 0.0f; - v->i68 = -1; + v->voice = -1; v->h34 = scale_game_frames(0x78); - v->p4C = 0; + v->attached_moby = 0; } } else if (!(mine_moby->state & 0x10)) { if (mine_moby->pos.f[2] - fz < frame_time_sq * 40.0f) { @@ -929,13 +930,13 @@ void mine_update(M910 *mine_moby) { v->h34 = 0; if (coll_hit.moby != 0 && FUN_002141f8_cf((unsigned char *)coll_hit.moby) != 0) { - v->p4C = coll_hit.moby; + v->attached_moby = coll_hit.moby; } } else { int s; mine_moby->state = MINE_STATE_FREE_MOTION; - s = v->i68; + s = v->voice; if (s != -1) { char *tab = ((char *)&voice_pool); char *e = tab + s * 0x70; @@ -946,17 +947,17 @@ void mine_update(M910 *mine_moby) { } } v->vel.f[2] = 0.0f; - v->i68 = -1; + v->voice = -1; v->h34 = scale_game_frames(0x78); } } - if ((v->p54 == 0 || v->p54->state == 0xFE || v->p54->state == 0xFD || - !(v->p54->flags & 0x1000)) && + if ((v->target == 0 || v->target->state == 0xFE || v->target->state == 0xFD || + !(v->target->flags & 0x1000)) && (mine_moby->state & 0x10)) { int s; mine_moby->state = MINE_STATE_FREE_MOTION; - s = v->i68; + s = v->voice; if (s != -1) { char *tab = ((char *)&voice_pool); char *e = tab + s * 0x70; @@ -967,14 +968,14 @@ void mine_update(M910 *mine_moby) { } } v->vel.f[2] = 0.0f; - v->p54 = 0; - v->i68 = -1; + v->target = 0; + v->voice = -1; v->h34 = scale_game_frames(0x78); if (mine_moby->anim != 0) { blend_moby_animation(mine_moby, 0, 0, 10); } } - if (v->p54 != 0 && (mine_moby->state & 0x10)) { + if (v->target != 0 && (mine_moby->state & 0x10)) { V910 t; V910 n; Qry910 homing_hit_descriptor; @@ -989,30 +990,30 @@ void mine_update(M910 *mine_moby) { if ((mine_moby->b70 & 2) && mine_moby->b52 == 1 && mine_moby->anim != 2) { blend_moby_animation(mine_moby, 2, 0, 10); } - if (voice_is_playing(mine_moby, v->i68) == 0) { - v->i68 = allocate_voice_for_target_entry(1, 4, (int)mine_moby); + if (voice_is_playing(mine_moby, v->voice) == 0) { + v->voice = allocate_voice_for_target_entry(1, 4, (int)mine_moby); } - sp = v->f40 + frame_time_sq * 15.0f; + sp = v->homing_speed + frame_time_sq * 15.0f; max_homing_step = frame_time * 4.0f; - v->f40 = sp; + v->homing_speed = sp; if (max_homing_step < sp) { - v->f40 = max_homing_step; + v->homing_speed = max_homing_step; } - mode = v->h52; + mode = v->homing_phase; if (mode == MINE_HOMING_RISE_PHASE) { mine_moby->pos.f[2] += frame_scale * 0.05f; - if (fast_dec_timer(&v->i48) != 0) { - v->i48 = scale_game_frames(7); - v->h52 = 2; + if (fast_dec_timer(&v->homing_phase_timer) != 0) { + v->homing_phase_timer = scale_game_frames(7); + v->homing_phase = 2; } } else if (mode == MINE_HOMING_FALL_PHASE) { mine_moby->pos.f[2] -= frame_scale * 0.05f; - if (fast_dec_timer(&v->i48) != 0) { - v->h52 = 0; + if (fast_dec_timer(&v->homing_phase_timer) != 0) { + v->homing_phase = 0; } } - fast_vec_sub(t, &v->p54->pos, &mine_moby->pos); - fast_vec_normalize(t, t, v->f40); + fast_vec_sub(t, &v->target->pos, &mine_moby->pos); + fast_vec_normalize(t, t, v->homing_speed); fast_vec_add(&mine_moby->pos, &mine_moby->pos, t); make_hit_descriptor(&homing_hit_descriptor, mine_moby, 0x10000, t, 1.0f); qcopy(&probe, &mine_moby->pos); @@ -1032,7 +1033,7 @@ void mine_update(M910 *mine_moby) { fast_vec_sub(&collision_correction, &coll_hit_position, &probe); fast_vec_add(&mine_moby->pos, &mine_moby->pos, &collision_correction); } - if (fast_dec_timer(&v->i58) != 0) { + if (fast_dec_timer(&v->homing_timer) != 0) { mine_moby->bBC = 1; } } @@ -1053,7 +1054,7 @@ void mine_update(M910 *mine_moby) { } if (!(mine_moby->state & 2) && fast_dec_timer_s16(&v->h34) != 0) { mine_moby->state |= 2; - v->p54 = 0; + v->target = 0; } { char *moby_hit_record = find_moby_hit(mine_moby, 0x830000, 0); @@ -1091,7 +1092,7 @@ void mine_update(M910 *mine_moby) { int i; M910 *candidate_moby; - if (v->i78 != 0) { + if (v->extended_range != 0) { range *= 3.0f; } i = 0; @@ -1122,7 +1123,8 @@ void mine_update(M910 *mine_moby) { 2.0f)) { goto next; } - if (v->p54 != 0 && v->p54->state != 0xFE && v->p54->state != 0xFD) { + if (v->target != 0 && v->target->state != 0xFE && + v->target->state != 0xFD) { goto next; } if (best != 0) { @@ -1138,49 +1140,50 @@ void mine_update(M910 *mine_moby) { best = candidate_moby; blend_moby_animation(mine_moby, 1, 0, scale_game_frames(3)); allocate_voice_for_target_entry(0, 0, (int)mine_moby); - v->f40 = 0.0f; - v->i58 = scale_game_frames(600); - v->h52 = 1; - v->i48 = scale_game_frames(7); + v->homing_speed = 0.0f; + v->homing_timer = scale_game_frames(600); + v->homing_phase = 1; + v->homing_phase_timer = scale_game_frames(7); next: i++; candidate_moby = (M910 *)active_mobies[i]; } if (best != 0) { - v->p54 = best; + v->target = best; } } } - v->i78 = 0; + v->extended_range = 0; if (v->i5C < 0 || *(int *)&mine_force_burst != 0) { cart_burst(mine_moby, &mine_moby->pos, -1, 0.33f, 13.0f); mine_spawn_drops(mine_moby, D_L00_001B07B0); mark_moby_for_removal(mine_moby); } { - float amp = v->f6C; + float amp = v->bob_amplitude; if (0.05f < amp) { float damped = frame_scale * -0.012000024f * amp + amp; - v->f6C = damped; + v->bob_amplitude = damped; if (damped < 0.05f) { - v->f6C = 0.05f; + v->bob_amplitude = 0.05f; } } } - k = convert_integer_to_float(D_L00_0015F5CC - v->i74); + k = convert_integer_to_float(D_L00_0015F5CC - v->bob_start_frame); k = k / scale_time(*(float *)&mine_bounce_ramp_duration); if (1.0f < k) { k = 1.0f; } else if (k < 0.0f) { k = 0.0f; } - v->f70 = fast_add_rotations(v->f70, frame_time * 6.2831855f); - mine_moby->pos.f[2] = mine_moby->pos.f[2] + v->f6C * fast_sin(v->f70) * k + 0.4f; + v->bob_phase = fast_add_rotations(v->bob_phase, frame_time * 6.2831855f); + mine_moby->pos.f[2] = + mine_moby->pos.f[2] + v->bob_amplitude * fast_sin(v->bob_phase) * k + 0.4f; if (mine_moby->bBC != 0) { explosion_camera_distance = vector_distance_xy(&mine_moby->pos, D_L00_00166DC0); - if (v->h50 == 0) { + if (v->in_water == 0) { V910 t; { float s = convert_integer_to_float(D_E910.b11) * 0.5f + 1.0f; @@ -1202,7 +1205,7 @@ void mine_update(M910 *mine_moby) { } } gz = FUN_L00_00259710(&mine_moby->pos); - if (v->h50 != 0) { + if (v->in_water != 0) { V910 t; V910 n; V910 r; diff --git a/src/overlays/shared/weapons/morphoray_chicken.c b/src/overlays/shared/weapons/morphoray_chicken.c index 9bdb5572ce..15d77f3b73 100644 --- a/src/overlays/shared/weapons/morphoray_chicken.c +++ b/src/overlays/shared/weapons/morphoray_chicken.c @@ -39,15 +39,15 @@ typedef struct { typedef struct { u8 pad00[0x10]; - void *unk10; - void *unk14; + void *slot_buffer; /* 0x10: same fields as ChickenVars */ + void *slot_record; /* 0x14 */ u8 pad18[0x64 - 0x18]; - u16 unk64; - u16 unk66; + u16 sound_timer; + u16 flee_timer; u8 pad68[0x70 - 0x68]; - s32 unk70; - u32 unk74; - f32 unk78; + s32 expire_timer; + u32 gold; + f32 health; } Sub; /* Class header view: pclass + 0xE and + 0x10. */ @@ -55,7 +55,7 @@ typedef struct { u8 pad00[0xE]; u8 unkE; u8 pad0F; - u32 unk10; + u32 collision; /* 0x10: the class's default moby collision */ } Part; typedef struct { @@ -74,7 +74,7 @@ typedef struct { typedef struct { u8 pad00[0xC]; - Opt *unk0C; + Opt *color_options; /* 0x0C */ } Holder; typedef struct { @@ -83,9 +83,9 @@ typedef struct { u8 pad20[0x34 - 0x20]; u16 flags34; u8 pad36[0x38 - 0x36]; - u64 unk38; + u64 spawn_frame; /* 0x38: struct Moby names */ u8 pad40[0x78 - 0x40]; - Holder *unk78; + Holder *pvars; } State; typedef struct { @@ -121,9 +121,10 @@ typedef struct { /* Vars of a morph-o-ray chicken, set up by FUN_L00_002c9348. */ typedef struct { - u8 pad0[0x10]; - void *unk10; - char *unk14; + u8 pad0[0x10]; + void + *slot_buffer; /* 0x10: 0x60-byte buffer of the chicken's slot, passed to FUN_L00_002dc9f0 */ + char *slot_record; /* 0x14: l00_morphoray_chicken_slot_records entry */ u8 pad18[8]; u8 manipulator[0x44]; /* 0x20: scaled by FUN_L00_00263ac8 */ short sound_timer; /* 0x64 */ @@ -264,15 +265,15 @@ struct Moby *spawn_morphoray_chicken(State *source_state) { spawned_moby->visible = 1; moby_vars = (Sub *)spawned_moby->pvars; if ((source_state->flags34 & 0x20) != 0) { - color_options = source_state->unk78->unk0C; + color_options = source_state->pvars->color_options; if (color_options != NULL) { set_moby_color( spawned_moby, color_options->f4, color_options->green, color_options->blue); } else { - spawned_moby->spawn_frame = source_state->unk38; + spawned_moby->spawn_frame = source_state->spawn_frame; } } else { - spawned_moby->spawn_frame = source_state->unk38; + spawned_moby->spawn_frame = source_state->spawn_frame; } spawned_moby->anim_speed = random_float_between(0.85f, 1.15f); qcopy(&spawned_moby->pos, &source_state->pos); @@ -297,16 +298,17 @@ struct Moby *spawn_morphoray_chicken(State *source_state) { spawned_moby->rot.x = -ground_height_pitch_and_variant_scratch; spawned_moby->rot.y = fast_arc_tan(loc.yaw_local_z, loc.yaw_local_x); } - spawned_moby->collision = ((Part *)spawned_moby->pclass)->unk10; + spawned_moby->collision = ((Part *)spawned_moby->pclass)->collision; allocate_voice_for_target_entry(1, 0, spawned_moby); spawned_moby->state = CHICKEN_STATE_IDLE; - moby_vars->unk66 = 0; - moby_vars->unk64 = FUN_L00_00257b90(scale_game_frames(0x78), scale_game_frames(0x12C)); + moby_vars->flee_timer = 0; + moby_vars->sound_timer = + FUN_L00_00257b90(scale_game_frames(0x78), scale_game_frames(0x12C)); ground_height_pitch_and_variant_scratch = convert_integer_to_float(D_0013E520[0x15]); - moby_vars->unk70 = -1; - moby_vars->unk78 = ground_height_pitch_and_variant_scratch * 3.0f + 1.0f; - moby_vars->unk74 = D_0013E520[0x15]; - spawned_moby->command = moby_vars->unk74; + moby_vars->expire_timer = -1; + moby_vars->health = ground_height_pitch_and_variant_scratch * 3.0f + 1.0f; + moby_vars->gold = D_0013E520[0x15]; + spawned_moby->command = moby_vars->gold; FUN_L00_00257470(source_state, 0, -1); source_record = get_moby_target_info(source_state); if (source_record != NULL && *(u8 *)((u8 *)source_record + 0xE) == 1) { @@ -328,26 +330,29 @@ struct Moby *spawn_morphoray_chicken(State *source_state) { previous_slot_moby->state != MOBY_STATE_SPAWN_POOL_REMOVAL && previous_slot_moby->state != MOBY_STATE_NON_SPAWN_POOL_REMOVAL) { if (previous_slot_moby->state == CHICKEN_STATE_EMIT_FEATHERS) { - moby_vars->unk78 = yaw_cosine_scratch; + moby_vars->health = yaw_cosine_scratch; spawned_moby->flags &= ~0x20; - } else if (!moby_vars->unk74) { - moby_vars->unk14 = (void *)&l00_morphoray_chicken_slot_records[D_L00_00161854]; - moby_vars->unk10 = (void *)(morphoray_chicken_slot_buffers + D_L00_00161854 * 0x60); + } else if (!moby_vars->gold) { + moby_vars->slot_record = + (void *)&l00_morphoray_chicken_slot_records[D_L00_00161854]; + moby_vars->slot_buffer = + (void *)(morphoray_chicken_slot_buffers + D_L00_00161854 * 0x60); spawned_moby->flags |= 0x1020; - ((Node *)moby_vars->unk14)->unk70 = (void *)D_L00_00161840; + ((Node *)moby_vars->slot_record)->unk70 = (void *)D_L00_00161840; } - ((Sub *)D_L00_001DD100[D_L00_00161854]->pvars)->unk70 = (void *)1; - } else if (!moby_vars->unk74) { - moby_vars->unk14 = (void *)&l00_morphoray_chicken_slot_records[D_L00_00161854]; - moby_vars->unk10 = (void *)(morphoray_chicken_slot_buffers + D_L00_00161854 * 0x60); + ((Sub *)D_L00_001DD100[D_L00_00161854]->pvars)->expire_timer = (void *)1; + } else if (!moby_vars->gold) { + moby_vars->slot_record = (void *)&l00_morphoray_chicken_slot_records[D_L00_00161854]; + moby_vars->slot_buffer = + (void *)(morphoray_chicken_slot_buffers + D_L00_00161854 * 0x60); spawned_moby->flags |= 0x1020; - ((Node *)moby_vars->unk14)->unk70 = (void *)D_L00_00161840; + ((Node *)moby_vars->slot_record)->unk70 = (void *)D_L00_00161840; } - FUN_L00_002c92d8_c(moby_vars->unk14); + FUN_L00_002c92d8_c(moby_vars->slot_record); D_L00_001DD100[D_L00_00161854] = spawned_moby; D_L00_00161854_gp = D_L00_00161854 + 1; D_L00_00161854 = (D_L00_00161854 + 1) % 20; - if (moby_vars->unk74) { + if (moby_vars->gold) { spawned_moby->flags &= ~0x20; } update_entity(spawned_moby); @@ -737,9 +742,9 @@ void morphoray_chicken_update(Moby *chicken_moby) { } break; case CHICKEN_STATE_EMIT_FEATHERS: - if (FUN_L00_002dc9f0(chicken_moby, chicken_vars->unk10) != 0) { + if (FUN_L00_002dc9f0(chicken_moby, chicken_vars->slot_buffer) != 0) { chicken_moby->state = CHICKEN_STATE_INITIALIZE; - *(short *)(chicken_vars->unk14 + 0x68) = 0; + *(short *)(chicken_vars->slot_record + 0x68) = 0; } if (random_integer_below(4) != 0) { return; From 2912810d4f9d16912cbb9118fb59e2ce35aa41e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:47:49 +0000 Subject: [PATCH 058/213] decomp: name bolt attraction and gold bolt spin fields in shared pickups --- src/overlays/shared/pickups/bolt.c | 34 ++++++++++++------------- src/overlays/shared/pickups/gold_bolt.c | 16 ++++++------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/overlays/shared/pickups/bolt.c b/src/overlays/shared/pickups/bolt.c index 392315284d..366c5da855 100644 --- a/src/overlays/shared/pickups/bolt.c +++ b/src/overlays/shared/pickups/bolt.c @@ -41,20 +41,20 @@ typedef struct { Vec4 vel; /* 0x20 */ Vec4 spin; /* 0x30 */ u8 pad40[8]; - f32 unk48; /* 0x48 */ - f32 unk4C; /* 0x4C */ - f32 unk50; /* 0x50 */ - u8 landed; /* 0x54 */ - u8 unk55; /* 0x55 */ - u8 hop_frames; /* 0x56 */ - u8 hop_left; /* 0x57 */ - f32 unk58; /* 0x58 */ - void *ground_moby; /* 0x5C */ - struct Bolt *unk60; /* 0x60 */ - f32 speed; /* 0x64 */ - f32 ground_z; /* 0x68 */ - s16 slot; /* 0x6C */ - s16 slot_timer; /* 0x6E */ + f32 attraction_angle_y; /* 0x48 */ + f32 attraction_angle_z; /* 0x4C */ + f32 unk50; /* 0x50 */ + u8 landed; /* 0x54 */ + u8 unk55; /* 0x55 */ + u8 hop_frames; /* 0x56 */ + u8 hop_left; /* 0x57 */ + f32 unk58; /* 0x58 */ + void *ground_moby; /* 0x5C */ + struct Bolt *unk60; /* 0x60 */ + f32 speed; /* 0x64 */ + f32 ground_z; /* 0x68 */ + s16 slot; /* 0x6C */ + s16 slot_timer; /* 0x6E */ } BoltVars; typedef struct Bolt { @@ -423,12 +423,12 @@ void bolt_update(Bolt *bolt_moby) { fast_vec_add(&bolt_moby->pos, &bolt_moby->pos, &v->vel); fast_vec_sub(&collection_offset, &hero.motion.body_center, &bolt_moby->pos); if (v->speed < fast_vec_length(&collection_offset)) { - if (!(v->unk4C == 0.0f && v->unk48 == 0.0f)) { + if (!(v->attraction_angle_z == 0.0f && v->attraction_angle_y == 0.0f)) { transform_vector_by_basis( &collection_offset, &collection_offset, hero.inv_rot_matrix); clear_u64_value(&attraction_rotation_angles); - attraction_rotation_angles.f[1] = v->unk48; - attraction_rotation_angles.f[2] = v->unk4C; + attraction_rotation_angles.f[1] = v->attraction_angle_y; + attraction_rotation_angles.f[2] = v->attraction_angle_z; euler_rotation_basis(attraction_rotation_basis, &attraction_rotation_angles); transform_vector_by_basis( &collection_offset, &collection_offset, attraction_rotation_basis); diff --git a/src/overlays/shared/pickups/gold_bolt.c b/src/overlays/shared/pickups/gold_bolt.c index 3dba26b194..acc76d2cfe 100644 --- a/src/overlays/shared/pickups/gold_bolt.c +++ b/src/overlays/shared/pickups/gold_bolt.c @@ -33,13 +33,13 @@ enum { typedef struct { s32 id; /* collected flag index (gold_bolts_collected + level * 4), -1 none */ u8 pad4[8]; - s16 unkC; /* nonzero: collect at once, no cutscene */ + s16 collect_without_cutscene; /* nonzero: collect at once, no cutscene */ u8 padE[2]; Vec4f home; /* spawn position; w = spawn yaw */ u8 pad20[0x40]; - f32 unk60; - f32 unk64; - f32 unk68; + f32 spin_z_step; + f32 spin_y_step; + f32 spin_x_step; s32 timer; /* frames until the pickup finishes */ } Vars; @@ -496,11 +496,11 @@ void gold_bolt_update(struct Moby *moby) { moby->rot.y = random_angle_radians(); moby->rot.z = random_angle_radians(); moby->rot.w = random_angle_radians(); - gold_bolt_instance_vars->unk68 = + gold_bolt_instance_vars->spin_x_step = gold_bolt_spin_x_degrees_per_second_gp * 0.017453292f * frame_time_macro; - gold_bolt_instance_vars->unk64 = + gold_bolt_instance_vars->spin_y_step = gold_bolt_spin_y_degrees_per_second_gp * 0.017453292f * frame_time_macro; - gold_bolt_instance_vars->unk60 = + gold_bolt_instance_vars->spin_z_step = gold_bolt_spin_z_degrees_per_second_gp * 0.017453292f * frame_time_macro; moby->state = GOLD_BOLT_WAIT_FOR_PICKUP; initialize_gold_bolt_data(moby); @@ -534,7 +534,7 @@ void gold_bolt_update(struct Moby *moby) { if (hero.vehicle_mode != 3 && hero.vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { return; } - if (gold_bolt_instance_vars->unkC != 0) { + if (gold_bolt_instance_vars->collect_without_cutscene != 0) { D_L01_0015F640 = scale_game_frames(180); queue_dialogue_message(0x53B3, -1); gold_bolts_collected[gold_bolt_instance_vars->id + current_level_index_macro * 4] = 1; From 124d51f140952b3261c6dfdb58b4fead44c183c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:50:44 +0000 Subject: [PATCH 059/213] decomp: name camera basis rows and the pause menu's saved camera, view and decode fields --- include/rnc/camera/update_cam.h | 9 +- include/rnc/ui/menus/menu_system.h | 88 ++++++++++--------- src/audio/voices/pause_all_sounds.c | 6 +- src/camera/switch_active_camera_record.c | 6 +- src/camera/update_camera.c | 6 +- src/overlays/l14/path_camera.c | 25 +++--- src/overlays/l14/path_key_camera.c | 11 +-- .../shared/camera/path_flythrough_camera.c | 20 ++--- 8 files changed, 89 insertions(+), 82 deletions(-) diff --git a/include/rnc/camera/update_cam.h b/include/rnc/camera/update_cam.h index 41ea18bde4..ceb2c456ab 100644 --- a/include/rnc/camera/update_cam.h +++ b/include/rnc/camera/update_cam.h @@ -11,11 +11,12 @@ D_00187410[48]; D_001870C0[0] and [1] point at the current and previous one. Size 0xA0 (backup_current_cam copies 0xA0 bytes). */ struct UpdateCam { - u128 m0; - u128 m1; - u128 m2; + u128 forward; /* 0x00: camera basis rows (grindrail camera) */ + u128 right; /* 0x10: cross(forward, the level up) */ + u128 up; /* 0x20: cross(right, forward) */ Vec4f pos; - u8 pad40[0x24]; + u128 prev_forward; /* 0x40: copy of forward the pitch rotation starts from */ + u8 pad50[0x14]; Vec3 prev_pos; void *saved_state; u8 state; /* activation rule, see camera_activation_check_priority */ diff --git a/include/rnc/ui/menus/menu_system.h b/include/rnc/ui/menus/menu_system.h index 3bad0c0540..a644fafe28 100644 --- a/include/rnc/ui/menus/menu_system.h +++ b/include/rnc/ui/menus/menu_system.h @@ -2,6 +2,7 @@ #define LOMBYTE_RNC_UI_MENUS_MENU_SYSTEM_H #include "types.h" +#include "rnc/math/vector.h" struct MenuScreen; @@ -68,25 +69,28 @@ struct MenuPage { */ struct MenuSystem { /* Page switching (update_menu_system) */ - s32 state; /* 0x000: menu state, from page->state; 0x2D at init */ - struct MenuPage *current; /* 0x004: active page */ - struct MenuPage *next; /* 0x008: requested page */ - s32 close_request; /* 0x00C: nonzero closes the menu */ - s32 graphics_workspace; /* 0x010: buffer address D_001940C0[2] + 0xA0000 */ - s32 timer; /* 0x014: 12 on a switch, 2 on close; counts down */ - s32 saved_texture_start; /* 0x018: gs_texture_allocation_start to restore on close */ - s32 current_gadget; /* 0x01C: gadget of the queued preview animation, -1 none */ - u8 pad_20[0x10]; - s32 equipped[4]; /* 0x030: gadget id held by each slot */ - u8 pad_40[0x60]; + s32 state; /* 0x000: menu state, from page->state; 0x2D at init */ + struct MenuPage *current; /* 0x004: active page */ + struct MenuPage *next; /* 0x008: requested page */ + s32 close_request; /* 0x00C: nonzero closes the menu */ + s32 graphics_workspace; /* 0x010: buffer address D_001940C0[2] + 0xA0000 */ + s32 timer; /* 0x014: 12 on a switch, 2 on close; counts down */ + s32 saved_texture_start; /* 0x018: gs_texture_allocation_start to restore on close */ + s32 current_gadget; /* 0x01C: gadget of the queued preview animation, -1 none */ + u8 pad_20[0x10]; + s32 equipped[4]; /* 0x030: gadget id held by each slot */ + Vec4 saved_camera_position; /* 0x040: debug camera position while paused */ + Vec4 saved_camera_angles; /* 0x050 */ + u8 pad_60[0x40]; /* Preview animation stream */ - s32 stream_buffer[2]; /* 0x0A0: double buffer */ - s32 preview_resource_first; /* 0x0A8: load_preview_resource_bindings first-resource argument */ - s32 preview_resource_count; /* 0x0AC: load_preview_resource_bindings count argument */ - s32 preview_resource_buffers[3]; /* 0x0B0: buffer addresses read by load_preview_resource_bindings */ - s32 read_offset; /* 0x0BC: offset of the data in the read buffer */ - s32 unkC0; /* 0x0C0: -1 at preview init */ + s32 stream_buffer[2]; /* 0x0A0: double buffer */ + s32 preview_resource_first; /* 0x0A8: load_preview_resource_bindings first-resource argument */ + s32 preview_resource_count; /* 0x0AC: load_preview_resource_bindings count argument */ + s32 preview_resource_buffers + [3]; /* 0x0B0: buffer addresses read by load_preview_resource_bindings */ + s32 read_offset; /* 0x0BC: offset of the data in the read buffer */ + s32 unkC0; /* 0x0C0: -1 at preview init */ u8 pad_C4[0x4]; u8 loaded_animation[2]; /* 0x0C8: animation held by each buffer, 0xFF none */ u8 read_buffer_index; /* 0x0CA: buffer being read */ @@ -96,39 +100,39 @@ struct MenuSystem { struct MenuPage *previous; /* 0x0D0: page left by the last switch */ s32 save_prompt_variant; /* 0x0D4: 0 saving_data_menu, 1/2 saving_data_menu2; picks draw_prompt_box text */ s32 goodies_tab_shown; /* 0x0D8: render_level_effects_and_screen_sprites draws slot 6 only while set */ - s32 unkDC; /* 0x0DC: pause_all_sounds: (mode == 0x23) */ - s32 save_slot; /* 0x0E0: memcard_make_whole_save / memcard_restore_game argument */ - s32 travel_level; /* 0x0E4: written with travel_page/unkF4 before close_request 3 */ - u8 pad_E8[0x4]; - s32 action_message; /* 0x0EC: menu_action_messages[] entry (update_menu_entry_actions) */ - struct MenuPage - *travel_page; /* 0x0F0: menu_system.current, or map_circle_destination_page (draw_map_screen) */ - s32 unkF4; /* 0x0F4: 0, 2, 0xB or 0xF */ - s32 unkF8; /* 0x0F8: read by pause_all_sounds */ + s32 unkDC; /* 0x0DC: pause_all_sounds: (mode == 0x23) */ + s32 save_slot; /* 0x0E0: memcard_make_whole_save / memcard_restore_game argument */ + s32 travel_level; /* 0x0E4: written with travel_page/unkF4 before close_request 3 */ + f32 saved_tan_half_fov; /* 0x0E8: view tan_half_fov while paused */ + s32 action_message; /* 0x0EC: menu_action_messages[] entry (update_menu_entry_actions) */ + struct MenuPage * + travel_page; /* 0x0F0: menu_system.current, or map_circle_destination_page (draw_map_screen) */ + s32 unkF4; /* 0x0F4: 0, 2, 0xB or 0xF */ + s32 unkF8; /* 0x0F8: read by pause_all_sounds */ /* Buffers carved at init (FUN_00218f98) */ - s32 unkFC; /* 0x0FC: from D_001940C0[1] */ - s32 unk100; /* 0x100: from D_001940C0[2] */ - s32 preview_workspace; /* 0x104: D_001940C0[1] + 0xA0000 */ - s32 help_text_buffer; /* 0x108: help text read target, D_001940C0[1] + 0xDC000 */ - s32 stream_buffer_base; /* 0x10C: D_001940C0[2] + 0x180000 */ + s32 unkFC; /* 0x0FC: from D_001940C0[1] */ + s32 unk100; /* 0x100: from D_001940C0[2] */ + s32 preview_workspace; /* 0x104: D_001940C0[1] + 0xA0000 */ + s32 help_text_buffer; /* 0x108: help text read target, D_001940C0[1] + 0xDC000 */ + s32 stream_buffer_base; /* 0x10C: D_001940C0[2] + 0x180000 */ s32 update_count; /* 0x110: update_menu_system updates */ u8 pad_114[0x4]; /* Preview moby resources */ - s32 resource_table_toggle; /* 0x118: alternates per resource table select */ - s32 preview_requested_class; /* 0x11C: an oclass, -1 none */ - s32 preview_loaded_class; /* 0x120: an oclass, -1 none */ + s32 resource_table_toggle; /* 0x118: alternates per resource table select */ + s32 preview_requested_class; /* 0x11C: an oclass, -1 none */ + s32 preview_loaded_class; /* 0x120: an oclass, -1 none */ - s32 close_locked; /* 0x124: nonzero blocks start/back closing the menu */ - s32 card_op_pending; /* 0x128: card save/load started, waiting for the card */ - s32 card_op_text; /* 0x12C: text shown while pending (0x4FB5 save, 0x4FB6 load) */ - u8 pad_130[0x4]; - s32 unk134; /* 0x134: hides pages / items with flags 8 */ - s32 unk138; /* 0x138: hides pages / items with flags 4 */ - s32 unk13C; /* 0x13C: written by pause_all_sounds */ - s32 resource_table_class; /* 0x140: oclass at the last resource table select */ + s32 close_locked; /* 0x124: nonzero blocks start/back closing the menu */ + s32 card_op_pending; /* 0x128: card save/load started, waiting for the card */ + s32 card_op_text; /* 0x12C: text shown while pending (0x4FB5 save, 0x4FB6 load) */ + s32 saved_decode_mode; /* 0x130: decode_mode before a menu movie */ + s32 unk134; /* 0x134: hides pages / items with flags 8 */ + s32 unk138; /* 0x138: hides pages / items with flags 4 */ + s32 card_icon_hidden; /* 0x13C: set by pause_all_sounds; the level loop skips the busy card icon while set */ + s32 resource_table_class; /* 0x140: oclass at the last resource table select */ s32 last_resource_table_toggle; /* 0x144: resource_table_toggle at the last select */ }; /* size 0x148 */ diff --git a/src/audio/voices/pause_all_sounds.c b/src/audio/voices/pause_all_sounds.c index 0fa3b60365..18bee0c3c2 100644 --- a/src/audio/voices/pause_all_sounds.c +++ b/src/audio/voices/pause_all_sounds.c @@ -70,13 +70,13 @@ void pause_all_sounds(s32 mode) { struct MenuTextListScreen *head = &pause_menu_chain_head; g->unkDC = mode == 0x23; head->list.up = g->goodies_tab_shown ? (struct MenuScreen *)&pause_goodies_tab - : (struct MenuScreen *)&pause_menu_chain_tail; + : (struct MenuScreen *)&pause_menu_chain_tail; } { struct MenuSystem *g = &menu_system; struct MenuTextListScreen *tail = &pause_menu_chain_tail; tail->list.down = g->goodies_tab_shown ? (struct MenuScreen *)&pause_goodies_tab - : (struct MenuScreen *)&pause_menu_chain_head; + : (struct MenuScreen *)&pause_menu_chain_head; } { struct MenuSystem *g = &menu_system; @@ -99,7 +99,7 @@ void pause_all_sounds(s32 mode) { update_skill_point_and_gold_weapon_menu_entries(); { struct MenuSystem *g = &menu_system; - g->unk13C = 1; + g->card_icon_hidden = 1; g->resource_table_class = 0; } } diff --git a/src/camera/switch_active_camera_record.c b/src/camera/switch_active_camera_record.c index 868c3e28bd..9a9ae529d7 100644 --- a/src/camera/switch_active_camera_record.c +++ b/src/camera/switch_active_camera_record.c @@ -121,9 +121,9 @@ void switch_active_camera_record(struct UpdateCam *next_camera) { descriptor_kind == CAMERA_DESCRIPTOR_INHERIT_TRANSFORM || descriptor_kind == CAMERA_DESCRIPTOR_INHERIT_TRANSFORM_WITH_RATE_TRANSITION) { qcopy(&next_camera->pos, &previous_camera->pos); - qcopy(&next_camera->m0, &previous_camera->m0); - qcopy(&next_camera->m1, &previous_camera->m1); - qcopy(&next_camera->m2, &previous_camera->m2); + qcopy(&next_camera->forward, &previous_camera->forward); + qcopy(&next_camera->right, &previous_camera->right); + qcopy(&next_camera->up, &previous_camera->up); next_camera->handoff_state = CAMERA_HANDOFF_INHERITED_TRANSFORM; if (previous_camera->transition_state == CAMERA_TRANSITION_STATE_INHERIT_TRANSFORM_WITH_RATE_TRANSITION || diff --git a/src/camera/update_camera.c b/src/camera/update_camera.c index 43b9f4980c..cd3d85a2ab 100644 --- a/src/camera/update_camera.c +++ b/src/camera/update_camera.c @@ -67,9 +67,9 @@ void update_camera(void) { goto frozen; } qcopy(&camera->position, &target->pos); - qcopy(&camera->forward, &target->m0); - qcopy(&camera->right, &target->m1); - qcopy(&camera->up, &target->m2); + qcopy(&camera->forward, &target->forward); + qcopy(&camera->right, &target->right); + qcopy(&camera->up, &target->up); } { struct OcclCamState *occlusion = &occl_cam_state; diff --git a/src/overlays/l14/path_camera.c b/src/overlays/l14/path_camera.c index 92a33259d8..bea8235249 100644 --- a/src/overlays/l14/path_camera.c +++ b/src/overlays/l14/path_camera.c @@ -200,10 +200,11 @@ void update_path_camera(struct UpdateCam *path_camera) { fast_vec_sub(initial_look_direction_or_previous_position, pb + 0x10, &path_camera->pos); } fast_vec_scale(t, D_0013F5E0_5290, -1.0f); - fast_vec_normalize(&path_camera->m0, initial_look_direction_or_previous_position, 1.0f); - fast_vec_cross(&path_camera->m1, &path_camera->m0, t); - fast_vec_normalize(&path_camera->m1, &path_camera->m1, 1.0f); - fast_vec_cross(&path_camera->m2, &path_camera->m1, &path_camera->m0); + fast_vec_normalize( + &path_camera->forward, initial_look_direction_or_previous_position, 1.0f); + fast_vec_cross(&path_camera->right, &path_camera->forward, t); + fast_vec_normalize(&path_camera->right, &path_camera->right, 1.0f); + fast_vec_cross(&path_camera->up, &path_camera->right, &path_camera->forward); return; } path = ((char *)l14_paths[*(int *)(path_camera_preset + 0x20)]); @@ -240,10 +241,10 @@ void update_path_camera(struct UpdateCam *path_camera) { FUN_L00_0025d808(hp, u, &seg, &tt, 0, 0.0f); u[2] += 1.5f; fast_vec_sub(t, u, &path_camera->pos); - fast_vec_normalize(&path_camera->m0, t, 1.0f); - fast_vec_cross(&path_camera->m1, &path_camera->m0, &hero.gravity_dir); - fast_vec_normalize(&path_camera->m1, &path_camera->m1, -1.0f); - fast_vec_cross(&path_camera->m2, &path_camera->m1, &path_camera->m0); + fast_vec_normalize(&path_camera->forward, t, 1.0f); + fast_vec_cross(&path_camera->right, &path_camera->forward, &hero.gravity_dir); + fast_vec_normalize(&path_camera->right, &path_camera->right, -1.0f); + fast_vec_cross(&path_camera->up, &path_camera->right, &path_camera->forward); return; } for (i = 0; i < 7 && fov_stops->seg[i] >= 0 && fov_stops->seg[i + 1] >= 0; i++) { @@ -291,10 +292,10 @@ void update_path_camera(struct UpdateCam *path_camera) { fast_vec_sub(t, u, &path_camera->pos); } fast_vec_scale(u, D_0013F5E0_5290, -1.0f); - fast_vec_normalize(&path_camera->m0, t, 1.0f); - fast_vec_cross(&path_camera->m1, &path_camera->m0, u); - fast_vec_normalize(&path_camera->m1, &path_camera->m1, 1.0f); - fast_vec_cross(&path_camera->m2, &path_camera->m1, &path_camera->m0); + fast_vec_normalize(&path_camera->forward, t, 1.0f); + fast_vec_cross(&path_camera->right, &path_camera->forward, u); + fast_vec_normalize(&path_camera->right, &path_camera->right, 1.0f); + fast_vec_cross(&path_camera->up, &path_camera->right, &path_camera->forward); } int check_path_camera_priority(char *camera, diff --git a/src/overlays/l14/path_key_camera.c b/src/overlays/l14/path_key_camera.c index cdadb2f2a6..45be36c59a 100644 --- a/src/overlays/l14/path_key_camera.c +++ b/src/overlays/l14/path_key_camera.c @@ -109,11 +109,12 @@ void initialize_path_key_camera(struct UpdateCam *path_key_camera_object) { fast_vec_sub(hero_look_direction, &hero.motion, &path_key_camera_object->pos); fast_vec_scale(up, &hero.gravity_dir, -1.5f); fast_vec_add(hero_look_direction, hero_look_direction, up); - fast_vec_normalize(&path_key_camera_object->m0, hero_look_direction, 1.0f); - fast_vec_cross(&path_key_camera_object->m1, &path_key_camera_object->m0, up); - fast_vec_normalize(&path_key_camera_object->m1, &path_key_camera_object->m1, 1.0f); - fast_vec_cross( - &path_key_camera_object->m2, &path_key_camera_object->m1, &path_key_camera_object->m0); + fast_vec_normalize(&path_key_camera_object->forward, hero_look_direction, 1.0f); + fast_vec_cross(&path_key_camera_object->right, &path_key_camera_object->forward, up); + fast_vec_normalize(&path_key_camera_object->right, &path_key_camera_object->right, 1.0f); + fast_vec_cross(&path_key_camera_object->up, + &path_key_camera_object->right, + &path_key_camera_object->forward); /* give every key without a duration (+0x44) the default 10000 */ camera_key_default_cursor = (int *)&D_L14_001F6488_59d8[0x11]; for (j = 38; j >= 0; j--) { diff --git a/src/overlays/shared/camera/path_flythrough_camera.c b/src/overlays/shared/camera/path_flythrough_camera.c index 1544f3522e..2c2585b277 100644 --- a/src/overlays/shared/camera/path_flythrough_camera.c +++ b/src/overlays/shared/camera/path_flythrough_camera.c @@ -120,8 +120,8 @@ void initialize_path_camera(struct UpdateCam *path_camera) { } } pos = &path_camera->pos; - m1 = (Vec4f *)&path_camera->m1; - m2 = (Vec4f *)&path_camera->m2; + m1 = (Vec4f *)&path_camera->right; + m2 = (Vec4f *)&path_camera->up; stops->fov_end = fast_arc_tan(1.0f, l10_camera_view.tan_half_fov) * 2.0f; if (*(int *)(path_camera_descriptor + 0x20) >= 0) { char *path = ((char *)l10_paths[*(int *)(path_camera_descriptor + 0x20)]); @@ -249,10 +249,10 @@ void update_path_flythrough_camera(struct UpdateCam *cam) { fast_vec_sub(initial_aim_or_previous_position, look_path + 0x10, &cam->pos); } fast_vec_scale(offset, D_0013F5E0_5f18, -1.0f); - fast_vec_normalize(&cam->m0, initial_aim_or_previous_position, 1.0f); - fast_vec_cross(&cam->m1, &cam->m0, offset); - fast_vec_normalize(&cam->m1, &cam->m1, 1.0f); - fast_vec_cross(&cam->m2, &cam->m1, &cam->m0); + fast_vec_normalize(&cam->forward, initial_aim_or_previous_position, 1.0f); + fast_vec_cross(&cam->right, &cam->forward, offset); + fast_vec_normalize(&cam->right, &cam->right, 1.0f); + fast_vec_cross(&cam->up, &cam->right, &cam->forward); } return; } @@ -350,10 +350,10 @@ void update_path_flythrough_camera(struct UpdateCam *cam) { fast_vec_sub(offset, point, &cam->pos); } fast_vec_scale(point, D_0013F5E0_5f18, -1.0f); - fast_vec_normalize(&cam->m0, offset, 1.0f); - fast_vec_cross(&cam->m1, &cam->m0, point); - fast_vec_normalize(&cam->m1, &cam->m1, 1.0f); - fast_vec_cross(&cam->m2, &cam->m1, &cam->m0); + fast_vec_normalize(&cam->forward, offset, 1.0f); + fast_vec_cross(&cam->right, &cam->forward, point); + fast_vec_normalize(&cam->right, &cam->right, 1.0f); + fast_vec_cross(&cam->up, &cam->right, &cam->forward); } /* Ported from rac1-decomp (src/overlays/shared/vendor_00299AF0.c: func_L10_002F79B8), where it is exact; names translated to the US level program. */ From c1ab156c5f12613ea2152ee82af6952cd25bef18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:55:29 +0000 Subject: [PATCH 060/213] decomp: keep the menu system 8-byte aligned Vec4 is 16-byte aligned and grew the struct to 0x150; plain float arrays keep its 0x148 bytes. --- include/rnc/ui/menus/menu_system.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/include/rnc/ui/menus/menu_system.h b/include/rnc/ui/menus/menu_system.h index a644fafe28..380dd42fb3 100644 --- a/include/rnc/ui/menus/menu_system.h +++ b/include/rnc/ui/menus/menu_system.h @@ -2,7 +2,6 @@ #define LOMBYTE_RNC_UI_MENUS_MENU_SYSTEM_H #include "types.h" -#include "rnc/math/vector.h" struct MenuScreen; @@ -75,13 +74,13 @@ struct MenuSystem { s32 close_request; /* 0x00C: nonzero closes the menu */ s32 graphics_workspace; /* 0x010: buffer address D_001940C0[2] + 0xA0000 */ s32 timer; /* 0x014: 12 on a switch, 2 on close; counts down */ - s32 saved_texture_start; /* 0x018: gs_texture_allocation_start to restore on close */ - s32 current_gadget; /* 0x01C: gadget of the queued preview animation, -1 none */ - u8 pad_20[0x10]; - s32 equipped[4]; /* 0x030: gadget id held by each slot */ - Vec4 saved_camera_position; /* 0x040: debug camera position while paused */ - Vec4 saved_camera_angles; /* 0x050 */ - u8 pad_60[0x40]; + s32 saved_texture_start; /* 0x018: gs_texture_allocation_start to restore on close */ + s32 current_gadget; /* 0x01C: gadget of the queued preview animation, -1 none */ + u8 pad_20[0x10]; + s32 equipped[4]; /* 0x030: gadget id held by each slot */ + f32 saved_camera_position[4]; /* 0x040: debug camera position while paused */ + f32 saved_camera_angles[4]; /* 0x050 */ + u8 pad_60[0x40]; /* Preview animation stream */ s32 stream_buffer[2]; /* 0x0A0: double buffer */ From 0504db6523963a46bc23d0c70ec9e9ffb896bf9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:57:27 +0000 Subject: [PATCH 061/213] decomp: name teleporter, gunship, smoke fire spawner and hit source class fields in shared props and vehicles --- include/rnc/overlay/shared/mobys/moby_hit.h | 2 +- src/overlays/shared/mobys/find_moby_hit.c | 2 +- .../shared/props/directional_spark_emitter.c | 4 +- src/overlays/shared/props/energy_sphere.c | 18 ----- .../props/particle_spawner_smoke_fire.c | 22 ++++--- src/overlays/shared/props/teleporter.c | 40 +++++------ .../shared/vehicles/fighter_jet_missile.c | 2 +- src/overlays/shared/vehicles/gunship.c | 66 ++++++++++--------- src/overlays/shared/vehicles/taxi_path.c | 6 +- 9 files changed, 75 insertions(+), 87 deletions(-) diff --git a/include/rnc/overlay/shared/mobys/moby_hit.h b/include/rnc/overlay/shared/mobys/moby_hit.h index c2154830ad..454104d825 100644 --- a/include/rnc/overlay/shared/mobys/moby_hit.h +++ b/include/rnc/overlay/shared/mobys/moby_hit.h @@ -15,7 +15,7 @@ typedef struct { s32 flags; /* 0x24: tested against the caller's mask */ u8 unk28; u8 unk29; - u16 unk2A; + u16 source_class; /* 0x2A: oclass of source_moby */ f32 damage; /* 0x2C: taken off hero.vehicle_hp; a weaker hit does not replace the owner's */ s32 has_direction; /* 0x30: set when direction is longer than 0.0001 */ void *owner; /* 0x34: the moby that was hit */ diff --git a/src/overlays/shared/mobys/find_moby_hit.c b/src/overlays/shared/mobys/find_moby_hit.c index 23967bc20e..cec664bcb0 100644 --- a/src/overlays/shared/mobys/find_moby_hit.c +++ b/src/overlays/shared/mobys/find_moby_hit.c @@ -207,7 +207,7 @@ void record_moby_hit(struct Moby *owner_moby, L_259a88 *hit_descriptor) { hit_record->flags = hit_descriptor->y; hit_record->unk28 = hit_descriptor->b0; hit_record->unk29 = hit_descriptor->b1; - hit_record->unk2A = hit_descriptor->s; + hit_record->source_class = hit_descriptor->s; hit_record->damage = hit_descriptor->f; hit_record->has_direction = hit_descriptor->flag; hit_record->owner = owner_moby; diff --git a/src/overlays/shared/props/directional_spark_emitter.c b/src/overlays/shared/props/directional_spark_emitter.c index 54503c3552..8c6dc73a65 100644 --- a/src/overlays/shared/props/directional_spark_emitter.c +++ b/src/overlays/shared/props/directional_spark_emitter.c @@ -24,7 +24,7 @@ typedef struct DirectionalSparkEmitterVars { f32 vector_2_w; f32 side_spread_1; f32 side_spread_2; - s32 unk38; + s32 use_default_settings; s32 emit_timer; } DirectionalSparkEmitterVars; @@ -65,7 +65,7 @@ void directional_spark_emitter_update(char *moby) { spark_data = (DirectionalSparkEmitterVars *)MOBY(moby)->pvars; if (fast_dec_timer((int *)(&spark_data->emit_timer)) == 0) return; - if (spark_data->unk38 != 0) { + if (spark_data->use_default_settings != 0) { spark_data->emit_timer = spark_emitter_default_timer_reset_gp; euler_rotation_matrix(spark_rotation_matrix, moby + 0x40); qcopy(spark_position, &MOBY(moby)->pos); diff --git a/src/overlays/shared/props/energy_sphere.c b/src/overlays/shared/props/energy_sphere.c index e1c42a523b..07b3d0ce86 100644 --- a/src/overlays/shared/props/energy_sphere.c +++ b/src/overlays/shared/props/energy_sphere.c @@ -10,24 +10,6 @@ #include "rnc/overlay/shared/mobys/entities.h" #include "rnc/overlay/shared/audio/voices/voice_is_playing.h" -typedef struct { - char pad0[0x10]; - char pos[0x10]; - unsigned char b20; - char pad21[0xB]; - float unk2C; - unsigned char b30; - unsigned char b31; - short s32; - unsigned short h34; - char pad36[0x12]; - float unk48; - char pad4C[0x2C]; - Child *child; - char pad7C[0x14]; - int unk90; -} Obj; - extern int fast_tween_color(int, int, float) __asm__("FUN_001fa6e0"); extern char *find_moby_hit(void *, int, int) __asm__("FUN_L00_0025a420"); extern void mark_moby_for_removal(void *) __asm__("FUN_0020c828"); diff --git a/src/overlays/shared/props/particle_spawner_smoke_fire.c b/src/overlays/shared/props/particle_spawner_smoke_fire.c index 6fae271448..7d23496619 100644 --- a/src/overlays/shared/props/particle_spawner_smoke_fire.c +++ b/src/overlays/shared/props/particle_spawner_smoke_fire.c @@ -23,11 +23,11 @@ typedef struct { s16 count; /* 02 */ int idx; /* 04 */ char pad08[0x18]; - float unk20, unk24, unk28; /* 20 24 28 */ - s16 h2C, h2E; /* 2C 2E */ - int x30, x34; /* 30 34 */ - int col; /* 38 */ - u8 c0, c1, c2; /* 3C 3D 3E */ + float puff_rise_speed, puff_scalar_min, puff_scalar_max; /* 20 24 28 */ + s16 puff_alpha_min, puff_alpha_max; /* 2C 2E */ + int puff_frames_min, puff_frames_max; /* 30 34 */ + int col; /* 38 */ + u8 red, green, blue; /* 3C 3D 3E */ u8 pad3F; s16 extra; /* 40 */ s16 flag42; /* 42 */ @@ -188,7 +188,7 @@ void particle_spawner_smoke_fire_update(P *spawner) { FUN_L00_002d7d58_c(spawner, i); } D_L00_001600EC[q->idx].w = 1.0f; - q->col = q->c2 << 16 | q->c1 << 8 | q->c0; + q->col = q->blue << 16 | q->green << 8 | q->red; return; case PARTICLE_SPAWNER_ACTIVE: emitter_transform = (u8 *)&D_L00_001600EC[q->idx]; @@ -209,9 +209,10 @@ void particle_spawner_smoke_fire_update(P *spawner) { b.z += 0.5f; particle_vector.x = randf_sym(0.0f, frame_time * 0.25f); particle_vector.y = randf_sym(0.0f, frame_time * 0.25f); - particle_vector.z = q->unk20 * frame_time; - sampled_particle_scalar = random_float_between(q->unk24, q->unk28); - col = random_int_between(q->h2C, q->h2E) << 24 | + particle_vector.z = q->puff_rise_speed * frame_time; + sampled_particle_scalar = + random_float_between(q->puff_scalar_min, q->puff_scalar_max); + col = random_int_between(q->puff_alpha_min, q->puff_alpha_max) << 24 | smoke_fire_emitted_particle_base_color_gp; r = random_int_between(smoke_fire_emitted_particle_sign_randomized_sample_min_gp, smoke_fire_emitted_particle_sign_randomized_sample_max_gp); @@ -225,7 +226,8 @@ void particle_spawner_smoke_fire_update(P *spawner) { sampled_particle_scalar); if (ent) { sub = &ent->sub; - ent->h0A = FUN_001f96f8_c(random_int_between(q->x30, q->x34)); + ent->h0A = + FUN_001f96f8_c(random_int_between(q->puff_frames_min, q->puff_frames_max)); sub->x04 = 3; sub->emitted_particle_alpha = col >> 24; sub->b0B = ent->h0A; diff --git a/src/overlays/shared/props/teleporter.c b/src/overlays/shared/props/teleporter.c index 8da8a22079..1ca0c8f382 100644 --- a/src/overlays/shared/props/teleporter.c +++ b/src/overlays/shared/props/teleporter.c @@ -40,14 +40,14 @@ typedef struct TeleporterVars { s32 child_mobys[3]; /* 0x14: the three ring mobys (class 0x13B) */ f32 child_motion_1; f32 child_motion_2; - f32 unk28; - f32 unk2C; + f32 child_motion_speed_1; + f32 child_motion_speed_2; s32 unk30; f32 ring_radius; s32 starts_active; - s32 unk3C; + s32 alternate_sequence_only; s32 music_track; - s32 unk44; + s32 music_transition_track; } TeleporterVars; typedef struct L01Moby L01Moby; @@ -286,7 +286,7 @@ void teleporter_update(struct Moby *moby) { if (moby->state == TELEPORTER_WAIT_FOR_ACTIVATION) moby->state = active; } - if (teleporter_vars->unk3C != 0) { + if (teleporter_vars->alternate_sequence_only != 0) { if (alternate_animation_sequence_gp == 0) { moby->collision = 0; moby->flags |= 0x41; @@ -348,8 +348,8 @@ void teleporter_update(struct Moby *moby) { allocate_voice_for_target_entry(0, 0, (void *)moby); moby->state = TELEPORTER_PREPARE_TRANSFER; teleporter_vars->unk30 = -1; - *(int *)&teleporter_vars->unk2C = 0; - *(int *)&teleporter_vars->unk28 = 0; + *(int *)&teleporter_vars->child_motion_speed_2 = 0; + *(int *)&teleporter_vars->child_motion_speed_1 = 0; request_hero_target_pose(&moby->pos.x, 0, moby->rot.z); play_entity_sound((int)moby, 1.5f, &moby->pos, 0x10000, 20.0f, 1.0f, 0, 1, 0); break; @@ -357,14 +357,14 @@ void teleporter_update(struct Moby *moby) { case TELEPORTER_EFFECT_CYCLE_PREPARE: if (teleporter_vars->child_motion_1 < 1.0f) { advance_accelerated_scalar((float *)(&teleporter_vars->child_motion_1), - (float *)(&teleporter_vars->unk28), + (float *)(&teleporter_vars->child_motion_speed_1), 1.0f, teleporter_child_motion_acceleration_gp * frame_time_sq, teleporter_child_motion_deceleration_gp * frame_time_sq, teleporter_child_motion_max_speed_gp * frame_time); } else if (teleporter_vars->child_motion_2 < 1.0f) { advance_accelerated_scalar((float *)(&teleporter_vars->child_motion_2), - (float *)(&teleporter_vars->unk2C), + (float *)(&teleporter_vars->child_motion_speed_2), 1.0f, teleporter_child_motion_acceleration_gp * frame_time_sq, teleporter_child_motion_deceleration_gp * frame_time_sq, @@ -380,14 +380,14 @@ void teleporter_update(struct Moby *moby) { int transfer_preparation_status = get_hero_target_pose_status(); if (teleporter_vars->child_motion_1 < 1.0f) { advance_accelerated_scalar((float *)(&teleporter_vars->child_motion_1), - (float *)(&teleporter_vars->unk28), + (float *)(&teleporter_vars->child_motion_speed_1), 1.0f, teleporter_child_motion_acceleration_gp * frame_time_sq, teleporter_child_motion_deceleration_gp * frame_time_sq, teleporter_child_motion_max_speed_gp * frame_time); } else if (teleporter_vars->child_motion_2 < 1.0f) { advance_accelerated_scalar((float *)(&teleporter_vars->child_motion_2), - (float *)(&teleporter_vars->unk2C), + (float *)(&teleporter_vars->child_motion_speed_2), 1.0f, teleporter_child_motion_acceleration_gp * frame_time_sq, teleporter_child_motion_deceleration_gp * frame_time_sq, @@ -415,21 +415,23 @@ void teleporter_update(struct Moby *moby) { destination_position[2] += 0.2f; set_race_camera(destination_position, destination_moby + 0x40, 0, 1); hero.hidden = 1; - if (teleporter_vars->music_track != -1 && teleporter_vars->unk44 != -1) { - request_music_track(teleporter_vars->music_track, teleporter_vars->unk44); + if (teleporter_vars->music_track != -1 && + teleporter_vars->music_transition_track != -1) { + request_music_track(teleporter_vars->music_track, + teleporter_vars->music_transition_track); } MOBY(destination_moby)->state = TELEPORTER_RETURN_TO_IDLE; td->ring_radius = 0.0f; - td->unk28 = 0.0f; - td->unk2C = 0.0f; + td->child_motion_speed_1 = 0.0f; + td->child_motion_speed_2 = 0.0f; td->child_motion_1 = 1.0f; td->child_motion_2 = 1.0f; allocate_voice_for_target_entry(1, 0, (void *)destination_moby); moby->state = TELEPORTER_WAIT_FOR_USE; teleporter_vars->child_motion_1 = 0.0f; teleporter_vars->child_motion_2 = 0.0f; - teleporter_vars->unk28 = 0.0f; - teleporter_vars->unk2C = 0.0f; + teleporter_vars->child_motion_speed_1 = 0.0f; + teleporter_vars->child_motion_speed_2 = 0.0f; teleporter_vars->ring_radius = 1.95f; update_teleporter_child_transforms(moby); } @@ -441,14 +443,14 @@ void teleporter_update(struct Moby *moby) { approach_value((float *)(&teleporter_vars->ring_radius), 1.95f, frame_time * 4.0f); } else if (0.0f < teleporter_vars->child_motion_2) { advance_accelerated_scalar((float *)(&teleporter_vars->child_motion_2), - (float *)(&teleporter_vars->unk28), + (float *)(&teleporter_vars->child_motion_speed_1), 0.0f, teleporter_child_motion_acceleration_gp * frame_time_sq, teleporter_child_motion_deceleration_gp * frame_time_sq, teleporter_child_motion_max_speed_gp * frame_time); } else if (0.0f < teleporter_vars->child_motion_1) { advance_accelerated_scalar((float *)(&teleporter_vars->child_motion_1), - (float *)(&teleporter_vars->unk2C), + (float *)(&teleporter_vars->child_motion_speed_2), 0.0f, teleporter_child_motion_acceleration_gp * frame_time_sq, teleporter_child_motion_deceleration_gp * frame_time_sq, diff --git a/src/overlays/shared/vehicles/fighter_jet_missile.c b/src/overlays/shared/vehicles/fighter_jet_missile.c index 68769c0b34..bcd9e07328 100644 --- a/src/overlays/shared/vehicles/fighter_jet_missile.c +++ b/src/overlays/shared/vehicles/fighter_jet_missile.c @@ -25,7 +25,7 @@ typedef struct { typedef struct { float vel[4]; float size; - int unk14; + int initial_timer; /* timer's starting frame count */ int timer; struct Moby *owner; float target_pos[3]; diff --git a/src/overlays/shared/vehicles/gunship.c b/src/overlays/shared/vehicles/gunship.c index 4274dfc7c3..d0ccb1e49a 100644 --- a/src/overlays/shared/vehicles/gunship.c +++ b/src/overlays/shared/vehicles/gunship.c @@ -58,8 +58,8 @@ typedef struct { QVec spline_position; /* 0xD0 */ QVec prev_spline_position; /* 0xE0 */ f32 segment_t; - f32 unkF4; - f32 unkF8; + f32 tangent_tension; + f32 tangent_bias; f32 speed; f32 roll_spring_rate_degrees; f32 roll_spring_velocity; @@ -67,19 +67,19 @@ typedef struct { f32 pitch_spring_velocity; f32 turn_smoothing; f32 turn_to_roll; - f32 unk118; + f32 roll_error_scale; s16 movement_delay_timer; s16 voice; u8 options; - u8 unk121; + u8 exhaust_particle_timer; s16 yaw_offset_degrees; f32 speed_oscillation_amplitude; f32 speed_oscillation_rate_degrees; f32 speed_oscillation_phase; - f32 unk130; - f32 unk134; + f32 side_offset; + f32 vertical_offset; s16 ambient_sound_timer; - s16 unk13A; + s16 respawn_timer; s16 ambient_sound_min_frames; s16 ambient_sound_extra_frames; s32 attached_mobys[4]; @@ -87,9 +87,9 @@ typedef struct { typedef struct { u8 pad0[0x70]; - s32 unk70; + s32 flags; u8 pad74[0xC]; - QVec unk80; + QVec attach_direction; } ChildVars; typedef struct { @@ -258,7 +258,7 @@ void gunship_update(struct Moby *moby) { } if ((moby->oclass == 0x33 || moby->oclass == 0x46A || moby->oclass == 0x473 || moby->oclass == 0x474) && - (level_frame_count & 7) == (((s32)moby >> 8) & 7) && v->unk13A <= 0 && + (level_frame_count & 7) == (((s32)moby >> 8) & 7) && v->respawn_timer <= 0 && moby->state != GUNSHIP_PATH_STATE_INITIALIZE && FUN_L00_0028d8c0(moby, v->voice) == 0) { v->voice = allocate_voice_for_target_entry(0, 4, moby); } @@ -307,15 +307,15 @@ void gunship_update(struct Moby *moby) { } moby->update_dist = 0xFF; v->voice = -1; - if (500.0f < v->unk130) - v->unk130 = FUN_002132a8(-1.0f, 1.0f) * v->unk130 / 1000.0f; - if (500.0f < v->unk134) - v->unk134 = FUN_002132a8(-1.0f, 1.0f) * v->unk134 / 1000.0f; + if (500.0f < v->side_offset) + v->side_offset = FUN_002132a8(-1.0f, 1.0f) * v->side_offset / 1000.0f; + if (500.0f < v->vertical_offset) + v->vertical_offset = FUN_002132a8(-1.0f, 1.0f) * v->vertical_offset / 1000.0f; if (path_cursor->path_id == -1) { moby->state = GUNSHIP_PATH_STATE_WAIT_FOR_PATH; return; } - v->unk121 = (moby - (struct Moby *)D_L01_0015FFD8) / 2 % 7; + v->exhaust_particle_timer = (moby - (struct Moby *)D_L01_0015FFD8) / 2 % 7; initialize_path_descriptor(path_cursor); if (path_cursor->state == PATH_CURSOR_STATE_NEEDS_POSITION_SETUP) { if (path_cursor->idx <= 0) { @@ -338,7 +338,8 @@ void gunship_update(struct Moby *moby) { } v->prev_spline_position.q = (path_cursor->nodes->node + path_cursor->idx)->q; v->segment_t = 1.0f; - compute_path_node_tangent(&v->segment_end_tangent, path_cursor, 0, v->unkF4, v->unkF8); + compute_path_node_tangent( + &v->segment_end_tangent, path_cursor, 0, v->tangent_tension, v->tangent_bias); v->segment_start.q = v->segment_end.q = (path_cursor->nodes->node + path_cursor->idx)->q; *(s32 *)&moby->rot.x = 0; moby->rot.y = @@ -349,7 +350,7 @@ void gunship_update(struct Moby *moby) { v->pitch_spring_velocity = 0; *(u128 *)&moby->pos = v->prev_spline_position.q; apply_gunship_path_position_offsets((char *)moby, (float *)&moby->pos); - v->unk121 = 7; + v->exhaust_particle_timer = 7; if (6.2831855f < v->speed_oscillation_phase) { v->speed_oscillation_phase = v->speed_oscillation_phase * 0.017453292f; } else if (v->speed_oscillation_amplitude != 0.0f && v->speed_oscillation_phase == -1.0f) { @@ -357,7 +358,7 @@ void gunship_update(struct Moby *moby) { } v->spline_position.q = v->segment_end.q; compute_sampled_spline_path_lengths( - v->unkF4, v->unkF8, path_cursor, v->options & 0x20, moby); + v->tangent_tension, v->tangent_bias, path_cursor, v->options & 0x20, moby); if ((v->options & 0x1E) && !(v->options & 1)) { s32 i; for (i = 0; i < 4; i++) { @@ -368,12 +369,12 @@ void gunship_update(struct Moby *moby) { c = (struct Moby *)D_L01_0015FFD8 + v->attached_mobys[i]; if (c == 0 || (cv = (ChildVars *)c->pvars) == 0) continue; - cv->unk70 |= 0x1000; + cv->flags |= 0x1000; moby_point_position(moby, i, &attachment_and_hit_vectors[i]); fast_vec_sub(&dA0, &attachment_and_hit_vectors[i], &moby->pos); fast_vec_normalize(&dA0, &dA0, 1.0f); *(u128 *)&c->pos = attachment_and_hit_vectors[i].q; - cv->unk80.q = dA0.q; + cv->attach_direction.q = dA0.q; } } if (v->movement_delay_timer > 0) { @@ -381,7 +382,7 @@ void gunship_update(struct Moby *moby) { return; } if (D_0015ED84 == 3 || D_0015ED84 == 9) - v->unk13A = 0; + v->respawn_timer = 0; moby->state = GUNSHIP_PATH_STATE_FOLLOW_PATH; return; @@ -418,7 +419,8 @@ void gunship_update(struct Moby *moby) { v->segment_t -= 1.0f; advanced_node_index = advance_path_node_index(path_cursor); v->segment_start_tangent.q = v->segment_end_tangent.q; - compute_path_node_tangent(&v->segment_end_tangent, path_cursor, 1, v->unkF4, v->unkF8); + compute_path_node_tangent( + &v->segment_end_tangent, path_cursor, 1, v->tangent_tension, v->tangent_bias); v->segment_start.q = v->segment_end.q; v->segment_end.q = (path_cursor->nodes->node + resolve_path_node_index(path_cursor, advanced_node_index + 1)) @@ -474,7 +476,7 @@ void gunship_update(struct Moby *moby) { v->pitch_spring_rate_degrees * k * D_0015ED6C); steering_angle = normalize_angle(turn * v->turn_to_roll); steering_angle = fast_subtract_rotations(moby->rot.x, steering_angle); - steering_angle = normalize_angle(steering_angle * v->unk118); + steering_angle = normalize_angle(steering_angle * v->roll_error_scale); moby->rot.x = FUN_L00_00258110(&v->roll_spring_velocity, moby->rot.x, steering_angle, @@ -510,10 +512,10 @@ void gunship_update(struct Moby *moby) { continue; fast_vec_normalize( &attachment_and_hit_vectors[1], &attachment_and_hit_vectors[1], 1.0f); - cv->unk70 |= 0x1000; + cv->flags |= 0x1000; *(u128 *)&c->pos = attachment_and_hit_vectors[0].q; - cv->unk80.q = attachment_and_hit_vectors[1].q; - } else if (v->unk121 == 0) { + cv->attach_direction.q = attachment_and_hit_vectors[1].q; + } else if (v->exhaust_particle_timer == 0) { fast_vec_normalize(&attachment_and_hit_vectors[1], &attachment_and_hit_vectors[1], FUN_002132a8(0.016f, 0.031f) * D_0015ED60); @@ -526,9 +528,9 @@ void gunship_update(struct Moby *moby) { &attachment_and_hit_vectors[1]); } } - if (v->unk121 == 0) - v->unk121 = scale_game_frames(7); - v->unk121--; + if (v->exhaust_particle_timer == 0) + v->exhaust_particle_timer = scale_game_frames(7); + v->exhaust_particle_timer--; } if (D_0015ED84 != 3 && D_0015ED84 != 9) return; @@ -550,7 +552,7 @@ void gunship_update(struct Moby *moby) { fast_vec_scale(&attachment_and_hit_vectors[1], &attachment_and_hit_vectors[1], 0.5f); fast_vec_add( &attachment_and_hit_vectors[0], &attachment_and_hit_vectors[0], current_position); - v->unk13A = scale_game_frames(600); + v->respawn_timer = scale_game_frames(600); dir = &attachment_and_hit_vectors[1]; /* Fakematch: the never-taken call keeps gcse from propagating &off[1] into the call, so dir gets a1 before the class tests and &off[1] gets s0, as in retail. */ @@ -581,9 +583,9 @@ void gunship_update(struct Moby *moby) { } D_L01_00160770 = (void *)gunship_update; moby->hit_slot = 0xFF; - if (v->unk13A == 0) + if (v->respawn_timer == 0) return; - if (fast_dec_timer_s16(&v->unk13A) && frozen) { + if (fast_dec_timer_s16(&v->respawn_timer) && frozen) { moby->collision = ((u32 *)moby->pclass)[4]; moby->flags = (moby->flags & 0xFFBE) | 0x1000; return; diff --git a/src/overlays/shared/vehicles/taxi_path.c b/src/overlays/shared/vehicles/taxi_path.c index 6d367f8747..0415c728a0 100644 --- a/src/overlays/shared/vehicles/taxi_path.c +++ b/src/overlays/shared/vehicles/taxi_path.c @@ -27,7 +27,7 @@ typedef struct TaxiVars { f32 wobble_phase_3; f32 path_speed; f32 path_acceleration; - s32 unkDC; + s32 hero_path_index; } TaxiVars; typedef struct { @@ -183,7 +183,7 @@ void transform_moby_vector_table_to_world_space(char *moby) __asm__("FUN_L05_003 void transform_moby_vector_table_to_world_space(char *moby) { TaxiVars *moby_private_vars = (TaxiVars *)MOBY(moby)->pvars; - int vector_table_index = moby_private_vars->unkDC; + int vector_table_index = moby_private_vars->hero_path_index; if (vector_table_index != -1) { char *vector_table_entry = ((char *)l05_paths[vector_table_index]); if (*(int *)vector_table_entry == 7) { @@ -199,7 +199,7 @@ void transform_moby_vector_table_to_world_space(char *moby) { } player_hero = &hero; *(unsigned short *)&player_hero->path_constrain_pending = - *(unsigned short *)&moby_private_vars->unkDC; + *(unsigned short *)&moby_private_vars->hero_path_index; } } } From 2f4be8d27ba32dbaeadd5b470750cef21cb8e888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:01:31 +0000 Subject: [PATCH 062/213] decomp: share the hit colour flash and knockback motion layouts in darter, screamer and sharkigator --- .../overlay/shared/mobys/hit_color_flash.h | 24 ++ .../overlay/shared/mobys/knockback_motion.h | 3 +- src/overlays/l07/mobys/sharkigator.c | 97 +++---- src/overlays/l10/mobys/darter.c | 237 +++++++++--------- src/overlays/l10/mobys/screamer.c | 87 +++---- .../rendering/effects/spawn_explosion.c | 126 +++++----- 6 files changed, 283 insertions(+), 291 deletions(-) create mode 100644 include/rnc/overlay/shared/mobys/hit_color_flash.h diff --git a/include/rnc/overlay/shared/mobys/hit_color_flash.h b/include/rnc/overlay/shared/mobys/hit_color_flash.h new file mode 100644 index 0000000000..49b310d4ee --- /dev/null +++ b/include/rnc/overlay/shared/mobys/hit_color_flash.h @@ -0,0 +1,24 @@ +#ifndef LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_HIT_COLOR_FLASH_H +#define LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_HIT_COLOR_FLASH_H + +#include "types.h" + +/* Colour flash of a hit enemy (0x10 bytes in its pvars). + * trooper_anim_update (FUN_L00_0025d458) starts it and saves the moby's colour, + * trooper_anim_finish (FUN_L00_0025d538) blends the moby colour toward the + * flash colour over flash_frames, then back over return_frames. */ +struct HitColorFlash { + s16 timer; /* 0x0: frames left in the current phase */ + s16 phase; /* 0x2: 0 toward the flash colour, 1 back to the original */ + u8 original_red; /* 0x4: the moby colour saved when the flash starts */ + u8 original_green; /* 0x5 */ + u8 original_blue; /* 0x6 */ + u8 flash_red; /* 0x7: 0 keeps the original channel */ + u8 flash_green; /* 0x8 */ + u8 flash_blue; /* 0x9 */ + u8 padA[2]; + s16 flash_frames; /* 0xC */ + s16 return_frames; /* 0xE */ +}; + +#endif /* LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_HIT_COLOR_FLASH_H */ diff --git a/include/rnc/overlay/shared/mobys/knockback_motion.h b/include/rnc/overlay/shared/mobys/knockback_motion.h index 2e003dc4b4..f83a575000 100644 --- a/include/rnc/overlay/shared/mobys/knockback_motion.h +++ b/include/rnc/overlay/shared/mobys/knockback_motion.h @@ -19,7 +19,8 @@ struct KnockbackMotion { u8 particle_mode; /* 0x2E: 1 spawns shape point particles */ u8 particle_count; /* 0x2F */ f32 restitution; /* 0x30: bounce off steep walls */ - u8 pad34[8]; + f32 unk34; /* 0x34: set by the launch setups; neither step reads it */ + f32 unk38; u8 active; /* 0x3C: set at launch */ u8 unk3D; /* cleared when the hit reaction is set up */ s16 phase; /* 0x3E: 0 rising, 1 falling, 2 grounded */ diff --git a/src/overlays/l07/mobys/sharkigator.c b/src/overlays/l07/mobys/sharkigator.c index dc5b3a1b40..b866540013 100644 --- a/src/overlays/l07/mobys/sharkigator.c +++ b/src/overlays/l07/mobys/sharkigator.c @@ -1,5 +1,6 @@ /* Level 07 moby class 0x423: sharkigator. */ #include "types.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" #include "asm.h" @@ -185,37 +186,15 @@ extern void spawn_explosion(void *, int, int) __asm__("FUN_L00_0025e450"); -/* Knockback/launch parameters handed to trooper_start_knockback. */ -typedef struct { - u8 pad0[0x10]; - f32 gravity; - f32 unk14; - f32 unk18; - f32 unk1C; - s32 flags; - s32 unk24; - f32 unk28; - u8 pad2C[4]; - f32 unk30; - f32 unk34; - f32 unk38; - u8 pad3C; - u8 unk3D; - u8 pad3E[0xA]; - f32 unk48; - f32 unk4C; - f32 unk50; - f32 unk54; -} LaunchParams; - extern void trooper_knockback_arc(Vec4f *, f32 *, f32 *, f32 *) __asm__("FUN_L00_0025ab48"); -extern void trooper_start_knockback(f32, struct Moby *, LaunchParams *, s32, s32, s32) __asm__("FUN_L00_0025c558"); -void start_sharkigator_death_knockback(struct Moby *moby, - LaunchParams *knockback_state, +extern void trooper_start_knockback( + f32, struct Moby *, struct KnockbackMotion *, s32, s32, s32) __asm__("FUN_L00_0025c558"); +void start_sharkigator_death_knockback(struct Moby *moby, + struct KnockbackMotion *knockback_state, Vec4f *knockback_direction) __asm__("FUN_L07_0030e720"); -void start_sharkigator_hit_knockback(struct Moby *moby, - LaunchParams *knockback_state, - Vec4f *knockback_direction) __asm__("FUN_L07_0030e858"); +void start_sharkigator_hit_knockback(struct Moby *moby, + struct KnockbackMotion *knockback_state, + Vec4f *knockback_direction) __asm__("FUN_L07_0030e858"); /* Hit handler: reacts to the hit type, then takes damage and dies (state 0xE) when health runs out. */ /* Ported from rac1-decomp (src/overlays/l07_umbris/vendor_002CE470.c: func_L07_0030FD78), where it is exact; names translated to the US level program. */ @@ -365,63 +344,63 @@ extern float random_float_between(float, float) __asm__("FUN_002132a8"); char D_L07_002117F8[] = "Initialization failed for moby 1059 instance #%d. Deleting.\n"; -void start_sharkigator_death_knockback(struct Moby *moby, - LaunchParams *knockback_state, +void start_sharkigator_death_knockback(struct Moby *moby, + struct KnockbackMotion *knockback_state, Vec4f *knockback_direction) { Vec4f knockback_direction_copy; f32 knockback_angle; knockback_state->gravity = frame_time_sq * 29.400002f; - knockback_state->unk14 = 0.0005f; - knockback_state->unk18 = frame_time * 9.0f; - knockback_state->unk1C = frame_time * 7.0f; - knockback_state->flags = 0x400; - knockback_state->unk24 = 13; - knockback_state->unk28 = 1.0f; - knockback_state->unk30 = 0.24f; + knockback_state->speed_approach_step = 0.0005f; + knockback_state->speed = frame_time * 9.0f; + knockback_state->vertical_speed = frame_time * 7.0f; + knockback_state->collision_radius_1024ths = 0x400; + knockback_state->flags = 13; + knockback_state->collision_z_offset = 1.0f; + knockback_state->restitution = 0.24f; knockback_state->unk34 = 0.5f; knockback_state->unk38 = 0.65f; - knockback_state->unk48 = 0.2f; - knockback_state->unk4C = 0.01f; - knockback_state->unk50 = 3.0f; - knockback_state->unk54 = 9.0f; + knockback_state->max_turn_step = 0.2f; + knockback_state->target_speed = 0.01f; + knockback_state->apex_animation_frame = 3.0f; + knockback_state->landing_animation_frame = 9.0f; knockback_state->unk3D = 0; *(u128 *)&knockback_direction_copy = *(u128 *)knockback_direction; trooper_knockback_arc(&knockback_direction_copy, &knockback_angle, - &knockback_state->unk18, - &knockback_state->unk1C); + &knockback_state->speed, + &knockback_state->vertical_speed); trooper_start_knockback(knockback_angle, moby, knockback_state, 12, 1, 0); } -void start_sharkigator_hit_knockback(struct Moby *moby, - LaunchParams *knockback_state, +void start_sharkigator_hit_knockback(struct Moby *moby, + struct KnockbackMotion *knockback_state, Vec4f *knockback_direction) { Vec4f knockback_direction_copy; f32 knockback_angle; knockback_state->gravity = frame_time_sq * 29.400002f; - knockback_state->unk14 = 0.0005f; - knockback_state->unk18 = frame_time * 9.0f; - knockback_state->unk1C = frame_time * 7.0f; - knockback_state->flags = 0x599; - knockback_state->unk24 = 13; - knockback_state->unk28 = 1.4f; - knockback_state->unk30 = 0.24f; + knockback_state->speed_approach_step = 0.0005f; + knockback_state->speed = frame_time * 9.0f; + knockback_state->vertical_speed = frame_time * 7.0f; + knockback_state->collision_radius_1024ths = 0x599; + knockback_state->flags = 13; + knockback_state->collision_z_offset = 1.4f; + knockback_state->restitution = 0.24f; knockback_state->unk34 = 0.5f; knockback_state->unk38 = 0.65f; - knockback_state->unk48 = 0.2f; - knockback_state->unk4C = 0.01f; - knockback_state->unk50 = 8.0f; - knockback_state->unk54 = 19.0f; + knockback_state->max_turn_step = 0.2f; + knockback_state->target_speed = 0.01f; + knockback_state->apex_animation_frame = 8.0f; + knockback_state->landing_animation_frame = 19.0f; knockback_state->unk3D = 0; *(u128 *)&knockback_direction_copy = *(u128 *)knockback_direction; trooper_knockback_arc(&knockback_direction_copy, &knockback_angle, - &knockback_state->unk18, - &knockback_state->unk1C); + &knockback_state->speed, + &knockback_state->vertical_speed); trooper_start_knockback(knockback_angle, moby, knockback_state, 6, 1, 0); } diff --git a/src/overlays/l10/mobys/darter.c b/src/overlays/l10/mobys/darter.c index 58d033aba9..c85bcc30c7 100644 --- a/src/overlays/l10/mobys/darter.c +++ b/src/overlays/l10/mobys/darter.c @@ -1,5 +1,7 @@ /* Level 10 moby class 1199, the darter (the bat-like Orxon flyer): rises from its spawn, wanders, chases and dives at its target. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/overlay/shared/world/cuboid.h" #include "rnc/game/item_state.h" #include "rnc/hero/hero.h" @@ -78,40 +80,41 @@ extern short *moby_group_member_lists[] __asm__("D_L10_001ABCC0"); typedef struct Hero Hero_2e01a8; typedef struct Vars_2e01a8 { - char p0[0x20]; - float health; - short max_health; - char p26[2]; - unsigned char hit_response_class; - unsigned char b29; - char p2A[6]; - float f30; - char p34[0x24]; - unsigned char b58; - char p59; - unsigned char b5A; - char p5B[5]; - char a60[0x80]; - AlignedVec4f dive_attack_aim_position; - char pF0[0x10]; - Moby *target; - int f104; - char p108[0x18]; - AlignedVec4f velocity; - AlignedVec4f home; - AlignedVec4f goal; - char p150[0x20]; - float turn_speed; - int spawn_kind; - char p178[0x18]; - float side_angle; - int f194; - int wait; - float bob_angle; - float height_offset; - int height_timer; - char p1A8[0xC8]; - char a270[4]; + char p0[0x20]; + float health; + short max_health; + char p26[2]; + unsigned char hit_response_class; + unsigned char b29; + char p2A[6]; + float f30; + char p34[0x24]; + unsigned char b58; + char p59; + unsigned char b5A; + char p5B[5]; + struct KnockbackMotion knockback; /* 0x60 */ + char pC0[0x20]; + AlignedVec4f dive_attack_aim_position; + char pF0[0x10]; + Moby *target; + int f104; + char p108[0x18]; + AlignedVec4f velocity; + AlignedVec4f home; + AlignedVec4f goal; + char p150[0x20]; + float turn_speed; + int spawn_kind; + char p178[0x18]; + float side_angle; + int f194; + int wait; + float bob_angle; + float height_offset; + int height_timer; + char p1A8[0xC8]; + char a270[4]; } Vars_2e01a8; extern float l10_darter_attack_distance __asm__("D_L10_00161DFC") __attribute__((sda)); @@ -591,7 +594,7 @@ void darter_update(Moby *moby) { break; } case DARTER_STATE_DYING: - if ((step_moby_motion(moby, darter_vars->a60) & 1) == 0) + if ((step_moby_motion(moby, &darter_vars->knockback) & 1) == 0) break; mark_moby_for_removal_cf(moby, 0x200, -1); spawn_color_swapped_explosion_burst(moby, &moby->pos, -1, 0.5f, 10.0f); @@ -625,40 +628,30 @@ typedef struct Hit_2E2B80 { } Hit_2E2B80; typedef struct MobyData { - char pad0[0x20]; - float f20; - char pad24[2]; - short f26; - char pad28[0x10]; - int f38; - char pad3C[0x24]; - char f60[0x10]; - float f70; - float f74; - float f78; - float f7C; - char pad80[4]; - int f84; - char pad88[0x15]; - unsigned char f9D; - char pad9E[0x22]; - char fC0[0x40]; - int f100; - int f104; - char pad108[8]; - char f110[7]; - unsigned char f117; - char pad118[0x18]; - char f130[0x44]; - int f174; - float f178; - int f17C; - float f180; - int f184; - float f188; - int f18C; - char pad190[4]; - int f194; + char pad0[0x20]; + float health; + char pad24[2]; + short nonlethal_hit_duration_frames; + char pad28[0x10]; + int target_range_boost_requested; + char pad3C[0x24]; + struct KnockbackMotion knockback; /* 0x60 */ + char selected_target_vectors[0x40]; + int f100; + int f104; + char pad108[8]; + struct HitColorFlash hit_flash; /* 0x110 */ + char pad120[0x10]; + char navigation_state[0x44]; + int f174; + float default_target_range; + int active_target_path_index; + float current_target_range; + int target_range_boost_timer; + float activation_wait_target_range; + int activation_wait_target_path_index; + char pad190[4]; + int target_bounds_cuboid_index; } MobyData; extern int resolve_moby_hit_response() __asm__("FUN_00213928"); @@ -680,29 +673,29 @@ void update_darter_hit_reactions_and_targeting(struct Moby *moby) { Hit_2E2B80 *hit_record; int target_selection_status; - if (class_1199_vars->f38 != 0) { - class_1199_vars->f184 = + if (class_1199_vars->target_range_boost_requested != 0) { + class_1199_vars->target_range_boost_timer = truncate_float_to_s32(scale_time(random_float_between(180.0f, 240.0f))); - class_1199_vars->f38 = 0; + class_1199_vars->target_range_boost_requested = 0; } - fast_dec_timer(&class_1199_vars->f184); + fast_dec_timer(&class_1199_vars->target_range_boost_timer); if (moby->state != DARTER_STATE_DYING) { hit_record = find_moby_hit(moby, 0x330000, 0); resolve_moby_hit_response( - moby, hit_record, &class_1199_vars->f20, 5, &hit_processing_status, 0, 0, 4); + moby, hit_record, &class_1199_vars->health, 5, &hit_processing_status, 0, 0, 4); if (hit_record != 0 && hit_record->moby->oclass != moby->oclass) { - if (class_1199_vars->f20 <= hit_record->damage) { - class_1199_vars->f20 = 0.0f; + if (class_1199_vars->health <= hit_record->damage) { + class_1199_vars->health = 0.0f; moby->flags &= 0xEFFF; if (moby->prev_seq != 4) blend_moby_animation(moby, 4, 0, scale_game_frames(10)); moby->state = DARTER_STATE_DYING; - class_1199_vars->f70 = D_0015ED70 * 26.0f; - class_1199_vars->f9D = 3; - class_1199_vars->f84 = 9; - class_1199_vars->f74 = 0.0005f; - class_1199_vars->f78 = D_0015ED6C * 7.0f; - class_1199_vars->f7C = D_0015ED6C * 10.0f; + class_1199_vars->knockback.gravity = D_0015ED70 * 26.0f; + class_1199_vars->knockback.unk3D = 3; + class_1199_vars->knockback.flags = 9; + class_1199_vars->knockback.speed_approach_step = 0.0005f; + class_1199_vars->knockback.speed = D_0015ED6C * 7.0f; + class_1199_vars->knockback.vertical_speed = D_0015ED6C * 10.0f; allocate_voice_for_target_entry(2, 0, moby); if (hit_record->f30 & 1) { knockback_angle = fast_arc_tan(hit_record->f10[0], hit_record->f10[1]); @@ -711,35 +704,39 @@ void update_darter_hit_reactions_and_targeting(struct Moby *moby) { fast_arc_tan(moby->pos.x - hit_record->x, moby->pos.y - hit_record->y); } *(OvlQuad *)vector_scratch = *(OvlQuad *)hit_record->f10; - trooper_knockback_arc( - vector_scratch, &knockback_angle, &class_1199_vars->f78, &class_1199_vars->f7C); - trooper_start_knockback(moby, class_1199_vars->f60, knockback_angle, 4, 1, 0); - class_1199_vars->f117 = 0x78; - trooper_anim_update(moby, class_1199_vars->f110); + trooper_knockback_arc(vector_scratch, + &knockback_angle, + &class_1199_vars->knockback.speed, + &class_1199_vars->knockback.vertical_speed); + trooper_start_knockback( + moby, &class_1199_vars->knockback, knockback_angle, 4, 1, 0); + class_1199_vars->hit_flash.flash_red = 0x78; + trooper_anim_update(moby, &class_1199_vars->hit_flash); func_L00_00261B00_2E2B80(moby, 1, 3, 0, -1); } else { - class_1199_vars->f20 = class_1199_vars->f20 - hit_record->damage; - class_1199_vars->f117 = 0xFA; - class_1199_vars->f26 = scale_game_frames(60); - trooper_anim_update(moby, class_1199_vars->f110); + class_1199_vars->health = class_1199_vars->health - hit_record->damage; + class_1199_vars->hit_flash.flash_red = 0xFA; + class_1199_vars->nonlethal_hit_duration_frames = scale_game_frames(60); + trooper_anim_update(moby, &class_1199_vars->hit_flash); } } moby->hit_slot = 0xFF; } - trooper_anim_finish(moby, class_1199_vars->f110); + trooper_anim_finish(moby, &class_1199_vars->hit_flash); if (class_1199_vars->f174 == 2) { - class_1199_vars->f180 = 42.0f; - } else if (class_1199_vars->f184 != 0) { - class_1199_vars->f180 = class_1199_vars->f178 + 6.0f; + class_1199_vars->current_target_range = 42.0f; + } else if (class_1199_vars->target_range_boost_timer != 0) { + class_1199_vars->current_target_range = class_1199_vars->default_target_range + 6.0f; } else if (moby->state == 1) { - class_1199_vars->f180 = class_1199_vars->f188; + class_1199_vars->current_target_range = class_1199_vars->activation_wait_target_range; } else { - class_1199_vars->f180 = class_1199_vars->f178; + class_1199_vars->current_target_range = class_1199_vars->default_target_range; } if (class_1199_vars->f174 == 2) { - target_selection_status = ahead_f(class_1199_vars->f180, moby, class_1199_vars->fC0); + target_selection_status = ahead_f( + class_1199_vars->current_target_range, moby, class_1199_vars->selected_target_vectors); if (target_selection_status != TARGET_SELECTION_DEFAULT_REJECTED_NO_REPLACEMENT) { - LevelCuboid *bp = &l10_cuboids[class_1199_vars->f194]; + LevelCuboid *bp = &l10_cuboids[class_1199_vars->target_bounds_cuboid_index]; fast_vec_sub(vector_scratch, D_0013F3D0, &bp->pos); vector_scratch[3] = 0.0f; transform_vector_by_basis(transformed_offset, vector_scratch, bp->to_local); @@ -749,28 +746,32 @@ void update_darter_hit_reactions_and_targeting(struct Moby *moby) { class_1199_vars->f104 = 2; } } - } else if (moby->state == 1 && class_1199_vars->f18C >= 0) { - target_selection_status = activate_effect_l08(class_1199_vars->f180, - moby, - class_1199_vars->fC0, - 0, - 0, - l10_paths[class_1199_vars->f18C]->points, - l10_paths[class_1199_vars->f18C]->count); - } else if (moby->state != 1 && class_1199_vars->f17C >= 0) { - target_selection_status = activate_effect_l08(class_1199_vars->f180, - moby, - class_1199_vars->fC0, - 0, - 0, - l10_paths[class_1199_vars->f17C]->points, - l10_paths[class_1199_vars->f17C]->count); + } else if (moby->state == 1 && class_1199_vars->activation_wait_target_path_index >= 0) { + target_selection_status = activate_effect_l08( + class_1199_vars->current_target_range, + moby, + class_1199_vars->selected_target_vectors, + 0, + 0, + l10_paths[class_1199_vars->activation_wait_target_path_index]->points, + l10_paths[class_1199_vars->activation_wait_target_path_index]->count); + } else if (moby->state != 1 && class_1199_vars->active_target_path_index >= 0) { + target_selection_status = + activate_effect_l08(class_1199_vars->current_target_range, + moby, + class_1199_vars->selected_target_vectors, + 0, + 0, + l10_paths[class_1199_vars->active_target_path_index]->points, + l10_paths[class_1199_vars->active_target_path_index]->count); } else { - target_selection_status = ahead_f(class_1199_vars->f180, moby, class_1199_vars->fC0); + target_selection_status = ahead_f( + class_1199_vars->current_target_range, moby, class_1199_vars->selected_target_vectors); } if (target_selection_status != TARGET_SELECTION_DEFAULT_REJECTED_NO_REPLACEMENT) { - if (class_1199_vars->f180 < - vector_distance_xy(class_1199_vars->f130, class_1199_vars->fC0)) { + if (class_1199_vars->current_target_range < + vector_distance_xy(class_1199_vars->navigation_state, + class_1199_vars->selected_target_vectors)) { class_1199_vars->f104 = 2; } else if (moby->visible == 0) { class_1199_vars->f104 = 2; diff --git a/src/overlays/l10/mobys/screamer.c b/src/overlays/l10/mobys/screamer.c index 38cd9dcfc6..95378def2c 100644 --- a/src/overlays/l10/mobys/screamer.c +++ b/src/overlays/l10/mobys/screamer.c @@ -1,5 +1,7 @@ /* Level 10 moby class screamer: path following, targeting and hit reactions. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/overlay/shared/world/cuboid.h" #include "rnc/game/item_state.h" #include "rnc/hero/hero.h" @@ -330,36 +332,29 @@ typedef struct Hit_2DFC38 { } Hit_2DFC38; typedef struct MobyData_2DFC38 { - char pad0[0x20]; - float f20; - char pad24[2]; - short nonlethal_hit_duration_frames; - char pad28[0x10]; - int target_range_boost_requested; - char pad3C[0x24]; - char f60[0x10]; - float f70, f74, f78, f7C; - char pad80[4]; - int knockback_flags; - char pad88[0x15]; - unsigned char f9D; - char pad9E[0x22]; - char selected_target_vectors[0x40]; - int f100, f104; - char pad108[8]; - char color_reaction_state_header[7]; - unsigned char secondary_color_red; - char pad118[0x18]; - char navigation_state[0x44]; - int f174; - float default_target_range; - int active_target_path_index; - float current_target_range; - int target_range_boost_timer; - float activation_wait_target_range; - int activation_wait_target_path_index; - char pad190[4]; - int target_bounds_cuboid_index; + char pad0[0x20]; + float health; + char pad24[2]; + short nonlethal_hit_duration_frames; + char pad28[0x10]; + int target_range_boost_requested; + char pad3C[0x24]; + struct KnockbackMotion knockback; /* 0x60 */ + char selected_target_vectors[0x40]; + int f100, f104; + char pad108[8]; + struct HitColorFlash hit_flash; /* 0x110 */ + char pad120[0x10]; + char navigation_state[0x44]; + int f174; + float default_target_range; + int active_target_path_index; + float current_target_range; + int target_range_boost_timer; + float activation_wait_target_range; + int activation_wait_target_path_index; + char pad190[4]; + int target_bounds_cuboid_index; } MobyData_2DFC38; extern char D_0013F3D0[]; @@ -406,44 +401,44 @@ void update_screamer_hit_reactions_and_targeting(struct Moby *moby) { if (moby->state != SCREAMER_STATE_DEATH_KNOCKBACK) { hit_record = (Hit_2DFC38 *)find_moby_hit(moby, 0x330000, 0); hit_update_2DFC38( - moby, hit_record, &screamer_vars->f20, 5, &hit_processing_status, 0, 0, 4); + moby, hit_record, &screamer_vars->health, 5, &hit_processing_status, 0, 0, 4); if (hit_record != 0) { - if (screamer_vars->f20 <= hit_record->damage) { + if (screamer_vars->health <= hit_record->damage) { if (screamer_death_message_gate != 0 && item_unlocked[0x10] == 0) { item_unlocked[0x10] = 1; allocate_voice_for_bank_entry_2DFC38(1, 0, 0); queue_dialogue_message(0x53d6, -1); } - screamer_vars->f20 = 0.0f; + screamer_vars->health = 0.0f; moby->flags &= 0xEFFF; if (moby->prev_seq != 5) blend_moby_animation(moby, 5, 0, scale_game_frames(10)); moby->state = SCREAMER_STATE_DEATH_KNOCKBACK; - screamer_vars->f70 = D_0015ED70 * 26.0f; - screamer_vars->f9D = 3; - screamer_vars->f74 = 0.0005f; - screamer_vars->knockback_flags = 9; - screamer_vars->f78 = D_0015ED6C * 7.0f; - screamer_vars->f7C = D_0015ED6C * 10.0f; + screamer_vars->knockback.gravity = D_0015ED70 * 26.0f; + screamer_vars->knockback.unk3D = 3; + screamer_vars->knockback.speed_approach_step = 0.0005f; + screamer_vars->knockback.flags = 9; + screamer_vars->knockback.speed = D_0015ED6C * 7.0f; + screamer_vars->knockback.vertical_speed = D_0015ED6C * 10.0f; if (hit_record->f30 & 1) knockback_angle = fast_arc_tan(hit_record->f10[0], hit_record->f10[1]); else knockback_angle = fast_arc_tan(moby->pos.x - hit_record->x, moby->pos.y - hit_record->y); - trooper_start_knockback(moby, screamer_vars->f60, knockback_angle, 5, 1, 0); - screamer_vars->secondary_color_red = 0x78; - trooper_anim_update(moby, screamer_vars->color_reaction_state_header); + trooper_start_knockback(moby, &screamer_vars->knockback, knockback_angle, 5, 1, 0); + screamer_vars->hit_flash.flash_red = 0x78; + trooper_anim_update(moby, &screamer_vars->hit_flash); func_L00_00261B00_2E2B80(moby, 1, 3, 0, -1); } else { - screamer_vars->f20 = screamer_vars->f20 - hit_record->damage; - screamer_vars->secondary_color_red = 0xfa; + screamer_vars->health = screamer_vars->health - hit_record->damage; + screamer_vars->hit_flash.flash_red = 0xfa; screamer_vars->nonlethal_hit_duration_frames = scale_game_frames(60); - trooper_anim_update(moby, screamer_vars->color_reaction_state_header); + trooper_anim_update(moby, &screamer_vars->hit_flash); } moby->hit_slot = 0xff; } } - trooper_anim_finish(moby, screamer_vars->color_reaction_state_header); + trooper_anim_finish(moby, &screamer_vars->hit_flash); if (screamer_vars->f174 == 2) screamer_vars->current_target_range = 42.0f; else if (screamer_vars->target_range_boost_timer != 0) diff --git a/src/overlays/shared/rendering/effects/spawn_explosion.c b/src/overlays/shared/rendering/effects/spawn_explosion.c index 76c94b5c54..af863d0911 100644 --- a/src/overlays/shared/rendering/effects/spawn_explosion.c +++ b/src/overlays/shared/rendering/effects/spawn_explosion.c @@ -1,5 +1,6 @@ /* Explosions and level path helpers: spawn_explosion and its variants, moby class tests, angle wrapping and moby index lists. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/globals.h" #include "asm.h" #include "qcopy.h" @@ -46,108 +47,99 @@ void clip_negative_segment_endpoint_xyz(V0025d238 *segment_start, V0025d238 *ino } } -typedef struct { - short cur; - short flag; - unsigned char r, g, b; - char pad; - char pad2[4]; - short lo; - short hi; -} S; - void get_moby_color(void *, int *, int *, int *) __asm__("FUN_L00_00250320"); -void trooper_anim_update(void *a, S *s) __asm__("FUN_L00_0025d458"); +void trooper_anim_update(void *a, struct HitColorFlash *s) __asm__("FUN_L00_0025d458"); -void trooper_anim_update(void *moby, S *animation_state) { - int previous_timer_frames = animation_state->cur; - if (previous_timer_frames == 0 || animation_state->flag != 0) { - animation_state->cur = scale_game_frames(animation_state->lo); - animation_state->flag = 0; +void trooper_anim_update(void *moby, struct HitColorFlash *animation_state) { + int previous_timer_frames = animation_state->timer; + if (previous_timer_frames == 0 || animation_state->phase != 0) { + animation_state->timer = scale_game_frames(animation_state->flash_frames); + animation_state->phase = 0; if (previous_timer_frames != 0) { - int scaled_duration_frames = scale_game_frames(animation_state->lo); - animation_state->cur = truncate_float_to_s32( + int scaled_duration_frames = scale_game_frames(animation_state->flash_frames); + animation_state->timer = truncate_float_to_s32( scaled_duration_frames * (previous_timer_frames / - convert_integer_to_float(scale_game_frames(animation_state->hi)))); - if (animation_state->cur <= 0) - animation_state->cur = 1; + convert_integer_to_float(scale_game_frames(animation_state->return_frames)))); + if (animation_state->timer <= 0) + animation_state->timer = 1; } else { int x, y, z; get_moby_color(moby, &x, &y, &z); - animation_state->r = x; - animation_state->g = y; - animation_state->b = z; + animation_state->original_red = x; + animation_state->original_green = y; + animation_state->original_blue = z; } } } -typedef struct { - s16 t; - s16 phase; - u8 r0, g0, b0; - u8 r1, g1, b1; - u8 pad[2]; - s16 d0; - s16 d1; -} S_25d538; - void set_moby_color(s32, s32, s32, s32) __asm__("FUN_L00_002502f0"); -void trooper_anim_finish(s32 id, S_25d538 *s) __asm__("FUN_L00_0025d538"); +void trooper_anim_finish(s32 id, struct HitColorFlash *s) __asm__("FUN_L00_0025d538"); -void trooper_anim_finish(s32 id, S_25d538 *animation_state) { +void trooper_anim_finish(s32 id, struct HitColorFlash *animation_state) { enum { MOBY_COLOR_PHASE_TO_SECONDARY_COLOR = 0, MOBY_COLOR_PHASE_TO_ORIGINAL_COLOR = 1 }; f32 phase_duration_frames, phase_progress; s32 r, g, b; - if (animation_state->t == 0) + if (animation_state->timer == 0) return; if (fast_dec_timer_s16(animation_state)) { if (animation_state->phase != MOBY_COLOR_PHASE_TO_SECONDARY_COLOR) { - set_moby_color(id, animation_state->r0, animation_state->g0, animation_state->b0); + set_moby_color(id, + animation_state->original_red, + animation_state->original_green, + animation_state->original_blue); return; } animation_state->phase = MOBY_COLOR_PHASE_TO_ORIGINAL_COLOR; - animation_state->t = scale_game_frames(animation_state->d1); + animation_state->timer = scale_game_frames(animation_state->return_frames); } if (animation_state->phase == MOBY_COLOR_PHASE_TO_SECONDARY_COLOR) { - phase_duration_frames = convert_integer_to_float(scale_game_frames(animation_state->d0)); - phase_progress = (phase_duration_frames - animation_state->t) / phase_duration_frames; - if (animation_state->r1 != 0) - r = truncate_float_to_s32(animation_state->r0 + - (animation_state->r1 - animation_state->r0) * phase_progress); + phase_duration_frames = + convert_integer_to_float(scale_game_frames(animation_state->flash_frames)); + phase_progress = (phase_duration_frames - animation_state->timer) / phase_duration_frames; + if (animation_state->flash_red != 0) + r = truncate_float_to_s32(animation_state->original_red + + (animation_state->flash_red - animation_state->original_red) * + phase_progress); else - r = animation_state->r0; - if (animation_state->g1 != 0) - g = truncate_float_to_s32(animation_state->g0 + - (animation_state->g1 - animation_state->g0) * phase_progress); + r = animation_state->original_red; + if (animation_state->flash_green != 0) + g = truncate_float_to_s32( + animation_state->original_green + + (animation_state->flash_green - animation_state->original_green) * phase_progress); else - g = animation_state->g0; - if (animation_state->b1 != 0) - b = truncate_float_to_s32(animation_state->b0 + - (animation_state->b1 - animation_state->b0) * phase_progress); + g = animation_state->original_green; + if (animation_state->flash_blue != 0) + b = truncate_float_to_s32( + animation_state->original_blue + + (animation_state->flash_blue - animation_state->original_blue) * phase_progress); else - b = animation_state->b0; + b = animation_state->original_blue; } else { - phase_duration_frames = convert_integer_to_float(scale_game_frames(animation_state->d1)); - phase_progress = (phase_duration_frames - animation_state->t) / phase_duration_frames; - if (animation_state->r1 != 0) - r = truncate_float_to_s32(animation_state->r1 + - (animation_state->r0 - animation_state->r1) * phase_progress); + phase_duration_frames = + convert_integer_to_float(scale_game_frames(animation_state->return_frames)); + phase_progress = (phase_duration_frames - animation_state->timer) / phase_duration_frames; + if (animation_state->flash_red != 0) + r = truncate_float_to_s32(animation_state->flash_red + + (animation_state->original_red - animation_state->flash_red) * + phase_progress); else - r = animation_state->r0; - if (animation_state->g1 != 0) - g = truncate_float_to_s32(animation_state->g1 + - (animation_state->g0 - animation_state->g1) * phase_progress); + r = animation_state->original_red; + if (animation_state->flash_green != 0) + g = truncate_float_to_s32( + animation_state->flash_green + + (animation_state->original_green - animation_state->flash_green) * phase_progress); else - g = animation_state->g0; - if (animation_state->b1 != 0) - b = truncate_float_to_s32(animation_state->b1 + - (animation_state->b0 - animation_state->b1) * phase_progress); + g = animation_state->original_green; + if (animation_state->flash_blue != 0) + b = truncate_float_to_s32( + animation_state->flash_blue + + (animation_state->original_blue - animation_state->flash_blue) * phase_progress); else - b = animation_state->b0; + b = animation_state->original_blue; } set_moby_color(id, r, g, b); } From 4f70f9efa16c62f82b932728a932ceae517e8148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:04:01 +0000 Subject: [PATCH 063/213] decomp: name the hit colour flash start and update functions in every caller --- .../overlay/shared/mobys/hit_color_flash.h | 4 +-- src/overlays/l00/mobys/veldin_robot_enemy.c | 10 +++---- src/overlays/l01/mobys/birdbot.c | 12 ++++---- src/overlays/l01/mobys/peckbot.c | 10 +++---- src/overlays/l02/mobys/constructorbot.c | 22 +++++++------- src/overlays/l02/mobys/sand_shark.c | 30 +++++++++---------- src/overlays/l02/mobys/sand_shark_nest.c | 8 ++--- src/overlays/l03/mobys/kerwan_path_enemy.c | 8 ++--- src/overlays/l03/mobys/mine_layer.c | 8 ++--- src/overlays/l03/mobys/robot_dog.c | 8 ++--- src/overlays/l04/mobys/big_axebot.c | 16 +++++----- src/overlays/l04/mobys/blarg_trooper.c | 8 ++--- src/overlays/l04/mobys/circular_saw_enemy.c | 10 +++---- src/overlays/l04/mobys/woodcut_bot.c | 12 ++++---- src/overlays/l05/mobys/extermibot.c | 8 ++--- src/overlays/l05/mobys/extermitank.c | 8 ++--- src/overlays/l06/mobys/alien_queen.c | 10 +++---- src/overlays/l06/mobys/alien_snapper.c | 10 +++---- src/overlays/l07/mobys/bombomatic.c | 8 ++--- src/overlays/l07/mobys/machinegun_turret.c | 8 ++--- src/overlays/l07/mobys/mine_group.c | 8 ++--- src/overlays/l07/mobys/sharkigator.c | 10 +++---- src/overlays/l07/mobys/snagglebeast.c | 12 ++++---- src/overlays/l08/mobys/blarg_bombthrower.c | 8 ++--- src/overlays/l08/mobys/bolt_thief.c | 4 +-- src/overlays/l08/mobys/bomb.c | 8 ++--- src/overlays/l08/mobys/bomber_tank.c | 16 +++++----- src/overlays/l09/mobys/destructible_prop.c | 4 +-- src/overlays/l09/mobys/refueling_station.c | 10 +++---- src/overlays/l10/mobys/blarg_ship.c | 14 ++++----- src/overlays/l10/mobys/darter.c | 12 ++++---- src/overlays/l10/mobys/screamer.c | 12 ++++---- src/overlays/l10/mobys/toxic_crab.c | 16 +++++----- src/overlays/l11/mobys/owner_linked_moby.c | 10 +++---- src/overlays/l11/mobys/psytcopus.c | 8 ++--- src/overlays/l11/mobys/puffoid.c | 10 +++---- src/overlays/l12/mobys/blarg_helicopter.c | 8 ++--- src/overlays/l12/mobys/blarg_trooper.c | 10 +++---- src/overlays/l12/mobys/hoven_anklebiter.c | 10 +++---- src/overlays/l13/mobys/blarg_gunner.c | 10 +++---- src/overlays/l13/mobys/blarg_ship.c | 8 ++--- src/overlays/l13/mobys/blarg_space_commando.c | 8 ++--- src/overlays/l13/mobys/blarg_space_fighter.c | 12 ++++---- src/overlays/l13/mobys/forcefield_tower.c | 12 ++++---- .../l13/mobys/hovering_rocket_attacker.c | 10 +++---- src/overlays/l13/mobys/linked_switch_group.c | 12 ++++---- src/overlays/l13/mobys/poison_vessel.c | 10 +++---- src/overlays/l13/mobys/qwarks_starfighter.c | 22 +++++++------- src/overlays/l13/mobys/robosquawker.c | 10 +++---- .../l14/mobys/blarg_heavy_interceptor.c | 8 ++--- src/overlays/l14/mobys/bolt_thief.c | 4 +-- src/overlays/l14/mobys/flying_car.c | 4 +-- src/overlays/l14/mobys/machinegun_turret.c | 8 ++--- src/overlays/l14/mobys/minibomber.c | 8 ++--- src/overlays/l15/mobys/helicopter.c | 8 ++--- src/overlays/l15/mobys/ultramech_unlimited.c | 8 ++--- src/overlays/l16/mobys/bolt_thief.c | 4 +-- src/overlays/l16/mobys/bomb.c | 10 +++---- src/overlays/l16/mobys/chomper.c | 8 ++--- src/overlays/l16/mobys/test_dummy.c | 10 +++---- src/overlays/l17/mobys/dreks_fleet_turret.c | 8 ++--- src/overlays/l17/mobys/robot_dog.c | 4 +-- .../l18/mobys/drek_final_boss_robot.c | 8 ++--- src/overlays/l18/mobys/gadgebot.c | 8 ++--- src/overlays/l18/mobys/rocket_tank.c | 10 +++---- src/overlays/shared/enemies/armed_transport.c | 8 ++--- .../shared/enemies/blarg_elite_commando.c | 8 ++--- .../shared/enemies/blarg_helicopter.c | 8 ++--- .../shared/enemies/blarg_paratrooper.c | 8 ++--- .../shared/enemies/blarg_space_commando.c | 8 ++--- src/overlays/shared/enemies/bomb_spawner.c | 10 +++---- .../shared/enemies/ground_melee_enemy.c | 10 +++---- src/overlays/shared/enemies/horny_toad.c | 8 ++--- src/overlays/shared/enemies/plasmabot.c | 10 +++---- src/overlays/shared/enemies/seeker.c | 12 ++++---- src/overlays/shared/enemies/sentrybot.c | 10 +++---- src/overlays/shared/enemies/spawner.c | 10 +++---- src/overlays/shared/props/trespasser_pad.c | 4 +-- .../rendering/effects/spawn_explosion.c | 8 ++--- src/overlays/shared/weapons/decoy.c | 8 ++--- 80 files changed, 385 insertions(+), 385 deletions(-) diff --git a/include/rnc/overlay/shared/mobys/hit_color_flash.h b/include/rnc/overlay/shared/mobys/hit_color_flash.h index 49b310d4ee..9415b60965 100644 --- a/include/rnc/overlay/shared/mobys/hit_color_flash.h +++ b/include/rnc/overlay/shared/mobys/hit_color_flash.h @@ -4,8 +4,8 @@ #include "types.h" /* Colour flash of a hit enemy (0x10 bytes in its pvars). - * trooper_anim_update (FUN_L00_0025d458) starts it and saves the moby's colour, - * trooper_anim_finish (FUN_L00_0025d538) blends the moby colour toward the + * start_hit_color_flash (FUN_L00_0025d458) starts it and saves the moby's colour, + * update_hit_color_flash (FUN_L00_0025d538) blends the moby colour toward the * flash colour over flash_frames, then back over return_frames. */ struct HitColorFlash { s16 timer; /* 0x0: frames left in the current phase */ diff --git a/src/overlays/l00/mobys/veldin_robot_enemy.c b/src/overlays/l00/mobys/veldin_robot_enemy.c index 5227be2ea7..bd6bd533ba 100644 --- a/src/overlays/l00/mobys/veldin_robot_enemy.c +++ b/src/overlays/l00/mobys/veldin_robot_enemy.c @@ -421,8 +421,8 @@ hit_reaction(ElectroidMoby *, ElectroidHit *, void *, s32, s32 *, f32 *, s32, s3 extern void trooper_knockback_arc(ElectroidVec *, f32 *, f32 *, f32 *) __asm__("FUN_L00_0025ab48"); extern void trooper_start_knockback(ElectroidMoby *, void *, s32, s32, s32, f32) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(ElectroidMoby *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(ElectroidMoby *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(ElectroidMoby *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(ElectroidMoby *, void *) __asm__("FUN_L00_0025d538"); extern s32 select_moby_combat_target(ElectroidMoby *, f32, void *) __asm__("FUN_L00_0025fcb8"); extern void FUN_L00_0025ff38(ElectroidMoby *, void *, s32, s32, void *, s32, f32); f32 veldin_robot_default_target_range_gp __asm__("D_L00_00161BD0") = 24.0f; @@ -485,7 +485,7 @@ void update_veldin_robot_damage_and_targeting(ElectroidMoby *moby) { moby->state = VELDIN_ROBOT_STATE_DEATH_KNOCKBACK; moby->collision = 0; vars->damage_secondary_red = 0x78; - trooper_anim_update(moby, anim); + start_hit_color_flash(moby, anim); FUN_L00_00257470(moby, 0, -1); } else { vars->knockback.speed = veldin_robot_knockback_xy_scale_gp * frame_time * 0.35f; @@ -499,12 +499,12 @@ void update_veldin_robot_damage_and_targeting(ElectroidMoby *moby) { moby->state = VELDIN_ROBOT_STATE_DAMAGE_KNOCKBACK; vars->damage_secondary_red = 0xFA; vars->unk26 = scale_game_frames(0x3C); - trooper_anim_update(moby, anim); + start_hit_color_flash(moby, anim); } release_beam_slot_by_id(moby); } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, anim); + update_hit_color_flash(moby, anim); if (moby->state == VELDIN_ROBOT_STATE_WAIT_TO_FOLLOW_PATH) { path = toad_paths[vars->targeting_path_index]; FUN_L00_0025ff38(moby, &vars->targetPos, 0, 0, path->pts, path->count, 64.0f); diff --git a/src/overlays/l01/mobys/birdbot.c b/src/overlays/l01/mobys/birdbot.c index fb4334b084..192718b992 100644 --- a/src/overlays/l01/mobys/birdbot.c +++ b/src/overlays/l01/mobys/birdbot.c @@ -445,8 +445,8 @@ extern void FUN_L00_00258278_cf( char *moby, float *vel, float target, float k, float d, float max) __asm__("FUN_L00_00258278"); extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); extern void FUN_L00_0025c558_u(float, void *, void *, int, int, int) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void spawn_explosion(void *, void *, void *, @@ -599,7 +599,7 @@ void birdbot_update(PeMoby *birdbot_moby) { birdbot_vars->b67 = 0xB4; birdbot_moby->state = BIRDBOT_STATE_FATAL_KNOCKBACK; birdbot_moby->h34 &= 0xEFFF; - trooper_anim_update(birdbot_moby, (short *)birdbot_vars->x60); + start_hit_color_flash(birdbot_moby, (short *)birdbot_vars->x60); birdbot_vars->hit_reaction_cooldown = scale_game_frames(0x3C); break; case BIRDBOT_HIT_REACTION_NONFATAL_KNOCKBACK: @@ -626,7 +626,7 @@ void birdbot_update(PeMoby *birdbot_moby) { blend_moby_animation(birdbot_moby, 0xB, 0, scale_game_frames(6)); } birdbot_moby->state = BIRDBOT_STATE_NONFATAL_KNOCKBACK; - trooper_anim_update(birdbot_moby, (short *)birdbot_vars->x60); + start_hit_color_flash(birdbot_moby, (short *)birdbot_vars->x60); break; case BIRDBOT_HIT_REACTION_LOW_SPEED_NONFATAL_KNOCKBACK: case BIRDBOT_HIT_REACTION_LOW_SPEED_NONFATAL_KNOCKBACK_NO_BLEND: @@ -648,7 +648,7 @@ void birdbot_update(PeMoby *birdbot_moby) { FUN_L00_0025c558_u( knockback_heading, birdbot_moby, &birdbot_vars->knockback, 0xE, 6, 0); birdbot_moby->state = BIRDBOT_STATE_NONFATAL_KNOCKBACK; - trooper_anim_update(birdbot_moby, (short *)birdbot_vars->x60); + start_hit_color_flash(birdbot_moby, (short *)birdbot_vars->x60); break; } } @@ -1286,7 +1286,7 @@ void birdbot_update(PeMoby *birdbot_moby) { } break; } - trooper_anim_finish(birdbot_moby, birdbot_vars->x60); + update_hit_color_flash(birdbot_moby, birdbot_vars->x60); birdbot_vars->previous_animation_frame = frame; if (birdbot_moby->state == BIRDBOT_STATE_TRACK_TARGET_AND_SELECT_ACTION || birdbot_moby->state == 5 || birdbot_moby->state == BIRDBOT_STATE_FIRE_BURST || diff --git a/src/overlays/l01/mobys/peckbot.c b/src/overlays/l01/mobys/peckbot.c index 147519e438..f1961f7c0e 100644 --- a/src/overlays/l01/mobys/peckbot.c +++ b/src/overlays/l01/mobys/peckbot.c @@ -19,8 +19,8 @@ extern float D_L01_0015F580[] MACRO_ADDR; extern float FUN_L04_001f1978(float); extern void FUN_L00_00257470(void *, int, int); extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void select_moby_combat_target(void *, void *, float) __asm__("FUN_L00_0025fcb8"); extern void blend_moby_animation(void *, int, int, int) __asm__("FUN_00212f90"); @@ -312,7 +312,7 @@ void peckbot_update(Mob577 *peckbot_moby) { peckbot_vars->x174 = 18.0f; peckbot_moby->state = PECKBOT_STATE_FATAL_KNOCKBACK; peckbot_vars->x117 = 0x78; - trooper_anim_update(peckbot_moby, peckbot_vars->fx110); + start_hit_color_flash(peckbot_moby, peckbot_vars->fx110); FUN_L00_00257470(peckbot_moby, 0, -1); } else { vector_scratch.q = hit->pos; @@ -324,7 +324,7 @@ void peckbot_update(Mob577 *peckbot_moby) { peckbot_moby->state = PECKBOT_STATE_NONFATAL_KNOCKBACK; peckbot_vars->x117 = 0xFA; peckbot_vars->flee_timer = scale_game_frames(0x3C); - trooper_anim_update(peckbot_moby, peckbot_vars->fx110); + start_hit_color_flash(peckbot_moby, peckbot_vars->fx110); } } } @@ -865,6 +865,6 @@ void peckbot_update(Mob577 *peckbot_moby) { peckbot_moby->hit = 0; break; } - trooper_anim_finish(peckbot_moby, peckbot_vars->fx110); + update_hit_color_flash(peckbot_moby, peckbot_vars->fx110); FUN_L00_0025a120(peckbot_moby); } diff --git a/src/overlays/l02/mobys/constructorbot.c b/src/overlays/l02/mobys/constructorbot.c index b0adbbc2a4..3350922ce2 100644 --- a/src/overlays/l02/mobys/constructorbot.c +++ b/src/overlays/l02/mobys/constructorbot.c @@ -26,8 +26,8 @@ extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float * extern char *find_moby_hit(void *, int, int) __asm__("FUN_L00_0025a420"); extern void trooper_start_knockback(float, void *, void *, int, int, int) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); /* Ported from rac1-decomp (src/overlays/l02_aridia/vendor_002A59D8.c: func_L02_002D8B80), where it is exact; names translated to the US level program. */ @@ -562,13 +562,13 @@ extern int select_moby_target_goal(char *a, char *o, float best) __asm__("FUN_L0 /* pvars of the class FUN_L02_002d85b8 serves (only the fields it touches). */ typedef struct { - char pad0[0x20]; - float hp; /* 0x20 */ - char pad24[0x3C]; - short anim[3]; /* 0x60: passed to trooper_anim_update / trooper_anim_finish */ - unsigned char pad66; - unsigned char flash; /* 0x67 */ - char pad68[8]; + char pad0[0x20]; + float hp; /* 0x20 */ + char pad24[0x3C]; + short anim[3]; /* 0x60: passed to start_hit_color_flash / update_hit_color_flash */ + unsigned char pad66; + unsigned char flash; /* 0x67 */ + char pad68[8]; struct KnockbackMotion knockback; /* 0x70 */ char padD0[0x150]; char *target; /* 0x220 */ @@ -649,7 +649,7 @@ void handle_constructorbot_damage_and_retargeting(void *owner_moby) { moby_vars->flash = 0xFA; moby[0x20] = 0x11; } - trooper_anim_update(moby, moby_vars->anim); + start_hit_color_flash(moby, moby_vars->anim); } ((unsigned char *)moby)[0xA4] = 0xFF; current_target = moby_vars->target; @@ -663,5 +663,5 @@ void handle_constructorbot_damage_and_retargeting(void *owner_moby) { if (moby_vars->target == 0) { moby_vars->target = ((char *)hero.moby); } - trooper_anim_finish(moby, moby_vars->anim); + update_hit_color_flash(moby, moby_vars->anim); } diff --git a/src/overlays/l02/mobys/sand_shark.c b/src/overlays/l02/mobys/sand_shark.c index 66bda748f1..1c1b17020d 100644 --- a/src/overlays/l02/mobys/sand_shark.c +++ b/src/overlays/l02/mobys/sand_shark.c @@ -1201,17 +1201,17 @@ void emit_sand_shark_single_particle(Vec4 *from) { /* pvars of the class FUN_L02_002d5c88 updates (only the fields it touches). */ typedef struct { - char pad0[0x20]; - float hp; /* 0x20 */ - char pad24[0xA]; - unsigned char relaunch_request_state; /* 0x2E: 2 = respawn requested */ - char pad2F[9]; - int target_range_timer_refresh_request; /* 0x38 */ - char pad3C[0xD4]; - short anim[3]; /* 0x110: passed to trooper_anim_update / trooper_anim_finish */ - char pad116; - unsigned char hit_flash_target_red; /* 0x117 */ - char pad118[8]; + char pad0[0x20]; + float hp; /* 0x20 */ + char pad24[0xA]; + unsigned char relaunch_request_state; /* 0x2E: 2 = respawn requested */ + char pad2F[9]; + int target_range_timer_refresh_request; /* 0x38 */ + char pad3C[0xD4]; + short anim[3]; /* 0x110: passed to start_hit_color_flash / update_hit_color_flash */ + char pad116; + unsigned char hit_flash_target_red; /* 0x117 */ + char pad118[8]; struct KnockbackMotion knockback; /* 0x120 */ char pad180[0x50]; float tgt[4]; /* 0x1D0: point followed along the path */ @@ -1254,8 +1254,8 @@ extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float * extern char *find_moby_hit(void *, int, int) __asm__("FUN_L00_0025a420"); extern void trooper_start_knockback(float, void *, void *, int, int, int) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); /* Path-following enemy: respawns at its home point on request, takes hits (dies and drops to the ground), then follows its path and retargets the hero when it strays. */ @@ -1358,11 +1358,11 @@ void handle_sand_shark_damage_and_targeting(unsigned char *moby) { moby[0x20] = 0x18; MOBY(moby)->collision = 0; moby_vars->hit_flash_target_red = 0x78; - trooper_anim_update(moby, moby_vars->anim); + start_hit_color_flash(moby, moby_vars->anim); } } moby[0xA4] = 0xFF; - trooper_anim_finish(moby, moby_vars->anim); + update_hit_color_flash(moby, moby_vars->anim); path = D_L02_001B0AB0_5c88[moby_vars->configured_path_index]; if (FUN_L00_0025ff38(moby_vars->effective_target_selection_range, moby, diff --git a/src/overlays/l02/mobys/sand_shark_nest.c b/src/overlays/l02/mobys/sand_shark_nest.c index ff5d488e49..3ddfe861cf 100644 --- a/src/overlays/l02/mobys/sand_shark_nest.c +++ b/src/overlays/l02/mobys/sand_shark_nest.c @@ -29,8 +29,8 @@ extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN extern char *find_moby_hit(void *, int, int) __asm__("FUN_L00_0025a420"); extern void trooper_start_knockback(float, void *, void *, int, int, int) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); #include "qcopy.h" @@ -378,10 +378,10 @@ void handle_sand_shark_nest_damage(struct Moby *moby) { blend_moby_animation(moby, 3, 0, 0); FUN_L00_00257470(moby, 0, -1); } - trooper_anim_update(moby, (short *)(nest_vars + 0x60)); + start_hit_color_flash(moby, (short *)(nest_vars + 0x60)); } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, nest_vars + 0x60); + update_hit_color_flash(moby, nest_vars + 0x60); FUN_L00_001fefc8(&moby->command); } diff --git a/src/overlays/l03/mobys/kerwan_path_enemy.c b/src/overlays/l03/mobys/kerwan_path_enemy.c index 6b41b7107b..0d9eb68a6e 100644 --- a/src/overlays/l03/mobys/kerwan_path_enemy.c +++ b/src/overlays/l03/mobys/kerwan_path_enemy.c @@ -1465,11 +1465,11 @@ void kerwan_path_enemy_update(Moby2C8398 *m) { } } -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); extern void trooper_start_knockback(float, void *, void *, int, int, int) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); extern float D_L03_001618E0 __attribute__((sda)); @@ -1648,10 +1648,10 @@ void update_kerwan_path_enemy_hit_reaction(Moby2C8398 *moby) { } break; } - trooper_anim_update(moby, (short *)((char *)moby_data + 0x60)); + start_hit_color_flash(moby, (short *)((char *)moby_data + 0x60)); } moby->bA4 = 0xFF; - trooper_anim_finish(moby, (char *)moby_data + 0x60); + update_hit_color_flash(moby, (char *)moby_data + 0x60); } extern int FUN_L00_0025df68(void *, void *, void *, int *, float *, int, float, float, float); diff --git a/src/overlays/l03/mobys/mine_layer.c b/src/overlays/l03/mobys/mine_layer.c index 1a27d7df94..7c7bd4c2ab 100644 --- a/src/overlays/l03/mobys/mine_layer.c +++ b/src/overlays/l03/mobys/mine_layer.c @@ -372,8 +372,8 @@ extern s32 resolve_moby_hit_response( extern void trooper_knockback_arc(Vec4 *, f32 *, f32 *, f32 *) __asm__("FUN_L00_0025ab48"); extern void trooper_start_knockback(f32, struct Moby *, void *, s32, s32, s32) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(struct Moby *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(struct Moby *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d538"); extern f32 frame_time_sq_macro __asm__("D_0015ED70") MACRO_ADDR; @@ -485,10 +485,10 @@ void handle_mine_layer_damage(struct Moby *damaged_moby) { damaged_moby->state = MINE_LAYER_KNOCKBACK_UNTIL_EXPLOSION; break; } - trooper_anim_update(damaged_moby, trooper_vars->anim); + start_hit_color_flash(damaged_moby, trooper_vars->anim); } damaged_moby->hit_slot = 0xFF; - trooper_anim_finish(damaged_moby, trooper_vars->anim); + update_hit_color_flash(damaged_moby, trooper_vars->anim); } extern void set_path_2cc888(void *, void *, int, int, int, float) __asm__("FUN_L00_0025c558"); diff --git a/src/overlays/l03/mobys/robot_dog.c b/src/overlays/l03/mobys/robot_dog.c index 370b1277be..874660e45e 100644 --- a/src/overlays/l03/mobys/robot_dog.c +++ b/src/overlays/l03/mobys/robot_dog.c @@ -130,7 +130,7 @@ extern int select_moby_target_with_hero_fallback(char *, char *, float) __asm__( extern void FUN_L00_00257470(void *, int, int); extern void FUN_L00_00258278(char *moby, float *vel, float target, float k, float d, float max); extern void FUN_L00_0025a120(void *); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void FUN_L00_00263ac8_c5bb8(void *, int, void *, float) __asm__("FUN_L00_00263ac8"); extern void spawn_moby_break_fragments(void *, int, int, int, int, int, int) __asm__("FUN_L00_00263e30"); @@ -491,7 +491,7 @@ void robot_dog_update(char *moby) { if (((unsigned char *)moby)[0x31] != 0 && fast_vec_dist(moby + 0x10, D_L03_00166EC0) < 32.0f) { FUN_L00_0025a120(moby); } - trooper_anim_finish(moby, robot_dog_state->animation_state); + update_hit_color_flash(moby, robot_dog_state->animation_state); ((unsigned char *)moby)[0xBC] = 0; } /* Applies damage reaction, knockback parameters and animation state. */ @@ -503,7 +503,7 @@ hit_reaction(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); extern void trooper_start_knockback(float, void *, void *, int, int, int) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); extern void FUN_L01_0026e090(int, int); extern void trooper_set_knockback(float *, float, float) __asm__("FUN_L03_00250a78"); @@ -554,7 +554,7 @@ void update_robot_dog_hit_reaction(struct Moby *moby) { trooper_start_knockback(angle, moby, robot_dog_pvars + 0x120, 4, 1, 0); moby->state = ROBOT_DOG_DEATH_FALL; *(unsigned char *)(robot_dog_pvars + 0x117) = 240; - trooper_anim_update(moby, (short *)(robot_dog_pvars + 0x110)); + start_hit_color_flash(moby, (short *)(robot_dog_pvars + 0x110)); } moby->hit_slot = 255; } diff --git a/src/overlays/l04/mobys/big_axebot.c b/src/overlays/l04/mobys/big_axebot.c index f2307ed5b2..57697c94bf 100644 --- a/src/overlays/l04/mobys/big_axebot.c +++ b/src/overlays/l04/mobys/big_axebot.c @@ -253,8 +253,8 @@ extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN extern void trooper_start_knockback(float, void *, void *, int, int, int) __asm__("FUN_L00_0025c558"); extern void build_spherical_offset(void *, float, float, float) __asm__("FUN_00214db0"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void FUN_L00_00263ac8(float, int, int, unsigned char *); extern void reset_leg_rig_from_animation(void *, void *) __asm__("FUN_L04_00295de8"); extern void advance_moby_animation(void *); @@ -392,7 +392,7 @@ void big_axebot_update(M_B7B0 *moby) { } data->recoil_pose_cooldown_timer = scale_game_frames(0x1E); data->fB7 = 0x78; - trooper_anim_update(moby, (short *)data->hit_transition_state); + start_hit_color_flash(moby, (short *)data->hit_transition_state); } else { switch (hit_reaction_result) { case BIG_AXEBOT_HIT_REACTION_NONE: @@ -415,7 +415,7 @@ void big_axebot_update(M_B7B0 *moby) { } data->recoil_displacement = 3.4f / scale_time(7.0f) * 0.5f; data->fB7 = 0x78; - trooper_anim_update(moby, (short *)data->hit_transition_state); + start_hit_color_flash(moby, (short *)data->hit_transition_state); data->hit_response_cooldown_timer = scale_game_frames(0x46); data->extended_detection_timer = scale_game_frames(0xF0); break; @@ -435,7 +435,7 @@ void big_axebot_update(M_B7B0 *moby) { data->knockback.landing_animation_frame = 10.0f; data->recoil_displacement = 3.4f / scale_time(7.0f); data->fB7 = 0x78; - trooper_anim_update(moby, (short *)data->hit_transition_state); + start_hit_color_flash(moby, (short *)data->hit_transition_state); data->hit_response_cooldown_timer = scale_game_frames(0x46); data->extended_detection_timer = scale_game_frames(0xF0); break; @@ -448,7 +448,7 @@ void big_axebot_update(M_B7B0 *moby) { moby->state = BIG_AXEBOT_STATE_IDLE; data->recoil_displacement = 3.4f / scale_time(7.0f); data->fB7 = 0x78; - trooper_anim_update(moby, (short *)data->hit_transition_state); + start_hit_color_flash(moby, (short *)data->hit_transition_state); data->hit_response_cooldown_timer = scale_game_frames(0x46); data->extended_detection_timer = scale_game_frames(0xF0); break; @@ -466,7 +466,7 @@ void big_axebot_update(M_B7B0 *moby) { data->knockback.landing_animation_frame = 25.0f; moby->state = BIG_AXEBOT_STATE_DYING; data->fB7 = 0x78; - trooper_anim_update(moby, (short *)data->hit_transition_state); + start_hit_color_flash(moby, (short *)data->hit_transition_state); FUN_L00_00257470(moby, 0, -1); break; case BIG_AXEBOT_HIT_REACTION_SKIP_ADDITIONAL_RESPONSE: @@ -903,7 +903,7 @@ void big_axebot_update(M_B7B0 *moby) { } break; } - trooper_anim_finish(moby, data->hit_transition_state); + update_hit_color_flash(moby, data->hit_transition_state); if (data->recoil_displacement > 0.0f) { struct Hero *h = &hero; diff --git a/src/overlays/l04/mobys/blarg_trooper.c b/src/overlays/l04/mobys/blarg_trooper.c index 4423ee4c93..52ce9e4529 100644 --- a/src/overlays/l04/mobys/blarg_trooper.c +++ b/src/overlays/l04/mobys/blarg_trooper.c @@ -102,8 +102,8 @@ extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN extern void trooper_start_knockback(float, void *, void *, int, int, int) __asm__("FUN_L00_0025c558"); extern void build_spherical_offset(void *, float, float, float) __asm__("FUN_00214db0"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void advance_moby_animation(void *); extern void build_moby_bone_transform(char *, int, char *); extern void copy_matrix3x4(void *, void *); @@ -378,7 +378,7 @@ void blarg_trooper_update(struct Moby *moby) { case BLARG_TROOPER_HIT_REACTION_IGNORED: break; } - trooper_anim_update(moby, &blarg_trooper_pvars->anim_state); + start_hit_color_flash(moby, &blarg_trooper_pvars->anim_state); } moby->hit_slot = 0xFF; if (blarg_trooper_pvars->retimer != 0) { @@ -770,7 +770,7 @@ void blarg_trooper_update(struct Moby *moby) { } break; } - trooper_anim_finish(moby, &blarg_trooper_pvars->anim_state); + update_hit_color_flash(moby, &blarg_trooper_pvars->anim_state); { int current_state = moby->state; if (current_state == BLARG_TROOPER_STATE_IDLE || diff --git a/src/overlays/l04/mobys/circular_saw_enemy.c b/src/overlays/l04/mobys/circular_saw_enemy.c index fdf0986ae5..ef4039dc97 100644 --- a/src/overlays/l04/mobys/circular_saw_enemy.c +++ b/src/overlays/l04/mobys/circular_saw_enemy.c @@ -309,8 +309,8 @@ extern int FUN_L00_001fefc8(void *); extern int hit_reaction(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN_L00_0025a478"); extern void FUN_L00_0025a120(void *); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void FUN_L00_00263ac8(float, int, int, unsigned char *); /* Update of the circular saw enemy: hit reaction, state machine (idle, chase, patrol, attack), movement and gravity. */ @@ -615,10 +615,10 @@ void circular_saw_enemy_update(M_35F0 *moby) { moby->state = CIRCULAR_SAW_STATE_HIT_RECOVERY; moby->rot = fast_add_rotations(3.1415927f, ang); data->fB7 = 0x78; - trooper_anim_update(moby, (short *)data->fB0); + start_hit_color_flash(moby, (short *)data->fB0); data->hit_reaction_cooldown_timer = scale_game_frames(0x14); data->fB7 = 0x78; - trooper_anim_update(moby, (short *)data->fB0); + start_hit_color_flash(moby, (short *)data->fB0); data->hit_reaction_cooldown_timer = scale_game_frames(0x14); break; case CIRCULAR_SAW_HIT_REACTION_IGNORED: @@ -1155,7 +1155,7 @@ void circular_saw_enemy_update(M_35F0 *moby) { scale_game_frames(alt ? random_int_between(10, 15) : random_int_between(20, 30))); } } - trooper_anim_finish(moby, data->fB0); + update_hit_color_flash(moby, data->fB0); } extern int launch_suck_cannon_projectile(char *, int, int, float) __asm__("FUN_L00_002dbc30"); diff --git a/src/overlays/l04/mobys/woodcut_bot.c b/src/overlays/l04/mobys/woodcut_bot.c index 113e165225..827235756e 100644 --- a/src/overlays/l04/mobys/woodcut_bot.c +++ b/src/overlays/l04/mobys/woodcut_bot.c @@ -305,8 +305,8 @@ extern void FUN_L00_0025a120(void *); extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); extern void trooper_start_knockback(float, void *, void *, int, int, int) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void select_moby_combat_target(void *, void *, float) __asm__("FUN_L00_0025fcb8"); extern void FUN_L00_00263ac8(float, void *, int, void *); extern void reset_walker_gait_helpers(void *) __asm__("FUN_L00_002a1538"); @@ -447,7 +447,7 @@ void woodcut_bot_update(WBMoby *m) { m->state = WOODCUT_BOT_DEATH_KNOCKBACK; FUN_L00_00257470(m, 0, -1); d->fB7 = 0x78; - trooper_anim_update(m, d->fB0); + start_hit_color_flash(m, d->fB0); d->recoil_horizontal_step = (2.0f / scale_time(15.0f)) * 2.0f; break; case WOODCUT_BOT_REACTION_HIT_RECOVERY_AND_REPOSITION: @@ -469,7 +469,7 @@ void woodcut_bot_update(WBMoby *m) { *(OvlQuad *)v = *(OvlQuad *)(p + 0x10); trooper_knockback_arc(v, &angle, &d->recoil_horizontal_step, &one); d->fB7 = 0x78; - trooper_anim_update(m, d->fB0); + start_hit_color_flash(m, d->fB0); d->t3C4 = scale_game_frames(0xF); d->t3C6 = scale_game_frames(0xF0); } @@ -484,7 +484,7 @@ void woodcut_bot_update(WBMoby *m) { trooper_knockback_arc(v, &angle, &d->recoil_horizontal_step, &one); m->rot[2] = fast_add_rotations(3.1415927f, angle); d->fB7 = 0x78; - trooper_anim_update(m, d->fB0); + start_hit_color_flash(m, d->fB0); d->t3C4 = scale_game_frames(0x1E); d->t3C2 = scale_game_frames(0xB4); d->t3C6 = scale_game_frames(0xF0); @@ -967,7 +967,7 @@ void woodcut_bot_update(WBMoby *m) { { float recoil_scratch[16]; - trooper_anim_finish(m, d->fB0); + update_hit_color_flash(m, d->fB0); if (d->recoil_horizontal_step > 0.0f) { struct Hero *h = &hero; diff --git a/src/overlays/l05/mobys/extermibot.c b/src/overlays/l05/mobys/extermibot.c index 75cce4e482..4c247a36e4 100644 --- a/src/overlays/l05/mobys/extermibot.c +++ b/src/overlays/l05/mobys/extermibot.c @@ -728,8 +728,8 @@ extern void trooper_knockback_arc(void *, float *, float *, float *) __asm__("FU extern void trooper_start_knockback(void *, void *, float, int, int, int) __asm__("FUN_L00_0025c558"); extern void stop_animation_l08(void *, int, int) __asm__("FUN_L00_00257470"); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, short *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d538"); extern int activate_effect_l08(float, void *, void *, int, int, int *, int) __asm__("FUN_L00_0025ff38"); extern float func_001F9B88_3047E8(float) __asm__("FUN_001f99c0"); @@ -868,10 +868,10 @@ void handle_extermibot_hits_and_update_targeting(Moby *moby) { } break; } - trooper_anim_update(moby, moby_data->f60); + start_hit_color_flash(moby, moby_data->f60); } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, moby_data->f60); + update_hit_color_flash(moby, moby_data->f60); if (moby_data->targeting_range_boost_pending != 0) { moby_data->targeting_range_boost_timer = truncate_float_to_s32(scale_time(random_float_between(180.0f, 240.0f))); diff --git a/src/overlays/l05/mobys/extermitank.c b/src/overlays/l05/mobys/extermitank.c index 1e79878e18..971a1f962c 100644 --- a/src/overlays/l05/mobys/extermitank.c +++ b/src/overlays/l05/mobys/extermitank.c @@ -529,10 +529,10 @@ extern void spawn_explosion(void *, int) __asm__("FUN_L00_0025e450"); extern void spawn_particle_305178(void *, int, void *, void *, int, int, float, void *, void *, void *) __asm__("FUN_L00_00263fd8"); -extern void update_motion_305178(void *, void *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); extern float fast_difference_between_rotations(float, float) __asm__("FUN_001fa688"); extern float fast_vec_length(void *) __asm__("FUN_001f9af0"); -extern void finish_motion_305178(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); int l05_extermitank_removal_base_frames __asm__("D_L05_00161B74") = 5; extern float extermitank_child_animation_speed_divisor_gp __asm__("D_L05_00161AF0") @@ -743,7 +743,7 @@ void handle_extermitank_hits_and_sync_children(char *moby) { } } update_motion: - update_motion_305178(moby, extermitank_hit_sync_vars->motion); + start_hit_color_flash(moby, extermitank_hit_sync_vars->motion); mark_children: ((unsigned char *)moby)[0xa4] = 0xff; if (extermitank_hit_sync_vars->tread_moby0 != 0) @@ -790,7 +790,7 @@ void handle_extermitank_hits_and_sync_children(char *moby) { qcopy(second + 0x40, moby + 0x40); qcopy(second + 0x10, moby + 0x10); } - finish_motion_305178(moby, extermitank_hit_sync_vars->motion); + update_hit_color_flash(moby, extermitank_hit_sync_vars->motion); } /* Drops stale entries from the moby's 8 slots, then pushes each remaining one away from the hero. */ /* Ported from rac1-decomp (src/overlays/l05_rilgar/vendor_002D28D0.c: func_L05_00306CF0), where it is exact; names translated to the US level program. */ diff --git a/src/overlays/l06/mobys/alien_queen.c b/src/overlays/l06/mobys/alien_queen.c index a471c17fb2..99ac89941b 100644 --- a/src/overlays/l06/mobys/alien_queen.c +++ b/src/overlays/l06/mobys/alien_queen.c @@ -121,10 +121,10 @@ extern float approach_angle(float *, float, float *, float, float, float) __asm__("FUN_L00_0025be00"); extern int resolve_moby_hit_response() __asm__("FUN_00213928"); -void trooper_anim_update(void *a, void *s) __asm__("FUN_L00_0025d458"); +void start_hit_color_flash(void *a, void *s) __asm__("FUN_L00_0025d458"); extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN_00213928"); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); /* Alien queen update: wakes, rises, circles and chases the hero, attacks with probes and dies through its states. */ /* Ported from rac1-decomp (src/overlays/l06_blarg/vendor_002B5990.c: func_L06_002FAE58), where it is exact; names translated to the US level program. */ @@ -908,10 +908,10 @@ void update_alien_queen_hit_response_and_recovery(char *moby) { } } hit_response_done: - trooper_anim_update(moby, &alien_queen_hit_recovery_vars->anim_state); + start_hit_color_flash(moby, &alien_queen_hit_recovery_vars->anim_state); } MOBY(moby)->hit_slot = 0xFF; - trooper_anim_finish(moby, &alien_queen_hit_recovery_vars->anim_state); + update_hit_color_flash(moby, &alien_queen_hit_recovery_vars->anim_state); if ((alien_queen_hit_recovery_vars->death_control_flags & 2) && (unsigned char)moby[0x20] != 15) { if (alien_queen_hit_recovery_vars->animation_update != -1) { diff --git a/src/overlays/l06/mobys/alien_snapper.c b/src/overlays/l06/mobys/alien_snapper.c index 93ce169bf7..43afaccf11 100644 --- a/src/overlays/l06/mobys/alien_snapper.c +++ b/src/overlays/l06/mobys/alien_snapper.c @@ -247,7 +247,7 @@ int l06_alien_snapper_glow_gray_color __asm__("D_L06_00161EE8") = 0x80808080; int l06_alien_snapper_glow_tinted_color __asm__("D_L06_00161EEC") = 0x80604040; extern int resolve_moby_hit_response() __asm__("FUN_00213928"); -void trooper_anim_update(void *a, void *s) __asm__("FUN_L00_0025d458"); +void start_hit_color_flash(void *a, void *s) __asm__("FUN_L00_0025d458"); extern float func_001F9878_2FA618(float) __asm__("FUN_001f96b0"); extern Target *func_L00_0025B478_2FA618(void *, int, int) __asm__("FUN_L00_0025a420"); extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN_00213928"); @@ -255,8 +255,8 @@ extern void func_L06_002FAAC8_2FA618(void *) __asm__("FUN_L06_002f9698"); extern void func_L00_0025D5B0_2FA618(void *, void *, int, int, int, float) __asm__("FUN_L00_0025c558"); extern void mark_moby_for_removal_cf(void *, int, int) __asm__("FUN_L00_00257470"); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void func_L00_0025A8E8_2FA618( void *, float, void *, int, float, float, int, int, int) __asm__("FUN_L00_002598b0"); extern int func_001FA8A8_2FA618(int, int, float) __asm__("FUN_001fa6e0"); @@ -851,11 +851,11 @@ void update_alien_snapper_hit_response_and_targeting(Moby *moby) { case REACTION_NO_RESPONSE: break; } - trooper_anim_update(moby, snapper_vars->f60); + start_hit_color_flash(moby, snapper_vars->f60); } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, snapper_vars->f60); + update_hit_color_flash(moby, snapper_vars->f60); switch (moby->state) { case SNAPPER_APPROACH_TARGET: case SNAPPER_REPOSITION_AROUND_TARGET: diff --git a/src/overlays/l07/mobys/bombomatic.c b/src/overlays/l07/mobys/bombomatic.c index 1bbac21c5b..233a747560 100644 --- a/src/overlays/l07/mobys/bombomatic.c +++ b/src/overlays/l07/mobys/bombomatic.c @@ -27,8 +27,8 @@ extern char debris_far_point[] __asm__("D_L07_00166E40"); extern int allocate_voice_for_target_entry(int, int, void *) __asm__("FUN_0022da68"); extern void mark_moby_for_removal(void *) __asm__("FUN_0020c828"); extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float *, int, int); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void spawn_explosion(void *, void *, void *, @@ -327,11 +327,11 @@ void bombomatic_update(char *moby) { *(float *)health_ptr = tv; moby_data->hit_transition_target = 0xFA; moby_data->unk26 = scale_game_frames(60); - trooper_anim_update(moby, &moby_data->anim_state); + start_hit_color_flash(moby, &moby_data->anim_state); } eb20: ((unsigned char *)moby)[0xA4] = 0xFF; - trooper_anim_finish(moby, &moby_data->anim_state); + update_hit_color_flash(moby, &moby_data->anim_state); get_target_sight(moby, target_buffer, 20.0f); switch (((unsigned char *)moby)[0x20]) { case BOMBOMATIC_INITIALIZE: { diff --git a/src/overlays/l07/mobys/machinegun_turret.c b/src/overlays/l07/mobys/machinegun_turret.c index 43906f33a2..3b6fe98117 100644 --- a/src/overlays/l07/mobys/machinegun_turret.c +++ b/src/overlays/l07/mobys/machinegun_turret.c @@ -14,8 +14,8 @@ extern int resolve_moby_hit_response(void *, void *, void *, int, int *, int, int, int) __asm__("FUN_00213928"); extern void FUN_L00_00257470(void *, int, int); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void FUN_00212f90(void *, int, int, int); extern int FUN_0022da68(int, int, void *); extern float D_0015ED6C; @@ -99,14 +99,14 @@ void machinegun_turret_update(unsigned char *moby) { MOBY(moby)->flags &= 0xefff; turret_instance_vars->hit_flash_target_red = 0xfa; turret_instance_vars->unk26 = scale_game_frames(60); - trooper_anim_update(moby, animation); + start_hit_color_flash(moby, animation); turret_instance_vars->fire_timer = scale_game_frames(60); if ((u8)MOBY(moby)->prev_seq != 2) FUN_00212f90(moby, 2, 0, 5); MOBY(moby)->state = TURRET_HIT_SPIN; } MOBY(moby)->hit_slot = 0xff; - trooper_anim_finish(moby, animation); + update_hit_color_flash(moby, animation); switch ((u8)MOBY(moby)->state) { case TURRET_INITIALIZE: if (turret_instance_vars->sweep_start_moby != -1) { diff --git a/src/overlays/l07/mobys/mine_group.c b/src/overlays/l07/mobys/mine_group.c index 67b58e1880..7c3a22645b 100644 --- a/src/overlays/l07/mobys/mine_group.c +++ b/src/overlays/l07/mobys/mine_group.c @@ -60,8 +60,8 @@ extern int sample_path(void *path, extern int select_point_index_by_distance(void *, void *, float) __asm__("FUN_L01_0028b510"); extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float *, int, int); extern void jet_animate(void *, float) __asm__("FUN_L00_00259fe8"); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void spawn_explosion(void *, void *, void *, @@ -297,11 +297,11 @@ void mine_group_update(struct Moby *moby) { *remaining -= step; boltcrate_pvars->unk67 = 0xfa; boltcrate_pvars->surviving_hit_frame_count = scale_game_frames(0x3c); - trooper_anim_update(moby, &boltcrate_pvars->anim_state); + start_hit_color_flash(moby, &boltcrate_pvars->anim_state); } moby->hit_slot = 0xff; } - trooper_anim_finish(moby, &boltcrate_pvars->anim_state); + update_hit_color_flash(moby, &boltcrate_pvars->anim_state); if (boltcrate_pvars->unk70 == -1) return; path = D_L07_001B0530[boltcrate_pvars->unk70]; diff --git a/src/overlays/l07/mobys/sharkigator.c b/src/overlays/l07/mobys/sharkigator.c index b866540013..028163da07 100644 --- a/src/overlays/l07/mobys/sharkigator.c +++ b/src/overlays/l07/mobys/sharkigator.c @@ -90,8 +90,8 @@ extern int is_point_inside_clip_volume(void *, int) __asm__("FUN_00214720"); extern char *find_moby_hit(void *, int, int) __asm__("FUN_L00_0025a420"); extern int get_first_moby_in_group(int *, int, int, int) __asm__("FUN_L00_002591d0"); extern int get_next_moby_in_group(int *, int, int, int) __asm__("FUN_L00_002592b8"); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void spawn_explosion(void *, void *, void *, @@ -460,13 +460,13 @@ void handle_sharkigator_hit(struct Moby *moby, char *x, float *hp) { start_sharkigator_death_knockback(moby, x + 0x70, hit_record + 0x10); FUN_L00_00257470(moby, 0, -1); x[0x67] = 0x78; - trooper_anim_update(moby, (short *)(x + 0x60)); + start_hit_color_flash(moby, (short *)(x + 0x60)); moby->state = SHARKIGATOR_DEATH_FALL_AND_REMOVE; } else { *hp -= *(float *)(hit_record + 0x2C); ((unsigned char *)x)[0x67] = 0xFA; *(short *)(x + 0x26) = scale_game_frames(0x3C); - trooper_anim_update(moby, (short *)(x + 0x60)); + start_hit_color_flash(moby, (short *)(x + 0x60)); } } } @@ -799,7 +799,7 @@ void sharkigator_update(unsigned char *moby) { get_target_sight(moby, &target, 30.0f); handle_sharkigator_hit( (char *)moby, sharkigator_instance_vars, (float *)(sharkigator_instance_vars + 0x20)); - trooper_anim_finish(moby, sharkigator_instance_vars + 0x60); + update_hit_color_flash(moby, sharkigator_instance_vars + 0x60); wander = fast_dec_timer((int *)(sharkigator_instance_vars + 0x134)) != 0; if (*(int *)(sharkigator_instance_vars + 0x110) != 0 && moby[0x20] >= 7) { char *path = *(char **)(sharkigator_instance_vars + 0x148); diff --git a/src/overlays/l07/mobys/snagglebeast.c b/src/overlays/l07/mobys/snagglebeast.c index 9f411e3fe5..bdb95eb341 100644 --- a/src/overlays/l07/mobys/snagglebeast.c +++ b/src/overlays/l07/mobys/snagglebeast.c @@ -446,8 +446,8 @@ void *collect_snagglebeast_navigation_ids(void *unused, void *dp, void *op) { extern int resolve_moby_hit_response(void *, void *, void *, int, int *, int, int, int) __asm__("FUN_00213928"); extern void FUN_L00_00257470(void *, int, int); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void FUN_00212f90(void *, int, int, int); extern void hero_set_state(int, int) __asm__("FUN_L00_002223f8"); extern void FUN_L00_00200228(float, void *); @@ -521,7 +521,7 @@ void process_snagglebeast_damage(char *moby, MOBY(moby)->flags &= 0xefff; FUN_L00_00257470(moby, 0, -1); snagglebeast_instance_vars->damage_flash = 0x78; - trooper_anim_update(moby, &snagglebeast_instance_vars->move); + start_hit_color_flash(moby, &snagglebeast_instance_vars->move); if ((u8)moby[0x53] != 2) FUN_00212f90(moby, 2, 0, random_int_between(10, 13)); if (camera_secondary_mode_lui == 0x78) @@ -549,7 +549,7 @@ void process_snagglebeast_damage(char *moby, *health -= *(float *)(hit + 0x2c); snagglebeast_instance_vars->damage_flash = 0xfa; snagglebeast_instance_vars->unk26 = scale_game_frames(0); - trooper_anim_update(moby, &snagglebeast_instance_vars->move); + start_hit_color_flash(moby, &snagglebeast_instance_vars->move); if ((u8)moby[0x20] < 10 && *health < scratch.threshold) { int slot; if (camera_secondary_mode_lui == 0x78) @@ -589,7 +589,7 @@ void process_snagglebeast_damage(char *moby, snagglebeast_instance_vars->sphere_shade = 0; MOBY(moby)->hit_slot = 0xff; } - trooper_anim_finish(moby, &snagglebeast_instance_vars->move); + update_hit_color_flash(moby, &snagglebeast_instance_vars->move); output = snagglebeast_instance_vars->damage_reaction_amount + 0.3f; snagglebeast_instance_vars->damage_reaction_amount = output; if (output > 0.0f) @@ -1861,7 +1861,7 @@ void snagglebeast_update(unsigned char *moby) { snagglebeast_instance_state->substate -= 1; *health -= 1.0f; snagglebeast_instance_state->damage_flash = 0xFA; - trooper_anim_update(moby, &snagglebeast_instance_state->move); + start_hit_color_flash(moby, &snagglebeast_instance_state->move); if (*health <= 0.0f) { *health = 0.0f; if (MOBY(moby)->prev_seq != 8) diff --git a/src/overlays/l08/mobys/blarg_bombthrower.c b/src/overlays/l08/mobys/blarg_bombthrower.c index 2c7cacdbd9..19232a214b 100644 --- a/src/overlays/l08/mobys/blarg_bombthrower.c +++ b/src/overlays/l08/mobys/blarg_bombthrower.c @@ -29,8 +29,8 @@ extern void update_entity(void *) __asm__("FUN_L00_00250df8"); char *spawn_bomb_with_velocity(int source_moby, char *spawn_position, char *initial_velocity) __asm__("FUN_L08_002d22e0"); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern s32 D_001413D0[]; extern short *D_L08_001AC040[]; @@ -298,7 +298,7 @@ void blarg_bombthrower_update(struct Moby *moby) { moby->flags &= 0xEFFF; bombthrower_vars->waypoint->command = 0; } - trooper_anim_update(moby, bombthrower_vars->anim); + start_hit_color_flash(moby, bombthrower_vars->anim); } moby->hit_slot = 0xFF; search.result = select_nearest_xy_moby_with_hero_fallback(moby, 16.0f, &search); @@ -552,6 +552,6 @@ void blarg_bombthrower_update(struct Moby *moby) { } break; } - trooper_anim_finish(moby, bombthrower_vars->anim); + update_hit_color_flash(moby, bombthrower_vars->anim); bombthrower_vars->alternate_throw_trigger = 0; } diff --git a/src/overlays/l08/mobys/bolt_thief.c b/src/overlays/l08/mobys/bolt_thief.c index ee0181c90f..846f3a5a68 100644 --- a/src/overlays/l08/mobys/bolt_thief.c +++ b/src/overlays/l08/mobys/bolt_thief.c @@ -42,7 +42,7 @@ extern void FUN_L00_0025a120(struct Moby *); extern void trooper_start_knockback(struct Moby *, void *, float, int, int, int) __asm__("FUN_L00_0025c558"); extern void FUN_L00_00257470(struct Moby *, int, int); -extern void trooper_anim_finish(struct Moby *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d538"); extern void FUN_L00_0025f730(void *, float); extern int find_listed_moby_by_data_id(struct Moby *) __asm__("FUN_L00_0025f878"); extern void @@ -375,5 +375,5 @@ void bolt_thief_update(struct Moby *moby) { } break; } - trooper_anim_finish(moby, bolt_thief_instance_vars->x60); + update_hit_color_flash(moby, bolt_thief_instance_vars->x60); } diff --git a/src/overlays/l08/mobys/bomb.c b/src/overlays/l08/mobys/bomb.c index 5572e6258a..456dc865f2 100644 --- a/src/overlays/l08/mobys/bomb.c +++ b/src/overlays/l08/mobys/bomb.c @@ -56,8 +56,8 @@ extern int collect_mobies_in_sphere(void *, float, int, void *, void *) __asm__( float bomb_downward_acceleration_gp __asm__("D_L08_00161860") = 15.0f; extern void FUN_L00_001ff660_c(void *, void *, void *) __asm__("FUN_L00_001ff660"); extern void jet_animate(void *, float) __asm__("FUN_L00_00259fe8"); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void spawn_explosion(void *, void *, void *, @@ -244,9 +244,9 @@ void moby_248_update(char *moby) { bomb_vars->timer_20 == scale_game_frames(0x28) || bomb_vars->timer_20 == scale_game_frames(0x14)) { bomb_vars->fuse_flash_target_red = 0xFA; - trooper_anim_update(moby, (short *)bomb_vars); + start_hit_color_flash(moby, (short *)bomb_vars); } - trooper_anim_finish(moby, bomb_vars); + update_hit_color_flash(moby, bomb_vars); break; case BOMB_STATE_EXPLODE_AND_REMOVE: allocate_voice_for_target_entry(0, 0, moby); diff --git a/src/overlays/l08/mobys/bomber_tank.c b/src/overlays/l08/mobys/bomber_tank.c index a2c0816e5b..c4bc379565 100644 --- a/src/overlays/l08/mobys/bomber_tank.c +++ b/src/overlays/l08/mobys/bomber_tank.c @@ -53,8 +53,8 @@ extern void mark_moby_for_removal(void *) __asm__("func_0020C828"); extern char *create_moby(int); extern void update_entity(void *) __asm__("FUN_L00_00250df8"); extern float D_0015ED6C MACRO_ADDR; -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void spawn_explosion(void *, void *, void *, @@ -654,7 +654,7 @@ void update_bomber_tank_damage_and_aim(Moby *moby) { return; } } - trooper_anim_update(moby, &bomber_tank_damage_and_aim_vars->anim0); + start_hit_color_flash(moby, &bomber_tank_damage_and_aim_vars->anim0); } moby->hit_slot = 0xFF; @@ -724,18 +724,18 @@ void update_bomber_tank_damage_and_aim(Moby *moby) { { short saved_anim0 = bomber_tank_damage_and_aim_vars->anim0; short saved_anim2 = bomber_tank_damage_and_aim_vars->anim2; - trooper_anim_finish(moby, &bomber_tank_damage_and_aim_vars->anim0); + update_hit_color_flash(moby, &bomber_tank_damage_and_aim_vars->anim0); if (bomber_tank_damage_and_aim_vars->partA != 0) { bomber_tank_damage_and_aim_vars->anim0 = saved_anim0; bomber_tank_damage_and_aim_vars->anim2 = saved_anim2; - trooper_anim_finish(bomber_tank_damage_and_aim_vars->partA, - &bomber_tank_damage_and_aim_vars->anim0); + update_hit_color_flash(bomber_tank_damage_and_aim_vars->partA, + &bomber_tank_damage_and_aim_vars->anim0); } if (bomber_tank_damage_and_aim_vars->partB != 0) { bomber_tank_damage_and_aim_vars->anim0 = saved_anim0; bomber_tank_damage_and_aim_vars->anim2 = saved_anim2; - trooper_anim_finish(bomber_tank_damage_and_aim_vars->partB, - &bomber_tank_damage_and_aim_vars->anim0); + update_hit_color_flash(bomber_tank_damage_and_aim_vars->partB, + &bomber_tank_damage_and_aim_vars->anim0); } } } diff --git a/src/overlays/l09/mobys/destructible_prop.c b/src/overlays/l09/mobys/destructible_prop.c index 8bba0dd6b1..c001b137b5 100644 --- a/src/overlays/l09/mobys/destructible_prop.c +++ b/src/overlays/l09/mobys/destructible_prop.c @@ -23,7 +23,7 @@ typedef struct { extern char * spawn_destructible_prop_wreck(char *owner, void *position, float angle) __asm__("FUN_L09_002ee380"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); void destructible_prop_update(struct Moby *moby) __asm__("FUN_L09_002ee110"); typedef unsigned int u128_ee380 __attribute__((mode(TI))); @@ -43,7 +43,7 @@ void destructible_prop_update(struct Moby *moby) { *(float *)moby_vars_or_random_frames - *(float *)(hit_record + 0x2C); if (0.0f < *(float *)moby_vars_or_random_frames) { moby_vars_or_random_frames[0x47] = 0x46; - trooper_anim_update(moby, (short *)(moby_vars_or_random_frames + 0x40)); + start_hit_color_flash(moby, (short *)(moby_vars_or_random_frames + 0x40)); } else { char *pos = &moby->pos; v.x = fast_cos(moby->rot.z) * (frame_time * 20.0f); diff --git a/src/overlays/l09/mobys/refueling_station.c b/src/overlays/l09/mobys/refueling_station.c index cc6b732f79..2a7de73637 100644 --- a/src/overlays/l09/mobys/refueling_station.c +++ b/src/overlays/l09/mobys/refueling_station.c @@ -42,8 +42,8 @@ extern void debug_print(char *, s32, s32) __asm__("FUN_001e93b0"); extern s32 resolve_moby_hit_response( struct Moby *, VendorHitSource *, f32 *, s32, s32 *, s32, s32, s32) __asm__("FUN_00213928"); extern void FUN_L00_00257470(struct Moby *, s32, s32); -extern void trooper_anim_update(struct Moby *, u8 *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(struct Moby *, u8 *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(struct Moby *, u8 *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(struct Moby *, u8 *) __asm__("FUN_L00_0025d538"); void handle_refueling_station_damage(struct Moby *moby, VendorVars *vars, f32 *health) __asm__("FUN_L09_00303b30"); @@ -148,18 +148,18 @@ void handle_refueling_station_damage(struct Moby *moby, } FUN_L00_00257470(moby, 0, -1); refueling_station_vars->anim[7] = 0x78; - trooper_anim_update(moby, refueling_station_vars->anim); + start_hit_color_flash(moby, refueling_station_vars->anim); moby->state = REFUELING_STATION_STATE_EXPLODE; } else { *health -= damage_hit_record->damage; refueling_station_vars->anim[7] = 0xFA; refueling_station_vars->hurt_timer = scale_game_frames(60); - trooper_anim_update(moby, refueling_station_vars->anim); + start_hit_color_flash(moby, refueling_station_vars->anim); } } moby->hit_slot = 0xFF; } - trooper_anim_finish(moby, refueling_station_vars->anim); + update_hit_color_flash(moby, refueling_station_vars->anim); } typedef struct RefuelingStationVars { diff --git a/src/overlays/l10/mobys/blarg_ship.c b/src/overlays/l10/mobys/blarg_ship.c index b114e7db53..de9d401a6d 100644 --- a/src/overlays/l10/mobys/blarg_ship.c +++ b/src/overlays/l10/mobys/blarg_ship.c @@ -40,15 +40,15 @@ enum { typedef struct Moby Moby; extern float D_0015ED6C; extern float D_0015ED6C, D_0015ED70; -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void FUN_L00_0024f7c8(void *, int, void *); s32 is_value_within_interpolated_window(void *anim, f32 value) __asm__("FUN_00214cc8"); extern float FUN_L04_001f1978(float); extern int resolve_moby_hit_response() __asm__("FUN_00213928"); extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN_00213928"); -extern void trooper_anim_update(void *m, void *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, void *p) __asm__("FUN_L00_0025d458"); extern char D_L10_00167240[]; @@ -555,11 +555,11 @@ void update_blarg_ship_hit_reactions_and_targeting(struct Moby *moby) { case COLOR_UPDATE_WITHOUT_STATE_CHANGE_HIT_RESPONSE: case COLOR_EFFECT_ONLY_HIT_RESPONSE: pvars->damage_secondary_red = 0xFA; - trooper_anim_update(moby, &pvars->anim_state); + start_hit_color_flash(moby, &pvars->anim_state); break; case LETHAL_HIT_RESPONSE: pvars->damage_secondary_red = 0xFA; - trooper_anim_update(moby, &pvars->anim_state); + start_hit_color_flash(moby, &pvars->anim_state); moby->state = BLARG_SHIP_STATE_EXPLODE; break; case NO_REACTION_HIT_RESPONSE: @@ -567,7 +567,7 @@ void update_blarg_ship_hit_reactions_and_targeting(struct Moby *moby) { default: pvars->damage_secondary_red = 0xFA; pvars->unk26 = scale_game_frames(0x3C); - trooper_anim_update(moby, &pvars->anim_state); + start_hit_color_flash(moby, &pvars->anim_state); blend_moby_animation(moby, 4, 0, scale_game_frames(6)); moby->command = moby->state; moby->state = BLARG_SHIP_STATE_HIT_REACTION; @@ -575,7 +575,7 @@ void update_blarg_ship_hit_reactions_and_targeting(struct Moby *moby) { } } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, &pvars->anim_state); + update_hit_color_flash(moby, &pvars->anim_state); if (hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK) { select_hero_or_gadgebot_target(101.0f, moby, &pvars->target); if (*(char **)&pvars->target == 0) { diff --git a/src/overlays/l10/mobys/darter.c b/src/overlays/l10/mobys/darter.c index c85bcc30c7..70409d040d 100644 --- a/src/overlays/l10/mobys/darter.c +++ b/src/overlays/l10/mobys/darter.c @@ -65,8 +65,8 @@ extern int D_001413D0[]; extern float D_0015ED6C, D_0015ED70; extern void trooper_start_knockback(void *, void *, float, int, int, int) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void func_L00_00261B00_2E2B80(void *, int, int, int, int) __asm__("FUN_L00_00260a88"); extern int ahead_f(float, void *, void *) __asm__("FUN_L01_00274b78"); extern int @@ -657,7 +657,7 @@ typedef struct MobyData { extern int resolve_moby_hit_response() __asm__("FUN_00213928"); extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN_00213928"); extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); -extern void trooper_anim_update(void *m, void *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, void *p) __asm__("FUN_L00_0025d458"); #include "rnc/data_labels.h" @@ -711,18 +711,18 @@ void update_darter_hit_reactions_and_targeting(struct Moby *moby) { trooper_start_knockback( moby, &class_1199_vars->knockback, knockback_angle, 4, 1, 0); class_1199_vars->hit_flash.flash_red = 0x78; - trooper_anim_update(moby, &class_1199_vars->hit_flash); + start_hit_color_flash(moby, &class_1199_vars->hit_flash); func_L00_00261B00_2E2B80(moby, 1, 3, 0, -1); } else { class_1199_vars->health = class_1199_vars->health - hit_record->damage; class_1199_vars->hit_flash.flash_red = 0xFA; class_1199_vars->nonlethal_hit_duration_frames = scale_game_frames(60); - trooper_anim_update(moby, &class_1199_vars->hit_flash); + start_hit_color_flash(moby, &class_1199_vars->hit_flash); } } moby->hit_slot = 0xFF; } - trooper_anim_finish(moby, &class_1199_vars->hit_flash); + update_hit_color_flash(moby, &class_1199_vars->hit_flash); if (class_1199_vars->f174 == 2) { class_1199_vars->current_target_range = 42.0f; } else if (class_1199_vars->target_range_boost_timer != 0) { diff --git a/src/overlays/l10/mobys/screamer.c b/src/overlays/l10/mobys/screamer.c index 95378def2c..4fe2d709b7 100644 --- a/src/overlays/l10/mobys/screamer.c +++ b/src/overlays/l10/mobys/screamer.c @@ -361,8 +361,8 @@ extern char D_0013F3D0[]; extern int D_001413D0[]; extern void trooper_start_knockback(void *, void *, float, int, int, int) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void func_L00_00261B00_2E2B80(void *, int, int, int, int) __asm__("FUN_L00_00260a88"); extern int ahead_f(float, void *, void *) __asm__("FUN_L01_00274b78"); extern int @@ -376,7 +376,7 @@ hit_update_2DFC38(void *, void *, void *, int, void *, int, int, int) __asm__("F extern void allocate_voice_for_bank_entry_2DFC38(int, int, int) __asm__("FUN_0022db10"); void update_screamer_hit_reactions_and_targeting(struct Moby *moby) __asm__("FUN_L10_002dfc38"); -extern void trooper_anim_update(void *m, void *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, void *p) __asm__("FUN_L00_0025d458"); #include "rnc/data_labels.h" @@ -427,18 +427,18 @@ void update_screamer_hit_reactions_and_targeting(struct Moby *moby) { fast_arc_tan(moby->pos.x - hit_record->x, moby->pos.y - hit_record->y); trooper_start_knockback(moby, &screamer_vars->knockback, knockback_angle, 5, 1, 0); screamer_vars->hit_flash.flash_red = 0x78; - trooper_anim_update(moby, &screamer_vars->hit_flash); + start_hit_color_flash(moby, &screamer_vars->hit_flash); func_L00_00261B00_2E2B80(moby, 1, 3, 0, -1); } else { screamer_vars->health = screamer_vars->health - hit_record->damage; screamer_vars->hit_flash.flash_red = 0xfa; screamer_vars->nonlethal_hit_duration_frames = scale_game_frames(60); - trooper_anim_update(moby, &screamer_vars->hit_flash); + start_hit_color_flash(moby, &screamer_vars->hit_flash); } moby->hit_slot = 0xff; } } - trooper_anim_finish(moby, &screamer_vars->hit_flash); + update_hit_color_flash(moby, &screamer_vars->hit_flash); if (screamer_vars->f174 == 2) screamer_vars->current_target_range = 42.0f; else if (screamer_vars->target_range_boost_timer != 0) diff --git a/src/overlays/l10/mobys/toxic_crab.c b/src/overlays/l10/mobys/toxic_crab.c index 88c483d638..faa09549cb 100644 --- a/src/overlays/l10/mobys/toxic_crab.c +++ b/src/overlays/l10/mobys/toxic_crab.c @@ -59,8 +59,8 @@ extern float D_0015ED70; extern void spawn_color_swapped_explosion_burst(void *, void *, int, float, float) __asm__("FUN_L00_0025f3e8"); extern float D_0015ED6C, D_0015ED70; -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern int activate_effect_l08(float, void *, void *, int, int, void *, int) __asm__("FUN_L00_0025ff38"); @@ -71,7 +71,7 @@ extern short *moby_group_member_lists[] __asm__("D_L10_001ABCC0"); extern float FUN_L04_001f1978(float); extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); -extern void trooper_anim_update(void *m, void *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, void *p) __asm__("FUN_L00_0025d458"); /* Update for the toxic crab (moby class 1202): line-of-sight test, then a 13-state walk/chase/attack/death machine. */ /* Ported from rac1-decomp (src/overlays/l10_orxon/vendor_002E30F8.c: func_L10_002E30F8), where it is exact; names translated to the US level program. */ @@ -217,7 +217,7 @@ collect_mobies_in_sphere(void *, float, int, void *, void *) __asm__("FUN_L00_00 extern void FUN_L00_00257470(void *, int, int); extern void FUN_L00_00258278(char *moby, float *vel, float target, float k, float d, float max); extern void FUN_L00_0025a120(void *); -extern void FUN_L00_0025d458(void *m, short *p); +extern void start_hit_color_flash(void *m, void *p) __asm__("FUN_L00_0025d458"); extern void FUN_L00_00263ac8(float, int, int, unsigned char *); extern void FUN_L01_0026d930(char *p); extern void trooper_set_knockback(float *p, float a, float b) __asm__("FUN_L03_00250a78"); @@ -826,7 +826,7 @@ void toxic_crab_update(Moby2E30F8 *m) { 0, fast_add_rotations(m->heading_radians, 3.1415927f)); crab_data->b67 = 0xFA; - FUN_L00_0025d458(m, (short *)crab_data->q60); + start_hit_color_flash(m, (short *)crab_data->q60); FUN_L00_00257470(m, 0, -1); break; } @@ -1208,7 +1208,7 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { &vA, &fx, &moby_data->knockback_xy_scale, &moby_data->knockback_z_scale); func_L00_0025D5B0_2E52B0(moby, moby_data->a70, 9, 1, 0, fx); moby_data->b67 = 0xFA; - trooper_anim_update(moby, moby_data->a60); + start_hit_color_flash(moby, moby_data->a60); break; case VEHICLE_SCALED_KNOCKBACK_HIT_RESPONSE: case VEHICLE_DEPENDENT_KNOCKBACK_HIT_RESPONSE: { @@ -1226,7 +1226,7 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { func_L00_0025D5B0_2E52B0( moby, moby_data->a70, 9, 1, 0, fast_arc_tan(hit_record->pos.x, hit_record->pos.y)); moby_data->b67 = 0xFA; - trooper_anim_update(moby, moby_data->a60); + start_hit_color_flash(moby, moby_data->a60); break; } case LETHAL_HIT_RESPONSE: @@ -1240,7 +1240,7 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { } } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, moby_data->a60); + update_hit_color_flash(moby, moby_data->a60); if ((unsigned char)(moby->state - 10) < 3) { moby_data->target_loss_frames = 0; return; diff --git a/src/overlays/l11/mobys/owner_linked_moby.c b/src/overlays/l11/mobys/owner_linked_moby.c index 0c5c3cb543..343c6c48b8 100644 --- a/src/overlays/l11/mobys/owner_linked_moby.c +++ b/src/overlays/l11/mobys/owner_linked_moby.c @@ -22,8 +22,8 @@ extern char *find_moby_hit(void *, int, int) __asm__("FUN_L00_0025a420"); extern int fptodp(float) __asm__("FUN_00120478"); extern void print_fe50(char *, int, int) __asm__("FUN_001e93b0"); extern int resolve_moby_hit_response(void *, void *, float *, int, int *, int, int, int) __asm__("FUN_00213928"); -extern void sound_fe50(void *, void *) __asm__("FUN_L00_0025d458"); -extern void update_fe50(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); char D_L11_0021B530[] = "Moby class %d Damage Received: %f\n"; void handle_owner_linked_moby_hits(struct Moby *moby, @@ -71,7 +71,7 @@ void handle_owner_linked_moby_hits(struct Moby *moby, unsigned char *private_dat *health = 0.0f; moby->flags &= 0xEFFF; private_data[0x67] = 0x78; - sound_fe50(moby, private_data + 0x60); + start_hit_color_flash(moby, private_data + 0x60); if (moby->prev_seq != 2) { blend_moby_animation(moby, 2, 0, 3); } @@ -84,7 +84,7 @@ void handle_owner_linked_moby_hits(struct Moby *moby, unsigned char *private_dat *health -= *(float *)(hit_record + 0x2C); private_data[0x67] = 0xFA; *(short *)(private_data + 0x26) = scale_game_frames(0x3C); - sound_fe50(moby, private_data + 0x60); + start_hit_color_flash(moby, private_data + 0x60); if (moby->prev_seq != 4) { blend_moby_animation(moby, 4, 0, 3); } @@ -92,7 +92,7 @@ void handle_owner_linked_moby_hits(struct Moby *moby, unsigned char *private_dat } moby->hit_slot = 0xFF; } - update_fe50(moby, private_data + 0x60); + update_hit_color_flash(moby, private_data + 0x60); } void owner_linked_moby_update(struct Moby *moby) __asm__("FUN_L11_00310028"); diff --git a/src/overlays/l11/mobys/psytcopus.c b/src/overlays/l11/mobys/psytcopus.c index 084163b10a..277dbc2739 100644 --- a/src/overlays/l11/mobys/psytcopus.c +++ b/src/overlays/l11/mobys/psytcopus.c @@ -96,8 +96,8 @@ extern void FUN_L00_0025ab48_p(void *, float *, float *, float *) __asm__("FUN_L extern void FUN_L00_0025c558_p(struct Moby *, void *, int, int, int, float) __asm__("FUN_L00_0025c558"); extern void FUN_L00_002371e0_p(void *) __asm__("FUN_L00_002371e0"); -extern void FUN_L00_0025d458_p(struct Moby *, void *) __asm__("FUN_L00_0025d458"); -extern void FUN_L00_0025d538_p(struct Moby *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d538"); extern int FUN_L00_0025ff38_p(struct Moby *, void *, int, int, void *, int, float) __asm__("FUN_L00_0025ff38"); @@ -372,10 +372,10 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { FUN_L00_00257470_p(psytcopus, 0, -1); break; } - FUN_L00_0025d458_p(psytcopus, psytcopus_vars->move); + start_hit_color_flash(psytcopus, psytcopus_vars->move); } psytcopus->hit_slot = 0xFF; - FUN_L00_0025d538_p(psytcopus, psytcopus_vars->move); + update_hit_color_flash(psytcopus, psytcopus_vars->move); psytcopus_vars->reach = 24.0f; path = (s32 *)l11_paths[psytcopus_vars->path_index]; if (FUN_L00_0025ff38_p( diff --git a/src/overlays/l11/mobys/puffoid.c b/src/overlays/l11/mobys/puffoid.c index 4119277e4e..e9220e33a4 100644 --- a/src/overlays/l11/mobys/puffoid.c +++ b/src/overlays/l11/mobys/puffoid.c @@ -687,7 +687,7 @@ struct L11PatrolVars { u8 pad24[0x14]; s32 retimer; /* 0x38: nonzero restarts the timer at 0x244 */ u8 pad3C[0xD4]; - u8 move[7]; /* 0x110: movement state (trooper_anim_update / trooper_anim_finish) */ + u8 move[7]; /* 0x110: movement state (start_hit_color_flash / update_hit_color_flash) */ u8 hit_flash_red_target; /* 0x117 */ u8 pad118[8]; struct KnockbackMotion knockback; /* 0x120 */ @@ -721,8 +721,8 @@ extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_ extern void trooper_start_knockback(void *, void *, s32, s32, s32, float) __asm__("FUN_L00_0025c558"); extern void FUN_L00_00257470(void *, s32, s32); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void FUN_00212f90(void *, s32, s32, s32); extern float scale_time(float) __asm__("FUN_001f96b0"); extern s32 FUN_L00_0025ff38(void *, void *, s32, s32, void *, s32, float); @@ -868,11 +868,11 @@ void update_puffoid_damage_and_path_goal(struct Moby *moby) { case HIT_RESPONSE_COOLDOWN_NO_KNOCKBACK: break; } - trooper_anim_update(moby, patrol_vars->move); + start_hit_color_flash(moby, patrol_vars->move); } } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, patrol_vars->move); + update_hit_color_flash(moby, patrol_vars->move); if (patrol_vars->timer != 0) { if (moby->state == PUFFOID_STATE_IDLE || (moby->state == PUFFOID_STATE_WANDER_NEAR_HOME && (moby->anim_flags & 2))) { diff --git a/src/overlays/l12/mobys/blarg_helicopter.c b/src/overlays/l12/mobys/blarg_helicopter.c index 72f318cc34..d25b99ff78 100644 --- a/src/overlays/l12/mobys/blarg_helicopter.c +++ b/src/overlays/l12/mobys/blarg_helicopter.c @@ -634,8 +634,8 @@ int follow_blarg_helicopter_path(struct Moby *moby, int path_index) { extern char *find_moby_hit(void *, int, int) __asm__("FUN_L00_0025a420"); extern int hit_reaction(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN_L00_0025a478"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); void process_blarg_helicopter_hits(struct Moby *moby) { enum { @@ -666,7 +666,7 @@ void process_blarg_helicopter_hits(struct Moby *moby) { moby->state = BLARG_HELICOPTER_EXPLODE_AND_REMOVE_OR_RESET; } else if (hit_reaction_code != 0xB) { blarg_helicopter_hit_vars->hit_flash_target_red = 0xB4; - trooper_anim_update(moby, (short *)&blarg_helicopter_hit_vars->anim_state); + start_hit_color_flash(moby, (short *)&blarg_helicopter_hit_vars->anim_state); if (*(float *)(hit_record + 0x1C) == 5627.925f && moby->state != BLARG_HELICOPTER_KNOCKBACK) { hit_to_moby_angle = fast_arc_tan(moby->pos.x - *(float *)(hit_record + 0), @@ -691,5 +691,5 @@ void process_blarg_helicopter_hits(struct Moby *moby) { } } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, &blarg_helicopter_hit_vars->anim_state); + update_hit_color_flash(moby, &blarg_helicopter_hit_vars->anim_state); } diff --git a/src/overlays/l12/mobys/blarg_trooper.c b/src/overlays/l12/mobys/blarg_trooper.c index db095378f9..267e7193f1 100644 --- a/src/overlays/l12/mobys/blarg_trooper.c +++ b/src/overlays/l12/mobys/blarg_trooper.c @@ -562,8 +562,8 @@ typedef struct { extern BlargTrooperHit *find_hit_e81e0(struct Moby *, s32, s32) __asm__("FUN_L00_0025a420"); extern void start_fall_e81e0(struct Moby *, void *, s32, s32, s32, f32) __asm__("FUN_L00_0025c558"); -extern void anim_reset_e81e0(struct Moby *, void *) __asm__("FUN_L00_0025d458"); -extern void anim_update_e81e0(struct Moby *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d538"); /* Damage and alert step of the Hoven blarg trooper (cf. FUN_L12_002e3528): refreshes its speed while alerted, calls for help behind itself once its groups have 9 or @@ -650,7 +650,7 @@ void process_blarg_trooper_damage_and_alerts(struct Moby *moby) { trooper_damage_alert_vars->unkC4 = 19.0f; moby->state = BLARG_TROOPER_DEATH_FALL; trooper_damage_alert_vars->unk67 = 0x78; - anim_reset_e81e0(moby, trooper_damage_alert_vars->anim); + start_hit_color_flash(moby, trooper_damage_alert_vars->anim); } else { trooper_damage_alert_vars->unk88 = frame_time * 4.7f; trooper_damage_alert_vars->unk8C = frame_time * 7.7f; @@ -665,11 +665,11 @@ void process_blarg_trooper_damage_and_alerts(struct Moby *moby) { moby->state = BLARG_TROOPER_KNOCKBACK_RECOVERY; trooper_damage_alert_vars->unk67 = 0xFA; trooper_damage_alert_vars->stun_timer = scale_game_frames(0x3C); - anim_reset_e81e0(moby, trooper_damage_alert_vars->anim); + start_hit_color_flash(moby, trooper_damage_alert_vars->anim); } } moby->hit_slot = 0xFF; - anim_update_e81e0(moby, trooper_damage_alert_vars->anim); + update_hit_color_flash(moby, trooper_damage_alert_vars->anim); } /* Ported from rac1-decomp (src/overlays/l12_hoven/vendor_002C0310.c: func_L12_002E9988), where it is exact; names translated to the US level program. */ diff --git a/src/overlays/l12/mobys/hoven_anklebiter.c b/src/overlays/l12/mobys/hoven_anklebiter.c index 777e7e5b1e..7c4a76f23b 100644 --- a/src/overlays/l12/mobys/hoven_anklebiter.c +++ b/src/overlays/l12/mobys/hoven_anklebiter.c @@ -889,8 +889,8 @@ extern void resolve_moby_hit_response( struct Moby *, AnklebiterHit *, f32 *, s32, s32 *, f32 *, s32, s32) __asm__("FUN_00213928"); extern void trooper_knockback_arc(void *, f32 *, f32 *, f32 *) __asm__("FUN_L00_0025ab48"); extern void start_fall_e3528(struct Moby *, void *, s32, s32, s32, f32) __asm__("FUN_L00_0025c558"); -extern void anim_reset_e3528(struct Moby *, void *) __asm__("FUN_L00_0025d458"); -extern void anim_update_e3528(struct Moby *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d538"); #include "rnc/overlay/l12/mobys/hoven_anklebiter_data/process_hoven_anklebiter_damage_and_alerts.h" @@ -966,7 +966,7 @@ void process_hoven_anklebiter_damage_and_alerts(struct Moby *moby) { anklebiter_vars->knockback_descent_animation_target = 18.0f; moby->state = ANKLEBITER_DEATH_FALL; anklebiter_vars->damage_blend_target = 0x78; - anim_reset_e3528(moby, anklebiter_vars->anim); + start_hit_color_flash(moby, anklebiter_vars->anim); } else { help_direction_or_hit_position.q = coll->pos.q; trooper_knockback_arc(&help_direction_or_hit_position, @@ -979,11 +979,11 @@ void process_hoven_anklebiter_damage_and_alerts(struct Moby *moby) { moby->state = ANKLEBITER_KNOCKBACK_FALL; anklebiter_vars->damage_blend_target = 0xFA; anklebiter_vars->stun_timer = scale_game_frames(0x3C); - anim_reset_e3528(moby, anklebiter_vars->anim); + start_hit_color_flash(moby, anklebiter_vars->anim); } spawn_hoven_anklebiter_death_sparks(moby); } } moby->hit_slot = 0xFF; - anim_update_e3528(moby, anklebiter_vars->anim); + update_hit_color_flash(moby, anklebiter_vars->anim); } diff --git a/src/overlays/l13/mobys/blarg_gunner.c b/src/overlays/l13/mobys/blarg_gunner.c index 9886aedc2e..8da7b5cd5b 100644 --- a/src/overlays/l13/mobys/blarg_gunner.c +++ b/src/overlays/l13/mobys/blarg_gunner.c @@ -102,9 +102,9 @@ struct Moby *spawn_blarg_turret_child(struct Moby *parent) { extern int hit_reaction(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN_L00_0025a478"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); void blend_moby_animation(MobyAnim *m, int a, int b, int c) __asm__("FUN_00212f90"); @@ -175,7 +175,7 @@ void process_blarg_gunner_hits(struct Moby *moby, char *moby_vars) { } FUN_L00_00257470(moby, 0, -1); moby_vars[0x67] = 0x78; - trooper_anim_update(moby, (short *)(moby_vars + 0x60)); + start_hit_color_flash(moby, (short *)(moby_vars + 0x60)); if (moby->prev_seq != 3) blend_moby_animation(moby, 3, 1, 0); moby->state = BLARG_GUNNER_STATE_DESTROY; @@ -183,12 +183,12 @@ void process_blarg_gunner_hits(struct Moby *moby, char *moby_vars) { *tm = current_health - hit_damage; *(unsigned char *)(moby_vars + 0x67) = 0xFA; *(short *)(moby_vars + 0x26) = scale_game_frames(0x3C); - trooper_anim_update(moby, (short *)(moby_vars + 0x60)); + start_hit_color_flash(moby, (short *)(moby_vars + 0x60)); } } } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, moby_vars + 0x60); + update_hit_color_flash(moby, moby_vars + 0x60); } extern float D_L13_001670C0[]; diff --git a/src/overlays/l13/mobys/blarg_ship.c b/src/overlays/l13/mobys/blarg_ship.c index 9fec650888..1236e5be80 100644 --- a/src/overlays/l13/mobys/blarg_ship.c +++ b/src/overlays/l13/mobys/blarg_ship.c @@ -33,9 +33,9 @@ extern void spawn_explosion(void *, extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN_00213928"); -extern void trooper_anim_update(struct Moby *, void *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(struct Moby *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d538"); extern void FUN_0020c828(void *); @@ -83,11 +83,11 @@ void blarg_ship_update(struct Moby *moby) { } else { ((unsigned char *)blarg_ship_vars)[0x67] = 0xfa; *(float *)(blarg_ship_vars + 0x20) -= cost; - trooper_anim_update(moby, blarg_ship_vars + 0x60); + start_hit_color_flash(moby, blarg_ship_vars + 0x60); } moby->hit_slot = 0xff; } - trooper_anim_finish(moby, blarg_ship_vars + 0x60); + update_hit_color_flash(moby, blarg_ship_vars + 0x60); break; case BLARG_SHIP_EXPLODE: { void *pos; diff --git a/src/overlays/l13/mobys/blarg_space_commando.c b/src/overlays/l13/mobys/blarg_space_commando.c index 69571ae12f..af90ab122b 100644 --- a/src/overlays/l13/mobys/blarg_space_commando.c +++ b/src/overlays/l13/mobys/blarg_space_commando.c @@ -75,9 +75,9 @@ extern char D_L13_001670C0[]; extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN_00213928"); -extern void trooper_anim_update(struct Moby *, void *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(struct Moby *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d538"); typedef struct { u8 pad0[0x18]; @@ -703,10 +703,10 @@ void update_blarg_space_commando_damage_targeting_and_ground_motion(struct Moby stop_moby_sound_8d10(moby, 0, -1); break; } - trooper_anim_update(moby, blarg_space_commando_private_data->flash); + start_hit_color_flash(moby, blarg_space_commando_private_data->flash); } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, blarg_space_commando_private_data->flash); + update_hit_color_flash(moby, blarg_space_commando_private_data->flash); if (blarg_space_commando_private_data->pursuit_timer != 0) { blarg_space_commando_private_data->range = blarg_space_commando_private_data->far_range; } else { diff --git a/src/overlays/l13/mobys/blarg_space_fighter.c b/src/overlays/l13/mobys/blarg_space_fighter.c index eb07fc1d83..d06575801c 100644 --- a/src/overlays/l13/mobys/blarg_space_fighter.c +++ b/src/overlays/l13/mobys/blarg_space_fighter.c @@ -63,9 +63,9 @@ extern char D_00140940[]; extern float random_float_between(float, float) __asm__("FUN_002132a8"); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern char *D_L13_001B07B0[]; @@ -74,7 +74,7 @@ hit_reaction(void *, void *, void *, int, void *, void *, int, int) __asm__("FUN extern void random_vector(float *, float, float) __asm__("FUN_L00_00257d78"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); void process_blarg_space_fighter_damage(struct Moby *moby, unsigned char *moby_data, @@ -121,13 +121,13 @@ void process_blarg_space_fighter_damage(struct Moby *moby, unsigned char *moby_d *fp = 0; moby->flags &= 0xEFFF; moby_data[0x67] = 0x78; - trooper_anim_update(moby, (short *)(moby_data + 0x60)); + start_hit_color_flash(moby, (short *)(moby_data + 0x60)); moby->state = FIGHTER_EMIT_DESTRUCTION_EFFECTS; } else { *fp = *fp - *(float *)(hit_record + 0x2C); moby_data[0x67] = 0xFA; *(short *)(moby_data + 0x26) = scale_game_frames(0x3C); - trooper_anim_update(moby, (short *)(moby_data + 0x60)); + start_hit_color_flash(moby, (short *)(moby_data + 0x60)); fast_vec_normalize(hit_position_offset, hit_record + 0x10, 0.1f); fast_vec_add(&moby->pos, &moby->pos, hit_position_offset); random_vector(hit_position_offset, -0.1f, 0.1f); @@ -138,7 +138,7 @@ void process_blarg_space_fighter_damage(struct Moby *moby, unsigned char *moby_d moby->hit_slot = 0xFF; } } - trooper_anim_finish(moby, moby_data + 0x60); + update_hit_color_flash(moby, moby_data + 0x60); } extern float spring_turn(float *vel, float cur, float target, float k, float d, float max) __asm__("FUN_L00_00258110"); diff --git a/src/overlays/l13/mobys/forcefield_tower.c b/src/overlays/l13/mobys/forcefield_tower.c index 03e7798b3d..627544db10 100644 --- a/src/overlays/l13/mobys/forcefield_tower.c +++ b/src/overlays/l13/mobys/forcefield_tower.c @@ -40,11 +40,11 @@ extern float random_float_between(float, float) __asm__("FUN_002132a8"); extern void FUN_L00_00257470(struct Moby *, int, int); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); extern float D_L13_001670C0[]; @@ -316,7 +316,7 @@ void process_forcefield_tower_damage(struct Moby *moby, unsigned char *moby_data *(OvlQuad *)position = *(OvlQuad *)velocity; FUN_L00_00257470(moby, 0, -1); moby_data[0x67] = 0x78; - trooper_anim_update(moby, (short *)(moby_data + 0x60)); + start_hit_color_flash(moby, (short *)(moby_data + 0x60)); moby_point_position(moby, 0, velocity); emit_effect_l13(moby, position, @@ -353,14 +353,14 @@ void process_forcefield_tower_damage(struct Moby *moby, unsigned char *moby_data *health -= *(float *)(hit_record + 0x2c); moby_data[0x67] = 0xfa; *(short *)(moby_data + 0x26) = scale_game_frames(0x3c); - trooper_anim_update(moby, (short *)(moby_data + 0x60)); + start_hit_color_flash(moby, (short *)(moby_data + 0x60)); } } } mark: moby->hit_slot = 0xff; } - trooper_anim_finish(moby, moby_data + 0x60); + update_hit_color_flash(moby, moby_data + 0x60); } extern int FUN_001160d8(void); diff --git a/src/overlays/l13/mobys/hovering_rocket_attacker.c b/src/overlays/l13/mobys/hovering_rocket_attacker.c index 3d7a96bd3e..572551b86c 100644 --- a/src/overlays/l13/mobys/hovering_rocket_attacker.c +++ b/src/overlays/l13/mobys/hovering_rocket_attacker.c @@ -359,9 +359,9 @@ extern void spawn_effect(void *, void *, int, int, int, int, int, int) __asm__(" extern void FUN_L00_00257470(struct Moby *, int, int); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern int FUN_L00_0025ff38(float, void *, void *, int, int, void *, int); @@ -532,10 +532,10 @@ void update_hovering_rocket_attacker_common(unsigned char *moby) { default: break; } - trooper_anim_update(moby, &moby_data->anim_state); + start_hit_color_flash(moby, &moby_data->anim_state); } MOBY(moby)->hit_slot = 0xFF; - trooper_anim_finish(moby, &moby_data->anim_state); + update_hit_color_flash(moby, &moby_data->anim_state); if (MOBY(moby)->state == UPDATE_ATTACK_SEQUENCE) { moby_data->target_range = 50.0f; } else { @@ -566,4 +566,4 @@ void update_hovering_rocket_attacker_common(unsigned char *moby) { } } -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); diff --git a/src/overlays/l13/mobys/linked_switch_group.c b/src/overlays/l13/mobys/linked_switch_group.c index be1a67639d..be8196e170 100644 --- a/src/overlays/l13/mobys/linked_switch_group.c +++ b/src/overlays/l13/mobys/linked_switch_group.c @@ -9,14 +9,14 @@ extern char *find_moby_hit(void *, int, int) __asm__("FUN_L00_0025a420"); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern int hit_reaction(void *, void *, void *, int, void *, void *, int, int) __asm__("FUN_L00_0025a478"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); int process_linked_switch_damage(struct Moby *moby, char *moby_data, @@ -73,17 +73,17 @@ int process_linked_switch_damage(struct Moby *moby, char *moby_data, float *heal fl = moby->flags; moby->flags = fl & 0xEFFF; *(unsigned char *)(moby_data + 0x67) = 0x78; - trooper_anim_update(moby, (short *)color_animation_state); + start_hit_color_flash(moby, (short *)color_animation_state); health_depleted = 1; } else { *health = *health - damage_amount; *(unsigned char *)(moby_data + 0x67) = 0xFA; *(short *)(moby_data + 0x26) = scale_game_frames(0x3C); - trooper_anim_update(moby, (short *)color_animation_state); + start_hit_color_flash(moby, (short *)color_animation_state); } } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, color_animation_state); + update_hit_color_flash(moby, color_animation_state); return health_depleted; } diff --git a/src/overlays/l13/mobys/poison_vessel.c b/src/overlays/l13/mobys/poison_vessel.c index 5323ab3690..adf6249df2 100644 --- a/src/overlays/l13/mobys/poison_vessel.c +++ b/src/overlays/l13/mobys/poison_vessel.c @@ -250,9 +250,9 @@ extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float * extern void stop_moby_sound_7b10(void *, int, int) __asm__("FUN_L00_00257470"); -extern void trooper_anim_update(struct Moby *, void *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(struct Moby *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(struct Moby *, void *) __asm__("FUN_L00_0025d538"); extern void spawn_type_52_particle_near_moby(struct Moby *) __asm__("FUN_L10_002e3de8"); @@ -326,7 +326,7 @@ void poison_vessel_update(struct Moby *moby) { moby->flags &= 0xEFFF; stop_moby_sound_7b10(moby, 0, -1); poison_vessel_vars->effect_level = 0x78; - trooper_anim_update(moby, effects); + start_hit_color_flash(moby, effects); poison_vessel_vars->timer = 0; spawn_poison_vessel_destruction_effects(moby, poison_vessel_vars); spawn_type_52_particle_near_moby(moby); @@ -336,13 +336,13 @@ void poison_vessel_update(struct Moby *moby) { *health = *health - hit->damage; poison_vessel_vars->effect_level = 0xFA; poison_vessel_vars->effect_timer = scale_game_frames(0x3C); - trooper_anim_update(moby, effects); + start_hit_color_flash(moby, effects); moby->rot.x = random_float_between(-0.034906585f, 0.034906585f); moby->rot.y = random_float_between(-0.034906585f, 0.034906585f); } } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, effects); + update_hit_color_flash(moby, effects); break; case POISON_VESSEL_BLASTING: qcopy(pos, &moby->pos); diff --git a/src/overlays/l13/mobys/qwarks_starfighter.c b/src/overlays/l13/mobys/qwarks_starfighter.c index 6191cbeb9d..d4f7c90433 100644 --- a/src/overlays/l13/mobys/qwarks_starfighter.c +++ b/src/overlays/l13/mobys/qwarks_starfighter.c @@ -75,15 +75,15 @@ extern void spawn_effect(void *, void *, int, int, int, int, int, int) __asm__(" extern void FUN_L00_00257470(struct Moby *, int, int); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern char *D_L13_001B07B0[]; extern void random_vector(float *, float, float) __asm__("FUN_L00_00257d78"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, void *p) __asm__("FUN_L00_0025d458"); extern float spring_turn(float *vel, float cur, float target, float k, float d, float max) __asm__("FUN_L00_00258110"); @@ -578,7 +578,7 @@ void begin_starfighter_death_sequence(struct Moby *moby, moby->flags &= 0xEFFF; FUN_L00_00257470(moby, 0, -1); starfighter_moby_data[0x67] = 0x78; - trooper_anim_update(moby, (short *)(starfighter_moby_data + 0x60)); + start_hit_color_flash(moby, (short *)(starfighter_moby_data + 0x60)); starfighter_moby_data[0x13B] = 4; scale = D_0015ED6C * 10.0f; velocity = (char *)l13_cuboids + (*(int *)(starfighter_moby_data + 0x130) << 7); @@ -715,7 +715,7 @@ extern Hit_2EAE80 *func_L00_0025B478_2EAE80(void *, int, int) __asm__("FUN_L00_0 extern void func_L13_002EAC18_2EAE80(void *, void *, void *, void *) __asm__("FUN_L13_002e97e0"); -extern void func_L00_0025E4B0_2EAE80(void *, void *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); extern void func_L13_002EAAB8_2EAE80(void *, void *, int) __asm__("FUN_L13_002e9680"); @@ -786,7 +786,7 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { moby_data->damage_flash_red = 0xFA; mode = ATTACHMENT_DAMAGE_APPLIED; moby_data->sub.h6 = scale_game_frames(0); - func_L00_0025E4B0_2EAE80(moby, moby_data->q60); + start_hit_color_flash(moby, moby_data->q60); moby_data->first->bA4 = 0xFF; } if (moby->state == STARFIGHTER_STATE_DEATH_FLIGHT) { @@ -885,7 +885,7 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { moby_data->damage_flash_red = 0xFA; mode = ATTACHMENT_DAMAGE_APPLIED; moby_data->sub.h6 = scale_game_frames(0); - func_L00_0025E4B0_2EAE80(moby, moby_data->q60); + start_hit_color_flash(moby, moby_data->q60); moby_data->list[i]->bA4 = 0xFF; } if (moby->state == STARFIGHTER_STATE_DEATH_FLIGHT) { @@ -980,7 +980,7 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { } } } - trooper_anim_finish(moby, moby_data->q60); + update_hit_color_flash(moby, moby_data->q60); } void predict_hero_ship_projectile_lead_position(char *predicted_target_position, @@ -1589,7 +1589,7 @@ extern void hud_update_counter() __asm__("FUN_L00_00235ea0"); extern void FUN_L00_0024f7c8(void *, int, void *); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void spawn_explosion(void *, void *, @@ -1842,7 +1842,7 @@ void qwarks_starfighter_update(Moby388 *moby) { if (moby->bBC != 4) { process_moby_attachment_damage(moby, starfighter_vars); } else { - trooper_anim_finish(moby, (char *)starfighter_vars + 0x60); + update_hit_color_flash(moby, (char *)starfighter_vars + 0x60); } break; case STARFIGHTER_STATE_TRACTOR_BEAM: { @@ -2009,7 +2009,7 @@ void qwarks_starfighter_update(Moby388 *moby) { if (moby->bBC != 4) { process_moby_attachment_damage(moby, starfighter_vars); } else { - trooper_anim_finish(moby, (char *)starfighter_vars + 0x60); + update_hit_color_flash(moby, (char *)starfighter_vars + 0x60); } { char *hero = ((char *)&D_0013F350); diff --git a/src/overlays/l13/mobys/robosquawker.c b/src/overlays/l13/mobys/robosquawker.c index 3c838476b8..a925ec8598 100644 --- a/src/overlays/l13/mobys/robosquawker.c +++ b/src/overlays/l13/mobys/robosquawker.c @@ -37,9 +37,9 @@ extern void FUN_L00_00257470(void *, int, int); extern void FUN_L00_00263ac8(float, int, int, unsigned char *); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern float D_L13_001670C0[]; @@ -574,7 +574,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { robosquawker_moby->state = ROBOSQUAWKER_STATE_DEATH_KNOCKBACK; release_robosquawker_particle((Level13VendorMoby *)robosquawker_vars); robosquawker_vars->x110[7] = 0x78; - trooper_anim_update(robosquawker_moby, (short *)robosquawker_vars->x110); + start_hit_color_flash(robosquawker_moby, (short *)robosquawker_vars->x110); FUN_L00_00257470(robosquawker_moby, 0, -1); } else { *(u128 *)&va = *(u128 *)&hit->pos; @@ -594,7 +594,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { release_robosquawker_particle((Level13VendorMoby *)robosquawker_vars); *(unsigned char *)&robosquawker_vars->x110[7] = 0xFA; robosquawker_vars->damage_cooldown_frames = scale_game_frames(0x3C); - trooper_anim_update(robosquawker_moby, (short *)robosquawker_vars->x110); + start_hit_color_flash(robosquawker_moby, (short *)robosquawker_vars->x110); } } } @@ -1391,7 +1391,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { break; } } - trooper_anim_finish(robosquawker_moby, robosquawker_vars->x110); + update_hit_color_flash(robosquawker_moby, robosquawker_vars->x110); if (robosquawker_moby->pos.f[0] < 2.0f || robosquawker_moby->pos.f[0] > 1021.0f || robosquawker_moby->pos.f[1] < 2.0f || robosquawker_moby->pos.f[1] > 1021.0f || robosquawker_moby->pos.f[2] < 2.0f || robosquawker_moby->pos.f[2] > 1021.0f) { diff --git a/src/overlays/l14/mobys/blarg_heavy_interceptor.c b/src/overlays/l14/mobys/blarg_heavy_interceptor.c index 8b56a899f5..9c4e33195f 100644 --- a/src/overlays/l14/mobys/blarg_heavy_interceptor.c +++ b/src/overlays/l14/mobys/blarg_heavy_interceptor.c @@ -794,9 +794,9 @@ hit_reaction(void *, void *, void *, int, void *, void *, int, int) __asm__("FUN extern void FUN_L00_00257470(void *, int, int); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); void blend_moby_animation(MobyAnim *m, int a, int b, int c) __asm__("FUN_00212f90"); @@ -870,10 +870,10 @@ void process_blarg_heavy_interceptor_hit_reactions(struct Moby *moby) { case HIT_REACTION_NONE: break; } - trooper_anim_update(moby, &blarg_heavy_interceptor_vars->anim_state); + start_hit_color_flash(moby, &blarg_heavy_interceptor_vars->anim_state); } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, &blarg_heavy_interceptor_vars->anim_state); + update_hit_color_flash(moby, &blarg_heavy_interceptor_vars->anim_state); } extern s32 blarg_heavy_interceptor_light_ring_vertex_count_gp __asm__("D_L14_00161418") diff --git a/src/overlays/l14/mobys/bolt_thief.c b/src/overlays/l14/mobys/bolt_thief.c index d0526b35a1..f439ecc429 100644 --- a/src/overlays/l14/mobys/bolt_thief.c +++ b/src/overlays/l14/mobys/bolt_thief.c @@ -110,7 +110,7 @@ extern void FUN_L00_00257470(void *, int, int); extern void trooper_start_knockback(void *, void *, int, int, int, float) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void moby_set_state_one(void *) __asm__("FUN_L14_002ffc08"); @@ -315,7 +315,7 @@ void bolt_thief_update(L16CrateMoby *moby) { } break; } - trooper_anim_finish(moby, moby_data->effect); + update_hit_color_flash(moby, moby_data->effect); } extern int sample_path(char *, float *, float *, float *, int, float) __asm__("FUN_L00_0025d808"); diff --git a/src/overlays/l14/mobys/flying_car.c b/src/overlays/l14/mobys/flying_car.c index f167a08e0b..2c03b88fbd 100644 --- a/src/overlays/l14/mobys/flying_car.c +++ b/src/overlays/l14/mobys/flying_car.c @@ -102,7 +102,7 @@ extern void FUN_L14_00307510_6ee0(void *) __asm__("FUN_L14_00307510"); extern void fill_transfer_words(void *, int, int) __asm__("FUN_001f97e8"); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); extern void update_moby_rotation_oscillation(void *, void *, void *, float, float, float) __asm__("FUN_L00_00262b80"); @@ -177,7 +177,7 @@ void flying_car_update(struct Moby *flying_car_moby) { } fill_transfer_words(&flying_car_data->fx, 0, 0x40); attach_manipulator(flying_car_moby, 0, &flying_car_data->fx); - trooper_anim_update(flying_car_moby, flying_car_data->effect); + start_hit_color_flash(flying_car_moby, flying_car_data->effect); if (flying_car_data->trigger >= 0) { flying_car_moby->flags |= 0x41; flying_car_moby->collision = 0; diff --git a/src/overlays/l14/mobys/machinegun_turret.c b/src/overlays/l14/mobys/machinegun_turret.c index cb966b705b..0198bec9bd 100644 --- a/src/overlays/l14/mobys/machinegun_turret.c +++ b/src/overlays/l14/mobys/machinegun_turret.c @@ -38,9 +38,9 @@ hit_reaction(void *, void *, void *, int, void *, void *, int, int) __asm__("FUN extern void FUN_L00_00257470(void *, int, int); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern int D_L14_0015F5CC MACRO_ADDR; @@ -562,10 +562,10 @@ void process_machinegun_turret_hit_reactions(struct Moby *moby) { FUN_L00_00257470(moby, 0, -1); break; } - trooper_anim_update(moby, (short *)&moby_vars->anim_state); + start_hit_color_flash(moby, (short *)&moby_vars->anim_state); } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, &moby_vars->anim_state); + update_hit_color_flash(moby, &moby_vars->anim_state); } extern int D_L14_0016150C_gp __asm__("D_L14_0016150C") __attribute__((sda)); diff --git a/src/overlays/l14/mobys/minibomber.c b/src/overlays/l14/mobys/minibomber.c index f3a78739a5..7f076833d2 100644 --- a/src/overlays/l14/mobys/minibomber.c +++ b/src/overlays/l14/mobys/minibomber.c @@ -46,7 +46,7 @@ extern char D_L14_001674C0[]; extern void FUN_L00_00257470(void *, int, int); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern float FUN_L00_0025b8c0_c(float *p, float *v, float t, float u1, float u2, float eps) __asm__("FUN_L00_0025b8c0"); @@ -637,7 +637,7 @@ extern int FUN_L00_0025a478_c(void *, void *, void *, int, int *, float *, int, extern void FUN_00212f90(void *, int, int, int); -extern void FUN_L00_0025d458_c(void *, void *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); void process_minibomber_hit_reactions(struct Moby *hit_owner_moby) __asm__("FUN_L14_002b5290"); @@ -706,10 +706,10 @@ void process_minibomber_hit_reactions(struct Moby *hit_owner_moby) { FUN_L00_00257470(hit_owner_moby, 0, -1); break; } - FUN_L00_0025d458_c(hit_owner_moby, moby_vars + 0x60); + start_hit_color_flash(hit_owner_moby, moby_vars + 0x60); } hit_owner_moby->hit_slot = 0xFF; - trooper_anim_finish(hit_owner_moby, moby_vars + 0x60); + update_hit_color_flash(hit_owner_moby, moby_vars + 0x60); } extern f32 D_L14_00161540_gp __asm__("D_L14_00161540") __attribute__((sda)); diff --git a/src/overlays/l15/mobys/helicopter.c b/src/overlays/l15/mobys/helicopter.c index d1a918d07b..aaa6219f3d 100644 --- a/src/overlays/l15/mobys/helicopter.c +++ b/src/overlays/l15/mobys/helicopter.c @@ -888,9 +888,9 @@ void helicopter_update(struct Moby *moby) { extern int hit_reaction(void *, void *, void *, int, void *, void *, int, int) __asm__("FUN_L00_0025a478"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); void process_helicopter_hits(struct Moby *moby) { enum { @@ -915,7 +915,7 @@ void process_helicopter_hits(struct Moby *moby) { moby->state = HELICOPTER_DEATH_EFFECTS; } else if (hit_reaction_code != 0xB) { *(unsigned char *)(helicopter_vars + 0x67) = 0xB4; - trooper_anim_update(moby, (short *)(helicopter_vars + 0x60)); + start_hit_color_flash(moby, (short *)(helicopter_vars + 0x60)); if (*(float *)(hit_record + 0x1C) == 5627.925f && moby->state != HELICOPTER_RECOIL) { hit_away_heading = fast_arc_tan(moby->pos.x - *(float *)(hit_record + 0), moby->pos.y - *(float *)(hit_record + 4)); @@ -938,7 +938,7 @@ void process_helicopter_hits(struct Moby *moby) { } } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, helicopter_vars + 0x60); + update_hit_color_flash(moby, helicopter_vars + 0x60); } extern float spring_turn(float *vel, float cur, float target, float k, float d, float max) __asm__("FUN_L00_00258110"); diff --git a/src/overlays/l15/mobys/ultramech_unlimited.c b/src/overlays/l15/mobys/ultramech_unlimited.c index 7c35c26920..3530b693ae 100644 --- a/src/overlays/l15/mobys/ultramech_unlimited.c +++ b/src/overlays/l15/mobys/ultramech_unlimited.c @@ -67,9 +67,9 @@ extern void FUN_L00_0025df68(void *, void *, void *, int *, float *, int, float, extern int point_in_path_xy(void *, void *, int) __asm__("FUN_L00_00259740"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void scale_vector_xyz(void *, void *, float) __asm__("FUN_001f9a68"); @@ -1126,13 +1126,13 @@ void process_ultramech_hits_and_update_target(void *ultramech_instance) { mark_moby_for_removal_cf(ultramech_moby, 0x200, -1); break; } - trooper_anim_update(ultramech_moby, (char *)ultramech_vars + 0x60); + start_hit_color_flash(ultramech_moby, (char *)ultramech_vars + 0x60); } if (slot != 0) *(int *)(slot + 0x34) = 0; } *(unsigned char *)((char *)ultramech_moby + 0xA4) = 0xFF; - trooper_anim_finish(ultramech_moby, (char *)ultramech_vars + 0x60); + update_hit_color_flash(ultramech_moby, (char *)ultramech_vars + 0x60); *(float *)((char *)ultramech_moby + 0x2C) = *(float *)(ultramech_moby->cls + 0x24) * ultramech_post_hit_scale_multiplier_gp; ultramech_vars->target_range_status = 0; diff --git a/src/overlays/l16/mobys/bolt_thief.c b/src/overlays/l16/mobys/bolt_thief.c index a6a5339012..6a9de32254 100644 --- a/src/overlays/l16/mobys/bolt_thief.c +++ b/src/overlays/l16/mobys/bolt_thief.c @@ -135,7 +135,7 @@ extern f32 D_L16_00161D98_gp __asm__("D_L16_00161D98") __attribute__((sda)); extern void FUN_L00_00257470(void *, int, int); extern void trooper_start_knockback(void *, void *, int, int, int, float) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void set_moby_state_14(void *) __asm__("FUN_L03_002c6c90"); extern void initialize_moby_path_state(void *) __asm__("FUN_L14_002fe900"); extern void update_linked_moby_position(void *) __asm__("FUN_L14_002fec28"); @@ -339,7 +339,7 @@ void bolt_thief_update(L16CrateMoby *moby) { } break; } - trooper_anim_finish(moby, bolt_thief_data->effect); + update_hit_color_flash(moby, bolt_thief_data->effect); } #include "rnc/overlay/l16/mobys/bolt_thief_globals.h" diff --git a/src/overlays/l16/mobys/bomb.c b/src/overlays/l16/mobys/bomb.c index c36741fb90..dd4f183694 100644 --- a/src/overlays/l16/mobys/bomb.c +++ b/src/overlays/l16/mobys/bomb.c @@ -62,8 +62,8 @@ typedef struct { extern char D_L16_0015F580_macro[] __asm__("D_L16_0015F580") MACRO_ADDR; extern int coll_sphere(float, void *, int, void *) __asm__("FUN_L00_001f0d60"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void spawn_explosion(void *, void *, void *, @@ -128,7 +128,7 @@ void thrown_bomb_update(L16FallingMoby *moby) { } else if (bomb_data->timer < scale_game_frames(45) && bomb_data->timer % scale_game_frames(10) == 0) { bomb_data->reaction = 250; - trooper_anim_update(moby, (short *)bomb_data); + start_hit_color_flash(moby, (short *)bomb_data); } bomb_data->velocity[2] -= bomb_data->gravity; break; @@ -138,7 +138,7 @@ void thrown_bomb_update(L16FallingMoby *moby) { } else if (bomb_data->timer < scale_game_frames(61) && bomb_data->timer % scale_game_frames(20) == 0) { bomb_data->reaction = 250; - trooper_anim_update(moby, (short *)bomb_data); + start_hit_color_flash(moby, (short *)bomb_data); } break; case BOMB_STATE_EXPLODE: @@ -164,7 +164,7 @@ void thrown_bomb_update(L16FallingMoby *moby) { mark_moby_for_removal(moby); return; } - trooper_anim_finish(moby, bomb_data); + update_hit_color_flash(moby, bomb_data); } /* Ported from rac1-decomp (src/overlays/l16_kalebo3/vendor_002A50F0.c: func_L16_002C75D0), where it is exact; names translated to the US level program. */ diff --git a/src/overlays/l16/mobys/chomper.c b/src/overlays/l16/mobys/chomper.c index e4a8df890d..cd25f1a66c 100644 --- a/src/overlays/l16/mobys/chomper.c +++ b/src/overlays/l16/mobys/chomper.c @@ -194,7 +194,7 @@ void chomper_update(struct Moby *chomper_moby) { extern char *D_L16_001B0930[]; extern void trooper_start_knockback(void *, void *, int, int, int, float) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); #include "rnc/overlay/shared/math/quad.h" @@ -255,7 +255,7 @@ extern float chomper_knockback_vertical_speed_gp __asm__("D_L16_00161E5C") __att extern float chomper_knockback_horizontal_speed_gp __asm__("D_L16_00161E60") __attribute__((sda)); extern int FUN_L00_0025ff38(void *, void *, float, int, int, void *, int); extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); void update_chomper_hit_reaction_and_target(void *chomper_instance) { enum { @@ -299,10 +299,10 @@ void update_chomper_hit_reaction_and_target(void *chomper_instance) { chomper_moby->state = CHOMPER_KNOCKBACK; chomper_moby->i94 = 0; pursuit_data->reaction_time = 0x78; - trooper_anim_update(chomper_moby, pursuit_data->reaction); + start_hit_color_flash(chomper_moby, pursuit_data->reaction); } chomper_moby->bA4 = 0xFF; - trooper_anim_finish(chomper_moby, pursuit_data->reaction); + update_hit_color_flash(chomper_moby, pursuit_data->reaction); reaction_flags_or_path_entry_address = (int)&D_L16_001B0930[pursuit_data->path]; reaction_kind_or_path_address = *(int *)reaction_flags_or_path_entry_address; if (FUN_L00_0025ff38(chomper_moby, diff --git a/src/overlays/l16/mobys/test_dummy.c b/src/overlays/l16/mobys/test_dummy.c index 611593f466..19439e681e 100644 --- a/src/overlays/l16/mobys/test_dummy.c +++ b/src/overlays/l16/mobys/test_dummy.c @@ -482,8 +482,8 @@ void test_dummy_update(unsigned char *moby) { extern int D_L16_0015F5CC; extern char *find_moby_hit(void *, int, int) __asm__("FUN_L00_0025a420"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); typedef struct { char pad00[0x20]; @@ -602,11 +602,11 @@ void update_test_dummy_damage_and_respawn(void *moby) { dummy_hit_record = 0; } hit_data->reaction_time = 120; - trooper_anim_update(hit_moby, hit_data->reaction); + start_hit_color_flash(hit_moby, hit_data->reaction); } } hit_moby->opacity = 255; - trooper_anim_finish(hit_moby, hit_data->reaction); + update_hit_color_flash(hit_moby, hit_data->reaction); if (hit_data->child) { moby_point_position(hit_moby, D_L16_001619C8_gp, hit_data->child->position); build_moby_bone_transform((char *)hit_moby, D_L16_001619C8_gp, (char *)matrix); @@ -616,7 +616,7 @@ void update_test_dummy_damage_and_respawn(void *moby) { fast_vec_normalize(hit_data->child->matrix[2], hit_data->child->matrix[2], 1.0f); update_entity(hit_data->child); } - trooper_anim_finish(hit_moby, hit_data->reaction); + update_hit_color_flash(hit_moby, hit_data->reaction); } extern int D_L16_001ABCC0_u[] __asm__("D_L16_001ABCC0"); diff --git a/src/overlays/l17/mobys/dreks_fleet_turret.c b/src/overlays/l17/mobys/dreks_fleet_turret.c index bf1e2145d9..6d7a31f6f5 100644 --- a/src/overlays/l17/mobys/dreks_fleet_turret.c +++ b/src/overlays/l17/mobys/dreks_fleet_turret.c @@ -32,8 +32,8 @@ enum { extern int hit_reaction(void *, void *, void *, int, void *, void *, int, int) __asm__("FUN_L00_0025a478"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); /* Updates moby 347, a turret of Drek's fleet: waits for the hero, aims at its zone or at the hero's ship and fires. */ /* Ported from rac1-decomp (src/overlays/l17_fleet/vendor_002AA068.c: func_L17_002CC788), where it is exact; names translated to the US level program. */ @@ -335,10 +335,10 @@ void process_dreks_fleet_turret_hits(struct Moby *turret_moby) { turret_moby->flags &= 0xEFFF; } *(unsigned char *)(turret_vars + 0x67) = 0xF0; - trooper_anim_update(turret_moby, (short *)hit_animation_state); + start_hit_color_flash(turret_moby, (short *)hit_animation_state); } turret_moby->hit_slot = 0xFF; - trooper_anim_finish(turret_moby, hit_animation_state); + update_hit_color_flash(turret_moby, hit_animation_state); } } diff --git a/src/overlays/l17/mobys/robot_dog.c b/src/overlays/l17/mobys/robot_dog.c index 77a33fd14c..32bf0e98fa 100644 --- a/src/overlays/l17/mobys/robot_dog.c +++ b/src/overlays/l17/mobys/robot_dog.c @@ -607,7 +607,7 @@ extern int FUN_L00_0025ff38(float, char *, void *, int, int, void *, int); extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); extern void trooper_start_knockback(float, void *, void *, int, int, int) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); extern void update_float_countdown(float *) __asm__("FUN_L08_00211b08"); void update_robot_dog_hit_reaction_and_target_detection(void *moby_v, int clip_volume_suppressed) { @@ -654,7 +654,7 @@ void update_robot_dog_hit_reaction_and_target_detection(void *moby_v, int clip_v trooper_start_knockback(knockback_heading, moby, moby_vars->v120, 0xB, 1, 0); moby->state = ROBOT_DOG_STATE_FALL_THEN_REMOVE; moby_vars->b117 = 0xF0; - trooper_anim_update(moby, moby_vars->h110); + start_hit_color_flash(moby, moby_vars->h110); } moby->bA4 = 0xFF; if (clip_volume_suppressed != 0) { diff --git a/src/overlays/l18/mobys/drek_final_boss_robot.c b/src/overlays/l18/mobys/drek_final_boss_robot.c index 5ba342317a..22e2475438 100644 --- a/src/overlays/l18/mobys/drek_final_boss_robot.c +++ b/src/overlays/l18/mobys/drek_final_boss_robot.c @@ -1859,8 +1859,8 @@ typedef struct { } VendorNode_5e80; extern int resolve_moby_hit_response(void *, void *, void *, int, void *, void *, int, int) __asm__("FUN_00213928"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern char *create_moby(int) __asm__("FUN_0020c4f8"); extern int FUN_L00_0025ff38_5e80(float a, char *m, char *b, int c, int d, int *e, int f) __asm__("FUN_L00_0025ff38"); extern int poll_moby_state_and_rearm(char *) __asm__("FUN_L18_002d8050"); @@ -1951,7 +1951,7 @@ void update_drek_boss_damage_and_phase_transitions(char *moby) { *(float *)(boss_data + 0x38C) = health_floor_or_transition_offset; } *(unsigned char *)(boss_data + 0x67) = 0xF0; - trooper_anim_update(moby, (short *)(boss_data + 0x60)); + start_hit_color_flash(moby, (short *)(boss_data + 0x60)); if (*(float *)(boss_data + 0x38C) == 0.0f) { if (*(int *)(boss_data + 0x368) != -1) { set_animation_parameter(*(int *)(boss_data + 0x368), 0); @@ -1979,7 +1979,7 @@ void update_drek_boss_damage_and_phase_transitions(char *moby) { } MOBY(moby)->hit_slot = 0xFF; *(int *)(boss_data + 0x36C) = truncate_float_to_s32(*(float *)(boss_data + 0x38C)); - trooper_anim_finish(moby, boss_data + 0x60); + update_hit_color_flash(moby, boss_data + 0x60); if (*(int *)(boss_data + 0x3A0) == 0) { spawned_child_moby = (unsigned char *)create_moby(0x58F); *(unsigned char **)(boss_data + 0x3A0) = spawned_child_moby; diff --git a/src/overlays/l18/mobys/gadgebot.c b/src/overlays/l18/mobys/gadgebot.c index a251453a49..df551d4387 100644 --- a/src/overlays/l18/mobys/gadgebot.c +++ b/src/overlays/l18/mobys/gadgebot.c @@ -253,8 +253,8 @@ extern int random_integer_below(int) __asm__("FUN_00213260"); extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); extern void trooper_start_knockback(void *, void *, int, int, int, float) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern int FUN_L00_0025ff38_c100(float, void *, void *, int, int, int *, int) __asm__("FUN_L00_0025ff38"); @@ -370,12 +370,12 @@ void update_gadgebot_damage_target_and_glow(struct Moby *moby) { moby->state = GADGEBOT_DEATH_FALL; moby->collision = 0; sentry_vars->anim_flags = 0x78; - trooper_anim_update(moby, sentry_vars->anim); + start_hit_color_flash(moby, sentry_vars->anim); } } } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, sentry_vars->anim); + update_hit_color_flash(moby, sentry_vars->anim); fall_setup_value_or_path_slot_address = (int)&D_L18_001B0EB0[sentry_vars->path]; reaction_value_or_path_address = *(int *)fall_setup_value_or_path_slot_address; FUN_L00_0025ff38_c100(512.0f, diff --git a/src/overlays/l18/mobys/rocket_tank.c b/src/overlays/l18/mobys/rocket_tank.c index b60a1338e7..054f3ba798 100644 --- a/src/overlays/l18/mobys/rocket_tank.c +++ b/src/overlays/l18/mobys/rocket_tank.c @@ -225,8 +225,8 @@ extern void func_L00_0025F4A8_alt(void *, int, int, int) __asm__("FUN_L00_0025e450"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); /* Ported from rac1-decomp (src/overlays/l18_veldin2/vendor_002F8F38.c: func_L18_002F94B0), where it is exact; names translated to the US level program. */ @@ -246,7 +246,7 @@ extern void *FUN_L00_00257470_cf(char *src, float *v11, float *v12) __asm__("FUN_L00_00263fd8"); extern void build_axis_rotation_quaternion(void *, int, float) __asm__("FUN_L00_001fff28"); -extern void trooper_anim_update(void *, short *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, short *) __asm__("FUN_L00_0025d458"); extern void mark_moby_for_removal_cf(void *, int, int) __asm__("FUN_L00_00257470"); extern void func_L00_0025F4A8_alt(void *, void *, @@ -334,7 +334,7 @@ void update_rocket_tank_damage_and_aim(void *mv) { } return; } - trooper_anim_update(moby_bytes, (short *)(tank_data + 0x60)); + start_hit_color_flash(moby_bytes, (short *)(tank_data + 0x60)); } moby_bytes[0xA4] = 0xFF; if (select_moby_combat_target(moby_bytes, tank_data + 0x70, 30.0f) != 2) { @@ -401,7 +401,7 @@ void update_rocket_tank_damage_and_aim(void *mv) { 2, fast_subtract_rotations(*(float *)(tank_data + 0x110), *(float *)(moby_bytes + 0x48))); multiply_quaternions(tank_data + 0xD0, explosion_and_aim_scratch, tank_data + 0xD0); - trooper_anim_finish(moby_bytes, tank_data + 0x60); + update_hit_color_flash(moby_bytes, tank_data + 0x60); } extern int *D_L18_001B0EB0[]; diff --git a/src/overlays/shared/enemies/armed_transport.c b/src/overlays/shared/enemies/armed_transport.c index bfdc84978b..bb992a0fdb 100644 --- a/src/overlays/shared/enemies/armed_transport.c +++ b/src/overlays/shared/enemies/armed_transport.c @@ -152,8 +152,8 @@ extern int FUN_0022da68_i(int, int, void *) __asm__("FUN_0022da68"); extern void release_voice_slot(int) __asm__("FUN_0022d798"); extern int hit_reaction(void *, char *, void *, int, int *, float *, int, int) __asm__("FUN_L00_0025a478"); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void FUN_L00_0025ff38(float, void *, void *, int, int, void *, int); extern float D_L16_00161D78_gp __asm__("D_L16_00161D78") __attribute__((sda)); @@ -507,10 +507,10 @@ void update_armed_transport_damage_and_targeting(struct Moby *transport_moby) { transport_data->hit_animation_secondary_red = 120; } } - trooper_anim_update(transport_moby, &transport_data->trooper_anim); + start_hit_color_flash(transport_moby, &transport_data->trooper_anim); } transport_moby->hit_slot = 255; - trooper_anim_finish(transport_moby, &transport_data->trooper_anim); + update_hit_color_flash(transport_moby, &transport_data->trooper_anim); if (transport_data->target_path_index != -1 && D_001413DC[0] != 22) { char *path = D_L16_001B0930[transport_data->target_path_index]; FUN_L00_0025ff38(128.0f, diff --git a/src/overlays/shared/enemies/blarg_elite_commando.c b/src/overlays/shared/enemies/blarg_elite_commando.c index 8b085044ed..7f9eaf4f36 100644 --- a/src/overlays/shared/enemies/blarg_elite_commando.c +++ b/src/overlays/shared/enemies/blarg_elite_commando.c @@ -188,8 +188,8 @@ extern void FUN_L00_00257470(void *, int, int); extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); extern void trooper_start_knockback(float, void *, void *, int, int, int) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void randomize_blarg_elite_commando_group_pursuit_timers(void *, int, int) __asm__("FUN_L16_002d3f78"); extern float func_001F9878_timer(float) __asm__("FUN_001f96b0"); @@ -649,10 +649,10 @@ void update_blarg_elite_commando_damage_and_pursuit(struct Moby *commando_moby) default: break; } - trooper_anim_update(commando_moby, commando_data->damage); + start_hit_color_flash(commando_moby, commando_data->damage); } commando_moby->hit_slot = 0xFF; - trooper_anim_finish(commando_moby, commando_data->damage); + update_hit_color_flash(commando_moby, commando_data->damage); fast_dec_timer(&commando_data->pursuit_timer); if (commando_data->reset_timer) { commando_data->pursuit_timer = diff --git a/src/overlays/shared/enemies/blarg_helicopter.c b/src/overlays/shared/enemies/blarg_helicopter.c index 4d75d18575..132370b608 100644 --- a/src/overlays/shared/enemies/blarg_helicopter.c +++ b/src/overlays/shared/enemies/blarg_helicopter.c @@ -129,7 +129,7 @@ typedef struct { void mark_moby_for_removal(struct Obj *obj) __asm__("FUN_0020c828"); extern char *find_moby_hit(void *, int, int) __asm__("FUN_L00_0025a420"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); extern void spawn_explosion(void *, void *, void *, @@ -149,7 +149,7 @@ extern void spawn_explosion(void *, int, int) __asm__("FUN_L00_0025e450"); extern void moby_point_position(void *, int, void *) __asm__("FUN_L00_0024f7c8"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern char D_L03_00166EC0[]; extern float D_L03_0015F580_macro[] __asm__("D_L03_0015F580") MACRO_ADDR; @@ -886,7 +886,7 @@ void handle_blarg_helicopter_hits(char *helicopter_moby) { MOBY(helicopter_moby)->state = BLARG_HELICOPTER_DESTROY; } else if (hit_reaction_result != 0xB) { *(unsigned char *)(helicopter_data + 0x67) = 0xB4; - trooper_anim_update(helicopter_moby, (short *)(helicopter_data + 0x60)); + start_hit_color_flash(helicopter_moby, (short *)(helicopter_data + 0x60)); if (*(float *)(hit_record + 0x1C) == 5627.925f && MOBY(helicopter_moby)->state != BLARG_HELICOPTER_TIMED_REACTION) { reaction_heading_angle = @@ -915,7 +915,7 @@ void handle_blarg_helicopter_hits(char *helicopter_moby) { } } MOBY(helicopter_moby)->hit_slot = 0xFF; - trooper_anim_finish(helicopter_moby, helicopter_data + 0x60); + update_hit_color_flash(helicopter_moby, helicopter_data + 0x60); } /* Spawns a class 0x350 moby and fills its data block from a position, vector and parameters. */ diff --git a/src/overlays/shared/enemies/blarg_paratrooper.c b/src/overlays/shared/enemies/blarg_paratrooper.c index c07ce2306b..fb2b46be78 100644 --- a/src/overlays/shared/enemies/blarg_paratrooper.c +++ b/src/overlays/shared/enemies/blarg_paratrooper.c @@ -126,8 +126,8 @@ extern void trooper_knockback_arc(void *, void *, float *, float *) __asm__("FUN extern void trooper_start_knockback(void *, void *, float, int, int, int) __asm__("FUN_L00_0025c558"); extern void spawn_randomized_bolt_drop(void *, int, int, int, int) __asm__("FUN_L00_00260a88"); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern int activate_effect_l08(void *, void *, float, int, int, void *, int) __asm__("FUN_L00_0025ff38"); extern float l08_paratrooper_model_scale_multiplier __asm__("D_L08_00162180") __attribute__((sda)); @@ -764,10 +764,10 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { break; } } - trooper_anim_update(moby, ¶trooper_instance_state->trooper_anim); + start_hit_color_flash(moby, ¶trooper_instance_state->trooper_anim); } MOBY(moby)->hit_slot = 0xff; - trooper_anim_finish(moby, ¶trooper_instance_state->trooper_anim); + update_hit_color_flash(moby, ¶trooper_instance_state->trooper_anim); if (paratrooper_instance_state->unk38 != 0) { angle = random_float_between(180.0f, 240.0f); diff --git a/src/overlays/shared/enemies/blarg_space_commando.c b/src/overlays/shared/enemies/blarg_space_commando.c index d16596621e..f4d2bbbcce 100644 --- a/src/overlays/shared/enemies/blarg_space_commando.c +++ b/src/overlays/shared/enemies/blarg_space_commando.c @@ -559,8 +559,8 @@ extern unsigned char D_0013D408[]; extern void FUN_L00_00257470(void *, int, int); extern void trooper_start_knockback(void *, void *, float, int, int, int) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void queue_dialogue_message(int, int) __asm__("FUN_L00_00263d40"); void update_blarg_space_commando_beam(void *owner_moby) __asm__("FUN_L06_002ff2c8"); @@ -717,10 +717,10 @@ void process_blarg_space_commando_hits(char *moby) { default: break; } - trooper_anim_update(moby, (short *)(commando_state + 0x110)); + start_hit_color_flash(moby, (short *)(commando_state + 0x110)); } MOBY(moby)->hit_slot = 0xFF; - trooper_anim_finish(moby, commando_state + 0x110); + update_hit_color_flash(moby, commando_state + 0x110); if (*(int *)(commando_state + 0x188) != 0) { *(float *)(commando_state + 0x198) = base_home_distance_limit_gp + 6.0f; } else { diff --git a/src/overlays/shared/enemies/bomb_spawner.c b/src/overlays/shared/enemies/bomb_spawner.c index e6708a1c94..4597cbeada 100644 --- a/src/overlays/shared/enemies/bomb_spawner.c +++ b/src/overlays/shared/enemies/bomb_spawner.c @@ -71,7 +71,7 @@ extern char *D_L03_0015FFD8_macro __asm__("D_L03_0015FFD8") MACRO_ADDR; extern void FUN_L00_0025a120_2bef68(void *) __asm__("FUN_L00_0025a120"); extern char *find_moby_hit(void *, int, int) __asm__("FUN_L00_0025a420"); extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN_00213928"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); extern void mark_moby_for_removal_cf(void *, int, int) __asm__("FUN_L00_00257470"); extern void spawn_explosion(void *, void *, @@ -109,7 +109,7 @@ extern void add_random_offset_to_vector_xyz(float *v, float s) __asm__("FUN_L00 extern float FUN_L00_0025abf0_2bef68(void *, void *, void *, float, float) __asm__("FUN_L00_0025abf0"); extern char *spawn_class_221_moby(char *owner, float *pos, float *dir, short ang, int arg) __asm__("FUN_L03_002c45d8"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern char D_L03_00166EC0[]; extern char D_0013E533_2bef68[] __asm__("D_0013E533"); extern float D_L03_0015F580_macro[] __asm__("D_L03_0015F580") MACRO_ADDR; @@ -270,12 +270,12 @@ void bomb_spawner_update(struct Moby *moby) { spawner_data->hp = remaining_health; if (remaining_health > 0.0f) { spawner_data->hit_effect_blend_target = 0x5A; - trooper_anim_update(moby, spawner_data->f60); + start_hit_color_flash(moby, spawner_data->f60); } else { mark_moby_for_removal_cf(moby, 0, -1); moby->state = SPAWNER_DESTROY; spawner_data->hit_effect_blend_target = 0x78; - trooper_anim_update(moby, spawner_data->f60); + start_hit_color_flash(moby, spawner_data->f60); } } moby->hit_slot = 0xFF; @@ -561,7 +561,7 @@ void bomb_spawner_update(struct Moby *moby) { } } } - trooper_anim_finish(moby, spawner_data->f60); + update_hit_color_flash(moby, spawner_data->f60); } /* Ported from rac1-decomp (src/overlays/shared/vendor_00292AC0.c: func_L03_002C59A0), where it is exact; names translated to the US level program. */ diff --git a/src/overlays/shared/enemies/ground_melee_enemy.c b/src/overlays/shared/enemies/ground_melee_enemy.c index ed1789c3a4..5c4063a9c1 100644 --- a/src/overlays/shared/enemies/ground_melee_enemy.c +++ b/src/overlays/shared/enemies/ground_melee_enemy.c @@ -149,7 +149,7 @@ float lift_2E39E0 __asm__("D_L09_001618CC") = 3.0f; extern unsigned char settings_2E39E0 __asm__("D_L09_001618D8") __attribute__((sda)); extern void knock_2E39E0(Moby *, void *, float, int, int, int) __asm__("FUN_L00_0025c558"); extern void explode_2E39E0(Moby *, int, int) __asm__("FUN_L00_00257470"); -extern void effects_start_2E39E0(Moby *, void *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(Moby *, void *) __asm__("FUN_L00_0025d458"); extern void sound_2E39E0(float, Moby *, int, void *) __asm__("FUN_L00_00263ac8"); extern void wake_2E39E0(Moby *) __asm__("FUN_L00_0025a120"); extern int FUN_L04_00252e18_c(Moby *, void *, float) __asm__("FUN_L04_00252e18"); @@ -159,7 +159,7 @@ extern void approach_w(Moby *, float, void *, float, float, float) __asm__("FUN_ extern void FUN_L01_0028b5e0_c(Moby *, char *, void *, void *) __asm__("FUN_L01_0028b5e0"); extern int move_w(Moby *, int *, void *, void *, float) __asm__("FUN_L00_00258b50"); extern int recover_2E39E0(Moby *, void *) __asm__("FUN_L00_002dc9f0"); -extern void effects_update_2E39E0(Moby *, void *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(Moby *, void *) __asm__("FUN_L00_0025d538"); /* Suck cannon methods of the ground melee enemy (and the peckbot, robosquawker and chomper). */ extern int cancel_suck_cannon_suction(void *) __asm__("FUN_L00_002dbe20"); @@ -278,7 +278,7 @@ void ground_melee_enemy_update(Moby *moby) { moby->collision = 0; moby->state = GROUND_ENEMY_STATE_FATAL_KNOCKBACK; ground_enemy_vars->f117 = 120; - effects_start_2E39E0(moby, ground_enemy_vars->effects); + start_hit_color_flash(moby, ground_enemy_vars->effects); } else { if (hit->kind == 180) { ground_enemy_vars->up = lift * 1.35f; @@ -295,7 +295,7 @@ void ground_melee_enemy_update(Moby *moby) { moby->state = GROUND_ENEMY_STATE_HURT_KNOCKBACK; ground_enemy_vars->f117 = 250; ground_enemy_vars->cooldown = scale_game_frames(60); - effects_start_2E39E0(moby, ground_enemy_vars->effects); + start_hit_color_flash(moby, ground_enemy_vars->effects); } } } @@ -674,7 +674,7 @@ void ground_melee_enemy_update(Moby *moby) { mark_moby_for_removal(moby); return; } - effects_update_2E39E0(moby, ground_enemy_vars->effects); + update_hit_color_flash(moby, ground_enemy_vars->effects); } int D_L15_001619D8 = 0x7000000; diff --git a/src/overlays/shared/enemies/horny_toad.c b/src/overlays/shared/enemies/horny_toad.c index 912080c1f5..1b25cb43e6 100644 --- a/src/overlays/shared/enemies/horny_toad.c +++ b/src/overlays/shared/enemies/horny_toad.c @@ -158,8 +158,8 @@ extern void hit_reaction(void *, void *, void *, s32, s32 *, f32 *, s32, s32) __asm__("FUN_L00_0025a478"); extern void trooper_knockback_arc(void *, f32 *, void *, void *) __asm__("FUN_L00_0025ab48"); extern void trooper_start_knockback(void *, void *, f32, s32, s32, s32) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void activate_effect_l08(f32, void *, void *, s32, s32, void *, s32) __asm__("FUN_L00_0025ff38"); extern void FUN_L00_00257470_2d5160(void *, s32, s32) __asm__("FUN_L00_00257470"); @@ -552,11 +552,11 @@ void process_horny_toad_hit_reaction(unsigned char *toad_moby) { *(f32 *)(toad_vars + 0xC4) = reactionC4; MOBY(toad_moby)->state = HORNY_TOAD_DYING; toad_vars[0x67] = 0x78; - trooper_anim_update(toad_moby, toad_vars + 0x60); + start_hit_color_flash(toad_moby, toad_vars + 0x60); FUN_L00_00257470_2d5160(toad_moby, 0, -1); } MOBY(toad_moby)->hit_slot = 0xFF; - trooper_anim_finish(toad_moby, toad_vars + 0x60); + update_hit_color_flash(toad_moby, toad_vars + 0x60); if (MOBY(toad_moby)->state == HORNY_TOAD_WAIT_TO_FOLLOW_PATH) { index = *(s32 *)(toad_vars + 0x1E4); effect = toad_vars + 0x180; diff --git a/src/overlays/shared/enemies/plasmabot.c b/src/overlays/shared/enemies/plasmabot.c index 62dd53f978..dcfda4d765 100644 --- a/src/overlays/shared/enemies/plasmabot.c +++ b/src/overlays/shared/enemies/plasmabot.c @@ -1102,8 +1102,8 @@ void update_plasmabot_target_range(struct Moby *moby) { extern int hit_reaction(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN_L00_0025a478"); extern float plasmabot_stagger_motion_z_scale_gp __asm__("D_L14_001614C8") __attribute__((sda)); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, short *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void func_L00_0025D5B0_i(void *, void *, float, int, int, int) __asm__("FUN_L00_0025c558"); void process_plasmabot_hit_reaction(struct Moby *moby) { @@ -1122,7 +1122,7 @@ void process_plasmabot_hit_reaction(struct Moby *moby) { if (((unsigned char *)moby)[0x20] == 0 || ((unsigned char *)moby)[0x20] == 0xB) { if (((unsigned char *)moby)[0x20] == 0xB) { ((unsigned char *)moby)[0xA4] = 0xFF; - trooper_anim_finish(moby, &state->trooper_anim); + update_hit_color_flash(moby, &state->trooper_anim); } return; } @@ -1206,10 +1206,10 @@ void process_plasmabot_hit_reaction(struct Moby *moby) { case HIT_REACTION_NONE: break; } - trooper_anim_update(moby, (short *)(&state->trooper_anim)); + start_hit_color_flash(moby, (short *)(&state->trooper_anim)); } ((unsigned char *)moby)[0xA4] = 0xFF; - trooper_anim_finish(moby, &state->trooper_anim); + update_hit_color_flash(moby, &state->trooper_anim); } /* steers the moby toward its target: queries the path, eases x/y, then turns to face the heading */ /* Ported from rac1-decomp (src/overlays/shared/vendor_002B2A28.c: func_L14_002B4668), where it is exact; names translated to the US level program. */ diff --git a/src/overlays/shared/enemies/seeker.c b/src/overlays/shared/enemies/seeker.c index d5e9c0ab56..1dc38988d3 100644 --- a/src/overlays/shared/enemies/seeker.c +++ b/src/overlays/shared/enemies/seeker.c @@ -398,8 +398,8 @@ extern float D_0015ED70; extern float D_L09_0016140C __attribute__((sda)); extern int scale_time() __asm__("FUN_001f96b0"); extern void FUN_L00_00257470_c(void *, int, int) __asm__("FUN_L00_00257470"); -extern void trooper_anim_update(void *m, short *p) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *m, void *p) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); int FUN_L00_0025ff38(float best, char *a, char *o, @@ -411,7 +411,7 @@ int select_moby_record_by_xy_distance(char *a, char *o, float best) __asm__("FU void trooper_knockback_arc(void *v, float *ang, float *s1, float *s2) __asm__("FUN_L00_0025ab48"); void trooper_start_knockback(u8 *a, void *b, int c, int d, int e, float f) __asm__("FUN_L00_0025c558"); void FUN_L01_0026e090_c(int i, int v) __asm__("FUN_L01_0026e090"); -extern void func_L00_0025E4B0_2C73D0(void *, void *) __asm__("FUN_L00_0025d458"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); extern void func_L00_0025BBA0_2C73D0(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); extern void func_L00_0025D5B0_2C73D0(void *, void *, float, int, int, int) __asm__("FUN_L00_0025c558"); @@ -465,7 +465,7 @@ void update_seeker_damage_and_target(Moby *moby) { seeker_vars->timer == scale_game_frames(0x78) || seeker_vars->timer == scale_game_frames(0xB3)) { seeker_vars->reactTime = 0xF0; - func_L00_0025E4B0_2C73D0(moby, seeker_vars->react); + start_hit_color_flash(moby, seeker_vars->react); } damage = 0.0f; source = find_moby_hit(moby, 0x330000, 0); @@ -533,10 +533,10 @@ void update_seeker_damage_and_target(Moby *moby) { default: break; } - func_L00_0025E4B0_2C73D0(moby, seeker_vars->react); + start_hit_color_flash(moby, seeker_vars->react); } moby->hit_slot = 0xFF; - trooper_anim_finish(moby, seeker_vars->react); + update_hit_color_flash(moby, seeker_vars->react); if (seeker_vars->f38 != 0 || moby->command == 1) { seeker_vars->retreat = truncate_float_to_s32(func_001F9878_2C73D0(random_float_between(180.0f, 240.0f))); diff --git a/src/overlays/shared/enemies/sentrybot.c b/src/overlays/shared/enemies/sentrybot.c index d38d04c3a1..3c6f9918fc 100644 --- a/src/overlays/shared/enemies/sentrybot.c +++ b/src/overlays/shared/enemies/sentrybot.c @@ -89,7 +89,7 @@ typedef struct SentrybotVars { u8 pad2A[0xE]; s32 unk38; /* 0x38: set: restart target_countdown */ u8 pad3C[0x24]; - u8 trooper_anim[7]; /* 0x60: trooper_anim_update / trooper_anim_finish */ + u8 trooper_anim[7]; /* 0x60: start_hit_color_flash / update_hit_color_flash */ u8 first_channel_blend_target; u8 pad68[8]; SentrybotKnockback knockback; /* 0x70 */ @@ -252,8 +252,8 @@ extern int resolve_moby_hit_response(void *, void *, void *, int, int *, float * extern void trooper_knockback_arc(void *, float *, void *, void *) __asm__("FUN_L00_0025ab48"); extern void trooper_start_knockback(void *, void *, int, int, int, float) __asm__("FUN_L00_0025c558"); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern int FUN_L00_0025ff38(void *, void *, float, int, int, void *, int); extern void draw_offset_textured_effect_quad(void *, int, float, float) __asm__("FUN_L00_00263618"); @@ -1730,10 +1730,10 @@ void update_sentrybot_hit_response_and_target_visibility(void *sentrybot_moby, i sentrybot_data->first_channel_blend_target = 0xF0; break; } - trooper_anim_update(moby, &sentrybot_data->trooper_anim); + start_hit_color_flash(moby, &sentrybot_data->trooper_anim); } MOBY(moby)->hit_slot = 0xFF; - trooper_anim_finish(moby, &sentrybot_data->trooper_anim); + update_hit_color_flash(moby, &sentrybot_data->trooper_anim); if (flag != 0) return; if (sentrybot_data->unk38 != 0) { diff --git a/src/overlays/shared/enemies/spawner.c b/src/overlays/shared/enemies/spawner.c index 28132b0086..a775e42791 100644 --- a/src/overlays/shared/enemies/spawner.c +++ b/src/overlays/shared/enemies/spawner.c @@ -49,8 +49,8 @@ typedef struct SpawnerVars { } SpawnerVars; extern int FUN_L00_0025a478_c(void *, void *, void *, int, int *, float *, int, int) __asm__("FUN_L00_0025a478"); -extern void FUN_L00_0025d458_c(void *, void *) __asm__("FUN_L00_0025d458"); -extern void FUN_L00_0025d538_c(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void FUN_L00_00257470_c(void *, int, int) __asm__("FUN_L00_00257470"); extern int activate_effect_l08(void *, void *, float, void *, int, void *, int) __asm__("FUN_L00_0025ff38"); @@ -106,16 +106,16 @@ void process_spawner_hit_record(struct Moby *moby, char *spawner_vars) { *(float *)(spawner_vars + 0x20) = remaining_value; if (0.0f < remaining_value) { spawner_vars[0x67] = 0x5A; - FUN_L00_0025d458_c(moby, spawner_vars + 0x60); + start_hit_color_flash(moby, spawner_vars + 0x60); } else { FUN_L00_00257470_c(moby, 0, -1); moby->state = SPAWNER_STATE_EXPLODE; spawner_vars[0x67] = 0x78; - FUN_L00_0025d458_c(moby, spawner_vars + 0x60); + start_hit_color_flash(moby, spawner_vars + 0x60); } } moby->hit_slot = 0xFF; - FUN_L00_0025d538_c(moby, spawner_vars + 0x60); + update_hit_color_flash(moby, spawner_vars + 0x60); } /* Counts the live level-0x75E mobys among the 20 slots at +0xB0 and returns the last slot not counted. */ diff --git a/src/overlays/shared/props/trespasser_pad.c b/src/overlays/shared/props/trespasser_pad.c index f8502a6050..4887570fef 100644 --- a/src/overlays/shared/props/trespasser_pad.c +++ b/src/overlays/shared/props/trespasser_pad.c @@ -102,7 +102,7 @@ extern void func_L02_002D9D48_2D9F08(void *, void *, Moby *) __asm__("FUN_L02_00 extern float advance_accelerated_scalar(float *, float *, float, float, float, float) __asm__("FUN_00213f38"); extern void func_L02_002DA820_2D9F08(void) __asm__("FUN_L02_002d93e8"); -extern void func_L00_0025E590_2D9F08(Moby *, Data *) __asm__("FUN_L00_0025d538"); +extern void update_hit_color_flash(Moby *, Data *) __asm__("FUN_L00_0025d538"); extern float D_L02_001D33B0[4][4]; extern Lvl D_L02_001BBB40_2D9F08 __asm__("D_L02_001BB830"); extern int current_level_index_macro __asm__("D_0015ED84") MACRO_ADDR; @@ -443,7 +443,7 @@ void tresspasser_pad_update(Moby *moby) { } break; } - func_L00_0025E590_2D9F08(moby, pad_puzzle_state); + update_hit_color_flash(moby, pad_puzzle_state); } void align_hero_to_tresspasser_pad(struct Moby *moby) __asm__("FUN_L02_002d92f0"); diff --git a/src/overlays/shared/rendering/effects/spawn_explosion.c b/src/overlays/shared/rendering/effects/spawn_explosion.c index af863d0911..2381965955 100644 --- a/src/overlays/shared/rendering/effects/spawn_explosion.c +++ b/src/overlays/shared/rendering/effects/spawn_explosion.c @@ -48,9 +48,9 @@ void clip_negative_segment_endpoint_xyz(V0025d238 *segment_start, V0025d238 *ino } void get_moby_color(void *, int *, int *, int *) __asm__("FUN_L00_00250320"); -void trooper_anim_update(void *a, struct HitColorFlash *s) __asm__("FUN_L00_0025d458"); +void start_hit_color_flash(void *a, struct HitColorFlash *s) __asm__("FUN_L00_0025d458"); -void trooper_anim_update(void *moby, struct HitColorFlash *animation_state) { +void start_hit_color_flash(void *moby, struct HitColorFlash *animation_state) { int previous_timer_frames = animation_state->timer; if (previous_timer_frames == 0 || animation_state->phase != 0) { animation_state->timer = scale_game_frames(animation_state->flash_frames); @@ -74,9 +74,9 @@ void trooper_anim_update(void *moby, struct HitColorFlash *animation_state) { } void set_moby_color(s32, s32, s32, s32) __asm__("FUN_L00_002502f0"); -void trooper_anim_finish(s32 id, struct HitColorFlash *s) __asm__("FUN_L00_0025d538"); +void update_hit_color_flash(s32 id, struct HitColorFlash *s) __asm__("FUN_L00_0025d538"); -void trooper_anim_finish(s32 id, struct HitColorFlash *animation_state) { +void update_hit_color_flash(s32 id, struct HitColorFlash *animation_state) { enum { MOBY_COLOR_PHASE_TO_SECONDARY_COLOR = 0, MOBY_COLOR_PHASE_TO_ORIGINAL_COLOR = 1 diff --git a/src/overlays/shared/weapons/decoy.c b/src/overlays/shared/weapons/decoy.c index 4637f549af..05b599eb48 100644 --- a/src/overlays/shared/weapons/decoy.c +++ b/src/overlays/shared/weapons/decoy.c @@ -155,8 +155,8 @@ extern void draw_moby_oscillating_textured_quads(void) __asm__("FUN_L0 extern float FUN_00200240_2c4380(int) __asm__("FUN_001fa6c0"); extern int FUN_L00_0025a420(void *, int, int); extern int FUN_L00_00258830(void *, void *, float, float, float, int); -extern void trooper_anim_update(void *, void *) __asm__("FUN_L00_0025d458"); -extern void trooper_anim_finish(void *, void *) __asm__("FUN_L00_0025d538"); +extern void start_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d458"); +extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); extern void add_random_offset_to_vector_xyz(float, void *) __asm__("FUN_L00_0025f8e0"); extern void initialize_hit_descriptor(float, void *, void *, int) __asm__("FUN_L00_00259858"); extern int FUN_001fef20_2c4380(int) __asm__("FUN_001f96f8"); @@ -764,7 +764,7 @@ void decoy_update(char *moby) { ((u8 *)decoy_instance_vars)[7] = 0xfa; decoy_instance_vars->health -= len; } - trooper_anim_update(moby, decoy_instance_vars); + start_hit_color_flash(moby, decoy_instance_vars); if (decoy_instance_vars->health < 0.0f) { *(OvlQuad *)scratch.w = 0; scratch.w[0] = frame_scale * 0.5f; @@ -807,7 +807,7 @@ void decoy_update(char *moby) { } } ((u8 *)moby)[0xa4] = 0xff; - trooper_anim_finish(moby, decoy_instance_vars); + update_hit_color_flash(moby, decoy_instance_vars); if (MOBY(moby)->anim_flags & 2) { if (((u8 *)moby)[0x53] != 2) blend_moby_animation(moby, 2, 0, FUN_001fef20_2c4380(10)); From 55a7c52d144dd37a57bc2fca8466bb747b0820e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:08:23 +0000 Subject: [PATCH 064/213] decomp: use the shared hit colour flash layout in enemy and turret pvars --- src/overlays/l01/mobys/birdbot.c | 19 +- src/overlays/l01/mobys/peckbot.c | 137 ++++++----- src/overlays/l02/mobys/constructorbot.c | 22 +- src/overlays/l02/mobys/sand_shark.c | 26 +-- src/overlays/l03/mobys/mine_layer.c | 61 ++--- src/overlays/l03/mobys/robot_dog.c | 107 ++++----- src/overlays/l04/mobys/big_axebot.c | 27 ++- src/overlays/l04/mobys/blarg_trooper.c | 102 ++++----- src/overlays/l04/mobys/circular_saw_enemy.c | 155 +++++++------ src/overlays/l05/mobys/extermibot.c | 16 +- src/overlays/l06/mobys/alien_queen.c | 110 +++++---- src/overlays/l06/mobys/alien_snapper.c | 67 +++--- src/overlays/l07/mobys/bombomatic.c | 44 ++-- src/overlays/l07/mobys/machinegun_turret.c | 54 +++-- src/overlays/l07/mobys/mine_group.c | 42 ++-- src/overlays/l07/mobys/snagglebeast.c | 173 +++++++------- src/overlays/l08/mobys/blarg_bombthrower.c | 90 ++++---- src/overlays/l08/mobys/bolt_thief.c | 49 ++-- src/overlays/l08/mobys/bomber_tank.c | 89 ++++---- src/overlays/l09/mobys/refueling_station.c | 22 +- src/overlays/l10/mobys/blarg_ship.c | 42 ++-- src/overlays/l10/mobys/toxic_crab.c | 213 +++++++++--------- src/overlays/l11/mobys/psytcopus.c | 15 +- src/overlays/l11/mobys/puffoid.c | 25 +- src/overlays/l12/mobys/blarg_helicopter.c | 80 ++++--- src/overlays/l12/mobys/blarg_trooper.c | 81 ++++--- src/overlays/l12/mobys/hoven_anklebiter.c | 75 +++--- src/overlays/l13/mobys/blarg_space_commando.c | 79 ++++--- .../l13/mobys/hovering_rocket_attacker.c | 74 +++--- src/overlays/l13/mobys/qwarks_starfighter.c | 42 ++-- src/overlays/l13/mobys/robosquawker.c | 143 ++++++------ .../l14/mobys/blarg_heavy_interceptor.c | 124 +++++----- src/overlays/l14/mobys/bolt_thief.c | 55 +++-- src/overlays/l14/mobys/flying_car.c | 65 +++--- src/overlays/l14/mobys/machinegun_turret.c | 58 +++-- src/overlays/l16/mobys/bolt_thief.c | 55 +++-- src/overlays/l16/mobys/chomper.c | 60 +++-- src/overlays/l17/mobys/robot_dog.c | 66 +++--- src/overlays/shared/enemies/armed_transport.c | 73 +++--- .../shared/enemies/blarg_elite_commando.c | 158 +++++++------ .../shared/enemies/blarg_paratrooper.c | 15 +- src/overlays/shared/enemies/bomb_spawner.c | 78 ++++--- .../shared/enemies/ground_melee_enemy.c | 135 ++++++----- src/overlays/shared/enemies/plasmabot.c | 125 +++++----- src/overlays/shared/enemies/seeker.c | 77 ++++--- src/overlays/shared/enemies/sentrybot.c | 133 ++++++----- 46 files changed, 1751 insertions(+), 1807 deletions(-) diff --git a/src/overlays/l01/mobys/birdbot.c b/src/overlays/l01/mobys/birdbot.c index 192718b992..f645e8a915 100644 --- a/src/overlays/l01/mobys/birdbot.c +++ b/src/overlays/l01/mobys/birdbot.c @@ -1,5 +1,6 @@ /* Level 01 moby class birdbot. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "rnc/overlay/shared/mobys/knockback_motion.h" @@ -312,9 +313,7 @@ typedef struct { char pad59; unsigned char b5A; char pad5B[5]; - char x60[7]; - unsigned char b67; - char pad68[8]; + struct HitColorFlash hit_flash; struct KnockbackMotion knockback; /* 0x70 */ char xD0[8]; float fD8; @@ -596,16 +595,16 @@ void birdbot_update(PeMoby *birdbot_moby) { 9, scale_game_frames(2), 0); - birdbot_vars->b67 = 0xB4; + birdbot_vars->hit_flash.flash_red = 0xB4; birdbot_moby->state = BIRDBOT_STATE_FATAL_KNOCKBACK; birdbot_moby->h34 &= 0xEFFF; - start_hit_color_flash(birdbot_moby, (short *)birdbot_vars->x60); + start_hit_color_flash(birdbot_moby, &birdbot_vars->hit_flash); birdbot_vars->hit_reaction_cooldown = scale_game_frames(0x3C); break; case BIRDBOT_HIT_REACTION_NONFATAL_KNOCKBACK: case BIRDBOT_HIT_REACTION_ANIMATED_NONFATAL_KNOCKBACK: birdbot_vars->knockback.collision_radius_1024ths = 0x200; - birdbot_vars->b67 = 0x78; + birdbot_vars->hit_flash.flash_red = 0x78; birdbot_vars->knockback.collision_z_offset = 0.5f; birdbot_vars->knockback.gravity = 0.008f; birdbot_vars->knockback.speed = @@ -626,12 +625,12 @@ void birdbot_update(PeMoby *birdbot_moby) { blend_moby_animation(birdbot_moby, 0xB, 0, scale_game_frames(6)); } birdbot_moby->state = BIRDBOT_STATE_NONFATAL_KNOCKBACK; - start_hit_color_flash(birdbot_moby, (short *)birdbot_vars->x60); + start_hit_color_flash(birdbot_moby, &birdbot_vars->hit_flash); break; case BIRDBOT_HIT_REACTION_LOW_SPEED_NONFATAL_KNOCKBACK: case BIRDBOT_HIT_REACTION_LOW_SPEED_NONFATAL_KNOCKBACK_NO_BLEND: birdbot_vars->knockback.collision_radius_1024ths = 0x200; - birdbot_vars->b67 = 0xFA; + birdbot_vars->hit_flash.flash_red = 0xFA; birdbot_vars->knockback.gravity = 0.008f; birdbot_vars->knockback.speed = square_root(birdbot_vars->knockback.speed_approach_step * 2.0f * 1.5f); @@ -648,7 +647,7 @@ void birdbot_update(PeMoby *birdbot_moby) { FUN_L00_0025c558_u( knockback_heading, birdbot_moby, &birdbot_vars->knockback, 0xE, 6, 0); birdbot_moby->state = BIRDBOT_STATE_NONFATAL_KNOCKBACK; - start_hit_color_flash(birdbot_moby, (short *)birdbot_vars->x60); + start_hit_color_flash(birdbot_moby, &birdbot_vars->hit_flash); break; } } @@ -1286,7 +1285,7 @@ void birdbot_update(PeMoby *birdbot_moby) { } break; } - update_hit_color_flash(birdbot_moby, birdbot_vars->x60); + update_hit_color_flash(birdbot_moby, &birdbot_vars->hit_flash); birdbot_vars->previous_animation_frame = frame; if (birdbot_moby->state == BIRDBOT_STATE_TRACK_TARGET_AND_SELECT_ACTION || birdbot_moby->state == 5 || birdbot_moby->state == BIRDBOT_STATE_FIRE_BURST || diff --git a/src/overlays/l01/mobys/peckbot.c b/src/overlays/l01/mobys/peckbot.c index f1961f7c0e..3230f5ffa6 100644 --- a/src/overlays/l01/mobys/peckbot.c +++ b/src/overlays/l01/mobys/peckbot.c @@ -1,5 +1,6 @@ /* Level 01 moby class peckbot. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/math_consts.h" #include "rnc/globals.h" @@ -89,70 +90,68 @@ typedef struct MobyNode { } MobyNode; typedef struct { - u8 pad0[0x20]; - f32 health; - s16 x24; - s16 flee_timer; - u8 pad28; - u8 x29; - u8 pad2a[0xE]; - s32 x38; - u8 pad3c[0x4]; - Vec577 vel; - u8 pad50[0x8]; - u8 x58; - u8 pad59; - u8 x5A; - u8 pad5b[0x6D]; - s16 xC8; - u8 padca[0x6]; - void *xD0; - u8 padd4[0x3C]; - u8 fx110[0x7]; - u8 x117; - u8 pad118[0x8]; - u8 knock[0x10]; - f32 x130; - f32 x134; - f32 x138; - f32 x13C; - u8 pad140[0x4]; - s32 x144; - u8 pad148[0x15]; - u8 x15D; - u8 pad15e[0x12]; - f32 x170; - f32 x174; - u8 pad178[0x8]; - s32 x180; - u8 pad184[0x4]; - f32 x188; - f32 x18C; - u8 pad190[0x8]; - f32 x198; - u8 pad19c[0x8]; - f32 x1A4; - u8 pad1a8[0x28]; - Vec577 home; - Vec577 dest; - u8 turn[0x4]; - f32 turn_off; - f32 turn_deg; - f32 range; - u8 pad200[0x4]; - f32 speed; - s16 x208; - s16 x20A; - s32 idle_timer; - s32 turn_timer; - s16 x214; - s16 x216; - Mob577 *leader; - s32 path; - u8 pad220[0x8]; - s32 x228; - u8 pad22c[0x4]; - u8 x230[0x10]; + u8 pad0[0x20]; + f32 health; + s16 x24; + s16 flee_timer; + u8 pad28; + u8 x29; + u8 pad2a[0xE]; + s32 x38; + u8 pad3c[0x4]; + Vec577 vel; + u8 pad50[0x8]; + u8 x58; + u8 pad59; + u8 x5A; + u8 pad5b[0x6D]; + s16 xC8; + u8 padca[0x6]; + void *xD0; + u8 padd4[0x3C]; + struct HitColorFlash hit_flash; + u8 knock[0x10]; + f32 x130; + f32 x134; + f32 x138; + f32 x13C; + u8 pad140[0x4]; + s32 x144; + u8 pad148[0x15]; + u8 x15D; + u8 pad15e[0x12]; + f32 x170; + f32 x174; + u8 pad178[0x8]; + s32 x180; + u8 pad184[0x4]; + f32 x188; + f32 x18C; + u8 pad190[0x8]; + f32 x198; + u8 pad19c[0x8]; + f32 x1A4; + u8 pad1a8[0x28]; + Vec577 home; + Vec577 dest; + u8 turn[0x4]; + f32 turn_off; + f32 turn_deg; + f32 range; + u8 pad200[0x4]; + f32 speed; + s16 x208; + s16 x20A; + s32 idle_timer; + s32 turn_timer; + s16 x214; + s16 x216; + Mob577 *leader; + s32 path; + u8 pad220[0x8]; + s32 x228; + u8 pad22c[0x4]; + u8 x230[0x10]; } Mob577Vars; typedef struct { @@ -311,8 +310,8 @@ void peckbot_update(Mob577 *peckbot_moby) { peckbot_vars->x170 = 11.0f; peckbot_vars->x174 = 18.0f; peckbot_moby->state = PECKBOT_STATE_FATAL_KNOCKBACK; - peckbot_vars->x117 = 0x78; - start_hit_color_flash(peckbot_moby, peckbot_vars->fx110); + peckbot_vars->hit_flash.flash_red = 0x78; + start_hit_color_flash(peckbot_moby, &peckbot_vars->hit_flash); FUN_L00_00257470(peckbot_moby, 0, -1); } else { vector_scratch.q = hit->pos; @@ -322,9 +321,9 @@ void peckbot_update(Mob577 *peckbot_moby) { peckbot_vars->x170 = 5.0f; peckbot_vars->x174 = 10.0f; peckbot_moby->state = PECKBOT_STATE_NONFATAL_KNOCKBACK; - peckbot_vars->x117 = 0xFA; + peckbot_vars->hit_flash.flash_red = 0xFA; peckbot_vars->flee_timer = scale_game_frames(0x3C); - start_hit_color_flash(peckbot_moby, peckbot_vars->fx110); + start_hit_color_flash(peckbot_moby, &peckbot_vars->hit_flash); } } } @@ -865,6 +864,6 @@ void peckbot_update(Mob577 *peckbot_moby) { peckbot_moby->hit = 0; break; } - update_hit_color_flash(peckbot_moby, peckbot_vars->fx110); + update_hit_color_flash(peckbot_moby, &peckbot_vars->hit_flash); FUN_L00_0025a120(peckbot_moby); } diff --git a/src/overlays/l02/mobys/constructorbot.c b/src/overlays/l02/mobys/constructorbot.c index 3350922ce2..6fd3221efd 100644 --- a/src/overlays/l02/mobys/constructorbot.c +++ b/src/overlays/l02/mobys/constructorbot.c @@ -1,5 +1,6 @@ /* Level 02 moby class constructorbot (0x264): its update, and its damage handling and retargeting. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -562,13 +563,10 @@ extern int select_moby_target_goal(char *a, char *o, float best) __asm__("FUN_L0 /* pvars of the class FUN_L02_002d85b8 serves (only the fields it touches). */ typedef struct { - char pad0[0x20]; - float hp; /* 0x20 */ - char pad24[0x3C]; - short anim[3]; /* 0x60: passed to start_hit_color_flash / update_hit_color_flash */ - unsigned char pad66; - unsigned char flash; /* 0x67 */ - char pad68[8]; + char pad0[0x20]; + float hp; /* 0x20 */ + char pad24[0x3C]; + struct HitColorFlash hit_flash; struct KnockbackMotion knockback; /* 0x70 */ char padD0[0x150]; char *target; /* 0x220 */ @@ -596,10 +594,10 @@ void handle_constructorbot_damage_and_retargeting(void *owner_moby) { moby_vars->knockback.collision_z_offset = 0.6f; if (0.0f < moby_vars->hp) { if (dmg < 1.0f) { - moby_vars->flash = 100; + moby_vars->hit_flash.flash_red = 100; } else { void *k = &moby_vars->knockback; - moby_vars->flash = 0x78; + moby_vars->hit_flash.flash_red = 0x78; moby_vars->knockback.gravity = constructorbot_gravity_gp * frame_time_sq; moby_vars->knockback.speed_approach_step = constructorbot_hit_knockback_horizontal_speed_approach_rate_gp * frame_time_sq; @@ -646,10 +644,10 @@ void handle_constructorbot_damage_and_retargeting(void *owner_moby) { moby_vars->knockback.apex_animation_frame = 6.5f; moby_vars->knockback.landing_animation_frame = 13.0f; MOBY(moby)->flags &= 0xEFFF; - moby_vars->flash = 0xFA; + moby_vars->hit_flash.flash_red = 0xFA; moby[0x20] = 0x11; } - start_hit_color_flash(moby, moby_vars->anim); + start_hit_color_flash(moby, &moby_vars->hit_flash); } ((unsigned char *)moby)[0xA4] = 0xFF; current_target = moby_vars->target; @@ -663,5 +661,5 @@ void handle_constructorbot_damage_and_retargeting(void *owner_moby) { if (moby_vars->target == 0) { moby_vars->target = ((char *)hero.moby); } - update_hit_color_flash(moby, moby_vars->anim); + update_hit_color_flash(moby, &moby_vars->hit_flash); } diff --git a/src/overlays/l02/mobys/sand_shark.c b/src/overlays/l02/mobys/sand_shark.c index 1c1b17020d..4c7dc85694 100644 --- a/src/overlays/l02/mobys/sand_shark.c +++ b/src/overlays/l02/mobys/sand_shark.c @@ -1,5 +1,6 @@ /* Level 02 moby class sand_shark. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -1201,17 +1202,14 @@ void emit_sand_shark_single_particle(Vec4 *from) { /* pvars of the class FUN_L02_002d5c88 updates (only the fields it touches). */ typedef struct { - char pad0[0x20]; - float hp; /* 0x20 */ - char pad24[0xA]; - unsigned char relaunch_request_state; /* 0x2E: 2 = respawn requested */ - char pad2F[9]; - int target_range_timer_refresh_request; /* 0x38 */ - char pad3C[0xD4]; - short anim[3]; /* 0x110: passed to start_hit_color_flash / update_hit_color_flash */ - char pad116; - unsigned char hit_flash_target_red; /* 0x117 */ - char pad118[8]; + char pad0[0x20]; + float hp; /* 0x20 */ + char pad24[0xA]; + unsigned char relaunch_request_state; /* 0x2E: 2 = respawn requested */ + char pad2F[9]; + int target_range_timer_refresh_request; /* 0x38 */ + char pad3C[0xD4]; + struct HitColorFlash hit_flash; struct KnockbackMotion knockback; /* 0x120 */ char pad180[0x50]; float tgt[4]; /* 0x1D0: point followed along the path */ @@ -1357,12 +1355,12 @@ void handle_sand_shark_damage_and_targeting(unsigned char *moby) { moby_vars->knockback.landing_animation_frame = 14.0f; moby[0x20] = 0x18; MOBY(moby)->collision = 0; - moby_vars->hit_flash_target_red = 0x78; - start_hit_color_flash(moby, moby_vars->anim); + moby_vars->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &moby_vars->hit_flash); } } moby[0xA4] = 0xFF; - update_hit_color_flash(moby, moby_vars->anim); + update_hit_color_flash(moby, &moby_vars->hit_flash); path = D_L02_001B0AB0_5c88[moby_vars->configured_path_index]; if (FUN_L00_0025ff38(moby_vars->effective_target_selection_range, moby, diff --git a/src/overlays/l03/mobys/mine_layer.c b/src/overlays/l03/mobys/mine_layer.c index 7c7bd4c2ab..13b8b60c7a 100644 --- a/src/overlays/l03/mobys/mine_layer.c +++ b/src/overlays/l03/mobys/mine_layer.c @@ -1,5 +1,6 @@ /* Level 03 moby class mine_layer: patrols a path and lobs mines. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/world/level_path.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -35,34 +36,34 @@ typedef struct { /* Pvars of the l03 trooper. */ typedef struct { - u8 pad0[0x20]; - f32 health; /* 0x20 */ - s16 max_health; - u8 pad26[2]; - u8 hit_response_class; - u8 unk29; - u8 pad2A[0xE]; - s32 alerted; /* 0x38: set when it is hit */ - u8 pad3C[4]; - u8 effect[0x18]; /* 0x40: debris record (spawn_explosion, FUN_L00_00259028) */ - u8 unk58; - u8 pad59; - u8 unk5A; - u8 pad5B[5]; - u8 anim[0x10]; /* 0x60: animation driver */ - u8 knockback[0x10]; /* 0x70 */ - f32 kb_speed; /* 0x80 */ - u8 pad84[4]; - f32 kb_lift; /* 0x88 */ - f32 kb_gravity; /* 0x8C */ - u8 pad90[4]; - s32 kb_frames; /* 0x94 */ - u8 pad98[0x15]; - u8 kb_landed; /* 0xAD */ - u8 padAE[0x12]; - f32 kb_min; /* 0xC0 */ - f32 kb_max; /* 0xC4 */ - u8 padC8[8]; + u8 pad0[0x20]; + f32 health; /* 0x20 */ + s16 max_health; + u8 pad26[2]; + u8 hit_response_class; + u8 unk29; + u8 pad2A[0xE]; + s32 alerted; /* 0x38: set when it is hit */ + u8 pad3C[4]; + u8 effect[0x18]; /* 0x40: debris record (spawn_explosion, FUN_L00_00259028) */ + u8 unk58; + u8 pad59; + u8 unk5A; + u8 pad5B[5]; + struct HitColorFlash hit_flash; + u8 knockback[0x10]; /* 0x70 */ + f32 kb_speed; /* 0x80 */ + u8 pad84[4]; + f32 kb_lift; /* 0x88 */ + f32 kb_gravity; /* 0x8C */ + u8 pad90[4]; + s32 kb_frames; /* 0x94 */ + u8 pad98[0x15]; + u8 kb_landed; /* 0xAD */ + u8 padAE[0x12]; + f32 kb_min; /* 0xC0 */ + f32 kb_max; /* 0xC4 */ + u8 padC8[8]; struct GroundMoveControl walk; /* 0xD0 */ TrooperPatrol patrol; /* 0x120 */ u8 pad138[0x18]; @@ -485,10 +486,10 @@ void handle_mine_layer_damage(struct Moby *damaged_moby) { damaged_moby->state = MINE_LAYER_KNOCKBACK_UNTIL_EXPLOSION; break; } - start_hit_color_flash(damaged_moby, trooper_vars->anim); + start_hit_color_flash(damaged_moby, &trooper_vars->hit_flash); } damaged_moby->hit_slot = 0xFF; - update_hit_color_flash(damaged_moby, trooper_vars->anim); + update_hit_color_flash(damaged_moby, &trooper_vars->hit_flash); } extern void set_path_2cc888(void *, void *, int, int, int, float) __asm__("FUN_L00_0025c558"); diff --git a/src/overlays/l03/mobys/robot_dog.c b/src/overlays/l03/mobys/robot_dog.c index 874660e45e..2174bcc883 100644 --- a/src/overlays/l03/mobys/robot_dog.c +++ b/src/overlays/l03/mobys/robot_dog.c @@ -1,5 +1,6 @@ /* Level 03 moby class robot_dog. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/mobys/moby_state.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -63,58 +64,58 @@ typedef struct { } Tgt2c5bb8; typedef struct { - char p00[0x20]; - float f20; - short s24; - char p26[3]; - u8 b29; - char p2A[0x16]; - float v40[4]; - char p50[8]; - u8 b58; - char p59; - u8 b5A; - char p5B[0x6D]; - short sC8; - char pCA[6]; - void *pD0; - char pD4[0x3C]; - char animation_state[0x10]; - char knockback_motion_state[0x60]; - int i180; - char p184[4]; - float movement_drop_limit; - float movement_rise_limit; - char p190[0x14]; - float max_movement_step; - float movement_heading_error_limit; - float movement_arrival_distance; - char p1B0[8]; - int movement_control_flags; - float path_turn_spring_strength; - float path_turn_damping_factor; - float path_turn_step_limit; - char p1C8[0x38]; - float home[4]; - char p210[0x10]; - float v220[4]; - float target_engagement_radius; - float movement_speed; - char p238[4]; - int chase_timer; - int extended_engagement_radius_timer; - int melee_cooldown_timer; - int linked_partner_index; - char p24C[0x14]; - int i260; - float f264; - char p268[4]; - int i26C; - int activation_path_index; - float path_activation_distance; - int path_target_node_index; - int activation_clip_volume_id; - char m280[0x10]; + char p00[0x20]; + float f20; + short s24; + char p26[3]; + u8 b29; + char p2A[0x16]; + float v40[4]; + char p50[8]; + u8 b58; + char p59; + u8 b5A; + char p5B[0x6D]; + short sC8; + char pCA[6]; + void *pD0; + char pD4[0x3C]; + struct HitColorFlash hit_flash; + char knockback_motion_state[0x60]; + int i180; + char p184[4]; + float movement_drop_limit; + float movement_rise_limit; + char p190[0x14]; + float max_movement_step; + float movement_heading_error_limit; + float movement_arrival_distance; + char p1B0[8]; + int movement_control_flags; + float path_turn_spring_strength; + float path_turn_damping_factor; + float path_turn_step_limit; + char p1C8[0x38]; + float home[4]; + char p210[0x10]; + float v220[4]; + float target_engagement_radius; + float movement_speed; + char p238[4]; + int chase_timer; + int extended_engagement_radius_timer; + int melee_cooldown_timer; + int linked_partner_index; + char p24C[0x14]; + int i260; + float f264; + char p268[4]; + int i26C; + int activation_path_index; + float path_activation_distance; + int path_target_node_index; + int activation_clip_volume_id; + char m280[0x10]; } Data2c5bb8; extern char *D_L03_0015FFD8_c5bb8 __asm__("D_L03_0015FFD8"); @@ -491,7 +492,7 @@ void robot_dog_update(char *moby) { if (((unsigned char *)moby)[0x31] != 0 && fast_vec_dist(moby + 0x10, D_L03_00166EC0) < 32.0f) { FUN_L00_0025a120(moby); } - update_hit_color_flash(moby, robot_dog_state->animation_state); + update_hit_color_flash(moby, &robot_dog_state->hit_flash); ((unsigned char *)moby)[0xBC] = 0; } /* Applies damage reaction, knockback parameters and animation state. */ diff --git a/src/overlays/l04/mobys/big_axebot.c b/src/overlays/l04/mobys/big_axebot.c index 57697c94bf..73e2ed9f63 100644 --- a/src/overlays/l04/mobys/big_axebot.c +++ b/src/overlays/l04/mobys/big_axebot.c @@ -1,5 +1,6 @@ /* Level 04 moby class big_axebot: the large axe-swinging robot, and the spawn of its axe. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "qcopy.h" @@ -138,9 +139,7 @@ typedef struct D_B7B0 { char pad59; unsigned char f5A; char pad5B[0x55]; - char hit_transition_state[7]; - unsigned char fB7; - char padB8[8]; + struct HitColorFlash hit_flash; struct KnockbackMotion knockback; /* 0xC0 */ Manip_B7B0 recoil_manipulator; Manip_B7B0 aim_manipulator; @@ -391,8 +390,8 @@ void big_axebot_update(M_B7B0 *moby) { data->recoil_pitch_angle = -0.5235988f; } data->recoil_pose_cooldown_timer = scale_game_frames(0x1E); - data->fB7 = 0x78; - start_hit_color_flash(moby, (short *)data->hit_transition_state); + data->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &data->hit_flash); } else { switch (hit_reaction_result) { case BIG_AXEBOT_HIT_REACTION_NONE: @@ -414,8 +413,8 @@ void big_axebot_update(M_B7B0 *moby) { moby->state = BIG_AXEBOT_STATE_HIT_RECOVERY; } data->recoil_displacement = 3.4f / scale_time(7.0f) * 0.5f; - data->fB7 = 0x78; - start_hit_color_flash(moby, (short *)data->hit_transition_state); + data->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &data->hit_flash); data->hit_response_cooldown_timer = scale_game_frames(0x46); data->extended_detection_timer = scale_game_frames(0xF0); break; @@ -434,8 +433,8 @@ void big_axebot_update(M_B7B0 *moby) { data->knockback.apex_animation_frame = 5.0f; data->knockback.landing_animation_frame = 10.0f; data->recoil_displacement = 3.4f / scale_time(7.0f); - data->fB7 = 0x78; - start_hit_color_flash(moby, (short *)data->hit_transition_state); + data->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &data->hit_flash); data->hit_response_cooldown_timer = scale_game_frames(0x46); data->extended_detection_timer = scale_game_frames(0xF0); break; @@ -447,8 +446,8 @@ void big_axebot_update(M_B7B0 *moby) { data->idle_action_delay_timer = scale_game_frames(0x28); moby->state = BIG_AXEBOT_STATE_IDLE; data->recoil_displacement = 3.4f / scale_time(7.0f); - data->fB7 = 0x78; - start_hit_color_flash(moby, (short *)data->hit_transition_state); + data->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &data->hit_flash); data->hit_response_cooldown_timer = scale_game_frames(0x46); data->extended_detection_timer = scale_game_frames(0xF0); break; @@ -465,8 +464,8 @@ void big_axebot_update(M_B7B0 *moby) { data->knockback.apex_animation_frame = 12.0f; data->knockback.landing_animation_frame = 25.0f; moby->state = BIG_AXEBOT_STATE_DYING; - data->fB7 = 0x78; - start_hit_color_flash(moby, (short *)data->hit_transition_state); + data->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &data->hit_flash); FUN_L00_00257470(moby, 0, -1); break; case BIG_AXEBOT_HIT_REACTION_SKIP_ADDITIONAL_RESPONSE: @@ -903,7 +902,7 @@ void big_axebot_update(M_B7B0 *moby) { } break; } - update_hit_color_flash(moby, data->hit_transition_state); + update_hit_color_flash(moby, &data->hit_flash); if (data->recoil_displacement > 0.0f) { struct Hero *h = &hero; diff --git a/src/overlays/l04/mobys/blarg_trooper.c b/src/overlays/l04/mobys/blarg_trooper.c index 52ce9e4529..1d379688dc 100644 --- a/src/overlays/l04/mobys/blarg_trooper.c +++ b/src/overlays/l04/mobys/blarg_trooper.c @@ -1,5 +1,6 @@ /* Level 04 moby class blarg_trooper. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "qcopy.h" @@ -17,53 +18,50 @@ #include "rnc/overlay/shared/math/quad.h" typedef struct BlargTrooperVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 unk29; - u8 pad_2A[0x4]; - u8 unk2E; - u8 pad_2F[0x9]; - s32 retimer; - u8 pad_3C[0x1C]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x5]; - s16 anim_state; - u8 pad_62[0x5]; - u8 hit_flash_target_red; - u8 pad_68[0x8]; - f32 motion[4]; - f32 unk80[4]; - u8 pad_90[0x30]; - f32 unkC0[4]; - f32 unkD0[4]; - s32 path_when_selected; - s32 path_when_unselected; - s16 path_selector; - u8 pad_EA[0x2]; - f32 yaw_turn_velocity; - s16 timer_F0; - s16 timer_F2; - f32 recoil_speed; - char *gun_moby; - u8 unkFC; - u8 unkFD; - u8 unkFE; - u8 unkFF; - u8 pad_100[0x8]; - s32 timer_108; - u8 pad_10C[0x4]; - f32 manipulator0[4]; - u8 pad_120[0x58]; - f32 unk178; - u8 pad_17C[0x14]; - f32 manipulator1[4]; - u8 pad_1A0[0x58]; - f32 unk1F8; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 unk29; + u8 pad_2A[0x4]; + u8 unk2E; + u8 pad_2F[0x9]; + s32 retimer; + u8 pad_3C[0x1C]; + u8 unk58; + u8 pad_59[0x1]; + u8 unk5A; + u8 pad_5B[0x5]; + struct HitColorFlash hit_flash; + f32 motion[4]; + f32 unk80[4]; + u8 pad_90[0x30]; + f32 unkC0[4]; + f32 unkD0[4]; + s32 path_when_selected; + s32 path_when_unselected; + s16 path_selector; + u8 pad_EA[0x2]; + f32 yaw_turn_velocity; + s16 timer_F0; + s16 timer_F2; + f32 recoil_speed; + char *gun_moby; + u8 unkFC; + u8 unkFD; + u8 unkFE; + u8 unkFF; + u8 pad_100[0x8]; + s32 timer_108; + u8 pad_10C[0x4]; + f32 manipulator0[4]; + u8 pad_120[0x58]; + f32 unk178; + u8 pad_17C[0x14]; + f32 manipulator1[4]; + u8 pad_1A0[0x58]; + f32 unk1F8; } BlargTrooperVars; /* Ported from rac1-decomp (src/overlays/l04_eudora/vendor_0029FCF0.c: func_L04_002C5B88), where it is exact; names translated to the US level program. */ @@ -315,7 +313,7 @@ void blarg_trooper_update(struct Moby *moby) { case BLARG_TROOPER_HIT_REACTION_FATAL: case BLARG_TROOPER_HIT_REACTION_FATAL_KNOCKBACK: moby->flags &= 0xEFFF; - blarg_trooper_pvars->hit_flash_target_red = 0xFA; + blarg_trooper_pvars->hit_flash.flash_red = 0xFA; { float a = frame_time_sq * 37.0f; float b = frame_time * 17.0f; @@ -341,7 +339,7 @@ void blarg_trooper_update(struct Moby *moby) { case BLARG_TROOPER_HIT_REACTION_START_HIT_RECOVERY: case BLARG_TROOPER_HIT_REACTION_RECOIL_RECOVERY: { int attacker_class; - blarg_trooper_pvars->hit_flash_target_red = 0x96; + blarg_trooper_pvars->hit_flash.flash_red = 0x96; blend_moby_animation(moby, (void *)8, 0, (void *)scale_game_frames(5)); moby->state = BLARG_TROOPER_STATE_HIT_RECOVERY; attacker_class = *(short *)(*(char **)(hit + 0x20) + 0xA6); @@ -360,7 +358,7 @@ void blarg_trooper_update(struct Moby *moby) { } case BLARG_TROOPER_HIT_REACTION_START_KNOCKBACK_RECOVERY: case BLARG_TROOPER_HIT_REACTION_KNOCKBACK_RECOVERY: - blarg_trooper_pvars->hit_flash_target_red = 0xFA; + blarg_trooper_pvars->hit_flash.flash_red = 0xFA; blend_moby_animation(moby, (void *)0xC, 0, (void *)scale_game_frames(5)); moby->state = BLARG_TROOPER_STATE_KNOCKBACK_RECOVERY; blarg_trooper_pvars->recoil_speed = 2.0f / scale_time(15.0f); @@ -378,7 +376,7 @@ void blarg_trooper_update(struct Moby *moby) { case BLARG_TROOPER_HIT_REACTION_IGNORED: break; } - start_hit_color_flash(moby, &blarg_trooper_pvars->anim_state); + start_hit_color_flash(moby, &blarg_trooper_pvars->hit_flash); } moby->hit_slot = 0xFF; if (blarg_trooper_pvars->retimer != 0) { @@ -770,7 +768,7 @@ void blarg_trooper_update(struct Moby *moby) { } break; } - update_hit_color_flash(moby, &blarg_trooper_pvars->anim_state); + update_hit_color_flash(moby, &blarg_trooper_pvars->hit_flash); { int current_state = moby->state; if (current_state == BLARG_TROOPER_STATE_IDLE || diff --git a/src/overlays/l04/mobys/circular_saw_enemy.c b/src/overlays/l04/mobys/circular_saw_enemy.c index ef4039dc97..5a2adf72d9 100644 --- a/src/overlays/l04/mobys/circular_saw_enemy.c +++ b/src/overlays/l04/mobys/circular_saw_enemy.c @@ -1,5 +1,6 @@ /* Level 04 moby class circular_saw_enemy: flying saw blades that flock and attack, and their suck cannon methods. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "qcopy.h" @@ -319,79 +320,77 @@ extern void FUN_L00_00263ac8(float, int, int, unsigned char *); typedef float V4_35F0[4] __attribute__((aligned(16))); typedef struct D_35F0 { - char pad00[0x20]; - float hp; - short max_health; - char pad26[2]; - unsigned char hit_response_class; - unsigned char f29; - char pad2A[4]; - unsigned char f2E; - char pad2F; - float f30; - char pad34[4]; - int alert_range_refresh_trigger; - char pad3C[0x1C]; - unsigned char f58; - char pad59; - unsigned char f5A; - char pad5B[5]; - int f60; - float f64; - float f68; - float f6C; - char pad70[8]; - float downward_move_step; - char pad7C[8]; - float f84; - char pad88[0x10]; - int f98; - char pad9C[0x14]; - char fB0[7]; - unsigned char fB7; - char padB8[8]; - char fC0[0x10]; - float fD0; - float fD4; - float fD8; - char padDC[8]; - int fE4; - char padE8[0x15]; - unsigned char fFD; - char padFE[0x22]; - V4_35F0 home_position; - float yaw_turn_step; - char pad134[2]; - short alert_range_timer; - int movement_boundary_path_index; - float knockback_move_step; - float target_detection_range; - short movement_animation_change_timer; - short action_timer; - char pad148[4]; - unsigned char movement_direction_index; - unsigned char hit_reaction_cooldown_timer; - unsigned short combat_history_flags; - int patrol_path_index; - int f154; - short f158; - short point_attack_phase; - char pad15C[4]; - int point_attack_cuboid_indices[4]; - char pad170[0x78]; - short suck_cannon_phase; - char pad1EA[6]; - short *suck_cannon_config; - char pad1F4[0x44]; - int engine_sound_voice_handle; - char pad23C[4]; - V4_35F0 f240; - char pad250[4]; - float wander_move_step; - float wander_turn_step; - float wander_radius; - char pad260[0x10]; - unsigned char f270[4]; + char pad00[0x20]; + float hp; + short max_health; + char pad26[2]; + unsigned char hit_response_class; + unsigned char f29; + char pad2A[4]; + unsigned char f2E; + char pad2F; + float f30; + char pad34[4]; + int alert_range_refresh_trigger; + char pad3C[0x1C]; + unsigned char f58; + char pad59; + unsigned char f5A; + char pad5B[5]; + int f60; + float f64; + float f68; + float f6C; + char pad70[8]; + float downward_move_step; + char pad7C[8]; + float f84; + char pad88[0x10]; + int f98; + char pad9C[0x14]; + struct HitColorFlash hit_flash; + char fC0[0x10]; + float fD0; + float fD4; + float fD8; + char padDC[8]; + int fE4; + char padE8[0x15]; + unsigned char fFD; + char padFE[0x22]; + V4_35F0 home_position; + float yaw_turn_step; + char pad134[2]; + short alert_range_timer; + int movement_boundary_path_index; + float knockback_move_step; + float target_detection_range; + short movement_animation_change_timer; + short action_timer; + char pad148[4]; + unsigned char movement_direction_index; + unsigned char hit_reaction_cooldown_timer; + unsigned short combat_history_flags; + int patrol_path_index; + int f154; + short f158; + short point_attack_phase; + char pad15C[4]; + int point_attack_cuboid_indices[4]; + char pad170[0x78]; + short suck_cannon_phase; + char pad1EA[6]; + short *suck_cannon_config; + char pad1F4[0x44]; + int engine_sound_voice_handle; + char pad23C[4]; + V4_35F0 f240; + char pad250[4]; + float wander_move_step; + float wander_turn_step; + float wander_radius; + char pad260[0x10]; + unsigned char f270[4]; } D_35F0; typedef struct M_35F0 { @@ -614,11 +613,11 @@ void circular_saw_enemy_update(M_35F0 *moby) { } moby->state = CIRCULAR_SAW_STATE_HIT_RECOVERY; moby->rot = fast_add_rotations(3.1415927f, ang); - data->fB7 = 0x78; - start_hit_color_flash(moby, (short *)data->fB0); + data->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &data->hit_flash); data->hit_reaction_cooldown_timer = scale_game_frames(0x14); - data->fB7 = 0x78; - start_hit_color_flash(moby, (short *)data->fB0); + data->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &data->hit_flash); data->hit_reaction_cooldown_timer = scale_game_frames(0x14); break; case CIRCULAR_SAW_HIT_REACTION_IGNORED: @@ -1155,7 +1154,7 @@ void circular_saw_enemy_update(M_35F0 *moby) { scale_game_frames(alt ? random_int_between(10, 15) : random_int_between(20, 30))); } } - update_hit_color_flash(moby, data->fB0); + update_hit_color_flash(moby, &data->hit_flash); } extern int launch_suck_cannon_projectile(char *, int, int, float) __asm__("FUN_L00_002dbc30"); diff --git a/src/overlays/l05/mobys/extermibot.c b/src/overlays/l05/mobys/extermibot.c index 4c247a36e4..65ba1477f3 100644 --- a/src/overlays/l05/mobys/extermibot.c +++ b/src/overlays/l05/mobys/extermibot.c @@ -1,5 +1,6 @@ /* Level 05 moby class extermibot. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/world/level_path.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -677,10 +678,7 @@ typedef struct Wing { char pad1[0x14]; int targeting_range_boost_pending; char pad2[0x24]; - short f60[3]; - char pad3[0x1]; - unsigned char hit_flash_target; - char pad4[0x8]; + struct HitColorFlash hit_flash; struct KnockbackMotion knockback; /* 0x70 */ char pad8[0x50]; char selected_target_position_xy[8]; @@ -816,7 +814,7 @@ void handle_extermibot_hits_and_update_targeting(Moby *moby) { break; case EXTERMIBOT_HIT_FLASH: case EXTERMIBOT_HIT_FLASH_ONLY: - moby_data->hit_flash_target = 0xFA; + moby_data->hit_flash.flash_red = 0xFA; break; case EXTERMIBOT_HIT_NONLETHAL_KNOCKBACK: case EXTERMIBOT_HIT_KNOCKBACK_AND_FLASH: @@ -839,7 +837,7 @@ void handle_extermibot_hits_and_update_targeting(Moby *moby) { trooper_start_knockback( moby, &moby_data->knockback, nonlethal_knockback_heading, 5, 1, 0); moby->state = EXTERMIBOT_NONLETHAL_KNOCKBACK; - moby_data->hit_flash_target = 0x78; + moby_data->hit_flash.flash_red = 0x78; break; case EXTERMIBOT_HIT_LETHAL: case EXTERMIBOT_HIT_DEATH_KNOCKBACK: @@ -859,7 +857,7 @@ void handle_extermibot_hits_and_update_targeting(Moby *moby) { &moby_data->knockback.vertical_speed); trooper_start_knockback(moby, &moby_data->knockback, death_knockback_heading, 6, 1, 0); moby->state = EXTERMIBOT_DEATH_KNOCKBACK; - moby_data->hit_flash_target = 0xF0; + moby_data->hit_flash.flash_red = 0xF0; if (hit_record->who != 0 && *(struct Moby **)&hit_record->who->pclass != 0 && *(short *)((u8 *)((struct Moby *)hit_record->who->pclass) + 0x46) == 5) { stop_animation_l08(moby, 0x800, -1); @@ -868,10 +866,10 @@ void handle_extermibot_hits_and_update_targeting(Moby *moby) { } break; } - start_hit_color_flash(moby, moby_data->f60); + start_hit_color_flash(moby, &moby_data->hit_flash); } moby->hit_slot = 0xFF; - update_hit_color_flash(moby, moby_data->f60); + update_hit_color_flash(moby, &moby_data->hit_flash); if (moby_data->targeting_range_boost_pending != 0) { moby_data->targeting_range_boost_timer = truncate_float_to_s32(scale_time(random_float_between(180.0f, 240.0f))); diff --git a/src/overlays/l06/mobys/alien_queen.c b/src/overlays/l06/mobys/alien_queen.c index 99ac89941b..779d1e8c0a 100644 --- a/src/overlays/l06/mobys/alien_queen.c +++ b/src/overlays/l06/mobys/alien_queen.c @@ -1,6 +1,7 @@ /* Level 06 moby class 0x41b: alien queen. */ #include "rnc/input/pad_globals.h" #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/mobys/moby.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -356,58 +357,55 @@ void clear_moby_list_state_18(int index) { } typedef struct AlienQueenVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 unk29; - u8 pad_2A[0x4]; - u8 death_control_flags; - u8 pad_2F[0x19]; - f32 z_velocity; - u8 pad_4C[0xC]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x5]; - u8 anim_state; - u8 pad_61[0x6]; - u8 hit_reaction_tween_target; - u8 pad_68[0x8]; - u8 unk70; - u8 pad_71[0x3F]; - char *target; - s32 target_selection_status; - u8 pad_B8[0x8]; - f32 home_position[4]; - f32 path_midpoint[4]; - u8 turn_velocity; - u8 pad_E1[0x7]; - f32 move_speed; - s32 path; - s32 frog_list; - s32 state18_list; - s32 cuboid; - s32 unkFC; - s32 unk100; - s32 slider_list; - s32 unk108; - s32 animation_update; - s32 health_sixteenths; - s32 saved_path_point_count; - f32 camera_blend_fraction; - u8 unk11C; - u8 pad_11D[0x3]; - s32 timer_120; - u8 pad_124[0x4]; - f32 unk128; - s32 timer_12C; - u8 unk130; - u8 pad_131[0x3F]; - s32 intro_or_recovery_delay_active; - f32 recovery_health; - s32 suppress_death_dialogue; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 unk29; + u8 pad_2A[0x4]; + u8 death_control_flags; + u8 pad_2F[0x19]; + f32 z_velocity; + u8 pad_4C[0xC]; + u8 unk58; + u8 pad_59[0x1]; + u8 unk5A; + u8 pad_5B[0x5]; + struct HitColorFlash hit_flash; + u8 unk70; + u8 pad_71[0x3F]; + char *target; + s32 target_selection_status; + u8 pad_B8[0x8]; + f32 home_position[4]; + f32 path_midpoint[4]; + u8 turn_velocity; + u8 pad_E1[0x7]; + f32 move_speed; + s32 path; + s32 frog_list; + s32 state18_list; + s32 cuboid; + s32 unkFC; + s32 unk100; + s32 slider_list; + s32 unk108; + s32 animation_update; + s32 health_sixteenths; + s32 saved_path_point_count; + f32 camera_blend_fraction; + u8 unk11C; + u8 pad_11D[0x3]; + s32 timer_120; + u8 pad_124[0x4]; + f32 unk128; + s32 timer_12C; + u8 unk130; + u8 pad_131[0x3F]; + s32 intro_or_recovery_delay_active; + f32 recovery_health; + s32 suppress_death_dialogue; } AlienQueenVars; /* Moby class 1051 */ @@ -887,7 +885,7 @@ void update_alien_queen_hit_response_and_recovery(char *moby) { case HIT_RESPONSE_NONLETHAL_ANIMATION_MAINTENANCE: case HIT_RESPONSE_NONLETHAL_ANIMATION_FEEDBACK: case HIT_RESPONSE_NONLETHAL_ANIMATION_RESPONSE: - alien_queen_hit_recovery_vars->hit_reaction_tween_target = 200; + alien_queen_hit_recovery_vars->hit_flash.flash_red = 200; break; case HIT_RESPONSE_DEATH: case HIT_RESPONSE_DEATH_SEQUENCE: { @@ -903,15 +901,15 @@ void update_alien_queen_hit_response_and_recovery(char *moby) { MOBY(moby)->flags &= 0xEFFF; if ((unsigned char)moby[0x53] != 10) FUN_00212f90(moby, 10, 0, scale_game_frames(10)); - alien_queen_hit_recovery_vars->hit_reaction_tween_target = 0xFA; + alien_queen_hit_recovery_vars->hit_flash.flash_red = 0xFA; break; } } hit_response_done: - start_hit_color_flash(moby, &alien_queen_hit_recovery_vars->anim_state); + start_hit_color_flash(moby, &alien_queen_hit_recovery_vars->hit_flash); } MOBY(moby)->hit_slot = 0xFF; - update_hit_color_flash(moby, &alien_queen_hit_recovery_vars->anim_state); + update_hit_color_flash(moby, &alien_queen_hit_recovery_vars->hit_flash); if ((alien_queen_hit_recovery_vars->death_control_flags & 2) && (unsigned char)moby[0x20] != 15) { if (alien_queen_hit_recovery_vars->animation_update != -1) { diff --git a/src/overlays/l06/mobys/alien_snapper.c b/src/overlays/l06/mobys/alien_snapper.c index 43afaccf11..ef57be7d33 100644 --- a/src/overlays/l06/mobys/alien_snapper.c +++ b/src/overlays/l06/mobys/alien_snapper.c @@ -1,5 +1,6 @@ /* Level 06 moby class 0x418: alien snapper. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/mobys/moby.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -204,35 +205,33 @@ typedef struct { } Target; typedef struct BlargVars { - char pad00[0x20]; - float health; /* 0x20 */ - char pad24[0x14]; - int targeting_boost_refresh_pending; /* 0x38 */ - char pad3C[0x24]; - char f60[0x7]; /* 0x60 */ - unsigned char f67; /* 0x67 */ - char pad68[0x8]; - char f70[0x18]; /* 0x70 */ - float horizontal_motion_speed; /* 0x88 */ - float f8C; /* 0x8C */ - char pad90[0x30]; - float motion_apex_animation_frame; /* 0xC0 */ - float motion_landing_animation_frame; /* 0xC4 */ - char padC8[0x58]; - char selected_target_xy[0x8]; /* 0x120 */ - float selected_target_z; /* 0x128 */ - char pad12C[0x34]; - int selected_target_moby; /* 0x160 */ - int f164; /* 0x164 */ - char pad168[0x8]; - char home_position[0x30]; /* 0x170 */ - float f1A0; /* 0x1A0 */ - char pad1A4[0x8]; - int f1AC; /* 0x1AC */ - int movement_path_index; /* 0x1B0 */ - char pad1B4[0x14]; - float f1C8; /* 0x1C8 */ - int f1CC; /* 0x1CC */ + char pad00[0x20]; + float health; /* 0x20 */ + char pad24[0x14]; + int targeting_boost_refresh_pending; /* 0x38 */ + char pad3C[0x24]; + struct HitColorFlash hit_flash; + char f70[0x18]; /* 0x70 */ + float horizontal_motion_speed; /* 0x88 */ + float f8C; /* 0x8C */ + char pad90[0x30]; + float motion_apex_animation_frame; /* 0xC0 */ + float motion_landing_animation_frame; /* 0xC4 */ + char padC8[0x58]; + char selected_target_xy[0x8]; /* 0x120 */ + float selected_target_z; /* 0x128 */ + char pad12C[0x34]; + int selected_target_moby; /* 0x160 */ + int f164; /* 0x164 */ + char pad168[0x8]; + char home_position[0x30]; /* 0x170 */ + float f1A0; /* 0x1A0 */ + char pad1A4[0x8]; + int f1AC; /* 0x1AC */ + int movement_path_index; /* 0x1B0 */ + char pad1B4[0x14]; + float f1C8; /* 0x1C8 */ + int f1CC; /* 0x1CC */ } BlargVars; extern int level_frame_count __asm__("D_L06_0015F5CC"); @@ -812,7 +811,7 @@ void update_alien_snapper_hit_response_and_targeting(Moby *moby) { reaction = 1; } else if (snapper_vars->f1CC != 0) { reaction = 0xB; - snapper_vars->f67 = 0xFA; + snapper_vars->hit_flash.flash_red = 0xFA; } switch (reaction) { @@ -833,7 +832,7 @@ void update_alien_snapper_hit_response_and_targeting(Moby *moby) { snapper_vars->motion_landing_animation_frame = 8.5f; func_L00_0025D5B0_2FA618( moby, snapper_vars->f70, 9, 1, 0, fast_arc_tan(target->x, target->y)); - snapper_vars->f67 = 0xFA; + snapper_vars->hit_flash.flash_red = 0xFA; break; case REACTION_DEATH: case HIT_RESPONSE_DEATH_SEQUENCE: @@ -845,17 +844,17 @@ void update_alien_snapper_hit_response_and_targeting(Moby *moby) { snapper_vars->motion_landing_animation_frame = 14.5f; func_L00_0025D5B0_2FA618( moby, snapper_vars->f70, 10, 1, 0, fast_arc_tan(target->x, target->y)); - snapper_vars->f67 = 0xFA; + snapper_vars->hit_flash.flash_red = 0xFA; mark_moby_for_removal_cf(moby, 0, -1); break; case REACTION_NO_RESPONSE: break; } - start_hit_color_flash(moby, snapper_vars->f60); + start_hit_color_flash(moby, &snapper_vars->hit_flash); } moby->hit_slot = 0xFF; - update_hit_color_flash(moby, snapper_vars->f60); + update_hit_color_flash(moby, &snapper_vars->hit_flash); switch (moby->state) { case SNAPPER_APPROACH_TARGET: case SNAPPER_REPOSITION_AROUND_TARGET: diff --git a/src/overlays/l07/mobys/bombomatic.c b/src/overlays/l07/mobys/bombomatic.c index 233a747560..50d05a7f44 100644 --- a/src/overlays/l07/mobys/bombomatic.c +++ b/src/overlays/l07/mobys/bombomatic.c @@ -1,5 +1,6 @@ /* Level 07 moby class 0x411: bombomatic. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" #include "rnc/math_consts.h" @@ -157,26 +158,23 @@ char *spawn_bombomatic_projectile(char *spawn_position, } typedef struct BombomaticVars { - u8 pad_0[0x20]; - u8 unk20; - u8 pad_21[0x5]; - s16 unk26; - u8 pad_28[0x38]; - s16 anim_state; - u8 pad_62[0x5]; - u8 hit_transition_target; - u8 pad_68[0x8]; - u8 manipulator_70; - u8 pad_71[0xF]; - u8 unk80; - u8 pad_81[0x2F]; - s32 unkB0; - s32 unkB4; - s16 timer_B8; - s16 launch_burst_index; - f32 unkBC; - f32 unkC0; - s32 unkC4; + u8 pad_0[0x20]; + u8 unk20; + u8 pad_21[0x5]; + s16 unk26; + u8 pad_28[0x38]; + struct HitColorFlash hit_flash; + u8 manipulator_70; + u8 pad_71[0xF]; + u8 unk80; + u8 pad_81[0x2F]; + s32 unkB0; + s32 unkB4; + s16 timer_B8; + s16 launch_burst_index; + f32 unkBC; + f32 unkC0; + s32 unkC4; } BombomaticVars; /* Moby class 1041 */ @@ -325,13 +323,13 @@ void bombomatic_update(char *moby) { } tv -= hit_damage; *(float *)health_ptr = tv; - moby_data->hit_transition_target = 0xFA; + moby_data->hit_flash.flash_red = 0xFA; moby_data->unk26 = scale_game_frames(60); - start_hit_color_flash(moby, &moby_data->anim_state); + start_hit_color_flash(moby, &moby_data->hit_flash); } eb20: ((unsigned char *)moby)[0xA4] = 0xFF; - update_hit_color_flash(moby, &moby_data->anim_state); + update_hit_color_flash(moby, &moby_data->hit_flash); get_target_sight(moby, target_buffer, 20.0f); switch (((unsigned char *)moby)[0x20]) { case BOMBOMATIC_INITIALIZE: { diff --git a/src/overlays/l07/mobys/machinegun_turret.c b/src/overlays/l07/mobys/machinegun_turret.c index 3b6fe98117..8ce3328af3 100644 --- a/src/overlays/l07/mobys/machinegun_turret.c +++ b/src/overlays/l07/mobys/machinegun_turret.c @@ -1,5 +1,6 @@ /* Level 07 moby class 0x466: machinegun turret. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/globals.h" #include "asm.h" #include "rnc/mobys/moby.h" @@ -38,32 +39,29 @@ extern float D_0015ED6C MACRO_ADDR; void machinegun_turret_update(unsigned char *moby) __asm__("FUN_L07_0031a250"); typedef struct MachinegunTurretVars { - u8 pad_0[0x20]; - u8 health; - u8 pad_21[0x5]; - s16 unk26; - u8 pad_28[0x1]; - u8 unk29; - u8 pad_2A[0x36]; - u8 anim_state; - u8 pad_61[0x6]; - u8 hit_flash_target_red; - u8 pad_68[0x8]; - s32 sweep_start_moby; - s32 sweep_end_moby; - f32 turn_speed_degrees; - s16 fire_timer; - s16 sweep_reversing; - f32 sweep_start_yaw; - f32 sweep_end_yaw; - f32 sweep_offset; - f32 sweep_range; - f32 base_z; - u16 burst_length; - u8 pad_96[0x2]; - s32 burst_pause; - u16 burst_timer; - u8 unk9E; + u8 pad_0[0x20]; + u8 health; + u8 pad_21[0x5]; + s16 unk26; + u8 pad_28[0x1]; + u8 unk29; + u8 pad_2A[0x36]; + struct HitColorFlash hit_flash; + s32 sweep_start_moby; + s32 sweep_end_moby; + f32 turn_speed_degrees; + s16 fire_timer; + s16 sweep_reversing; + f32 sweep_start_yaw; + f32 sweep_end_yaw; + f32 sweep_offset; + f32 sweep_range; + f32 base_z; + u16 burst_length; + u8 pad_96[0x2]; + s32 burst_pause; + u16 burst_timer; + u8 unk9E; } MachinegunTurretVars; /* Moby class 1126 */ @@ -90,14 +88,14 @@ void machinegun_turret_update(unsigned char *moby) { if (turret_instance_vars == 0) return; collision = &turret_instance_vars->health; - animation = &turret_instance_vars->anim_state; + animation = &turret_instance_vars->hit_flash; hit = find_moby_hit(moby, 0x230000, 0); resolve_moby_hit_response((void *)moby, (MobyHit *)hit, collision, 0, contact, 0, 0, 4); if ((u8)MOBY(moby)->state < TURRET_HIT_SPIN && contact[0] > 1) { FUN_0022da68(1, 0, moby); FUN_L00_00257470(moby, 0, -1); MOBY(moby)->flags &= 0xefff; - turret_instance_vars->hit_flash_target_red = 0xfa; + turret_instance_vars->hit_flash.flash_red = 0xfa; turret_instance_vars->unk26 = scale_game_frames(60); start_hit_color_flash(moby, animation); turret_instance_vars->fire_timer = scale_game_frames(60); diff --git a/src/overlays/l07/mobys/mine_group.c b/src/overlays/l07/mobys/mine_group.c index 7c3a22645b..7643f4363f 100644 --- a/src/overlays/l07/mobys/mine_group.c +++ b/src/overlays/l07/mobys/mine_group.c @@ -1,5 +1,6 @@ /* Level 07 moby class 0x367: mine group; places its group of mines along its path and moves them along it. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" #include "asm.h" @@ -186,25 +187,22 @@ void reset_moby_from_class_defaults(struct Moby *moby) { } typedef struct MineGroupVars { - u8 pad_0[0x20]; - f32 unk20; - u8 pad_24[0x2]; - s16 surviving_hit_frame_count; - u8 pad_28[0x38]; - s16 anim_state; - u8 pad_62[0x5]; - u8 unk67; - u8 pad_68[0x8]; - s32 unk70; - s32 unk74; - s32 unk78; - f32 unk7C; - f32 unk80; - s32 child_reset_gate; - u8 pad_88[0x8]; - s32 child_reset_segment_index; - u8 unk94; - u8 unk95; + u8 pad_0[0x20]; + f32 unk20; + u8 pad_24[0x2]; + s16 surviving_hit_frame_count; + u8 pad_28[0x38]; + struct HitColorFlash hit_flash; + s32 unk70; + s32 unk74; + s32 unk78; + f32 unk7C; + f32 unk80; + s32 child_reset_gate; + u8 pad_88[0x8]; + s32 child_reset_segment_index; + u8 unk94; + u8 unk95; } MineGroupVars; /* Moby class 871 */ @@ -295,13 +293,13 @@ void mine_group_update(struct Moby *moby) { return; } *remaining -= step; - boltcrate_pvars->unk67 = 0xfa; + boltcrate_pvars->hit_flash.flash_red = 0xfa; boltcrate_pvars->surviving_hit_frame_count = scale_game_frames(0x3c); - start_hit_color_flash(moby, &boltcrate_pvars->anim_state); + start_hit_color_flash(moby, &boltcrate_pvars->hit_flash); } moby->hit_slot = 0xff; } - update_hit_color_flash(moby, &boltcrate_pvars->anim_state); + update_hit_color_flash(moby, &boltcrate_pvars->hit_flash); if (boltcrate_pvars->unk70 == -1) return; path = D_L07_001B0530[boltcrate_pvars->unk70]; diff --git a/src/overlays/l07/mobys/snagglebeast.c b/src/overlays/l07/mobys/snagglebeast.c index bdb95eb341..7790a762f8 100644 --- a/src/overlays/l07/mobys/snagglebeast.c +++ b/src/overlays/l07/mobys/snagglebeast.c @@ -1,5 +1,6 @@ /* Level 07 moby class 0x452: snagglebeast. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "asm.h" @@ -71,86 +72,84 @@ extern void draw_geometry_quad(void *, int, int) __asm__("FUN_001f7d30"); extern float normalize_angle(float) __asm__("FUN_L00_0025e310"); typedef struct SnagglebeastVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - s16 unk26; - u8 pad_28[0x1]; - u8 unk29; - u8 pad_2A[0x2E]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x5]; - s16 move; - u8 pad_62[0x5]; - u8 damage_flash; - u8 pad_68[0x1C]; - s32 unk84; - u8 pad_88[0x10]; - f32 turn_start_angle; - f32 unk9C; - u8 pad_A0[0x8]; - s32 unkA8; - u8 pad_AC[0x14]; - f32 turn_target[4]; - u8 pad_D0[0x30]; - f32 velocity[4]; - f32 rope_start_position[4]; - f32 rope_end_position[4]; - f32 rope_tip_velocity[4]; - f32 rope_tip_position[4]; - f32 unk150[4]; - s32 timer; - s32 substate; - s32 turn_controller_state; - f32 rope_extension_length; - s32 navigation_ids[6]; - s32 nav_path; - s32 measured_path; - f32 measured_path_length; - s16 timer_194; - s16 timer_196; - s16 timer_198; - s16 timer_19A; - u8 navigation_mask; - u8 unk19D; - s16 ammo_drain_step; - s32 path_1A0; - s32 unk1A4; - s32 unk1A8; - f32 drop_path_distance; - s32 health_hud_handle; - s32 health_display; - f32 unk1B8; - u8 pad_1BC[0x4]; - s32 nav_point; - u8 hero_captured; - u8 sphere_fade_direction; - u8 sphere_shade; - u8 hero_capture_attack_enabled; - f32 sphere_fade; - s32 unk1CC; - s32 unk1D0; - u8 pad_1D4[0x1C]; - s32 cuboid; - u8 turn_saved_state; - u8 turn_fixed_target; - u8 turn_resume_animation; - u8 timer_1F7; - s32 voice; - f32 damage_reaction_amount; - u8 joint_animation[0x64]; - f32 joint_damage_reaction_target; - f32 target_yaw_offset; - u8 pad_26C[0x14]; - s16 point_light; - u8 pad_282[0xE]; - s32 chase_path; - s32 unk294; - s32 unk298; - s32 unk29C; - u8 manipulator[1]; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + s16 unk26; + u8 pad_28[0x1]; + u8 unk29; + u8 pad_2A[0x2E]; + u8 unk58; + u8 pad_59[0x1]; + u8 unk5A; + u8 pad_5B[0x5]; + struct HitColorFlash hit_flash; + u8 pad_70[0x14]; + s32 unk84; + u8 pad_88[0x10]; + f32 turn_start_angle; + f32 unk9C; + u8 pad_A0[0x8]; + s32 unkA8; + u8 pad_AC[0x14]; + f32 turn_target[4]; + u8 pad_D0[0x30]; + f32 velocity[4]; + f32 rope_start_position[4]; + f32 rope_end_position[4]; + f32 rope_tip_velocity[4]; + f32 rope_tip_position[4]; + f32 unk150[4]; + s32 timer; + s32 substate; + s32 turn_controller_state; + f32 rope_extension_length; + s32 navigation_ids[6]; + s32 nav_path; + s32 measured_path; + f32 measured_path_length; + s16 timer_194; + s16 timer_196; + s16 timer_198; + s16 timer_19A; + u8 navigation_mask; + u8 unk19D; + s16 ammo_drain_step; + s32 path_1A0; + s32 unk1A4; + s32 unk1A8; + f32 drop_path_distance; + s32 health_hud_handle; + s32 health_display; + f32 unk1B8; + u8 pad_1BC[0x4]; + s32 nav_point; + u8 hero_captured; + u8 sphere_fade_direction; + u8 sphere_shade; + u8 hero_capture_attack_enabled; + f32 sphere_fade; + s32 unk1CC; + s32 unk1D0; + u8 pad_1D4[0x1C]; + s32 cuboid; + u8 turn_saved_state; + u8 turn_fixed_target; + u8 turn_resume_animation; + u8 timer_1F7; + s32 voice; + f32 damage_reaction_amount; + u8 joint_animation[0x64]; + f32 joint_damage_reaction_target; + f32 target_yaw_offset; + u8 pad_26C[0x14]; + s16 point_light; + u8 pad_282[0xE]; + s32 chase_path; + s32 unk294; + s32 unk298; + s32 unk29C; + u8 manipulator[1]; } SnagglebeastVars; static inline int tint_color(int color) { @@ -520,8 +519,8 @@ void process_snagglebeast_damage(char *moby, *health = 0.0f; MOBY(moby)->flags &= 0xefff; FUN_L00_00257470(moby, 0, -1); - snagglebeast_instance_vars->damage_flash = 0x78; - start_hit_color_flash(moby, &snagglebeast_instance_vars->move); + snagglebeast_instance_vars->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &snagglebeast_instance_vars->hit_flash); if ((u8)moby[0x53] != 2) FUN_00212f90(moby, 2, 0, random_int_between(10, 13)); if (camera_secondary_mode_lui == 0x78) @@ -547,9 +546,9 @@ void process_snagglebeast_damage(char *moby, scratch.threshold = 5.0f; scratch.threshold *= frame; *health -= *(float *)(hit + 0x2c); - snagglebeast_instance_vars->damage_flash = 0xfa; + snagglebeast_instance_vars->hit_flash.flash_red = 0xfa; snagglebeast_instance_vars->unk26 = scale_game_frames(0); - start_hit_color_flash(moby, &snagglebeast_instance_vars->move); + start_hit_color_flash(moby, &snagglebeast_instance_vars->hit_flash); if ((u8)moby[0x20] < 10 && *health < scratch.threshold) { int slot; if (camera_secondary_mode_lui == 0x78) @@ -589,7 +588,7 @@ void process_snagglebeast_damage(char *moby, snagglebeast_instance_vars->sphere_shade = 0; MOBY(moby)->hit_slot = 0xff; } - update_hit_color_flash(moby, &snagglebeast_instance_vars->move); + update_hit_color_flash(moby, &snagglebeast_instance_vars->hit_flash); output = snagglebeast_instance_vars->damage_reaction_amount + 0.3f; snagglebeast_instance_vars->damage_reaction_amount = output; if (output > 0.0f) @@ -1860,8 +1859,8 @@ void snagglebeast_update(unsigned char *moby) { if (fast_dec_timer(&snagglebeast_instance_state->timer)) { snagglebeast_instance_state->substate -= 1; *health -= 1.0f; - snagglebeast_instance_state->damage_flash = 0xFA; - start_hit_color_flash(moby, &snagglebeast_instance_state->move); + snagglebeast_instance_state->hit_flash.flash_red = 0xFA; + start_hit_color_flash(moby, &snagglebeast_instance_state->hit_flash); if (*health <= 0.0f) { *health = 0.0f; if (MOBY(moby)->prev_seq != 8) diff --git a/src/overlays/l08/mobys/blarg_bombthrower.c b/src/overlays/l08/mobys/blarg_bombthrower.c index 19232a214b..70489eb06f 100644 --- a/src/overlays/l08/mobys/blarg_bombthrower.c +++ b/src/overlays/l08/mobys/blarg_bombthrower.c @@ -1,5 +1,6 @@ /* Level 08 moby class 0x14d: blarg bombthrower. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/camera/level_camera.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -47,47 +48,44 @@ typedef struct { } Look; typedef struct { - char pad0[0x20]; - float health; - char pad24[5]; - unsigned char b29; - char pad2A[0xE]; - int alternate_throw_trigger; - char pad3C[4]; - float v40[4]; - char pad50[8]; - unsigned char b58; - char pad59; - unsigned char b5A; - char pad5B[5]; - short anim[3]; - char pad66; - unsigned char tint; - char pad68[8]; - char blk70[0x10]; - float f80, f84, f88, f8C; - int pad90; - int i94; - char pad98[0x15]; - unsigned char bAD; - char padAE[0x12]; - float fC0, fC4; - char padC8[8]; - char blkD0[8]; - float fD8, fDC; - char padE0[0x14]; - float fF4; - char padF8[0x14]; - float f10C, f110, f114; - char pad118[8]; - struct Moby *waypoint; - struct Moby *thrown_bomb; - int throw_delay_timer; - char blk12C[4]; - short s130, s132; - int waypoint_reselection_timer; - char pad138[0x28]; - char blk160[0x10]; + char pad0[0x20]; + float health; + char pad24[5]; + unsigned char b29; + char pad2A[0xE]; + int alternate_throw_trigger; + char pad3C[4]; + float v40[4]; + char pad50[8]; + unsigned char b58; + char pad59; + unsigned char b5A; + char pad5B[5]; + struct HitColorFlash hit_flash; + char blk70[0x10]; + float f80, f84, f88, f8C; + int pad90; + int i94; + char pad98[0x15]; + unsigned char bAD; + char padAE[0x12]; + float fC0, fC4; + char padC8[8]; + char blkD0[8]; + float fD8, fDC; + char padE0[0x14]; + float fF4; + char padF8[0x14]; + float f10C, f110, f114; + char pad118[8]; + struct Moby *waypoint; + struct Moby *thrown_bomb; + int throw_delay_timer; + char blk12C[4]; + short s130, s132; + int waypoint_reselection_timer; + char pad138[0x28]; + char blk160[0x10]; } Data_DBF68; char *spawn_bomb_with_velocity(int arg, char *pos, char *vec) __asm__("FUN_L08_002d22e0"); @@ -251,7 +249,7 @@ void blarg_bombthrower_update(struct Moby *moby) { bombthrower_vars->health -= damage; if (0.0f < bombthrower_vars->health) { if (damage < 1.0f) { - bombthrower_vars->tint = 100; + bombthrower_vars->hit_flash.flash_red = 100; } else { char *hero_bytes; bombthrower_vars->f80 = frame_time_sq * 30.0f; @@ -270,7 +268,7 @@ void blarg_bombthrower_update(struct Moby *moby) { 0); bombthrower_vars->fC0 = 6.0f; bombthrower_vars->fC4 = 10.0f; - bombthrower_vars->tint = 0x78; + bombthrower_vars->hit_flash.flash_red = 0x78; moby->state = BOMBTHROWER_STATE_DAMAGE_KNOCKBACK; } } else { @@ -293,12 +291,12 @@ void blarg_bombthrower_update(struct Moby *moby) { bombthrower_vars->fC0 = 6.0f; bombthrower_vars->fC4 = 10.0f; explode_2D5FA8_c(moby, 0, -1); - bombthrower_vars->tint = 0xFA; + bombthrower_vars->hit_flash.flash_red = 0xFA; moby->state = BOMBTHROWER_STATE_DYING; moby->flags &= 0xEFFF; bombthrower_vars->waypoint->command = 0; } - start_hit_color_flash(moby, bombthrower_vars->anim); + start_hit_color_flash(moby, &bombthrower_vars->hit_flash); } moby->hit_slot = 0xFF; search.result = select_nearest_xy_moby_with_hero_fallback(moby, 16.0f, &search); @@ -552,6 +550,6 @@ void blarg_bombthrower_update(struct Moby *moby) { } break; } - update_hit_color_flash(moby, bombthrower_vars->anim); + update_hit_color_flash(moby, &bombthrower_vars->hit_flash); bombthrower_vars->alternate_throw_trigger = 0; } diff --git a/src/overlays/l08/mobys/bolt_thief.c b/src/overlays/l08/mobys/bolt_thief.c index 846f3a5a68..8d0e10a396 100644 --- a/src/overlays/l08/mobys/bolt_thief.c +++ b/src/overlays/l08/mobys/bolt_thief.c @@ -1,5 +1,6 @@ /* Level 08 moby class 0x1c4: bolt thief. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "asm.h" #include "rnc/mobys/moby.h" #include "sda.h" @@ -50,29 +51,27 @@ begin_bolt_attraction(struct Moby *, struct Moby *, float, float) __asm__("FUN_L extern void FUN_00212f90(struct Moby *, int, int, int); typedef struct { - char pad0[0x29]; - unsigned char b29; - char pad2A[0x16]; - Vec4 v40; - char pad50[0x10]; - char x60[7]; - unsigned char b67; - char pad68[8]; - char x70[0x10]; - float f80, f84, f88, f8C; - int w90, w94; - char pad98[0x15]; - unsigned char bAD; - char padAE[0x22]; - SwarmPathFollower follow[2]; - char pad130[0x28]; - struct Moby *list[0x32]; - int w220; - float f224; - char pad228[4]; - int w22C; - char pad230[0x30]; - unsigned char x260[1]; + char pad0[0x29]; + unsigned char b29; + char pad2A[0x16]; + Vec4 v40; + char pad50[0x10]; + struct HitColorFlash hit_flash; + char x70[0x10]; + float f80, f84, f88, f8C; + int w90, w94; + char pad98[0x15]; + unsigned char bAD; + char padAE[0x22]; + SwarmPathFollower follow[2]; + char pad130[0x28]; + struct Moby *list[0x32]; + int w220; + float f224; + char pad228[4]; + int w22C; + char pad230[0x30]; + unsigned char x260[1]; } BoltThiefVars; void bolt_thief_update(struct Moby *moby) __asm__("FUN_L08_002e2df0"); @@ -155,7 +154,7 @@ void bolt_thief_update(struct Moby *moby) { 4, 1, 0); - bolt_thief_instance_vars->b67 = 0x78; + bolt_thief_instance_vars->hit_flash.flash_red = 0x78; FUN_L00_00257470(moby, 0, -1); moby->state = BOLT_THIEF_KNOCKBACK; } @@ -375,5 +374,5 @@ void bolt_thief_update(struct Moby *moby) { } break; } - update_hit_color_flash(moby, bolt_thief_instance_vars->x60); + update_hit_color_flash(moby, &bolt_thief_instance_vars->hit_flash); } diff --git a/src/overlays/l08/mobys/bomber_tank.c b/src/overlays/l08/mobys/bomber_tank.c index c4bc379565..c8c0879cb8 100644 --- a/src/overlays/l08/mobys/bomber_tank.c +++ b/src/overlays/l08/mobys/bomber_tank.c @@ -1,5 +1,6 @@ /* Level 08 moby class 0xfd: bomber tank. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/camera/level_camera.h" #include "rnc/audio/voice_pool.h" #include "rnc/globals.h" @@ -357,38 +358,34 @@ void bomber_tank_update(Moby *moby) { /* Per-frame update of a batalia turret moby: damage, its death state and its two helper parts. */ /* Ported from rac1-decomp (src/overlays/l08_batalia/vendor_002B9438.c: func_L08_002D5FA8), where it is exact; names translated to the US level program. */ typedef struct { - char pad0[0x20]; - float health; - char pad24[2]; - short timer; - char pad28[0x16]; - unsigned short flags; - float f40[4]; - char pad50[0x50]; - short anim0; - short anim2; - char padA4[3]; - unsigned char tint; - char padA8[8]; - float target[4]; - char padC0[0x30]; - int fF0; - int mode; - char padF8[0x18]; - float f110[4]; - float f120[4]; - char pad130[0x24]; - int path; - char pad158[8]; - Moby *partA; - Moby *partB; - char pad168[8]; - float yaw; - float yaw_speed; - float pitch; - float pitch_speed; - char pad180[4]; - int part_id; + char pad0[0x20]; + float health; + char pad24[2]; + short timer; + char pad28[0x16]; + unsigned short flags; + float f40[4]; + char pad50[0x50]; + struct HitColorFlash hit_flash; + float target[4]; + char padC0[0x30]; + int fF0; + int mode; + char padF8[0x18]; + float f110[4]; + float f120[4]; + char pad130[0x24]; + int path; + char pad158[8]; + Moby *partA; + Moby *partB; + char pad168[8]; + float yaw; + float yaw_speed; + float pitch; + float pitch_speed; + char pad180[4]; + int part_id; } Data; typedef struct { @@ -455,17 +452,17 @@ void update_bomber_tank_damage_and_aim(Moby *moby) { allocate_voice_for_target_entry(4, 0, moby); if (bomber_tank_damage_and_aim_vars->health > 0.0f) { if (damage < 4.0f) { - bomber_tank_damage_and_aim_vars->tint = 0x78; + bomber_tank_damage_and_aim_vars->hit_flash.flash_red = 0x78; if ((unsigned short)(source->moby->oclass - 0xB0) < 2) { bomber_tank_damage_and_aim_vars->timer = scale_game_frames(0x3C); } else { bomber_tank_damage_and_aim_vars->timer = scale_game_frames(0x1E); } } else if (damage < 6.0f) { - bomber_tank_damage_and_aim_vars->tint = 0xC8; + bomber_tank_damage_and_aim_vars->hit_flash.flash_red = 0xC8; bomber_tank_damage_and_aim_vars->timer = scale_game_frames(0x1E); } else { - bomber_tank_damage_and_aim_vars->tint = 0xE6; + bomber_tank_damage_and_aim_vars->hit_flash.flash_red = 0xE6; bomber_tank_damage_and_aim_vars->timer = scale_game_frames(0x1E); } if (moby->state == 0xC && moby->prev_seq != 1) { @@ -476,7 +473,7 @@ void update_bomber_tank_damage_and_aim(Moby *moby) { if (moby->state != dead) { qcopy(burst_position_or_aim_scratch, &moby->pos); burst_position_or_aim_scratch[2] += 3.0f; - bomber_tank_damage_and_aim_vars->tint = 0xFA; + bomber_tank_damage_and_aim_vars->hit_flash.flash_red = 0xFA; clear_u64_value(bomber_tank_damage_and_aim_vars->f120); spawn_explosion(moby, bomber_tank_damage_and_aim_vars->f40, @@ -654,7 +651,7 @@ void update_bomber_tank_damage_and_aim(Moby *moby) { return; } } - start_hit_color_flash(moby, &bomber_tank_damage_and_aim_vars->anim0); + start_hit_color_flash(moby, &bomber_tank_damage_and_aim_vars->hit_flash); } moby->hit_slot = 0xFF; @@ -722,20 +719,20 @@ void update_bomber_tank_damage_and_aim(Moby *moby) { burst_position_or_aim_scratch, bomber_tank_damage_and_aim_vars->f110); { - short saved_anim0 = bomber_tank_damage_and_aim_vars->anim0; - short saved_anim2 = bomber_tank_damage_and_aim_vars->anim2; - update_hit_color_flash(moby, &bomber_tank_damage_and_aim_vars->anim0); + short saved_anim0 = bomber_tank_damage_and_aim_vars->hit_flash.timer; + short saved_anim2 = bomber_tank_damage_and_aim_vars->hit_flash.phase; + update_hit_color_flash(moby, &bomber_tank_damage_and_aim_vars->hit_flash); if (bomber_tank_damage_and_aim_vars->partA != 0) { - bomber_tank_damage_and_aim_vars->anim0 = saved_anim0; - bomber_tank_damage_and_aim_vars->anim2 = saved_anim2; + bomber_tank_damage_and_aim_vars->hit_flash.timer = saved_anim0; + bomber_tank_damage_and_aim_vars->hit_flash.phase = saved_anim2; update_hit_color_flash(bomber_tank_damage_and_aim_vars->partA, - &bomber_tank_damage_and_aim_vars->anim0); + &bomber_tank_damage_and_aim_vars->hit_flash); } if (bomber_tank_damage_and_aim_vars->partB != 0) { - bomber_tank_damage_and_aim_vars->anim0 = saved_anim0; - bomber_tank_damage_and_aim_vars->anim2 = saved_anim2; + bomber_tank_damage_and_aim_vars->hit_flash.timer = saved_anim0; + bomber_tank_damage_and_aim_vars->hit_flash.phase = saved_anim2; update_hit_color_flash(bomber_tank_damage_and_aim_vars->partB, - &bomber_tank_damage_and_aim_vars->anim0); + &bomber_tank_damage_and_aim_vars->hit_flash); } } } diff --git a/src/overlays/l09/mobys/refueling_station.c b/src/overlays/l09/mobys/refueling_station.c index 2a7de73637..afa9d36e14 100644 --- a/src/overlays/l09/mobys/refueling_station.c +++ b/src/overlays/l09/mobys/refueling_station.c @@ -1,5 +1,6 @@ /* Level 09 moby class 0x494: refueling station. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "asm.h" #include "rnc/audio/voice_alloc.h" #include "rnc/audio/voice_pool.h" @@ -25,12 +26,11 @@ typedef struct { } VendorHitSource; typedef struct { - u8 pad0[0x26]; - s16 hurt_timer; - u8 pad28[0x38]; - u8 anim[8]; - u8 pad68[8]; - s32 link; + u8 pad0[0x26]; + s16 hurt_timer; + u8 pad28[0x38]; + struct HitColorFlash hit_flash; + s32 link; } VendorVars; extern struct Moby *moby_list __asm__("D_L09_0015FFD8"); @@ -147,19 +147,19 @@ void handle_refueling_station_damage(struct Moby *moby, } } FUN_L00_00257470(moby, 0, -1); - refueling_station_vars->anim[7] = 0x78; - start_hit_color_flash(moby, refueling_station_vars->anim); + refueling_station_vars->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &refueling_station_vars->hit_flash); moby->state = REFUELING_STATION_STATE_EXPLODE; } else { *health -= damage_hit_record->damage; - refueling_station_vars->anim[7] = 0xFA; + refueling_station_vars->hit_flash.flash_red = 0xFA; refueling_station_vars->hurt_timer = scale_game_frames(60); - start_hit_color_flash(moby, refueling_station_vars->anim); + start_hit_color_flash(moby, &refueling_station_vars->hit_flash); } } moby->hit_slot = 0xFF; } - update_hit_color_flash(moby, refueling_station_vars->anim); + update_hit_color_flash(moby, &refueling_station_vars->hit_flash); } typedef struct RefuelingStationVars { diff --git a/src/overlays/l10/mobys/blarg_ship.c b/src/overlays/l10/mobys/blarg_ship.c index de9d401a6d..4a8db9b95f 100644 --- a/src/overlays/l10/mobys/blarg_ship.c +++ b/src/overlays/l10/mobys/blarg_ship.c @@ -1,5 +1,6 @@ /* Level 10 moby class blarg_ship: rises, follows its path, hovers and fires at its target. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/game/item_state.h" #include "rnc/hero/hero.h" #include "rnc/mobys/moby.h" @@ -509,21 +510,18 @@ extern int follow_5968(float, void *, void *, int, int, void *, int) __asm__("F void update_blarg_ship_hit_reactions_and_targeting(struct Moby *moby) __asm__("FUN_L10_002e5968"); typedef struct BlargShipVars { - u8 pad_0[0x20]; - f32 health; - u8 pad_24[0x2]; - s16 unk26; - u8 pad_28[0x98]; - u8 anim_state; - u8 pad_C1[0x6]; - u8 damage_secondary_red; - u8 pad_C8[0x8]; - u8 path_search_point; - u8 pad_D1[0x3F]; - s32 target; - s32 target_selection_status; - u8 pad_118[0x78]; - s32 path_190; + u8 pad_0[0x20]; + f32 health; + u8 pad_24[0x2]; + s16 unk26; + u8 pad_28[0x98]; + struct HitColorFlash hit_flash; + u8 path_search_point; + u8 pad_D1[0x3F]; + s32 target; + s32 target_selection_status; + u8 pad_118[0x78]; + s32 path_190; } BlargShipVars; void update_blarg_ship_hit_reactions_and_targeting(struct Moby *moby) { @@ -554,20 +552,20 @@ void update_blarg_ship_hit_reactions_and_targeting(struct Moby *moby) { case COLOR_UPDATE_ONLY_HIT_RESPONSE: case COLOR_UPDATE_WITHOUT_STATE_CHANGE_HIT_RESPONSE: case COLOR_EFFECT_ONLY_HIT_RESPONSE: - pvars->damage_secondary_red = 0xFA; - start_hit_color_flash(moby, &pvars->anim_state); + pvars->hit_flash.flash_red = 0xFA; + start_hit_color_flash(moby, &pvars->hit_flash); break; case LETHAL_HIT_RESPONSE: - pvars->damage_secondary_red = 0xFA; - start_hit_color_flash(moby, &pvars->anim_state); + pvars->hit_flash.flash_red = 0xFA; + start_hit_color_flash(moby, &pvars->hit_flash); moby->state = BLARG_SHIP_STATE_EXPLODE; break; case NO_REACTION_HIT_RESPONSE: break; default: - pvars->damage_secondary_red = 0xFA; + pvars->hit_flash.flash_red = 0xFA; pvars->unk26 = scale_game_frames(0x3C); - start_hit_color_flash(moby, &pvars->anim_state); + start_hit_color_flash(moby, &pvars->hit_flash); blend_moby_animation(moby, 4, 0, scale_game_frames(6)); moby->command = moby->state; moby->state = BLARG_SHIP_STATE_HIT_REACTION; @@ -575,7 +573,7 @@ void update_blarg_ship_hit_reactions_and_targeting(struct Moby *moby) { } } moby->hit_slot = 0xFF; - update_hit_color_flash(moby, &pvars->anim_state); + update_hit_color_flash(moby, &pvars->hit_flash); if (hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK) { select_hero_or_gadgebot_target(101.0f, moby, &pvars->target); if (*(char **)&pvars->target == 0) { diff --git a/src/overlays/l10/mobys/toxic_crab.c b/src/overlays/l10/mobys/toxic_crab.c index faa09549cb..820fba835a 100644 --- a/src/overlays/l10/mobys/toxic_crab.c +++ b/src/overlays/l10/mobys/toxic_crab.c @@ -1,5 +1,6 @@ /* Level 10 moby class toxic_crab: sight, targeting, group approach, particles and hit reactions. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/mobys/moby_state.h" #include "rnc/game/item_state.h" #include "rnc/hero/hero.h" @@ -89,68 +90,66 @@ typedef struct { } Hit2E30F8; typedef struct Crab2E30F8 { - char p000[0x20]; - float health; - short max_health; - char p26[2]; - unsigned char hit_response_class; - unsigned char b29; - char p2A[6]; - float f30; - char p34[0x24]; - unsigned char b58; - char p59; - unsigned char b5A; - char p5B[5]; - char q60[7]; - unsigned char b67; - char p68[8]; - float knockback_motion_xy[2]; - float vertical_motion_step; - char p7C[4]; - float f80; - char p84[0xC]; - int knockback_probe_radius_fixed; - int i94; - float f98; - char p9C[0x11]; - unsigned char bAD; - char pAE[0x12]; - float fC0; - float fC4; - char pC8[8]; - int movement_size_scale_fixed; - float movement_size_scale; - float maximum_ground_drop; - float maximum_ground_rise; - char pE0[0x14]; - float horizontal_movement_step_limit; - char pF8[0x28]; - float tracked_position_x; - float tracked_position_y; - char p128[0x38]; - char *tgt; - int tracked_target_selection_status; - char p168[8]; - float home_position_and_heading[4]; - char p180[0x10]; - float heading_turn_step; - float pursuit_entry_angle_sample_radians; - float pursuit_entry_angle_bound_degrees; - char p19C[4]; - float f1A0; - float movement_speed; - int behavior_timer_frames; - char p1AC[8]; - int activation_override_enabled; - int pursuit_delay_upper_bound_frames; - int activation_dependency_moby_index; - float pursuit_progress_sample_position[4]; - char p1D0[8]; - int pursuit_movement_blocked; - int remove_in_clank_mode; - char p1E0[0xD0]; - unsigned char q2B0[4]; + char p000[0x20]; + float health; + short max_health; + char p26[2]; + unsigned char hit_response_class; + unsigned char b29; + char p2A[6]; + float f30; + char p34[0x24]; + unsigned char b58; + char p59; + unsigned char b5A; + char p5B[5]; + struct HitColorFlash hit_flash; + float knockback_motion_xy[2]; + float vertical_motion_step; + char p7C[4]; + float f80; + char p84[0xC]; + int knockback_probe_radius_fixed; + int i94; + float f98; + char p9C[0x11]; + unsigned char bAD; + char pAE[0x12]; + float fC0; + float fC4; + char pC8[8]; + int movement_size_scale_fixed; + float movement_size_scale; + float maximum_ground_drop; + float maximum_ground_rise; + char pE0[0x14]; + float horizontal_movement_step_limit; + char pF8[0x28]; + float tracked_position_x; + float tracked_position_y; + char p128[0x38]; + char *tgt; + int tracked_target_selection_status; + char p168[8]; + float home_position_and_heading[4]; + char p180[0x10]; + float heading_turn_step; + float pursuit_entry_angle_sample_radians; + float pursuit_entry_angle_bound_degrees; + char p19C[4]; + float f1A0; + float movement_speed; + int behavior_timer_frames; + char p1AC[8]; + int activation_override_enabled; + int pursuit_delay_upper_bound_frames; + int activation_dependency_moby_index; + float pursuit_progress_sample_position[4]; + char p1D0[8]; + int pursuit_movement_blocked; + int remove_in_clank_mode; + char p1E0[0xD0]; + unsigned char q2B0[4]; } Crab2E30F8; typedef struct Moby2E30F8 { @@ -825,8 +824,8 @@ void toxic_crab_update(Moby2E30F8 *m) { 1, 0, fast_add_rotations(m->heading_radians, 3.1415927f)); - crab_data->b67 = 0xFA; - start_hit_color_flash(m, (short *)crab_data->q60); + crab_data->hit_flash.flash_red = 0xFA; + start_hit_color_flash(m, &crab_data->hit_flash); FUN_L00_00257470(m, 0, -1); break; } @@ -1012,45 +1011,43 @@ typedef struct Hero Hero; typedef int u128_2E52B0 __attribute__((mode(TI))); typedef struct D_2E52B0 { - char p0[0x10]; - struct Moby *f10; - char p14[0xC]; - float f20; - char p24[2]; - short hit_reaction_suppression_timer_frames; - char p28[0x10]; - int target_range_boost_pending; - char p3C[0x24]; - char a60[7]; - unsigned char b67; - char p68[8]; - float a70[4]; - float f80; - char p84[4]; - float knockback_xy_scale; - float knockback_z_scale; - int f90; - int knockback_motion_flags; - float f98; - char p9C[0x11]; - unsigned char bAD; - char pAE[0x12]; - float fC0; - float fC4; - char pC8[0x58]; - AlignedVec4f a120; - char p130[0x30]; - struct Moby *selected_target_moby; - int target_selection_status; - char p168[8]; - AlignedVec4f a170; - char p180[0x20]; - float f1A0; - char p1A4[8]; - int target_range_boost_timer_frames; - int target_path_index; - char p1B4[0x20]; - int target_loss_frames; + char p0[0x10]; + struct Moby *f10; + char p14[0xC]; + float f20; + char p24[2]; + short hit_reaction_suppression_timer_frames; + char p28[0x10]; + int target_range_boost_pending; + char p3C[0x24]; + struct HitColorFlash hit_flash; + float a70[4]; + float f80; + char p84[4]; + float knockback_xy_scale; + float knockback_z_scale; + int f90; + int knockback_motion_flags; + float f98; + char p9C[0x11]; + unsigned char bAD; + char pAE[0x12]; + float fC0; + float fC4; + char pC8[0x58]; + AlignedVec4f a120; + char p130[0x30]; + struct Moby *selected_target_moby; + int target_selection_status; + char p168[8]; + AlignedVec4f a170; + char p180[0x20]; + float f1A0; + char p1A4[8]; + int target_range_boost_timer_frames; + int target_path_index; + char p1B4[0x20]; + int target_loss_frames; } D_2E52B0; typedef struct Hit_2E52B0 { @@ -1207,8 +1204,8 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { trooper_knockback_arc( &vA, &fx, &moby_data->knockback_xy_scale, &moby_data->knockback_z_scale); func_L00_0025D5B0_2E52B0(moby, moby_data->a70, 9, 1, 0, fx); - moby_data->b67 = 0xFA; - start_hit_color_flash(moby, moby_data->a60); + moby_data->hit_flash.flash_red = 0xFA; + start_hit_color_flash(moby, &moby_data->hit_flash); break; case VEHICLE_SCALED_KNOCKBACK_HIT_RESPONSE: case VEHICLE_DEPENDENT_KNOCKBACK_HIT_RESPONSE: { @@ -1225,8 +1222,8 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { &vA, &fx, &moby_data->knockback_xy_scale, &moby_data->knockback_z_scale); func_L00_0025D5B0_2E52B0( moby, moby_data->a70, 9, 1, 0, fast_arc_tan(hit_record->pos.x, hit_record->pos.y)); - moby_data->b67 = 0xFA; - start_hit_color_flash(moby, moby_data->a60); + moby_data->hit_flash.flash_red = 0xFA; + start_hit_color_flash(moby, &moby_data->hit_flash); break; } case LETHAL_HIT_RESPONSE: @@ -1240,7 +1237,7 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { } } moby->hit_slot = 0xFF; - update_hit_color_flash(moby, moby_data->a60); + update_hit_color_flash(moby, &moby_data->hit_flash); if ((unsigned char)(moby->state - 10) < 3) { moby_data->target_loss_frames = 0; return; diff --git a/src/overlays/l11/mobys/psytcopus.c b/src/overlays/l11/mobys/psytcopus.c index 277dbc2739..3b50aa33d0 100644 --- a/src/overlays/l11/mobys/psytcopus.c +++ b/src/overlays/l11/mobys/psytcopus.c @@ -1,5 +1,6 @@ /* Level 11 moby class psytcopus: hits and its path state machine. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -41,9 +42,7 @@ struct PokiPathVars { u8 pad_59; u8 unk5A; /* 0x5A */ u8 pad_5B[5]; - u8 move[7]; /* 0x60: passed to trooper_anim_update / trooper_anim_finish */ - u8 hit_reaction_channel_target; /* 0x67 */ - u8 pad_68[8]; + struct HitColorFlash hit_flash; struct KnockbackMotion knockback; /* 0x70 */ Vec4f goal; /* 0xD0 */ u8 pad_E0[0x30]; @@ -311,7 +310,7 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { break; case HIT_REACTION_HURT_WITHOUT_KNOCKBACK: case HIT_REACTION_HURT_WITHOUT_STATE_CHANGE: - psytcopus_vars->hit_reaction_channel_target = 0xFA; + psytcopus_vars->hit_flash.flash_red = 0xFA; break; case HIT_REACTION_KNOCKBACK: case HIT_REACTION_KNOCKBACK_AND_CANCEL_PROJECTILE: @@ -336,7 +335,7 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { &psytcopus_vars->knockback.vertical_speed); FUN_L00_0025c558_p(psytcopus, &psytcopus_vars->knockback, 5, 1, 0, angle1); psytcopus->state = PSYTCOPUS_STATE_KNOCKBACK; - psytcopus_vars->hit_reaction_channel_target = 0x78; + psytcopus_vars->hit_flash.flash_red = 0x78; if (psytcopus_vars->held_projectile != 0) { FUN_L00_002371e0_p(psytcopus_vars->held_projectile); psytcopus_vars->held_projectile = 0; @@ -364,7 +363,7 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { &psytcopus_vars->knockback.vertical_speed); FUN_L00_0025c558_p(psytcopus, &psytcopus_vars->knockback, 6, 1, 0, angle2); psytcopus->state = PSYTCOPUS_STATE_DEATH_KNOCKBACK; - psytcopus_vars->hit_reaction_channel_target = 0xF0; + psytcopus_vars->hit_flash.flash_red = 0xF0; if (psytcopus_vars->held_projectile != 0) { FUN_L00_002371e0_p(psytcopus_vars->held_projectile); psytcopus_vars->held_projectile = 0; @@ -372,10 +371,10 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { FUN_L00_00257470_p(psytcopus, 0, -1); break; } - start_hit_color_flash(psytcopus, psytcopus_vars->move); + start_hit_color_flash(psytcopus, &psytcopus_vars->hit_flash); } psytcopus->hit_slot = 0xFF; - update_hit_color_flash(psytcopus, psytcopus_vars->move); + update_hit_color_flash(psytcopus, &psytcopus_vars->hit_flash); psytcopus_vars->reach = 24.0f; path = (s32 *)l11_paths[psytcopus_vars->path_index]; if (FUN_L00_0025ff38_p( diff --git a/src/overlays/l11/mobys/puffoid.c b/src/overlays/l11/mobys/puffoid.c index e9220e33a4..b4e34255ee 100644 --- a/src/overlays/l11/mobys/puffoid.c +++ b/src/overlays/l11/mobys/puffoid.c @@ -1,5 +1,6 @@ /* Level 11 moby class puffoid (class 0x4DE): spawns on a path or a carrier moby, wanders, chases and attacks; its damage and path goal, group count, target exclusion test and suck cannon callbacks. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -682,14 +683,12 @@ extern float l11_puffoid_horizontal_speed_limit __asm__("D_L11_001622FC") __attr /* Private variables of the moby FUN_L11_00315968 updates (only the fields it uses). */ struct L11PatrolVars { - u8 pad0[0x20]; - f32 hp; /* 0x20 */ - u8 pad24[0x14]; - s32 retimer; /* 0x38: nonzero restarts the timer at 0x244 */ - u8 pad3C[0xD4]; - u8 move[7]; /* 0x110: movement state (start_hit_color_flash / update_hit_color_flash) */ - u8 hit_flash_red_target; /* 0x117 */ - u8 pad118[8]; + u8 pad0[0x20]; + f32 hp; /* 0x20 */ + u8 pad24[0x14]; + s32 retimer; /* 0x38: nonzero restarts the timer at 0x244 */ + u8 pad3C[0xD4]; + struct HitColorFlash hit_flash; struct KnockbackMotion knockback; /* 0x120 */ u8 pad180[0x24]; f32 horizontal_movement_step_limit; /* 0x1A4 */ @@ -807,7 +806,7 @@ void update_puffoid_damage_and_path_goal(struct Moby *moby) { break; case HIT_RESPONSE_NON_KNOCKBACK_REACTION: case HIT_RESPONSE_NON_KNOCKBACK_REACTION_ALTERNATE: - patrol_vars->hit_flash_red_target = 0xFA; + patrol_vars->hit_flash.flash_red = 0xFA; break; case HIT_RESPONSE_KNOCKBACK: case HIT_RESPONSE_KNOCKBACK_ALTERNATE: @@ -834,7 +833,7 @@ void update_puffoid_damage_and_path_goal(struct Moby *moby) { } else { moby->state = PUFFOID_STATE_CARRIER_KNOCKBACK; } - patrol_vars->hit_flash_red_target = 0x78; + patrol_vars->hit_flash.flash_red = 0x78; break; } case HIT_RESPONSE_DEATH: @@ -861,18 +860,18 @@ void update_puffoid_damage_and_path_goal(struct Moby *moby) { } else { moby->state = PUFFOID_STATE_CARRIER_DEATH_KNOCKBACK; } - patrol_vars->hit_flash_red_target = 0xF0; + patrol_vars->hit_flash.flash_red = 0xF0; FUN_L00_00257470(moby, 0, -1); break; } case HIT_RESPONSE_COOLDOWN_NO_KNOCKBACK: break; } - start_hit_color_flash(moby, patrol_vars->move); + start_hit_color_flash(moby, &patrol_vars->hit_flash); } } moby->hit_slot = 0xFF; - update_hit_color_flash(moby, patrol_vars->move); + update_hit_color_flash(moby, &patrol_vars->hit_flash); if (patrol_vars->timer != 0) { if (moby->state == PUFFOID_STATE_IDLE || (moby->state == PUFFOID_STATE_WANDER_NEAR_HOME && (moby->anim_flags & 2))) { diff --git a/src/overlays/l12/mobys/blarg_helicopter.c b/src/overlays/l12/mobys/blarg_helicopter.c index d25b99ff78..90684bd787 100644 --- a/src/overlays/l12/mobys/blarg_helicopter.c +++ b/src/overlays/l12/mobys/blarg_helicopter.c @@ -1,5 +1,6 @@ /* Level 12 moby class blarg_helicopter: path following, tilt and hits. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/camera/level_camera.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -128,44 +129,41 @@ void cache_consecutive_point_distances(int point_data_index) { extern float spring_turn(float *vel, float cur, float target, float k, float d, float max) __asm__("FUN_L00_00258110"); typedef struct BlargHelicopterVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 unk29; - u8 pad_2A[0x2E]; - u8 unk58; - u8 unk59; - u8 unk5A; - u8 pad_5B[0x5]; - u8 anim_state; - u8 pad_61[0x6]; - u8 hit_flash_target_red; - u8 pad_68[0x8]; - f32 velocity[4]; - s32 trigger_volume; - u8 pad_84[0x4]; - f32 yaw_turn_velocity; - s16 rocket_fire_timer_frames; - s16 knockback_timer_frames; - f32 bob_angle; - f32 speed; - f32 roll_turn_velocity; - f32 pitch_turn_velocity; - s32 initial_path_index; - s32 endpoint_path_index; - u8 pad_A8[0x4]; - struct Moby *commander; - s32 voice; - s32 path_point; - s32 muzzle_index; - s16 rockets_fired; - s16 target_first_path_endpoint; - s32 unkC0; - s32 activation_timer; - u8 pad_C8[0x8]; - u8 manipulator; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 unk29; + u8 pad_2A[0x2E]; + u8 unk58; + u8 unk59; + u8 unk5A; + u8 pad_5B[0x5]; + struct HitColorFlash hit_flash; + f32 velocity[4]; + s32 trigger_volume; + u8 pad_84[0x4]; + f32 yaw_turn_velocity; + s16 rocket_fire_timer_frames; + s16 knockback_timer_frames; + f32 bob_angle; + f32 speed; + f32 roll_turn_velocity; + f32 pitch_turn_velocity; + s32 initial_path_index; + s32 endpoint_path_index; + u8 pad_A8[0x4]; + struct Moby *commander; + s32 voice; + s32 path_point; + s32 muzzle_index; + s16 rockets_fired; + s16 target_first_path_endpoint; + s32 unkC0; + s32 activation_timer; + u8 pad_C8[0x8]; + u8 manipulator; } BlargHelicopterVars; /* Moby class 326 */ @@ -665,8 +663,8 @@ void process_blarg_helicopter_hits(struct Moby *moby) { allocate_voice_for_target_entry(2, 0, moby); moby->state = BLARG_HELICOPTER_EXPLODE_AND_REMOVE_OR_RESET; } else if (hit_reaction_code != 0xB) { - blarg_helicopter_hit_vars->hit_flash_target_red = 0xB4; - start_hit_color_flash(moby, (short *)&blarg_helicopter_hit_vars->anim_state); + blarg_helicopter_hit_vars->hit_flash.flash_red = 0xB4; + start_hit_color_flash(moby, &blarg_helicopter_hit_vars->hit_flash); if (*(float *)(hit_record + 0x1C) == 5627.925f && moby->state != BLARG_HELICOPTER_KNOCKBACK) { hit_to_moby_angle = fast_arc_tan(moby->pos.x - *(float *)(hit_record + 0), @@ -691,5 +689,5 @@ void process_blarg_helicopter_hits(struct Moby *moby) { } } moby->hit_slot = 0xFF; - update_hit_color_flash(moby, &blarg_helicopter_hit_vars->anim_state); + update_hit_color_flash(moby, &blarg_helicopter_hit_vars->hit_flash); } diff --git a/src/overlays/l12/mobys/blarg_trooper.c b/src/overlays/l12/mobys/blarg_trooper.c index 267e7193f1..8ade9ff023 100644 --- a/src/overlays/l12/mobys/blarg_trooper.c +++ b/src/overlays/l12/mobys/blarg_trooper.c @@ -1,5 +1,6 @@ /* Level 12 moby class blarg_trooper: path following, aiming, attack, damage and its attachment. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/camera/level_camera.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -513,42 +514,40 @@ void blarg_trooper_update(struct Moby *moby) { /* Variables of the Hoven blarg trooper (moby->pvars): the l00 ElectroidVars damage layout, with the alert and call-for-help state at 0x230.. */ typedef struct { - u8 pad0[0x20]; - f32 health; /* 0x20 */ - u8 pad24[2]; - s16 stun_timer; /* 0x26 */ - u8 pad28[0x10]; - s32 reset_alert; /* 0x38 */ - u8 pad3C[0x24]; - u8 anim[7]; /* 0x60: animation blend state */ - u8 unk67; /* 0x67 */ - u8 pad68[8]; - u8 fall[0x10]; /* 0x70 */ - f32 unk80; /* 0x80 */ - u8 pad84[4]; - f32 unk88; /* 0x88 */ - f32 unk8C; /* 0x8C */ - u8 pad90[4]; - s32 unk94; /* 0x94 */ - u8 pad98[8]; - f32 unkA0; /* 0xA0 */ - f32 unkA4; /* 0xA4 */ - f32 unkA8; /* 0xA8 */ - u8 padAC; - u8 unkAD; /* 0xAD */ - u8 padAE[0x12]; - f32 unkC0; /* 0xC0 */ - f32 unkC4; /* 0xC4 */ - u8 padC8[0x168]; - f32 speed; /* 0x230 */ - u8 pad234[0xC]; - s16 alert_timer; /* 0x240 */ - u8 pad242[0x32]; - s32 call_enabled; /* 0x274 */ - s32 groups[4]; /* 0x278: group ids counted before calling for help (-1: none) */ - s32 call_timer; /* 0x288 */ - f32 alert_speed; /* 0x28C */ - s32 volume; /* 0x290: clip volume that hands the trooper to FUN_L12_002e86d0 (-1: none) */ + u8 pad0[0x20]; + f32 health; /* 0x20 */ + u8 pad24[2]; + s16 stun_timer; /* 0x26 */ + u8 pad28[0x10]; + s32 reset_alert; /* 0x38 */ + u8 pad3C[0x24]; + struct HitColorFlash hit_flash; + u8 fall[0x10]; /* 0x70 */ + f32 unk80; /* 0x80 */ + u8 pad84[4]; + f32 unk88; /* 0x88 */ + f32 unk8C; /* 0x8C */ + u8 pad90[4]; + s32 unk94; /* 0x94 */ + u8 pad98[8]; + f32 unkA0; /* 0xA0 */ + f32 unkA4; /* 0xA4 */ + f32 unkA8; /* 0xA8 */ + u8 padAC; + u8 unkAD; /* 0xAD */ + u8 padAE[0x12]; + f32 unkC0; /* 0xC0 */ + f32 unkC4; /* 0xC4 */ + u8 padC8[0x168]; + f32 speed; /* 0x230 */ + u8 pad234[0xC]; + s16 alert_timer; /* 0x240 */ + u8 pad242[0x32]; + s32 call_enabled; /* 0x274 */ + s32 groups[4]; /* 0x278: group ids counted before calling for help (-1: none) */ + s32 call_timer; /* 0x288 */ + f32 alert_speed; /* 0x28C */ + s32 volume; /* 0x290: clip volume that hands the trooper to FUN_L12_002e86d0 (-1: none) */ } BlargTrooperVars; extern void alert_group_e81e0(s32, s32) __asm__("FUN_L01_0026e090"); @@ -649,8 +648,8 @@ void process_blarg_trooper_damage_and_alerts(struct Moby *moby) { trooper_damage_alert_vars->unkC0 = 10.0f; trooper_damage_alert_vars->unkC4 = 19.0f; moby->state = BLARG_TROOPER_DEATH_FALL; - trooper_damage_alert_vars->unk67 = 0x78; - start_hit_color_flash(moby, trooper_damage_alert_vars->anim); + trooper_damage_alert_vars->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &trooper_damage_alert_vars->hit_flash); } else { trooper_damage_alert_vars->unk88 = frame_time * 4.7f; trooper_damage_alert_vars->unk8C = frame_time * 7.7f; @@ -663,13 +662,13 @@ void process_blarg_trooper_damage_and_alerts(struct Moby *moby) { trooper_damage_alert_vars->unkC0 = 4.0f; trooper_damage_alert_vars->unkC4 = 8.0f; moby->state = BLARG_TROOPER_KNOCKBACK_RECOVERY; - trooper_damage_alert_vars->unk67 = 0xFA; + trooper_damage_alert_vars->hit_flash.flash_red = 0xFA; trooper_damage_alert_vars->stun_timer = scale_game_frames(0x3C); - start_hit_color_flash(moby, trooper_damage_alert_vars->anim); + start_hit_color_flash(moby, &trooper_damage_alert_vars->hit_flash); } } moby->hit_slot = 0xFF; - update_hit_color_flash(moby, trooper_damage_alert_vars->anim); + update_hit_color_flash(moby, &trooper_damage_alert_vars->hit_flash); } /* Ported from rac1-decomp (src/overlays/l12_hoven/vendor_002C0310.c: func_L12_002E9988), where it is exact; names translated to the US level program. */ diff --git a/src/overlays/l12/mobys/hoven_anklebiter.c b/src/overlays/l12/mobys/hoven_anklebiter.c index 7c4a76f23b..5e5ce3cdb3 100644 --- a/src/overlays/l12/mobys/hoven_anklebiter.c +++ b/src/overlays/l12/mobys/hoven_anklebiter.c @@ -1,5 +1,6 @@ /* Level 12 moby class hoven_anklebiter: its suck cannon callbacks, pursuit, movement, sparks, damage and alerts. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/camera/level_camera.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -839,39 +840,37 @@ void spawn_hoven_anklebiter_death_sparks(struct Moby *moby) { /* Variables of the Hoven anklebiter (moby->pvars); the l00 ElectroidVars damage layout moved by 0xB0. */ typedef struct { - u8 pad0[0x20]; - f32 health; /* 0x20 */ - u8 pad24[2]; - s16 stun_timer; /* 0x26 */ - u8 pad28[0x10]; - s32 reset_alert; /* 0x38 */ - u8 pad3C[0xD4]; - u8 anim[7]; /* 0x110: animation blend state */ - u8 damage_blend_target; /* 0x117 */ - u8 pad118[8]; - u8 fall[0x10]; /* 0x120 */ - f32 unk130; /* 0x130 */ - f32 unk134; /* 0x134 */ - f32 unk138; /* 0x138 */ - f32 unk13C; /* 0x13C */ - u8 pad140[4]; - s32 unk144; /* 0x144 */ - u8 pad148[8]; - f32 unk150; /* 0x150 */ - f32 unk154; /* 0x154 */ - f32 unk158; /* 0x158 */ - u8 pad15C; - u8 unk15D; /* 0x15D */ - u8 pad15E[0x12]; - f32 knockback_ascent_animation_target; /* 0x170 */ - f32 knockback_descent_animation_target; /* 0x174 */ - u8 pad178[0x134]; - f32 speed; /* 0x2AC */ - u8 pad2B0[0x14]; - s32 alert_timer; /* 0x2C4 */ - u8 pad2C8[0x20]; - s16 call_enabled; /* 0x2E8 */ - s16 call_timer; /* 0x2EA */ + u8 pad0[0x20]; + f32 health; /* 0x20 */ + u8 pad24[2]; + s16 stun_timer; /* 0x26 */ + u8 pad28[0x10]; + s32 reset_alert; /* 0x38 */ + u8 pad3C[0xD4]; + struct HitColorFlash hit_flash; /* 0x110 */ + u8 fall[0x10]; /* 0x120 */ + f32 unk130; /* 0x130 */ + f32 unk134; /* 0x134 */ + f32 unk138; /* 0x138 */ + f32 unk13C; /* 0x13C */ + u8 pad140[4]; + s32 unk144; /* 0x144 */ + u8 pad148[8]; + f32 unk150; /* 0x150 */ + f32 unk154; /* 0x154 */ + f32 unk158; /* 0x158 */ + u8 pad15C; + u8 unk15D; /* 0x15D */ + u8 pad15E[0x12]; + f32 knockback_ascent_animation_target; /* 0x170 */ + f32 knockback_descent_animation_target; /* 0x174 */ + u8 pad178[0x134]; + f32 speed; /* 0x2AC */ + u8 pad2B0[0x14]; + s32 alert_timer; /* 0x2C4 */ + u8 pad2C8[0x20]; + s16 call_enabled; /* 0x2E8 */ + s16 call_timer; /* 0x2EA */ } AnklebiterVars; extern s32 D_001413D0_lui __asm__("D_001413D0") NOT_SDA; @@ -965,8 +964,8 @@ void process_hoven_anklebiter_damage_and_alerts(struct Moby *moby) { anklebiter_vars->knockback_ascent_animation_target = 11.0f; anklebiter_vars->knockback_descent_animation_target = 18.0f; moby->state = ANKLEBITER_DEATH_FALL; - anklebiter_vars->damage_blend_target = 0x78; - start_hit_color_flash(moby, anklebiter_vars->anim); + anklebiter_vars->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &anklebiter_vars->hit_flash); } else { help_direction_or_hit_position.q = coll->pos.q; trooper_knockback_arc(&help_direction_or_hit_position, @@ -977,13 +976,13 @@ void process_hoven_anklebiter_damage_and_alerts(struct Moby *moby) { anklebiter_vars->knockback_descent_animation_target = anklebiter_vars->knockback_ascent_animation_target = -1.0f; moby->state = ANKLEBITER_KNOCKBACK_FALL; - anklebiter_vars->damage_blend_target = 0xFA; + anklebiter_vars->hit_flash.flash_red = 0xFA; anklebiter_vars->stun_timer = scale_game_frames(0x3C); - start_hit_color_flash(moby, anklebiter_vars->anim); + start_hit_color_flash(moby, &anklebiter_vars->hit_flash); } spawn_hoven_anklebiter_death_sparks(moby); } } moby->hit_slot = 0xFF; - update_hit_color_flash(moby, anklebiter_vars->anim); + update_hit_color_flash(moby, &anklebiter_vars->hit_flash); } diff --git a/src/overlays/l13/mobys/blarg_space_commando.c b/src/overlays/l13/mobys/blarg_space_commando.c index af90ab122b..1ff9ea9f3f 100644 --- a/src/overlays/l13/mobys/blarg_space_commando.c +++ b/src/overlays/l13/mobys/blarg_space_commando.c @@ -1,5 +1,6 @@ /* Level 13 Blarg space commando moby class: damage, targeting, ground motion and its trail (points, quads and sparks). */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" #include "rnc/math_consts.h" @@ -540,42 +541,40 @@ void blarg_space_commando_update(struct Moby *moby) { } struct WalkerVars_8d10 { - u8 pad0[0x20]; - f32 health; /* 0x20 */ - u8 pad24[2]; - s16 stun_timer; /* 0x26 */ - u8 pad28[0x10]; - s32 init; /* 0x38: nonzero until the idle timer is first drawn */ - u8 pad3C[0x24]; - u8 anim[8]; /* 0x60 */ - f32 fall_speed; /* 0x68 */ - u8 pad6C[0xC]; - f32 knock_up; /* 0x78 */ - f32 knock_back; /* 0x7C */ - s32 hit_sound; /* 0x80 */ - u8 pad84[4]; - f32 hit_scale; /* 0x88 */ - u8 pad8C[0x24]; - f32 knock_min; /* 0xB0 */ - f32 knock_max; /* 0xB4 */ - u8 padB8[0x58]; - u8 flash[7]; /* 0x110 */ - u8 flash_time; /* 0x117 */ - u8 pad118[8]; - Vec4f target; /* 0x120 */ - u8 pad130[0x30]; - s32 start_frame; /* 0x160 */ - s32 mode; /* 0x164 */ - u8 pad168[8]; - Vec4f home; /* 0x170 */ - s32 path; /* 0x180 */ - s32 pursuit_timer; /* 0x184 */ - u8 pad188[8]; - f32 range; /* 0x190 */ - u8 pad194[8]; - f32 near_range; /* 0x19C */ - f32 far_range; /* 0x1A0 */ - s32 target_moby; /* 0x1A4: -1: none */ + u8 pad0[0x20]; + f32 health; /* 0x20 */ + u8 pad24[2]; + s16 stun_timer; /* 0x26 */ + u8 pad28[0x10]; + s32 init; /* 0x38: nonzero until the idle timer is first drawn */ + u8 pad3C[0x24]; + u8 anim[8]; /* 0x60 */ + f32 fall_speed; /* 0x68 */ + u8 pad6C[0xC]; + f32 knock_up; /* 0x78 */ + f32 knock_back; /* 0x7C */ + s32 hit_sound; /* 0x80 */ + u8 pad84[4]; + f32 hit_scale; /* 0x88 */ + u8 pad8C[0x24]; + f32 knock_min; /* 0xB0 */ + f32 knock_max; /* 0xB4 */ + u8 padB8[0x58]; + struct HitColorFlash hit_flash; + Vec4f target; /* 0x120 */ + u8 pad130[0x30]; + s32 start_frame; /* 0x160 */ + s32 mode; /* 0x164 */ + u8 pad168[8]; + Vec4f home; /* 0x170 */ + s32 path; /* 0x180 */ + s32 pursuit_timer; /* 0x184 */ + u8 pad188[8]; + f32 range; /* 0x190 */ + u8 pad194[8]; + f32 near_range; /* 0x19C */ + f32 far_range; /* 0x1A0 */ + s32 target_moby; /* 0x1A4: -1: none */ }; extern f32 D_L13_00161E58 __attribute__((sda)); @@ -681,7 +680,7 @@ void update_blarg_space_commando_damage_targeting_and_ground_motion(struct Moby 1, 0, fast_arc_tan(*(f32 *)(hit + 0x10), *(f32 *)(hit + 0x14))); - blarg_space_commando_private_data->flash_time = 0xFA; + blarg_space_commando_private_data->hit_flash.flash_red = 0xFA; break; case HIT_RESULT_DEATH: case HIT_RESULT_DYING_KNOCKBACK: @@ -699,14 +698,14 @@ void update_blarg_space_commando_damage_targeting_and_ground_motion(struct Moby 1, 0, fast_arc_tan(*(f32 *)(hit + 0x10), *(f32 *)(hit + 0x14))); - blarg_space_commando_private_data->flash_time = 0xFA; + blarg_space_commando_private_data->hit_flash.flash_red = 0xFA; stop_moby_sound_8d10(moby, 0, -1); break; } - start_hit_color_flash(moby, blarg_space_commando_private_data->flash); + start_hit_color_flash(moby, &blarg_space_commando_private_data->hit_flash); } moby->hit_slot = 0xFF; - update_hit_color_flash(moby, blarg_space_commando_private_data->flash); + update_hit_color_flash(moby, &blarg_space_commando_private_data->hit_flash); if (blarg_space_commando_private_data->pursuit_timer != 0) { blarg_space_commando_private_data->range = blarg_space_commando_private_data->far_range; } else { diff --git a/src/overlays/l13/mobys/hovering_rocket_attacker.c b/src/overlays/l13/mobys/hovering_rocket_attacker.c index 572551b86c..0d69990a97 100644 --- a/src/overlays/l13/mobys/hovering_rocket_attacker.c +++ b/src/overlays/l13/mobys/hovering_rocket_attacker.c @@ -1,5 +1,6 @@ /* Level 13 hovering rocket attacker moby class. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" #include "qcopy.h" @@ -75,39 +76,36 @@ extern void allocate_voice_for_target_entry(int, int, int) __asm__("FUN_0022da68 void hovering_rocket_attacker_update(unsigned char *moby) __asm__("FUN_L13_002c25b8"); typedef struct HoveringRocketAttackerVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 pad_29[0x2F]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x5]; - u8 anim_state; - u8 pad_61[0x6]; - u8 hit_reaction_interpolation_target; - u8 pad_68[0x8]; - f32 path_search_point[4]; - u8 pad_80[0x30]; - u8 *target; - s32 target_selection_status; - u8 pad_B8[0x8]; - f32 hover_center[4]; - s32 search_path; - s32 table_point; - f32 target_range; - u8 yaw_velocity; - u8 pad_DD[0xB]; - s32 timer; - f32 rocket_max_travel_distance; - f32 move_speed; - s32 fire_second_rocket; - u8 *rocket1; - u8 *rocket0; - f32 hover_oscillation[4]; - s32 voice_handle; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 pad_29[0x2F]; + u8 unk58; + u8 pad_59[0x1]; + u8 unk5A; + u8 pad_5B[0x5]; + struct HitColorFlash hit_flash; + f32 path_search_point[4]; + u8 pad_80[0x30]; + u8 *target; + s32 target_selection_status; + u8 pad_B8[0x8]; + f32 hover_center[4]; + s32 search_path; + s32 table_point; + f32 target_range; + u8 yaw_velocity; + u8 pad_DD[0xB]; + s32 timer; + f32 rocket_max_travel_distance; + f32 move_speed; + s32 fire_second_rocket; + u8 *rocket1; + u8 *rocket0; + f32 hover_oscillation[4]; + s32 voice_handle; } HoveringRocketAttackerVars; /* Moby class 101 */ @@ -511,7 +509,7 @@ void update_hovering_rocket_attacker_common(unsigned char *moby) { switch (hit_reaction_code) { case HIT_REACTION_HIGH_INTERPOLATION_TARGET: case HIT_REACTION_HIGH_INTERPOLATION_TARGET_ALTERNATE: - moby_data->hit_reaction_interpolation_target = 0xFA; + moby_data->hit_flash.flash_red = 0xFA; break; case HIT_REACTION_LOW_INTERPOLATION_TARGET: case HIT_REACTION_LOW_INTERPOLATION_TARGET_ALTERNATE: @@ -519,23 +517,23 @@ void update_hovering_rocket_attacker_common(unsigned char *moby) { case HIT_REACTION_LOW_INTERPOLATION_TARGET_THIRD_ALTERNATE: case HIT_REACTION_LOW_INTERPOLATION_TARGET_FOURTH_ALTERNATE: case HIT_REACTION_LOW_INTERPOLATION_TARGET_FIFTH_ALTERNATE: - moby_data->hit_reaction_interpolation_target = 0x78; + moby_data->hit_flash.flash_red = 0x78; break; case HIT_REACTION_LETHAL: case HIT_REACTION_REMOVE: FUN_L00_00257470(moby, 0, -1); MOBY(moby)->state = EMIT_EFFECT_AND_REMOVE; - moby_data->hit_reaction_interpolation_target = 0xF0; + moby_data->hit_flash.flash_red = 0xF0; break; case HIT_REACTION_NONE: case HIT_REACTION_NO_HIT: default: break; } - start_hit_color_flash(moby, &moby_data->anim_state); + start_hit_color_flash(moby, &moby_data->hit_flash); } MOBY(moby)->hit_slot = 0xFF; - update_hit_color_flash(moby, &moby_data->anim_state); + update_hit_color_flash(moby, &moby_data->hit_flash); if (MOBY(moby)->state == UPDATE_ATTACK_SEQUENCE) { moby_data->target_range = 50.0f; } else { diff --git a/src/overlays/l13/mobys/qwarks_starfighter.c b/src/overlays/l13/mobys/qwarks_starfighter.c index d4f7c90433..8776812e09 100644 --- a/src/overlays/l13/mobys/qwarks_starfighter.c +++ b/src/overlays/l13/mobys/qwarks_starfighter.c @@ -1,5 +1,6 @@ /* Level 13 Qwark's starfighter moby class: voice lines, joint attachments and effects, path steering, damage, death, weapons, attack commands and tractor beam. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -671,22 +672,21 @@ typedef struct { } Sub; typedef struct { - char pad0[0x20]; - Sub sub; - char pad28[0x38]; - char q60[7]; - unsigned char damage_flash_red; - char pad68[0x5C]; - Moby_2EAE80 *list[11]; - Moby_2EAE80 *first; - char padF4[0xC]; - int tractor_beam_timer_frames; - char pad104[0x18]; - int tractor_beam_voice_slot_index; - char pad120[0x18]; - unsigned short h138; - char pad13A[0xE]; - unsigned char b148; + char pad0[0x20]; + Sub sub; + char pad28[0x38]; + struct HitColorFlash hit_flash; + char pad70[0x54]; + Moby_2EAE80 *list[11]; + Moby_2EAE80 *first; + char padF4[0xC]; + int tractor_beam_timer_frames; + char pad104[0x18]; + int tractor_beam_voice_slot_index; + char pad120[0x18]; + unsigned short h138; + char pad13A[0xE]; + unsigned char b148; } Data_2EAE80; typedef struct { @@ -783,10 +783,10 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { moby_data->first->bA4 = 0xFF; } else { dd->health = dd->health - r->damage_amount; - moby_data->damage_flash_red = 0xFA; + moby_data->hit_flash.flash_red = 0xFA; mode = ATTACHMENT_DAMAGE_APPLIED; moby_data->sub.h6 = scale_game_frames(0); - start_hit_color_flash(moby, moby_data->q60); + start_hit_color_flash(moby, &moby_data->hit_flash); moby_data->first->bA4 = 0xFF; } if (moby->state == STARFIGHTER_STATE_DEATH_FLIGHT) { @@ -882,10 +882,10 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { moby_data->list[i]->bA4 = 0xFF; } else { dd->health = dd->health - r->damage_amount; - moby_data->damage_flash_red = 0xFA; + moby_data->hit_flash.flash_red = 0xFA; mode = ATTACHMENT_DAMAGE_APPLIED; moby_data->sub.h6 = scale_game_frames(0); - start_hit_color_flash(moby, moby_data->q60); + start_hit_color_flash(moby, &moby_data->hit_flash); moby_data->list[i]->bA4 = 0xFF; } if (moby->state == STARFIGHTER_STATE_DEATH_FLIGHT) { @@ -980,7 +980,7 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { } } } - update_hit_color_flash(moby, moby_data->q60); + update_hit_color_flash(moby, &moby_data->hit_flash); } void predict_hero_ship_projectile_lead_position(char *predicted_target_position, diff --git a/src/overlays/l13/mobys/robosquawker.c b/src/overlays/l13/mobys/robosquawker.c index a925ec8598..ff7999c759 100644 --- a/src/overlays/l13/mobys/robosquawker.c +++ b/src/overlays/l13/mobys/robosquawker.c @@ -1,5 +1,6 @@ /* Level 13 robosquawker moby class: target selection, particle, ground height and update. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "sda.h" #include "rnc/overlay/shared/rendering/effects/create_part.h" #include "rnc/overlay/shared/mobys/moby_point_position.h" @@ -260,72 +261,72 @@ typedef struct { } RsTarget; typedef struct { - char pad0[0x20]; - float health; - short max_health; - short damage_cooldown_frames; - unsigned char hit_response_class; - unsigned char b29; - char pad2A[0xE]; - int alert_refresh_requested; - char pad3C[4]; - RsVec v40; - char pad50[8]; - unsigned char b58; - char pad59; - unsigned char b5A; - char pad5B[0x6D]; - short hC8; - char padCA[6]; - void *pD0; - char padD4[0x3C]; - char x110[0x10]; - char x120[0x10]; - float motion_gravity_step; - float motion_horizontal_speed_change_limit; - float motion_horizontal_launch_step; - float motion_vertical_launch_step; - int motion_collision_radius_fixed_point; - int motion_behavior_flags; - float motion_bounce_restitution; - char pad14C[0x11]; - unsigned char b15D; - char pad15E[0x12]; - float motion_ascent_end_animation_frame; - float motion_descent_end_animation_frame; - char pad178[8]; - int w180; - int w184; - float ground_max_drop_height; - float ground_max_rise_height; - char pad190[8]; - float ground_vertical_step; - char pad19C[8]; - float ground_movement_step_length; - char pad1A8[0x10]; - int ground_movement_flags; - char pad1BC[0x14]; - RsVec home_position; - RsVec flight_destination; - float yaw_turn_step; - float chase_yaw_offset_radians; - float chase_yaw_offset_degrees; - float target_engagement_radius; - float default_target_engagement_radius; - float walking_speed; - short h208; - short ground_idle_preference; - int random_flight_timer_frames; - int chase_yaw_flip_timer_frames; - short alert_timer_frames; - short walk_range_radius; - char *walk_range_anchor; - int ground_navigation_path_index; - int flight_path_index; - int flight_waypoint_index; - void *p228; - int target_clip_volume_index; - unsigned char x230[1]; + char pad0[0x20]; + float health; + short max_health; + short damage_cooldown_frames; + unsigned char hit_response_class; + unsigned char b29; + char pad2A[0xE]; + int alert_refresh_requested; + char pad3C[4]; + RsVec v40; + char pad50[8]; + unsigned char b58; + char pad59; + unsigned char b5A; + char pad5B[0x6D]; + short hC8; + char padCA[6]; + void *pD0; + char padD4[0x3C]; + struct HitColorFlash hit_flash; + char x120[0x10]; + float motion_gravity_step; + float motion_horizontal_speed_change_limit; + float motion_horizontal_launch_step; + float motion_vertical_launch_step; + int motion_collision_radius_fixed_point; + int motion_behavior_flags; + float motion_bounce_restitution; + char pad14C[0x11]; + unsigned char b15D; + char pad15E[0x12]; + float motion_ascent_end_animation_frame; + float motion_descent_end_animation_frame; + char pad178[8]; + int w180; + int w184; + float ground_max_drop_height; + float ground_max_rise_height; + char pad190[8]; + float ground_vertical_step; + char pad19C[8]; + float ground_movement_step_length; + char pad1A8[0x10]; + int ground_movement_flags; + char pad1BC[0x14]; + RsVec home_position; + RsVec flight_destination; + float yaw_turn_step; + float chase_yaw_offset_radians; + float chase_yaw_offset_degrees; + float target_engagement_radius; + float default_target_engagement_radius; + float walking_speed; + short h208; + short ground_idle_preference; + int random_flight_timer_frames; + int chase_yaw_flip_timer_frames; + short alert_timer_frames; + short walk_range_radius; + char *walk_range_anchor; + int ground_navigation_path_index; + int flight_path_index; + int flight_waypoint_index; + void *p228; + int target_clip_volume_index; + unsigned char x230[1]; } RsVars; typedef struct { @@ -573,8 +574,8 @@ void robosquawker_update(RsMoby *robosquawker_moby) { robosquawker_vars->motion_descent_end_animation_frame = 18.0f; robosquawker_moby->state = ROBOSQUAWKER_STATE_DEATH_KNOCKBACK; release_robosquawker_particle((Level13VendorMoby *)robosquawker_vars); - robosquawker_vars->x110[7] = 0x78; - start_hit_color_flash(robosquawker_moby, (short *)robosquawker_vars->x110); + robosquawker_vars->hit_flash.flash_red = 0x78; + start_hit_color_flash(robosquawker_moby, &robosquawker_vars->hit_flash); FUN_L00_00257470(robosquawker_moby, 0, -1); } else { *(u128 *)&va = *(u128 *)&hit->pos; @@ -592,9 +593,9 @@ void robosquawker_update(RsMoby *robosquawker_moby) { robosquawker_vars->motion_descent_end_animation_frame = 10.0f; robosquawker_moby->state = ROBOSQUAWKER_STATE_DAMAGE_KNOCKBACK; release_robosquawker_particle((Level13VendorMoby *)robosquawker_vars); - *(unsigned char *)&robosquawker_vars->x110[7] = 0xFA; + robosquawker_vars->hit_flash.flash_red = 0xFA; robosquawker_vars->damage_cooldown_frames = scale_game_frames(0x3C); - start_hit_color_flash(robosquawker_moby, (short *)robosquawker_vars->x110); + start_hit_color_flash(robosquawker_moby, &robosquawker_vars->hit_flash); } } } @@ -1391,7 +1392,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { break; } } - update_hit_color_flash(robosquawker_moby, robosquawker_vars->x110); + update_hit_color_flash(robosquawker_moby, &robosquawker_vars->hit_flash); if (robosquawker_moby->pos.f[0] < 2.0f || robosquawker_moby->pos.f[0] > 1021.0f || robosquawker_moby->pos.f[1] < 2.0f || robosquawker_moby->pos.f[1] > 1021.0f || robosquawker_moby->pos.f[2] < 2.0f || robosquawker_moby->pos.f[2] > 1021.0f) { diff --git a/src/overlays/l14/mobys/blarg_heavy_interceptor.c b/src/overlays/l14/mobys/blarg_heavy_interceptor.c index 9c4e33195f..736c51670f 100644 --- a/src/overlays/l14/mobys/blarg_heavy_interceptor.c +++ b/src/overlays/l14/mobys/blarg_heavy_interceptor.c @@ -1,5 +1,6 @@ /* Level 14 Blarg heavy interceptor moby class: patrol paths, aiming, light ring effects and turret groups. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/mobys/moby.h" #include "rnc/globals.h" @@ -195,66 +196,63 @@ extern Vec4 D_L14_00174560; void blarg_heavy_interceptor_update(struct Moby *m) __asm__("FUN_L14_002ac618"); typedef struct BlargHeavyInterceptorVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 pad_29[0x5]; - u8 removal_status; - u8 pad_2F[0x11]; - f32 unk40[4]; - u8 pad_50[0x8]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x5]; - s16 anim_state; - u8 pad_62[0x5]; - u8 hit_flash_target_red; - u8 pad_68[0x8]; - s32 turret_group; - s32 spawn_path; - s32 path_index; - u8 pad_7C[0x4]; - s32 path_point; - s32 path_segment; - s16 unk88; - s16 rejoin_path_loop; - f32 path_point_segment_distance; - f32 cached_aim_point_position[4]; - f32 bone_transform[4][4]; - f32 manipulator0[4]; - f32 manipulator0_rotation[4]; - u8 pad_100[0x20]; - f32 manipulator1[4]; - f32 manipulator1_rotation[4]; - f32 unk140[4]; - u8 pad_150[0x10]; - f32 beam_rotation_blink_and_aim_path_state[4]; - f32 aim_point_position[4]; - f32 unk180[4]; - f32 unk190[4]; - f32 oscillation_state[4]; - f32 unk1B0[4]; - f32 unk1C0[4]; - f32 unk1D0[4]; - f32 death_velocity[4]; - s16 timer_1F0; - s16 timer_1F2; - f32 unk1F4; - f32 unk1F8; - f32 yaw_drift; - s16 unk200; - s16 red_light_tint_enabled; - s32 patrol_path; - s16 return_path_complete; - s16 group_member_count; - s32 flags; - f32 initial_path_distance_fraction; - f32 aim_point_glow_quad_scale; - f32 glow_camera_pull_distance_limit; - f32 unk21C; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 pad_29[0x5]; + u8 removal_status; + u8 pad_2F[0x11]; + f32 unk40[4]; + u8 pad_50[0x8]; + u8 unk58; + u8 pad_59[0x1]; + u8 unk5A; + u8 pad_5B[0x5]; + struct HitColorFlash hit_flash; + s32 turret_group; + s32 spawn_path; + s32 path_index; + u8 pad_7C[0x4]; + s32 path_point; + s32 path_segment; + s16 unk88; + s16 rejoin_path_loop; + f32 path_point_segment_distance; + f32 cached_aim_point_position[4]; + f32 bone_transform[4][4]; + f32 manipulator0[4]; + f32 manipulator0_rotation[4]; + u8 pad_100[0x20]; + f32 manipulator1[4]; + f32 manipulator1_rotation[4]; + f32 unk140[4]; + u8 pad_150[0x10]; + f32 beam_rotation_blink_and_aim_path_state[4]; + f32 aim_point_position[4]; + f32 unk180[4]; + f32 unk190[4]; + f32 oscillation_state[4]; + f32 unk1B0[4]; + f32 unk1C0[4]; + f32 unk1D0[4]; + f32 death_velocity[4]; + s16 timer_1F0; + s16 timer_1F2; + f32 unk1F4; + f32 unk1F8; + f32 yaw_drift; + s16 unk200; + s16 red_light_tint_enabled; + s32 patrol_path; + s16 return_path_complete; + s16 group_member_count; + s32 flags; + f32 initial_path_distance_fraction; + f32 aim_point_glow_quad_scale; + f32 glow_camera_pull_distance_limit; + f32 unk21C; } BlargHeavyInterceptorVars; /* Moby class 8 */ @@ -848,7 +846,7 @@ void process_blarg_heavy_interceptor_hit_reactions(struct Moby *moby) { switch (hit_reaction_result) { case HIT_REACTION_ANIMATE_WITH_LOW_RED_FLASH: case HIT_REACTION_LOW_RED_FLASH_AND_HIT_ANIMATION: - blarg_heavy_interceptor_vars->hit_flash_target_red = 0x64; + blarg_heavy_interceptor_vars->hit_flash.flash_red = 0x64; blend_moby_animation(moby, 1, 0, 5); break; case HIT_REACTION_PLAY_HIT_ANIMATION: @@ -870,10 +868,10 @@ void process_blarg_heavy_interceptor_hit_reactions(struct Moby *moby) { case HIT_REACTION_NONE: break; } - start_hit_color_flash(moby, &blarg_heavy_interceptor_vars->anim_state); + start_hit_color_flash(moby, &blarg_heavy_interceptor_vars->hit_flash); } moby->hit_slot = 0xFF; - update_hit_color_flash(moby, &blarg_heavy_interceptor_vars->anim_state); + update_hit_color_flash(moby, &blarg_heavy_interceptor_vars->hit_flash); } extern s32 blarg_heavy_interceptor_light_ring_vertex_count_gp __asm__("D_L14_00161418") diff --git a/src/overlays/l14/mobys/bolt_thief.c b/src/overlays/l14/mobys/bolt_thief.c index f439ecc429..297ca7b870 100644 --- a/src/overlays/l14/mobys/bolt_thief.c +++ b/src/overlays/l14/mobys/bolt_thief.c @@ -1,5 +1,6 @@ /* Level 14 bolt thief moby class and its path movement. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -30,32 +31,30 @@ enum { }; typedef struct { - char pad00[0x60]; - char effect[7]; /* 0x60: record func_L00_0025E590 updates */ - unsigned char ticks; /* 0x67 */ - char pad68[8]; - float knock[4]; /* 0x70: record func_L00_0025D5B0 fills (velocity first) */ - float knock_drag; /* 0x80 */ - float knock_gravity; /* 0x84 */ - float knock_speed; /* 0x88 */ - float knock_rise; /* 0x8C */ - int unknown90; - int knock_flags; /* 0x94 */ - char pad98[0x15]; - unsigned char knock_bAD; /* 0xAD */ - char padAE[0x22]; - int counter; /* 0xD0 */ - float timer; /* 0xD4 */ - int path; /* 0xD8: index into D_L14_001B0BB0 */ - int other_path; /* 0xDC */ - int trigger; /* 0xE0 */ - float vx; /* 0xE4 */ - float vy; /* 0xE8 */ - float vz; /* 0xEC */ - float turn; /* 0xF0 */ - char *child; /* 0xF4 */ - int unknownF8; - int mode; /* 0xFC */ + char pad00[0x60]; + struct HitColorFlash hit_flash; + float knock[4]; /* 0x70: record func_L00_0025D5B0 fills (velocity first) */ + float knock_drag; /* 0x80 */ + float knock_gravity; /* 0x84 */ + float knock_speed; /* 0x88 */ + float knock_rise; /* 0x8C */ + int unknown90; + int knock_flags; /* 0x94 */ + char pad98[0x15]; + unsigned char knock_bAD; /* 0xAD */ + char padAE[0x22]; + int counter; /* 0xD0 */ + float timer; /* 0xD4 */ + int path; /* 0xD8: index into D_L14_001B0BB0 */ + int other_path; /* 0xDC */ + int trigger; /* 0xE0 */ + float vx; /* 0xE4 */ + float vy; /* 0xE8 */ + float vz; /* 0xEC */ + float turn; /* 0xF0 */ + char *child; /* 0xF4 */ + int unknownF8; + int mode; /* 0xFC */ } L16CrateData; typedef struct { @@ -155,7 +154,7 @@ void bolt_thief_update(L16CrateMoby *moby) { 0, fast_arc_tan(moby->position[0] - player->motion.pos.f[0], moby->position[1] - player->motion.pos.f[1])); - moby_data->ticks = 0x78; + moby_data->hit_flash.flash_red = 0x78; FUN_L00_00257470(moby, 0, -1); moby->state = BOLT_THIEF_STATE_KNOCKBACK; } @@ -315,7 +314,7 @@ void bolt_thief_update(L16CrateMoby *moby) { } break; } - update_hit_color_flash(moby, moby_data->effect); + update_hit_color_flash(moby, &moby_data->hit_flash); } extern int sample_path(char *, float *, float *, float *, int, float) __asm__("FUN_L00_0025d808"); diff --git a/src/overlays/l14/mobys/flying_car.c b/src/overlays/l14/mobys/flying_car.c index 2c03b88fbd..cb998e444b 100644 --- a/src/overlays/l14/mobys/flying_car.c +++ b/src/overlays/l14/mobys/flying_car.c @@ -7,6 +7,7 @@ #include "rnc/mobys/attach_manipulator.h" #include "rnc/overlay/shared/rendering/set_moby_color.h" #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -41,34 +42,34 @@ typedef struct { } Fx_6ee0; typedef struct { - char pad0[0x60]; - unsigned char effect[0x10]; /* 0x60 */ - int f70; - int path_sampling_state; - int path; /* 0x78 */ - int sound; /* 0x7C */ - float position_x_spring_state; - float position_y_spring_state; - float f88; - short timer; /* 0x8C */ - char pad8E[2]; - float bank_spring_state; - float pitch_spring_state; - float yaw_spring_state; - char pad9C[4]; - int part; /* 0xA0 */ - float fA4; - float fA8; - float fAC; - int fB0; - int fB4; - int fB8; - int fBC; - int fC0; - int trigger; /* 0xC4 */ - int fC8; - int fCC; - Fx_6ee0 fx; /* 0xD0 */ + char pad0[0x60]; + struct HitColorFlash hit_flash; + int f70; + int path_sampling_state; + int path; /* 0x78 */ + int sound; /* 0x7C */ + float position_x_spring_state; + float position_y_spring_state; + float f88; + short timer; /* 0x8C */ + char pad8E[2]; + float bank_spring_state; + float pitch_spring_state; + float yaw_spring_state; + char pad9C[4]; + int part; /* 0xA0 */ + float fA4; + float fA8; + float fAC; + int fB0; + int fB4; + int fB8; + int fBC; + int fC0; + int trigger; /* 0xC4 */ + int fC8; + int fCC; + Fx_6ee0 fx; /* 0xD0 */ } Data_6ee0; typedef struct { @@ -177,7 +178,7 @@ void flying_car_update(struct Moby *flying_car_moby) { } fill_transfer_words(&flying_car_data->fx, 0, 0x40); attach_manipulator(flying_car_moby, 0, &flying_car_data->fx); - start_hit_color_flash(flying_car_moby, flying_car_data->effect); + start_hit_color_flash(flying_car_moby, &flying_car_data->hit_flash); if (flying_car_data->trigger >= 0) { flying_car_moby->flags |= 0x41; flying_car_moby->collision = 0; @@ -253,9 +254,9 @@ void flying_car_update(struct Moby *flying_car_moby) { if (fast_dec_timer_s16(&flying_car_data->timer)) { Path_6ee0 *path = ((Path_6ee0 *)l14_paths[flying_car_data->path]); set_moby_color(flying_car_moby, - flying_car_data->effect[4], - flying_car_data->effect[5], - flying_car_data->effect[6]); + flying_car_data->hit_flash.original_red, + flying_car_data->hit_flash.original_green, + flying_car_data->hit_flash.original_blue); flying_car_moby->flags &= 0xFFBE; flying_car_moby->collision = flying_car_moby->pclass->collision; flying_car_data->timer = scale_game_frames(flying_car_path_reset_delay_frames_gp); diff --git a/src/overlays/l14/mobys/machinegun_turret.c b/src/overlays/l14/mobys/machinegun_turret.c index 0198bec9bd..f40400fa6e 100644 --- a/src/overlays/l14/mobys/machinegun_turret.c +++ b/src/overlays/l14/mobys/machinegun_turret.c @@ -1,5 +1,6 @@ /* Level 14 machinegun turret moby class: target selection, update and hit reactions. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/mobys/moby.h" #include "qzero.h" #include "qcopy.h" @@ -199,31 +200,28 @@ int select_moby_by_xy_distance(char *selection_reference, char *selection_output } typedef struct MachinegunTurretVars { - u8 pad_0[0x20]; - f32 health; - u8 pad_24[0x1C]; - u8 unk40; - u8 pad_41[0x1F]; - u8 anim_state; - u8 pad_61[0x6]; - u8 unk67; - u8 pad_68[0x8]; - f32 base_z; - s16 unk74; - s16 unk76; - f32 unk78; - u8 pad_7C[0x4]; - s32 aiming_cuboid; - f32 unk84; - s16 unk88; - u8 unk8A; - u8 unk8B; - f32 unk8C; - s32 unk90; - s32 unk94; - s32 timer; - s16 timer_9C; - s16 unk9E; + u8 pad_0[0x20]; + f32 health; + u8 pad_24[0x1C]; + u8 unk40; + u8 pad_41[0x1F]; + struct HitColorFlash hit_flash; + f32 base_z; + s16 unk74; + s16 unk76; + f32 unk78; + u8 pad_7C[0x4]; + s32 aiming_cuboid; + f32 unk84; + s16 unk88; + u8 unk8A; + u8 unk8B; + f32 unk8C; + s32 unk90; + s32 unk94; + s32 timer; + s16 timer_9C; + s16 unk9E; } MachinegunTurretVars; void machinegun_turret_update(char *moby) __asm__("FUN_L14_002b3bf0"); @@ -544,7 +542,7 @@ void process_machinegun_turret_hit_reactions(struct Moby *moby) { break; case HIT_REACTION_ANIMATE_WITH_LOW_RED_FLASH: case HIT_REACTION_LOW_RED_FLASH_AND_HIT_ANIMATION: - moby_vars->unk67 = 100; + moby_vars->hit_flash.flash_red = 100; break; case HIT_REACTION_PLAY_HIT_ANIMATION: case HIT_REACTION_HIGH_RED_FLASH_AND_HIT_ANIMATION: @@ -552,20 +550,20 @@ void process_machinegun_turret_hit_reactions(struct Moby *moby) { case HIT_REACTION_BLEND_HIT_ANIMATION_WITH_HIGH_RED_FLASH: case HIT_REACTION_HIGH_RED_FLASH_WITH_BLENDED_HIT_ANIMATION: case HIT_REACTION_BLEND_HIT_ANIMATION_AND_HIGH_RED_FLASH: - moby_vars->unk67 = 200; + moby_vars->hit_flash.flash_red = 200; break; case HIT_REACTION_LETHAL: case HIT_REACTION_DESTROY: moby->state = TURRET_STATE_DESTROY; moby->flags &= 0xEFFF; - moby_vars->unk67 = 0xF0; + moby_vars->hit_flash.flash_red = 0xF0; FUN_L00_00257470(moby, 0, -1); break; } - start_hit_color_flash(moby, (short *)&moby_vars->anim_state); + start_hit_color_flash(moby, &moby_vars->hit_flash); } moby->hit_slot = 0xFF; - update_hit_color_flash(moby, &moby_vars->anim_state); + update_hit_color_flash(moby, &moby_vars->hit_flash); } extern int D_L14_0016150C_gp __asm__("D_L14_0016150C") __attribute__((sda)); diff --git a/src/overlays/l16/mobys/bolt_thief.c b/src/overlays/l16/mobys/bolt_thief.c index 6a9de32254..09ea42e822 100644 --- a/src/overlays/l16/mobys/bolt_thief.c +++ b/src/overlays/l16/mobys/bolt_thief.c @@ -1,5 +1,6 @@ /* Level 16 bolt_thief. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/audio/voice_pool.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -53,32 +54,30 @@ extern int scale_game_frames(int); /* Ported from rac1-decomp (src/overlays/l16_kalebo3/vendor_002A50F0.c: func_L16_002E4C08), where it is exact; names translated to the US level program. */ typedef struct { - char pad00[0x60]; - char effect[7]; /* 0x60: record func_L00_0025E590 updates */ - unsigned char ticks; /* 0x67 */ - char pad68[8]; - float knock[4]; /* 0x70: record func_L00_0025D5B0 fills (velocity first) */ - float knock_drag; /* 0x80 */ - float knock_gravity; /* 0x84 */ - float knock_speed; /* 0x88 */ - float knock_rise; /* 0x8C */ - int unknown90; - int knock_flags; /* 0x94 */ - char pad98[0x15]; - unsigned char knock_bAD; /* 0xAD */ - char padAE[0x22]; - int counter; /* 0xD0 */ - float timer; /* 0xD4 */ - int path; /* 0xD8: index into D_L16_001B0C30 */ - int other_path; /* 0xDC */ - int trigger; /* 0xE0 */ - float vx; /* 0xE4 */ - float vy; /* 0xE8 */ - float vz; /* 0xEC */ - float turn; /* 0xF0 */ - char *child; /* 0xF4 */ - int unknownF8; - int mode; /* 0xFC */ + char pad00[0x60]; + struct HitColorFlash hit_flash; + float knock[4]; /* 0x70: record func_L00_0025D5B0 fills (velocity first) */ + float knock_drag; /* 0x80 */ + float knock_gravity; /* 0x84 */ + float knock_speed; /* 0x88 */ + float knock_rise; /* 0x8C */ + int unknown90; + int knock_flags; /* 0x94 */ + char pad98[0x15]; + unsigned char knock_bAD; /* 0xAD */ + char padAE[0x22]; + int counter; /* 0xD0 */ + float timer; /* 0xD4 */ + int path; /* 0xD8: index into D_L16_001B0C30 */ + int other_path; /* 0xDC */ + int trigger; /* 0xE0 */ + float vx; /* 0xE4 */ + float vy; /* 0xE8 */ + float vz; /* 0xEC */ + float turn; /* 0xF0 */ + char *child; /* 0xF4 */ + int unknownF8; + int mode; /* 0xFC */ } L16CrateData; typedef struct { @@ -178,7 +177,7 @@ void bolt_thief_update(L16CrateMoby *moby) { 0, fast_arc_tan(moby->position[0] - player->motion.pos.f[0], moby->position[1] - player->motion.pos.f[1])); - bolt_thief_data->ticks = 0x78; + bolt_thief_data->hit_flash.flash_red = 0x78; FUN_L00_00257470(moby, 0, -1); moby->state = BOLT_THIEF_KNOCKBACK; } @@ -339,7 +338,7 @@ void bolt_thief_update(L16CrateMoby *moby) { } break; } - update_hit_color_flash(moby, bolt_thief_data->effect); + update_hit_color_flash(moby, &bolt_thief_data->hit_flash); } #include "rnc/overlay/l16/mobys/bolt_thief_globals.h" diff --git a/src/overlays/l16/mobys/chomper.c b/src/overlays/l16/mobys/chomper.c index cd25f1a66c..907b071c6b 100644 --- a/src/overlays/l16/mobys/chomper.c +++ b/src/overlays/l16/mobys/chomper.c @@ -1,5 +1,6 @@ /* Level 16 chomper. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/audio/voice_pool.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -202,34 +203,31 @@ extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); /* Ported from rac1-decomp (src/overlays/l16_kalebo3/vendor_002A50F0.c: func_L16_002E7670), where it is exact; names translated to the US level program. */ typedef struct { - char pad0[0x110]; - short reaction[3]; /* 0x110: record func_L00_0025E4B0 and func_L00_0025E590 take */ - char pad116; - unsigned char reaction_time; /* 0x117 */ - char pad118[8]; - float knock[4]; /* 0x120: record func_L00_0025D5B0 fills */ - float speed; /* 0x130 */ - float acceleration; /* 0x134 */ - float jump_speed; /* 0x138 */ - float turn_speed; /* 0x13C */ - int flags; /* 0x140 */ - int kind; /* 0x144 */ - float strength; /* 0x148 */ - char pad14C[0x11]; - unsigned char pending; /* 0x15D */ - char pad15E[0xE]; - float timer; /* 0x16C */ - float knockback_ascent_animation_target; - float knockback_descent_animation_target; - char pad178[8]; - float target[4]; /* 0x180 */ - char pad190[0x30]; - int target_moby; - int target_selection_status; - char pad1C8[8]; - float home[4]; /* 0x1D0 */ - char pad1E0[0x10]; - int path; /* 0x1F0: index into D_L16_001B0C30 */ + char pad0[0x110]; + struct HitColorFlash hit_flash; + float knock[4]; /* 0x120: record func_L00_0025D5B0 fills */ + float speed; /* 0x130 */ + float acceleration; /* 0x134 */ + float jump_speed; /* 0x138 */ + float turn_speed; /* 0x13C */ + int flags; /* 0x140 */ + int kind; /* 0x144 */ + float strength; /* 0x148 */ + char pad14C[0x11]; + unsigned char pending; /* 0x15D */ + char pad15E[0xE]; + float timer; /* 0x16C */ + float knockback_ascent_animation_target; + float knockback_descent_animation_target; + char pad178[8]; + float target[4]; /* 0x180 */ + char pad190[0x30]; + int target_moby; + int target_selection_status; + char pad1C8[8]; + float home[4]; /* 0x1D0 */ + char pad1E0[0x10]; + int path; /* 0x1F0: index into D_L16_001B0C30 */ } L16PursuitData; typedef struct { @@ -298,11 +296,11 @@ void update_chomper_hit_reaction_and_target(void *chomper_instance) { pursuit_data->knockback_descent_animation_target = 16.0f; chomper_moby->state = CHOMPER_KNOCKBACK; chomper_moby->i94 = 0; - pursuit_data->reaction_time = 0x78; - start_hit_color_flash(chomper_moby, pursuit_data->reaction); + pursuit_data->hit_flash.flash_red = 0x78; + start_hit_color_flash(chomper_moby, &pursuit_data->hit_flash); } chomper_moby->bA4 = 0xFF; - update_hit_color_flash(chomper_moby, pursuit_data->reaction); + update_hit_color_flash(chomper_moby, &pursuit_data->hit_flash); reaction_flags_or_path_entry_address = (int)&D_L16_001B0930[pursuit_data->path]; reaction_kind_or_path_address = *(int *)reaction_flags_or_path_entry_address; if (FUN_L00_0025ff38(chomper_moby, diff --git a/src/overlays/l17/mobys/robot_dog.c b/src/overlays/l17/mobys/robot_dog.c index 32bf0e98fa..69562deabe 100644 --- a/src/overlays/l17/mobys/robot_dog.c +++ b/src/overlays/l17/mobys/robot_dog.c @@ -1,5 +1,6 @@ /* Level 17 robot_dog: chase and aim, its stun and suction methods, and its glow quads. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/camera/level_camera.h" #include "rnc/input/pad_globals.h" #include "rnc/mobys/moby_class_id.h" @@ -545,38 +546,35 @@ void robot_dog_update(unsigned char *robot_dog_moby) { /* Ported from rac1-decomp (src/overlays/l17_fleet/vendor_002F1558.c: func_L17_002F1558), where it is exact; names translated to the US level program. */ typedef struct { - char pad0[0x20]; - float f20; - char pad24[0x14]; - int i38; - char pad3C[0xD4]; - short h110[3]; - char b116; - unsigned char b117; - char pad118[8]; - float v120[4]; - float f130; - float f134; - float f138; - float f13C; - int i140; - int i144; - char pad148[0x15]; - char b15D; - char pad15E[0x12]; - float f170; - float f174; - char pad178[8]; - float v180[4]; - char pad190[0x20]; - float v1B0[4]; - char pad1C0[0x14]; - float f1D4; - char pad1D8[0xC]; - char b1E4; - char pad1E5[0xB]; - float f1F0; - float f1F4; + char pad0[0x20]; + float f20; + char pad24[0x14]; + int i38; + char pad3C[0xD4]; + struct HitColorFlash hit_flash; + float v120[4]; + float f130; + float f134; + float f138; + float f13C; + int i140; + int i144; + char pad148[0x15]; + char b15D; + char pad15E[0x12]; + float f170; + float f174; + char pad178[8]; + float v180[4]; + char pad190[0x20]; + float v1B0[4]; + char pad1C0[0x14]; + float f1D4; + char pad1D8[0xC]; + char b1E4; + char pad1E5[0xB]; + float f1F0; + float f1F4; } Data; typedef struct { @@ -653,8 +651,8 @@ void update_robot_dog_hit_reaction_and_target_detection(void *moby_v, int clip_v } trooper_start_knockback(knockback_heading, moby, moby_vars->v120, 0xB, 1, 0); moby->state = ROBOT_DOG_STATE_FALL_THEN_REMOVE; - moby_vars->b117 = 0xF0; - start_hit_color_flash(moby, moby_vars->h110); + moby_vars->hit_flash.flash_red = 0xF0; + start_hit_color_flash(moby, &moby_vars->hit_flash); } moby->bA4 = 0xFF; if (clip_volume_suppressed != 0) { diff --git a/src/overlays/shared/enemies/armed_transport.c b/src/overlays/shared/enemies/armed_transport.c index bb992a0fdb..7b39157176 100644 --- a/src/overlays/shared/enemies/armed_transport.c +++ b/src/overlays/shared/enemies/armed_transport.c @@ -1,5 +1,6 @@ /* Shared moby class: armed_transport. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/audio/voice_pool.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -30,39 +31,37 @@ enum { }; typedef struct ArmedTransportVars { - u8 pad0[0x20]; - f32 health; - s16 max_health; - u8 pad26[0x2]; - s8 hit_response_class; - u8 pad29[0x37]; - u8 trooper_anim[0x7]; - u8 hit_animation_secondary_red; - u8 pad68[0x8]; - f32 target_position[4]; - u8 pad80[0x30]; - s32 target; - s32 target_selection_status; - u8 padB8[0x8]; - u8 passenger_moby_indices[0x10]; - s32 target_path_index; - s32 activation_path_index; - s32 path_index; - s32 second_path_index; - u8 joint_animation[0x64]; - f32 joint_animation_target; - u8 pad148[0x18]; - s32 death_timer_frames; - s32 rocket_timer; - s32 path_point; - s32 path_segment_fraction; - f32 path_and_pose_state[4]; - u8 pose_angle_velocity[0x4]; - s32 passenger_release_timer; - f32 rot_x_velocity; - f32 bob_phase_radians; - s32 voice; - f32 base_height; + u8 pad0[0x20]; + f32 health; + s16 max_health; + u8 pad26[0x2]; + s8 hit_response_class; + u8 pad29[0x37]; + struct HitColorFlash hit_flash; + f32 target_position[4]; + u8 pad80[0x30]; + s32 target; + s32 target_selection_status; + u8 padB8[0x8]; + u8 passenger_moby_indices[0x10]; + s32 target_path_index; + s32 activation_path_index; + s32 path_index; + s32 second_path_index; + u8 joint_animation[0x64]; + f32 joint_animation_target; + u8 pad148[0x18]; + s32 death_timer_frames; + s32 rocket_timer; + s32 path_point; + s32 path_segment_fraction; + f32 path_and_pose_state[4]; + u8 pose_angle_velocity[0x4]; + s32 passenger_release_timer; + f32 rot_x_velocity; + f32 bob_phase_radians; + s32 voice; + f32 base_height; } ArmedTransportVars; typedef union { @@ -485,7 +484,7 @@ void update_armed_transport_damage_and_targeting(struct Moby *transport_moby) { if (response >= 3) { if (response < 9) { FUN_0022da68_i(3, 0, transport_moby); - transport_data->hit_animation_secondary_red = 120; + transport_data->hit_flash.flash_red = 120; transport_data->rot_x_velocity = randf_sym(30.0f, 50.0f) * DEG_TO_RAD * frame_time; } @@ -504,13 +503,13 @@ void update_armed_transport_damage_and_targeting(struct Moby *transport_moby) { } transport_moby->state = ARMED_TRANSPORT_STATE_DYING; transport_data->death_timer_frames = scale_game_frames(90); - transport_data->hit_animation_secondary_red = 120; + transport_data->hit_flash.flash_red = 120; } } - start_hit_color_flash(transport_moby, &transport_data->trooper_anim); + start_hit_color_flash(transport_moby, &transport_data->hit_flash); } transport_moby->hit_slot = 255; - update_hit_color_flash(transport_moby, &transport_data->trooper_anim); + update_hit_color_flash(transport_moby, &transport_data->hit_flash); if (transport_data->target_path_index != -1 && D_001413DC[0] != 22) { char *path = D_L16_001B0930[transport_data->target_path_index]; FUN_L00_0025ff38(128.0f, diff --git a/src/overlays/shared/enemies/blarg_elite_commando.c b/src/overlays/shared/enemies/blarg_elite_commando.c index 7f9eaf4f36..807dd3d305 100644 --- a/src/overlays/shared/enemies/blarg_elite_commando.c +++ b/src/overlays/shared/enemies/blarg_elite_commando.c @@ -1,6 +1,7 @@ /* Shared moby class blarg_elite_commando. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/mobys/moby.h" #include "rnc/math_consts.h" @@ -41,81 +42,78 @@ enum { }; typedef struct L16DamageData { - u8 pad0[0x20]; - float health; - s16 max_health; - u8 pad26[0x2]; - s8 hit_response_class; - s8 unk29; - u8 pad2A[0x6]; - f32 unk30; - u8 pad34[0x4]; - int reset_timer; - u8 pad3C[0x24]; - short damage[3]; - u8 pad66[0x1]; - unsigned char animation; - u8 pad68[0x8]; - float knockback[4]; - float impulse_time; - float vertical_impulse; - float forward_impulse; - float lateral_impulse; - int sound_timer; - int active; - float damping; - u8 pad9C[0x11]; - unsigned char pending; - u8 padAE[0x12]; - float blend_start; - float blend_end; - u8 padC8[0x8]; - float target[4]; - u8 padE0[0x30]; - int owner; - int pursuit_mode; - u8 pad118[0x8]; - s32 spawn_path_index; - float pursuit_range; - s32 starts_on_parent; - int path_index; - u8 joint_1_animation[0x64]; - f32 joint_1_target_pitch; - f32 joint_1_target_yaw; - u8 pad19C[0x14]; - u8 joint_2_animation[0x64]; - f32 joint_2_target_pitch; - f32 joint_2_target_yaw; - u8 pad21C[0x14]; - u8 joint_3_animation[0x64]; - f32 joint_3_target_pitch; - f32 joint_3_target_yaw; - u8 pad29C[0x14]; - f32 initial_position_x; - f32 initial_position_y; - u8 pad2B8[0x4]; - f32 cached_position_z; - f32 base_position_x; - f32 base_position_y; - f32 base_position_z; - f32 parent_heading_offset; - char *parent_moby; - f32 movement_step_length; - u8 heading_angular_step[0x4]; - s16 state_countdown_ticks; - u16 rocket_fire_cycle_count; - int pursuit_timer; - f32 bobbing_z_phase_step; - f32 bobbing_z_phase; - f32 bobbing_amplitude; - f32 bobbing_x_phase_step; - f32 bobbing_x_phase; - f32 bobbing_y_phase_step; - f32 bobbing_y_phase; - s16 selected_path_node_index; - s16 patrol_countdown_ticks; - s32 voice_playback_handle; - int reward_hits; + u8 pad0[0x20]; + float health; + s16 max_health; + u8 pad26[0x2]; + s8 hit_response_class; + s8 unk29; + u8 pad2A[0x6]; + f32 unk30; + u8 pad34[0x4]; + int reset_timer; + u8 pad3C[0x24]; + struct HitColorFlash hit_flash; + float knockback[4]; + float impulse_time; + float vertical_impulse; + float forward_impulse; + float lateral_impulse; + int sound_timer; + int active; + float damping; + u8 pad9C[0x11]; + unsigned char pending; + u8 padAE[0x12]; + float blend_start; + float blend_end; + u8 padC8[0x8]; + float target[4]; + u8 padE0[0x30]; + int owner; + int pursuit_mode; + u8 pad118[0x8]; + s32 spawn_path_index; + float pursuit_range; + s32 starts_on_parent; + int path_index; + u8 joint_1_animation[0x64]; + f32 joint_1_target_pitch; + f32 joint_1_target_yaw; + u8 pad19C[0x14]; + u8 joint_2_animation[0x64]; + f32 joint_2_target_pitch; + f32 joint_2_target_yaw; + u8 pad21C[0x14]; + u8 joint_3_animation[0x64]; + f32 joint_3_target_pitch; + f32 joint_3_target_yaw; + u8 pad29C[0x14]; + f32 initial_position_x; + f32 initial_position_y; + u8 pad2B8[0x4]; + f32 cached_position_z; + f32 base_position_x; + f32 base_position_y; + f32 base_position_z; + f32 parent_heading_offset; + char *parent_moby; + f32 movement_step_length; + u8 heading_angular_step[0x4]; + s16 state_countdown_ticks; + u16 rocket_fire_cycle_count; + int pursuit_timer; + f32 bobbing_z_phase_step; + f32 bobbing_z_phase; + f32 bobbing_amplitude; + f32 bobbing_x_phase_step; + f32 bobbing_x_phase; + f32 bobbing_y_phase_step; + f32 bobbing_y_phase; + s16 selected_path_node_index; + s16 patrol_countdown_ticks; + s32 voice_playback_handle; + int reward_hits; } L16DamageData; typedef struct { @@ -567,7 +565,7 @@ void update_blarg_elite_commando_damage_and_pursuit(struct Moby *commando_moby) switch (response) { case HIT_RESPONSE_ANIMATION_ONLY: case HIT_RESPONSE_DAMAGE_ANIMATION_ONLY: - commando_data->animation = 0xFA; + commando_data->hit_flash.flash_red = 0xFA; break; case HIT_RESPONSE_KNOCKBACK_RECOVERY: case HIT_RESPONSE_RECOVERABLE_KNOCKBACK: @@ -595,7 +593,7 @@ void update_blarg_elite_commando_damage_and_pursuit(struct Moby *commando_moby) trooper_start_knockback( damage_reaction.angle, commando_moby, commando_data->knockback, 6, 1, 0); commando_moby->state = 8; - commando_data->animation = 0x78; + commando_data->hit_flash.flash_red = 0x78; break; } case HIT_RESPONSE_FATAL: @@ -640,7 +638,7 @@ void update_blarg_elite_commando_damage_and_pursuit(struct Moby *commando_moby) trooper_start_knockback( damage_reaction.fatal_angle, commando_moby, commando_data->knockback, 7, 1, 0); commando_moby->state = 9; - commando_data->animation = 0xF0; + commando_data->hit_flash.flash_red = 0xF0; FUN_L00_00257470(commando_moby, 0, -1); break; } @@ -649,10 +647,10 @@ void update_blarg_elite_commando_damage_and_pursuit(struct Moby *commando_moby) default: break; } - start_hit_color_flash(commando_moby, commando_data->damage); + start_hit_color_flash(commando_moby, &commando_data->hit_flash); } commando_moby->hit_slot = 0xFF; - update_hit_color_flash(commando_moby, commando_data->damage); + update_hit_color_flash(commando_moby, &commando_data->hit_flash); fast_dec_timer(&commando_data->pursuit_timer); if (commando_data->reset_timer) { commando_data->pursuit_timer = diff --git a/src/overlays/shared/enemies/blarg_paratrooper.c b/src/overlays/shared/enemies/blarg_paratrooper.c index fb2b46be78..79d1f06c1b 100644 --- a/src/overlays/shared/enemies/blarg_paratrooper.c +++ b/src/overlays/shared/enemies/blarg_paratrooper.c @@ -1,5 +1,6 @@ /* Shared moby class blarg_paratrooper. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -53,9 +54,7 @@ typedef struct Paratrooper302618 { u8 pad59[0x1]; unsigned char f5A; u8 pad5B[0x5]; - u8 trooper_anim[0x7]; - u8 hit_flash_red; - u8 pad68[0x8]; + struct HitColorFlash hit_flash; struct KnockbackMotion knockback; /* 0x70 */ struct GroundMoveControl move_control; /* 0xD0 */ u8 path_search_point[0x8]; @@ -688,7 +687,7 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { break; case 9: case 10: - paratrooper_instance_state->hit_flash_red = 0xfa; + paratrooper_instance_state->hit_flash.flash_red = 0xfa; break; case PARATROOPER_HIT_REACTION_RECOVERY_KNOCKBACK: case 4: @@ -719,7 +718,7 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { trooper_start_knockback( moby, ¶trooper_instance_state->knockback, knock_angle, 8, 1, 0); MOBY(moby)->state = PARATROOPER_STATE_KNOCKBACK_RECOVERY; - paratrooper_instance_state->hit_flash_red = 0x78; + paratrooper_instance_state->hit_flash.flash_red = 0x78; break; case PARATROOPER_HIT_REACTION_LETHAL: case PARATROOPER_HIT_REACTION_DEATH_KNOCKBACK: { @@ -757,17 +756,17 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { trooper_start_knockback( moby, ¶trooper_instance_state->knockback, second_knock_angle, 12, 1, 0); MOBY(moby)->state = PARATROOPER_STATE_DEATH_EFFECTS_AND_REMOVE; - paratrooper_instance_state->hit_flash_red = 0xf0; + paratrooper_instance_state->hit_flash.flash_red = 0xf0; spawn_randomized_bolt_drop(moby, 2, 3, 0, -1); break; default: break; } } - start_hit_color_flash(moby, ¶trooper_instance_state->trooper_anim); + start_hit_color_flash(moby, ¶trooper_instance_state->hit_flash); } MOBY(moby)->hit_slot = 0xff; - update_hit_color_flash(moby, ¶trooper_instance_state->trooper_anim); + update_hit_color_flash(moby, ¶trooper_instance_state->hit_flash); if (paratrooper_instance_state->unk38 != 0) { angle = random_float_between(180.0f, 240.0f); diff --git a/src/overlays/shared/enemies/bomb_spawner.c b/src/overlays/shared/enemies/bomb_spawner.c index 4597cbeada..47c6422d8d 100644 --- a/src/overlays/shared/enemies/bomb_spawner.c +++ b/src/overlays/shared/enemies/bomb_spawner.c @@ -1,5 +1,6 @@ /* Shared moby class spawner (0x1C7): takes hits and drops class 0x221 bombs that hatch its pooled children. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/mobys/moby.h" #include "rnc/math/fast_math.h" #include "rnc/math/asm_helpers.h" @@ -19,41 +20,38 @@ typedef struct { } __attribute__((aligned(16))) Vec4A_2bef68; typedef struct Data_2C0330 { - char pad0[0x20]; - float hp; - char pad24[5]; - unsigned char b29; - char pad2A[0x2E]; - unsigned char b58; - char pad59; - unsigned char b5A; - char pad5B[5]; - short f60[3]; - char b66; - unsigned char hit_effect_blend_target; - char pad68[8]; - char f70[0x12]; - unsigned char spawn_trigger_mode; - unsigned char bomb_spawn_options; - unsigned char proximity_activation_mode; - unsigned char spawn_target_mode; - unsigned char count; - unsigned char max; - short timer; - short spawn_interval_frames; - short h8C; - char pad8E[2]; - float spawn_distance_limit; - char pad94[8]; - float activation_distance_threshold; - int pts[4]; - char padB0[0x20]; - int spawn_trigger_volume_index; - char padD4[8]; - float trajectory_gravity; - char padE0[4]; - float launch_speed_distance_factor; - int ids[18]; + char pad0[0x20]; + float hp; + char pad24[5]; + unsigned char b29; + char pad2A[0x2E]; + unsigned char b58; + char pad59; + unsigned char b5A; + char pad5B[5]; + struct HitColorFlash hit_flash; + char f70[0x12]; + unsigned char spawn_trigger_mode; + unsigned char bomb_spawn_options; + unsigned char proximity_activation_mode; + unsigned char spawn_target_mode; + unsigned char count; + unsigned char max; + short timer; + short spawn_interval_frames; + short h8C; + char pad8E[2]; + float spawn_distance_limit; + char pad94[8]; + float activation_distance_threshold; + int pts[4]; + char padB0[0x20]; + int spawn_trigger_volume_index; + char padD4[8]; + float trajectory_gravity; + char padE0[4]; + float launch_speed_distance_factor; + int ids[18]; } Data_2C0330; typedef struct { @@ -269,13 +267,13 @@ void bomb_spawner_update(struct Moby *moby) { float remaining_health = spawner_data->hp - r->hit_damage; spawner_data->hp = remaining_health; if (remaining_health > 0.0f) { - spawner_data->hit_effect_blend_target = 0x5A; - start_hit_color_flash(moby, spawner_data->f60); + spawner_data->hit_flash.flash_red = 0x5A; + start_hit_color_flash(moby, &spawner_data->hit_flash); } else { mark_moby_for_removal_cf(moby, 0, -1); moby->state = SPAWNER_DESTROY; - spawner_data->hit_effect_blend_target = 0x78; - start_hit_color_flash(moby, spawner_data->f60); + spawner_data->hit_flash.flash_red = 0x78; + start_hit_color_flash(moby, &spawner_data->hit_flash); } } moby->hit_slot = 0xFF; @@ -561,7 +559,7 @@ void bomb_spawner_update(struct Moby *moby) { } } } - update_hit_color_flash(moby, spawner_data->f60); + update_hit_color_flash(moby, &spawner_data->hit_flash); } /* Ported from rac1-decomp (src/overlays/shared/vendor_00292AC0.c: func_L03_002C59A0), where it is exact; names translated to the US level program. */ diff --git a/src/overlays/shared/enemies/ground_melee_enemy.c b/src/overlays/shared/enemies/ground_melee_enemy.c index 5c4063a9c1..b1b2d65d2d 100644 --- a/src/overlays/shared/enemies/ground_melee_enemy.c +++ b/src/overlays/shared/enemies/ground_melee_enemy.c @@ -1,5 +1,6 @@ /* Ground melee enemy class (0xC1): reacts to damage, guards its home inside a leash and chases, attacks or returns home. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/mobys/moby.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -47,69 +48,67 @@ typedef struct { } __attribute__((aligned(16))) V_2E39E0; typedef struct { - char pad0[0x20]; - float health; - short f24; - short cooldown; - char pad28[1]; - unsigned char f29; - char pad2A[0xE]; - int hurt; - char pad3C[0x1C]; - unsigned char f58; - char pad59[1]; - unsigned char f5A; - char pad5B[0x6D]; - short fC8; - char padCA[6]; - unsigned char *settings; - char padD4[0x3C]; - char effects[7]; - unsigned char f117; - char pad118[8]; - char motion[0x10]; - float f130; - float f134; - float up; - float back; - char pad140[4]; - int f144; - char pad148[0x15]; - unsigned char f15D; - char pad15E[0x12]; - float f170; - float f174; - char pad178[8]; - int steer; - char pad184[4]; - float f188; - float f18C; - float horizontal_movement_step; - char pad194[4]; - float fall; - char pad19C[8]; - float horizontal_step_limit; - char pad1A8[0x28]; - V_2E39E0 home; - char pad1E0[0x10]; - char turn[4]; - float side; - float side_deg; - float range; - char pad200[4]; - float speed; - int f208; - char pad20C[4]; - int side_timer; - short alert; - short leash; - Moby *anchor; - int path; - char pad220[4]; - int home_timer; - int hidden; - char pad22C[4]; - char sound[4]; + char pad0[0x20]; + float health; + short f24; + short cooldown; + char pad28[1]; + unsigned char f29; + char pad2A[0xE]; + int hurt; + char pad3C[0x1C]; + unsigned char f58; + char pad59[1]; + unsigned char f5A; + char pad5B[0x6D]; + short fC8; + char padCA[6]; + unsigned char *settings; + char padD4[0x3C]; + struct HitColorFlash hit_flash; + char motion[0x10]; + float f130; + float f134; + float up; + float back; + char pad140[4]; + int f144; + char pad148[0x15]; + unsigned char f15D; + char pad15E[0x12]; + float f170; + float f174; + char pad178[8]; + int steer; + char pad184[4]; + float f188; + float f18C; + float horizontal_movement_step; + char pad194[4]; + float fall; + char pad19C[8]; + float horizontal_step_limit; + char pad1A8[0x28]; + V_2E39E0 home; + char pad1E0[0x10]; + char turn[4]; + float side; + float side_deg; + float range; + char pad200[4]; + float speed; + int f208; + char pad20C[4]; + int side_timer; + short alert; + short leash; + Moby *anchor; + int path; + char pad220[4]; + int home_timer; + int hidden; + char pad22C[4]; + char sound[4]; } Data_2E39E0; typedef struct { @@ -277,8 +276,8 @@ void ground_melee_enemy_update(Moby *moby) { explode_2E39E0(moby, 0, -1); moby->collision = 0; moby->state = GROUND_ENEMY_STATE_FATAL_KNOCKBACK; - ground_enemy_vars->f117 = 120; - start_hit_color_flash(moby, ground_enemy_vars->effects); + ground_enemy_vars->hit_flash.flash_red = 120; + start_hit_color_flash(moby, &ground_enemy_vars->hit_flash); } else { if (hit->kind == 180) { ground_enemy_vars->up = lift * 1.35f; @@ -293,9 +292,9 @@ void ground_melee_enemy_update(Moby *moby) { ground_enemy_vars->f170 = 5.0f; ground_enemy_vars->f174 = 10.0f; moby->state = GROUND_ENEMY_STATE_HURT_KNOCKBACK; - ground_enemy_vars->f117 = 250; + ground_enemy_vars->hit_flash.flash_red = 250; ground_enemy_vars->cooldown = scale_game_frames(60); - start_hit_color_flash(moby, ground_enemy_vars->effects); + start_hit_color_flash(moby, &ground_enemy_vars->hit_flash); } } } @@ -674,7 +673,7 @@ void ground_melee_enemy_update(Moby *moby) { mark_moby_for_removal(moby); return; } - update_hit_color_flash(moby, ground_enemy_vars->effects); + update_hit_color_flash(moby, &ground_enemy_vars->hit_flash); } int D_L15_001619D8 = 0x7000000; diff --git a/src/overlays/shared/enemies/plasmabot.c b/src/overlays/shared/enemies/plasmabot.c index dcfda4d765..c578b8794a 100644 --- a/src/overlays/shared/enemies/plasmabot.c +++ b/src/overlays/shared/enemies/plasmabot.c @@ -1,5 +1,6 @@ /* Shared moby class plasmabot: its update, path walk, aiming, beam, hit reaction and effects. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/world/level_path.h" #include "rnc/mobys/moby.h" #include "rnc/hero/hero.h" @@ -55,65 +56,65 @@ enum { }; typedef struct PlasmabotVars { - u8 pad0[0x20]; - f32 health; - s16 max_health; - s16 stagger_reaction_duration_frames; - s8 hit_response_class; - s8 unk29; - u8 pad2A[0x6]; - f32 unk30; - u8 pad34[0xc]; - u8 unk40[0x18]; - s8 unk58; - u8 pad59[0x1]; - s8 unk5A; - u8 pad5B[0x5]; - u8 motion[0x18]; - f32 knockback_speed; - f32 knockback_vertical_speed; - s32 knockback_collision_radius; - u8 pad84[0x4]; - f32 knockback_collision_z_offset; - u8 pad8C[0x24]; - f32 knockback_apex_animation_frame; - f32 knockback_landing_animation_frame; - u8 padB8[0x8]; - u8 trooper_anim[0x10]; - u8 path_search_point[0x40]; - s32 target; /* 0x110: target moby */ - s32 target_selection_status; - u8 pad118[0x8]; - u8 aim_joint_manipulator[0x10]; - u8 aim_joint_rotation[0x30]; - u8 manipulator_attachment_header[0x10]; - u8 aim_quaternion_storage[0x70]; - u8 unk1E0[0x10]; - u8 nozzle_position[0x10]; - u8 unk200[0x10]; - u8 beam_start_position_storage[0x10]; - u8 beam_end_position_storage[0x14]; - f32 target_range; - u8 pad238[0x4]; - s32 heading_angular_velocity; - s32 path_index; /* 0x240: into l14_paths, -1: none */ - s32 target_path_index; - s16 path_traversal_delay_timer; - u8 pad24A[0x2]; - s32 path_segment_index; - f32 path_offset_and_spring_velocities[4]; - s16 beam_cooldown_timer; - s16 aim_sweep_timer; - s32 hatch_index; - f32 aim_yaw_offset; - s32 aim_yaw_angular_velocity; - s32 aim_joint_angle; - s32 aim_joint_angular_velocity; - f32 aim_sweep_center_angle; - f32 path_traversal_direction; - s32 aim_pitch_angle; - s32 aim_pitch_angular_velocity; - s32 unk288; + u8 pad0[0x20]; + f32 health; + s16 max_health; + s16 stagger_reaction_duration_frames; + s8 hit_response_class; + s8 unk29; + u8 pad2A[0x6]; + f32 unk30; + u8 pad34[0xc]; + u8 unk40[0x18]; + s8 unk58; + u8 pad59[0x1]; + s8 unk5A; + u8 pad5B[0x5]; + u8 motion[0x18]; + f32 knockback_speed; + f32 knockback_vertical_speed; + s32 knockback_collision_radius; + u8 pad84[0x4]; + f32 knockback_collision_z_offset; + u8 pad8C[0x24]; + f32 knockback_apex_animation_frame; + f32 knockback_landing_animation_frame; + u8 padB8[0x8]; + struct HitColorFlash hit_flash; + u8 path_search_point[0x40]; + s32 target; /* 0x110: target moby */ + s32 target_selection_status; + u8 pad118[0x8]; + u8 aim_joint_manipulator[0x10]; + u8 aim_joint_rotation[0x30]; + u8 manipulator_attachment_header[0x10]; + u8 aim_quaternion_storage[0x70]; + u8 unk1E0[0x10]; + u8 nozzle_position[0x10]; + u8 unk200[0x10]; + u8 beam_start_position_storage[0x10]; + u8 beam_end_position_storage[0x14]; + f32 target_range; + u8 pad238[0x4]; + s32 heading_angular_velocity; + s32 path_index; /* 0x240: into l14_paths, -1: none */ + s32 target_path_index; + s16 path_traversal_delay_timer; + u8 pad24A[0x2]; + s32 path_segment_index; + f32 path_offset_and_spring_velocities[4]; + s16 beam_cooldown_timer; + s16 aim_sweep_timer; + s32 hatch_index; + f32 aim_yaw_offset; + s32 aim_yaw_angular_velocity; + s32 aim_joint_angle; + s32 aim_joint_angular_velocity; + f32 aim_sweep_center_angle; + f32 path_traversal_direction; + s32 aim_pitch_angle; + s32 aim_pitch_angular_velocity; + s32 unk288; } PlasmabotVars; extern char D_0013E533[]; @@ -1122,7 +1123,7 @@ void process_plasmabot_hit_reaction(struct Moby *moby) { if (((unsigned char *)moby)[0x20] == 0 || ((unsigned char *)moby)[0x20] == 0xB) { if (((unsigned char *)moby)[0x20] == 0xB) { ((unsigned char *)moby)[0xA4] = 0xFF; - update_hit_color_flash(moby, &state->trooper_anim); + update_hit_color_flash(moby, &state->hit_flash); } return; } @@ -1206,10 +1207,10 @@ void process_plasmabot_hit_reaction(struct Moby *moby) { case HIT_REACTION_NONE: break; } - start_hit_color_flash(moby, (short *)(&state->trooper_anim)); + start_hit_color_flash(moby, &state->hit_flash); } ((unsigned char *)moby)[0xA4] = 0xFF; - update_hit_color_flash(moby, &state->trooper_anim); + update_hit_color_flash(moby, &state->hit_flash); } /* steers the moby toward its target: queries the path, eases x/y, then turns to face the heading */ /* Ported from rac1-decomp (src/overlays/shared/vendor_002B2A28.c: func_L14_002B4668), where it is exact; names translated to the US level program. */ diff --git a/src/overlays/shared/enemies/seeker.c b/src/overlays/shared/enemies/seeker.c index 1dc38988d3..06e1e1d06e 100644 --- a/src/overlays/shared/enemies/seeker.c +++ b/src/overlays/shared/enemies/seeker.c @@ -1,5 +1,6 @@ /* Shared moby class seeker: its update and its damage and target handling. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/mobys/moby_state.h" #include "rnc/globals.h" #include "qzero.h" @@ -341,38 +342,36 @@ typedef struct { } Cls; typedef struct Data { - char p0[0x20]; - float health; - char p24[0x14]; - int f38; - char p3C[0x24]; - char react[7]; - unsigned char reactTime; - char p68[8]; - float f70[4]; - float f80; - float f84; - float f88; - float f8C; - int f90; - int f94; - float f98; - char p9C[0x11]; - unsigned char bAD; - char pAE[0x12]; - float fC0; - float fC4; - char pC8[0x58]; - float target[4]; - char p130[0x30]; - Moby *f160; - int f164; - char p168[0x18]; - int path; - int timer; - float reach; - char p18C[4]; - int retreat; + char p0[0x20]; + float health; + char p24[0x14]; + int f38; + char p3C[0x24]; + struct HitColorFlash hit_flash; + float f70[4]; + float f80; + float f84; + float f88; + float f8C; + int f90; + int f94; + float f98; + char p9C[0x11]; + unsigned char bAD; + char pAE[0x12]; + float fC0; + float fC4; + char pC8[0x58]; + float target[4]; + char p130[0x30]; + Moby *f160; + int f164; + char p168[0x18]; + int path; + int timer; + float reach; + char p18C[4]; + int retreat; } Data; typedef struct { @@ -464,8 +463,8 @@ void update_seeker_damage_and_target(Moby *moby) { seeker_vars->timer == scale_game_frames(0x3C) || seeker_vars->timer == scale_game_frames(0x78) || seeker_vars->timer == scale_game_frames(0xB3)) { - seeker_vars->reactTime = 0xF0; - start_hit_color_flash(moby, seeker_vars->react); + seeker_vars->hit_flash.flash_red = 0xF0; + start_hit_color_flash(moby, &seeker_vars->hit_flash); } damage = 0.0f; source = find_moby_hit(moby, 0x330000, 0); @@ -487,7 +486,7 @@ void update_seeker_damage_and_target(Moby *moby) { switch (response) { case RESPONSE_REACTION_ONLY: case 10: - seeker_vars->reactTime = 0xFA; + seeker_vars->hit_flash.flash_red = 0xFA; break; case RESPONSE_HURT_KNOCKBACK: case 4: @@ -508,7 +507,7 @@ void update_seeker_damage_and_target(Moby *moby) { if (moby->group != 0xFF) { func_L01_0026F040_2C73D0(moby->group, 1); } - seeker_vars->reactTime = 0x78; + seeker_vars->hit_flash.flash_red = 0x78; break; case RESPONSE_FATAL_KNOCKBACK: case 2: @@ -526,17 +525,17 @@ void update_seeker_damage_and_target(Moby *moby) { func_L00_0025D5B0_2C73D0(moby, seeker_vars->f70, knock_angle_fatal, 4, 1, 0); mark_moby_for_removal_cf(moby, 0, -1); moby->state = SEEKER_STATE_FATAL_KNOCKBACK; - seeker_vars->reactTime = 0xF0; + seeker_vars->hit_flash.flash_red = 0xF0; break; case RESPONSE_NONE: case RESPONSE_NO_REACTION: default: break; } - start_hit_color_flash(moby, seeker_vars->react); + start_hit_color_flash(moby, &seeker_vars->hit_flash); } moby->hit_slot = 0xFF; - update_hit_color_flash(moby, seeker_vars->react); + update_hit_color_flash(moby, &seeker_vars->hit_flash); if (seeker_vars->f38 != 0 || moby->command == 1) { seeker_vars->retreat = truncate_float_to_s32(func_001F9878_2C73D0(random_float_between(180.0f, 240.0f))); diff --git a/src/overlays/shared/enemies/sentrybot.c b/src/overlays/shared/enemies/sentrybot.c index 3c6f9918fc..4bb8c1f47b 100644 --- a/src/overlays/shared/enemies/sentrybot.c +++ b/src/overlays/shared/enemies/sentrybot.c @@ -1,5 +1,6 @@ /* Shared moby class sentrybot. */ #include "types.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/game/level_save_state.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -80,68 +81,66 @@ typedef struct SentrybotKnockback { } SentrybotKnockback; typedef struct SentrybotVars { - u8 pad0[0x20]; - f32 health; /* 0x20: hit damage is taken from it */ - s16 max_health; - u8 pad26[2]; - u8 hit_response_class; - u8 unk29; - u8 pad2A[0xE]; - s32 unk38; /* 0x38: set: restart target_countdown */ - u8 pad3C[0x24]; - u8 trooper_anim[7]; /* 0x60: start_hit_color_flash / update_hit_color_flash */ - u8 first_channel_blend_target; - u8 pad68[8]; - SentrybotKnockback knockback; /* 0x70 */ - u8 padB0[0x10]; - f32 knockback_apex_animation_frame; - f32 knockback_landing_animation_frame; - u8 padC8[8]; - f32 path_search_point[4]; /* 0xD0: path point FUN_L00_0025ff38 finds */ - u8 padE0[0x20]; - f32 aim_point[4]; - char *target; /* 0x110 */ - s32 target_mode; - u8 pad118[8]; - s32 path_index; /* 0x120: into D_L15_001B0AB0 */ - s32 patrol_path_index; - s32 alarm_moby_index; /* 0x128: moby the alarm is set on */ - s32 sight_line_ignored_moby_index; /* moby index the sight line ignores */ - f32 target_countdown; /* 0x130 */ - f32 forward_speed; /* 0x134 */ - f32 turn_velocity[1]; - s32 patrol_point; /* 0x13C */ - u8 pad140[4]; - s32 patrol_point_reached; - s32 patrol_pause_duration_frames; - s32 patrol_pause_timer; - s32 linked_moby_index; - s16 linked_moby_deactivation_cooldown; - s16 alert_timer; /* 0x156: set by alert_visible_group_sentrybots */ - s16 target_detected_without_engagement; - u8 has_line_of_sight; /* 0x15A: to the hero */ - u8 alert_engagement_suppressed; - u8 next_state; - u8 pending_animation; - u8 saved_alert_engagement_suppression_plus_one; - u8 command_alert_transition_started; - f32 home_pos[3]; /* 0x160: position at spawn */ - f32 home_yaw; /* 0x16C */ - f32 turn_start_yaw; - f32 turn_target_yaw; - f32 turn_delta; /* 0x178 */ - s32 group_index; - s32 linked_moby[4]; /* 0x180: moby indexes, -1: none */ - char *attention_target; /* 0x190 */ - s16 priority_attention_active; - s16 attention_scan_timer; - char *attention_source; /* 0x198: set_sentrybot_attention_target */ - s16 attention_timer; /* 0x19C */ - u8 projectile_emitted_this_animation; - u8 target_in_view; - SentrybotJoint joints[2]; /* 0x1A0 */ - f32 effect_quad_pos[3][4]; /* 0x2A0: draw_sentrybot_effect_quads */ - s32 clip_volume[4]; /* 0x2D0: -1: none */ + u8 pad0[0x20]; + f32 health; /* 0x20: hit damage is taken from it */ + s16 max_health; + u8 pad26[2]; + u8 hit_response_class; + u8 unk29; + u8 pad2A[0xE]; + s32 unk38; /* 0x38: set: restart target_countdown */ + u8 pad3C[0x24]; + struct HitColorFlash hit_flash; + SentrybotKnockback knockback; /* 0x70 */ + u8 padB0[0x10]; + f32 knockback_apex_animation_frame; + f32 knockback_landing_animation_frame; + u8 padC8[8]; + f32 path_search_point[4]; /* 0xD0: path point FUN_L00_0025ff38 finds */ + u8 padE0[0x20]; + f32 aim_point[4]; + char *target; /* 0x110 */ + s32 target_mode; + u8 pad118[8]; + s32 path_index; /* 0x120: into D_L15_001B0AB0 */ + s32 patrol_path_index; + s32 alarm_moby_index; /* 0x128: moby the alarm is set on */ + s32 sight_line_ignored_moby_index; /* moby index the sight line ignores */ + f32 target_countdown; /* 0x130 */ + f32 forward_speed; /* 0x134 */ + f32 turn_velocity[1]; + s32 patrol_point; /* 0x13C */ + u8 pad140[4]; + s32 patrol_point_reached; + s32 patrol_pause_duration_frames; + s32 patrol_pause_timer; + s32 linked_moby_index; + s16 linked_moby_deactivation_cooldown; + s16 alert_timer; /* 0x156: set by alert_visible_group_sentrybots */ + s16 target_detected_without_engagement; + u8 has_line_of_sight; /* 0x15A: to the hero */ + u8 alert_engagement_suppressed; + u8 next_state; + u8 pending_animation; + u8 saved_alert_engagement_suppression_plus_one; + u8 command_alert_transition_started; + f32 home_pos[3]; /* 0x160: position at spawn */ + f32 home_yaw; /* 0x16C */ + f32 turn_start_yaw; + f32 turn_target_yaw; + f32 turn_delta; /* 0x178 */ + s32 group_index; + s32 linked_moby[4]; /* 0x180: moby indexes, -1: none */ + char *attention_target; /* 0x190 */ + s16 priority_attention_active; + s16 attention_scan_timer; + char *attention_source; /* 0x198: set_sentrybot_attention_target */ + s16 attention_timer; /* 0x19C */ + u8 projectile_emitted_this_animation; + u8 target_in_view; + SentrybotJoint joints[2]; /* 0x1A0 */ + f32 effect_quad_pos[3][4]; /* 0x2A0: draw_sentrybot_effect_quads */ + s32 clip_volume[4]; /* 0x2D0: -1: none */ } SentrybotVars; typedef struct { @@ -1646,7 +1645,7 @@ void update_sentrybot_hit_response_and_target_visibility(void *sentrybot_moby, i break; case SENTRYBOT_FIRST_CHANNEL_BLEND_HIT_RESPONSE: case SENTRYBOT_FIRST_CHANNEL_BLEND_TARGET_HIT_RESPONSE: - sentrybot_data->first_channel_blend_target = 0xFA; + sentrybot_data->hit_flash.flash_red = 0xFA; break; case NONLETHAL_KNOCKBACK_HIT_RESPONSE: case NONLETHAL_ARC_HIT_RESPONSE: @@ -1688,7 +1687,7 @@ void update_sentrybot_hit_response_and_target_visibility(void *sentrybot_moby, i trooper_start_knockback(moby, &sentrybot_data->knockback, 7, 1, 0, angle); MOBY(moby)->state = SENTRYBOT_RECOVERABLE_KNOCKBACK; MOBY(moby)->command = 2; - sentrybot_data->first_channel_blend_target = 0x78; + sentrybot_data->hit_flash.flash_red = 0x78; break; case LETHAL_HIT_RESPONSE: case DEATH_KNOCKBACK_HIT_RESPONSE: { @@ -1727,13 +1726,13 @@ void update_sentrybot_hit_response_and_target_visibility(void *sentrybot_moby, i trooper_start_knockback(moby, &sentrybot_data->knockback, 8, 1, 0, fall_angle); MOBY(moby)->state = SENTRYBOT_DEATH_KNOCKBACK; MOBY(moby)->command = 2; - sentrybot_data->first_channel_blend_target = 0xF0; + sentrybot_data->hit_flash.flash_red = 0xF0; break; } - start_hit_color_flash(moby, &sentrybot_data->trooper_anim); + start_hit_color_flash(moby, &sentrybot_data->hit_flash); } MOBY(moby)->hit_slot = 0xFF; - update_hit_color_flash(moby, &sentrybot_data->trooper_anim); + update_hit_color_flash(moby, &sentrybot_data->hit_flash); if (flag != 0) return; if (sentrybot_data->unk38 != 0) { From 2f19e96c3cea9af58b066fba7dc560ea372f8b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:11:54 +0000 Subject: [PATCH 065/213] decomp: use the shared knockback motion layout in six enemy pvars (seeker, gadgebot, peckbot, crab, anklebiter, trooper) --- .../rnc/overlay/l12/mobys/hoven_anklebiter.h | 80 ++++---- src/overlays/l01/mobys/peckbot.c | 189 +++++++++--------- src/overlays/l10/mobys/toxic_crab.c | 101 +++++----- src/overlays/l12/mobys/blarg_trooper.c | 86 ++++---- src/overlays/l12/mobys/hoven_anklebiter.c | 131 ++++++------ src/overlays/shared/enemies/gadgebot.c | 5 +- src/overlays/shared/enemies/seeker.c | 94 ++++----- 7 files changed, 320 insertions(+), 366 deletions(-) diff --git a/include/rnc/overlay/l12/mobys/hoven_anklebiter.h b/include/rnc/overlay/l12/mobys/hoven_anklebiter.h index 9dba5d8f6a..3638235bc5 100644 --- a/include/rnc/overlay/l12/mobys/hoven_anklebiter.h +++ b/include/rnc/overlay/l12/mobys/hoven_anklebiter.h @@ -3,6 +3,7 @@ #include "types.h" #include "rnc/mobys/moby.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" /* Level 12 hoven_anklebiter: its moby and pvars layouts and the target report it shares with the blarg trooper. */ @@ -35,49 +36,42 @@ typedef struct AnklebiterMoby { } AnklebiterMoby; struct AnklebiterData { - char p0[0x20]; - float health; - char p24[5]; - unsigned char mode; - char p2A[0x2E]; - unsigned char blend; - char p59; - unsigned char count; - char p5B[0x6D]; - short stuck; - char pCA[6]; - void *tuning; - char pD4[0x4C]; - float fall[4], gravity, zero, launch_speed, launch_time; - int fall_flags, fall_mode; - float damping; - char p14C[0x11]; - unsigned char falling; - char p15E[0x12]; - float fall_a, fall_b; - char p178[8]; - int effect_class; - char p184[4]; - float effect_size0, effect_size1; - char p190[0x14]; - float effect_speed; - char p1A8[0x10]; - int effect_flags; - char p1BC[0x14]; - float idle_pos[4], spare, idle_speed; - char p1E8[0x18]; - char collision_data[0x68]; - float look_angle; - char p26C[0x14]; - float home[4]; - char p290[0x10]; - float turn_velocity, circle_angle, circle_rate, range; - char p2B0[8]; - int init0, sleep, circle_timer, alert_timer; - short group_timer, pad2CA, idle_timer, pad2CE; - int path, blocked, return_timer, group_enabled; - int *group_count; - int group_check; + char p0[0x20]; + float health; + char p24[5]; + unsigned char mode; + char p2A[0x2E]; + unsigned char blend; + char p59; + unsigned char count; + char p5B[0x6D]; + short stuck; + char pCA[6]; + void *tuning; + char pD4[0x4C]; + struct KnockbackMotion knockback; /* 0x120 */ + int effect_class; + char p184[4]; + float effect_size0, effect_size1; + char p190[0x14]; + float effect_speed; + char p1A8[0x10]; + int effect_flags; + char p1BC[0x14]; + float idle_pos[4], spare, idle_speed; + char p1E8[0x18]; + char collision_data[0x68]; + float look_angle; + char p26C[0x14]; + float home[4]; + char p290[0x10]; + float turn_velocity, circle_angle, circle_rate, range; + char p2B0[8]; + int init0, sleep, circle_timer, alert_timer; + short group_timer, pad2CA, idle_timer, pad2CE; + int path, blocked, return_timer, group_enabled; + int *group_count; + int group_check; }; /* What the target picker FUN_L01_00274b78 fills in: the anklebiter and the blarg trooper read the chosen moby. */ diff --git a/src/overlays/l01/mobys/peckbot.c b/src/overlays/l01/mobys/peckbot.c index 3230f5ffa6..5aa806e3f9 100644 --- a/src/overlays/l01/mobys/peckbot.c +++ b/src/overlays/l01/mobys/peckbot.c @@ -1,5 +1,6 @@ /* Level 01 moby class peckbot. */ #include "types.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/math_consts.h" #include "rnc/globals.h" @@ -90,68 +91,56 @@ typedef struct MobyNode { } MobyNode; typedef struct { - u8 pad0[0x20]; - f32 health; - s16 x24; - s16 flee_timer; - u8 pad28; - u8 x29; - u8 pad2a[0xE]; - s32 x38; - u8 pad3c[0x4]; - Vec577 vel; - u8 pad50[0x8]; - u8 x58; - u8 pad59; - u8 x5A; - u8 pad5b[0x6D]; - s16 xC8; - u8 padca[0x6]; - void *xD0; - u8 padd4[0x3C]; - struct HitColorFlash hit_flash; - u8 knock[0x10]; - f32 x130; - f32 x134; - f32 x138; - f32 x13C; - u8 pad140[0x4]; - s32 x144; - u8 pad148[0x15]; - u8 x15D; - u8 pad15e[0x12]; - f32 x170; - f32 x174; - u8 pad178[0x8]; - s32 x180; - u8 pad184[0x4]; - f32 x188; - f32 x18C; - u8 pad190[0x8]; - f32 x198; - u8 pad19c[0x8]; - f32 x1A4; - u8 pad1a8[0x28]; - Vec577 home; - Vec577 dest; - u8 turn[0x4]; - f32 turn_off; - f32 turn_deg; - f32 range; - u8 pad200[0x4]; - f32 speed; - s16 x208; - s16 x20A; - s32 idle_timer; - s32 turn_timer; - s16 x214; - s16 x216; - Mob577 *leader; - s32 path; - u8 pad220[0x8]; - s32 x228; - u8 pad22c[0x4]; - u8 x230[0x10]; + u8 pad0[0x20]; + f32 health; + s16 x24; + s16 flee_timer; + u8 pad28; + u8 x29; + u8 pad2a[0xE]; + s32 x38; + u8 pad3c[0x4]; + Vec577 vel; + u8 pad50[0x8]; + u8 x58; + u8 pad59; + u8 x5A; + u8 pad5b[0x6D]; + s16 xC8; + u8 padca[0x6]; + void *xD0; + u8 padd4[0x3C]; + struct HitColorFlash hit_flash; + struct KnockbackMotion knockback; + s32 x180; + u8 pad184[0x4]; + f32 x188; + f32 x18C; + u8 pad190[0x8]; + f32 x198; + u8 pad19c[0x8]; + f32 x1A4; + u8 pad1a8[0x28]; + Vec577 home; + Vec577 dest; + u8 turn[0x4]; + f32 turn_off; + f32 turn_deg; + f32 range; + u8 pad200[0x4]; + f32 speed; + s16 x208; + s16 x20A; + s32 idle_timer; + s32 turn_timer; + s16 x214; + s16 x216; + Mob577 *leader; + s32 path; + u8 pad220[0x8]; + s32 x228; + u8 pad22c[0x4]; + u8 x230[0x10]; } Mob577Vars; typedef struct { @@ -293,33 +282,40 @@ void peckbot_update(Mob577 *peckbot_moby) { angle = fast_arc_tan(peckbot_moby->pos.f[0] - target.pos.f[0], peckbot_moby->pos.f[1] - target.pos.f[1]); hp = peckbot_vars->health - hit->dmg; - peckbot_vars->x130 = 0.008f; - peckbot_vars->x134 = 0.0005f; - peckbot_vars->x138 = peckbot_nonfatal_knockback_horizontal_speed_gp * frame_time; - peckbot_vars->x13C = peckbot_nonfatal_knockback_vertical_speed_gp * frame_time; - peckbot_vars->x144 = 9; + peckbot_vars->knockback.gravity = 0.008f; + peckbot_vars->knockback.speed_approach_step = 0.0005f; + peckbot_vars->knockback.speed = + peckbot_nonfatal_knockback_horizontal_speed_gp * frame_time; + peckbot_vars->knockback.vertical_speed = + peckbot_nonfatal_knockback_vertical_speed_gp * frame_time; + peckbot_vars->knockback.flags = 9; peckbot_vars->health = hp; - peckbot_vars->x15D = 0; + peckbot_vars->knockback.unk3D = 0; if (hp <= 0.0f) { peckbot_moby->flags &= ~0x1000; - peckbot_vars->x13C = peckbot_vars->x138 = frame_time * 11.0f; + peckbot_vars->knockback.vertical_speed = peckbot_vars->knockback.speed = + frame_time * 11.0f; vector_scratch.q = hit->pos; - trooper_knockback_arc( - &vector_scratch, &angle, &peckbot_vars->x138, &peckbot_vars->x13C); - trooper_start_knockback(peckbot_moby, peckbot_vars->knock, 7, 1, 0, angle); - peckbot_vars->x170 = 11.0f; - peckbot_vars->x174 = 18.0f; + trooper_knockback_arc(&vector_scratch, + &angle, + &peckbot_vars->knockback.speed, + &peckbot_vars->knockback.vertical_speed); + trooper_start_knockback(peckbot_moby, &peckbot_vars->knockback, 7, 1, 0, angle); + peckbot_vars->knockback.apex_animation_frame = 11.0f; + peckbot_vars->knockback.landing_animation_frame = 18.0f; peckbot_moby->state = PECKBOT_STATE_FATAL_KNOCKBACK; peckbot_vars->hit_flash.flash_red = 0x78; start_hit_color_flash(peckbot_moby, &peckbot_vars->hit_flash); FUN_L00_00257470(peckbot_moby, 0, -1); } else { vector_scratch.q = hit->pos; - trooper_knockback_arc( - &vector_scratch, &angle, &peckbot_vars->x138, &peckbot_vars->x13C); - trooper_start_knockback(peckbot_moby, peckbot_vars->knock, 6, 1, 0, angle); - peckbot_vars->x170 = 5.0f; - peckbot_vars->x174 = 10.0f; + trooper_knockback_arc(&vector_scratch, + &angle, + &peckbot_vars->knockback.speed, + &peckbot_vars->knockback.vertical_speed); + trooper_start_knockback(peckbot_moby, &peckbot_vars->knockback, 6, 1, 0, angle); + peckbot_vars->knockback.apex_animation_frame = 5.0f; + peckbot_vars->knockback.landing_animation_frame = 10.0f; peckbot_moby->state = PECKBOT_STATE_NONFATAL_KNOCKBACK; peckbot_vars->hit_flash.flash_red = 0xFA; peckbot_vars->flee_timer = scale_game_frames(0x3C); @@ -477,25 +473,26 @@ void peckbot_update(Mob577 *peckbot_moby) { FUN_L01_0026e090(peckbot_moby->group, 2); } SET_ANIM(peckbot_moby, 6, 0, scale_game_frames(3)); - peckbot_vars->x134 = 0.0f; - peckbot_vars->x130 = peckbot_home_knockback_acceleration_gp; - peckbot_vars->x138 = peckbot_home_knockback_speed_gp * frame_time; - peckbot_vars->x13C = FUN_L00_0025abf0(&peckbot_moby->pos, - &peckbot_vars->home, - &knockback_travel_time, - peckbot_vars->x138, - -peckbot_home_knockback_acceleration_gp); - peckbot_vars->x144 = 13; - peckbot_vars->x15D = 0; + peckbot_vars->knockback.speed_approach_step = 0.0f; + peckbot_vars->knockback.gravity = peckbot_home_knockback_acceleration_gp; + peckbot_vars->knockback.speed = peckbot_home_knockback_speed_gp * frame_time; + peckbot_vars->knockback.vertical_speed = + FUN_L00_0025abf0(&peckbot_moby->pos, + &peckbot_vars->home, + &knockback_travel_time, + peckbot_vars->knockback.speed, + -peckbot_home_knockback_acceleration_gp); + peckbot_vars->knockback.flags = 13; + peckbot_vars->knockback.unk3D = 0; trooper_start_knockback( - peckbot_moby, peckbot_vars->knock, 6, 1, 0, peckbot_moby->rot.f[2]); - peckbot_vars->x170 = 5.0f; - peckbot_vars->x174 = 10.0f; + peckbot_moby, &peckbot_vars->knockback, 6, 1, 0, peckbot_moby->rot.f[2]); + peckbot_vars->knockback.apex_animation_frame = 5.0f; + peckbot_vars->knockback.landing_animation_frame = 10.0f; peckbot_moby->state = PECKBOT_STATE_HOME_TRIGGERED_KNOCKBACK; } break; case PECKBOT_STATE_HOME_TRIGGERED_KNOCKBACK: - if (step_moby_motion(peckbot_moby, peckbot_vars->knock) & 1) { + if (step_moby_motion(peckbot_moby, &peckbot_vars->knockback) & 1) { peckbot_moby->state = PECKBOT_STATE_CHASE_TARGET; if (random_integer_below(0x100) & 1) { peckbot_vars->turn_deg = -peckbot_vars->turn_deg; @@ -675,7 +672,7 @@ void peckbot_update(Mob577 *peckbot_moby) { peckbot_moby->hit = 0; break; case PECKBOT_STATE_NONFATAL_KNOCKBACK: - if (step_moby_motion(peckbot_moby, peckbot_vars->knock) & 1) { + if (step_moby_motion(peckbot_moby, &peckbot_vars->knockback) & 1) { peckbot_moby->state = PECKBOT_STATE_CHASE_TARGET; SET_ANIM(peckbot_moby, 2, 0, scale_game_frames(3)); return; @@ -686,7 +683,7 @@ void peckbot_update(Mob577 *peckbot_moby) { } break; case 7: - if (FUN_L00_002dc9f0(peckbot_moby, peckbot_vars->knock) != 0) { + if (FUN_L00_002dc9f0(peckbot_moby, &peckbot_vars->knockback) != 0) { peckbot_moby->state = PECKBOT_STATE_AIRBORNE_IDLE; peckbot_vars->x228 = scale_game_frames(0xB4); SET_ANIM(peckbot_moby, 0, 0, 0); @@ -695,7 +692,7 @@ void peckbot_update(Mob577 *peckbot_moby) { break; case PECKBOT_STATE_FATAL_KNOCKBACK: peckbot_moby->flags &= ~0x1000; - if (step_moby_motion(peckbot_moby, peckbot_vars->knock) & 0x140) { + if (step_moby_motion(peckbot_moby, &peckbot_vars->knockback) & 0x140) { clear_u64_value(&vector_scratch); frame_count_or_animation_id = scale_game_frames(1) * 60.0f; if (reserve_expired_frame_slot(D_L01_00161A80, 3, frame_count_or_animation_id) >= 0) { diff --git a/src/overlays/l10/mobys/toxic_crab.c b/src/overlays/l10/mobys/toxic_crab.c index 820fba835a..a399a78d3f 100644 --- a/src/overlays/l10/mobys/toxic_crab.c +++ b/src/overlays/l10/mobys/toxic_crab.c @@ -1,5 +1,6 @@ /* Level 10 moby class toxic_crab: sight, targeting, group approach, particles and hit reactions. */ #include "types.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/mobys/moby_state.h" #include "rnc/game/item_state.h" @@ -1011,43 +1012,31 @@ typedef struct Hero Hero; typedef int u128_2E52B0 __attribute__((mode(TI))); typedef struct D_2E52B0 { - char p0[0x10]; - struct Moby *f10; - char p14[0xC]; - float f20; - char p24[2]; - short hit_reaction_suppression_timer_frames; - char p28[0x10]; - int target_range_boost_pending; - char p3C[0x24]; - struct HitColorFlash hit_flash; - float a70[4]; - float f80; - char p84[4]; - float knockback_xy_scale; - float knockback_z_scale; - int f90; - int knockback_motion_flags; - float f98; - char p9C[0x11]; - unsigned char bAD; - char pAE[0x12]; - float fC0; - float fC4; - char pC8[0x58]; - AlignedVec4f a120; - char p130[0x30]; - struct Moby *selected_target_moby; - int target_selection_status; - char p168[8]; - AlignedVec4f a170; - char p180[0x20]; - float f1A0; - char p1A4[8]; - int target_range_boost_timer_frames; - int target_path_index; - char p1B4[0x20]; - int target_loss_frames; + char p0[0x10]; + struct Moby *f10; + char p14[0xC]; + float f20; + char p24[2]; + short hit_reaction_suppression_timer_frames; + char p28[0x10]; + int target_range_boost_pending; + char p3C[0x24]; + struct HitColorFlash hit_flash; + struct KnockbackMotion knockback; + char pad_60[0x50]; + AlignedVec4f a120; + char p130[0x30]; + struct Moby *selected_target_moby; + int target_selection_status; + char p168[8]; + AlignedVec4f a170; + char p180[0x20]; + float f1A0; + char p1A4[8]; + int target_range_boost_timer_frames; + int target_path_index; + char p1B4[0x20]; + int target_loss_frames; } D_2E52B0; typedef struct Hit_2E52B0 { @@ -1182,10 +1171,10 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { if (moby_data->f20 <= 0.0f) hit_response_code = 1; func_L10_002E14F8_2E52B0(moby); - moby_data->f90 = truncate_float_to_s32(768.0f); - moby_data->f98 = 0.75f; - moby_data->knockback_motion_flags = 9; - moby_data->bAD = 0; + moby_data->knockback.collision_radius_1024ths = truncate_float_to_s32(768.0f); + moby_data->knockback.collision_z_offset = 0.75f; + moby_data->knockback.flags = 9; + moby_data->knockback.unk3D = 0; fx = fast_arc_tan(hit_record->pos.x, hit_record->pos.y); switch (hit_response_code) { case KNOCKBACK_HIT_RESPONSE: @@ -1196,14 +1185,14 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { case ARC_ADJUSTED_KNOCKBACK_HIT_RESPONSE: moby->state = TOXIC_CRAB_STATE_HIT_KNOCKBACK; moby_data->hit_reaction_suppression_timer_frames = scale_game_frames(60); - moby_data->f80 = toxic_crab_hit_knockback_gravity_gp * D_0015ED70; - trooper_set_knockback(moby_data->a70, 0.5f, 0.5f); - moby_data->fC0 = 8.0f; - moby_data->fC4 = 10.0f; + moby_data->knockback.gravity = toxic_crab_hit_knockback_gravity_gp * D_0015ED70; + trooper_set_knockback(&moby_data->knockback, 0.5f, 0.5f); + moby_data->knockback.apex_animation_frame = 8.0f; + moby_data->knockback.landing_animation_frame = 10.0f; *(u128_2E52B0 *)&vA = *(u128_2E52B0 *)&hit_record->pos; trooper_knockback_arc( - &vA, &fx, &moby_data->knockback_xy_scale, &moby_data->knockback_z_scale); - func_L00_0025D5B0_2E52B0(moby, moby_data->a70, 9, 1, 0, fx); + &vA, &fx, &moby_data->knockback.speed, &moby_data->knockback.vertical_speed); + func_L00_0025D5B0_2E52B0(moby, &moby_data->knockback, 9, 1, 0, fx); moby_data->hit_flash.flash_red = 0xFA; start_hit_color_flash(moby, &moby_data->hit_flash); break; @@ -1212,16 +1201,20 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { float knockback_strength; moby->state = TOXIC_CRAB_STATE_HIT_KNOCKBACK; moby_data->hit_reaction_suppression_timer_frames = scale_game_frames(60); - moby_data->f80 = toxic_crab_hit_knockback_gravity_gp * D_0015ED70; + moby_data->knockback.gravity = toxic_crab_hit_knockback_gravity_gp * D_0015ED70; knockback_strength = ((Hero *)(((char *)&hero)))->vehicle_mode == 1 ? 1.0f : 3.0f; - trooper_set_knockback(moby_data->a70, knockback_strength, 0.5f); - moby_data->fC0 = 3.5f; - moby_data->fC4 = 7.0f; + trooper_set_knockback(&moby_data->knockback, knockback_strength, 0.5f); + moby_data->knockback.apex_animation_frame = 3.5f; + moby_data->knockback.landing_animation_frame = 7.0f; *(u128_2E52B0 *)&vA = *(u128_2E52B0 *)&hit_record->pos; trooper_knockback_arc( - &vA, &fx, &moby_data->knockback_xy_scale, &moby_data->knockback_z_scale); - func_L00_0025D5B0_2E52B0( - moby, moby_data->a70, 9, 1, 0, fast_arc_tan(hit_record->pos.x, hit_record->pos.y)); + &vA, &fx, &moby_data->knockback.speed, &moby_data->knockback.vertical_speed); + func_L00_0025D5B0_2E52B0(moby, + &moby_data->knockback, + 9, + 1, + 0, + fast_arc_tan(hit_record->pos.x, hit_record->pos.y)); moby_data->hit_flash.flash_red = 0xFA; start_hit_color_flash(moby, &moby_data->hit_flash); break; diff --git a/src/overlays/l12/mobys/blarg_trooper.c b/src/overlays/l12/mobys/blarg_trooper.c index 8ade9ff023..f306fe7593 100644 --- a/src/overlays/l12/mobys/blarg_trooper.c +++ b/src/overlays/l12/mobys/blarg_trooper.c @@ -1,5 +1,6 @@ /* Level 12 moby class blarg_trooper: path following, aiming, attack, damage and its attachment. */ #include "types.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/camera/level_camera.h" #include "rnc/hero/hero.h" @@ -514,36 +515,21 @@ void blarg_trooper_update(struct Moby *moby) { /* Variables of the Hoven blarg trooper (moby->pvars): the l00 ElectroidVars damage layout, with the alert and call-for-help state at 0x230.. */ typedef struct { - u8 pad0[0x20]; - f32 health; /* 0x20 */ - u8 pad24[2]; - s16 stun_timer; /* 0x26 */ - u8 pad28[0x10]; - s32 reset_alert; /* 0x38 */ - u8 pad3C[0x24]; - struct HitColorFlash hit_flash; - u8 fall[0x10]; /* 0x70 */ - f32 unk80; /* 0x80 */ - u8 pad84[4]; - f32 unk88; /* 0x88 */ - f32 unk8C; /* 0x8C */ - u8 pad90[4]; - s32 unk94; /* 0x94 */ - u8 pad98[8]; - f32 unkA0; /* 0xA0 */ - f32 unkA4; /* 0xA4 */ - f32 unkA8; /* 0xA8 */ - u8 padAC; - u8 unkAD; /* 0xAD */ - u8 padAE[0x12]; - f32 unkC0; /* 0xC0 */ - f32 unkC4; /* 0xC4 */ - u8 padC8[0x168]; - f32 speed; /* 0x230 */ - u8 pad234[0xC]; - s16 alert_timer; /* 0x240 */ - u8 pad242[0x32]; - s32 call_enabled; /* 0x274 */ + u8 pad0[0x20]; + f32 health; /* 0x20 */ + u8 pad24[2]; + s16 stun_timer; /* 0x26 */ + u8 pad28[0x10]; + s32 reset_alert; /* 0x38 */ + u8 pad3C[0x24]; + struct HitColorFlash hit_flash; + struct KnockbackMotion knockback; + u8 pad_60[0x160]; + f32 speed; /* 0x230 */ + u8 pad234[0xC]; + s16 alert_timer; /* 0x240 */ + u8 pad242[0x32]; + s32 call_enabled; /* 0x274 */ s32 groups[4]; /* 0x278: group ids counted before calling for help (-1: none) */ s32 call_timer; /* 0x288 */ f32 alert_speed; /* 0x28C */ @@ -629,38 +615,38 @@ void process_blarg_trooper_damage_and_alerts(struct Moby *moby) { alert_group_e81e0(moby->group, 1); } trooper_damage_alert_vars->health -= dmg; - trooper_damage_alert_vars->unk80 = frame_time_sq * 30.0f; - trooper_damage_alert_vars->unkAD = 0; - trooper_damage_alert_vars->unk94 = 9; - trooper_damage_alert_vars->unkA0 = 1.0f; - trooper_damage_alert_vars->unkA4 = 1.0f; - trooper_damage_alert_vars->unkA8 = 1.0f; + trooper_damage_alert_vars->knockback.gravity = frame_time_sq * 30.0f; + trooper_damage_alert_vars->knockback.unk3D = 0; + trooper_damage_alert_vars->knockback.flags = 9; + trooper_damage_alert_vars->knockback.restitution = 1.0f; + trooper_damage_alert_vars->knockback.unk34 = 1.0f; + trooper_damage_alert_vars->knockback.unk38 = 1.0f; if (trooper_damage_alert_vars->health <= 0.0f) { moby->flags &= ~0x1000; - trooper_damage_alert_vars->unk88 = frame_time * 12.0f; - trooper_damage_alert_vars->unk8C = frame_time * 9.0f; + trooper_damage_alert_vars->knockback.speed = frame_time * 12.0f; + trooper_damage_alert_vars->knockback.vertical_speed = frame_time * 9.0f; help_direction_or_hit_position.q = coll->pos.q; trooper_knockback_arc(&help_direction_or_hit_position, &angle, - &trooper_damage_alert_vars->unk88, - &trooper_damage_alert_vars->unk8C); - start_fall_e81e0(moby, trooper_damage_alert_vars->fall, 9, 1, 0, angle); - trooper_damage_alert_vars->unkC0 = 10.0f; - trooper_damage_alert_vars->unkC4 = 19.0f; + &trooper_damage_alert_vars->knockback.speed, + &trooper_damage_alert_vars->knockback.vertical_speed); + start_fall_e81e0(moby, &trooper_damage_alert_vars->knockback, 9, 1, 0, angle); + trooper_damage_alert_vars->knockback.apex_animation_frame = 10.0f; + trooper_damage_alert_vars->knockback.landing_animation_frame = 19.0f; moby->state = BLARG_TROOPER_DEATH_FALL; trooper_damage_alert_vars->hit_flash.flash_red = 0x78; start_hit_color_flash(moby, &trooper_damage_alert_vars->hit_flash); } else { - trooper_damage_alert_vars->unk88 = frame_time * 4.7f; - trooper_damage_alert_vars->unk8C = frame_time * 7.7f; + trooper_damage_alert_vars->knockback.speed = frame_time * 4.7f; + trooper_damage_alert_vars->knockback.vertical_speed = frame_time * 7.7f; help_direction_or_hit_position.q = coll->pos.q; trooper_knockback_arc(&help_direction_or_hit_position, &unused, - &trooper_damage_alert_vars->unk88, - &trooper_damage_alert_vars->unk8C); - start_fall_e81e0(moby, trooper_damage_alert_vars->fall, 6, 1, 0, unused); - trooper_damage_alert_vars->unkC0 = 4.0f; - trooper_damage_alert_vars->unkC4 = 8.0f; + &trooper_damage_alert_vars->knockback.speed, + &trooper_damage_alert_vars->knockback.vertical_speed); + start_fall_e81e0(moby, &trooper_damage_alert_vars->knockback, 6, 1, 0, unused); + trooper_damage_alert_vars->knockback.apex_animation_frame = 4.0f; + trooper_damage_alert_vars->knockback.landing_animation_frame = 8.0f; moby->state = BLARG_TROOPER_KNOCKBACK_RECOVERY; trooper_damage_alert_vars->hit_flash.flash_red = 0xFA; trooper_damage_alert_vars->stun_timer = scale_game_frames(0x3C); diff --git a/src/overlays/l12/mobys/hoven_anklebiter.c b/src/overlays/l12/mobys/hoven_anklebiter.c index 5e5ce3cdb3..976a579d72 100644 --- a/src/overlays/l12/mobys/hoven_anklebiter.c +++ b/src/overlays/l12/mobys/hoven_anklebiter.c @@ -1,5 +1,6 @@ /* Level 12 moby class hoven_anklebiter: its suck cannon callbacks, pursuit, movement, sparks, damage and alerts. */ #include "types.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/camera/level_camera.h" #include "rnc/hero/hero.h" @@ -339,12 +340,12 @@ void hoven_anklebiter_update(AnklebiterMoby *moby) { 1; /* loaded ahead of the other constants: it is the last one stored (retail keeps it in $a2 into the call's delay slot) */ data->alert_timer = 0; data->init0 = 0; - data->damping = 0.5f; + data->knockback.collision_z_offset = 0.5f; data->health = 2.0f; data->blend = 8; data->count = 5; data->mode = initial_mode; - data->fall_flags = 0x200; + data->knockback.collision_radius_1024ths = 0x200; func_L01_0026E8E0_2E2EF0((char *)&data->effect_class); data->effect_class = 0x38D; data->effect_flags |= 0x10; @@ -464,26 +465,27 @@ void hoven_anklebiter_update(AnklebiterMoby *moby) { if (moby->group != 255) FUN_L01_0026e090(moby->group, 2); moby->joints = 0x40; - data->zero = 0.0f; - data->gravity = hoven_anklebiter_leap_gravity_gp * D_0015ED70; - data->launch_speed = hoven_anklebiter_leap_launch_speed_gp * D_0015ED6C; - data->launch_time = func_L00_0025BC48_2E2EF0(moby->pos, - data->home, - &trajectory, - data->launch_speed, - -hoven_anklebiter_leap_gravity_gp); - data->fall_mode = ANKLEBITER_LEAP_TO_HOME_MOTION_FLAGS; - data->falling = 0; - setup_fall54(moby->rot[2], (char *)moby, data->fall, 8, 1, 0); - data->fall_a = 5.0f; - data->fall_b = 10.0f; + data->knockback.speed_approach_step = 0.0f; + data->knockback.gravity = hoven_anklebiter_leap_gravity_gp * D_0015ED70; + data->knockback.speed = hoven_anklebiter_leap_launch_speed_gp * D_0015ED6C; + data->knockback.vertical_speed = + func_L00_0025BC48_2E2EF0(moby->pos, + data->home, + &trajectory, + data->knockback.speed, + -hoven_anklebiter_leap_gravity_gp); + data->knockback.flags = ANKLEBITER_LEAP_TO_HOME_MOTION_FLAGS; + data->knockback.unk3D = 0; + setup_fall54(moby->rot[2], (char *)moby, &data->knockback, 8, 1, 0); + data->knockback.apex_animation_frame = 5.0f; + data->knockback.landing_animation_frame = 10.0f; moby->state = ANKLEBITER_LEAP_TO_HOME; moby->flags |= 0x1000; moby->collision = *(int *)(moby->model + 0x10); } break; case ANKLEBITER_LEAP_TO_HOME: - if (step_moby_motion(moby, data->fall) & 1) { + if (step_moby_motion(moby, &data->knockback) & 1) { moby->state = ANKLEBITER_LAND_AFTER_LEAP; if (moby->anim != 9) blend_moby_animation(moby, 9, 8, scale_game_frames(7)); @@ -615,7 +617,7 @@ void hoven_anklebiter_update(AnklebiterMoby *moby) { case ANKLEBITER_KNOCKBACK_FALL: if (moby->group != 255) FUN_L01_0026e090(moby->group, 1); - if (step_moby_motion(moby, data->fall) & 1) { + if (step_moby_motion(moby, &data->knockback) & 1) { moby->state = ANKLEBITER_RECOVER_AFTER_KNOCKBACK; if (moby->anim != 13) blend_moby_animation(moby, 13, 8, scale_game_frames(8)); @@ -627,7 +629,7 @@ void hoven_anklebiter_update(AnklebiterMoby *moby) { } break; case ANKLEBITER_CONTROLLED_MOTION_UNTIL_RETURN_HOME: - if (func_L00_002DDEA0_2E2EF0(moby, data->fall)) { + if (func_L00_002DDEA0_2E2EF0(moby, &data->knockback)) { moby->state = ANKLEBITER_RETURN_HOME; data->return_timer = 0; data->stuck = 0; @@ -642,7 +644,7 @@ void hoven_anklebiter_update(AnklebiterMoby *moby) { } break; case ANKLEBITER_DEATH_FALL: - hit = step_moby_motion(moby, data->fall); + hit = step_moby_motion(moby, &data->knockback); if ((hit & 0x40) || (compute_interpolated_record_value(moby) > 37.0f && moby->anim_end == moby->anim)) { moby->anim_rate = 0.0f; @@ -840,37 +842,22 @@ void spawn_hoven_anklebiter_death_sparks(struct Moby *moby) { /* Variables of the Hoven anklebiter (moby->pvars); the l00 ElectroidVars damage layout moved by 0xB0. */ typedef struct { - u8 pad0[0x20]; - f32 health; /* 0x20 */ - u8 pad24[2]; - s16 stun_timer; /* 0x26 */ - u8 pad28[0x10]; - s32 reset_alert; /* 0x38 */ - u8 pad3C[0xD4]; - struct HitColorFlash hit_flash; /* 0x110 */ - u8 fall[0x10]; /* 0x120 */ - f32 unk130; /* 0x130 */ - f32 unk134; /* 0x134 */ - f32 unk138; /* 0x138 */ - f32 unk13C; /* 0x13C */ - u8 pad140[4]; - s32 unk144; /* 0x144 */ - u8 pad148[8]; - f32 unk150; /* 0x150 */ - f32 unk154; /* 0x154 */ - f32 unk158; /* 0x158 */ - u8 pad15C; - u8 unk15D; /* 0x15D */ - u8 pad15E[0x12]; - f32 knockback_ascent_animation_target; /* 0x170 */ - f32 knockback_descent_animation_target; /* 0x174 */ - u8 pad178[0x134]; - f32 speed; /* 0x2AC */ - u8 pad2B0[0x14]; - s32 alert_timer; /* 0x2C4 */ - u8 pad2C8[0x20]; - s16 call_enabled; /* 0x2E8 */ - s16 call_timer; /* 0x2EA */ + u8 pad0[0x20]; + f32 health; /* 0x20 */ + u8 pad24[2]; + s16 stun_timer; /* 0x26 */ + u8 pad28[0x10]; + s32 reset_alert; /* 0x38 */ + u8 pad3C[0xD4]; + struct HitColorFlash hit_flash; /* 0x110 */ + struct KnockbackMotion knockback; + u8 pad_60[0x12C]; + f32 speed; /* 0x2AC */ + u8 pad2B0[0x14]; + s32 alert_timer; /* 0x2C4 */ + u8 pad2C8[0x20]; + s16 call_enabled; /* 0x2E8 */ + s16 call_timer; /* 0x2EA */ } AnklebiterVars; extern s32 D_001413D0_lui __asm__("D_001413D0") NOT_SDA; @@ -942,27 +929,29 @@ void process_hoven_anklebiter_damage_and_alerts(struct Moby *moby) { } if (dmg != 0.0f) { anklebiter_vars->health -= dmg; - anklebiter_vars->unk130 = 0.008f; - anklebiter_vars->unk134 = 0.0005f; - anklebiter_vars->unk138 = hoven_anklebiter_nonlethal_knockback_scale_gp * frame_time; - anklebiter_vars->unk13C = hoven_anklebiter_nonlethal_knockback_z_scale_gp * frame_time; - anklebiter_vars->unk15D = 0; - anklebiter_vars->unk144 = 9; - anklebiter_vars->unk150 = 1.0f; - anklebiter_vars->unk154 = 1.0f; - anklebiter_vars->unk158 = 1.0f; + anklebiter_vars->knockback.gravity = 0.008f; + anklebiter_vars->knockback.speed_approach_step = 0.0005f; + anklebiter_vars->knockback.speed = + hoven_anklebiter_nonlethal_knockback_scale_gp * frame_time; + anklebiter_vars->knockback.vertical_speed = + hoven_anklebiter_nonlethal_knockback_z_scale_gp * frame_time; + anklebiter_vars->knockback.unk3D = 0; + anklebiter_vars->knockback.flags = 9; + anklebiter_vars->knockback.restitution = 1.0f; + anklebiter_vars->knockback.unk34 = 1.0f; + anklebiter_vars->knockback.unk38 = 1.0f; if (anklebiter_vars->health <= 0.0f) { moby->flags &= ~0x1000; - anklebiter_vars->unk138 = frame_time * 8.0f; - anklebiter_vars->unk13C = frame_time * 10.0f; + anklebiter_vars->knockback.speed = frame_time * 8.0f; + anklebiter_vars->knockback.vertical_speed = frame_time * 10.0f; help_direction_or_hit_position.q = coll->pos.q; trooper_knockback_arc(&help_direction_or_hit_position, &angle, - &anklebiter_vars->unk138, - &anklebiter_vars->unk13C); - start_fall_e3528(moby, anklebiter_vars->fall, 6, 1, 0, angle); - anklebiter_vars->knockback_ascent_animation_target = 11.0f; - anklebiter_vars->knockback_descent_animation_target = 18.0f; + &anklebiter_vars->knockback.speed, + &anklebiter_vars->knockback.vertical_speed); + start_fall_e3528(moby, &anklebiter_vars->knockback, 6, 1, 0, angle); + anklebiter_vars->knockback.apex_animation_frame = 11.0f; + anklebiter_vars->knockback.landing_animation_frame = 18.0f; moby->state = ANKLEBITER_DEATH_FALL; anklebiter_vars->hit_flash.flash_red = 0x78; start_hit_color_flash(moby, &anklebiter_vars->hit_flash); @@ -970,11 +959,11 @@ void process_hoven_anklebiter_damage_and_alerts(struct Moby *moby) { help_direction_or_hit_position.q = coll->pos.q; trooper_knockback_arc(&help_direction_or_hit_position, &unused, - &anklebiter_vars->unk138, - &anklebiter_vars->unk13C); - start_fall_e3528(moby, anklebiter_vars->fall, 0xE, 1, 0, unused); - anklebiter_vars->knockback_descent_animation_target = - anklebiter_vars->knockback_ascent_animation_target = -1.0f; + &anklebiter_vars->knockback.speed, + &anklebiter_vars->knockback.vertical_speed); + start_fall_e3528(moby, &anklebiter_vars->knockback, 0xE, 1, 0, unused); + anklebiter_vars->knockback.landing_animation_frame = + anklebiter_vars->knockback.apex_animation_frame = -1.0f; moby->state = ANKLEBITER_KNOCKBACK_FALL; anklebiter_vars->hit_flash.flash_red = 0xFA; anklebiter_vars->stun_timer = scale_game_frames(0x3C); diff --git a/src/overlays/shared/enemies/gadgebot.c b/src/overlays/shared/enemies/gadgebot.c index 60b062cdd9..90c2a53c07 100644 --- a/src/overlays/shared/enemies/gadgebot.c +++ b/src/overlays/shared/enemies/gadgebot.c @@ -1,6 +1,7 @@ /* Shared moby class gadgebot: comes out of its container, picks targets and fights. */ #include "types.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/mobys/moby.h" #include "rnc/mobys/moby_class_id.h" #include "rnc/hero/hero.h" @@ -112,7 +113,7 @@ typedef struct { float unk18; char p1C[0x14]; struct GroundMoveControl ctl; - char knockback_motion[0x60]; + struct KnockbackMotion knockback; float home_position[4] __attribute__((aligned(16))); float stall_check_position[4] __attribute__((aligned(16))); unsigned char scale_manipulator; @@ -949,7 +950,7 @@ void gadgebot_update(GbMoby *moby) { return; } case GADGEBOT_UPDATE_KNOCKBACK: - if (step_moby_motion(moby, gadgebot_vars->knockback_motion) & 0x41) { + if (step_moby_motion(moby, &gadgebot_vars->knockback) & 0x41) { int i; cart_burst(moby, moby->pos, -1, 0.5f, 13.0f); diff --git a/src/overlays/shared/enemies/seeker.c b/src/overlays/shared/enemies/seeker.c index 06e1e1d06e..ee92fcab42 100644 --- a/src/overlays/shared/enemies/seeker.c +++ b/src/overlays/shared/enemies/seeker.c @@ -1,5 +1,6 @@ /* Shared moby class seeker: its update and its damage and target handling. */ #include "types.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/mobys/moby_state.h" #include "rnc/globals.h" @@ -342,36 +343,24 @@ typedef struct { } Cls; typedef struct Data { - char p0[0x20]; - float health; - char p24[0x14]; - int f38; - char p3C[0x24]; - struct HitColorFlash hit_flash; - float f70[4]; - float f80; - float f84; - float f88; - float f8C; - int f90; - int f94; - float f98; - char p9C[0x11]; - unsigned char bAD; - char pAE[0x12]; - float fC0; - float fC4; - char pC8[0x58]; - float target[4]; - char p130[0x30]; - Moby *f160; - int f164; - char p168[0x18]; - int path; - int timer; - float reach; - char p18C[4]; - int retreat; + char p0[0x20]; + float health; + char p24[0x14]; + int f38; + char p3C[0x24]; + struct HitColorFlash hit_flash; + struct KnockbackMotion knockback; + char pad_60[0x50]; + float target[4]; + char p130[0x30]; + Moby *f160; + int f164; + char p168[0x18]; + int path; + int timer; + float reach; + char p18C[4]; + int retreat; } Data; typedef struct { @@ -475,12 +464,12 @@ void update_seeker_damage_and_target(Moby *moby) { if (seeker_vars->health <= 0.0f) { response = 1; } - seeker_vars->f90 = truncate_float_to_s32(512.0f); - seeker_vars->f80 = seeker_knockback_gravity_scale * D_0015ED70; - seeker_vars->f84 = D_0015ED70 * 30.0f; - seeker_vars->f98 = 0.0f; - seeker_vars->f94 = 1; - seeker_vars->bAD = 0; + seeker_vars->knockback.collision_radius_1024ths = truncate_float_to_s32(512.0f); + seeker_vars->knockback.gravity = seeker_knockback_gravity_scale * D_0015ED70; + seeker_vars->knockback.speed_approach_step = D_0015ED70 * 30.0f; + seeker_vars->knockback.collision_z_offset = 0.0f; + seeker_vars->knockback.flags = 1; + seeker_vars->knockback.unk3D = 0; allocate_voice_for_target_entry(8, 0, moby); switch (response) { @@ -494,15 +483,18 @@ void update_seeker_damage_and_target(Moby *moby) { case 6: case 7: case 8: - seeker_vars->fC0 = 3.0f; - seeker_vars->fC4 = 6.0f; - seeker_vars->f88 = seeker_hurt_knockback_xy_scale * D_0015ED6C; - seeker_vars->f8C = 0.0f; + seeker_vars->knockback.apex_animation_frame = 3.0f; + seeker_vars->knockback.landing_animation_frame = 6.0f; + seeker_vars->knockback.speed = seeker_hurt_knockback_xy_scale * D_0015ED6C; + seeker_vars->knockback.vertical_speed = 0.0f; knock_angle = fast_arc_tan(moby->pos.x - source->owner->pos.x, moby->pos.y - source->owner->pos.y); *(Q_2C73D0 *)hit_pos = source->pos; - func_L00_0025BBA0_2C73D0(hit_pos, &knock_angle, &seeker_vars->f88, &seeker_vars->f8C); - func_L00_0025D5B0_2C73D0(moby, seeker_vars->f70, knock_angle, 4, 1, 0); + func_L00_0025BBA0_2C73D0(hit_pos, + &knock_angle, + &seeker_vars->knockback.speed, + &seeker_vars->knockback.vertical_speed); + func_L00_0025D5B0_2C73D0(moby, &seeker_vars->knockback, knock_angle, 4, 1, 0); moby->state = SEEKER_STATE_HURT_KNOCKBACK; if (moby->group != 0xFF) { func_L01_0026F040_2C73D0(moby->group, 1); @@ -512,17 +504,19 @@ void update_seeker_damage_and_target(Moby *moby) { case RESPONSE_FATAL_KNOCKBACK: case 2: moby->flags &= 0xEFFF; - seeker_vars->f80 = seeker_knockback_gravity_scale * D_0015ED70; - seeker_vars->f88 = seeker_fatal_knockback_xy_scale * D_0015ED6C; - seeker_vars->f8C = seeker_fatal_knockback_z_scale * D_0015ED6C; - seeker_vars->fC0 = 14.0f; - seeker_vars->fC4 = 28.0f; + seeker_vars->knockback.gravity = seeker_knockback_gravity_scale * D_0015ED70; + seeker_vars->knockback.speed = seeker_fatal_knockback_xy_scale * D_0015ED6C; + seeker_vars->knockback.vertical_speed = seeker_fatal_knockback_z_scale * D_0015ED6C; + seeker_vars->knockback.apex_animation_frame = 14.0f; + seeker_vars->knockback.landing_animation_frame = 28.0f; knock_angle_fatal = fast_arc_tan(moby->pos.x - source->owner->pos.x, moby->pos.y - source->owner->pos.y); *(Q_2C73D0 *)hit_pos = source->pos; - func_L00_0025BBA0_2C73D0( - hit_pos, &knock_angle_fatal, &seeker_vars->f88, &seeker_vars->f8C); - func_L00_0025D5B0_2C73D0(moby, seeker_vars->f70, knock_angle_fatal, 4, 1, 0); + func_L00_0025BBA0_2C73D0(hit_pos, + &knock_angle_fatal, + &seeker_vars->knockback.speed, + &seeker_vars->knockback.vertical_speed); + func_L00_0025D5B0_2C73D0(moby, &seeker_vars->knockback, knock_angle_fatal, 4, 1, 0); mark_moby_for_removal_cf(moby, 0, -1); moby->state = SEEKER_STATE_FATAL_KNOCKBACK; seeker_vars->hit_flash.flash_red = 0xF0; From 3d3942aa7279bb4042db9b65ae44b6821070cb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:14:34 +0000 Subject: [PATCH 066/213] decomp: use the shared knockback motion layout in mine layer and robot dog pvars --- src/overlays/l03/mobys/mine_layer.c | 79 ++++++++++++++--------------- src/overlays/l17/mobys/robot_dog.c | 71 +++++++++++--------------- 2 files changed, 68 insertions(+), 82 deletions(-) diff --git a/src/overlays/l03/mobys/mine_layer.c b/src/overlays/l03/mobys/mine_layer.c index 13b8b60c7a..ccf5195dd8 100644 --- a/src/overlays/l03/mobys/mine_layer.c +++ b/src/overlays/l03/mobys/mine_layer.c @@ -1,5 +1,6 @@ /* Level 03 moby class mine_layer: patrols a path and lobs mines. */ #include "types.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/world/level_path.h" #include "rnc/globals.h" @@ -51,19 +52,7 @@ typedef struct { u8 unk5A; u8 pad5B[5]; struct HitColorFlash hit_flash; - u8 knockback[0x10]; /* 0x70 */ - f32 kb_speed; /* 0x80 */ - u8 pad84[4]; - f32 kb_lift; /* 0x88 */ - f32 kb_gravity; /* 0x8C */ - u8 pad90[4]; - s32 kb_frames; /* 0x94 */ - u8 pad98[0x15]; - u8 kb_landed; /* 0xAD */ - u8 padAE[0x12]; - f32 kb_min; /* 0xC0 */ - f32 kb_max; /* 0xC4 */ - u8 padC8[8]; + struct KnockbackMotion knockback; struct GroundMoveControl walk; /* 0xD0 */ TrooperPatrol patrol; /* 0x120 */ u8 pad138[0x18]; @@ -254,7 +243,7 @@ void mine_layer_update(struct Moby *mine_layer_moby) { } break; case MINE_LAYER_KNOCKBACK_AND_RECOVER: - if (step_moby_motion(mine_layer_moby, mine_layer_vars->knockback) & 0x60) { + if (step_moby_motion(mine_layer_moby, &mine_layer_vars->knockback) & 0x60) { if (mine_layer_moby->prev_seq != 0) { blend_moby_animation(mine_layer_moby, 0, 0, scale_game_frames(10)); } @@ -286,7 +275,7 @@ void mine_layer_update(struct Moby *mine_layer_moby) { } break; case MINE_LAYER_KNOCKBACK_UNTIL_EXPLOSION: - if ((step_moby_motion(mine_layer_moby, mine_layer_vars->knockback) & 0x60) || + if ((step_moby_motion(mine_layer_moby, &mine_layer_vars->knockback) & 0x60) || mine_layer_moby->pos.z < 5.0f) { qcopy(muzzle, &mine_layer_moby->pos); muzzle[2] += 0.5f; @@ -417,70 +406,76 @@ void handle_mine_layer_damage(struct Moby *damaged_moby) { switch (damage_response) { case TROOPER_DAMAGE_SHORT_KNOCKBACK: case TROOPER_DAMAGE_SHORT_KNOCKBACK_ALTERNATE: - trooper_vars->kb_speed = + trooper_vars->knockback.gravity = mine_layer_nonlethal_knockback_speed_scale_gp * frame_time_sq_macro; - trooper_set_knockback(trooper_vars->knockback, + trooper_set_knockback(&trooper_vars->knockback, mine_layer_nonlethal_knockback_horizontal_speed_scale_gp, mine_layer_nonlethal_knockback_vertical_launch_input_gp); - trooper_vars->kb_landed = 0; - trooper_vars->kb_frames = 9; + trooper_vars->knockback.unk3D = 0; + trooper_vars->knockback.flags = 9; *(u128 *)&at = *(u128 *)&hit_record->pos; - trooper_knockback_arc( - &at, &knockback_arc_angle, &trooper_vars->kb_lift, &trooper_vars->kb_gravity); + trooper_knockback_arc(&at, + &knockback_arc_angle, + &trooper_vars->knockback.speed, + &trooper_vars->knockback.vertical_speed); trooper_start_knockback(fast_arc_tan(damaged_moby->pos.x - hero.motion.pos.f[0], damaged_moby->pos.y - hero.motion.pos.f[1]), damaged_moby, - trooper_vars->knockback, + &trooper_vars->knockback, 3, 1, 0); - trooper_vars->kb_min = 5.0f; - trooper_vars->kb_max = 10.0f; + trooper_vars->knockback.apex_animation_frame = 5.0f; + trooper_vars->knockback.landing_animation_frame = 10.0f; damaged_moby->state = MINE_LAYER_KNOCKBACK_AND_RECOVER; break; case TROOPER_DAMAGE_LONG_KNOCKBACK: case TROOPER_DAMAGE_LONG_KNOCKBACK_ALTERNATE: - trooper_vars->kb_speed = + trooper_vars->knockback.gravity = mine_layer_nonlethal_knockback_speed_scale_gp * frame_time_sq_macro; - trooper_set_knockback(trooper_vars->knockback, + trooper_set_knockback(&trooper_vars->knockback, mine_layer_nonlethal_knockback_horizontal_speed_scale_gp, mine_layer_nonlethal_knockback_vertical_launch_input_gp); - trooper_vars->kb_landed = 0; - trooper_vars->kb_frames = 9; + trooper_vars->knockback.unk3D = 0; + trooper_vars->knockback.flags = 9; *(u128 *)&at = *(u128 *)&hit_record->pos; - trooper_knockback_arc( - &at, &knockback_arc_angle, &trooper_vars->kb_lift, &trooper_vars->kb_gravity); + trooper_knockback_arc(&at, + &knockback_arc_angle, + &trooper_vars->knockback.speed, + &trooper_vars->knockback.vertical_speed); trooper_start_knockback(fast_arc_tan(damaged_moby->pos.x - hero.motion.pos.f[0], damaged_moby->pos.y - hero.motion.pos.f[1]), damaged_moby, - trooper_vars->knockback, + &trooper_vars->knockback, 4, 1, 0); - trooper_vars->kb_min = 7.5f; - trooper_vars->kb_max = 15.0f; + trooper_vars->knockback.apex_animation_frame = 7.5f; + trooper_vars->knockback.landing_animation_frame = 15.0f; damaged_moby->state = MINE_LAYER_KNOCKBACK_AND_RECOVER; break; case TROOPER_DAMAGE_LETHAL: - trooper_vars->kb_speed = + trooper_vars->knockback.gravity = mine_layer_lethal_knockback_speed_scale_gp * frame_time_sq_macro; - trooper_set_knockback(trooper_vars->knockback, + trooper_set_knockback(&trooper_vars->knockback, mine_layer_lethal_knockback_horizontal_speed_scale_gp, mine_layer_lethal_knockback_vertical_launch_input_gp); - trooper_vars->kb_landed = 0; - trooper_vars->kb_frames = 9; + trooper_vars->knockback.unk3D = 0; + trooper_vars->knockback.flags = 9; *(u128 *)&at = *(u128 *)&hit_record->pos; - trooper_knockback_arc( - &at, &knockback_arc_angle, &trooper_vars->kb_lift, &trooper_vars->kb_gravity); + trooper_knockback_arc(&at, + &knockback_arc_angle, + &trooper_vars->knockback.speed, + &trooper_vars->knockback.vertical_speed); trooper_start_knockback(fast_arc_tan(damaged_moby->pos.x - hero.motion.pos.f[0], damaged_moby->pos.y - hero.motion.pos.f[1]), damaged_moby, - trooper_vars->knockback, + &trooper_vars->knockback, 5, 1, 0); - trooper_vars->kb_min = 8.0f; - trooper_vars->kb_max = 15.0f; + trooper_vars->knockback.apex_animation_frame = 8.0f; + trooper_vars->knockback.landing_animation_frame = 15.0f; damaged_moby->flags &= 0xEFFF; *((u8 *)trooper_vars + 0x67) = 0xFA; damaged_moby->state = MINE_LAYER_KNOCKBACK_UNTIL_EXPLOSION; diff --git a/src/overlays/l17/mobys/robot_dog.c b/src/overlays/l17/mobys/robot_dog.c index 69562deabe..d9209b3e04 100644 --- a/src/overlays/l17/mobys/robot_dog.c +++ b/src/overlays/l17/mobys/robot_dog.c @@ -1,5 +1,6 @@ /* Level 17 robot_dog: chase and aim, its stun and suction methods, and its glow quads. */ #include "types.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/camera/level_camera.h" #include "rnc/input/pad_globals.h" @@ -546,35 +547,23 @@ void robot_dog_update(unsigned char *robot_dog_moby) { /* Ported from rac1-decomp (src/overlays/l17_fleet/vendor_002F1558.c: func_L17_002F1558), where it is exact; names translated to the US level program. */ typedef struct { - char pad0[0x20]; - float f20; - char pad24[0x14]; - int i38; - char pad3C[0xD4]; - struct HitColorFlash hit_flash; - float v120[4]; - float f130; - float f134; - float f138; - float f13C; - int i140; - int i144; - char pad148[0x15]; - char b15D; - char pad15E[0x12]; - float f170; - float f174; - char pad178[8]; - float v180[4]; - char pad190[0x20]; - float v1B0[4]; - char pad1C0[0x14]; - float f1D4; - char pad1D8[0xC]; - char b1E4; - char pad1E5[0xB]; - float f1F0; - float f1F4; + char pad0[0x20]; + float f20; + char pad24[0x14]; + int i38; + char pad3C[0xD4]; + struct HitColorFlash hit_flash; + struct KnockbackMotion knockback; + float v180[4]; + char pad190[0x20]; + float v1B0[4]; + char pad1C0[0x14]; + float f1D4; + char pad1D8[0xC]; + char b1E4; + char pad1E5[0xB]; + float f1F0; + float f1F4; } Data; typedef struct { @@ -634,22 +623,24 @@ void update_robot_dog_hit_reaction_and_target_detection(void *moby_v, int clip_v hit_reaction(moby, hit_record, &moby_vars->f20, 0, &x, &y, 0, 4); if (x != 1 && moby->state != ROBOT_DOG_STATE_FALL_THEN_REMOVE) { moby_vars->f20 -= y; - moby_vars->f130 = frame_time_sq * 42.0f; - moby_vars->f134 = frame_time_sq * 24.0f; - moby_vars->b15D = 0; - moby_vars->i144 = 9; - moby_vars->f13C = frame_time * 15.7f; - moby_vars->f138 = frame_time * 19.0f; - moby_vars->f170 = -1.0f; - moby_vars->f174 = -1.0f; + moby_vars->knockback.gravity = frame_time_sq * 42.0f; + moby_vars->knockback.speed_approach_step = frame_time_sq * 24.0f; + moby_vars->knockback.unk3D = 0; + moby_vars->knockback.flags = 9; + moby_vars->knockback.vertical_speed = frame_time * 15.7f; + moby_vars->knockback.speed = frame_time * 19.0f; + moby_vars->knockback.apex_animation_frame = -1.0f; + moby_vars->knockback.landing_animation_frame = -1.0f; *(OvlQuad *)position_buffer = *(OvlQuad *)hit_record->pos; - trooper_knockback_arc( - position_buffer, &knockback_heading, &moby_vars->f138, &moby_vars->f13C); + trooper_knockback_arc(position_buffer, + &knockback_heading, + &moby_vars->knockback.speed, + &moby_vars->knockback.vertical_speed); if (hit_record != 0 && hit_record->moby != 0 && hit_record->moby->moby_class_id == 0x63) { knockback_heading = fast_arc_tan(moby_vars->f1F0 - moby->pos[0], moby_vars->f1F4 - moby->pos[1]); } - trooper_start_knockback(knockback_heading, moby, moby_vars->v120, 0xB, 1, 0); + trooper_start_knockback(knockback_heading, moby, &moby_vars->knockback, 0xB, 1, 0); moby->state = ROBOT_DOG_STATE_FALL_THEN_REMOVE; moby_vars->hit_flash.flash_red = 0xF0; start_hit_color_flash(moby, &moby_vars->hit_flash); From 42929b6368a57e47e9f60e42b26bc2e8e7ec0ec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:16:39 +0000 Subject: [PATCH 067/213] decomp: name the hero rail speed and the level camera view matrix and roll --- include/rnc/hero/hero.h | 2 +- include/rnc/overlay/shared/camera/level_camera.h | 11 ++++++----- src/overlays/shared/hero/hero_move_state_velocity.c | 2 +- src/overlays/shared/props/grindrail.c | 8 ++++---- src/overlays/shared/props/trespasser_pad.c | 2 +- .../shared/rendering/debug/update_debug_menu.c | 2 +- src/overlays/shared/weapons/blaster.c | 2 +- src/overlays/shared/weapons/bomb_glove.c | 2 +- src/overlays/shared/weapons/decoy_glove.c | 2 +- src/overlays/shared/weapons/devastator.c | 2 +- src/overlays/shared/weapons/glove_of_doom.c | 2 +- src/overlays/shared/weapons/mine_glove.c | 2 +- src/overlays/shared/weapons/morphoray.c | 2 +- src/overlays/shared/weapons/ryno.c | 2 +- src/overlays/shared/weapons/suckcannon.c | 4 ++-- 15 files changed, 24 insertions(+), 23 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index 13108b7d01..9d4d5f179b 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -606,7 +606,7 @@ struct Hero { f32 rail_yaw; /* 0x9D0: rail yaw (FUN_L01_002f6328) */ f32 rail_ride_pitch; /* 0x9D4 */ u8 pad_9D8[0x4]; - f32 unk9DC; /* 0x9DC: rail speed, eased toward the rail's speed */ + f32 rail_speed; /* 0x9DC: rail speed, eased toward the rail's speed */ f32 rail_pull_step; /* 0x9E0: pull toward the rail, capped at the distance */ f32 roll_spring_velocity; /* 0x9E4 */ f32 rail_ride_pitch_vel; /* 0x9E8 */ diff --git a/include/rnc/overlay/shared/camera/level_camera.h b/include/rnc/overlay/shared/camera/level_camera.h index 54b3902d71..e01a28c360 100644 --- a/include/rnc/overlay/shared/camera/level_camera.h +++ b/include/rnc/overlay/shared/camera/level_camera.h @@ -11,12 +11,13 @@ struct UpdateCam; position, pitch and yaw. A shot sets the two amount/frames pairs (0.03 for a few frames), a hard landing sets the first one (0.2 for 40 frames). */ typedef struct LevelCamera { - f32 unk0[12]; /* 0x000: a 3x4 basis; shots copy it as their launch rotation */ + f32 view_matrix + [12]; /* 0x000: GameCamera.view_matrices, a 3x4 basis; shots copy it as their launch rotation */ u8 pad30[0x110]; - Vec4 pos; /* 0x140 */ - f32 unk150; - f32 pitch; /* 0x154 */ - f32 yaw; /* 0x158 */ + Vec4 pos; /* 0x140 */ + f32 rotation_x; /* 0x150: GameCamera.rotation x; pitch and yaw are its y and z */ + f32 pitch; /* 0x154 */ + f32 yaw; /* 0x158 */ u8 pad15C[0x4]; f32 shake_amount; /* 0x160: the same two channels as GameCamera.shake */ f32 shake_offset; /* 0x164 */ diff --git a/src/overlays/shared/hero/hero_move_state_velocity.c b/src/overlays/shared/hero/hero_move_state_velocity.c index 605e3217ce..03c930c35e 100644 --- a/src/overlays/shared/hero/hero_move_state_velocity.c +++ b/src/overlays/shared/hero/hero_move_state_velocity.c @@ -1309,7 +1309,7 @@ void launch_hero_wrench(void) { clear_u64_value(aim_origin_or_euler_angles); euler_rotation_basis(item_rotation_matrix, aim_origin_or_euler_angles); if (aimed) { - aim_origin_or_euler_angles[0] = l00_camera.unk150; + aim_origin_or_euler_angles[0] = l00_camera.rotation_x; aim_origin_or_euler_angles[1] = l00_camera.pitch; aim_origin_or_euler_angles[2] = l00_camera.yaw; euler_rotation_basis(cam_mat, aim_origin_or_euler_angles); diff --git a/src/overlays/shared/props/grindrail.c b/src/overlays/shared/props/grindrail.c index 59b98e54cf..d4bd11ade6 100644 --- a/src/overlays/shared/props/grindrail.c +++ b/src/overlays/shared/props/grindrail.c @@ -121,13 +121,13 @@ void rail_hero_motion_update(struct Moby *rail_moby) { fast_arc_tan(vector_length_xy(&rail_step_delta), rail_step_delta.f[2]); hero.rail_yaw = fast_arc_tan(rail_step_delta.f[0], rail_step_delta.f[1]); rail_step_delta.i[2] = 0; - if (hero.unk9DC < rail_vars->speed) { - approach_value(&hero.unk9DC, rail_vars->speed, frame_time_sq * 6.0f); + if (hero.rail_speed < rail_vars->speed) { + approach_value(&hero.rail_speed, rail_vars->speed, frame_time_sq * 6.0f); } else { - approach_value(&hero.unk9DC, rail_vars->speed, frame_time_sq * 6.0f); + approach_value(&hero.rail_speed, rail_vars->speed, frame_time_sq * 6.0f); } if (0.001f < fast_vec_length(&rail_step_delta)) { - fast_vec_normalize(&hero.motion.platform_delta, &rail_step_delta, hero.unk9DC); + fast_vec_normalize(&hero.motion.platform_delta, &rail_step_delta, hero.rail_speed); } fast_vec_sub(&pull, &best_pt, &hero.motion.pos); rate = frame_time * 5.0f; diff --git a/src/overlays/shared/props/trespasser_pad.c b/src/overlays/shared/props/trespasser_pad.c index 4887570fef..5c66ff82ce 100644 --- a/src/overlays/shared/props/trespasser_pad.c +++ b/src/overlays/shared/props/trespasser_pad.c @@ -341,7 +341,7 @@ void tresspasser_pad_update(Moby *moby) { D_L02_0017EB08_lui = 1; force_help_message(6, 0); if (l02_camera.current_camera != 0 && l02_camera.current_camera->unk86 != 5) { - jet_mount(&l02_camera.pos, &l02_camera.unk150, 1, 0, 0); + jet_mount(&l02_camera.pos, &l02_camera.rotation_x, 1, 0, 0); } i = 0; if (0.99f <= pad_puzzle_state->f110 && diff --git a/src/overlays/shared/rendering/debug/update_debug_menu.c b/src/overlays/shared/rendering/debug/update_debug_menu.c index ef7227560c..4563a3dc56 100644 --- a/src/overlays/shared/rendering/debug/update_debug_menu.c +++ b/src/overlays/shared/rendering/debug/update_debug_menu.c @@ -382,7 +382,7 @@ void update_debug_camera(void) { l00_camera.pos.f[2] += g_debug_menu.vertical_speed; } if (!free_look) { - euler_rotation_matrix(r, &l00_camera.unk150); + euler_rotation_matrix(r, &l00_camera.rotation_x); fast_vec_normalize(&r[0], &r[0], 1.0f); fast_vec_normalize(&r[1], &r[1], 1.0f); fast_vec_normalize(&r[2], &r[2], 1.0f); diff --git a/src/overlays/shared/weapons/blaster.c b/src/overlays/shared/weapons/blaster.c index cc765873f9..33ca870e88 100644 --- a/src/overlays/shared/weapons/blaster.c +++ b/src/overlays/shared/weapons/blaster.c @@ -248,7 +248,7 @@ void blaster_update(struct Moby *moby) { if (moby->prev_seq == 0 && moby->prev_frame < 3) blaster_vars->cooldown = scale_game_frames(7); if (hero.state.current == 30 && (hero.moby->flags & 1)) { - copy_matrix3x4(&camera_aim_and_effect_scratch.rotation, l00_camera.unk0); + copy_matrix3x4(&camera_aim_and_effect_scratch.rotation, l00_camera.view_matrix); transpose_rotation_matrix(&inverse, &camera_aim_and_effect_scratch.rotation); velocity.f.z = frame_time * 40.0f; transform_vector(&velocity, &velocity, &inverse); diff --git a/src/overlays/shared/weapons/bomb_glove.c b/src/overlays/shared/weapons/bomb_glove.c index 449509769c..e7bcd30be3 100644 --- a/src/overlays/shared/weapons/bomb_glove.c +++ b/src/overlays/shared/weapons/bomb_glove.c @@ -189,7 +189,7 @@ void bomb_glove_update(struct Moby *moby) { offset.q = 0; offset.f[1] = -0.09f; offset.f[2] = -0.02f; - copy_matrix3x4(basis, l00_camera_lui.unk0); + copy_matrix3x4(basis, l00_camera_lui.view_matrix); transpose_rotation_matrix(matrix, basis); if (bomb_glove_vars == 0) return; diff --git a/src/overlays/shared/weapons/decoy_glove.c b/src/overlays/shared/weapons/decoy_glove.c index 376a53e720..d7c43e66c3 100644 --- a/src/overlays/shared/weapons/decoy_glove.c +++ b/src/overlays/shared/weapons/decoy_glove.c @@ -109,7 +109,7 @@ void decoy_glove_aim_throw(int collision_arg, Moby_2D3608 *carrier, float *posit float *anchor_ptr = anchor; *(u128_2D3608 *)anchor_ptr = *(u128_2D3608 *)position; - copy_matrix3x4(rotation, l00_camera.unk0); + copy_matrix3x4(rotation, l00_camera.view_matrix); transpose_rotation_matrix(inverse, rotation); target = carrier->target; if (target == 0) diff --git a/src/overlays/shared/weapons/devastator.c b/src/overlays/shared/weapons/devastator.c index 354f081489..5c7bab1979 100644 --- a/src/overlays/shared/weapons/devastator.c +++ b/src/overlays/shared/weapons/devastator.c @@ -327,7 +327,7 @@ void devastator_update(struct Moby *devastator_moby) { devastator_vars->light = -1; devastator_vars->glow = 0; } - copy_matrix3x4(&rotation, l00_camera.unk0); + copy_matrix3x4(&rotation, l00_camera.view_matrix); transpose_rotation_matrix(&inverse, &rotation); fast_dec_timer(&devastator_vars->cooldown); if (fast_dec_timer(&devastator_vars->target_timer) || diff --git a/src/overlays/shared/weapons/glove_of_doom.c b/src/overlays/shared/weapons/glove_of_doom.c index 716b9b145f..af8d90a577 100644 --- a/src/overlays/shared/weapons/glove_of_doom.c +++ b/src/overlays/shared/weapons/glove_of_doom.c @@ -191,7 +191,7 @@ void compute_glove_of_doom_throw_velocity(struct Moby *moby, float *pos = throw_origin; *(u128 *)pos = grip->q; - copy_matrix3x4(basis, l00_camera.unk0); + copy_matrix3x4(basis, l00_camera.view_matrix); transpose_rotation_matrix(matrix, basis); held = throw_carrier_vars->held; if (held == 0) diff --git a/src/overlays/shared/weapons/mine_glove.c b/src/overlays/shared/weapons/mine_glove.c index 0a3970e7a7..9a0d092f9a 100644 --- a/src/overlays/shared/weapons/mine_glove.c +++ b/src/overlays/shared/weapons/mine_glove.c @@ -166,7 +166,7 @@ void mine_glove_update(struct Moby *moby) { offset.q = 0; offset.f[1] = -0.09f; offset.f[2] = -0.02f; - copy_matrix3x4(basis, l00_camera.unk0); + copy_matrix3x4(basis, l00_camera.view_matrix); transpose_rotation_matrix(matrix, basis); if (mine_glove_vars == 0) return; diff --git a/src/overlays/shared/weapons/morphoray.c b/src/overlays/shared/weapons/morphoray.c index 04fbecfaf3..d088181ba3 100644 --- a/src/overlays/shared/weapons/morphoray.c +++ b/src/overlays/shared/weapons/morphoray.c @@ -1566,7 +1566,7 @@ void morphoray_update(Moby *moby) { *(u128_2BDAF0 *)&direction = 0; if (((Hero *)((char *)&hero))->state.current == 30 && (*(unsigned short *)((char *)((Hero *)((char *)&hero))->moby + 0x34) & 1)) { - copy_matrix3x4(points, l00_camera.unk0); + copy_matrix3x4(points, l00_camera.view_matrix); func_001FA4A0_2BDAF0(matrix, points); direction.z = 1.0f; func_001F9EE8_2BDAF0(&direction, &direction, matrix); diff --git a/src/overlays/shared/weapons/ryno.c b/src/overlays/shared/weapons/ryno.c index 363b32d0b9..50639b3352 100644 --- a/src/overlays/shared/weapons/ryno.c +++ b/src/overlays/shared/weapons/ryno.c @@ -231,7 +231,7 @@ void ryno_update(struct Moby *ryno_moby) { float yaw, pitch; int i; - copy_matrix3x4(&launch_direction_basis, l00_camera.unk0); + copy_matrix3x4(&launch_direction_basis, l00_camera.view_matrix); transpose_rotation_matrix(&view, &launch_direction_basis); if ((unsigned int)(ryno_moby->state - 2) < 2) { if (fast_dec_timer(&ryno_vars->lock_timer) || ryno_vars->target == 0 || diff --git a/src/overlays/shared/weapons/suckcannon.c b/src/overlays/shared/weapons/suckcannon.c index 313557be3c..c37f34cee0 100644 --- a/src/overlays/shared/weapons/suckcannon.c +++ b/src/overlays/shared/weapons/suckcannon.c @@ -1530,7 +1530,7 @@ void suckcannon_update(SuckMoby *suck_cannon_moby) { SuckHit *hit; aim_and_fire_scratch.aim.velocity.q = 0; aim_and_fire_scratch.aim.velocity.f.z = 50.0f; - copy_matrix3x4(&aim_and_fire_scratch.aim.rotation, camera->unk0); + copy_matrix3x4(&aim_and_fire_scratch.aim.rotation, camera->view_matrix); eye = (SuckVec *)&camera->pos; transpose_rotation_matrix(&aim_and_fire_scratch.aim.inverse, &aim_and_fire_scratch.aim.rotation); @@ -1599,7 +1599,7 @@ void suckcannon_update(SuckMoby *suck_cannon_moby) { SuckMoby *best, *candidate_target; float yaw, pitch, limit; aim_and_fire_scratch.fire.velocity.q = 0; - copy_matrix3x4(&aim_and_fire_scratch.fire.rotation, l00_camera.unk0); + copy_matrix3x4(&aim_and_fire_scratch.fire.rotation, l00_camera.view_matrix); transpose_rotation_matrix(&aim_and_fire_scratch.fire.inverse, &aim_and_fire_scratch.fire.rotation); if (((SuckHero *)&hero)->state == 30 && (((SuckHero *)&hero)->moby->flags & 1)) { From 4b515aab422dc580f7ccae379a7ff2a4046b7922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:28:56 +0000 Subject: [PATCH 068/213] chore: prove level copies of executable data by vote and by code shape Try each delta the level's code reads an object at (most votes first, then its neighbours'), so a stale %hi no longer hides the copy. A pointer may move as the level's code reads its target, and a callback may point at a level function whose instructions equal the executable's, call targets and %hi/%lo halves aside. Proves the levels' pause and preview menu graphs. --- config/us/levels/exe_data.tsv | 647 ++++++++++++++++++++++++++++++++ scripts/lib/overlay_exe_data.py | 76 +++- 2 files changed, 708 insertions(+), 15 deletions(-) diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index efcf15fb23..000be3a3a8 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -3,19 +3,34 @@ # level address size 00 0015EF4C 4 00 0015EF58 12 +00 0015EF60 8 +00 0015F1A8 8 +00 0015F1E0 4 +00 0015F1FC 4 00 0015F340 179 +00 0015F4A8 187 +00 0015F570 4 00 0015F5AC 4 00 0015F5FC 4 +00 0015F634 4 00 0015F640 12 +00 0015F650 4 00 0015F748 8 +00 0015F968 4 00 0015FAF8 14 00 0015FC30 75 +00 0015FDE4 4 +00 0015FE38 14 +00 0015FE48 4 +00 0015FF28 4 00 0015FF30 21 00 0015FF80 12 00 0015FF90 10 00 0015FFA0 26 00 0015FFBC 4 +00 0015FFE4 4 00 00160004 8 +00 00160080 8 00 00160090 12 00 00160128 5 00 00160130 41 @@ -26,11 +41,15 @@ 00 001603A8 8 00 001603B0 10 00 001603C0 47 +00 00160420 8 00 00160470 27 00 00160490 8 00 001604B8 4 00 00160510 9 00 00160534 4 +00 00160580 12 +00 00160590 12 +00 001605E0 96 00 001607E0 16 00 00160910 16 00 00160920 16 @@ -38,10 +57,12 @@ 00 00160F30 27 00 00160F84 4 00 00160FE4 4 +00 00161110 24 00 00161158 11 00 001611A0 4 00 001611C4 4 00 00161204 3 +00 00161220 4 00 001612D0 12 00 001612E0 4 00 00161338 14 @@ -58,6 +79,8 @@ 00 0016C7E0 64 00 0016CCC0 64 00 0016CD00 64 +00 0016D880 512 +00 0016DA80 512 00 0016E480 1024 00 0016EA40 512 00 00173040 44 @@ -69,6 +92,7 @@ 00 0017E530 80 00 00182A70 304 00 001844B0 20 +00 00184538 100 00 00186CC0 76 00 00196CC0 64 00 00196F80 896 @@ -80,11 +104,16 @@ 00 001AFCE0 1152 00 001B0180 200 00 001B1860 16 +00 001B23C0 56 +00 001B23F8 9176 +00 001B47D0 112 +00 001B4840 18656 00 001B9120 96 00 001B9198 588 00 001B93E8 1776 00 001B9CA0 80 00 001B9CF0 328 +00 001B9E90 56 00 001B9FC0 448 00 001BA180 56 00 001BA1B8 40 @@ -103,7 +132,10 @@ 00 001C12A0 1080 00 001C1E40 552 00 001C20B8 76 +00 001C24C0 48 +00 001C24F0 48 00 001C28F0 64 +00 001C2F00 48 00 001C44B8 80 00 001C5800 768 00 001CA0B8 96 @@ -111,6 +143,7 @@ 00 001CA318 96 00 001CA4FC 4 00 001CA720 64 +00 001E7A50 48 00 001E8B18 17 00 001E8B30 64 00 001E8C80 19 @@ -120,6 +153,7 @@ 00 001E9270 24 00 001E9428 28 00 001E94B0 21 +00 001E9530 61 00 001E9570 71 00 001E9700 18 00 001E9718 21 @@ -127,19 +161,34 @@ 00 001E9748 57 01 0015EF4C 4 01 0015EF58 12 +01 0015EF60 8 +01 0015F1A8 8 +01 0015F1E0 4 +01 0015F1FC 4 01 0015F340 179 +01 0015F4A8 187 +01 0015F570 4 01 0015F5AC 4 01 0015F5FC 4 +01 0015F634 4 01 0015F640 12 +01 0015F650 4 01 0015F748 8 +01 0015F968 4 01 0015FAF8 14 01 0015FC30 75 +01 0015FDE4 4 +01 0015FE38 14 +01 0015FE48 4 +01 0015FF28 4 01 0015FF30 21 01 0015FF80 12 01 0015FF90 10 01 0015FFA0 26 01 0015FFBC 4 +01 0015FFE4 4 01 00160004 8 +01 00160080 8 01 00160090 12 01 00160128 5 01 00160130 41 @@ -150,11 +199,15 @@ 01 001603A8 8 01 001603B0 10 01 001603C0 47 +01 00160420 8 01 00160470 27 01 00160490 8 01 001604B8 4 01 00160510 9 01 00160534 4 +01 00160580 12 +01 00160590 12 +01 001605E0 96 01 001607E0 16 01 00160910 16 01 00160920 16 @@ -162,12 +215,15 @@ 01 00160F30 27 01 00160F84 4 01 00160FE4 4 +01 00161110 24 01 00161158 11 01 001611A0 4 01 001611C4 4 01 00161204 3 +01 00161220 4 01 001612D0 12 01 001612E0 4 +01 00161338 14 01 00161358 4 01 00161360 4 01 00166480 128 @@ -181,6 +237,8 @@ 01 0016CC60 64 01 0016D140 64 01 0016D180 64 +01 0016DD00 512 +01 0016DF00 512 01 0016E900 1024 01 0016EEC0 512 01 001734C0 44 @@ -192,6 +250,7 @@ 01 0017E9B0 80 01 00182EF0 304 01 00184930 20 +01 001849B8 100 01 00187140 76 01 00197140 64 01 00197400 896 @@ -203,11 +262,16 @@ 01 001B0160 1152 01 001B0600 200 01 001B1CE0 16 +01 001B2840 56 +01 001B2878 9176 +01 001B4C50 112 +01 001B4CC0 18656 01 001B95A0 96 01 001B9618 588 01 001B9868 1776 01 001BA120 80 01 001BA170 328 +01 001BA310 56 01 001BA440 448 01 001BA600 56 01 001BA638 40 @@ -226,7 +290,10 @@ 01 001C1720 1080 01 001C22C0 552 01 001C2538 76 +01 001C2940 48 +01 001C2970 48 01 001C2D70 64 +01 001C3380 48 01 001C4938 80 01 001C5C80 768 01 001CA538 96 @@ -234,6 +301,7 @@ 01 001CA798 96 01 001CA97C 4 01 001CABA0 64 +01 00208AB0 48 01 00209B78 17 01 00209B90 64 01 00209CE0 19 @@ -243,6 +311,7 @@ 01 0020A2D0 24 01 0020A488 28 01 0020A510 21 +01 0020A590 61 01 0020A5D0 71 01 0020A760 18 01 0020A778 21 @@ -250,19 +319,34 @@ 01 0020A7A8 57 02 0015EF4C 4 02 0015EF58 12 +02 0015EF60 8 +02 0015F1A8 8 +02 0015F1E0 4 +02 0015F1FC 4 02 0015F340 179 +02 0015F4A8 187 +02 0015F570 4 02 0015F5AC 4 02 0015F5FC 4 +02 0015F634 4 02 0015F640 12 +02 0015F650 4 02 0015F748 8 +02 0015F968 4 02 0015FAF8 14 02 0015FC30 75 +02 0015FDE4 4 +02 0015FE38 14 +02 0015FE48 4 +02 0015FF28 4 02 0015FF30 21 02 0015FF80 12 02 0015FF90 10 02 0015FFA0 26 02 0015FFBC 4 +02 0015FFE4 4 02 00160004 8 +02 00160080 8 02 00160090 12 02 00160128 5 02 00160130 41 @@ -273,11 +357,15 @@ 02 001603A8 8 02 001603B0 10 02 001603C0 47 +02 00160420 8 02 00160470 27 02 00160490 8 02 001604B8 4 02 00160510 9 02 00160534 4 +02 00160580 12 +02 00160590 12 +02 001605E0 96 02 001607E0 16 02 00160910 16 02 00160920 16 @@ -285,10 +373,12 @@ 02 00160F30 27 02 00160F84 4 02 00160FE4 4 +02 00161110 24 02 00161158 11 02 001611A0 4 02 001611C4 4 02 00161204 3 +02 00161220 4 02 001612D0 12 02 001612E0 4 02 00161338 14 @@ -305,6 +395,8 @@ 02 0016CDE0 64 02 0016D2C0 64 02 0016D300 64 +02 0016DE80 512 +02 0016E080 512 02 0016EA80 1024 02 0016F040 512 02 00173640 44 @@ -316,6 +408,7 @@ 02 0017EB30 80 02 00183070 304 02 00184AB0 20 +02 00184B38 100 02 001872C0 76 02 001972C0 64 02 00197580 896 @@ -327,11 +420,16 @@ 02 001B02E0 1152 02 001B0780 200 02 001B1E60 16 +02 001B29C0 56 +02 001B29F8 9176 +02 001B4DD0 112 +02 001B4E40 18656 02 001B9720 96 02 001B9798 588 02 001B99E8 1776 02 001BA2A0 80 02 001BA2F0 328 +02 001BA490 56 02 001BA5C0 448 02 001BA780 56 02 001BA7B8 40 @@ -350,7 +448,10 @@ 02 001C18A0 1080 02 001C2440 552 02 001C26B8 76 +02 001C2AC0 48 +02 001C2AF0 48 02 001C2EF0 64 +02 001C3500 48 02 001C4AB8 80 02 001C5E00 768 02 001CA6B8 96 @@ -358,6 +459,7 @@ 02 001CA918 96 02 001CAAFC 4 02 001CAD20 64 +02 001F8350 48 02 001F9418 17 02 001F9430 64 02 001F9580 19 @@ -367,6 +469,7 @@ 02 001F9B70 24 02 001F9D28 28 02 001F9DB0 21 +02 001F9E30 61 02 001F9E70 71 02 001FA000 18 02 001FA018 21 @@ -374,19 +477,34 @@ 02 001FA048 57 03 0015EF4C 4 03 0015EF58 12 +03 0015EF60 8 +03 0015F1A8 8 +03 0015F1E0 4 +03 0015F1FC 4 03 0015F340 179 +03 0015F4A8 187 +03 0015F570 4 03 0015F5AC 4 03 0015F5FC 4 +03 0015F634 4 03 0015F640 12 +03 0015F650 4 03 0015F748 8 +03 0015F968 4 03 0015FAF8 14 03 0015FC30 75 +03 0015FDE4 4 +03 0015FE38 14 +03 0015FE48 4 +03 0015FF28 4 03 0015FF30 21 03 0015FF80 12 03 0015FF90 10 03 0015FFA0 26 03 0015FFBC 4 +03 0015FFE4 4 03 00160004 8 +03 00160080 8 03 00160090 12 03 00160128 5 03 00160130 41 @@ -397,11 +515,15 @@ 03 001603A8 8 03 001603B0 10 03 001603C0 47 +03 00160420 8 03 00160470 27 03 00160490 8 03 001604B8 4 03 00160510 9 03 00160534 4 +03 00160580 12 +03 00160590 12 +03 001605E0 96 03 001607E0 16 03 00160910 16 03 00160920 16 @@ -409,10 +531,12 @@ 03 00160F30 27 03 00160F84 4 03 00160FE4 4 +03 00161110 24 03 00161158 11 03 001611A0 4 03 001611C4 4 03 00161204 3 +03 00161220 4 03 001612D0 12 03 001612E0 4 03 00161338 14 @@ -429,6 +553,8 @@ 03 0016C8E0 64 03 0016CDC0 64 03 0016CE00 64 +03 0016D980 512 +03 0016DB80 512 03 0016E580 1024 03 0016EB40 512 03 00173140 44 @@ -440,6 +566,7 @@ 03 0017E630 80 03 00182B70 304 03 001845B0 20 +03 00184638 100 03 00186DC0 76 03 00196DC0 64 03 00197080 896 @@ -451,11 +578,16 @@ 03 001AFDE0 1152 03 001B0280 200 03 001B1960 16 +03 001B24C0 56 +03 001B24F8 9176 +03 001B48D0 112 +03 001B4940 18656 03 001B9220 96 03 001B9298 588 03 001B94E8 1776 03 001B9DA0 80 03 001B9DF0 328 +03 001B9F90 56 03 001BA0C0 448 03 001BA280 56 03 001BA2B8 40 @@ -474,7 +606,10 @@ 03 001C13A0 1080 03 001C1F40 552 03 001C21B8 76 +03 001C25C0 48 +03 001C25F0 48 03 001C29F0 64 +03 001C3000 48 03 001C45B8 80 03 001C5900 768 03 001CA1B8 96 @@ -482,6 +617,7 @@ 03 001CA418 96 03 001CA5FC 4 03 001CA820 64 +03 001E06D0 48 03 001E1798 17 03 001E17B0 64 03 001E1900 19 @@ -491,6 +627,7 @@ 03 001E1EF0 24 03 001E20A8 28 03 001E2130 21 +03 001E21B0 61 03 001E21F0 71 03 001E2380 18 03 001E2398 21 @@ -498,19 +635,34 @@ 03 001E23C8 57 04 0015EF4C 4 04 0015EF58 12 +04 0015EF60 8 +04 0015F1A8 8 +04 0015F1E0 4 +04 0015F1FC 4 04 0015F340 179 +04 0015F4A8 187 +04 0015F570 4 04 0015F5AC 4 04 0015F5FC 4 +04 0015F634 4 04 0015F640 12 +04 0015F650 4 04 0015F748 8 +04 0015F968 4 04 0015FAF8 14 04 0015FC30 75 +04 0015FDE4 4 +04 0015FE38 14 +04 0015FE48 4 +04 0015FF28 4 04 0015FF30 21 04 0015FF80 12 04 0015FF90 10 04 0015FFA0 26 04 0015FFBC 4 +04 0015FFE4 4 04 00160004 8 +04 00160080 8 04 00160090 12 04 00160128 5 04 00160130 41 @@ -521,11 +673,15 @@ 04 001603A8 8 04 001603B0 10 04 001603C0 47 +04 00160420 8 04 00160470 27 04 00160490 8 04 001604B8 4 04 00160510 9 04 00160534 4 +04 00160580 12 +04 00160590 12 +04 001605E0 96 04 001607E0 16 04 00160910 16 04 00160920 16 @@ -533,10 +689,12 @@ 04 00160F30 27 04 00160F84 4 04 00160FE4 4 +04 00161110 24 04 00161158 11 04 001611A0 4 04 001611C4 4 04 00161204 3 +04 00161220 4 04 001612D0 12 04 001612E0 4 04 00161338 14 @@ -553,6 +711,8 @@ 04 0016C960 64 04 0016CE40 64 04 0016CE80 64 +04 0016DA00 512 +04 0016DC00 512 04 0016E600 1024 04 0016EBC0 512 04 001731C0 44 @@ -564,6 +724,7 @@ 04 0017E6B0 80 04 00182BF0 304 04 00184630 20 +04 001846B8 100 04 00186E40 76 04 00196E40 64 04 00197100 896 @@ -575,11 +736,16 @@ 04 001AFE60 1152 04 001B0300 200 04 001B19E0 16 +04 001B2540 56 +04 001B2578 9176 +04 001B4950 112 +04 001B49C0 18656 04 001B92A0 96 04 001B9318 588 04 001B9568 1776 04 001B9E20 80 04 001B9E70 328 +04 001BA010 56 04 001BA140 448 04 001BA300 56 04 001BA338 40 @@ -598,7 +764,10 @@ 04 001C1420 1080 04 001C1FC0 552 04 001C2238 76 +04 001C2640 48 +04 001C2670 48 04 001C2A70 64 +04 001C3080 48 04 001C4638 80 04 001C5980 768 04 001CA238 96 @@ -606,6 +775,7 @@ 04 001CA498 96 04 001CA67C 4 04 001CA8A0 64 +04 001D9840 48 04 001DA8B8 17 04 001DA8D0 64 04 001DAA20 19 @@ -615,6 +785,7 @@ 04 001DB010 24 04 001DB1C8 28 04 001DB250 21 +04 001DB2D0 61 04 001DB310 71 04 001DB4A0 18 04 001DB4B8 21 @@ -622,19 +793,34 @@ 04 001DB4E8 57 05 0015EF4C 4 05 0015EF58 12 +05 0015EF60 8 +05 0015F1A8 8 +05 0015F1E0 4 +05 0015F1FC 4 05 0015F340 179 +05 0015F4A8 187 +05 0015F570 4 05 0015F5AC 4 05 0015F5FC 4 +05 0015F634 4 05 0015F640 12 +05 0015F650 4 05 0015F758 8 +05 0015F978 4 05 0015FB08 14 05 0015FC30 75 +05 0015FDE4 4 +05 0015FE38 14 +05 0015FE48 4 +05 0015FF28 4 05 0015FF30 21 05 0015FF80 12 05 0015FF90 10 05 0015FFA0 26 05 0015FFBC 4 +05 0015FFE4 4 05 00160004 8 +05 00160080 8 05 00160090 12 05 00160128 5 05 00160130 41 @@ -645,11 +831,15 @@ 05 001603A8 8 05 001603B0 10 05 001603C0 47 +05 00160420 8 05 00160470 27 05 00160490 8 05 001604B8 4 05 00160510 9 05 00160534 4 +05 00160580 12 +05 00160590 12 +05 001605E0 96 05 001607E0 16 05 00160910 16 05 00160920 16 @@ -657,10 +847,12 @@ 05 00160F30 27 05 00160F84 4 05 00160FE4 4 +05 00161110 24 05 00161158 11 05 001611A0 4 05 001611C4 4 05 00161204 3 +05 00161220 4 05 001612D0 12 05 001612E0 4 05 00161338 14 @@ -677,6 +869,8 @@ 05 0016CBE0 64 05 0016D0C0 64 05 0016D100 64 +05 0016DC80 512 +05 0016DE80 512 05 0016E880 1024 05 0016EE40 512 05 00173440 44 @@ -688,6 +882,7 @@ 05 0017E9B0 80 05 00182EF0 304 05 00184930 20 +05 001849B8 100 05 00187140 76 05 00197140 64 05 00197400 896 @@ -699,11 +894,16 @@ 05 001B0160 1152 05 001B0600 200 05 001B1CE0 16 +05 001B2840 56 +05 001B2878 9176 +05 001B4C50 112 +05 001B4CC0 18656 05 001B95A0 96 05 001B9618 588 05 001B9868 1776 05 001BA120 80 05 001BA170 328 +05 001BA310 56 05 001BA440 448 05 001BA600 56 05 001BA638 40 @@ -722,7 +922,10 @@ 05 001C1720 1080 05 001C22C0 552 05 001C2538 76 +05 001C2940 48 +05 001C2970 48 05 001C2D70 64 +05 001C3380 48 05 001C4938 80 05 001C5C80 768 05 001CA538 96 @@ -730,6 +933,7 @@ 05 001CA798 96 05 001CA97C 4 05 001CABA0 64 +05 00216140 48 05 00217228 17 05 00217240 64 05 00217390 19 @@ -739,6 +943,7 @@ 05 00217980 24 05 00217B38 28 05 00217BC0 21 +05 00217C40 61 05 00217C80 71 05 00217E10 18 05 00217E28 21 @@ -746,19 +951,34 @@ 05 00217E58 57 06 0015EF4C 4 06 0015EF58 12 +06 0015EF60 8 +06 0015F1A8 8 +06 0015F1E0 4 +06 0015F1FC 4 06 0015F340 179 +06 0015F4A8 187 +06 0015F570 4 06 0015F5AC 4 06 0015F5FC 4 +06 0015F634 4 06 0015F640 12 +06 0015F650 4 06 0015F748 8 +06 0015F968 4 06 0015FAF8 14 06 0015FC30 75 +06 0015FDE4 4 +06 0015FE38 14 +06 0015FE48 4 +06 0015FF28 4 06 0015FF30 21 06 0015FF80 12 06 0015FF90 10 06 0015FFA0 26 06 0015FFBC 4 +06 0015FFE4 4 06 00160004 8 +06 00160080 8 06 00160090 12 06 00160128 5 06 00160130 41 @@ -769,11 +989,15 @@ 06 001603A8 8 06 001603B0 10 06 001603C0 47 +06 00160420 8 06 00160470 27 06 00160490 8 06 001604B8 4 06 00160510 9 06 00160534 4 +06 00160580 12 +06 00160590 12 +06 001605E0 96 06 001607E0 16 06 00160910 16 06 00160920 16 @@ -781,10 +1005,12 @@ 06 00160F30 27 06 00160F84 4 06 00160FE4 4 +06 00161110 24 06 00161158 11 06 001611A0 4 06 001611C4 4 06 00161204 3 +06 00161220 4 06 001612D0 12 06 001612E0 4 06 00161338 14 @@ -801,6 +1027,8 @@ 06 0016CF60 64 06 0016D440 64 06 0016D480 64 +06 0016E000 512 +06 0016E200 512 06 0016EC00 1024 06 0016F1C0 512 06 001737C0 44 @@ -812,6 +1040,7 @@ 06 0017ECB0 80 06 001831F0 304 06 00184C30 20 +06 00184CB8 100 06 00187440 76 06 00197440 64 06 00197700 896 @@ -823,11 +1052,16 @@ 06 001B0460 1152 06 001B0900 200 06 001B1FE0 16 +06 001B2B40 56 +06 001B2B78 9176 +06 001B4F50 112 +06 001B4FC0 18656 06 001B98A0 96 06 001B9918 588 06 001B9B68 1776 06 001BA420 80 06 001BA470 328 +06 001BA610 56 06 001BA740 448 06 001BA900 56 06 001BA938 40 @@ -846,7 +1080,10 @@ 06 001C1A20 1080 06 001C25C0 552 06 001C2838 76 +06 001C2C40 48 +06 001C2C70 48 06 001C3070 64 +06 001C3680 48 06 001C4C38 80 06 001C5F80 768 06 001CA838 96 @@ -854,6 +1091,7 @@ 06 001CAA98 96 06 001CAC7C 4 06 001CAEA0 64 +06 001FEEA0 48 06 001FFF18 17 06 001FFF30 64 06 00200080 19 @@ -863,6 +1101,7 @@ 06 00200670 24 06 00200828 28 06 002008B0 21 +06 00200930 61 06 00200970 71 06 00200B00 18 06 00200B18 21 @@ -870,19 +1109,34 @@ 06 00200B48 57 07 0015EF4C 4 07 0015EF58 12 +07 0015EF60 8 +07 0015F1A8 8 +07 0015F1E0 4 +07 0015F1FC 4 07 0015F340 179 +07 0015F4A8 187 +07 0015F570 4 07 0015F5AC 4 07 0015F5FC 4 +07 0015F634 4 07 0015F640 12 +07 0015F650 4 07 0015F748 8 +07 0015F968 4 07 0015FAF8 14 07 0015FC30 75 +07 0015FDE4 4 +07 0015FE38 14 +07 0015FE48 4 +07 0015FF28 4 07 0015FF30 21 07 0015FF80 12 07 0015FF90 10 07 0015FFA0 26 07 0015FFBC 4 +07 0015FFE4 4 07 00160004 8 +07 00160080 8 07 00160090 12 07 00160128 5 07 00160130 41 @@ -893,11 +1147,15 @@ 07 001603A8 8 07 001603B0 10 07 001603C0 47 +07 00160420 8 07 00160470 27 07 00160490 8 07 001604B8 4 07 00160510 9 07 00160534 4 +07 00160580 12 +07 00160590 12 +07 001605E0 96 07 001607E0 16 07 00160910 16 07 00160920 16 @@ -905,10 +1163,12 @@ 07 00160F30 27 07 00160F84 4 07 00160FE4 4 +07 00161110 24 07 00161158 11 07 001611A0 4 07 001611C4 4 07 00161204 3 +07 00161220 4 07 001612D0 12 07 001612E0 4 07 00161338 14 @@ -925,6 +1185,8 @@ 07 0016C860 64 07 0016CD40 64 07 0016CD80 64 +07 0016D900 512 +07 0016DB00 512 07 0016E500 1024 07 0016EAC0 512 07 001730C0 44 @@ -936,6 +1198,7 @@ 07 0017E5B0 80 07 00182AF0 304 07 00184530 20 +07 001845B8 100 07 00186D40 76 07 00196D40 64 07 00197000 896 @@ -947,11 +1210,16 @@ 07 001AFD60 1152 07 001B0200 200 07 001B18E0 16 +07 001B2440 56 +07 001B2478 9176 +07 001B4850 112 +07 001B48C0 18656 07 001B91A0 96 07 001B9218 588 07 001B9468 1776 07 001B9D20 80 07 001B9D70 328 +07 001B9F10 56 07 001BA040 448 07 001BA200 56 07 001BA238 40 @@ -970,7 +1238,10 @@ 07 001C1320 1080 07 001C1EC0 552 07 001C2138 76 +07 001C2540 48 +07 001C2570 48 07 001C2970 64 +07 001C2F80 48 07 001C4538 80 07 001C5880 768 07 001CA138 96 @@ -978,6 +1249,7 @@ 07 001CA398 96 07 001CA57C 4 07 001CA7A0 64 +07 0020ED40 48 07 0020FDB8 17 07 0020FDD0 64 07 0020FF20 19 @@ -987,6 +1259,7 @@ 07 00210510 24 07 002106C8 28 07 00210750 21 +07 002107D0 61 07 00210810 71 07 002109A0 18 07 002109B8 21 @@ -994,19 +1267,34 @@ 07 002109E8 57 08 0015EF4C 4 08 0015EF58 12 +08 0015EF60 8 +08 0015F1A8 8 +08 0015F1E0 4 +08 0015F1FC 4 08 0015F340 179 +08 0015F4A8 187 +08 0015F570 4 08 0015F5AC 4 08 0015F5FC 4 +08 0015F634 4 08 0015F640 12 +08 0015F650 4 08 0015F748 8 +08 0015F968 4 08 0015FAF8 14 08 0015FC30 75 +08 0015FDE4 4 +08 0015FE38 14 +08 0015FE48 4 +08 0015FF28 4 08 0015FF30 21 08 0015FF80 12 08 0015FF90 10 08 0015FFA0 26 08 0015FFBC 4 +08 0015FFE4 4 08 00160004 8 +08 00160080 8 08 00160090 12 08 00160128 5 08 00160130 41 @@ -1017,11 +1305,15 @@ 08 001603A8 8 08 001603B0 10 08 001603C0 47 +08 00160420 8 08 00160470 27 08 00160490 8 08 001604B8 4 08 00160510 9 08 00160534 4 +08 00160580 12 +08 00160590 12 +08 001605E0 96 08 001607E0 16 08 00160910 16 08 00160920 16 @@ -1029,10 +1321,12 @@ 08 00160F30 27 08 00160F84 4 08 00160FE4 4 +08 00161110 24 08 00161158 11 08 001611A0 4 08 001611C4 4 08 00161204 3 +08 00161220 4 08 001612D0 12 08 001612E0 4 08 00161338 14 @@ -1049,6 +1343,8 @@ 08 0016CFE0 64 08 0016D4C0 64 08 0016D500 64 +08 0016E080 512 +08 0016E280 512 08 0016EC80 1024 08 0016F240 512 08 00173840 44 @@ -1060,6 +1356,7 @@ 08 0017ED30 80 08 00183270 304 08 00184CB0 20 +08 00184D38 100 08 001874C0 76 08 001974C0 64 08 00197780 896 @@ -1071,11 +1368,16 @@ 08 001B04E0 1152 08 001B0980 200 08 001B2060 16 +08 001B2BC0 56 +08 001B2BF8 9176 +08 001B4FD0 112 +08 001B5040 18656 08 001B9920 96 08 001B9998 588 08 001B9BE8 1776 08 001BA4A0 80 08 001BA4F0 328 +08 001BA690 56 08 001BA7C0 448 08 001BA980 56 08 001BA9B8 40 @@ -1094,7 +1396,10 @@ 08 001C1AA0 1080 08 001C2640 552 08 001C28B8 76 +08 001C2CC0 48 +08 001C2CF0 48 08 001C30F0 64 +08 001C3700 48 08 001C4CB8 80 08 001C6000 768 08 001CA8B8 96 @@ -1102,6 +1407,7 @@ 08 001CAB18 96 08 001CACFC 4 08 001CAF20 64 +08 001F9990 48 08 001FAA58 17 08 001FAA70 64 08 001FABC0 19 @@ -1111,6 +1417,7 @@ 08 001FB1B0 24 08 001FB368 28 08 001FB3F0 21 +08 001FB470 61 08 001FB4B0 71 08 001FB640 18 08 001FB658 21 @@ -1118,19 +1425,34 @@ 08 001FB688 57 09 0015EF4C 4 09 0015EF58 12 +09 0015EF60 8 +09 0015F1A8 8 +09 0015F1E0 4 +09 0015F1FC 4 09 0015F340 179 +09 0015F4A8 187 +09 0015F570 4 09 0015F5AC 4 09 0015F5FC 4 +09 0015F634 4 09 0015F640 12 +09 0015F650 4 09 0015F748 8 +09 0015F968 4 09 0015FAF8 14 09 0015FC30 75 +09 0015FDE4 4 +09 0015FE38 14 +09 0015FE48 4 +09 0015FF28 4 09 0015FF30 21 09 0015FF80 12 09 0015FF90 10 09 0015FFA0 26 09 0015FFBC 4 +09 0015FFE4 4 09 00160004 8 +09 00160080 8 09 00160090 12 09 00160128 5 09 00160130 41 @@ -1141,11 +1463,15 @@ 09 001603A8 8 09 001603B0 10 09 001603C0 47 +09 00160420 8 09 00160470 27 09 00160490 8 09 001604B8 4 09 00160510 9 09 00160534 4 +09 00160580 12 +09 00160590 12 +09 001605E0 96 09 001607E0 16 09 00160910 16 09 00160920 16 @@ -1153,10 +1479,12 @@ 09 00160F30 27 09 00160F84 4 09 00160FE4 4 +09 00161110 24 09 00161158 11 09 001611A0 4 09 001611C4 4 09 00161204 3 +09 00161220 4 09 001612D0 12 09 001612E0 4 09 00161338 14 @@ -1173,6 +1501,8 @@ 09 0016C960 64 09 0016CE40 64 09 0016CE80 64 +09 0016DA00 512 +09 0016DC00 512 09 0016E600 1024 09 0016EBC0 512 09 001731C0 44 @@ -1184,6 +1514,7 @@ 09 0017E6B0 80 09 00182BF0 304 09 00184630 20 +09 001846B8 100 09 00186E40 76 09 00196E40 64 09 00197100 896 @@ -1195,11 +1526,16 @@ 09 001AFE60 1152 09 001B0300 200 09 001B19E0 16 +09 001B2540 56 +09 001B2578 9176 +09 001B4950 112 +09 001B49C0 18656 09 001B92A0 96 09 001B9318 588 09 001B9568 1776 09 001B9E20 80 09 001B9E70 328 +09 001BA010 56 09 001BA140 448 09 001BA300 56 09 001BA338 40 @@ -1218,7 +1554,10 @@ 09 001C1420 1080 09 001C1FC0 552 09 001C2238 76 +09 001C2640 48 +09 001C2670 48 09 001C2A70 64 +09 001C3080 48 09 001C4638 80 09 001C5980 768 09 001CA238 96 @@ -1226,6 +1565,7 @@ 09 001CA498 96 09 001CA67C 4 09 001CA8A0 64 +09 002065B0 48 09 00207628 17 09 00207640 64 09 00207790 19 @@ -1235,6 +1575,7 @@ 09 00207D80 24 09 00207F38 28 09 00207FC0 21 +09 00208040 61 09 00208080 71 09 00208210 18 09 00208228 21 @@ -1242,19 +1583,34 @@ 09 00208258 57 10 0015EF4C 4 10 0015EF58 12 +10 0015EF60 8 +10 0015F1A8 8 +10 0015F1E0 4 +10 0015F1FC 4 10 0015F340 179 +10 0015F4A8 187 +10 0015F570 4 10 0015F5AC 4 10 0015F5FC 4 +10 0015F634 4 10 0015F640 12 +10 0015F650 4 10 0015F748 8 +10 0015F968 4 10 0015FAF8 14 10 0015FC30 75 +10 0015FDE4 4 +10 0015FE38 14 +10 0015FE48 4 +10 0015FF28 4 10 0015FF30 21 10 0015FF80 12 10 0015FF90 10 10 0015FFA0 26 10 0015FFBC 4 +10 0015FFE4 4 10 00160004 8 +10 00160080 8 10 00160090 12 10 00160128 5 10 00160130 41 @@ -1265,11 +1621,15 @@ 10 001603A8 8 10 001603B0 10 10 001603C0 47 +10 00160420 8 10 00160470 27 10 00160490 8 10 001604B8 4 10 00160510 9 10 00160534 4 +10 00160580 12 +10 00160590 12 +10 001605E0 96 10 001607E0 16 10 00160910 16 10 00160920 16 @@ -1277,10 +1637,12 @@ 10 00160F30 27 10 00160F84 4 10 00160FE4 4 +10 00161110 24 10 00161158 11 10 001611A0 4 10 001611C4 4 10 00161204 3 +10 00161220 4 10 001612D0 12 10 001612E0 4 10 00161338 14 @@ -1297,6 +1659,8 @@ 10 0016CC60 64 10 0016D140 64 10 0016D180 64 +10 0016DD00 512 +10 0016DF00 512 10 0016E900 1024 10 0016EEC0 512 10 001734C0 44 @@ -1308,6 +1672,7 @@ 10 0017E9B0 80 10 00182EF0 304 10 00184930 20 +10 001849B8 100 10 00187140 76 10 00197140 64 10 00197400 896 @@ -1319,11 +1684,16 @@ 10 001B0160 1152 10 001B0600 200 10 001B1CE0 16 +10 001B2840 56 +10 001B2878 9176 +10 001B4C50 112 +10 001B4CC0 18656 10 001B95A0 96 10 001B9618 588 10 001B9868 1776 10 001BA120 80 10 001BA170 328 +10 001BA310 56 10 001BA440 448 10 001BA600 56 10 001BA638 40 @@ -1342,7 +1712,10 @@ 10 001C1720 1080 10 001C22C0 552 10 001C2538 76 +10 001C2940 48 +10 001C2970 48 10 001C2D70 64 +10 001C3380 48 10 001C4938 80 10 001C5C80 768 10 001CA538 96 @@ -1350,6 +1723,7 @@ 10 001CA798 96 10 001CA97C 4 10 001CABA0 64 +10 001DA820 48 10 001DB898 17 10 001DB8B0 64 10 001DBA00 19 @@ -1359,6 +1733,7 @@ 10 001DBFF0 24 10 001DC1A8 28 10 001DC230 21 +10 001DC2B0 61 10 001DC2F0 71 10 001DC480 18 10 001DC498 21 @@ -1366,19 +1741,34 @@ 10 001DC4C8 57 11 0015EF4C 4 11 0015EF58 12 +11 0015EF60 8 +11 0015F1A8 8 +11 0015F1E0 4 +11 0015F1FC 4 11 0015F340 179 +11 0015F4A8 187 +11 0015F570 4 11 0015F5AC 4 11 0015F5FC 4 +11 0015F634 4 11 0015F640 12 +11 0015F650 4 11 0015F748 8 +11 0015F968 4 11 0015FAF8 14 11 0015FC30 75 +11 0015FDE4 4 +11 0015FE38 14 +11 0015FE48 4 +11 0015FF28 4 11 0015FF30 21 11 0015FF80 12 11 0015FF90 10 11 0015FFA0 26 11 0015FFBC 4 +11 0015FFE4 4 11 00160004 8 +11 00160080 8 11 00160090 12 11 00160128 5 11 00160130 41 @@ -1389,11 +1779,15 @@ 11 001603A8 8 11 001603B0 10 11 001603C0 47 +11 00160420 8 11 00160470 27 11 00160490 8 11 001604B8 4 11 00160510 9 11 00160534 4 +11 00160580 12 +11 00160590 12 +11 001605E0 96 11 001607E0 16 11 00160910 16 11 00160920 16 @@ -1401,10 +1795,12 @@ 11 00160F30 27 11 00160F84 4 11 00160FE4 4 +11 00161110 24 11 00161158 11 11 001611A0 4 11 001611C4 4 11 00161204 3 +11 00161220 4 11 001612D0 12 11 001612E0 4 11 00161338 14 @@ -1421,6 +1817,8 @@ 11 0016D1E0 64 11 0016D6C0 64 11 0016D700 64 +11 0016E280 512 +11 0016E480 512 11 0016EE80 1024 11 0016F440 512 11 00173A40 44 @@ -1432,6 +1830,7 @@ 11 0017EF30 80 11 00183470 304 11 00184EB0 20 +11 00184F38 100 11 001876C0 76 11 001976C0 64 11 00197980 896 @@ -1443,11 +1842,16 @@ 11 001B06E0 1152 11 001B0B80 200 11 001B2260 16 +11 001B2DC0 56 +11 001B2DF8 9176 +11 001B51D0 112 +11 001B5240 18656 11 001B9B20 96 11 001B9B98 588 11 001B9DE8 1776 11 001BA6A0 80 11 001BA6F0 328 +11 001BA890 56 11 001BA9C0 448 11 001BAB80 56 11 001BABB8 40 @@ -1466,7 +1870,10 @@ 11 001C1CA0 1080 11 001C2840 552 11 001C2AB8 76 +11 001C2EC0 48 +11 001C2EF0 48 11 001C32F0 64 +11 001C3900 48 11 001C4EB8 80 11 001C6200 768 11 001CAAB8 96 @@ -1474,6 +1881,7 @@ 11 001CAD18 96 11 001CAEFC 4 11 001CB120 64 +11 00218BA0 48 11 00219C68 17 11 00219C80 64 11 00219DD0 19 @@ -1483,6 +1891,7 @@ 11 0021A3C0 24 11 0021A578 28 11 0021A600 21 +11 0021A680 61 11 0021A6C0 71 11 0021A850 18 11 0021A868 21 @@ -1490,19 +1899,34 @@ 11 0021A898 57 12 0015EF4C 4 12 0015EF58 12 +12 0015EF60 8 +12 0015F1A8 8 +12 0015F1E0 4 +12 0015F1FC 4 12 0015F340 179 +12 0015F4A8 187 +12 0015F570 4 12 0015F5AC 4 12 0015F5FC 4 +12 0015F634 4 12 0015F640 12 +12 0015F650 4 12 0015F748 8 +12 0015F968 4 12 0015FAF8 14 12 0015FC30 75 +12 0015FDE4 4 +12 0015FE38 14 +12 0015FE48 4 +12 0015FF28 4 12 0015FF30 21 12 0015FF80 12 12 0015FF90 10 12 0015FFA0 26 12 0015FFBC 4 +12 0015FFE4 4 12 00160004 8 +12 00160080 8 12 00160090 12 12 00160128 5 12 00160130 41 @@ -1513,11 +1937,15 @@ 12 001603A8 8 12 001603B0 10 12 001603C0 47 +12 00160420 8 12 00160470 27 12 00160490 8 12 001604B8 4 12 00160510 9 12 00160534 4 +12 00160580 12 +12 00160590 12 +12 001605E0 96 12 001607E0 16 12 00160910 16 12 00160920 16 @@ -1525,10 +1953,12 @@ 12 00160F30 27 12 00160F84 4 12 00160FE4 4 +12 00161110 24 12 00161158 11 12 001611A0 4 12 001611C4 4 12 00161204 3 +12 00161220 4 12 001612D0 12 12 001612E0 4 12 00161338 14 @@ -1545,6 +1975,8 @@ 12 0016CC60 64 12 0016D140 64 12 0016D180 64 +12 0016DD00 512 +12 0016DF00 512 12 0016E900 1024 12 0016EEC0 512 12 001734C0 44 @@ -1556,6 +1988,7 @@ 12 0017E9B0 80 12 00182EF0 304 12 00184930 20 +12 001849B8 100 12 00187140 76 12 00197140 64 12 00197400 896 @@ -1567,11 +2000,16 @@ 12 001B0160 1152 12 001B0600 200 12 001B1CE0 16 +12 001B2840 56 +12 001B2878 9176 +12 001B4C50 112 +12 001B4CC0 18656 12 001B95A0 96 12 001B9618 588 12 001B9868 1776 12 001BA120 80 12 001BA170 328 +12 001BA310 56 12 001BA440 448 12 001BA600 56 12 001BA638 40 @@ -1590,7 +2028,10 @@ 12 001C1720 1080 12 001C22C0 552 12 001C2538 76 +12 001C2940 48 +12 001C2970 48 12 001C2D70 64 +12 001C3380 48 12 001C4938 80 12 001C5C80 768 12 001CA538 96 @@ -1598,6 +2039,7 @@ 12 001CA798 96 12 001CA97C 4 12 001CABA0 64 +12 00209F30 48 12 0020AFF8 17 12 0020B010 64 12 0020B160 19 @@ -1607,6 +2049,7 @@ 12 0020B750 24 12 0020B908 28 12 0020B990 21 +12 0020BA10 61 12 0020BA50 71 12 0020BBE0 18 12 0020BBF8 21 @@ -1614,19 +2057,34 @@ 12 0020BC28 57 13 0015EF4C 4 13 0015EF58 12 +13 0015EF60 8 +13 0015F1A8 8 +13 0015F1E0 4 +13 0015F1FC 4 13 0015F340 179 +13 0015F4A8 187 +13 0015F570 4 13 0015F5AC 4 13 0015F5FC 4 +13 0015F634 4 13 0015F640 12 +13 0015F650 4 13 0015F748 8 +13 0015F968 4 13 0015FAF8 14 13 0015FC30 75 +13 0015FDE4 4 +13 0015FE38 14 +13 0015FE48 4 +13 0015FF28 4 13 0015FF30 21 13 0015FF80 12 13 0015FF90 10 13 0015FFA0 26 13 0015FFBC 4 +13 0015FFE4 4 13 00160004 8 +13 00160080 8 13 00160090 12 13 00160128 5 13 00160130 41 @@ -1637,11 +2095,15 @@ 13 001603A8 8 13 001603B0 10 13 001603C0 47 +13 00160420 8 13 00160470 27 13 00160490 8 13 001604B8 4 13 00160510 9 13 00160534 4 +13 00160580 12 +13 00160590 12 +13 001605E0 96 13 001607E0 16 13 00160910 16 13 00160920 16 @@ -1649,10 +2111,12 @@ 13 00160F30 27 13 00160F84 4 13 00160FE4 4 +13 00161110 24 13 00161158 11 13 001611A0 4 13 001611C4 4 13 00161204 3 +13 00161220 4 13 001612D0 12 13 001612E0 4 13 00161338 14 @@ -1669,6 +2133,8 @@ 13 0016CAE0 64 13 0016CFC0 64 13 0016D000 64 +13 0016DB80 512 +13 0016DD80 512 13 0016E780 1024 13 0016ED40 512 13 00173340 44 @@ -1680,6 +2146,7 @@ 13 0017E830 80 13 00182D70 304 13 001847B0 20 +13 00184838 100 13 00186FC0 76 13 00196FC0 64 13 00197280 896 @@ -1691,11 +2158,16 @@ 13 001AFFE0 1152 13 001B0480 200 13 001B1B60 16 +13 001B26C0 56 +13 001B26F8 9176 +13 001B4AD0 112 +13 001B4B40 18656 13 001B9420 96 13 001B9498 588 13 001B96E8 1776 13 001B9FA0 80 13 001B9FF0 328 +13 001BA190 56 13 001BA2C0 448 13 001BA480 56 13 001BA4B8 40 @@ -1714,7 +2186,10 @@ 13 001C15A0 1080 13 001C2140 552 13 001C23B8 76 +13 001C27C0 48 +13 001C27F0 48 13 001C2BF0 64 +13 001C3200 48 13 001C47B8 80 13 001C5B00 768 13 001CA3B8 96 @@ -1722,6 +2197,7 @@ 13 001CA618 96 13 001CA7FC 4 13 001CAA20 64 +13 001F2510 48 13 001F3588 17 13 001F35A0 64 13 001F36F0 19 @@ -1731,6 +2207,7 @@ 13 001F3CE0 24 13 001F3E98 28 13 001F3F20 21 +13 001F3FA0 61 13 001F3FE0 71 13 001F4170 18 13 001F4188 21 @@ -1738,19 +2215,34 @@ 13 001F41B8 57 14 0015EF4C 4 14 0015EF58 12 +14 0015EF60 8 +14 0015F1A8 8 +14 0015F1E0 4 +14 0015F1FC 4 14 0015F340 179 +14 0015F4A8 187 +14 0015F570 4 14 0015F5AC 4 14 0015F5FC 4 +14 0015F634 4 14 0015F640 12 +14 0015F650 4 14 0015F748 8 +14 0015F968 4 14 0015FAF8 14 14 0015FC30 75 +14 0015FDE4 4 +14 0015FE38 14 +14 0015FE48 4 +14 0015FF28 4 14 0015FF30 21 14 0015FF80 12 14 0015FF90 10 14 0015FFA0 26 14 0015FFBC 4 +14 0015FFE4 4 14 00160004 8 +14 00160080 8 14 00160090 12 14 00160128 5 14 00160130 41 @@ -1761,11 +2253,15 @@ 14 001603A8 8 14 001603B0 10 14 001603C0 47 +14 00160420 8 14 00160470 27 14 00160490 8 14 001604B8 4 14 00160510 9 14 00160534 4 +14 00160580 12 +14 00160590 12 +14 001605E0 96 14 001607E0 16 14 00160910 16 14 00160920 16 @@ -1773,10 +2269,12 @@ 14 00160F30 27 14 00160F84 4 14 00160FE4 4 +14 00161110 24 14 00161158 11 14 001611A0 4 14 001611C4 4 14 00161204 3 +14 00161220 4 14 001612D0 12 14 001612E0 4 14 00161338 14 @@ -1793,6 +2291,8 @@ 14 0016CEE0 64 14 0016D3C0 64 14 0016D400 64 +14 0016DF80 512 +14 0016E180 512 14 0016EB80 1024 14 0016F140 512 14 00173740 44 @@ -1804,6 +2304,7 @@ 14 0017EC30 80 14 00183170 304 14 00184BB0 20 +14 00184C38 100 14 001873C0 76 14 001973C0 64 14 00197680 896 @@ -1815,11 +2316,16 @@ 14 001B03E0 1152 14 001B0880 200 14 001B1F60 16 +14 001B2AC0 56 +14 001B2AF8 9176 +14 001B4ED0 112 +14 001B4F40 18656 14 001B9820 96 14 001B9898 588 14 001B9AE8 1776 14 001BA3A0 80 14 001BA3F0 328 +14 001BA590 56 14 001BA6C0 448 14 001BA880 56 14 001BA8B8 40 @@ -1838,7 +2344,10 @@ 14 001C19A0 1080 14 001C2540 552 14 001C27B8 76 +14 001C2BC0 48 +14 001C2BF0 48 14 001C2FF0 64 +14 001C3600 48 14 001C4BB8 80 14 001C5F00 768 14 001CA7B8 96 @@ -1846,6 +2355,7 @@ 14 001CAA18 96 14 001CABFC 4 14 001CAE20 64 +14 001F9DA0 48 14 001FAE68 17 14 001FAE80 64 14 001FAFD0 19 @@ -1855,6 +2365,7 @@ 14 001FB5C0 24 14 001FB778 28 14 001FB800 21 +14 001FB880 61 14 001FB8C0 71 14 001FBA50 18 14 001FBA68 21 @@ -1862,19 +2373,34 @@ 14 001FBA98 57 15 0015EF4C 4 15 0015EF58 12 +15 0015EF60 8 +15 0015F1A8 8 +15 0015F1E0 4 +15 0015F1FC 4 15 0015F340 179 +15 0015F4A8 187 +15 0015F570 4 15 0015F5AC 4 15 0015F5FC 4 +15 0015F634 4 15 0015F640 12 +15 0015F650 4 15 0015F748 8 +15 0015F968 4 15 0015FAF8 14 15 0015FC30 75 +15 0015FDE4 4 +15 0015FE38 14 +15 0015FE48 4 +15 0015FF28 4 15 0015FF30 21 15 0015FF80 12 15 0015FF90 10 15 0015FFA0 26 15 0015FFBC 4 +15 0015FFE4 4 15 00160004 8 +15 00160080 8 15 00160090 12 15 00160128 5 15 00160130 41 @@ -1885,11 +2411,15 @@ 15 001603A8 8 15 001603B0 10 15 001603C0 47 +15 00160420 8 15 00160470 27 15 00160490 8 15 001604B8 4 15 00160510 9 15 00160534 4 +15 00160580 12 +15 00160590 12 +15 001605E0 96 15 001607E0 16 15 00160910 16 15 00160920 16 @@ -1897,10 +2427,12 @@ 15 00160F30 27 15 00160F84 4 15 00160FE4 4 +15 00161110 24 15 00161158 11 15 001611A0 4 15 001611C4 4 15 00161204 3 +15 00161220 4 15 001612D0 12 15 001612E0 4 15 00161338 14 @@ -1917,6 +2449,8 @@ 15 0016CDE0 64 15 0016D2C0 64 15 0016D300 64 +15 0016DE80 512 +15 0016E080 512 15 0016EA80 1024 15 0016F040 512 15 00173640 44 @@ -1928,6 +2462,7 @@ 15 0017EB30 80 15 00183070 304 15 00184AB0 20 +15 00184B38 100 15 001872C0 76 15 001972C0 64 15 00197580 896 @@ -1939,11 +2474,16 @@ 15 001B02E0 1152 15 001B0780 200 15 001B1E60 16 +15 001B29C0 56 +15 001B29F8 9176 +15 001B4DD0 112 +15 001B4E40 18656 15 001B9720 96 15 001B9798 588 15 001B99E8 1776 15 001BA2A0 80 15 001BA2F0 328 +15 001BA490 56 15 001BA5C0 448 15 001BA780 56 15 001BA7B8 40 @@ -1962,7 +2502,10 @@ 15 001C18A0 1080 15 001C2440 552 15 001C26B8 76 +15 001C2AC0 48 +15 001C2AF0 48 15 001C2EF0 64 +15 001C3500 48 15 001C4AB8 80 15 001C5E00 768 15 001CA6B8 96 @@ -1970,6 +2513,7 @@ 15 001CA918 96 15 001CAAFC 4 15 001CAD20 64 +15 001E0610 48 15 001E16D8 17 15 001E16F0 64 15 001E1840 19 @@ -1979,6 +2523,7 @@ 15 001E1E30 24 15 001E1FE8 28 15 001E2070 21 +15 001E20F0 61 15 001E2130 71 15 001E22C0 18 15 001E22D8 21 @@ -1986,19 +2531,34 @@ 15 001E2308 57 16 0015EF4C 4 16 0015EF58 12 +16 0015EF60 8 +16 0015F1A8 8 +16 0015F1E0 4 +16 0015F1FC 4 16 0015F340 179 +16 0015F4A8 187 +16 0015F570 4 16 0015F5AC 4 16 0015F5FC 4 +16 0015F634 4 16 0015F640 12 +16 0015F650 4 16 0015F758 8 +16 0015F978 4 16 0015FB08 14 16 0015FC30 75 +16 0015FDE4 4 +16 0015FE38 14 +16 0015FE48 4 +16 0015FF28 4 16 0015FF30 21 16 0015FF80 12 16 0015FF90 10 16 0015FFA0 26 16 0015FFBC 4 +16 0015FFE4 4 16 00160004 8 +16 00160080 8 16 00160090 12 16 00160128 5 16 00160130 41 @@ -2009,11 +2569,15 @@ 16 001603A8 8 16 001603B0 10 16 001603C0 47 +16 00160420 8 16 00160470 27 16 00160490 8 16 001604B8 4 16 00160510 9 16 00160534 4 +16 00160580 12 +16 00160590 12 +16 001605E0 96 16 001607E0 16 16 00160910 16 16 00160920 16 @@ -2021,10 +2585,12 @@ 16 00160F30 27 16 00160F84 4 16 00160FE4 4 +16 00161110 24 16 00161158 11 16 001611A0 4 16 001611C4 4 16 00161204 3 +16 00161220 4 16 001612D0 12 16 001612E0 4 16 00161338 14 @@ -2041,6 +2607,8 @@ 16 0016CBE0 64 16 0016D0C0 64 16 0016D100 64 +16 0016DC80 512 +16 0016DE80 512 16 0016E880 1024 16 0016EE40 512 16 00173440 44 @@ -2052,6 +2620,7 @@ 16 0017E9B0 80 16 00182EF0 304 16 00184930 20 +16 001849B8 100 16 00187140 76 16 00197140 64 16 00197400 896 @@ -2063,11 +2632,16 @@ 16 001B0160 1152 16 001B0600 200 16 001B1CE0 16 +16 001B2840 56 +16 001B2878 9176 +16 001B4C50 112 +16 001B4CC0 18656 16 001B95A0 96 16 001B9618 588 16 001B9868 1776 16 001BA120 80 16 001BA170 328 +16 001BA310 56 16 001BA440 448 16 001BA600 56 16 001BA638 40 @@ -2086,7 +2660,10 @@ 16 001C1720 1080 16 001C22C0 552 16 001C2538 76 +16 001C2940 48 +16 001C2970 48 16 001C2D70 64 +16 001C3380 48 16 001C4938 80 16 001C5C80 768 16 001CA538 96 @@ -2094,6 +2671,7 @@ 16 001CA798 96 16 001CA97C 4 16 001CABA0 64 +16 001E5D00 48 16 001E6DE8 17 16 001E6E00 64 16 001E6F50 19 @@ -2103,6 +2681,7 @@ 16 001E7540 24 16 001E76F8 28 16 001E7780 21 +16 001E7800 61 16 001E7840 71 16 001E79D0 18 16 001E79E8 21 @@ -2110,19 +2689,34 @@ 16 001E7A18 57 17 0015EF4C 4 17 0015EF58 12 +17 0015EF60 8 +17 0015F1A8 8 +17 0015F1E0 4 +17 0015F1FC 4 17 0015F340 179 +17 0015F4A8 187 +17 0015F570 4 17 0015F5AC 4 17 0015F5FC 4 +17 0015F634 4 17 0015F640 12 +17 0015F650 4 17 0015F748 8 +17 0015F968 4 17 0015FAF8 14 17 0015FC30 75 +17 0015FDE4 4 +17 0015FE38 14 +17 0015FE48 4 +17 0015FF28 4 17 0015FF30 21 17 0015FF80 12 17 0015FF90 10 17 0015FFA0 26 17 0015FFBC 4 +17 0015FFE4 4 17 00160004 8 +17 00160080 8 17 00160090 12 17 00160128 5 17 00160130 41 @@ -2133,11 +2727,15 @@ 17 001603A8 8 17 001603B0 10 17 001603C0 47 +17 00160420 8 17 00160470 27 17 00160490 8 17 001604B8 4 17 00160510 9 17 00160534 4 +17 00160580 12 +17 00160590 12 +17 001605E0 96 17 001607E0 16 17 00160910 16 17 00160920 16 @@ -2145,10 +2743,12 @@ 17 00160F30 27 17 00160F84 4 17 00160FE4 4 +17 00161110 24 17 00161158 11 17 001611A0 4 17 001611C4 4 17 00161204 3 +17 00161220 4 17 001612D0 12 17 001612E0 4 17 00161338 14 @@ -2165,6 +2765,8 @@ 17 0016D0E0 64 17 0016D5C0 64 17 0016D600 64 +17 0016E180 512 +17 0016E380 512 17 0016ED80 1024 17 0016F340 512 17 00173940 44 @@ -2176,6 +2778,7 @@ 17 0017EE30 80 17 00183370 304 17 00184DB0 20 +17 00184E38 100 17 001875C0 76 17 001975C0 64 17 00197880 896 @@ -2187,11 +2790,16 @@ 17 001B05E0 1152 17 001B0A80 200 17 001B2160 16 +17 001B2CC0 56 +17 001B2CF8 9176 +17 001B50D0 112 +17 001B5140 18656 17 001B9A20 96 17 001B9A98 588 17 001B9CE8 1776 17 001BA5A0 80 17 001BA5F0 328 +17 001BA790 56 17 001BA8C0 448 17 001BAA80 56 17 001BAAB8 40 @@ -2210,7 +2818,10 @@ 17 001C1BA0 1080 17 001C2740 552 17 001C29B8 76 +17 001C2DC0 48 +17 001C2DF0 48 17 001C31F0 64 +17 001C3800 48 17 001C4DB8 80 17 001C6100 768 17 001CA9B8 96 @@ -2218,6 +2829,7 @@ 17 001CAC18 96 17 001CADFC 4 17 001CB020 64 +17 001E4460 48 17 001E54D8 17 17 001E54F0 64 17 001E5640 19 @@ -2227,6 +2839,7 @@ 17 001E5C30 24 17 001E5DE8 28 17 001E5E70 21 +17 001E5EF0 61 17 001E5F30 71 17 001E60C0 18 17 001E60D8 21 @@ -2234,19 +2847,34 @@ 17 001E6108 57 18 0015EF4C 4 18 0015EF58 12 +18 0015EF60 8 +18 0015F1A8 8 +18 0015F1E0 4 +18 0015F1FC 4 18 0015F340 179 +18 0015F4A8 187 +18 0015F570 4 18 0015F5AC 4 18 0015F5FC 4 +18 0015F634 4 18 0015F640 12 +18 0015F650 4 18 0015F748 8 +18 0015F968 4 18 0015FAF8 14 18 0015FC30 75 +18 0015FDE4 4 +18 0015FE38 14 +18 0015FE48 4 +18 0015FF28 4 18 0015FF30 21 18 0015FF80 12 18 0015FF90 10 18 0015FFA0 26 18 0015FFBC 4 +18 0015FFE4 4 18 00160004 8 +18 00160080 8 18 00160090 12 18 00160128 5 18 00160130 41 @@ -2257,11 +2885,15 @@ 18 001603A8 8 18 001603B0 10 18 001603C0 47 +18 00160420 8 18 00160470 27 18 00160490 8 18 001604B8 4 18 00160510 9 18 00160534 4 +18 00160580 12 +18 00160590 12 +18 001605E0 96 18 001607E0 16 18 00160910 16 18 00160920 16 @@ -2269,10 +2901,12 @@ 18 00160F30 27 18 00160F84 4 18 00160FE4 4 +18 00161110 24 18 00161158 11 18 001611A0 4 18 001611C4 4 18 00161204 3 +18 00161220 4 18 001612D0 12 18 001612E0 4 18 00161338 14 @@ -2289,6 +2923,8 @@ 18 0016D1E0 64 18 0016D6C0 64 18 0016D700 64 +18 0016E280 512 +18 0016E480 512 18 0016EE80 1024 18 0016F440 512 18 00173A40 44 @@ -2300,6 +2936,7 @@ 18 0017EF30 80 18 00183470 304 18 00184EB0 20 +18 00184F38 100 18 001876C0 76 18 001976C0 64 18 00197980 896 @@ -2311,11 +2948,16 @@ 18 001B06E0 1152 18 001B0B80 200 18 001B2260 16 +18 001B2DC0 56 +18 001B2DF8 9176 +18 001B51D0 112 +18 001B5240 18656 18 001B9B20 96 18 001B9B98 588 18 001B9DE8 1776 18 001BA6A0 80 18 001BA6F0 328 +18 001BA890 56 18 001BA9C0 448 18 001BAB80 56 18 001BABB8 40 @@ -2334,7 +2976,10 @@ 18 001C1CA0 1080 18 001C2840 552 18 001C2AB8 76 +18 001C2EC0 48 +18 001C2EF0 48 18 001C32F0 64 +18 001C3900 48 18 001C4EB8 80 18 001C6200 768 18 001CAAB8 96 @@ -2342,6 +2987,7 @@ 18 001CAD18 96 18 001CAEFC 4 18 001CB120 64 +18 001F0180 48 18 001F1248 17 18 001F1260 64 18 001F13B0 19 @@ -2351,6 +2997,7 @@ 18 001F19A0 24 18 001F1B58 28 18 001F1BE0 21 +18 001F1C60 61 18 001F1CA0 71 18 001F1E30 18 18 001F1E48 21 diff --git a/scripts/lib/overlay_exe_data.py b/scripts/lib/overlay_exe_data.py index a63104cf96..ef90aa8a08 100644 --- a/scripts/lib/overlay_exe_data.py +++ b/scripts/lib/overlay_exe_data.py @@ -10,7 +10,7 @@ from __future__ import annotations import ast -from collections import defaultdict +from collections import Counter, defaultdict from functools import lru_cache import rnc_overlays as ov @@ -76,9 +76,23 @@ def deltas() -> dict[int, dict[int, set[int]]]: return out -def _delta(level: int, start: int, size: int) -> int | None: - found = {d for a, ds in deltas().get(level, {}).items() if start <= a < start + size for d in ds} - return found.pop() if len(found) == 1 else None +def _candidates(level: int, start: int, size: int) -> list[int]: + """The deltas the level's code reads [start, start + size) at, most + votes first, then its neighbours': a stale %hi pairs with a later %lo + now and then and adds a false one, so each is tried and the bytes decide.""" + moved = deltas().get(level, {}) + votes: Counter = Counter() + for a, ds in moved.items(): + if start <= a < start + size: + votes.update(ds) + out = [d for d, _n in votes.most_common()] + # data no copied function reads moves with its neighbours + below = [a for a in moved if a < start] + above = [a for a in moved if a >= start + size] + for near in (max(below, default=None), min(above, default=None)): + if near is not None: + out += sorted(moved[near] - set(out)) + return out def proven_copies() -> set[tuple[int, int, int]]: @@ -88,20 +102,50 @@ def proven_copies() -> set[tuple[int, int, int]]: for _unit, vma, size in c_data_entries(): mine = boot_bytes(vma, size) for level in ov.level_ids(): - d = _delta(level, vma, size) - if d is None: - continue - theirs = ov.level_data_bytes(level, vma + d, size) - if theirs is None: - continue - if theirs == mine or _pointers_match(level, mine, theirs, d, places.get(level, {})): - out.add((level, vma + d, size)) + for d in _candidates(level, vma, size): + theirs = ov.level_data_bytes(level, vma + d, size) + if theirs is None: + continue + if theirs == mine or _pointers_match(level, mine, theirs, d, places.get(level, {})): + out.add((level, vma + d, size)) + break return out +def _moved(level: int, a: int, b: int) -> bool: + """The level's code reads the executable's data at A at B, or A lies + between two addresses its code moves by the same amount.""" + moved = deltas().get(level, {}) + if b - a in moved.get(a, ()): + return True + below = [x for x in moved if x < a] + above = [x for x in moved if x > a] + if not below or not above: + return False + return moved[max(below)] == moved[min(above)] == {b - a} + + +SAME_SHAPE = {0x03, 0x09, 0x0D, 0x0F} | set(range(0x20, 0x40)) # jal, addiu, ori, lui, loads/stores + + +def _same_code(level: int, a: int, b: int, name: str) -> bool: + """The level's catalogued function NAME at B is the executable's code at + A: the same instructions, only call targets and %hi/%lo halves moved.""" + size = ov.read_catalogue()[name].size + mine, theirs = boot_bytes(a, size), ov.level_text_bytes(level, b, size) + for w, v in zip(ov.words(mine), ov.words(theirs)): + if w == v: + continue + if w >> 26 != v >> 26 or w >> 26 not in SAME_SHAPE: + return False + if w >> 26 != 0x03 and w >> 16 != v >> 16: + return False + return True + + def _pointers_match(level: int, mine: bytes, theirs: bytes, d: int, code: dict[int, str]) -> bool: - """Every differing word is a pointer the level moved: data by D, a - function to its copy in this level.""" + """Every differing word is a pointer the level moved: data by D (or as + its code reads it), a function to its copy in this level.""" if len(mine) % 4: return False for i in range(0, len(mine), 4): @@ -109,10 +153,12 @@ def _pointers_match(level: int, mine: bytes, theirs: bytes, d: int, code: dict[i b = int.from_bytes(theirs[i:i + 4], "little") if a == b: continue - if DATA_LOW <= a < DATA_HIGH and b == a + d: + if DATA_LOW <= a < DATA_HIGH and (b == a + d or _moved(level, a, b)): continue row = ov.read_catalogue().get(f"FUN_{a:08x}") if row is not None and b in {p for lv, p in row.places if lv == level}: continue + if a >= DATA_HIGH and b in code and _same_code(level, a, b, code[b]): + continue return False return True From ee44db212c656d9aec5c125c4daaad313215aa15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:37:53 +0000 Subject: [PATCH 069/213] decomp: define the mission and map icon lists in C --- config/us/levels/exe_data.tsv | 38 +- configure.py | 2 +- include/rnc/game/missions/mission_item.h | 47 ++ src/game/missions/check_mission_condition.c | 13 +- src/game/missions/update_mission_list.c | 27 +- src/ui/map/update_map_icons.c | 851 +++++++++++++++++++- 6 files changed, 901 insertions(+), 77 deletions(-) create mode 100644 include/rnc/game/missions/mission_item.h diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index 000be3a3a8..c49c28c4bd 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -93,7 +93,7 @@ 00 00182A70 304 00 001844B0 20 00 00184538 100 -00 00186CC0 76 +00 001849C0 9036 00 00196CC0 64 00 00196F80 896 00 00197300 4288 @@ -251,7 +251,7 @@ 01 00182EF0 304 01 00184930 20 01 001849B8 100 -01 00187140 76 +01 00184E40 9036 01 00197140 64 01 00197400 896 01 00197780 4288 @@ -409,7 +409,7 @@ 02 00183070 304 02 00184AB0 20 02 00184B38 100 -02 001872C0 76 +02 00184FC0 9036 02 001972C0 64 02 00197580 896 02 00197900 4288 @@ -567,7 +567,7 @@ 03 00182B70 304 03 001845B0 20 03 00184638 100 -03 00186DC0 76 +03 00184AC0 9036 03 00196DC0 64 03 00197080 896 03 00197400 4288 @@ -725,7 +725,7 @@ 04 00182BF0 304 04 00184630 20 04 001846B8 100 -04 00186E40 76 +04 00184B40 9036 04 00196E40 64 04 00197100 896 04 00197480 4288 @@ -883,7 +883,7 @@ 05 00182EF0 304 05 00184930 20 05 001849B8 100 -05 00187140 76 +05 00184E40 9036 05 00197140 64 05 00197400 896 05 00197780 4288 @@ -1041,7 +1041,7 @@ 06 001831F0 304 06 00184C30 20 06 00184CB8 100 -06 00187440 76 +06 00185140 9036 06 00197440 64 06 00197700 896 06 00197A80 4288 @@ -1199,7 +1199,7 @@ 07 00182AF0 304 07 00184530 20 07 001845B8 100 -07 00186D40 76 +07 00184A40 9036 07 00196D40 64 07 00197000 896 07 00197380 4288 @@ -1357,7 +1357,7 @@ 08 00183270 304 08 00184CB0 20 08 00184D38 100 -08 001874C0 76 +08 001851C0 9036 08 001974C0 64 08 00197780 896 08 00197B00 4288 @@ -1515,7 +1515,7 @@ 09 00182BF0 304 09 00184630 20 09 001846B8 100 -09 00186E40 76 +09 00184B40 9036 09 00196E40 64 09 00197100 896 09 00197480 4288 @@ -1673,7 +1673,7 @@ 10 00182EF0 304 10 00184930 20 10 001849B8 100 -10 00187140 76 +10 00184E40 9036 10 00197140 64 10 00197400 896 10 00197780 4288 @@ -1831,7 +1831,7 @@ 11 00183470 304 11 00184EB0 20 11 00184F38 100 -11 001876C0 76 +11 001853C0 9036 11 001976C0 64 11 00197980 896 11 00197D00 4288 @@ -1989,7 +1989,7 @@ 12 00182EF0 304 12 00184930 20 12 001849B8 100 -12 00187140 76 +12 00184E40 9036 12 00197140 64 12 00197400 896 12 00197780 4288 @@ -2147,7 +2147,7 @@ 13 00182D70 304 13 001847B0 20 13 00184838 100 -13 00186FC0 76 +13 00184CC0 9036 13 00196FC0 64 13 00197280 896 13 00197600 4288 @@ -2305,7 +2305,7 @@ 14 00183170 304 14 00184BB0 20 14 00184C38 100 -14 001873C0 76 +14 001850C0 9036 14 001973C0 64 14 00197680 896 14 00197A00 4288 @@ -2463,7 +2463,7 @@ 15 00183070 304 15 00184AB0 20 15 00184B38 100 -15 001872C0 76 +15 00184FC0 9036 15 001972C0 64 15 00197580 896 15 00197900 4288 @@ -2621,7 +2621,7 @@ 16 00182EF0 304 16 00184930 20 16 001849B8 100 -16 00187140 76 +16 00184E40 9036 16 00197140 64 16 00197400 896 16 00197780 4288 @@ -2779,7 +2779,7 @@ 17 00183370 304 17 00184DB0 20 17 00184E38 100 -17 001875C0 76 +17 001852C0 9036 17 001975C0 64 17 00197880 896 17 00197C00 4288 @@ -2937,7 +2937,7 @@ 18 00183470 304 18 00184EB0 20 18 00184F38 100 -18 001876C0 76 +18 001853C0 9036 18 001976C0 64 18 00197980 896 18 00197D00 4288 diff --git a/configure.py b/configure.py index 6e49f66315..d27abdb068 100755 --- a/configure.py +++ b/configure.py @@ -1239,7 +1239,7 @@ "rendering/vu1/vu1_gs_regs_alt": (0x1DE3F0, 0xDF370, 48), # its GS register packet "rendering/vu1/vu1_tex_flush": (0x1DEE00, 0xDFD80, 48), # its GS register packet "ui/map/draw_map_overlay": (0x1E8068, 0xE8FE8, 17), # no map text - "ui/map/update_map_icons": (0x1A2BC0, 0xA3B40, 76), # icon list of each level + "ui/map/update_map_icons": (0x1A08C0, 0xA1840, 9036), # mission and map icon lists of each level "ui/menus/item_preview/draw_menu_preview_objects": (0x1D5020, 0xD5FA0, 96), # slot draw flags } diff --git a/include/rnc/game/missions/mission_item.h b/include/rnc/game/missions/mission_item.h new file mode 100644 index 0000000000..f3c086de08 --- /dev/null +++ b/include/rnc/game/missions/mission_item.h @@ -0,0 +1,47 @@ +#ifndef LOMBYTE_RNC_GAME_MISSIONS_MISSION_ITEM_H +#define LOMBYTE_RNC_GAME_MISSIONS_MISSION_ITEM_H + +#include "types.h" + +/* Kinds of check_mission_condition: what its operand names. */ +enum MissionCondition { + MISSION_CONDITION_ALWAYS_TRUE = 0, + MISSION_CONDITION_LEVEL_AVAILABLE = 1, + MISSION_CONDITION_ITEM_AVAILABLE = 2, + MISSION_CONDITION_ITEM_ACQUIRED = 3, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO = 4, + MISSION_CONDITION_UPGRADE_LEVEL_AT_LEAST_TWO = 5, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE = 6, + MISSION_CONDITION_CALLBACK_NONZERO = 7, /* operand: an int (*)(void) */ + MISSION_CONDITION_GOLD_BOLT_COLLECTED = 8, + MISSION_CONDITION_ALWAYS_FALSE = 9 +}; + +/* MissionItem.flags */ +#define MISSION_FLAG_HIDE_WHEN_DONE 0x1 /* collect_mission_ids skips it once done */ +#define MISSION_FLAG_UNCOUNTED 0x2 /* never listed or counted as open */ +#define MISSION_FLAG_NEEDS_VISIT 0x4 /* unavailable until the level is visited */ + +/* One mission of a level's list (mission_lists_by_level[level]); the list + ends at the first entry with id 0. update_mission_list fills state and + result, collect_mission_ids lists the texts. */ +struct MissionItem { + s16 id; /* 0x00: help text id of the mission */ + s16 kind1; /* 0x02: enum MissionCondition: the mission is open */ + s32 value1; /* 0x04 */ + s16 kind2; /* 0x08: enum MissionCondition: the mission is done */ + u8 padA[2]; + s32 value2; /* 0x0C */ + u16 flags; /* 0x10: MISSION_FLAG_* */ + s16 base; /* 0x12: collect_mission_ids reports base + result */ + s16 text_ids[4]; /* 0x14: help text by result (collect_mission_ids) */ + int (*callback)(); /* 0x1C: picks result (an int (*)(void) or int (*)(int)), may be null */ + void *arg; /* 0x20 */ + s16 state; /* 0x24: 0 closed, 1 open, 2 done */ + s16 result; /* 0x26 */ +}; /* size 0x28 */ + +/* The mission list of each level, read by update_mission_list. */ +extern struct MissionItem *mission_lists_by_level[20] __asm__("D_001A2B70"); + +#endif /* LOMBYTE_RNC_GAME_MISSIONS_MISSION_ITEM_H */ diff --git a/src/game/missions/check_mission_condition.c b/src/game/missions/check_mission_condition.c index 01402722e4..5ea31a738c 100644 --- a/src/game/missions/check_mission_condition.c +++ b/src/game/missions/check_mission_condition.c @@ -3,22 +3,11 @@ #include "rnc/data_labels.h" #include "rnc/game/level_state.h" #include "rnc/game/item_state.h" +#include "rnc/game/missions/mission_item.h" s32 check_mission_condition(s16 kind, s32 value) __asm__("FUN_0020baf0"); s32 check_mission_condition(s16 kind, s32 condition_operand) { - enum { - MISSION_CONDITION_ALWAYS_TRUE = 0, - MISSION_CONDITION_LEVEL_AVAILABLE = 1, - MISSION_CONDITION_ITEM_AVAILABLE = 2, - MISSION_CONDITION_ITEM_ACQUIRED = 3, - MISSION_CONDITION_UPGRADE_LEVEL_NONZERO = 4, - MISSION_CONDITION_UPGRADE_LEVEL_AT_LEAST_TWO = 5, - MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE = 6, - MISSION_CONDITION_CALLBACK_NONZERO = 7, - MISSION_CONDITION_GOLD_BOLT_COLLECTED = 8, - MISSION_CONDITION_ALWAYS_FALSE = 9 - }; switch (kind) { case MISSION_CONDITION_ALWAYS_TRUE: return 1; diff --git a/src/game/missions/update_mission_list.c b/src/game/missions/update_mission_list.c index 00853a9bb0..462ea7364c 100644 --- a/src/game/missions/update_mission_list.c +++ b/src/game/missions/update_mission_list.c @@ -1,28 +1,13 @@ #include "types.h" #include "rnc/ui/map/map_state.h" - -struct MenuItem { - s16 id; - s16 kind1; - s32 value1; - s16 kind2; - u8 padA[2]; - s32 value2; - u16 flags; - u8 pad12[0xA]; - s16 (*callback)(void *); - void *arg; - s16 state; - s16 result; -}; +#include "rnc/game/missions/mission_item.h" struct MenuState { - u8 pad0[0xC]; - s32 available; - struct MenuItem *items; + u8 pad0[0xC]; + s32 available; + struct MissionItem *items; }; -extern struct MenuItem *mission_lists_by_level[] __asm__("D_001A2B70"); extern struct MenuState D_001A2C10; #include "rnc/game/level_state.h" @@ -36,8 +21,8 @@ s32 update_mission_list(void) { MISSION_STATE_AVAILABLE = 1, MISSION_STATE_BOTH_CONDITIONS_MET = 2 }; - struct MenuItem *it; - struct MenuItem *items; + struct MissionItem *it; + struct MissionItem *items; items = mission_lists_by_level[level_map_selection.level]; D_001A2C10.items = items; diff --git a/src/ui/map/update_map_icons.c b/src/ui/map/update_map_icons.c index 838fec9d3f..983a51f523 100644 --- a/src/ui/map/update_map_icons.c +++ b/src/ui/map/update_map_icons.c @@ -8,6 +8,8 @@ #include "rnc/mobys/moby.h" #include "rnc/game/level_state.h" #include "rnc/ui/menus/menu_globals.h" +#include "rnc/game/missions/mission_item.h" +#include "rnc/world/level_id.h" /* Map screen icon refresh: places the fixed icons (-1..-9), projects the others through world_to_map_coords, then sizes each label box. */ @@ -30,27 +32,6 @@ extern struct { MapIconLink *links; } D_001A2C10; -/* Icon arrays of the levels, still in assembly. */ -extern struct MapIcon D_001A0910[]; -extern struct MapIcon D_001A0A28[]; -extern struct MapIcon D_001A0BE0[]; -extern struct MapIcon D_001A0E60[]; -extern struct MapIcon D_001A10E0[]; -extern struct MapIcon D_001A1270[]; -extern struct MapIcon D_001A14C8[]; -extern struct MapIcon D_001A1680[]; -extern struct MapIcon D_001A1860[]; -extern struct MapIcon D_001A1A18[]; -extern struct MapIcon D_001A1C20[]; -extern struct MapIcon D_001A1EC8[]; -extern struct MapIcon D_001A2148[]; -extern struct MapIcon D_001A22B0[]; -extern struct MapIcon D_001A2490[]; -extern struct MapIcon D_001A26C0[]; -extern struct MapIcon D_001A28C8[]; -extern struct MapIcon D_001A2A08[]; -extern struct MapIcon D_001A2AF8[]; - extern void world_to_map_coords(f32 x, f32 y, f32 *map_x, f32 *map_y, s32 level) __asm__("func_00208408"); extern void format_menu_item_text(s32 idx, char *dst) __asm__("func_00208280"); @@ -185,8 +166,830 @@ void update_map_icons(s32 level, s32 flag) { extern __typeof__(update_map_icons) func_0020BF90 __attribute__((alias("FUN_0020bf90"))); +/* The missions' callbacks and kind-7 conditions (src/game/missions). */ +extern int FUN_0020bd30(void); +extern int FUN_0020bd58(void); +extern int FUN_0020bd90(void); +extern int FUN_0020bdc0(void); +extern int FUN_0020bde8(void); +extern int FUN_0020be10(void); +extern int FUN_0020be38(void); +extern int FUN_0020bed8(void); +extern int FUN_0020bf08(void); +extern int is_item_available(int item_index) __asm__("FUN_0020be68"); +extern int get_map_point_mission_status(void) __asm__("FUN_0020be80"); +extern int get_morph_o_ray_status(void) __asm__("FUN_0020bf30"); +extern int has_hologuise(void) __asm__("FUN_0020bf58"); +extern int mission_get_hologuise_or_map_status(void) __asm__("FUN_0020bf68"); + +/* Each level's mission list, then its map icons, level by level. */ +struct MissionItem veldin1_missions[2] __asm__("D_001A08C0") = { + {0x53b2, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_KERWAN, 0, + 0x50, {0x53b1, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon veldin1_map_icons[2] __asm__("D_001A0910") = { + {-1, 0, 0, 0xe99a, 2}, + {0, 0, 4}, +}; + +struct MissionItem novalis_missions[5] __asm__("D_001A0960") = { + {0x5320, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_KERWAN, MISSION_FLAG_NEEDS_VISIT, + 0, {0x531d, 0, 0, 0}, + 0, 0}, + {0x5321, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 3, MISSION_FLAG_NEEDS_VISIT, + 1, {0x531e, 0, 0, 0}, + 0, 0}, + {0x5322, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 3, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_ARIDIA, 0, + 2, {0x531f, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_LEVEL_AVAILABLE, LEVEL_KERWAN, + MISSION_CONDITION_ALWAYS_FALSE, {0}, + 0, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon novalis_map_icons[5] __asm__("D_001A0A28") = { + {2, 3, 0, 0xe99a}, + {-2, 0, 0, 0xe99a, 2}, + {3, 1, 0, 0xe99a, 2}, + {3, 2, 0, 0xe99a, 4, 0x4ea0, 0x25, 0x84, 0x26, 0x4a}, + {0, 0, 4}, +}; + +struct MissionItem aridia_missions[6] __asm__("D_001A0AF0") = { + {0x5329, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x10, 0, + 3, {0x5323, 0, 0, 0}, + 0, 0}, + {0x532a, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x10, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 0x1e, 0, + 4, {0x5324, 0, 0, 0}, + 0, 0}, + {0x532b, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x11, 0, + 5, {0x5325, 0, 0, 0}, + 0, 0}, + {0x532c, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x11, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 5, 0, + 6, {0x5326, 0, 0, 0}, + 0, 0}, + {0x532d, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, 0x14, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 0x1a, 0, + 7, {0x5327, 0x5328, 0, 0}, + &is_item_available, + (void *)12}, + {0}, +}; + +struct MapIcon aridia_map_icons[7] __asm__("D_001A0BE0") = { + {0xf, -1, 0, 0xe99a}, + {0x10, 0, 0, 0xe99a, 2}, + {0x10, 1, 0x40, 0xea7e, 0, 0x4ea1, 0, 0x7d, 0x36, -0x50}, + {0x11, 2, 0, 0xe99a, 2}, + {0x11, 3, 0x40, 0xea65, 0, 0x4ea2, 0, 0x88, 0x36, 0x50}, + {0x12, 4, 0, 0xe99a, 2}, + {0, 0, 4}, +}; + +struct MissionItem kerwan_missions[9] __asm__("D_001A0CF8") = { + {0x5336, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x14, 0, + 9, {0x532e, 0, 0, 0}, + 0, 0}, + {0x5337, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x14, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 2, 0, + 0xa, {0x532f, 0, 0, 0}, + 0, 0}, + {0x5338, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_CALLBACK_NONZERO, {0}, + (s32)&FUN_0020bd30, + MISSION_FLAG_NEEDS_VISIT, 0xb, + {0x5330, 0x5331, 0x5332, 0}, + &get_map_point_mission_status, + 0}, + {0x5339, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, 0x18, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_EUDORA, 0, + 0xe, {0x5333, 0, 0, 0}, + 0, 0}, + {0x533a, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x18, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x15, 0, + 0xf, {0x5334, 0, 0, 0}, + 0, 0}, + {0x533b, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x15, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 0xc, 0, + 0x10, {0x5335, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x15, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_EUDORA, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon kerwan_map_icons[13] __asm__("D_001A0E60") = { + {0x16, -1, 0xb02, 0xe99a, 8}, + {0x1b, -1, 0x702, 0xe99a, 0xa}, + {0x1c, -1, 0x702, 0xe99a, 0xa}, + {0x1d, -1, 0x702, 0xe99a, 0xa}, + {0x1e, -1, 0x702, 0xe99a, 0xa}, + {0x1f, -1, 0x702, 0xe99a, 0xa}, + {0x13, -1, 0, 0xe99a}, + {0x14, 0, 0, 0xe99a, 2}, + {0x14, 1, 0x40, 0xea62, 0, 0x4ea3, 2, 0x84, 0x26, 0x50}, + {0x15, 6, 0, 0xe99a, 2}, + {0x15, 5, 0x40, 0xea6c, 0, 0x4ea4, 0xc, 0x80, 0x26, 0x50}, + {0x17, 7, 0, 0xe99a, 2}, + {0, 0, 4}, +}; + +struct MissionItem eudora_missions[3] __asm__("D_001A1068") = { + {0x533e, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_NEBULA_G34, 0, + 0x11, {0x533c, 0, 0, 0}, + 0, 0}, + {0x533f, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ITEM_ACQUIRED, {0}, + 9, MISSION_FLAG_NEEDS_VISIT, + 0x12, {0x533d, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon eudora_map_icons[4] __asm__("D_001A10E0") = { + {0x22, -1, 0, 0xe99a}, + {0x23, 1, 0, 0xe99a, 2}, + {-3, 0, 0, 0xe99a, 2}, + {0, 0, 4}, +}; + +struct MissionItem rilgar_missions[6] __asm__("D_001A1180") = { + {0x5344, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x26, MISSION_FLAG_HIDE_WHEN_DONE, + 0x13, {0x5340, 0, 0, 0}, + 0, 0}, + {0x5344, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x26, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, {0}, + 0, 0, + 0x13, {0x5340, 0, 0, 0}, + 0, 0}, + {0x5345, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x27, 0, + 0x14, {0x5341, 0, 0, 0}, + 0, 0}, + {0x5346, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x27, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_UMBRIS, 0, + 0x15, {0x5342, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x28, + MISSION_CONDITION_ITEM_ACQUIRED, {0}, + 0x17, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon rilgar_map_icons[7] __asm__("D_001A1270") = { + {0x25, -1, 0, 0xe99a}, + {0x26, 0, 0, 0xe99a, 2}, + {0x26, 1, 0x40, 0xeac8, 0, 0x4ea5, 0, 0x73, 0x26, 0x44}, + {0x27, 2, 0, 0xe99a, 2}, + {0x27, 3, 0x80, 0xe99a, 3, 0x4ea6, 0x26, 0x82, 0x26, -0x46}, + {0x28, 4, 0x40, 0xea77, 0, 0x4ea7, 0x17, 0x78, 0x26, 0x46}, + {0, 0, 4}, +}; + +struct MissionItem nebula_g34_missions[8] __asm__("D_001A1388") = { + {0x534d, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_CALLBACK_NONZERO, {0}, + (s32)&FUN_0020bd58, + 0, 0x17, + {0x5348, 0x5348, 0x5348, 0}, + &FUN_0020bed8, + 0}, + {0x534e, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x2f, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 0x1d, 0, + 0x1a, {0x5349, 0, 0, 0}, + 0, 0}, + {0x534f, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, 0x21, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, {0}, + 0x22, 0, + 0x1b, {0x534a, 0, 0, 0}, + 0, 0}, + {0x5350, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, 0x22, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, {0}, + 0x24, 0, + 0x1c, {0x534b, 0, 0, 0}, + 0, 0}, + {0x5351, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, 0x20, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 0x16, 0, + 0x1d, {0x534c, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, {0}, + 0x22, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x2f, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon nebula_g34_map_icons[7] __asm__("D_001A14C8") = { + {0x2e, -1, 0, 0xe99a}, + {0x2f, 6, 0, 0xe99a, 2}, + {0x2f, 1, 0x40, 0xea7d, 0, 0x4ea8, 0x1d, 0x8c, 0x28, -0x50}, + {-4, 5, 0, 0xe99a, 2}, + {-4, 3, 0, 0xe99a, 6, 0x4ea9, 0, 0x64, 0x26, 0, 0x1e}, + {0x31, 4, 0, 0xe99a, 2}, + {0, 0, 4}, +}; + +struct MissionItem umbris_missions[4] __asm__("D_001A15E0") = { + {0x5355, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, {0}, + 0x29, 0, + 0x1e, {0x5352, 0, 0, 0}, + 0, 0}, + {0x5356, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, 0x29, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x34, 0, + 0x1f, {0x5353, 0, 0, 0}, + 0, 0}, + {0x5357, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x34, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_BATALIA, 0, + 0x20, {0x5354, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon umbris_map_icons[4] __asm__("D_001A1680") = { + {0x32, -1, 0, 0xe99a}, + {0x33, 0, 0, 0xe99a, 2}, + {0x34, 1, 0, 0xe99a, 6, 0x4eaa, 0, 0x8c, 0x28, -0x50}, + {0, 0, 4}, +}; + +struct MissionItem batalia_missions[8] __asm__("D_001A1720") = { + {0x535f, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, {0}, + 0x2f, 0, + 0x21, {0x5358, 0, 0, 0}, + 0, 0}, + {0x5360, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, 0x2f, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x38, 0, + 0x22, {0x5359, 0, 0, 0}, + 0, 0}, + {0x5361, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x38, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_GASPAR, 0, + 0x23, {0x535a, 0, 0, 0}, + 0, 0}, + {0x5362, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x37, 0, + 0x24, {0x535b, 0, 0, 0}, + 0, 0}, + {0x5363, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x37, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_ORXON, 0, + 0x25, {0x535c, 0, 0, 0}, + 0, 0}, + {0x5364, + MISSION_CONDITION_LEVEL_AVAILABLE, LEVEL_ORXON, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x39, 0, + 0x26, {0x535d, 0, 0, 0}, + 0, 0}, + {0x5365, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x39, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 0x1b, 0, + 0x27, {0x535e, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon batalia_map_icons[9] __asm__("D_001A1860") = { + {0x36, -1, 0, 0xe99a}, + {0x37, 3, 0, 0xe99a, 2}, + {0x37, 4, 0, 0xe99a, 2}, + {0x38, 0, 0, 0xe99a, 2}, + {0x38, 1, 0, 0xe99a, 2}, + {0x38, 2, 0, 0xe99a, 4, 0x4eab, 0, 0x82, 0x22, 0x28, 0x4b}, + {0x39, 5, 0, 0xe99a, 2}, + {0x39, 6, 0x40, 0xea7b, 0, 0x4eac, 0, 0x74, 0x26, 0, 0x1e}, + {0, 0, 4}, +}; + +struct MissionItem gaspar_missions[2] __asm__("D_001A19C8") = { + {0x5368, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 7, 0, + 0x28, {0x5366, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon gaspar_map_icons[3] __asm__("D_001A1A18") = { + {0x3a, -1, 0, 0xe99a}, + {0x3b, 0, 0, 0xe99a, 2}, + {0, 0, 4}, +}; + +struct MissionItem orxon_missions[10] __asm__("D_001A1A90") = { + {0x5370, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 0x1c, 0, + 0x2a, {0x536a, 0, 0, 0}, + 0, 0}, + {0x5371, + MISSION_CONDITION_ITEM_AVAILABLE, 0x1c, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_POKITARU, 0, + 0x2b, {0x536b, 0, 0, 0}, + 0, 0}, + {0x5373, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_CALLBACK_NONZERO, {0}, + (s32)&FUN_0020bd90, + MISSION_FLAG_NEEDS_VISIT, 0x2c, + {0x536c, 0, 0, 0}, + 0, 0}, + {0x5372, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x3f, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_HOVEN, 0, + 0x2d, {0x536d, 0, 0, 0}, + 0, 0}, + {0x5374, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x40, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, {0}, + 4, 0, + 0x2e, {0x536e, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, 4, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, {0}, + 5, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_POKITARU, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ITEM_AVAILABLE, 6, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_HOVEN, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ITEM_AVAILABLE, 6, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x40, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon orxon_map_icons[8] __asm__("D_001A1C20") = { + {0x3c, -1, 0, 0xe99a}, + {0x3d, 0, 0, 0xe99a, 2}, + {0x3e, 6, 0, 0xe99a, 2}, + {0x3f, 7, 0, 0xe99a, 2}, + {0x40, 8, 0, 0xe99a, 2}, + {0x40, 4, 0x40, 0xeac9, 3, 0x4ead, 0x28, 0x70, 0x37, 0x50}, + {0x40, 5, 0x40, 0xeac9, 4, 0x4eae, 0x29, 0x70, 0x37, 0x50}, + {0, 0, 4}, +}; + +struct MissionItem pokitaru_missions[9] __asm__("D_001A1D60") = { + {0x537c, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_CALLBACK_NONZERO, {0}, + (s32)&FUN_0020bdc0, + 0, 0x30, + {0x5376, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x42, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0x537d, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x42, + MISSION_CONDITION_UPGRADE_LEVEL_AT_LEAST_TWO, {0}, + 0x42, 0, + 0x31, {0x5377, 0, 0, 0}, + 0, 0}, + {0x537e, + MISSION_CONDITION_UPGRADE_LEVEL_AT_LEAST_TWO, 0x42, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 3, 0, + 0x32, {0x5378, 0, 0, 0}, + 0, 0}, + {0x537f, + MISSION_CONDITION_ITEM_AVAILABLE, 3, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 6, 0, + 0x33, {0x5379, 0, 0, 0}, + 0, 0}, + {0x5380, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, 0x55, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x44, 0, + 0x34, {0x537a, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x44, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0x5381, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x44, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 0x23, 0, + 0x35, {0x537b, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon pokitaru_map_icons[10] __asm__("D_001A1EC8") = { + {0x41, -1, 0, 0xe99a}, + {0x42, 1, 0, 0xe99a, 2}, + {0x42, 2, 0x40, 0xea66, 0, 0x4eaf, 0, 0x84, 0x26, 0x50}, + {0x42, 4, 0x40, 0xea66, 0, 0x4eb0, 0, 0x84, 0x26, 0x50}, + {0x43, 1, 0, 0xe99a, 2}, + {0x43, 2, 0, 0xe99a, 2}, + {0x43, 3, 0x40, 0xea63, 0, 0x4eb1, 0, 0xa0, 0x26, 0x5a}, + {0x44, 6, 0, 0xe99a, 2}, + {0x44, 7, 0x40, 0xeac9, 0, 0x4eb2, 0, 0x8c, 0x26, 0x50}, + {0, 0, 4}, +}; + +struct MissionItem hoven_missions[6] __asm__("D_001A2058") = { + {0x5385, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_OLTANIS_ORBIT, 0, + 0x36, {0x5382, 0, 0, 0}, + 0, 0}, + {0x5386, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_CALLBACK_NONZERO, {0}, + (s32)&FUN_0020bde8, + MISSION_FLAG_NEEDS_VISIT, 0x37, + {0x5383, 0x5383, 0, 0}, + &FUN_0020bf08, + 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x46, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0x5387, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x46, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 4, 0, + 0x39, {0x5384, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, {0}, + 0x61, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon hoven_map_icons[6] __asm__("D_001A2148") = { + {0x45, -1, 0, 0xe99a}, + {0x46, 2, 0, 0xe99a, 2}, + {0x46, 3, 0x40, 0xea62, 0, 0x4eb3, 4, 0x96, 0x26, 0x55}, + {0x49, 0, 0, 0xe99a, 2}, + {0x48, 4, 0, 0xe99a, 2}, + {0, 0, 4}, +}; + +struct MissionItem oltanis_orbit_missions[3] __asm__("D_001A2238") = { + {0x538a, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x4b, 0, + 0x3a, {0x5388, 0, 0, 0}, + 0, 0}, + {0x538b, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x4b, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_OLTANIS, 0, + 0x3b, {0x5389, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon oltanis_orbit_map_icons[4] __asm__("D_001A22B0") = { + {0x4a, -1, 0, 0xe99a}, + {0x4b, 0, 0, 0xe99a, 2}, + {-5, 1, 0, 0xe99a, 6, 0x538b, 0, 0x96, 0x26, 0x55}, + {0, 0, 4}, +}; + +struct MissionItem oltanis_missions[8] __asm__("D_001A2350") = { + {0x5390, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x58, 0, + 0x3c, {0x538c, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x58, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0x5391, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x58, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_QUARTU, 0, + 0x3d, {0x538d, 0, 0, 0}, + 0, 0}, + {0x5392, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_CALLBACK_NONZERO, {0}, + (s32)&FUN_0020be10, + 0, 0x3e, + {0x538e, 0x538e, 0x538e, 0}, + &get_morph_o_ray_status, + 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x57, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0x5393, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x57, + MISSION_CONDITION_ITEM_ACQUIRED, {0}, + 0x20, 0, + 0x41, {0x538f, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ITEM_ACQUIRED, {0}, + 0x15, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon oltanis_map_icons[7] __asm__("D_001A2490") = { + {0x56, -1, 0, 0xe99a}, + {0x58, 1, 0, 0xe99a, 2}, + {0x58, 2, 0, 0xe99a, 4, 0x4eb4, 0, 0x96, 0x26, 0x55}, + {0x57, 4, 0, 0xe99a, 2}, + {0x57, 5, 0, 0xe99a, 4, 0x4eb5, 0, 0x96, 0x26, 0x55}, + {0x59, 6, 0, 0xe99a, 2}, + {0, 0, 4}, +}; + +struct MissionItem quartu_missions[7] __asm__("D_001A25A8") = { + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_VELDIN_ORBIT, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0x539b, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x5e, 0, + 0x42, {0x5394, 0, 0, 0}, + 0, 0}, + {0x539c, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x5e, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_KALEBO3, 0, + 0x43, {0x5395, 0, 0, 0}, + 0, 0}, + {0x539e, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ITEM_ACQUIRED, {0}, + 0x22, MISSION_FLAG_NEEDS_VISIT, + 0x44, {0x5397, 0, 0, 0}, + 0, 0}, + {0x539f, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, 0x6e, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_VELDIN_ORBIT, 0, + 0x45, {0x5398, 0x5398, 0, 0}, + &has_hologuise, + 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ITEM_ACQUIRED, {0}, + 0x22, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon quartu_map_icons[6] __asm__("D_001A26C0") = { + {0x5d, -1, 0, 0xe99a}, + {0x5f, 0, 0, 0xe99a, 2}, + {0x5e, 1, 0, 0xe99a, 2}, + {0x5e, 2, 0, 0xe99a, 2, 0x4eb6, 0, 0x96, 0x26, 0x55}, + {0x60, 5, 0, 0xe99a, 2}, + {0, 0, 4}, +}; + +struct MissionItem kalebo3_missions[7] __asm__("D_001A27B0") = { + {0x53a7, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_CALLBACK_NONZERO, {0}, + (s32)&FUN_0020be38, + 0, 0x47, + {0x53a2, 0x53a2, 0x53a3, 0}, + &mission_get_hologuise_or_map_status, + 0}, + {0x53a8, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, 0x70, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x66, 0, + 0x4a, {0x53a4, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, {0}, + 0x66, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0x53a9, + MISSION_CONDITION_UPGRADE_LEVEL_NONZERO, 0x66, + MISSION_CONDITION_ITEM_AVAILABLE, {0}, + 0x1f, 0, + 0x4b, {0x53a5, 0, 0, 0}, + 0, 0}, + {0x53aa, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, 0x71, + MISSION_CONDITION_ITEM_ACQUIRED, {0}, + 0x21, 0, + 0x4c, {0x53a6, 0, 0, 0}, + 0, 0}, + {-1, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ITEM_ACQUIRED, {0}, + 0x21, MISSION_FLAG_UNCOUNTED, + 0, {0, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon kalebo3_map_icons[5] __asm__("D_001A28C8") = { + {0x64, -1, 0, 0xe99a}, + {0x66, 2, 0, 0xe99a, 2}, + {0x66, 3, 0, 0xea7f, 0, 0x4eb8, 0, 0x96, 0x26, 0x55}, + {0x65, 5, 0, 0xe99a, 2}, + {0, 0, 4}, +}; + +struct MissionItem veldin_orbit_missions[3] __asm__("D_001A2990") = { + {0x53ad, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_LEVEL_AVAILABLE, {0}, + LEVEL_VELDIN2, 0, + 0x4d, {0x53ab, 0, 0, 0}, + 0, 0}, + {0x53ae, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, {0}, + 0x78, MISSION_FLAG_NEEDS_VISIT, + 0x4e, {0x53ac, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon veldin_orbit_map_icons[4] __asm__("D_001A2A08") = { + {0x6b, -1, 0, 0xe99a}, + {-7, 0, 0, 0xe99a, 2}, + {-8, 1, 0, 0xe99a, 2}, + {0, 0, 4}, +}; + +struct MissionItem veldin2_missions[2] __asm__("D_001A2AA8") = { + {0x53b0, + MISSION_CONDITION_ALWAYS_TRUE, 0, + MISSION_CONDITION_ALTERNATE_ITEM_AVAILABLE, {0}, + 0x7d, 0, + 0x4f, {0x53af, 0, 0, 0}, + 0, 0}, + {0}, +}; + +struct MapIcon veldin2_map_icons[3] __asm__("D_001A2AF8") = { + {0x72, -1, 0, 0xe99a}, + {-9, 0, 0, 0xe99a, 2}, + {0, 0, 4}, +}; + +struct MissionItem *mission_lists_by_level[20] __asm__("D_001A2B70") = { + veldin1_missions, novalis_missions, aridia_missions, kerwan_missions, + eudora_missions, rilgar_missions, nebula_g34_missions, umbris_missions, + batalia_missions, gaspar_missions, orxon_missions, pokitaru_missions, + hoven_missions, oltanis_orbit_missions, oltanis_missions, quartu_missions, + kalebo3_missions, veldin_orbit_missions, veldin2_missions, +}; + struct MapIcon *map_icon_lists_by_level[19] __asm__("D_001A2BC0") = { - D_001A0910, D_001A0A28, D_001A0BE0, D_001A0E60, D_001A10E0, D_001A1270, D_001A14C8, - D_001A1680, D_001A1860, D_001A1A18, D_001A1C20, D_001A1EC8, D_001A2148, D_001A22B0, - D_001A2490, D_001A26C0, D_001A28C8, D_001A2A08, D_001A2AF8, + veldin1_map_icons, novalis_map_icons, aridia_map_icons, kerwan_map_icons, + eudora_map_icons, rilgar_map_icons, nebula_g34_map_icons, umbris_map_icons, + batalia_map_icons, gaspar_map_icons, orxon_map_icons, pokitaru_map_icons, + hoven_map_icons, oltanis_orbit_map_icons, oltanis_map_icons, quartu_map_icons, + kalebo3_map_icons, veldin_orbit_map_icons, veldin2_map_icons, }; From b928f4b2a95cf777d65b3beda4f772632849608c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:45:03 +0000 Subject: [PATCH 070/213] decomp: define the vendor sparkle mesh in C --- config/us/levels/data.tsv | 131 ++-- src/overlays/shared/vendor/vendor.c | 1023 +++++++++++++++++++++++---- 2 files changed, 970 insertions(+), 184 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 6eb704c8b7..106b84e73f 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -4080,7 +4080,10 @@ D_L00_001D4480 4800 D_L00_001D5740 2400 D_L00_001D60A0 2400 D_L00_001D6A00 2400 -D_L00_001D7460 4 +D_L00_001D7360 144 +D_L00_001D73F0 72 +D_L00_001D7438 40 +D_L00_001D7460 64 D_L00_001D9470 3136 D_L00_001DA0B0 1568 D_L00_001DA6D0 784 @@ -5075,9 +5078,10 @@ D_L01_001D4900 4800 D_L01_001D5BC0 2400 D_L01_001D6520 2400 D_L01_001D6E80 2400 -D_L01_001D77E0 4 -D_L01_001D7870 4 -D_L01_001D78E0 4 +D_L01_001D77E0 144 +D_L01_001D7870 72 +D_L01_001D78B8 40 +D_L01_001D78E0 64 D_L01_001D98F0 3136 D_L01_001DA530 1568 D_L01_001DAB50 784 @@ -6256,9 +6260,10 @@ D_L02_001CAB14 4 D_L02_001CAE80 24 D_L02_001CBDC0 32 D_L02_001CBDCC 2 -D_L02_001CBDE0 4 -D_L02_001CBE70 4 -D_L02_001CBEE0 4 +D_L02_001CBDE0 144 +D_L02_001CBE70 72 +D_L02_001CBEB8 40 +D_L02_001CBEE0 64 D_L02_001CDEF0 3136 D_L02_001CEB30 1568 D_L02_001CF150 784 @@ -7270,9 +7275,10 @@ D_L03_001CB4C8 4 D_L03_001CB4CC 4 D_L03_001CB8C0 32 D_L03_001CB8CC 2 -D_L03_001CB8E0 4 -D_L03_001CB970 4 -D_L03_001CB9E0 4 +D_L03_001CB8E0 144 +D_L03_001CB970 72 +D_L03_001CB9B8 40 +D_L03_001CB9E0 64 D_L03_001CD9F0 3136 D_L03_001CE630 1568 D_L03_001CEC50 784 @@ -8337,9 +8343,10 @@ D_L04_001CA668 4 D_L04_001CA694 4 D_L04_001CA938 52 D_L04_001CAA00 24 -D_L04_001CB960 4 -D_L04_001CB9F0 4 -D_L04_001CBA60 4 +D_L04_001CB960 144 +D_L04_001CB9F0 72 +D_L04_001CBA38 40 +D_L04_001CBA60 64 D_L04_001CDA70 3136 D_L04_001CE6B0 1568 D_L04_001CECD0 784 @@ -9476,9 +9483,10 @@ D_L05_001CB848 4 D_L05_001CB84C 4 D_L05_001CBC40 32 D_L05_001CBC4C 2 -D_L05_001CBC60 4 -D_L05_001CBCF0 4 -D_L05_001CBD60 4 +D_L05_001CBC60 144 +D_L05_001CBCF0 72 +D_L05_001CBD38 40 +D_L05_001CBD60 64 D_L05_001CDD70 32 D_L05_001CDD90 3136 D_L05_001CE9D0 1568 @@ -10659,9 +10667,10 @@ D_L06_001CAC94 4 D_L06_001CB000 24 D_L06_001CBF40 32 D_L06_001CBF4C 2 -D_L06_001CBF60 4 -D_L06_001CBFF0 4 -D_L06_001CC060 4 +D_L06_001CBF60 144 +D_L06_001CBFF0 72 +D_L06_001CC038 40 +D_L06_001CC060 64 D_L06_001CE070 3136 D_L06_001CECB0 1568 D_L06_001CF2D0 784 @@ -11753,9 +11762,10 @@ D_L07_001CB448 4 D_L07_001CB44C 4 D_L07_001CB840 32 D_L07_001CB84C 2 -D_L07_001CB860 4 -D_L07_001CB8F0 4 -D_L07_001CB960 4 +D_L07_001CB860 144 +D_L07_001CB8F0 72 +D_L07_001CB938 40 +D_L07_001CB960 64 D_L07_001CD970 3136 D_L07_001CE5B0 1568 D_L07_001CEBD0 784 @@ -12950,9 +12960,10 @@ D_L08_001CBBC8 4 D_L08_001CBBCC 4 D_L08_001CBFC0 32 D_L08_001CBFCC 2 -D_L08_001CBFE0 4 -D_L08_001CC070 4 -D_L08_001CC0E0 4 +D_L08_001CBFE0 144 +D_L08_001CC070 72 +D_L08_001CC0B8 40 +D_L08_001CC0E0 64 D_L08_001CE0F0 3136 D_L08_001CED30 1568 D_L08_001CF350 784 @@ -14198,9 +14209,10 @@ D_L09_001CB548 4 D_L09_001CB54C 4 D_L09_001CB940 32 D_L09_001CB94C 2 -D_L09_001CB960 4 -D_L09_001CB9F0 4 -D_L09_001CBA60 4 +D_L09_001CB960 144 +D_L09_001CB9F0 72 +D_L09_001CBA38 40 +D_L09_001CBA60 64 D_L09_001CDA70 3136 D_L09_001CE6B0 1568 D_L09_001CECD0 784 @@ -15535,9 +15547,10 @@ D_L10_001CA994 4 D_L10_001CAD00 24 D_L10_001CBC40 32 D_L10_001CBC4C 2 -D_L10_001CBC60 4 -D_L10_001CBCF0 4 -D_L10_001CBD60 4 +D_L10_001CBC60 144 +D_L10_001CBCF0 72 +D_L10_001CBD38 40 +D_L10_001CBD60 64 D_L10_001CDD70 3136 D_L10_001CE9B0 1568 D_L10_001CEFD0 784 @@ -16705,9 +16718,10 @@ D_L11_001CB380 2 D_L11_001CB560 4 D_L11_001CC1C0 32 D_L11_001CC1CC 2 -D_L11_001CC1E0 4 -D_L11_001CC270 4 -D_L11_001CC2E0 4 +D_L11_001CC1E0 144 +D_L11_001CC270 72 +D_L11_001CC2B8 40 +D_L11_001CC2E0 64 D_L11_001CE2F0 3136 D_L11_001CEF30 1568 D_L11_001CF550 784 @@ -17900,9 +17914,10 @@ D_L12_001CAE00 2 D_L12_001CAFE0 4 D_L12_001CBC40 32 D_L12_001CBC4C 2 -D_L12_001CBC60 4 -D_L12_001CBCF0 4 -D_L12_001CBD60 4 +D_L12_001CBC60 144 +D_L12_001CBCF0 72 +D_L12_001CBD38 40 +D_L12_001CBD60 64 D_L12_001E0990 3136 D_L12_001E15D0 1568 D_L12_001E1BF0 784 @@ -19001,9 +19016,10 @@ D_L13_001CAC80 2 D_L13_001CAE60 4 D_L13_001CBAC0 32 D_L13_001CBACC 2 -D_L13_001CBAE0 4 -D_L13_001CBB70 4 -D_L13_001CBBE0 4 +D_L13_001CBAE0 144 +D_L13_001CBB70 72 +D_L13_001CBBB8 40 +D_L13_001CBBE0 64 D_L13_001CE200 3136 D_L13_001CEE40 1568 D_L13_001CF460 784 @@ -20182,9 +20198,10 @@ D_L14_001D8210 328 D_L14_001D8600 64 D_L14_001D8640 64 D_L14_001D8680 80 -D_L14_001D86D0 4 -D_L14_001D8760 4 -D_L14_001D87D0 4 +D_L14_001D86D0 144 +D_L14_001D8760 72 +D_L14_001D87A8 40 +D_L14_001D87D0 64 D_L14_001D8890 64 D_L14_001D8890 64 D_L14_001D8890 64 @@ -21349,9 +21366,10 @@ D_L15_001CAB14 4 D_L15_001CAE80 24 D_L15_001CBDC0 32 D_L15_001CBDCC 2 -D_L15_001CBDE0 4 -D_L15_001CBE70 4 -D_L15_001CBEE0 4 +D_L15_001CBDE0 144 +D_L15_001CBE70 72 +D_L15_001CBEB8 40 +D_L15_001CBEE0 64 D_L15_001CBFA0 64 D_L15_001CE110 256 D_L15_001CE110 256 @@ -22453,9 +22471,10 @@ D_L16_001CA994 4 D_L16_001CAD00 24 D_L16_001CBC40 32 D_L16_001CBC4C 2 -D_L16_001CBC60 4 -D_L16_001CBCF0 4 -D_L16_001CBD60 4 +D_L16_001CBC60 144 +D_L16_001CBCF0 72 +D_L16_001CBD38 40 +D_L16_001CBD60 64 D_L16_001CDD70 3136 D_L16_001CE9B0 1568 D_L16_001CEFD0 784 @@ -23759,9 +23778,10 @@ D_L17_001CAE14 4 D_L17_001CB180 24 D_L17_001CC0C0 32 D_L17_001CC0CC 2 -D_L17_001CC0E0 4 -D_L17_001CC170 4 -D_L17_001CC1E0 4 +D_L17_001CC0E0 144 +D_L17_001CC170 72 +D_L17_001CC1B8 40 +D_L17_001CC1E0 64 D_L17_001CE390 256 D_L17_001CE490 32 D_L17_001CE570 64 @@ -24933,9 +24953,10 @@ D_L18_001CAF14 4 D_L18_001CB280 24 D_L18_001CC1C0 32 D_L18_001CC1CC 2 -D_L18_001CC1E0 4 -D_L18_001CC270 4 -D_L18_001CC2E0 4 +D_L18_001CC1E0 144 +D_L18_001CC270 72 +D_L18_001CC2B8 40 +D_L18_001CC2E0 64 D_L18_001CE2F0 3136 D_L18_001CEF30 1568 D_L18_001CF550 784 diff --git a/src/overlays/shared/vendor/vendor.c b/src/overlays/shared/vendor/vendor.c index a43abfd374..9341fe3273 100644 --- a/src/overlays/shared/vendor/vendor.c +++ b/src/overlays/shared/vendor/vendor.c @@ -90,10 +90,11 @@ typedef struct { extern LevelCamera l00_camera_lui __asm__("D_L00_00166C80") NOT_SDA; -extern float l00_vendor_sparkle_local_vertices[][4] __asm__("D_L00_001D7360"); -extern float l00_vendor_sparkle_base_uvs[][2] __asm__("D_L00_001D73F0"); -extern int vendor_sparkle_colors[] __asm__("D_L00_001D7438") NOT_SDA; -extern int vendor_sparkle_quad_corners[][4] __asm__("D_L00_001D7460"); +/* The sparkle fan: a 3x3 grid of vertices, rows at z 2.6, about 1.5 and 1.1. */ +extern float l00_vendor_sparkle_local_vertices[9][4] __asm__("D_L00_001D7360"); +extern float l00_vendor_sparkle_base_uvs[9][2] __asm__("D_L00_001D73F0"); +extern int vendor_sparkle_colors[10] __asm__("D_L00_001D7438") NOT_SDA; +extern int vendor_sparkle_quad_corners[4][4] __asm__("D_L00_001D7460"); float vendor_sparkle_uv_scroll __asm__("D_L00_00161394") = 0; float vendor_glow_phase __asm__("D_L00_00161398") = 0; void draw_offset_textured_effect_quad(void *, int, float, float) __asm__("FUN_L00_00263618"); @@ -424,128 +425,892 @@ void vendor_update(P_2a57a8 *vendor_moby) { } } -s32 D_L00_001D7460[1] __attribute__((section(".data"))) = {0}; - -s32 D_L01_001D78E0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L02_001CBEE0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L03_001CB9E0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L04_001CBA60[1] __attribute__((section(".data"))) = {0}; - -s32 D_L05_001CBD60[1] __attribute__((section(".data"))) = {0}; - -s32 D_L06_001CC060[1] __attribute__((section(".data"))) = {0}; - -s32 D_L07_001CB960[1] __attribute__((section(".data"))) = {0}; - -s32 D_L08_001CC0E0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L09_001CBA60[1] __attribute__((section(".data"))) = {0}; - -s32 D_L10_001CBD60[1] __attribute__((section(".data"))) = {0}; - -s32 D_L11_001CC2E0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L12_001CBD60[1] __attribute__((section(".data"))) = {0}; - -s32 D_L13_001CBBE0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L14_001D87D0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L15_001CBEE0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L16_001CBD60[1] __attribute__((section(".data"))) = {0}; - -s32 D_L17_001CC1E0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L18_001CC2E0[1] __attribute__((section(".data"))) = {0}; - -float D_L01_001D77E0 NOT_SDA = 0; -float D_L01_001D7870 NOT_SDA = 0; -float D_L01_00161394 = 0; -float D_L01_00161398 = 0; - -float D_L02_001CBDE0 NOT_SDA = 0; -float D_L02_001CBE70 NOT_SDA = 0; -float D_L02_00161368 = 0; -float D_L02_0016136C = 0; - -float D_L03_001CB8E0 NOT_SDA = 0; -float D_L03_001CB970 NOT_SDA = 0; -float D_L03_00161370 = 0; -float D_L03_00161374 = 0; -float D_L04_001CB960 NOT_SDA = 0; -float D_L04_001CB9F0 NOT_SDA = 0; -float D_L04_00161368 = 0; -float D_L04_0016136C = 0; - -float D_L05_001CBC60 NOT_SDA = 0; -float D_L05_001CBCF0 NOT_SDA = 0; -float D_L05_00161368 = 0; -float D_L05_0016136C = 0; - -float D_L06_001CBF60 NOT_SDA = 0; -float D_L06_001CBFF0 NOT_SDA = 0; -float D_L06_00161368 = 0; -float D_L06_0016136C = 0; - -float D_L07_001CB860 NOT_SDA = 0; -float D_L07_001CB8F0 NOT_SDA = 0; -float D_L07_00161368 = 0; -float D_L07_0016136C = 0; - -float D_L08_001CBFE0 NOT_SDA = 0; -float D_L08_001CC070 NOT_SDA = 0; -float D_L08_00161368 = 0; -float D_L08_0016136C = 0; - -float D_L09_001CB960 NOT_SDA = 0; -float D_L09_001CB9F0 NOT_SDA = 0; -float D_L09_001613D8 = 0; -float D_L09_001613DC = 0; - -float D_L10_001CBC60 NOT_SDA = 0; -float D_L10_001CBCF0 NOT_SDA = 0; -float D_L10_00161368 = 0; -float D_L10_0016136C = 0; - -float D_L11_001CC1E0 NOT_SDA = 0; -float D_L11_001CC270 NOT_SDA = 0; -float D_L11_00161368 = 0; -float D_L11_0016136C = 0; - -float D_L12_001CBC60 NOT_SDA = 0; -float D_L12_001CBCF0 NOT_SDA = 0; -float D_L12_00161368 = 0; -float D_L12_0016136C = 0; - -float D_L13_001CBAE0 NOT_SDA = 0; -float D_L13_001CBB70 NOT_SDA = 0; -float D_L13_00161368 = 0; -float D_L13_0016136C = 0; -float D_L14_001D86D0 NOT_SDA = 0; -float D_L14_001D8760 NOT_SDA = 0; -float D_L14_00161488 = 0; -float D_L14_0016148C = 0; - -float D_L15_001CBDE0 NOT_SDA = 0; -float D_L15_001CBE70 NOT_SDA = 0; -float D_L15_00161368 = 0; -float D_L15_0016136C = 0; - -float D_L16_001CBC60 NOT_SDA = 0; -float D_L16_001CBCF0 NOT_SDA = 0; -float D_L16_00161368 = 0; -float D_L16_0016136C = 0; - -float D_L17_001CC0E0 NOT_SDA = 0; -float D_L17_001CC170 NOT_SDA = 0; -float D_L17_00161368 = 0; -float D_L17_0016136C = 0; - -float D_L18_001CC1E0 NOT_SDA = 0; -float D_L18_001CC270 NOT_SDA = 0; -float D_L18_00161368 = 0; -float D_L18_0016136C = 0; +float D_L01_00161394 = 0; +float D_L01_00161398 = 0; + +float D_L02_00161368 = 0; +float D_L02_0016136C = 0; + +float D_L03_00161370 = 0; +float D_L03_00161374 = 0; +float D_L04_00161368 = 0; +float D_L04_0016136C = 0; + +float D_L05_00161368 = 0; +float D_L05_0016136C = 0; + +float D_L06_00161368 = 0; +float D_L06_0016136C = 0; + +float D_L07_00161368 = 0; +float D_L07_0016136C = 0; + +float D_L08_00161368 = 0; +float D_L08_0016136C = 0; + +float D_L09_001613D8 = 0; +float D_L09_001613DC = 0; + +float D_L10_00161368 = 0; +float D_L10_0016136C = 0; + +float D_L11_00161368 = 0; +float D_L11_0016136C = 0; + +float D_L12_00161368 = 0; +float D_L12_0016136C = 0; + +float D_L13_00161368 = 0; +float D_L13_0016136C = 0; +float D_L14_00161488 = 0; +float D_L14_0016148C = 0; + +float D_L15_00161368 = 0; +float D_L15_0016136C = 0; + +float D_L16_00161368 = 0; +float D_L16_0016136C = 0; + +float D_L17_00161368 = 0; +float D_L17_0016136C = 0; + +float D_L18_00161368 = 0; +float D_L18_0016136C = 0; + +/* The vendor sparkle mesh: vertices, texture coordinates and colours of the + 3x3 grid, then its four quads as corner indices. The same in every level. */ +float l00_vendor_sparkle_local_vertices[9][4] __asm__("D_L00_001D7360") = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float l00_vendor_sparkle_base_uvs[9][2] __asm__("D_L00_001D73F0") = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int vendor_sparkle_colors[10] __asm__("D_L00_001D7438") NOT_SDA = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int vendor_sparkle_quad_corners[4][4] __asm__("D_L00_001D7460") = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L01_001D77E0[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L01_001D7870[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L01_001D78B8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L01_001D78E0[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L02_001CBDE0[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L02_001CBE70[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L02_001CBEB8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L02_001CBEE0[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L03_001CB8E0[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L03_001CB970[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L03_001CB9B8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L03_001CB9E0[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L04_001CB960[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L04_001CB9F0[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L04_001CBA38[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L04_001CBA60[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L05_001CBC60[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L05_001CBCF0[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L05_001CBD38[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L05_001CBD60[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L06_001CBF60[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L06_001CBFF0[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L06_001CC038[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L06_001CC060[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L07_001CB860[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L07_001CB8F0[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L07_001CB938[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L07_001CB960[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L08_001CBFE0[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L08_001CC070[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L08_001CC0B8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L08_001CC0E0[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L09_001CB960[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L09_001CB9F0[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L09_001CBA38[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L09_001CBA60[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L10_001CBC60[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L10_001CBCF0[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L10_001CBD38[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L10_001CBD60[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L11_001CC1E0[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L11_001CC270[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L11_001CC2B8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L11_001CC2E0[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L12_001CBC60[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L12_001CBCF0[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L12_001CBD38[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L12_001CBD60[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L13_001CBAE0[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L13_001CBB70[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L13_001CBBB8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L13_001CBBE0[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L14_001D86D0[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L14_001D8760[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L14_001D87A8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L14_001D87D0[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L15_001CBDE0[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L15_001CBE70[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L15_001CBEB8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L15_001CBEE0[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L16_001CBC60[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L16_001CBCF0[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L16_001CBD38[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L16_001CBD60[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L17_001CC0E0[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L17_001CC170[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L17_001CC1B8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L17_001CC1E0[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L18_001CC1E0[9][4] = { + {0.0f, -1.0f, 2.6f, 0.0f}, + {0.0f, 0.0f, 2.6f, 0.0f}, + {0.0f, 1.0f, 2.6f, 0.0f}, + {0.0f, -0.3f, 1.4f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.3f, 1.4f, 0.0f}, + {0.0f, -0.05f, 1.1f, 0.0f}, + {0.0f, 0.0f, 1.1f, 0.0f}, + {0.0f, 0.05f, 1.1f, 0.0f}, +}; + +float D_L18_001CC270[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L18_001CC2B8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, /* top row: faint */ + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0x70808080, + 0, +}; + +int D_L18_001CC2E0[4][4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; From e957e1d224fbf6fc9fdc643ac62b89e7c2cbd731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:53:33 +0000 Subject: [PATCH 071/213] decomp: define the vendor item display and exit cutscene tables in C --- config/us/levels/data.tsv | 38 + src/overlays/shared/vendor/vendor_menu.c | 1374 +++++++++++++++++++++- 2 files changed, 1410 insertions(+), 2 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 106b84e73f..68fff3b778 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -4069,6 +4069,8 @@ D_L00_001B3D40 1812 D_L00_001B9DDC 4 D_L00_001BA620 3075 D_L00_001BB280 3075 +D_L00_001C9930 1776 +D_L00_001CA020 148 D_L00_001CA514 4 D_L00_001CB7E0 19200 D_L00_001D02E0 4800 @@ -5056,6 +5058,8 @@ D_L01_001C7380 1 D_L01_001C7B80 1 D_L01_001C8D80 4 D_L01_001C8DA0 4 +D_L01_001C9DB0 1776 +D_L01_001CA4A0 148 D_L01_001CA8D8 4 D_L01_001CA900 4 D_L01_001CA994 4 @@ -6249,6 +6253,8 @@ D_L02_001C7500 1 D_L02_001C7D00 1 D_L02_001C8F00 4 D_L02_001C8F20 4 +D_L02_001C9F30 1776 +D_L02_001CA620 148 D_L02_001CAA58 4 D_L02_001CAA80 4 D_L02_001CAAC0 532 @@ -7261,6 +7267,8 @@ D_L03_001C7000 1 D_L03_001C7800 1 D_L03_001C8A00 4 D_L03_001C8A20 4 +D_L03_001C9A30 1776 +D_L03_001CA120 148 D_L03_001CA558 4 D_L03_001CA580 4 D_L03_001CA5C0 532 @@ -8333,6 +8341,8 @@ D_L04_001C7080 1 D_L04_001C7880 1 D_L04_001C8A80 4 D_L04_001C8AA0 4 +D_L04_001C9AB0 1776 +D_L04_001CA1A0 148 D_L04_001CA5D8 4 D_L04_001CA600 4 D_L04_001CA640 532 @@ -9461,6 +9471,8 @@ D_L05_001C7380 1 D_L05_001C7B80 1 D_L05_001C8D80 4 D_L05_001C8DA0 4 +D_L05_001C9DB0 1776 +D_L05_001CA4A0 148 D_L05_001CA8D8 4 D_L05_001CA900 4 D_L05_001CA940 532 @@ -10656,6 +10668,8 @@ D_L06_001C7680 1 D_L06_001C7E80 1 D_L06_001C9080 4 D_L06_001C90A0 4 +D_L06_001CA0B0 1776 +D_L06_001CA7A0 148 D_L06_001CABD8 4 D_L06_001CAC00 4 D_L06_001CAC40 532 @@ -11739,6 +11753,8 @@ D_L07_001C6F80 1 D_L07_001C7780 1 D_L07_001C8980 4 D_L07_001C89A0 4 +D_L07_001C99B0 1776 +D_L07_001CA0A0 148 D_L07_001CA4D8 4 D_L07_001CA500 4 D_L07_001CA540 532 @@ -12946,6 +12962,8 @@ D_L08_001C7700 1 D_L08_001C7F00 1 D_L08_001C9100 4 D_L08_001C9120 4 +D_L08_001CA130 1776 +D_L08_001CA820 148 D_L08_001CAC58 4 D_L08_001CAC80 4 D_L08_001CACC0 532 @@ -14195,6 +14213,8 @@ D_L09_001C7080 1 D_L09_001C7880 1 D_L09_001C8A80 4 D_L09_001C8AA0 4 +D_L09_001C9AB0 1776 +D_L09_001CA1A0 148 D_L09_001CA5D8 4 D_L09_001CA600 4 D_L09_001CA640 532 @@ -15536,6 +15556,8 @@ D_L10_001C7380 1 D_L10_001C7B80 1 D_L10_001C8D80 4 D_L10_001C8DA0 4 +D_L10_001C9DB0 1776 +D_L10_001CA4A0 148 D_L10_001CA8D8 4 D_L10_001CA900 4 D_L10_001CA940 532 @@ -16703,6 +16725,8 @@ D_L11_001C7900 1 D_L11_001C8100 1 D_L11_001C9300 4 D_L11_001C9320 4 +D_L11_001CA330 1776 +D_L11_001CAA20 148 D_L11_001CAE58 4 D_L11_001CAE80 4 D_L11_001CAEC0 532 @@ -17900,6 +17924,8 @@ D_L12_001C7380 1 D_L12_001C7B80 1 D_L12_001C8D80 4 D_L12_001C8DA0 4 +D_L12_001C9DB0 1776 +D_L12_001CA4A0 148 D_L12_001CA8D8 4 D_L12_001CA900 4 D_L12_001CA940 532 @@ -18997,6 +19023,8 @@ D_L13_001C7200 1 D_L13_001C7A00 1 D_L13_001C8C00 4 D_L13_001C8C20 4 +D_L13_001C9C30 1776 +D_L13_001CA320 148 D_L13_001CA758 4 D_L13_001CA780 4 D_L13_001CA7C0 532 @@ -20167,6 +20195,8 @@ D_L14_001C7600 1 D_L14_001C7E00 1 D_L14_001C9000 4 D_L14_001C9020 4 +D_L14_001CA030 1776 +D_L14_001CA720 148 D_L14_001CAB58 4 D_L14_001CAB80 4 D_L14_001CABC0 532 @@ -21355,6 +21385,8 @@ D_L15_001C7500 1 D_L15_001C7D00 1 D_L15_001C8F00 4 D_L15_001C8F20 4 +D_L15_001C9F30 1776 +D_L15_001CA620 148 D_L15_001CAA58 4 D_L15_001CAA80 4 D_L15_001CAAC0 532 @@ -22460,6 +22492,8 @@ D_L16_001C7380 1 D_L16_001C7B80 1 D_L16_001C8D80 4 D_L16_001C8DA0 4 +D_L16_001C9DB0 1776 +D_L16_001CA4A0 148 D_L16_001CA8D8 4 D_L16_001CA900 4 D_L16_001CA940 532 @@ -23767,6 +23801,8 @@ D_L17_001C7800 1 D_L17_001C8000 1 D_L17_001C9200 4 D_L17_001C9220 4 +D_L17_001CA230 1776 +D_L17_001CA920 148 D_L17_001CAD58 4 D_L17_001CAD80 4 D_L17_001CADC0 532 @@ -24942,6 +24978,8 @@ D_L18_001C7900 1 D_L18_001C8100 1 D_L18_001C9300 4 D_L18_001C9320 4 +D_L18_001CA330 1776 +D_L18_001CAA20 148 D_L18_001CAE58 4 D_L18_001CAE80 4 D_L18_001CAEC0 532 diff --git a/src/overlays/shared/vendor/vendor_menu.c b/src/overlays/shared/vendor/vendor_menu.c index 3ffc0f9cac..d0058041aa 100644 --- a/src/overlays/shared/vendor/vendor_menu.c +++ b/src/overlays/shared/vendor/vendor_menu.c @@ -563,7 +563,7 @@ void close_vendor_menu(int exit_cutscene_completed) { snd_flush_sound_commands(); } -extern s32 vendor_exit_cutscene_ids_by_item[] __asm__("D_L00_001CA020"); +extern s32 vendor_exit_cutscene_ids_by_item[37] __asm__("D_L00_001CA020"); extern s32 vendor_exit_hero_local_offset_gp __asm__("D_L00_00161100") __attribute__((sda)); extern s32 vendor_exit_cutscene_local_offset_gp __asm__("D_L00_001610F0") __attribute__((sda)); @@ -865,7 +865,7 @@ typedef struct { extern VendorSound vendor_sound[] __asm__("D_L00_001C2108"); extern VendorItemSlot40 D_L00_001C8FF0[]; -extern VendorItemSlot30 l00_vendor_item_display_transform_parameters[] __asm__("D_L00_001C9930"); +extern VendorItemSlot30 l00_vendor_item_display_transform_parameters[37] __asm__("D_L00_001C9930"); extern u8 vendor_moby_update_label[] __asm__("D_L00_00161128"); extern u8 vendor_hero_update_label[] __asm__("D_L00_00161138"); extern u8 vendor_part_update_label[] __asm__("D_L00_00161148"); @@ -1621,3 +1621,1373 @@ void update_vendor_menu(void) { } FUN_0022ca50(); } + +/* Per item: where the vendor shows it (offsets, rotation, a position + offset), then the cutscene its purchase plays on leaving (-1 none). */ +VendorItemSlot30 l00_vendor_item_display_transform_parameters[37] __asm__("D_L00_001C9930") = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 vendor_exit_cutscene_ids_by_item[37] __asm__("D_L00_001CA020") = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L01_001C9DB0[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L01_001CA4A0[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L02_001C9F30[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L02_001CA620[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L03_001C9A30[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L03_001CA120[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L04_001C9AB0[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L04_001CA1A0[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L05_001C9DB0[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L05_001CA4A0[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L06_001CA0B0[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L06_001CA7A0[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L07_001C99B0[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L07_001CA0A0[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L08_001CA130[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L08_001CA820[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L09_001C9AB0[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L09_001CA1A0[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L10_001C9DB0[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L10_001CA4A0[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L11_001CA330[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L11_001CAA20[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L12_001C9DB0[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L12_001CA4A0[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L13_001C9C30[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L13_001CA320[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L14_001CA030[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L14_001CA720[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L15_001C9F30[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L15_001CA620[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L16_001C9DB0[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L16_001CA4A0[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L17_001CA230[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L17_001CA920[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; + +VendorItemSlot30 D_L18_001CA330[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, -0.04f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.15f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.25f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.5f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {-0.3f, 0.0f, 0.05f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 3.0f, 1.57f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.4f, 0.0f, {0}, 0.0f, -1.5707964f, {0}, {.f = {0.0f, 0.0f, 0.0f, 0.0f}}}, + {0.0f, 0.1f, 0.0f, {0}, 0.0f, 0.0f, {0}, {.f = {1.75f, 0.0f, 0.12f, 0.0f}}}, + {0.0f, 0.0f, 0.0f, {0}, 0.5235988f, 0.0f, {0}, {.f = {1.0f, -0.05f, 0.2f, 0.0f}}}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +s32 D_L18_001CAA20[37] = { + -1, /* item 0 */ + -1, /* item 1 */ + -1, /* item 2 */ + -1, /* item 3 */ + -1, /* item 4 */ + -1, /* item 5 */ + -1, /* item 6 */ + -1, /* item 7 */ + -1, /* item 8 */ + 7, /* item 9 */ + 0, /* item 10 */ + 10, /* item 11 */ + -1, /* item 12 */ + 13, /* item 13 */ + 9, /* item 14 */ + 8, /* item 15 */ + 5, /* item 16 */ + 1, /* item 17 */ + 11, /* item 18 */ + 12, /* item 19 */ + 2, /* item 20 */ + 6, /* item 21 */ + -1, /* item 22 */ + -1, /* item 23 */ + 3, /* item 24 */ + 4, /* item 25 */ + -1, /* item 26 */ + -1, /* item 27 */ + /* items 28..36: none */ +}; From ea0493cf5cb66ccf8ea516bb4bca202842397c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 14:57:20 +0000 Subject: [PATCH 072/213] decomp: format the mission item header --- include/rnc/game/missions/mission_item.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/rnc/game/missions/mission_item.h b/include/rnc/game/missions/mission_item.h index f3c086de08..d56039e033 100644 --- a/include/rnc/game/missions/mission_item.h +++ b/include/rnc/game/missions/mission_item.h @@ -31,14 +31,14 @@ struct MissionItem { s32 value1; /* 0x04 */ s16 kind2; /* 0x08: enum MissionCondition: the mission is done */ u8 padA[2]; - s32 value2; /* 0x0C */ - u16 flags; /* 0x10: MISSION_FLAG_* */ - s16 base; /* 0x12: collect_mission_ids reports base + result */ - s16 text_ids[4]; /* 0x14: help text by result (collect_mission_ids) */ + s32 value2; /* 0x0C */ + u16 flags; /* 0x10: MISSION_FLAG_* */ + s16 base; /* 0x12: collect_mission_ids reports base + result */ + s16 text_ids[4]; /* 0x14: help text by result (collect_mission_ids) */ int (*callback)(); /* 0x1C: picks result (an int (*)(void) or int (*)(int)), may be null */ - void *arg; /* 0x20 */ - s16 state; /* 0x24: 0 closed, 1 open, 2 done */ - s16 result; /* 0x26 */ + void *arg; /* 0x20 */ + s16 state; /* 0x24: 0 closed, 1 open, 2 done */ + s16 result; /* 0x26 */ }; /* size 0x28 */ /* The mission list of each level, read by update_mission_list. */ From 326ec7633f408558c30c811df2c148fe161d3e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:05:56 +0000 Subject: [PATCH 073/213] decomp: define the vendor hologram mesh in C --- config/us/levels/data.tsv | 112 +- .../shared/vendor/draw_vendor_inset_quads.c | 1079 ++++++++++++++--- 2 files changed, 1009 insertions(+), 182 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 68fff3b778..cea93a2319 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -4071,6 +4071,10 @@ D_L00_001BA620 3075 D_L00_001BB280 3075 D_L00_001C9930 1776 D_L00_001CA020 148 +D_L00_001CA380 144 +D_L00_001CA410 72 +D_L00_001CA458 40 +D_L00_001CA480 64 D_L00_001CA514 4 D_L00_001CB7E0 19200 D_L00_001D02E0 4800 @@ -5060,8 +5064,10 @@ D_L01_001C8D80 4 D_L01_001C8DA0 4 D_L01_001C9DB0 1776 D_L01_001CA4A0 148 -D_L01_001CA8D8 4 -D_L01_001CA900 4 +D_L01_001CA800 144 +D_L01_001CA890 72 +D_L01_001CA8D8 40 +D_L01_001CA900 64 D_L01_001CA994 4 D_L01_001CAD28 4 D_L01_001CAD2C 4 @@ -6255,8 +6261,10 @@ D_L02_001C8F00 4 D_L02_001C8F20 4 D_L02_001C9F30 1776 D_L02_001CA620 148 -D_L02_001CAA58 4 -D_L02_001CAA80 4 +D_L02_001CA980 144 +D_L02_001CAA10 72 +D_L02_001CAA58 40 +D_L02_001CAA80 64 D_L02_001CAAC0 532 D_L02_001CAAC8 4 D_L02_001CAAD8 4 @@ -7269,8 +7277,10 @@ D_L03_001C8A00 4 D_L03_001C8A20 4 D_L03_001C9A30 1776 D_L03_001CA120 148 -D_L03_001CA558 4 -D_L03_001CA580 4 +D_L03_001CA480 144 +D_L03_001CA510 72 +D_L03_001CA558 40 +D_L03_001CA580 64 D_L03_001CA5C0 532 D_L03_001CA5C8 4 D_L03_001CA5D8 4 @@ -8343,8 +8353,10 @@ D_L04_001C8A80 4 D_L04_001C8AA0 4 D_L04_001C9AB0 1776 D_L04_001CA1A0 148 -D_L04_001CA5D8 4 -D_L04_001CA600 4 +D_L04_001CA500 144 +D_L04_001CA590 72 +D_L04_001CA5D8 40 +D_L04_001CA600 64 D_L04_001CA640 532 D_L04_001CA648 4 D_L04_001CA658 4 @@ -9473,8 +9485,10 @@ D_L05_001C8D80 4 D_L05_001C8DA0 4 D_L05_001C9DB0 1776 D_L05_001CA4A0 148 -D_L05_001CA8D8 4 -D_L05_001CA900 4 +D_L05_001CA800 144 +D_L05_001CA890 72 +D_L05_001CA8D8 40 +D_L05_001CA900 64 D_L05_001CA940 532 D_L05_001CA948 4 D_L05_001CA958 4 @@ -10670,8 +10684,10 @@ D_L06_001C9080 4 D_L06_001C90A0 4 D_L06_001CA0B0 1776 D_L06_001CA7A0 148 -D_L06_001CABD8 4 -D_L06_001CAC00 4 +D_L06_001CAB00 144 +D_L06_001CAB90 72 +D_L06_001CABD8 40 +D_L06_001CAC00 64 D_L06_001CAC40 532 D_L06_001CAC48 4 D_L06_001CAC58 4 @@ -11755,8 +11771,10 @@ D_L07_001C8980 4 D_L07_001C89A0 4 D_L07_001C99B0 1776 D_L07_001CA0A0 148 -D_L07_001CA4D8 4 -D_L07_001CA500 4 +D_L07_001CA400 144 +D_L07_001CA490 72 +D_L07_001CA4D8 40 +D_L07_001CA500 64 D_L07_001CA540 532 D_L07_001CA548 4 D_L07_001CA558 4 @@ -12964,8 +12982,10 @@ D_L08_001C9100 4 D_L08_001C9120 4 D_L08_001CA130 1776 D_L08_001CA820 148 -D_L08_001CAC58 4 -D_L08_001CAC80 4 +D_L08_001CAB80 144 +D_L08_001CAC10 72 +D_L08_001CAC58 40 +D_L08_001CAC80 64 D_L08_001CACC0 532 D_L08_001CACC8 4 D_L08_001CACD8 4 @@ -14215,8 +14235,10 @@ D_L09_001C8A80 4 D_L09_001C8AA0 4 D_L09_001C9AB0 1776 D_L09_001CA1A0 148 -D_L09_001CA5D8 4 -D_L09_001CA600 4 +D_L09_001CA500 144 +D_L09_001CA590 72 +D_L09_001CA5D8 40 +D_L09_001CA600 64 D_L09_001CA640 532 D_L09_001CA648 4 D_L09_001CA658 4 @@ -15558,8 +15580,10 @@ D_L10_001C8D80 4 D_L10_001C8DA0 4 D_L10_001C9DB0 1776 D_L10_001CA4A0 148 -D_L10_001CA8D8 4 -D_L10_001CA900 4 +D_L10_001CA800 144 +D_L10_001CA890 72 +D_L10_001CA8D8 40 +D_L10_001CA900 64 D_L10_001CA940 532 D_L10_001CA948 4 D_L10_001CA958 4 @@ -16727,8 +16751,10 @@ D_L11_001C9300 4 D_L11_001C9320 4 D_L11_001CA330 1776 D_L11_001CAA20 148 -D_L11_001CAE58 4 -D_L11_001CAE80 4 +D_L11_001CAD80 144 +D_L11_001CAE10 72 +D_L11_001CAE58 40 +D_L11_001CAE80 64 D_L11_001CAEC0 532 D_L11_001CAEC8 4 D_L11_001CAED8 4 @@ -17926,8 +17952,10 @@ D_L12_001C8D80 4 D_L12_001C8DA0 4 D_L12_001C9DB0 1776 D_L12_001CA4A0 148 -D_L12_001CA8D8 4 -D_L12_001CA900 4 +D_L12_001CA800 144 +D_L12_001CA890 72 +D_L12_001CA8D8 40 +D_L12_001CA900 64 D_L12_001CA940 532 D_L12_001CA948 4 D_L12_001CA958 4 @@ -19025,8 +19053,10 @@ D_L13_001C8C00 4 D_L13_001C8C20 4 D_L13_001C9C30 1776 D_L13_001CA320 148 -D_L13_001CA758 4 -D_L13_001CA780 4 +D_L13_001CA680 144 +D_L13_001CA710 72 +D_L13_001CA758 40 +D_L13_001CA780 64 D_L13_001CA7C0 532 D_L13_001CA7C8 4 D_L13_001CA7D8 4 @@ -20197,8 +20227,10 @@ D_L14_001C9000 4 D_L14_001C9020 4 D_L14_001CA030 1776 D_L14_001CA720 148 -D_L14_001CAB58 4 -D_L14_001CAB80 4 +D_L14_001CAA80 144 +D_L14_001CAB10 72 +D_L14_001CAB58 40 +D_L14_001CAB80 64 D_L14_001CABC0 532 D_L14_001CABC8 4 D_L14_001CABD8 4 @@ -21387,8 +21419,10 @@ D_L15_001C8F00 4 D_L15_001C8F20 4 D_L15_001C9F30 1776 D_L15_001CA620 148 -D_L15_001CAA58 4 -D_L15_001CAA80 4 +D_L15_001CA980 144 +D_L15_001CAA10 72 +D_L15_001CAA58 40 +D_L15_001CAA80 64 D_L15_001CAAC0 532 D_L15_001CAAC8 4 D_L15_001CAAD8 4 @@ -22494,8 +22528,10 @@ D_L16_001C8D80 4 D_L16_001C8DA0 4 D_L16_001C9DB0 1776 D_L16_001CA4A0 148 -D_L16_001CA8D8 4 -D_L16_001CA900 4 +D_L16_001CA800 144 +D_L16_001CA890 72 +D_L16_001CA8D8 40 +D_L16_001CA900 64 D_L16_001CA940 532 D_L16_001CA948 4 D_L16_001CA958 4 @@ -23803,8 +23839,10 @@ D_L17_001C9200 4 D_L17_001C9220 4 D_L17_001CA230 1776 D_L17_001CA920 148 -D_L17_001CAD58 4 -D_L17_001CAD80 4 +D_L17_001CAC80 144 +D_L17_001CAD10 72 +D_L17_001CAD58 40 +D_L17_001CAD80 64 D_L17_001CADC0 532 D_L17_001CADC8 4 D_L17_001CADD8 4 @@ -24980,8 +25018,10 @@ D_L18_001C9300 4 D_L18_001C9320 4 D_L18_001CA330 1776 D_L18_001CAA20 148 -D_L18_001CAE58 4 -D_L18_001CAE80 4 +D_L18_001CAD80 144 +D_L18_001CAE10 72 +D_L18_001CAE58 40 +D_L18_001CAE80 64 D_L18_001CAEC0 532 D_L18_001CAEC8 4 D_L18_001CAED8 4 diff --git a/src/overlays/shared/vendor/draw_vendor_inset_quads.c b/src/overlays/shared/vendor/draw_vendor_inset_quads.c index 9294156f27..8f301465f0 100644 --- a/src/overlays/shared/vendor/draw_vendor_inset_quads.c +++ b/src/overlays/shared/vendor/draw_vendor_inset_quads.c @@ -195,15 +195,15 @@ struct HoloPacket { long hdr[4]; }; -extern float vendor_hologram_vertex_offsets[][4] __asm__("D_L00_001CA380"); -extern float vendor_hologram_vertex_uvs[][2] __asm__("D_L00_001CA410"); -extern int D_L00_001CA458[] NOT_SDA; +extern float vendor_hologram_vertex_offsets[9][4] __asm__("D_L00_001CA380"); +extern float vendor_hologram_vertex_uvs[9][2] __asm__("D_L00_001CA410"); +extern int vendor_hologram_vertex_colors[10] __asm__("D_L00_001CA458") NOT_SDA; extern VendorMenu vendor_menu_lui __asm__("D_L00_001CA4C0") NOT_SDA; #include "rnc/overlay/shared/vendor/draw_vendor_inset_quads_globals.h" float vendor_hologram_v_scroll_offset_gp __asm__("D_L00_00161184") = 0; -extern struct Quad D_L00_001CA480[] NOT_SDA; +extern struct Quad vendor_hologram_quads[4] __asm__("D_L00_001CA480") NOT_SDA; extern void fast_draw_quad_real(void *, void *, int) __asm__("FUN_001f7d30"); void draw_vendor_hologram_cone(void) __asm__("FUN_L00_0029ff58"); @@ -221,18 +221,18 @@ void draw_vendor_hologram_cone(void) { quad_packet.hdr[1] = get_effect_texture(0x18); for (i = 0; i < 4; i++) { transform_vector_by_basis(transformed_vertex_offsets[0], - vendor_hologram_vertex_offsets[D_L00_001CA480[i].a], + vendor_hologram_vertex_offsets[vendor_hologram_quads[i].a], (char *)vendor_menu_lui.vendor_moby + 0xC0); transform_vector_by_basis( transformed_vertex_offsets[1], - vendor_hologram_vertex_offsets[*(int *)((char *)D_L00_001CA480 + i * 16 + 4)], + vendor_hologram_vertex_offsets[*(int *)((char *)vendor_hologram_quads + i * 16 + 4)], (char *)vendor_menu_lui.vendor_moby + 0xC0); transform_vector_by_basis( transformed_vertex_offsets[2], - vendor_hologram_vertex_offsets[*(int *)((char *)D_L00_001CA480 + i * 16 + 8)], + vendor_hologram_vertex_offsets[*(int *)((char *)vendor_hologram_quads + i * 16 + 8)], (char *)vendor_menu_lui.vendor_moby + 0xC0); transform_vector_by_basis(transformed_vertex_offsets[3], - vendor_hologram_vertex_offsets[D_L00_001CA480[i].d], + vendor_hologram_vertex_offsets[vendor_hologram_quads[i].d], (char *)vendor_menu_lui.vendor_moby + 0xC0); quad_packet.pos[0][0] = *(float *)((char *)vendor_menu_lui.vendor_moby + 0x10) + transformed_vertex_offsets[0][0]; @@ -258,26 +258,28 @@ void draw_vendor_hologram_cone(void) { transformed_vertex_offsets[3][1]; quad_packet.pos[3][2] = *(float *)((char *)vendor_menu_lui.vendor_moby + 0x18) + transformed_vertex_offsets[3][2]; - quad_packet.col[0] = D_L00_001CA458[D_L00_001CA480[i].a]; - quad_packet.col[1] = D_L00_001CA458[*(int *)((char *)D_L00_001CA480 + i * 16 + 4)]; - quad_packet.col[2] = D_L00_001CA458[*(int *)((char *)D_L00_001CA480 + i * 16 + 8)]; - quad_packet.col[3] = D_L00_001CA458[D_L00_001CA480[i].d]; - quad_packet.uv[0][0] = vendor_hologram_vertex_uvs[D_L00_001CA480[i].a][0]; - quad_packet.uv[0][1] = - vendor_hologram_vertex_uvs[D_L00_001CA480[i].a][1] + vendor_hologram_v_scroll_offset_gp; + quad_packet.col[0] = vendor_hologram_vertex_colors[vendor_hologram_quads[i].a]; + quad_packet.col[1] = + vendor_hologram_vertex_colors[*(int *)((char *)vendor_hologram_quads + i * 16 + 4)]; + quad_packet.col[2] = + vendor_hologram_vertex_colors[*(int *)((char *)vendor_hologram_quads + i * 16 + 8)]; + quad_packet.col[3] = vendor_hologram_vertex_colors[vendor_hologram_quads[i].d]; + quad_packet.uv[0][0] = vendor_hologram_vertex_uvs[vendor_hologram_quads[i].a][0]; + quad_packet.uv[0][1] = vendor_hologram_vertex_uvs[vendor_hologram_quads[i].a][1] + + vendor_hologram_v_scroll_offset_gp; quad_packet.uv[1][0] = - vendor_hologram_vertex_uvs[*(int *)((char *)D_L00_001CA480 + i * 16 + 4)][0]; + vendor_hologram_vertex_uvs[*(int *)((char *)vendor_hologram_quads + i * 16 + 4)][0]; quad_packet.uv[1][1] = - vendor_hologram_vertex_uvs[*(int *)((char *)D_L00_001CA480 + i * 16 + 4)][1] + + vendor_hologram_vertex_uvs[*(int *)((char *)vendor_hologram_quads + i * 16 + 4)][1] + vendor_hologram_v_scroll_offset_gp; quad_packet.uv[2][0] = - vendor_hologram_vertex_uvs[*(int *)((char *)D_L00_001CA480 + i * 16 + 8)][0]; + vendor_hologram_vertex_uvs[*(int *)((char *)vendor_hologram_quads + i * 16 + 8)][0]; quad_packet.uv[2][1] = - vendor_hologram_vertex_uvs[*(int *)((char *)D_L00_001CA480 + i * 16 + 8)][1] + + vendor_hologram_vertex_uvs[*(int *)((char *)vendor_hologram_quads + i * 16 + 8)][1] + vendor_hologram_v_scroll_offset_gp; - quad_packet.uv[3][0] = vendor_hologram_vertex_uvs[D_L00_001CA480[i].d][0]; - quad_packet.uv[3][1] = - vendor_hologram_vertex_uvs[D_L00_001CA480[i].d][1] + vendor_hologram_v_scroll_offset_gp; + quad_packet.uv[3][0] = vendor_hologram_vertex_uvs[vendor_hologram_quads[i].d][0]; + quad_packet.uv[3][1] = vendor_hologram_vertex_uvs[vendor_hologram_quads[i].d][1] + + vendor_hologram_v_scroll_offset_gp; fast_draw_quad_real(&quad_packet, 0, 1); } } @@ -446,165 +448,950 @@ void draw_vendor_screen(void) { patch_moby_gifs(); } -s32 D_L01_001CA900[1] __attribute__((section(".data"))) = {0}; - -s32 D_L02_001CAA80[1] __attribute__((section(".data"))) = {0}; - s32 D_L02_001CAAC8[1] __attribute__((section(".data"))) = {0}; -s32 D_L03_001CA580[1] __attribute__((section(".data"))) = {0}; - s32 D_L03_001CA5C8[1] __attribute__((section(".data"))) = {0}; -s32 D_L04_001CA600[1] __attribute__((section(".data"))) = {0}; - s32 D_L04_001CA648[1] __attribute__((section(".data"))) = {0}; -s32 D_L05_001CA900[1] __attribute__((section(".data"))) = {0}; - s32 D_L05_001CA948[1] __attribute__((section(".data"))) = {0}; -s32 D_L06_001CAC00[1] __attribute__((section(".data"))) = {0}; - s32 D_L06_001CAC48[1] __attribute__((section(".data"))) = {0}; -s32 D_L07_001CA500[1] __attribute__((section(".data"))) = {0}; - s32 D_L07_001CA548[1] __attribute__((section(".data"))) = {0}; -s32 D_L08_001CAC80[1] __attribute__((section(".data"))) = {0}; - s32 D_L08_001CACC8[1] __attribute__((section(".data"))) = {0}; -s32 D_L09_001CA600[1] __attribute__((section(".data"))) = {0}; - s32 D_L09_001CA648[1] __attribute__((section(".data"))) = {0}; -s32 D_L10_001CA900[1] __attribute__((section(".data"))) = {0}; - s32 D_L10_001CA948[1] __attribute__((section(".data"))) = {0}; -s32 D_L11_001CAE80[1] __attribute__((section(".data"))) = {0}; - s32 D_L11_001CAEC8[1] __attribute__((section(".data"))) = {0}; -s32 D_L12_001CA900[1] __attribute__((section(".data"))) = {0}; - s32 D_L12_001CA948[1] __attribute__((section(".data"))) = {0}; -s32 D_L13_001CA780[1] __attribute__((section(".data"))) = {0}; - s32 D_L13_001CA7C8[1] __attribute__((section(".data"))) = {0}; -s32 D_L14_001CAB80[1] __attribute__((section(".data"))) = {0}; - s32 D_L14_001CABC8[1] __attribute__((section(".data"))) = {0}; -s32 D_L15_001CAA80[1] __attribute__((section(".data"))) = {0}; - s32 D_L15_001CAAC8[1] __attribute__((section(".data"))) = {0}; -s32 D_L16_001CA900[1] __attribute__((section(".data"))) = {0}; - s32 D_L16_001CA948[1] __attribute__((section(".data"))) = {0}; -s32 D_L17_001CAD80[1] __attribute__((section(".data"))) = {0}; - s32 D_L17_001CADC8[1] __attribute__((section(".data"))) = {0}; -s32 D_L18_001CAE80[1] __attribute__((section(".data"))) = {0}; - s32 D_L18_001CAEC8[1] __attribute__((section(".data"))) = {0}; I3 D_L01_00161178 = {0, 1, 2}; -int D_L01_001CA8D8 NOT_SDA = 0x10808080; -float D_L01_00161184 = 0; -s32 D_L01_0015F3F4 = 0; -I3 D_L02_00161178 = {0, 1, 2}; - -int D_L02_001CAA58 NOT_SDA = 0x10808080; -float D_L02_00161184 = 0; -s32 D_L02_0015F3F4 = 0; -I3 D_L03_00161178 = {0, 1, 2}; - -int D_L03_001CA558 NOT_SDA = 0x10808080; -float D_L03_00161184 = 0; -s32 D_L03_0015F3F4 = 0; -I3 D_L04_00161178 = {0, 1, 2}; - -int D_L04_001CA5D8 NOT_SDA = 0x10808080; -float D_L04_00161184 = 0; -s32 D_L04_0015F3F4 = 0; -I3 D_L05_00161178 = {0, 1, 2}; - -int D_L05_001CA8D8 NOT_SDA = 0x10808080; -float D_L05_00161184 = 0; -s32 D_L05_0015F3F4 = 0; -I3 D_L06_00161178 = {0, 1, 2}; - -int D_L06_001CABD8 NOT_SDA = 0x10808080; -float D_L06_00161184 = 0; -s32 D_L06_0015F3F4 = 0; -I3 D_L07_00161178 = {0, 1, 2}; - -int D_L07_001CA4D8 NOT_SDA = 0x10808080; -float D_L07_00161184 = 0; -s32 D_L07_0015F3F4 = 0; -I3 D_L08_00161178 = {0, 1, 2}; - -int D_L08_001CAC58 NOT_SDA = 0x10808080; -float D_L08_00161184 = 0; -s32 D_L08_0015F3F4 = 0; -I3 D_L09_00161178 = {0, 1, 2}; - -int D_L09_001CA5D8 NOT_SDA = 0x10808080; -float D_L09_00161184 = 0; -s32 D_L09_0015F3F4 = 0; -I3 D_L10_00161178 = {0, 1, 2}; - -int D_L10_001CA8D8 NOT_SDA = 0x10808080; -float D_L10_00161184 = 0; -s32 D_L10_0015F3F4 = 0; -I3 D_L11_00161178 = {0, 1, 2}; - -int D_L11_001CAE58 NOT_SDA = 0x10808080; -float D_L11_00161184 = 0; -s32 D_L11_0015F3F4 = 0; -I3 D_L12_00161178 = {0, 1, 2}; - -int D_L12_001CA8D8 NOT_SDA = 0x10808080; -float D_L12_00161184 = 0; -s32 D_L12_0015F3F4 = 0; -I3 D_L13_00161178 = {0, 1, 2}; - -int D_L13_001CA758 NOT_SDA = 0x10808080; -float D_L13_00161184 = 0; -s32 D_L13_0015F3F4 = 0; -I3 D_L14_00161178 = {0, 1, 2}; - -int D_L14_001CAB58 NOT_SDA = 0x10808080; -float D_L14_00161184 = 0; -s32 D_L14_0015F3F4 = 0; -I3 D_L15_00161178 = {0, 1, 2}; - -int D_L15_001CAA58 NOT_SDA = 0x10808080; -float D_L15_00161184 = 0; -s32 D_L15_0015F3F4 = 0; -I3 D_L16_00161178 = {0, 1, 2}; - -int D_L16_001CA8D8 NOT_SDA = 0x10808080; -float D_L16_00161184 = 0; -s32 D_L16_0015F3F4 = 0; -I3 D_L17_00161178 = {0, 1, 2}; - -int D_L17_001CAD58 NOT_SDA = 0x10808080; -float D_L17_00161184 = 0; -s32 D_L17_0015F3F4 = 0; -I3 D_L18_00161178 = {0, 1, 2}; - -int D_L18_001CAE58 NOT_SDA = 0x10808080; -float D_L18_00161184 = 0; -s32 D_L18_0015F3F4 = 0; +float D_L01_00161184 = 0; +s32 D_L01_0015F3F4 = 0; +I3 D_L02_00161178 = {0, 1, 2}; + +float D_L02_00161184 = 0; +s32 D_L02_0015F3F4 = 0; +I3 D_L03_00161178 = {0, 1, 2}; + +float D_L03_00161184 = 0; +s32 D_L03_0015F3F4 = 0; +I3 D_L04_00161178 = {0, 1, 2}; + +float D_L04_00161184 = 0; +s32 D_L04_0015F3F4 = 0; +I3 D_L05_00161178 = {0, 1, 2}; + +float D_L05_00161184 = 0; +s32 D_L05_0015F3F4 = 0; +I3 D_L06_00161178 = {0, 1, 2}; + +float D_L06_00161184 = 0; +s32 D_L06_0015F3F4 = 0; +I3 D_L07_00161178 = {0, 1, 2}; + +float D_L07_00161184 = 0; +s32 D_L07_0015F3F4 = 0; +I3 D_L08_00161178 = {0, 1, 2}; + +float D_L08_00161184 = 0; +s32 D_L08_0015F3F4 = 0; +I3 D_L09_00161178 = {0, 1, 2}; + +float D_L09_00161184 = 0; +s32 D_L09_0015F3F4 = 0; +I3 D_L10_00161178 = {0, 1, 2}; + +float D_L10_00161184 = 0; +s32 D_L10_0015F3F4 = 0; +I3 D_L11_00161178 = {0, 1, 2}; + +float D_L11_00161184 = 0; +s32 D_L11_0015F3F4 = 0; +I3 D_L12_00161178 = {0, 1, 2}; + +float D_L12_00161184 = 0; +s32 D_L12_0015F3F4 = 0; +I3 D_L13_00161178 = {0, 1, 2}; + +float D_L13_00161184 = 0; +s32 D_L13_0015F3F4 = 0; +I3 D_L14_00161178 = {0, 1, 2}; + +float D_L14_00161184 = 0; +s32 D_L14_0015F3F4 = 0; +I3 D_L15_00161178 = {0, 1, 2}; + +float D_L15_00161184 = 0; +s32 D_L15_0015F3F4 = 0; +I3 D_L16_00161178 = {0, 1, 2}; + +float D_L16_00161184 = 0; +s32 D_L16_0015F3F4 = 0; +I3 D_L17_00161178 = {0, 1, 2}; + +float D_L17_00161184 = 0; +s32 D_L17_0015F3F4 = 0; +I3 D_L18_00161178 = {0, 1, 2}; + +float D_L18_00161184 = 0; +s32 D_L18_0015F3F4 = 0; I3 D_L00_00161178 = {0, 1, 2}; + +/* The vendor hologram cone: a 3x3 grid of vertex offsets, texture + coordinates and colours, then its four quads as corner indices. The same + in every level. */ +float vendor_hologram_vertex_offsets[9][4] __asm__("D_L00_001CA380") = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float vendor_hologram_vertex_uvs[9][2] __asm__("D_L00_001CA410") = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int vendor_hologram_vertex_colors[10] __asm__("D_L00_001CA458") NOT_SDA = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad vendor_hologram_quads[4] __asm__("D_L00_001CA480") NOT_SDA = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L01_001CA800[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L01_001CA890[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L01_001CA8D8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L01_001CA900[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L02_001CA980[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L02_001CAA10[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L02_001CAA58[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L02_001CAA80[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L03_001CA480[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L03_001CA510[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L03_001CA558[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L03_001CA580[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L04_001CA500[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L04_001CA590[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L04_001CA5D8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L04_001CA600[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L05_001CA800[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L05_001CA890[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L05_001CA8D8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L05_001CA900[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L06_001CAB00[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L06_001CAB90[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L06_001CABD8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L06_001CAC00[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L07_001CA400[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L07_001CA490[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L07_001CA4D8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L07_001CA500[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L08_001CAB80[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L08_001CAC10[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L08_001CAC58[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L08_001CAC80[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L09_001CA500[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L09_001CA590[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L09_001CA5D8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L09_001CA600[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L10_001CA800[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L10_001CA890[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L10_001CA8D8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L10_001CA900[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L11_001CAD80[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L11_001CAE10[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L11_001CAE58[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L11_001CAE80[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L12_001CA800[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L12_001CA890[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L12_001CA8D8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L12_001CA900[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L13_001CA680[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L13_001CA710[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L13_001CA758[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L13_001CA780[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L14_001CAA80[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L14_001CAB10[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L14_001CAB58[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L14_001CAB80[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L15_001CA980[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L15_001CAA10[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L15_001CAA58[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L15_001CAA80[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L16_001CA800[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L16_001CA890[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L16_001CA8D8[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L16_001CA900[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L17_001CAC80[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L17_001CAD10[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L17_001CAD58[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L17_001CAD80[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; + +float D_L18_001CAD80[9][4] = { + {0.0f, -0.6f, 1.6f, 0.0f}, + {0.0f, 0.0f, 1.6f, 0.0f}, + {0.0f, 0.6f, 1.6f, 0.0f}, + {0.0f, -0.2f, 0.9f, 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {0.0f, 0.2f, 0.9f, 0.0f}, + {0.0f, -0.05f, 0.67f, 0.0f}, + {0.0f, 0.0f, 0.67f, 0.0f}, + {0.0f, 0.05f, 0.67f, 0.0f}, +}; + +float D_L18_001CAE10[9][2] = { + {0.0f, 0.0f}, + {0.5f, 0.0f}, + {1.0f, 0.0f}, + {0.0f, 0.5f}, + {0.5f, 0.5f}, + {1.0f, 0.5f}, + {0.0f, 1.0f}, + {0.5f, 1.0f}, + {1.0f, 1.0f}, +}; + +int D_L18_001CAE58[10] = { + 0x10808080, + 0x10808080, + 0x10808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0x60808080, + 0, +}; + +struct Quad D_L18_001CAE80[4] = { + {0, 1, 3, 4}, + {1, 2, 4, 5}, + {3, 4, 6, 7}, + {4, 5, 7, 8}, +}; From a53cbcdb729d5993477a0ede204f60fd5264362f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:11:35 +0000 Subject: [PATCH 074/213] decomp: define the unlock code button tables in C --- config/us/levels/data.tsv | 19 + .../ui/menus/process_unlock_code_input.c | 776 +++++++++++++++++- 2 files changed, 794 insertions(+), 1 deletion(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index cea93a2319..ba38ab2048 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -4066,6 +4066,7 @@ D_L00_001B21B8 4 D_L00_001B21B8 4 D_L00_001B21B8 4 D_L00_001B3D40 1812 +D_L00_001B9BA0 256 D_L00_001B9DDC 4 D_L00_001BA620 3075 D_L00_001BB280 3075 @@ -5039,6 +5040,7 @@ D_L01_001B2620 4 D_L01_001B2638 4 D_L01_001B41C0 1812 D_L01_001B4C50 1 +D_L01_001BA020 256 D_L01_001BA248 4 D_L01_001BA258 4 D_L01_001BA25C 4 @@ -6233,6 +6235,7 @@ D_L02_001B27A8 4 D_L02_001B27B8 4 D_L02_001B4340 1812 D_L02_001B4DD0 1 +D_L02_001BA1A0 256 D_L02_001BA3C8 4 D_L02_001BA3D8 4 D_L02_001BA3DC 4 @@ -7251,6 +7254,7 @@ D_L03_001B22A8 4 D_L03_001B22B8 4 D_L03_001B3E40 1812 D_L03_001B48D0 1 +D_L03_001B9CA0 256 D_L03_001B9EC8 4 D_L03_001B9ED8 4 D_L03_001B9EDC 4 @@ -8325,6 +8329,7 @@ D_L04_001B2328 4 D_L04_001B2338 4 D_L04_001B3EC0 1812 D_L04_001B4950 1 +D_L04_001B9D20 256 D_L04_001B9F48 4 D_L04_001B9F58 4 D_L04_001B9F5C 4 @@ -9458,6 +9463,7 @@ D_L05_001B2628 4 D_L05_001B2638 4 D_L05_001B41C0 1812 D_L05_001B4C50 1 +D_L05_001BA020 256 D_L05_001BA248 4 D_L05_001BA258 4 D_L05_001BA25C 4 @@ -10656,6 +10662,7 @@ D_L06_001B2928 4 D_L06_001B2938 4 D_L06_001B44C0 1812 D_L06_001B4F50 1 +D_L06_001BA320 256 D_L06_001BA548 4 D_L06_001BA558 4 D_L06_001BA55C 4 @@ -11744,6 +11751,7 @@ D_L07_001B2220 4 D_L07_001B2238 4 D_L07_001B3DC0 1812 D_L07_001B4850 1 +D_L07_001B9C20 256 D_L07_001B9E48 4 D_L07_001B9E58 4 D_L07_001B9E5C 4 @@ -12954,6 +12962,7 @@ D_L08_001B29B4 4 D_L08_001B29B8 4 D_L08_001B4540 1812 D_L08_001B4FD0 1 +D_L08_001BA3A0 256 D_L08_001BA5C8 4 D_L08_001BA5D8 4 D_L08_001BA5DC 4 @@ -14207,6 +14216,7 @@ D_L09_001B2320 4 D_L09_001B2338 4 D_L09_001B3EC0 1812 D_L09_001B4950 1 +D_L09_001B9D20 256 D_L09_001B9F48 4 D_L09_001B9F58 4 D_L09_001B9F5C 4 @@ -15553,6 +15563,7 @@ D_L10_001B2620 4 D_L10_001B2638 4 D_L10_001B41C0 1812 D_L10_001B4C50 1 +D_L10_001BA020 256 D_L10_001BA248 4 D_L10_001BA258 4 D_L10_001BA25C 4 @@ -16727,6 +16738,7 @@ D_L11_001B2BA8 4 D_L11_001B2BB8 4 D_L11_001B4740 1812 D_L11_001B51D0 1 +D_L11_001BA5A0 256 D_L11_001BA7E0 4 D_L11_001BADB8 12 D_L11_001BAED0 4 @@ -17922,6 +17934,7 @@ D_L12_001B2628 4 D_L12_001B2638 4 D_L12_001B41C0 1812 D_L12_001B4C50 1 +D_L12_001BA020 256 D_L12_001BA248 4 D_L12_001BA258 4 D_L12_001BA25C 4 @@ -19024,6 +19037,7 @@ D_L13_001B24A8 4 D_L13_001B24B8 4 D_L13_001B4040 1812 D_L13_001B4AD0 1 +D_L13_001B9EA0 256 D_L13_001BA0C8 4 D_L13_001BA0D8 4 D_L13_001BA0DC 4 @@ -20199,6 +20213,7 @@ D_L14_001B28A8 4 D_L14_001B28B8 4 D_L14_001B4440 1812 D_L14_001B4ED0 1 +D_L14_001BA2A0 256 D_L14_001BA4C8 4 D_L14_001BA4D8 4 D_L14_001BA4DC 4 @@ -21392,6 +21407,7 @@ D_L15_001B27A0 4 D_L15_001B27B8 4 D_L15_001B4340 1812 D_L15_001B4DD0 1 +D_L15_001BA1A0 256 D_L15_001BA3C8 4 D_L15_001BA3D8 4 D_L15_001BA3DC 4 @@ -22498,6 +22514,7 @@ D_L16_001B2620 4 D_L16_001B2638 4 D_L16_001B41C0 1812 D_L16_001B4C50 1 +D_L16_001BA020 256 D_L16_001BA248 4 D_L16_001BA258 4 D_L16_001BA25C 4 @@ -23811,6 +23828,7 @@ D_L17_001B2AA8 4 D_L17_001B2AB8 4 D_L17_001B4640 1812 D_L17_001B50D0 1 +D_L17_001BA4A0 256 D_L17_001BA6C8 4 D_L17_001BA6D8 4 D_L17_001BA6E0 4 @@ -24995,6 +25013,7 @@ D_L18_001B2BA0 4 D_L18_001B2BB8 4 D_L18_001B4740 1812 D_L18_001B51D0 1 +D_L18_001BA5A0 256 D_L18_001BA7E0 4 D_L18_001BADB8 12 D_L18_001BAED0 4 diff --git a/src/overlays/shared/ui/menus/process_unlock_code_input.c b/src/overlays/shared/ui/menus/process_unlock_code_input.c index 991c1e6673..affa9de40e 100644 --- a/src/overlays/shared/ui/menus/process_unlock_code_input.c +++ b/src/overlays/shared/ui/menus/process_unlock_code_input.c @@ -26,7 +26,19 @@ extern char D_0013D388[]; extern short unlock_code_input_count __asm__("D_L00_001603F8") __attribute__((sda)); extern short unlock_code_input_sequence[] __asm__("D_L00_001BA4A8"); extern unsigned char D_0013A4E0[]; -extern unsigned char l00_unlock_code_comparison_table[] __asm__("D_L00_001B9BA0"); +/* The buttons of an unlock code, as process_unlock_code_input numbers them. */ +typedef unsigned char UnlockCodeButton; + +enum { + CODE_UP = 0, /* PAD_UP */ + CODE_DOWN = 1, /* PAD_DOWN */ + CODE_LEFT = 2, /* PAD_LEFT */ + CODE_RIGHT = 3, /* PAD_RIGHT */ + CODE_SQUARE = 4, /* PAD_SQUARE */ + CODE_CIRCLE = 5 /* PAD_CIRCLE */ +}; + +extern UnlockCodeButton l00_unlock_code_comparison_table[256] __asm__("D_L00_001B9BA0"); void process_unlock_code_input(void) __asm__("FUN_L00_002831c0"); @@ -140,3 +152,765 @@ char D_L18_001B51D0 NOT_SDA = 0xd; short D_L18_001603F8 = 0; short unlock_code_input_count __asm__("D_L00_001603F8") = 0; + +/* Code n (n >= 0) is the 20 buttons at ((j + 1) * (n + 2)) & 0xFF, j = 0..19. + The same in every level. */ +UnlockCodeButton l00_unlock_code_comparison_table[256] __asm__("D_L00_001B9BA0") = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L01_001BA020[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L02_001BA1A0[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L03_001B9CA0[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L04_001B9D20[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L05_001BA020[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L06_001BA320[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L07_001B9C20[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L08_001BA3A0[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L09_001B9D20[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L10_001BA020[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L11_001BA5A0[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L12_001BA020[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L13_001B9EA0[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L14_001BA2A0[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L15_001BA1A0[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L16_001BA020[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L17_001BA4A0[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; + +UnlockCodeButton D_L18_001BA5A0[256] = { + CODE_RIGHT, CODE_DOWN, CODE_SQUARE, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_LEFT, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, + CODE_DOWN, CODE_UP, CODE_DOWN, CODE_UP, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_RIGHT, CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, + CODE_SQUARE, CODE_UP, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, CODE_UP, CODE_LEFT, + CODE_UP, CODE_DOWN, CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_DOWN, + CODE_RIGHT, CODE_CIRCLE, CODE_UP, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_DOWN, + CODE_DOWN, CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_SQUARE, CODE_CIRCLE, CODE_SQUARE, + CODE_UP, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, + CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_DOWN, CODE_UP, CODE_DOWN, + CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_LEFT, CODE_DOWN, CODE_UP, + CODE_DOWN, CODE_UP, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, + CODE_UP, CODE_LEFT, CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_SQUARE, CODE_LEFT, + CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_CIRCLE, CODE_LEFT, + CODE_LEFT, CODE_DOWN, CODE_UP, CODE_LEFT, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, + CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_DOWN, + CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_SQUARE, CODE_CIRCLE, CODE_RIGHT, CODE_UP, + CODE_DOWN, CODE_SQUARE, CODE_SQUARE, CODE_LEFT, CODE_SQUARE, CODE_DOWN, CODE_UP, + CODE_LEFT, CODE_UP, CODE_SQUARE, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_DOWN, CODE_CIRCLE, + CODE_UP, CODE_CIRCLE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_SQUARE, CODE_CIRCLE, + CODE_LEFT, CODE_CIRCLE, CODE_UP, CODE_UP, CODE_DOWN, CODE_RIGHT, CODE_DOWN, + CODE_SQUARE, CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, + CODE_CIRCLE, CODE_UP, CODE_SQUARE, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_LEFT, + CODE_CIRCLE, CODE_SQUARE, CODE_RIGHT, CODE_LEFT, CODE_UP, CODE_UP, CODE_LEFT, + CODE_DOWN, CODE_LEFT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_UP, CODE_CIRCLE, + CODE_UP, CODE_LEFT, CODE_DOWN, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_LEFT, + CODE_SQUARE, CODE_RIGHT, CODE_UP, CODE_CIRCLE, CODE_RIGHT, CODE_LEFT, CODE_UP, + CODE_RIGHT, CODE_DOWN, CODE_LEFT, CODE_CIRCLE, CODE_LEFT, CODE_DOWN, CODE_DOWN, + CODE_RIGHT, CODE_UP, CODE_RIGHT, CODE_DOWN, CODE_DOWN, CODE_SQUARE, CODE_RIGHT, + CODE_CIRCLE, CODE_RIGHT, CODE_SQUARE, CODE_RIGHT, CODE_SQUARE, CODE_LEFT, CODE_RIGHT, + CODE_DOWN, CODE_RIGHT, CODE_LEFT, CODE_RIGHT, CODE_RIGHT, CODE_LEFT, CODE_CIRCLE, + CODE_SQUARE, CODE_SQUARE, CODE_DOWN, CODE_RIGHT, CODE_SQUARE, CODE_SQUARE, CODE_UP, + CODE_LEFT, CODE_CIRCLE, CODE_CIRCLE, CODE_RIGHT, +}; From d60de3e955e2007ed1c9ac4b70a3d207a3b57e85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:17:26 +0000 Subject: [PATCH 075/213] decomp: define the vendor item sound and message table in C --- config/us/levels/data.tsv | 37 +- .../rnc/overlay/shared/vendor/vendor_menu.h | 6 +- .../cutscenes/update_cutscene_playback.c | 18 - src/overlays/shared/vendor/vendor_menu.c | 764 +++++++++++++++++- 4 files changed, 785 insertions(+), 40 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index ba38ab2048..299d5938b7 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -4070,6 +4070,7 @@ D_L00_001B9BA0 256 D_L00_001B9DDC 4 D_L00_001BA620 3075 D_L00_001BB280 3075 +D_L00_001C2108 740 D_L00_001C9930 1776 D_L00_001CA020 148 D_L00_001CA380 144 @@ -5054,7 +5055,7 @@ D_L01_001BD230 1 D_L01_001BD830 1 D_L01_001BDC60 1 D_L01_001C22C0 12 -D_L01_001C2588 20 +D_L01_001C2588 740 D_L01_001C3D10 1 D_L01_001C4318 4 D_L01_001C4938 4 @@ -6251,7 +6252,7 @@ D_L02_001BD3B0 1 D_L02_001BD9B0 1 D_L02_001BDDE0 1 D_L02_001C2440 12 -D_L02_001C2708 20 +D_L02_001C2708 740 D_L02_001C3E90 1 D_L02_001C4498 4 D_L02_001C46B0 24 @@ -7268,7 +7269,7 @@ D_L03_001BCEB0 1 D_L03_001BD4B0 1 D_L03_001BD8E0 1 D_L03_001C1F40 12 -D_L03_001C2208 20 +D_L03_001C2208 740 D_L03_001C3990 1 D_L03_001C3F98 4 D_L03_001C41B0 24 @@ -8345,7 +8346,7 @@ D_L04_001BCF30 1 D_L04_001BD530 1 D_L04_001BD960 1 D_L04_001C1FC0 12 -D_L04_001C2288 20 +D_L04_001C2288 740 D_L04_001C3A10 1 D_L04_001C4018 4 D_L04_001C4230 24 @@ -9478,7 +9479,7 @@ D_L05_001BD230 1 D_L05_001BD830 1 D_L05_001BDC60 1 D_L05_001C22C0 12 -D_L05_001C2588 20 +D_L05_001C2588 740 D_L05_001C3D10 1 D_L05_001C4318 4 D_L05_001C4530 24 @@ -10679,7 +10680,7 @@ D_L06_001BDB30 1 D_L06_001BDF30 1 D_L06_001BDF60 1 D_L06_001C25C0 12 -D_L06_001C2888 20 +D_L06_001C2888 740 D_L06_001C4010 1 D_L06_001C4618 4 D_L06_001C4830 24 @@ -11768,7 +11769,7 @@ D_L07_001BCE30 1 D_L07_001BD430 1 D_L07_001BD860 1 D_L07_001C1EC0 12 -D_L07_001C2188 20 +D_L07_001C2188 740 D_L07_001C3910 1 D_L07_001C3F18 4 D_L07_001C4538 4 @@ -12978,7 +12979,7 @@ D_L08_001BD5B0 1 D_L08_001BDBB0 1 D_L08_001BDFE0 1 D_L08_001C2640 12 -D_L08_001C2908 20 +D_L08_001C2908 740 D_L08_001C4090 1 D_L08_001C4698 4 D_L08_001C48B0 24 @@ -14232,7 +14233,7 @@ D_L09_001BCF30 1 D_L09_001BD530 1 D_L09_001BD960 1 D_L09_001C1FC0 12 -D_L09_001C2288 20 +D_L09_001C2288 740 D_L09_001C3A10 1 D_L09_001C4018 4 D_L09_001C4230 24 @@ -15578,7 +15579,7 @@ D_L10_001BD230 1 D_L10_001BD830 1 D_L10_001BDC60 1 D_L10_001C22C0 12 -D_L10_001C2588 20 +D_L10_001C2588 740 D_L10_001C3D10 1 D_L10_001C4318 4 D_L10_001C4530 24 @@ -16750,7 +16751,7 @@ D_L11_001BD7B0 1 D_L11_001BDDB0 1 D_L11_001BE1E0 1 D_L11_001C2840 12 -D_L11_001C2B08 20 +D_L11_001C2B08 740 D_L11_001C4290 1 D_L11_001C4898 4 D_L11_001C4AB0 24 @@ -17952,7 +17953,7 @@ D_L12_001BD230 1 D_L12_001BD830 1 D_L12_001BDC60 1 D_L12_001C22C0 12 -D_L12_001C2588 20 +D_L12_001C2588 740 D_L12_001C3D10 1 D_L12_001C4318 4 D_L12_001C4530 24 @@ -19054,7 +19055,7 @@ D_L13_001BD0B0 1 D_L13_001BD6B0 1 D_L13_001BDAE0 1 D_L13_001C2140 12 -D_L13_001C2408 20 +D_L13_001C2408 740 D_L13_001C3B90 1 D_L13_001C4198 4 D_L13_001C43B0 24 @@ -20229,7 +20230,7 @@ D_L14_001BD4B0 1 D_L14_001BDAB0 1 D_L14_001BDEE0 1 D_L14_001C2540 12 -D_L14_001C2808 20 +D_L14_001C2808 740 D_L14_001C3F90 1 D_L14_001C4598 4 D_L14_001C47B0 24 @@ -21422,7 +21423,7 @@ D_L15_001BD3B0 1 D_L15_001BD9B0 1 D_L15_001BDDE0 1 D_L15_001C2440 12 -D_L15_001C2708 20 +D_L15_001C2708 740 D_L15_001C3E90 1 D_L15_001C4498 4 D_L15_001C46B0 24 @@ -22532,7 +22533,7 @@ D_L16_001BD230 1 D_L16_001BD830 1 D_L16_001BDC60 1 D_L16_001C22C0 12 -D_L16_001C2588 20 +D_L16_001C2588 740 D_L16_001C3D10 1 D_L16_001C4318 4 D_L16_001C4530 24 @@ -23844,7 +23845,7 @@ D_L17_001BD6B0 1 D_L17_001BDCB0 1 D_L17_001BE0E0 1 D_L17_001C2740 12 -D_L17_001C2A08 20 +D_L17_001C2A08 740 D_L17_001C4190 1 D_L17_001C4798 4 D_L17_001C49B0 24 @@ -25026,7 +25027,7 @@ D_L18_001BD7B0 1 D_L18_001BDDB0 1 D_L18_001BE1E0 1 D_L18_001C2840 12 -D_L18_001C2B08 20 +D_L18_001C2B08 740 D_L18_001C4290 1 D_L18_001C4898 4 D_L18_001C4AB0 24 diff --git a/include/rnc/overlay/shared/vendor/vendor_menu.h b/include/rnc/overlay/shared/vendor/vendor_menu.h index 26e25d4417..b82bc5f096 100644 --- a/include/rnc/overlay/shared/vendor/vendor_menu.h +++ b/include/rnc/overlay/shared/vendor/vendor_menu.h @@ -22,9 +22,9 @@ typedef struct { } VendorList; typedef struct { - s32 sound; - u8 pad4[0xC]; - s32 message; + s32 sound; /* 0x00: copied to the item's vendor row */ + f32 unk4[3]; /* 0x04 */ + s32 message; /* 0x10: help text shown for the item */ } VendorSound; typedef struct { diff --git a/src/overlays/shared/cutscenes/update_cutscene_playback.c b/src/overlays/shared/cutscenes/update_cutscene_playback.c index 0db26eddc0..55537cb3c3 100644 --- a/src/overlays/shared/cutscenes/update_cutscene_playback.c +++ b/src/overlays/shared/cutscenes/update_cutscene_playback.c @@ -1486,7 +1486,6 @@ int D_L01_001622B8 __attribute__((section(".bss"))); float D_L01_001C8DA0 NOT_SDA = 0; float D_L01_001C8D80 NOT_SDA = 0; int D_L01_00161090 = 0; -VendorSound D_L01_001C2588 = {0}; Vec4 D_L01_00166400[3] __attribute__((section(".bss"))); @@ -1563,7 +1562,6 @@ int D_L02_00162438 __attribute__((section(".bss"))); float D_L02_001C8F20 NOT_SDA = 0; float D_L02_001C8F00 NOT_SDA = 0; int D_L02_00161090 = 0; -VendorSound D_L02_001C2708 = {0}; Vec4 D_L02_00166580[3] __attribute__((section(".bss"))); @@ -1641,7 +1639,6 @@ int D_L03_00161F38 __attribute__((section(".bss"))); float D_L03_001C8A20 NOT_SDA = 0; float D_L03_001C8A00 NOT_SDA = 0; int D_L03_00161090 = 0; -VendorSound D_L03_001C2208 = {0}; Vec4 D_L03_00166080[3] __attribute__((section(".bss"))); @@ -1722,7 +1719,6 @@ int D_L04_00161FB8 __attribute__((section(".bss"))); float D_L04_001C8AA0 NOT_SDA = 0; float D_L04_001C8A80 NOT_SDA = 0; int D_L04_00161090 = 0; -VendorSound D_L04_001C2288 = {0}; Vec4 D_L04_00166100[3] __attribute__((section(".bss"))); @@ -1798,7 +1794,6 @@ int D_L05_00162238 __attribute__((section(".bss"))); float D_L05_001C8DA0 NOT_SDA = 0; float D_L05_001C8D80 NOT_SDA = 0; int D_L05_00161090 = 0; -VendorSound D_L05_001C2588 = {0}; Vec4 D_L05_00166380[3] __attribute__((section(".bss"))); @@ -1873,7 +1868,6 @@ int D_L06_001625B8 __attribute__((section(".bss"))); float D_L06_001C90A0 NOT_SDA = 0; float D_L06_001C9080 NOT_SDA = 0; int D_L06_00161090 = 0; -VendorSound D_L06_001C2888 = {0}; Vec4 D_L06_00166700[3] __attribute__((section(".bss"))); @@ -1948,7 +1942,6 @@ int D_L07_00161EB8 __attribute__((section(".bss"))); float D_L07_001C89A0 NOT_SDA = 0; float D_L07_001C8980 NOT_SDA = 0; int D_L07_00161090 = 0; -VendorSound D_L07_001C2188 = {0}; Vec4 D_L07_00166000[3] __attribute__((section(".bss"))); @@ -2021,7 +2014,6 @@ int D_L08_00162638 __attribute__((section(".bss"))); float D_L08_001C9120 NOT_SDA = 0; float D_L08_001C9100 NOT_SDA = 0; int D_L08_00161090 = 0; -VendorSound D_L08_001C2908 = {0}; Vec4 D_L08_00166780[3] __attribute__((section(".bss"))); @@ -2104,7 +2096,6 @@ int D_L09_00161FB8 __attribute__((section(".bss"))); float D_L09_001C8AA0 NOT_SDA = 0; float D_L09_001C8A80 NOT_SDA = 0; int D_L09_00161090 = 0; -VendorSound D_L09_001C2288 = {0}; Vec4 D_L09_00166100[3] __attribute__((section(".bss"))); @@ -2183,7 +2174,6 @@ int D_L10_001622B8 __attribute__((section(".bss"))); float D_L10_001C8DA0 NOT_SDA = 0; float D_L10_001C8D80 NOT_SDA = 0; int D_L10_00161090 = 0; -VendorSound D_L10_001C2588 = {0}; Vec4 D_L10_00166400[3] __attribute__((section(".bss"))); @@ -2262,7 +2252,6 @@ int D_L11_00162838 __attribute__((section(".bss"))); float D_L11_001C9320 NOT_SDA = 0; float D_L11_001C9300 NOT_SDA = 0; int D_L11_00161090 = 0; -VendorSound D_L11_001C2B08 = {0}; Vec4 D_L11_001669C0[3] __attribute__((section(".bss"))); @@ -2340,7 +2329,6 @@ int D_L12_001622B8 __attribute__((section(".bss"))); float D_L12_001C8DA0 NOT_SDA = 0; float D_L12_001C8D80 NOT_SDA = 0; int D_L12_00161090 = 0; -VendorSound D_L12_001C2588 = {0}; Vec4 D_L12_00166400[3] __attribute__((section(".bss"))); @@ -2419,7 +2407,6 @@ int D_L13_00162138 __attribute__((section(".bss"))); float D_L13_001C8C20 NOT_SDA = 0; float D_L13_001C8C00 NOT_SDA = 0; int D_L13_00161090 = 0; -VendorSound D_L13_001C2408 = {0}; Vec4 D_L13_00166280[3] __attribute__((section(".bss"))); @@ -2498,7 +2485,6 @@ int D_L14_00162538 __attribute__((section(".bss"))); float D_L14_001C9020 NOT_SDA = 0; float D_L14_001C9000 NOT_SDA = 0; int D_L14_00161090 = 0; -VendorSound D_L14_001C2808 = {0}; Vec4 D_L14_00166680[3] __attribute__((section(".bss"))); @@ -2576,7 +2562,6 @@ int D_L15_00162438 __attribute__((section(".bss"))); float D_L15_001C8F20 NOT_SDA = 0; float D_L15_001C8F00 NOT_SDA = 0; int D_L15_00161090 = 0; -VendorSound D_L15_001C2708 = {0}; Vec4 D_L15_00166580[3] __attribute__((section(".bss"))); @@ -2656,7 +2641,6 @@ int D_L16_00162238 __attribute__((section(".bss"))); float D_L16_001C8DA0 NOT_SDA = 0; float D_L16_001C8D80 NOT_SDA = 0; int D_L16_00161090 = 0; -VendorSound D_L16_001C2588 = {0}; Vec4 D_L16_001663C0[3] __attribute__((section(".bss"))); @@ -2734,7 +2718,6 @@ int D_L17_00162738 __attribute__((section(".bss"))); float D_L17_001C9220 NOT_SDA = 0; float D_L17_001C9200 NOT_SDA = 0; int D_L17_00161090 = 0; -VendorSound D_L17_001C2A08 = {0}; Vec4 D_L17_00166880[3] __attribute__((section(".bss"))); @@ -2809,7 +2792,6 @@ int D_L18_00162838 __attribute__((section(".bss"))); float D_L18_001C9320 NOT_SDA = 0; float D_L18_001C9300 NOT_SDA = 0; int D_L18_00161090 = 0; -VendorSound D_L18_001C2B08 = {0}; Vec4 D_L18_00166980[3] __attribute__((section(".bss"))); diff --git a/src/overlays/shared/vendor/vendor_menu.c b/src/overlays/shared/vendor/vendor_menu.c index d0058041aa..1a49460b00 100644 --- a/src/overlays/shared/vendor/vendor_menu.c +++ b/src/overlays/shared/vendor/vendor_menu.c @@ -863,7 +863,7 @@ typedef struct { Vec4 v20; } VendorItemSlot30; -extern VendorSound vendor_sound[] __asm__("D_L00_001C2108"); +extern VendorSound vendor_sound[37] __asm__("D_L00_001C2108"); extern VendorItemSlot40 D_L00_001C8FF0[]; extern VendorItemSlot30 l00_vendor_item_display_transform_parameters[37] __asm__("D_L00_001C9930"); extern u8 vendor_moby_update_label[] __asm__("D_L00_00161128"); @@ -2991,3 +2991,765 @@ s32 D_L18_001CAA20[37] = { -1, /* item 27 */ /* items 28..36: none */ }; + +/* Per item: the sound of its vendor row and the help message the vendor + shows for it. The same in every level. */ +VendorSound vendor_sound[37] __asm__("D_L00_001C2108") = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L01_001C2588[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L02_001C2708[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L03_001C2208[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L04_001C2288[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L05_001C2588[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L06_001C2888[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L07_001C2188[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L08_001C2908[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L09_001C2288[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L10_001C2588[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L11_001C2B08[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L12_001C2588[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L13_001C2408[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L14_001C2808[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L15_001C2708[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L16_001C2588[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L17_001C2A08[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; + +VendorSound D_L18_001C2B08[37] = { + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0xe2, {1.0f, 0.15f, -0.08f}, 0x525b}, + {0xcc, {0.7f, -0.05f, -0.2f}, 0x525c}, + {0}, + {0xde, {0.8f, 0.0f, -0.15f}, 0x525d}, + {0, {0.6f, 0.25f, -0.1f}, 0x525e}, + {0x3ee, {0.75f, 0.25f, -0.18f}, 0x525f}, + {0xd6, {0.52f, 0.1f, -0.12f}, 0x5260}, + {0xe1, {1.0f, 0.15f, -0.08f}, 0x5261}, + {0, {1.0f, 0.1f, -0.1f}, 0x5262}, + {0xd5, {0.6f, 0.1f, -0.12f}, 0x5263}, + {0xdf, {1.0f, 0.15f, -0.08f}, 0x5264}, + {0}, + {0}, + {0x59e, {0.0f, 0.0f, 0.0f}, 0x5265}, + {0x5a7, {1.0f, 0.15f, -0.08f}, 0x5266}, + {0x5a9, {1.0f, 0.15f, -0.08f}, 0x5267}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, +}; From 674f7495c7269d8e3c5b810e21cb6d8bc9ad5197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:26:24 +0000 Subject: [PATCH 076/213] decomp: define the gold bolt count of each level in C --- config/us/levels/exe_data.tsv | 19 +++++++++++++ configure.py | 1 + src/ui/menus/system/setup_menu_display_text.c | 28 +++++++++++++++++-- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index c49c28c4bd..b534ed47e5 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -137,6 +137,7 @@ 00 001C28F0 64 00 001C2F00 48 00 001C44B8 80 +00 001C4988 76 00 001C5800 768 00 001CA0B8 96 00 001CA118 512 @@ -295,6 +296,7 @@ 01 001C2D70 64 01 001C3380 48 01 001C4938 80 +01 001C4E08 76 01 001C5C80 768 01 001CA538 96 01 001CA598 512 @@ -453,6 +455,7 @@ 02 001C2EF0 64 02 001C3500 48 02 001C4AB8 80 +02 001C4F88 76 02 001C5E00 768 02 001CA6B8 96 02 001CA718 512 @@ -611,6 +614,7 @@ 03 001C29F0 64 03 001C3000 48 03 001C45B8 80 +03 001C4A88 76 03 001C5900 768 03 001CA1B8 96 03 001CA218 512 @@ -769,6 +773,7 @@ 04 001C2A70 64 04 001C3080 48 04 001C4638 80 +04 001C4B08 76 04 001C5980 768 04 001CA238 96 04 001CA298 512 @@ -927,6 +932,7 @@ 05 001C2D70 64 05 001C3380 48 05 001C4938 80 +05 001C4E08 76 05 001C5C80 768 05 001CA538 96 05 001CA598 512 @@ -1085,6 +1091,7 @@ 06 001C3070 64 06 001C3680 48 06 001C4C38 80 +06 001C5108 76 06 001C5F80 768 06 001CA838 96 06 001CA898 512 @@ -1243,6 +1250,7 @@ 07 001C2970 64 07 001C2F80 48 07 001C4538 80 +07 001C4A08 76 07 001C5880 768 07 001CA138 96 07 001CA198 512 @@ -1401,6 +1409,7 @@ 08 001C30F0 64 08 001C3700 48 08 001C4CB8 80 +08 001C5188 76 08 001C6000 768 08 001CA8B8 96 08 001CA918 512 @@ -1559,6 +1568,7 @@ 09 001C2A70 64 09 001C3080 48 09 001C4638 80 +09 001C4B08 76 09 001C5980 768 09 001CA238 96 09 001CA298 512 @@ -1717,6 +1727,7 @@ 10 001C2D70 64 10 001C3380 48 10 001C4938 80 +10 001C4E08 76 10 001C5C80 768 10 001CA538 96 10 001CA598 512 @@ -1875,6 +1886,7 @@ 11 001C32F0 64 11 001C3900 48 11 001C4EB8 80 +11 001C5388 76 11 001C6200 768 11 001CAAB8 96 11 001CAB18 512 @@ -2033,6 +2045,7 @@ 12 001C2D70 64 12 001C3380 48 12 001C4938 80 +12 001C4E08 76 12 001C5C80 768 12 001CA538 96 12 001CA598 512 @@ -2191,6 +2204,7 @@ 13 001C2BF0 64 13 001C3200 48 13 001C47B8 80 +13 001C4C88 76 13 001C5B00 768 13 001CA3B8 96 13 001CA418 512 @@ -2349,6 +2363,7 @@ 14 001C2FF0 64 14 001C3600 48 14 001C4BB8 80 +14 001C5088 76 14 001C5F00 768 14 001CA7B8 96 14 001CA818 512 @@ -2507,6 +2522,7 @@ 15 001C2EF0 64 15 001C3500 48 15 001C4AB8 80 +15 001C4F88 76 15 001C5E00 768 15 001CA6B8 96 15 001CA718 512 @@ -2665,6 +2681,7 @@ 16 001C2D70 64 16 001C3380 48 16 001C4938 80 +16 001C4E08 76 16 001C5C80 768 16 001CA538 96 16 001CA598 512 @@ -2823,6 +2840,7 @@ 17 001C31F0 64 17 001C3800 48 17 001C4DB8 80 +17 001C5288 76 17 001C6100 768 17 001CA9B8 96 17 001CAA18 512 @@ -2981,6 +2999,7 @@ 18 001C32F0 64 18 001C3900 48 18 001C4EB8 80 +18 001C5388 76 18 001C6200 768 18 001CAAB8 96 18 001CAB18 512 diff --git a/configure.py b/configure.py index d27abdb068..5c3e6d1338 100755 --- a/configure.py +++ b/configure.py @@ -1140,6 +1140,7 @@ # The same for a unit's `.data`: data only that unit reads, defined in it. # `scripts/data-refs.py --emit` writes the definition and prints the entry. DATA_OVERLAYS = { + "ui/menus/system/setup_menu_display_text": (0x1E0888, 0xE1808, 76), # gold bolts per level "sdk/kernel/supplement_crt0": (0x130320, 0x312A0, 8), "sdk/graph/sce_gs_get_gparam": (0x132D40, 0x33CC0, 16), "sdk/input/sce_pad2_init": (0x132DD0, 0x33D50, 4), # pad2_initialized diff --git a/src/ui/menus/system/setup_menu_display_text.c b/src/ui/menus/system/setup_menu_display_text.c index 06e8f22be6..7179154bdd 100644 --- a/src/ui/menus/system/setup_menu_display_text.c +++ b/src/ui/menus/system/setup_menu_display_text.c @@ -6,6 +6,7 @@ #include "rnc/sdk/libc/stdio.h" #include "rnc/mobys/moby.h" #include "rnc/ui/menus/menu_screen.h" +#include "rnc/world/level_id.h" extern void setup_gif_paging(int) __asm__("func_001F4280"); extern void do_gif_paging(void) __asm__("func_001F4398"); @@ -13,7 +14,8 @@ extern void draw_moby_list(void *, int) __asm__("func_0020D330"); extern void *get_help_message_text(int) __asm__("func_001FDD10"); extern const float setup_menu_moby_camera_y_offset __asm__("D_001602A4") __attribute__((sda)); extern char setup_menu_text_format[] __asm__("D_001602A8"); -extern int menu_display_value_by_level[] __asm__("D_001E0888"); +/* The number of gold bolts each level holds. */ +extern int gold_bolts_per_level[LEVEL_COUNT] __asm__("D_001E0888"); #include "rnc/rendering/screen.h" @@ -47,7 +49,7 @@ int setup_menu_display_text(struct MenuScreen *menu) { get_help_message_text(0x4F4F), count, get_help_message_text(0x4F53), - menu_display_value_by_level[level_map_selection.level]); + gold_bolts_per_level[level_map_selection.level]); font_print_right( menu->width - 0x10, (screen_extent.height >> 1) - 8, 0x80000000L, formatted_menu_text, -1); font_print_right( @@ -61,3 +63,25 @@ extern __typeof__(setup_menu_display_text) func_0021EF78 __attribute__((alias("F /* Small data reached with lui/addiu. */ char setup_menu_text_format[] __asm__("D_001602A8") __attribute__((section(".sdata"))) = "%s %d %s %d"; + +int gold_bolts_per_level[LEVEL_COUNT] __asm__("D_001E0888") = { + 0, /* LEVEL_VELDIN1 */ + 3, /* LEVEL_NOVALIS */ + 4, /* LEVEL_ARIDIA */ + 3, /* LEVEL_KERWAN */ + 1, /* LEVEL_EUDORA */ + 2, /* LEVEL_RILGAR */ + 2, /* LEVEL_NEBULA_G34 */ + 2, /* LEVEL_UMBRIS */ + 2, /* LEVEL_BATALIA */ + 2, /* LEVEL_GASPAR */ + 2, /* LEVEL_ORXON */ + 1, /* LEVEL_POKITARU */ + 2, /* LEVEL_HOVEN */ + 1, /* LEVEL_OLTANIS_ORBIT */ + 4, /* LEVEL_OLTANIS */ + 2, /* LEVEL_QUARTU */ + 2, /* LEVEL_KALEBO3 */ + 2, /* LEVEL_VELDIN_ORBIT */ + 3, /* LEVEL_VELDIN2 */ +}; From 6fde9d86caad2425e4eea95ad3d1c94528e676f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:32:29 +0000 Subject: [PATCH 077/213] decomp: define the thousands separators and the message too long label in C --- config/us/levels/exe_data.tsv | 19 +++++++++++++++++++ configure.py | 3 ++- src/ui/menus/system/process_menu_entry.c | 21 ++++++++++++++++----- src/ui/text/copy_text_to_shared_buffer.c | 12 +++++++----- 4 files changed, 44 insertions(+), 11 deletions(-) diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index b534ed47e5..4216ad0449 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -145,6 +145,7 @@ 00 001CA4FC 4 00 001CA720 64 00 001E7A50 48 +00 001E84D8 19 00 001E8B18 17 00 001E8B30 64 00 001E8C80 19 @@ -304,6 +305,7 @@ 01 001CA97C 4 01 001CABA0 64 01 00208AB0 48 +01 00209588 19 01 00209B78 17 01 00209B90 64 01 00209CE0 19 @@ -463,6 +465,7 @@ 02 001CAAFC 4 02 001CAD20 64 02 001F8350 48 +02 001F8E28 19 02 001F9418 17 02 001F9430 64 02 001F9580 19 @@ -622,6 +625,7 @@ 03 001CA5FC 4 03 001CA820 64 03 001E06D0 48 +03 001E11A8 19 03 001E1798 17 03 001E17B0 64 03 001E1900 19 @@ -781,6 +785,7 @@ 04 001CA67C 4 04 001CA8A0 64 04 001D9840 48 +04 001DA2C8 19 04 001DA8B8 17 04 001DA8D0 64 04 001DAA20 19 @@ -940,6 +945,7 @@ 05 001CA97C 4 05 001CABA0 64 05 00216140 48 +05 00216C38 19 05 00217228 17 05 00217240 64 05 00217390 19 @@ -1099,6 +1105,7 @@ 06 001CAC7C 4 06 001CAEA0 64 06 001FEEA0 48 +06 001FF928 19 06 001FFF18 17 06 001FFF30 64 06 00200080 19 @@ -1258,6 +1265,7 @@ 07 001CA57C 4 07 001CA7A0 64 07 0020ED40 48 +07 0020F7C8 19 07 0020FDB8 17 07 0020FDD0 64 07 0020FF20 19 @@ -1417,6 +1425,7 @@ 08 001CACFC 4 08 001CAF20 64 08 001F9990 48 +08 001FA468 19 08 001FAA58 17 08 001FAA70 64 08 001FABC0 19 @@ -1576,6 +1585,7 @@ 09 001CA67C 4 09 001CA8A0 64 09 002065B0 48 +09 00207038 19 09 00207628 17 09 00207640 64 09 00207790 19 @@ -1735,6 +1745,7 @@ 10 001CA97C 4 10 001CABA0 64 10 001DA820 48 +10 001DB2A8 19 10 001DB898 17 10 001DB8B0 64 10 001DBA00 19 @@ -1894,6 +1905,7 @@ 11 001CAEFC 4 11 001CB120 64 11 00218BA0 48 +11 00219678 19 11 00219C68 17 11 00219C80 64 11 00219DD0 19 @@ -2053,6 +2065,7 @@ 12 001CA97C 4 12 001CABA0 64 12 00209F30 48 +12 0020AA08 19 12 0020AFF8 17 12 0020B010 64 12 0020B160 19 @@ -2212,6 +2225,7 @@ 13 001CA7FC 4 13 001CAA20 64 13 001F2510 48 +13 001F2F98 19 13 001F3588 17 13 001F35A0 64 13 001F36F0 19 @@ -2371,6 +2385,7 @@ 14 001CABFC 4 14 001CAE20 64 14 001F9DA0 48 +14 001FA878 19 14 001FAE68 17 14 001FAE80 64 14 001FAFD0 19 @@ -2530,6 +2545,7 @@ 15 001CAAFC 4 15 001CAD20 64 15 001E0610 48 +15 001E10E8 19 15 001E16D8 17 15 001E16F0 64 15 001E1840 19 @@ -2689,6 +2705,7 @@ 16 001CA97C 4 16 001CABA0 64 16 001E5D00 48 +16 001E67F8 19 16 001E6DE8 17 16 001E6E00 64 16 001E6F50 19 @@ -2848,6 +2865,7 @@ 17 001CADFC 4 17 001CB020 64 17 001E4460 48 +17 001E4EE8 19 17 001E54D8 17 17 001E54F0 64 17 001E5640 19 @@ -3007,6 +3025,7 @@ 18 001CAEFC 4 18 001CB120 64 18 001F0180 48 +18 001F0C58 19 18 001F1248 17 18 001F1260 64 18 001F13B0 19 diff --git a/configure.py b/configure.py index 5c3e6d1338..3ef51475d7 100755 --- a/configure.py +++ b/configure.py @@ -940,6 +940,7 @@ # link fails when the section is not SIZE bytes. Both the assembly-backed and # the promoted (normalized) unit names resolve to the same retail bytes. RODATA_OVERLAYS = { + "ui/text/copy_text_to_shared_buffer": (0x1E7AA8, 0xE8A28, 19), # "(Message too long)" "_dtoa_r": (0x152310, 0x53290, 88), # Infinity/NaN/0 strings, f64 literals, switch table # _getpic's switch emits a 5-entry jump table (0x14 bytes) that retail # stored at 0x153AA0 inside core_rdata; the expected object references it @@ -973,7 +974,7 @@ "ui/help/draw_help": (0x1E7A70, 0xE89F0, 28), # switch table (migrated) "ui/help/dismiss_help": (0x1E7A20, 0xE89A0, 32), # switch table (migrated) "_sceFs_Rcv_Intr": (0x1528E0, 0x53860, 100), # retail switch table (jtbl_001528E0) - "ui/menus/system/process_menu_entry": (0x1E86A0, 0xE9620, 24), # retail switch table (jtbl_001E86A0) + "ui/menus/system/process_menu_entry": (0x1E8680, 0xE9600, 56), # thousands separators, switch table (jtbl_001E86A0) "draw_sky_shells": (0x1E8910, 0xE9890, 24), # switch table "ui/menus/system/update_timed_menu_sequence": (0x1E8810, 0xE9790, 80), # switch table "mobys/animation/update_resident_dialogue_animation_state": (0x1E8A90, 0xE9A10, 52), # switch table diff --git a/src/ui/menus/system/process_menu_entry.c b/src/ui/menus/system/process_menu_entry.c index 3eed284c4f..1240a49968 100644 --- a/src/ui/menus/system/process_menu_entry.c +++ b/src/ui/menus/system/process_menu_entry.c @@ -35,11 +35,22 @@ typedef struct { #include "rnc/ui/menus/system/process_menu_entry_globals.h" /* Small data, defined above the code so it is reached $gp-relative. */ -s32 menu_help_hud_item __asm__("D_00160070") = -1; -extern s32 world_update_time_macro __asm__("D_0015F60C") MACRO_ADDR; -extern Suffixes menu_bolt_threshold_thousands_separators __asm__("D_001E8680"); -extern char help_text_integer_placeholder[] __asm__("D_00160088"); -extern char bolt_threshold_number_format[] __asm__("D_00160090"); +s32 menu_help_hud_item __asm__("D_00160070") = -1; +extern s32 world_update_time_macro __asm__("D_0015F60C") MACRO_ADDR; +extern char thousands_separator_comma[] __asm__("D_00160078"); +extern char thousands_separator_period[] __asm__("D_00160080"); + +/* The thousands separator of each language. */ +const Suffixes menu_bolt_threshold_thousands_separators __asm__("D_001E8680") = { + { + thousands_separator_comma, thousands_separator_comma, + thousands_separator_comma, thousands_separator_period, + thousands_separator_comma, thousands_separator_period, + } +}; + +extern char help_text_integer_placeholder[] __asm__("D_00160088"); +extern char bolt_threshold_number_format[] __asm__("D_00160090"); #include "rnc/game/item_state.h" #include "rnc/game/game_globals.h" diff --git a/src/ui/text/copy_text_to_shared_buffer.c b/src/ui/text/copy_text_to_shared_buffer.c index 5370142dc9..81d6f46e96 100644 --- a/src/ui/text/copy_text_to_shared_buffer.c +++ b/src/ui/text/copy_text_to_shared_buffer.c @@ -4,11 +4,11 @@ struct Str19 { char c[19]; }; -extern struct Str19 message_too_long_label __asm__("D_001E7AA8"); -extern char message_text_buffer[0x50] __asm__("D_0019A440"); -extern u32 strlen(const char *); -extern char *strcpy(char *, const char *); -void copy_text_to_shared_buffer(char *s) __asm__("FUN_001ff658"); +extern const struct Str19 message_too_long_label __asm__("D_001E7AA8"); +extern char message_text_buffer[0x50] __asm__("D_0019A440"); +extern u32 strlen(const char *); +extern char *strcpy(char *, const char *); +void copy_text_to_shared_buffer(char *s) __asm__("FUN_001ff658"); void copy_text_to_shared_buffer(char *source_text) { if (strlen(source_text) < 0x50) { @@ -21,3 +21,5 @@ void copy_text_to_shared_buffer(char *source_text) { char message_text_buffer[0x50] __asm__("D_0019A440") = {0}; extern __typeof__(copy_text_to_shared_buffer) func_001FF658 __attribute__((alias("FUN_001ff658"))); + +const struct Str19 message_too_long_label __asm__("D_001E7AA8") = {"(Message too long)"}; From aa36ca9079c160b821d8e833c473ddf025500baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:34:09 +0000 Subject: [PATCH 078/213] chore: prove switch tables among the level copies of executable data A table entry that points into an executable function counts when the level's entry points at the same offset in that function's copy. --- config/us/levels/exe_data.tsv | 323 ++++++++++++++++++++++++++++++++ scripts/lib/overlay_exe_data.py | 21 +++ 2 files changed, 344 insertions(+) diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index 4216ad0449..b6b48de9fe 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -146,15 +146,32 @@ 00 001CA720 64 00 001E7A50 48 00 001E84D8 19 +00 001E8510 100 +00 001E8760 32 00 001E8B18 17 00 001E8B30 64 00 001E8C80 19 +00 001E8CB0 348 00 001E8E10 35 +00 001E8E40 40 +00 001E8F40 128 00 001E90F8 36 +00 001E9120 56 00 001E91C8 60 +00 001E9210 48 +00 001E9240 48 00 001E9270 24 +00 001E9290 28 +00 001E92B0 80 +00 001E9300 80 +00 001E9350 28 +00 001E93B0 24 +00 001E93D0 36 +00 001E9400 36 00 001E9428 28 00 001E94B0 21 +00 001E94D0 52 +00 001E9510 24 00 001E9530 61 00 001E9570 71 00 001E9700 18 @@ -306,15 +323,32 @@ 01 001CABA0 64 01 00208AB0 48 01 00209588 19 +01 002095C0 100 +01 002097C0 32 01 00209B78 17 01 00209B90 64 01 00209CE0 19 +01 00209D10 348 01 00209E70 35 +01 00209EA0 40 +01 00209FA0 128 01 0020A158 36 +01 0020A180 56 01 0020A228 60 +01 0020A270 48 +01 0020A2A0 48 01 0020A2D0 24 +01 0020A2F0 28 +01 0020A310 80 +01 0020A360 80 +01 0020A3B0 28 +01 0020A410 24 +01 0020A430 36 +01 0020A460 36 01 0020A488 28 01 0020A510 21 +01 0020A530 52 +01 0020A570 24 01 0020A590 61 01 0020A5D0 71 01 0020A760 18 @@ -466,15 +500,32 @@ 02 001CAD20 64 02 001F8350 48 02 001F8E28 19 +02 001F8E60 100 +02 001F9060 32 02 001F9418 17 02 001F9430 64 02 001F9580 19 +02 001F95B0 348 02 001F9710 35 +02 001F9740 40 +02 001F9840 128 02 001F99F8 36 +02 001F9A20 56 02 001F9AC8 60 +02 001F9B10 48 +02 001F9B40 48 02 001F9B70 24 +02 001F9B90 28 +02 001F9BB0 80 +02 001F9C00 80 +02 001F9C50 28 +02 001F9CB0 24 +02 001F9CD0 36 +02 001F9D00 36 02 001F9D28 28 02 001F9DB0 21 +02 001F9DD0 52 +02 001F9E10 24 02 001F9E30 61 02 001F9E70 71 02 001FA000 18 @@ -626,15 +677,32 @@ 03 001CA820 64 03 001E06D0 48 03 001E11A8 19 +03 001E11E0 100 +03 001E13E0 32 03 001E1798 17 03 001E17B0 64 03 001E1900 19 +03 001E1930 348 03 001E1A90 35 +03 001E1AC0 40 +03 001E1BC0 128 03 001E1D78 36 +03 001E1DA0 56 03 001E1E48 60 +03 001E1E90 48 +03 001E1EC0 48 03 001E1EF0 24 +03 001E1F10 28 +03 001E1F30 80 +03 001E1F80 80 +03 001E1FD0 28 +03 001E2030 24 +03 001E2050 36 +03 001E2080 36 03 001E20A8 28 03 001E2130 21 +03 001E2150 52 +03 001E2190 24 03 001E21B0 61 03 001E21F0 71 03 001E2380 18 @@ -786,15 +854,32 @@ 04 001CA8A0 64 04 001D9840 48 04 001DA2C8 19 +04 001DA300 100 +04 001DA500 32 04 001DA8B8 17 04 001DA8D0 64 04 001DAA20 19 +04 001DAA50 348 04 001DABB0 35 +04 001DABE0 40 +04 001DACE0 128 04 001DAE98 36 +04 001DAEC0 56 04 001DAF68 60 +04 001DAFB0 48 +04 001DAFE0 48 04 001DB010 24 +04 001DB030 28 +04 001DB050 80 +04 001DB0A0 80 +04 001DB0F0 28 +04 001DB150 24 +04 001DB170 36 +04 001DB1A0 36 04 001DB1C8 28 04 001DB250 21 +04 001DB270 52 +04 001DB2B0 24 04 001DB2D0 61 04 001DB310 71 04 001DB4A0 18 @@ -946,15 +1031,32 @@ 05 001CABA0 64 05 00216140 48 05 00216C38 19 +05 00216C70 100 +05 00216E70 32 05 00217228 17 05 00217240 64 05 00217390 19 +05 002173C0 348 05 00217520 35 +05 00217550 40 +05 00217650 128 05 00217808 36 +05 00217830 56 05 002178D8 60 +05 00217920 48 +05 00217950 48 05 00217980 24 +05 002179A0 28 +05 002179C0 80 +05 00217A10 80 +05 00217A60 28 +05 00217AC0 24 +05 00217AE0 36 +05 00217B10 36 05 00217B38 28 05 00217BC0 21 +05 00217BE0 52 +05 00217C20 24 05 00217C40 61 05 00217C80 71 05 00217E10 18 @@ -1106,15 +1208,32 @@ 06 001CAEA0 64 06 001FEEA0 48 06 001FF928 19 +06 001FF960 100 +06 001FFB60 32 06 001FFF18 17 06 001FFF30 64 06 00200080 19 +06 002000B0 348 06 00200210 35 +06 00200240 40 +06 00200340 128 06 002004F8 36 +06 00200520 56 06 002005C8 60 +06 00200610 48 +06 00200640 48 06 00200670 24 +06 00200690 28 +06 002006B0 80 +06 00200700 80 +06 00200750 28 +06 002007B0 24 +06 002007D0 36 +06 00200800 36 06 00200828 28 06 002008B0 21 +06 002008D0 52 +06 00200910 24 06 00200930 61 06 00200970 71 06 00200B00 18 @@ -1266,15 +1385,32 @@ 07 001CA7A0 64 07 0020ED40 48 07 0020F7C8 19 +07 0020F800 100 +07 0020FA00 32 07 0020FDB8 17 07 0020FDD0 64 07 0020FF20 19 +07 0020FF50 348 07 002100B0 35 +07 002100E0 40 +07 002101E0 128 07 00210398 36 +07 002103C0 56 07 00210468 60 +07 002104B0 48 +07 002104E0 48 07 00210510 24 +07 00210530 28 +07 00210550 80 +07 002105A0 80 +07 002105F0 28 +07 00210650 24 +07 00210670 36 +07 002106A0 36 07 002106C8 28 07 00210750 21 +07 00210770 52 +07 002107B0 24 07 002107D0 61 07 00210810 71 07 002109A0 18 @@ -1426,15 +1562,32 @@ 08 001CAF20 64 08 001F9990 48 08 001FA468 19 +08 001FA4A0 100 +08 001FA6A0 32 08 001FAA58 17 08 001FAA70 64 08 001FABC0 19 +08 001FABF0 348 08 001FAD50 35 +08 001FAD80 40 +08 001FAE80 128 08 001FB038 36 +08 001FB060 56 08 001FB108 60 +08 001FB150 48 +08 001FB180 48 08 001FB1B0 24 +08 001FB1D0 28 +08 001FB1F0 80 +08 001FB240 80 +08 001FB290 28 +08 001FB2F0 24 +08 001FB310 36 +08 001FB340 36 08 001FB368 28 08 001FB3F0 21 +08 001FB410 52 +08 001FB450 24 08 001FB470 61 08 001FB4B0 71 08 001FB640 18 @@ -1586,15 +1739,32 @@ 09 001CA8A0 64 09 002065B0 48 09 00207038 19 +09 00207070 100 +09 00207270 32 09 00207628 17 09 00207640 64 09 00207790 19 +09 002077C0 348 09 00207920 35 +09 00207950 40 +09 00207A50 128 09 00207C08 36 +09 00207C30 56 09 00207CD8 60 +09 00207D20 48 +09 00207D50 48 09 00207D80 24 +09 00207DA0 28 +09 00207DC0 80 +09 00207E10 80 +09 00207E60 28 +09 00207EC0 24 +09 00207EE0 36 +09 00207F10 36 09 00207F38 28 09 00207FC0 21 +09 00207FE0 52 +09 00208020 24 09 00208040 61 09 00208080 71 09 00208210 18 @@ -1746,15 +1916,32 @@ 10 001CABA0 64 10 001DA820 48 10 001DB2A8 19 +10 001DB2E0 100 +10 001DB4E0 32 10 001DB898 17 10 001DB8B0 64 10 001DBA00 19 +10 001DBA30 348 10 001DBB90 35 +10 001DBBC0 40 +10 001DBCC0 128 10 001DBE78 36 +10 001DBEA0 56 10 001DBF48 60 +10 001DBF90 48 +10 001DBFC0 48 10 001DBFF0 24 +10 001DC010 28 +10 001DC030 80 +10 001DC080 80 +10 001DC0D0 28 +10 001DC130 24 +10 001DC150 36 +10 001DC180 36 10 001DC1A8 28 10 001DC230 21 +10 001DC250 52 +10 001DC290 24 10 001DC2B0 61 10 001DC2F0 71 10 001DC480 18 @@ -1906,15 +2093,32 @@ 11 001CB120 64 11 00218BA0 48 11 00219678 19 +11 002196B0 100 +11 002198B0 32 11 00219C68 17 11 00219C80 64 11 00219DD0 19 +11 00219E00 348 11 00219F60 35 +11 00219F90 40 +11 0021A090 128 11 0021A248 36 +11 0021A270 56 11 0021A318 60 +11 0021A360 48 +11 0021A390 48 11 0021A3C0 24 +11 0021A3E0 28 +11 0021A400 80 +11 0021A450 80 +11 0021A4A0 28 +11 0021A500 24 +11 0021A520 36 +11 0021A550 36 11 0021A578 28 11 0021A600 21 +11 0021A620 52 +11 0021A660 24 11 0021A680 61 11 0021A6C0 71 11 0021A850 18 @@ -2066,15 +2270,32 @@ 12 001CABA0 64 12 00209F30 48 12 0020AA08 19 +12 0020AA40 100 +12 0020AC40 32 12 0020AFF8 17 12 0020B010 64 12 0020B160 19 +12 0020B190 348 12 0020B2F0 35 +12 0020B320 40 +12 0020B420 128 12 0020B5D8 36 +12 0020B600 56 12 0020B6A8 60 +12 0020B6F0 48 +12 0020B720 48 12 0020B750 24 +12 0020B770 28 +12 0020B790 80 +12 0020B7E0 80 +12 0020B830 28 +12 0020B890 24 +12 0020B8B0 36 +12 0020B8E0 36 12 0020B908 28 12 0020B990 21 +12 0020B9B0 52 +12 0020B9F0 24 12 0020BA10 61 12 0020BA50 71 12 0020BBE0 18 @@ -2226,15 +2447,32 @@ 13 001CAA20 64 13 001F2510 48 13 001F2F98 19 +13 001F2FD0 100 +13 001F31D0 32 13 001F3588 17 13 001F35A0 64 13 001F36F0 19 +13 001F3720 348 13 001F3880 35 +13 001F38B0 40 +13 001F39B0 128 13 001F3B68 36 +13 001F3B90 56 13 001F3C38 60 +13 001F3C80 48 +13 001F3CB0 48 13 001F3CE0 24 +13 001F3D00 28 +13 001F3D20 80 +13 001F3D70 80 +13 001F3DC0 28 +13 001F3E20 24 +13 001F3E40 36 +13 001F3E70 36 13 001F3E98 28 13 001F3F20 21 +13 001F3F40 52 +13 001F3F80 24 13 001F3FA0 61 13 001F3FE0 71 13 001F4170 18 @@ -2386,15 +2624,32 @@ 14 001CAE20 64 14 001F9DA0 48 14 001FA878 19 +14 001FA8B0 100 +14 001FAAB0 32 14 001FAE68 17 14 001FAE80 64 14 001FAFD0 19 +14 001FB000 348 14 001FB160 35 +14 001FB190 40 +14 001FB290 128 14 001FB448 36 +14 001FB470 56 14 001FB518 60 +14 001FB560 48 +14 001FB590 48 14 001FB5C0 24 +14 001FB5E0 28 +14 001FB600 80 +14 001FB650 80 +14 001FB6A0 28 +14 001FB700 24 +14 001FB720 36 +14 001FB750 36 14 001FB778 28 14 001FB800 21 +14 001FB820 52 +14 001FB860 24 14 001FB880 61 14 001FB8C0 71 14 001FBA50 18 @@ -2546,15 +2801,32 @@ 15 001CAD20 64 15 001E0610 48 15 001E10E8 19 +15 001E1120 100 +15 001E1320 32 15 001E16D8 17 15 001E16F0 64 15 001E1840 19 +15 001E1870 348 15 001E19D0 35 +15 001E1A00 40 +15 001E1B00 128 15 001E1CB8 36 +15 001E1CE0 56 15 001E1D88 60 +15 001E1DD0 48 +15 001E1E00 48 15 001E1E30 24 +15 001E1E50 28 +15 001E1E70 80 +15 001E1EC0 80 +15 001E1F10 28 +15 001E1F70 24 +15 001E1F90 36 +15 001E1FC0 36 15 001E1FE8 28 15 001E2070 21 +15 001E2090 52 +15 001E20D0 24 15 001E20F0 61 15 001E2130 71 15 001E22C0 18 @@ -2706,15 +2978,32 @@ 16 001CABA0 64 16 001E5D00 48 16 001E67F8 19 +16 001E6830 100 +16 001E6A30 32 16 001E6DE8 17 16 001E6E00 64 16 001E6F50 19 +16 001E6F80 348 16 001E70E0 35 +16 001E7110 40 +16 001E7210 128 16 001E73C8 36 +16 001E73F0 56 16 001E7498 60 +16 001E74E0 48 +16 001E7510 48 16 001E7540 24 +16 001E7560 28 +16 001E7580 80 +16 001E75D0 80 +16 001E7620 28 +16 001E7680 24 +16 001E76A0 36 +16 001E76D0 36 16 001E76F8 28 16 001E7780 21 +16 001E77A0 52 +16 001E77E0 24 16 001E7800 61 16 001E7840 71 16 001E79D0 18 @@ -2866,15 +3155,32 @@ 17 001CB020 64 17 001E4460 48 17 001E4EE8 19 +17 001E4F20 100 +17 001E5120 32 17 001E54D8 17 17 001E54F0 64 17 001E5640 19 +17 001E5670 348 17 001E57D0 35 +17 001E5800 40 +17 001E5900 128 17 001E5AB8 36 +17 001E5AE0 56 17 001E5B88 60 +17 001E5BD0 48 +17 001E5C00 48 17 001E5C30 24 +17 001E5C50 28 +17 001E5C70 80 +17 001E5CC0 80 +17 001E5D10 28 +17 001E5D70 24 +17 001E5D90 36 +17 001E5DC0 36 17 001E5DE8 28 17 001E5E70 21 +17 001E5E90 52 +17 001E5ED0 24 17 001E5EF0 61 17 001E5F30 71 17 001E60C0 18 @@ -3026,15 +3332,32 @@ 18 001CB120 64 18 001F0180 48 18 001F0C58 19 +18 001F0C90 100 +18 001F0E90 32 18 001F1248 17 18 001F1260 64 18 001F13B0 19 +18 001F13E0 348 18 001F1540 35 +18 001F1570 40 +18 001F1670 128 18 001F1828 36 +18 001F1850 56 18 001F18F8 60 +18 001F1940 48 +18 001F1970 48 18 001F19A0 24 +18 001F19C0 28 +18 001F19E0 80 +18 001F1A30 80 +18 001F1A80 28 +18 001F1AE0 24 +18 001F1B00 36 +18 001F1B30 36 18 001F1B58 28 18 001F1BE0 21 +18 001F1C00 52 +18 001F1C40 24 18 001F1C60 61 18 001F1CA0 71 18 001F1E30 18 diff --git a/scripts/lib/overlay_exe_data.py b/scripts/lib/overlay_exe_data.py index ef90aa8a08..2f73d74b96 100644 --- a/scripts/lib/overlay_exe_data.py +++ b/scripts/lib/overlay_exe_data.py @@ -10,6 +10,7 @@ from __future__ import annotations import ast +import bisect from collections import Counter, defaultdict from functools import lru_cache @@ -143,6 +144,24 @@ def _same_code(level: int, a: int, b: int, name: str) -> bool: return True +@lru_cache(maxsize=None) +def _exe_functions() -> list[tuple[int, int, tuple]]: + """(address, size, places) of every executable function the levels copy, by address.""" + return sorted((int(r.name[-8:], 16), r.size, tuple(r.places)) + for r in ov.read_catalogue().values() if r.kind == "exe") + + +def _inside_copy(level: int, a: int, b: int) -> bool: + """A points into an executable function (a switch table's case) and B to + the same offset in that function's copy in this level.""" + rows = _exe_functions() + i = bisect.bisect_right(rows, (a, 1 << 32)) - 1 + if i < 0 or not rows[i][0] <= a < rows[i][0] + rows[i][1]: + return False + start, _size, places = rows[i] + return any(lv == level and p + (a - start) == b for lv, p in places) + + def _pointers_match(level: int, mine: bytes, theirs: bytes, d: int, code: dict[int, str]) -> bool: """Every differing word is a pointer the level moved: data by D (or as its code reads it), a function to its copy in this level.""" @@ -160,5 +179,7 @@ def _pointers_match(level: int, mine: bytes, theirs: bytes, d: int, code: dict[i continue if a >= DATA_HIGH and b in code and _same_code(level, a, b, code[b]): continue + if a >= DATA_HIGH and _inside_copy(level, a, b): + continue return False return True From a5bce3c7f23c3f68107b9f90ccb4fce299443516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:38:28 +0000 Subject: [PATCH 079/213] decomp: define the debug messages of eight units in C --- config/us/levels/exe_data.tsv | 114 ++++++++++++++++++ configure.py | 8 ++ src/game/startlevel.c | 20 +-- src/mobys/create_moby.c | 5 +- .../frame/initialize_level_render_state.c | 5 +- src/rendering/lights/detach_point_light.c | 15 ++- src/rendering/mobys/draw_mobys.c | 12 +- src/rendering/texture/dma_shrub_textures.c | 10 +- src/rendering/texture/dma_tfrag_textures.c | 12 +- src/rendering/texture/dma_tie_textures.c | 10 +- 10 files changed, 178 insertions(+), 33 deletions(-) diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index b6b48de9fe..796cbacf74 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -147,6 +147,7 @@ 00 001E7A50 48 00 001E84D8 19 00 001E8510 100 +00 001E85D0 105 00 001E8760 32 00 001E8B18 17 00 001E8B30 64 @@ -154,6 +155,8 @@ 00 001E8CB0 348 00 001E8E10 35 00 001E8E40 40 +00 001E8E70 57 +00 001E8EB0 35 00 001E8F40 128 00 001E90F8 36 00 001E9120 56 @@ -165,10 +168,13 @@ 00 001E92B0 80 00 001E9300 80 00 001E9350 28 +00 001E9370 24 00 001E93B0 24 00 001E93D0 36 00 001E9400 36 00 001E9428 28 +00 001E9450 24 +00 001E9468 22 00 001E94B0 21 00 001E94D0 52 00 001E9510 24 @@ -324,6 +330,7 @@ 01 00208AB0 48 01 00209588 19 01 002095C0 100 +01 00209630 105 01 002097C0 32 01 00209B78 17 01 00209B90 64 @@ -331,6 +338,8 @@ 01 00209D10 348 01 00209E70 35 01 00209EA0 40 +01 00209ED0 57 +01 00209F10 35 01 00209FA0 128 01 0020A158 36 01 0020A180 56 @@ -342,10 +351,13 @@ 01 0020A310 80 01 0020A360 80 01 0020A3B0 28 +01 0020A3D0 24 01 0020A410 24 01 0020A430 36 01 0020A460 36 01 0020A488 28 +01 0020A4B0 24 +01 0020A4C8 22 01 0020A510 21 01 0020A530 52 01 0020A570 24 @@ -501,6 +513,7 @@ 02 001F8350 48 02 001F8E28 19 02 001F8E60 100 +02 001F8ED0 105 02 001F9060 32 02 001F9418 17 02 001F9430 64 @@ -508,6 +521,8 @@ 02 001F95B0 348 02 001F9710 35 02 001F9740 40 +02 001F9770 57 +02 001F97B0 35 02 001F9840 128 02 001F99F8 36 02 001F9A20 56 @@ -519,10 +534,13 @@ 02 001F9BB0 80 02 001F9C00 80 02 001F9C50 28 +02 001F9C70 24 02 001F9CB0 24 02 001F9CD0 36 02 001F9D00 36 02 001F9D28 28 +02 001F9D50 24 +02 001F9D68 22 02 001F9DB0 21 02 001F9DD0 52 02 001F9E10 24 @@ -678,6 +696,7 @@ 03 001E06D0 48 03 001E11A8 19 03 001E11E0 100 +03 001E1250 105 03 001E13E0 32 03 001E1798 17 03 001E17B0 64 @@ -685,6 +704,8 @@ 03 001E1930 348 03 001E1A90 35 03 001E1AC0 40 +03 001E1AF0 57 +03 001E1B30 35 03 001E1BC0 128 03 001E1D78 36 03 001E1DA0 56 @@ -696,10 +717,13 @@ 03 001E1F30 80 03 001E1F80 80 03 001E1FD0 28 +03 001E1FF0 24 03 001E2030 24 03 001E2050 36 03 001E2080 36 03 001E20A8 28 +03 001E20D0 24 +03 001E20E8 22 03 001E2130 21 03 001E2150 52 03 001E2190 24 @@ -855,6 +879,7 @@ 04 001D9840 48 04 001DA2C8 19 04 001DA300 100 +04 001DA370 105 04 001DA500 32 04 001DA8B8 17 04 001DA8D0 64 @@ -862,6 +887,8 @@ 04 001DAA50 348 04 001DABB0 35 04 001DABE0 40 +04 001DAC10 57 +04 001DAC50 35 04 001DACE0 128 04 001DAE98 36 04 001DAEC0 56 @@ -873,10 +900,13 @@ 04 001DB050 80 04 001DB0A0 80 04 001DB0F0 28 +04 001DB110 24 04 001DB150 24 04 001DB170 36 04 001DB1A0 36 04 001DB1C8 28 +04 001DB1F0 24 +04 001DB208 22 04 001DB250 21 04 001DB270 52 04 001DB2B0 24 @@ -1032,6 +1062,7 @@ 05 00216140 48 05 00216C38 19 05 00216C70 100 +05 00216CE0 105 05 00216E70 32 05 00217228 17 05 00217240 64 @@ -1039,6 +1070,8 @@ 05 002173C0 348 05 00217520 35 05 00217550 40 +05 00217580 57 +05 002175C0 35 05 00217650 128 05 00217808 36 05 00217830 56 @@ -1050,10 +1083,13 @@ 05 002179C0 80 05 00217A10 80 05 00217A60 28 +05 00217A80 24 05 00217AC0 24 05 00217AE0 36 05 00217B10 36 05 00217B38 28 +05 00217B60 24 +05 00217B78 22 05 00217BC0 21 05 00217BE0 52 05 00217C20 24 @@ -1209,6 +1245,7 @@ 06 001FEEA0 48 06 001FF928 19 06 001FF960 100 +06 001FF9D0 105 06 001FFB60 32 06 001FFF18 17 06 001FFF30 64 @@ -1216,6 +1253,8 @@ 06 002000B0 348 06 00200210 35 06 00200240 40 +06 00200270 57 +06 002002B0 35 06 00200340 128 06 002004F8 36 06 00200520 56 @@ -1227,10 +1266,13 @@ 06 002006B0 80 06 00200700 80 06 00200750 28 +06 00200770 24 06 002007B0 24 06 002007D0 36 06 00200800 36 06 00200828 28 +06 00200850 24 +06 00200868 22 06 002008B0 21 06 002008D0 52 06 00200910 24 @@ -1386,6 +1428,7 @@ 07 0020ED40 48 07 0020F7C8 19 07 0020F800 100 +07 0020F870 105 07 0020FA00 32 07 0020FDB8 17 07 0020FDD0 64 @@ -1393,6 +1436,8 @@ 07 0020FF50 348 07 002100B0 35 07 002100E0 40 +07 00210110 57 +07 00210150 35 07 002101E0 128 07 00210398 36 07 002103C0 56 @@ -1404,10 +1449,13 @@ 07 00210550 80 07 002105A0 80 07 002105F0 28 +07 00210610 24 07 00210650 24 07 00210670 36 07 002106A0 36 07 002106C8 28 +07 002106F0 24 +07 00210708 22 07 00210750 21 07 00210770 52 07 002107B0 24 @@ -1563,6 +1611,7 @@ 08 001F9990 48 08 001FA468 19 08 001FA4A0 100 +08 001FA510 105 08 001FA6A0 32 08 001FAA58 17 08 001FAA70 64 @@ -1570,6 +1619,8 @@ 08 001FABF0 348 08 001FAD50 35 08 001FAD80 40 +08 001FADB0 57 +08 001FADF0 35 08 001FAE80 128 08 001FB038 36 08 001FB060 56 @@ -1581,10 +1632,13 @@ 08 001FB1F0 80 08 001FB240 80 08 001FB290 28 +08 001FB2B0 24 08 001FB2F0 24 08 001FB310 36 08 001FB340 36 08 001FB368 28 +08 001FB390 24 +08 001FB3A8 22 08 001FB3F0 21 08 001FB410 52 08 001FB450 24 @@ -1740,6 +1794,7 @@ 09 002065B0 48 09 00207038 19 09 00207070 100 +09 002070E0 105 09 00207270 32 09 00207628 17 09 00207640 64 @@ -1747,6 +1802,8 @@ 09 002077C0 348 09 00207920 35 09 00207950 40 +09 00207980 57 +09 002079C0 35 09 00207A50 128 09 00207C08 36 09 00207C30 56 @@ -1758,10 +1815,13 @@ 09 00207DC0 80 09 00207E10 80 09 00207E60 28 +09 00207E80 24 09 00207EC0 24 09 00207EE0 36 09 00207F10 36 09 00207F38 28 +09 00207F60 24 +09 00207F78 22 09 00207FC0 21 09 00207FE0 52 09 00208020 24 @@ -1917,6 +1977,7 @@ 10 001DA820 48 10 001DB2A8 19 10 001DB2E0 100 +10 001DB350 105 10 001DB4E0 32 10 001DB898 17 10 001DB8B0 64 @@ -1924,6 +1985,8 @@ 10 001DBA30 348 10 001DBB90 35 10 001DBBC0 40 +10 001DBBF0 57 +10 001DBC30 35 10 001DBCC0 128 10 001DBE78 36 10 001DBEA0 56 @@ -1935,10 +1998,13 @@ 10 001DC030 80 10 001DC080 80 10 001DC0D0 28 +10 001DC0F0 24 10 001DC130 24 10 001DC150 36 10 001DC180 36 10 001DC1A8 28 +10 001DC1D0 24 +10 001DC1E8 22 10 001DC230 21 10 001DC250 52 10 001DC290 24 @@ -2094,6 +2160,7 @@ 11 00218BA0 48 11 00219678 19 11 002196B0 100 +11 00219720 105 11 002198B0 32 11 00219C68 17 11 00219C80 64 @@ -2101,6 +2168,8 @@ 11 00219E00 348 11 00219F60 35 11 00219F90 40 +11 00219FC0 57 +11 0021A000 35 11 0021A090 128 11 0021A248 36 11 0021A270 56 @@ -2112,10 +2181,13 @@ 11 0021A400 80 11 0021A450 80 11 0021A4A0 28 +11 0021A4C0 24 11 0021A500 24 11 0021A520 36 11 0021A550 36 11 0021A578 28 +11 0021A5A0 24 +11 0021A5B8 22 11 0021A600 21 11 0021A620 52 11 0021A660 24 @@ -2271,6 +2343,7 @@ 12 00209F30 48 12 0020AA08 19 12 0020AA40 100 +12 0020AAB0 105 12 0020AC40 32 12 0020AFF8 17 12 0020B010 64 @@ -2278,6 +2351,8 @@ 12 0020B190 348 12 0020B2F0 35 12 0020B320 40 +12 0020B350 57 +12 0020B390 35 12 0020B420 128 12 0020B5D8 36 12 0020B600 56 @@ -2289,10 +2364,13 @@ 12 0020B790 80 12 0020B7E0 80 12 0020B830 28 +12 0020B850 24 12 0020B890 24 12 0020B8B0 36 12 0020B8E0 36 12 0020B908 28 +12 0020B930 24 +12 0020B948 22 12 0020B990 21 12 0020B9B0 52 12 0020B9F0 24 @@ -2448,6 +2526,7 @@ 13 001F2510 48 13 001F2F98 19 13 001F2FD0 100 +13 001F3040 105 13 001F31D0 32 13 001F3588 17 13 001F35A0 64 @@ -2455,6 +2534,8 @@ 13 001F3720 348 13 001F3880 35 13 001F38B0 40 +13 001F38E0 57 +13 001F3920 35 13 001F39B0 128 13 001F3B68 36 13 001F3B90 56 @@ -2466,10 +2547,13 @@ 13 001F3D20 80 13 001F3D70 80 13 001F3DC0 28 +13 001F3DE0 24 13 001F3E20 24 13 001F3E40 36 13 001F3E70 36 13 001F3E98 28 +13 001F3EC0 24 +13 001F3ED8 22 13 001F3F20 21 13 001F3F40 52 13 001F3F80 24 @@ -2625,6 +2709,7 @@ 14 001F9DA0 48 14 001FA878 19 14 001FA8B0 100 +14 001FA920 105 14 001FAAB0 32 14 001FAE68 17 14 001FAE80 64 @@ -2632,6 +2717,8 @@ 14 001FB000 348 14 001FB160 35 14 001FB190 40 +14 001FB1C0 57 +14 001FB200 35 14 001FB290 128 14 001FB448 36 14 001FB470 56 @@ -2643,10 +2730,13 @@ 14 001FB600 80 14 001FB650 80 14 001FB6A0 28 +14 001FB6C0 24 14 001FB700 24 14 001FB720 36 14 001FB750 36 14 001FB778 28 +14 001FB7A0 24 +14 001FB7B8 22 14 001FB800 21 14 001FB820 52 14 001FB860 24 @@ -2802,6 +2892,7 @@ 15 001E0610 48 15 001E10E8 19 15 001E1120 100 +15 001E1190 105 15 001E1320 32 15 001E16D8 17 15 001E16F0 64 @@ -2809,6 +2900,8 @@ 15 001E1870 348 15 001E19D0 35 15 001E1A00 40 +15 001E1A30 57 +15 001E1A70 35 15 001E1B00 128 15 001E1CB8 36 15 001E1CE0 56 @@ -2820,10 +2913,13 @@ 15 001E1E70 80 15 001E1EC0 80 15 001E1F10 28 +15 001E1F30 24 15 001E1F70 24 15 001E1F90 36 15 001E1FC0 36 15 001E1FE8 28 +15 001E2010 24 +15 001E2028 22 15 001E2070 21 15 001E2090 52 15 001E20D0 24 @@ -2979,6 +3075,7 @@ 16 001E5D00 48 16 001E67F8 19 16 001E6830 100 +16 001E68A0 105 16 001E6A30 32 16 001E6DE8 17 16 001E6E00 64 @@ -2986,6 +3083,8 @@ 16 001E6F80 348 16 001E70E0 35 16 001E7110 40 +16 001E7140 57 +16 001E7180 35 16 001E7210 128 16 001E73C8 36 16 001E73F0 56 @@ -2997,10 +3096,13 @@ 16 001E7580 80 16 001E75D0 80 16 001E7620 28 +16 001E7640 24 16 001E7680 24 16 001E76A0 36 16 001E76D0 36 16 001E76F8 28 +16 001E7720 24 +16 001E7738 22 16 001E7780 21 16 001E77A0 52 16 001E77E0 24 @@ -3156,6 +3258,7 @@ 17 001E4460 48 17 001E4EE8 19 17 001E4F20 100 +17 001E4F90 105 17 001E5120 32 17 001E54D8 17 17 001E54F0 64 @@ -3163,6 +3266,8 @@ 17 001E5670 348 17 001E57D0 35 17 001E5800 40 +17 001E5830 57 +17 001E5870 35 17 001E5900 128 17 001E5AB8 36 17 001E5AE0 56 @@ -3174,10 +3279,13 @@ 17 001E5C70 80 17 001E5CC0 80 17 001E5D10 28 +17 001E5D30 24 17 001E5D70 24 17 001E5D90 36 17 001E5DC0 36 17 001E5DE8 28 +17 001E5E10 24 +17 001E5E28 22 17 001E5E70 21 17 001E5E90 52 17 001E5ED0 24 @@ -3333,6 +3441,7 @@ 18 001F0180 48 18 001F0C58 19 18 001F0C90 100 +18 001F0D00 105 18 001F0E90 32 18 001F1248 17 18 001F1260 64 @@ -3340,6 +3449,8 @@ 18 001F13E0 348 18 001F1540 35 18 001F1570 40 +18 001F15A0 57 +18 001F15E0 35 18 001F1670 128 18 001F1828 36 18 001F1850 56 @@ -3351,10 +3462,13 @@ 18 001F19E0 80 18 001F1A30 80 18 001F1A80 28 +18 001F1AA0 24 18 001F1AE0 24 18 001F1B00 36 18 001F1B30 36 18 001F1B58 28 +18 001F1B80 24 +18 001F1B98 22 18 001F1BE0 21 18 001F1C00 52 18 001F1C40 24 diff --git a/configure.py b/configure.py index 3ef51475d7..71e0c2a726 100755 --- a/configure.py +++ b/configure.py @@ -940,6 +940,14 @@ # link fails when the section is not SIZE bytes. Both the assembly-backed and # the promoted (normalized) unit names resolve to the same retail bytes. RODATA_OVERLAYS = { + "game/startlevel": (0x1E76C0, 0xE8640, 23), + "rendering/frame/initialize_level_render_state": (0x1E76D8, 0xE8658, 80), + "rendering/lights/detach_point_light": (0x1E7B50, 0xE8AD0, 105), + "mobys/create_moby": (0x1E83C0, 0xE9340, 57), + "rendering/mobys/draw_mobys": (0x1E8400, 0xE9380, 35), + "rendering/texture/dma_shrub_textures": (0x1E88D0, 0xE9850, 24), + "rendering/texture/dma_tfrag_textures": (0x1E89B0, 0xE9930, 24), + "rendering/texture/dma_tie_textures": (0x1E8A50, 0xE99D0, 22), "ui/text/copy_text_to_shared_buffer": (0x1E7AA8, 0xE8A28, 19), # "(Message too long)" "_dtoa_r": (0x152310, 0x53290, 88), # Infinity/NaN/0 strings, f64 literals, switch table # _getpic's switch emits a 5-entry jump table (0x14 bytes) that retail diff --git a/src/game/startlevel.c b/src/game/startlevel.c index b5216e6288..88356f9817 100644 --- a/src/game/startlevel.c +++ b/src/game/startlevel.c @@ -31,15 +31,15 @@ typedef struct { s32 code; } LevelHeader; -extern s32 boot_level_active __asm__("D_0015F5E8") MACRO_ADDR; -extern u8 level_bss_start[] __asm__("D_00161280"); -extern s32 game_frame_counter_macro __asm__("D_0015F438") MACRO_ADDR; -extern s32 boot_image_buffer __asm__("D_0015EF5C") MACRO_ADDR; -extern s32 decode_mode_macro __asm__("D_0015EED8") MACRO_ADDR; -extern u8 D_24135F[]; -extern s32 boot_intro_movie_ntsc[] __asm__("D_00139378"); -extern s32 boot_intro_movie_pal[] __asm__("D_00139380"); -extern char loading_boot_sound_bank_message[] __asm__("D_001E76C0"); +extern s32 boot_level_active __asm__("D_0015F5E8") MACRO_ADDR; +extern u8 level_bss_start[] __asm__("D_00161280"); +extern s32 game_frame_counter_macro __asm__("D_0015F438") MACRO_ADDR; +extern s32 boot_image_buffer __asm__("D_0015EF5C") MACRO_ADDR; +extern s32 decode_mode_macro __asm__("D_0015EED8") MACRO_ADDR; +extern u8 D_24135F[]; +extern s32 boot_intro_movie_ntsc[] __asm__("D_00139378"); +extern s32 boot_intro_movie_pal[] __asm__("D_00139380"); +extern const char loading_boot_sound_bank_message[] __asm__("D_001E76C0"); extern volatile SoundDef *volatile level_sound_defs __asm__("D_0015F634"); extern volatile s32 level_sound_def_count __asm__("D_0015F630"); @@ -230,3 +230,5 @@ volatile SoundDef boot_sound_defs_b[5] = { }; s32 boot_image_buffer __asm__("D_0015EF5C") MACRO_ADDR = 0; + +const char loading_boot_sound_bank_message[] __asm__("D_001E76C0") = "loading sound bank...\n"; diff --git a/src/mobys/create_moby.c b/src/mobys/create_moby.c index 5424052b36..aa663cf818 100644 --- a/src/mobys/create_moby.c +++ b/src/mobys/create_moby.c @@ -9,7 +9,7 @@ extern s32 num_spawnable_mobys __asm__("D_0015FEFC") MACRO_ADDR; extern struct Moby *moby_instance_end __asm__("D_0015FF1C"); extern struct Moby *moby_instance_perm_end __asm__("D_0015FF20"); extern u8 *moby_vars __asm__("D_0015FF28"); -extern char s_tried_to_create_moby[] __asm__("D_001E83C0"); +extern const char s_tried_to_create_moby[] __asm__("D_001E83C0"); extern void fill_transfer_words(void *, s32, s32) __asm__("func_001F97E8"); extern void init_moby_instance(struct Moby *, s32) __asm__("func_0020C5F0"); @@ -44,3 +44,6 @@ extern __typeof__(create_moby) func_0020C4F8 __attribute__((alias("FUN_0020c4f8" /* Defined below their only users, so retail reaches them with lui. */ s32 num_spawnable_mobys __asm__("D_0015FEFC") MACRO_ADDR = 0; + +const char s_tried_to_create_moby[] __asm__("D_001E83C0") = + "Tried to create moby and couldn't. Time: %d, oClass: %d\n"; diff --git a/src/rendering/frame/initialize_level_render_state.c b/src/rendering/frame/initialize_level_render_state.c index 0a0d410017..430b181442 100644 --- a/src/rendering/frame/initialize_level_render_state.c +++ b/src/rendering/frame/initialize_level_render_state.c @@ -123,7 +123,7 @@ extern u8 point_lights[] __asm__("D_0019C1C0"); extern u8 D_001AAA40[]; extern u8 D_001CD780[]; extern u8 object_render_class_slot_by_id[] __asm__("D_001E1A00"); -extern char too_many_directional_lights_message[] __asm__("D_001E76D8"); +extern const char too_many_directional_lights_message[] __asm__("D_001E76D8"); extern void fill_transfer_words(void *, s32, s32) __asm__("FUN_001f97e8"); extern void update_fog(void) __asm__("func_001F2588"); @@ -479,3 +479,6 @@ MobyGrids moby_grids = {0}; u32 moby_grid_block_bitmap[24] = {0}; ShrubInstance *shrubs = 0; + +const char too_many_directional_lights_message[] __asm__("D_001E76D8") = + "!!!! Too many directional lights !!!! - Lighting will look bogus as a penalty.\n"; diff --git a/src/rendering/lights/detach_point_light.c b/src/rendering/lights/detach_point_light.c index 4a47315e42..d18fecaa79 100644 --- a/src/rendering/lights/detach_point_light.c +++ b/src/rendering/lights/detach_point_light.c @@ -33,10 +33,10 @@ struct PointLightIndexRanges { s32 instance_indices_address; }; -extern u8 tie_point_light_missing_message[] __asm__("D_001E7B50"); -extern u8 tfrag_point_light_missing_message[] __asm__("D_001E7B70"); -extern u8 shrub_point_light_missing_message[] __asm__("D_001E7B98"); -void detach_point_light(s32 light_index) __asm__("FUN_00201f88"); +extern const u8 tie_point_light_missing_message[] __asm__("D_001E7B50"); +extern const u8 tfrag_point_light_missing_message[] __asm__("D_001E7B70"); +extern const u8 shrub_point_light_missing_message[] __asm__("D_001E7B98"); +void detach_point_light(s32 light_index) __asm__("FUN_00201f88"); void detach_point_light(s32 light_index) { s16 *tie_index_cursor; @@ -152,3 +152,10 @@ void detach_point_light(s32 light_index) { light_entry->shrub_start = 0; light_entry->shrub_count = 0; } + +const u8 + tie_point_light_missing_message[] __asm__("D_001E7B50") = "screwed up point light on tie\n"; +const u8 + tfrag_point_light_missing_message[] __asm__("D_001E7B70") = "screwed up point light on tfrag\n"; +const u8 + shrub_point_light_missing_message[] __asm__("D_001E7B98") = "screwed up point light on shrub\n"; diff --git a/src/rendering/mobys/draw_mobys.c b/src/rendering/mobys/draw_mobys.c index 0e02631f0f..6bbb20475d 100644 --- a/src/rendering/mobys/draw_mobys.c +++ b/src/rendering/mobys/draw_mobys.c @@ -5,11 +5,11 @@ #include "rnc/rendering/mobys/draw_mobys_clean_up.h" #include "rnc/sdk/debug.h" -extern u8 vu_chain_overflow_message[] __asm__("D_001E8400"); -extern s32 D_0018A2D8[]; -extern void draw_mobys_setup() __asm__("func_0020D278"); -extern s32 moby_proc() __asm__("func_00211808"); -void draw_mobys(void) __asm__("FUN_0020d460"); +extern const u8 vu_chain_overflow_message[] __asm__("D_001E8400"); +extern s32 D_0018A2D8[]; +extern void draw_mobys_setup() __asm__("func_0020D278"); +extern s32 moby_proc() __asm__("func_00211808"); +void draw_mobys(void) __asm__("FUN_0020d460"); void draw_mobys(void) { register s32 flag; @@ -29,3 +29,5 @@ void draw_mobys(void) { } extern void func_0020D460(void) __attribute__((alias("FUN_0020d460"))); + +const u8 vu_chain_overflow_message[] __asm__("D_001E8400") = "vu chain overflow - mobys dropped\n"; diff --git a/src/rendering/texture/dma_shrub_textures.c b/src/rendering/texture/dma_shrub_textures.c index b5731e18e6..ac1968c9e7 100644 --- a/src/rendering/texture/dma_shrub_textures.c +++ b/src/rendering/texture/dma_shrub_textures.c @@ -8,10 +8,10 @@ extern struct TagPtr D_001603F0; #include "rnc/rendering/texture/dma_shrub_textures_globals.h" -extern char shrub_texture_overflow_message[] __asm__("D_001E88D0"); -extern s32 build_shrub_texture_dma(s32) __asm__("FUN_0022a330"); -extern void vu1_tex_flush(void) __asm__("func_00233B68"); -void dma_shrub_textures(void) __asm__("FUN_002288f0"); +extern const char shrub_texture_overflow_message[] __asm__("D_001E88D0"); +extern s32 build_shrub_texture_dma(s32) __asm__("FUN_0022a330"); +extern void vu1_tex_flush(void) __asm__("func_00233B68"); +void dma_shrub_textures(void) __asm__("FUN_002288f0"); void dma_shrub_textures(void) { struct DmaTag *tag; @@ -47,3 +47,5 @@ void dma_shrub_textures(void) { extern __typeof__(dma_shrub_textures) func_002288F0 __attribute__((alias("FUN_002288f0"))); s32 max_shrub_texture_dma_size = 0; + +const char shrub_texture_overflow_message[] __asm__("D_001E88D0") = "shrub texture overflow\n"; diff --git a/src/rendering/texture/dma_tfrag_textures.c b/src/rendering/texture/dma_tfrag_textures.c index 1c18df6e7c..5d261681b3 100644 --- a/src/rendering/texture/dma_tfrag_textures.c +++ b/src/rendering/texture/dma_tfrag_textures.c @@ -8,11 +8,11 @@ extern struct TagPtr D_00160EBC; #include "rnc/rendering/texture/dma_tfrag_textures_globals.h" -extern char tfrag_texture_overflow_message[] __asm__("D_001E89B0"); -extern void compute_tfrag_texture_usage(void) __asm__("FUN_00234bd8"); -extern s32 build_tfrag_texture_dma(s32) __asm__("func_00234D48"); -extern void vu1_tex_flush(void) __asm__("func_00233B68"); -void dma_tfrag_textures(void) __asm__("FUN_002331c0"); +extern const char tfrag_texture_overflow_message[] __asm__("D_001E89B0"); +extern void compute_tfrag_texture_usage(void) __asm__("FUN_00234bd8"); +extern s32 build_tfrag_texture_dma(s32) __asm__("func_00234D48"); +extern void vu1_tex_flush(void) __asm__("func_00233B68"); +void dma_tfrag_textures(void) __asm__("FUN_002331c0"); void dma_tfrag_textures(void) { struct DmaTag *tag; @@ -49,3 +49,5 @@ void dma_tfrag_textures(void) { extern __typeof__(dma_tfrag_textures) func_002331C0 __attribute__((alias("FUN_002331c0"))); s32 max_tfrag_texture_dma_size = 0; + +const char tfrag_texture_overflow_message[] __asm__("D_001E89B0") = "tfrag texture overflow\n"; diff --git a/src/rendering/texture/dma_tie_textures.c b/src/rendering/texture/dma_tie_textures.c index 99f4f1c423..7eb05576a6 100644 --- a/src/rendering/texture/dma_tie_textures.c +++ b/src/rendering/texture/dma_tie_textures.c @@ -8,10 +8,10 @@ extern struct TagPtr D_00160F68; #include "rnc/rendering/texture/dma_tie_textures_globals.h" -extern char tie_texture_overflow_message[] __asm__("D_001E8A50"); -extern s32 build_tie_texture_dma(s32) __asm__("FUN_002370c0"); -extern void vu1_tex_flush(void) __asm__("func_00233B68"); -void dma_tie_textures(void) __asm__("FUN_00235640"); +extern const char tie_texture_overflow_message[] __asm__("D_001E8A50"); +extern s32 build_tie_texture_dma(s32) __asm__("FUN_002370c0"); +extern void vu1_tex_flush(void) __asm__("func_00233B68"); +void dma_tie_textures(void) __asm__("FUN_00235640"); void dma_tie_textures(void) { struct DmaTag *tag; @@ -47,3 +47,5 @@ void dma_tie_textures(void) { extern __typeof__(dma_tie_textures) func_00235640 __attribute__((alias("FUN_00235640"))); s32 max_tie_texture_dma_size = 0; + +const char tie_texture_overflow_message[] __asm__("D_001E8A50") = "tie texture overflow\n"; From 00a703b6805b10f9dc71016d4f0c191433693d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:47:37 +0000 Subject: [PATCH 080/213] decomp: keep init_ground_move_control's label beside its body progress-report links a body to its label only inside one file. --- src/overlays/shared/mobys/count_active_moby_group_members.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/overlays/shared/mobys/count_active_moby_group_members.c b/src/overlays/shared/mobys/count_active_moby_group_members.c index d687b5982f..b7e4420b6b 100644 --- a/src/overlays/shared/mobys/count_active_moby_group_members.c +++ b/src/overlays/shared/mobys/count_active_moby_group_members.c @@ -7,6 +7,8 @@ /* Ported from rac1-decomp (src/overlays/shared/mobyutil_0026E8E0.c: func_L01_0026E8E0), where it is exact; names translated to the US level program. */ /* Sets the default ground movement tuning: radius 0.625, small steps and turns. */ +void init_ground_move_control(struct GroundMoveControl *control) __asm__("FUN_L01_0026d930"); + void init_ground_move_control(struct GroundMoveControl *control) { control->collision_radius_1024ths = 0x280; control->step_height = 1.0f; From 98ecda0ee9d618947b4f5e19c0a601e9418129a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:23:46 +0000 Subject: [PATCH 081/213] decomp: name heavy interceptor, machinegun turret, racer, bolt thief and debris fields in l14 --- .../l14/mobys/blarg_heavy_interceptor.c | 191 ++++++++++-------- src/overlays/l14/mobys/bolt_thief.c | 124 +++++------- src/overlays/l14/mobys/flying_debris.c | 34 ++-- src/overlays/l14/mobys/machinegun_turret.c | 117 ++++++----- src/overlays/l14/mobys/platform.c | 14 +- src/overlays/l14/mobys/racer.c | 4 +- .../l14/mobys/racer_path_and_weapon.c | 122 +++++------ 7 files changed, 310 insertions(+), 296 deletions(-) diff --git a/src/overlays/l14/mobys/blarg_heavy_interceptor.c b/src/overlays/l14/mobys/blarg_heavy_interceptor.c index 736c51670f..fb5f93b680 100644 --- a/src/overlays/l14/mobys/blarg_heavy_interceptor.c +++ b/src/overlays/l14/mobys/blarg_heavy_interceptor.c @@ -227,16 +227,26 @@ typedef struct BlargHeavyInterceptorVars { u8 pad_100[0x20]; f32 manipulator1[4]; f32 manipulator1_rotation[4]; - f32 unk140[4]; + f32 manipulator1_scale[4]; u8 pad_150[0x10]; f32 beam_rotation_blink_and_aim_path_state[4]; f32 aim_point_position[4]; - f32 unk180[4]; - f32 unk190[4]; + f32 aim_point_velocity[3]; + struct Moby *target; /* the hero (or class 0xCB / 0x10E moby) the scan beam found */ + f32 spawn_path_length; + f32 position_velocity[3]; f32 oscillation_state[4]; - f32 unk1B0[4]; - f32 unk1C0[4]; - f32 unk1D0[4]; + f32 patrol_heading; + s16 patrol_heading_timer; + s16 is_group_effects_controller; + f32 patrol_heading_velocity; + f32 manipulator0_angle; /* yaw toward the aim point (axis 2) */ + f32 manipulator1_angle; /* pitch toward the aim point (axis 1) */ + f32 manipulator0_angle_velocity; + f32 manipulator1_angle_velocity; + f32 aim_path_segment_distance; + s32 voice; + f32 beam_origin[3]; f32 death_velocity[4]; s16 timer_1F0; s16 timer_1F2; @@ -303,7 +313,7 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { switch (moby->state) { case INTERCEPTOR_STATE_INITIALIZE: get_moby_target_info(moby)[0xE] = 1; - if (*(s16 *)((u8 *)moby_vars + 0x1B6) == 1) { + if (moby_vars->is_group_effects_controller == 1) { moby->flags = (moby->flags | 0x41) & 0xEFFF; moby->collision = 0; moby->update_dist = 0xFF; @@ -329,8 +339,10 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { initialize_blarg_heavy_interceptor_paths(moby); moby_vars->unk88 = 1; moby_vars->unk21C = -1.0f; - moby_vars->unk180[0] = moby_vars->unk180[1] = moby_vars->unk180[2] = 0.0f; - moby_vars->unk190[1] = moby_vars->unk190[2] = moby_vars->unk190[3] = 0.0f; + moby_vars->aim_point_velocity[0] = moby_vars->aim_point_velocity[1] = + moby_vars->aim_point_velocity[2] = 0.0f; + moby_vars->position_velocity[0] = moby_vars->position_velocity[1] = + moby_vars->position_velocity[2] = 0.0f; moby_vars->beam_rotation_blink_and_aim_path_state[0] = 0.0f; moby_vars->flags = 0; moby_vars->beam_rotation_blink_and_aim_path_state[1] = 0.0f; @@ -338,15 +350,15 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { moby_vars->oscillation_state[1] = 0.0f; moby_vars->oscillation_state[2] = 0.0f; moby_vars->oscillation_state[3] = 0.0f; - moby_vars->unk1B0[0] = moby->rot.z; - *(s16 *)&moby_vars->unk1B0[1] = 0; - moby_vars->unk1B0[2] = 0.0f; + moby_vars->patrol_heading = moby->rot.z; + moby_vars->patrol_heading_timer = 0; + moby_vars->patrol_heading_velocity = 0.0f; fill_transfer_words(moby_vars->manipulator0, 0, 0x40); fill_transfer_words(moby_vars->manipulator1, 0, 0x40); attach_manipulator_c618(moby, 0, moby_vars->manipulator0); attach_manipulator_c618(moby, 1, moby_vars->manipulator1); - moby_vars->unk1C0[2] = moby_vars->unk1C0[1] = 0.0f; - *(int *)&moby_vars->unk180[3] = 0; + moby_vars->manipulator1_angle_velocity = moby_vars->manipulator0_angle_velocity = 0.0f; + moby_vars->target = 0; moby->state = INTERCEPTOR_STATE_PATROL_AND_SCAN; moby->command = 0; break; @@ -390,7 +402,7 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { if ((char *)t == D_001413D0_lui || (t != 0 && (t->oclass == 0xCB || t->oclass == 0x10E))) { found = 1; - *(struct Moby **)(&moby_vars->unk180[3]) = D_L14_00174540.target; + moby_vars->target = D_L14_00174540.target; } } } @@ -399,7 +411,7 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { } } case INTERCEPTOR_STATE_ALERT_GROUP: { - s32 voice = *(s32 *)&moby_vars->unk1D0[0]; + s32 voice = moby_vars->voice; if (voice != -1) { VoicePoolWindow *slot = (VoicePoolWindow *)((u8 *)&voice_pool + voice * 0x70); @@ -408,7 +420,7 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { release_voice_slot(voice); } } - *(s32 *)&moby_vars->unk1D0[0] = -1; + moby_vars->voice = -1; activate_waiting_turrets_in_group(moby_vars->turret_group); moby->state = INTERCEPTOR_STATE_TRACK_TARGET; moby_vars->timer_1F2 = @@ -420,11 +432,11 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { (blarg_heavy_interceptor_tracking_and_group_wait_glow_blue_gp << 16) | (blarg_heavy_interceptor_tracking_and_group_wait_glow_green_gp << 8) | blarg_heavy_interceptor_tracking_and_group_wait_glow_red_gp; - if (*(struct Moby **)(&moby_vars->unk180[3]) != 0) { + if (moby_vars->target != 0) { moby_vars->unk200 = 1; moby_vars->red_light_tint_enabled = 1; update_blarg_heavy_interceptor_aim_transforms(moby, 1); - qcopy(vector_scratch, &(*(struct Moby **)(&moby_vars->unk180[3]))->pos); + qcopy(vector_scratch, &moby_vars->target->pos); vector_scratch[2] += 0.5f; qcopy(secondary_vector_scratch, vector_scratch); secondary_vector_scratch[2] -= 4.0f; @@ -435,25 +447,24 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { } ease_c618(moby_vars->aim_point_position, vector_scratch[0], - moby_vars->unk180, + moby_vars->aim_point_velocity, 0.003f, 0.2f, 0.0f); ease_c618(&moby_vars->aim_point_position[1], vector_scratch[1], - &moby_vars->unk180[1], + &moby_vars->aim_point_velocity[1], 0.003f, 0.2f, 0.0f); ease_c618(&moby_vars->aim_point_position[2], vector_scratch[2], - &moby_vars->unk180[2], + &moby_vars->aim_point_velocity[2], 0.003f, 0.2f, 0.0f); update_blarg_heavy_interceptor_patrol_path_position(moby); - if ((s8)(*(struct Moby **)(&moby_vars->unk180[3]))->state < 0 || - fast_dec_timer_s16(&moby_vars->timer_1F2)) { + if ((s8)moby_vars->target->state < 0 || fast_dec_timer_s16(&moby_vars->timer_1F2)) { moby_vars->path_point_segment_distance = 0.0f; moby_vars->path_point = 0; moby_vars->return_path_complete = 0; @@ -477,7 +488,7 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { float *p; moby_point_position(moby, 2, secondary_vector_scratch); - p = &moby_vars->unk1D0[1]; + p = moby_vars->beam_origin; p[0] = secondary_vector_scratch[0]; p[1] = secondary_vector_scratch[1]; p[2] = secondary_vector_scratch[2]; @@ -493,19 +504,29 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { blarg_heavy_interceptor_group_wait_return_path_position_easing_factor_gp, blarg_heavy_interceptor_group_wait_return_path_traversal_speed_gp, 1.0f); - if (moby_vars->unk1C0[0] != 0.0f || moby_vars->unk1B0[3] != 0.0f) { - ease_c618(moby_vars->unk1C0, 0.0f, &moby_vars->unk1C0[2], 0.004f, 0.2f, 0.0f); - ease_c618(&moby_vars->unk1B0[3], 0.0f, &moby_vars->unk1C0[1], 0.004f, 0.2f, 0.0f); - if (absolute_float(moby_vars->unk1C0[0]) < 0.0001f) { - moby_vars->unk1C0[0] = 0.0f; + if (moby_vars->manipulator1_angle != 0.0f || moby_vars->manipulator0_angle != 0.0f) { + ease_c618(&moby_vars->manipulator1_angle, + 0.0f, + &moby_vars->manipulator1_angle_velocity, + 0.004f, + 0.2f, + 0.0f); + ease_c618(&moby_vars->manipulator0_angle, + 0.0f, + &moby_vars->manipulator0_angle_velocity, + 0.004f, + 0.2f, + 0.0f); + if (absolute_float(moby_vars->manipulator1_angle) < 0.0001f) { + moby_vars->manipulator1_angle = 0.0f; } - if (absolute_float(moby_vars->unk1B0[3]) < 0.0001f) { - moby_vars->unk1B0[3] = 0.0f; + if (absolute_float(moby_vars->manipulator0_angle) < 0.0001f) { + moby_vars->manipulator0_angle = 0.0f; } build_axis_rotation_quaternion( - moby_vars->manipulator0_rotation, 2, moby_vars->unk1B0[3]); + moby_vars->manipulator0_rotation, 2, moby_vars->manipulator0_angle); build_axis_rotation_quaternion( - moby_vars->manipulator1_rotation, 1, moby_vars->unk1C0[0]); + moby_vars->manipulator1_rotation, 1, moby_vars->manipulator1_angle); } if (try_retract_turret_group(moby_vars->turret_group)) { LevelPath *p = l14_paths[moby_vars->patrol_path]; @@ -530,7 +551,7 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { FUN_L00_0025df68_c618( tab, &moby->pos, vector_scratch, &near_seg, &near_t, 0, 40.0f, 5.0f, 0.0f); moby_vars->path_segment = near_seg; - moby_vars->unk1C0[3] = near_t; + moby_vars->aim_path_segment_distance = near_t; moby_vars->unk200 = 0; moby->state = INTERCEPTOR_STATE_REJOIN_PATROL; } @@ -551,29 +572,29 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { for (i = 0; i < source_segment_index; i++) { source_path_distance += *(float *)(seg + i * 16 + 0x1C); } - source_path_distance += moby_vars->unk1C0[3]; + source_path_distance += moby_vars->aim_path_segment_distance; tab = ((int *)l14_paths[moby_vars->spawn_path]); t = source_path_distance / moby_vars->beam_rotation_blink_and_aim_path_state[3] * - moby_vars->unk190[0]; + moby_vars->spawn_path_length; rejoin_path_loop_enabled = moby_vars->rejoin_path_loop; path_seg = 0; path_t = 0.0f; FUN_L00_0025d808_c618(tab, vector_scratch, &path_seg, &path_t, rejoin_path_loop_enabled, t); ease_c618(&moby->pos.x, vector_scratch[0], - &moby_vars->unk190[1], + &moby_vars->position_velocity[0], 0.005f, l14_blarg_heavy_interceptor_path_easing_damping_coefficient, 0.0f); ease_c618(&moby->pos.y, vector_scratch[1], - &moby_vars->unk190[2], + &moby_vars->position_velocity[1], 0.005f, l14_blarg_heavy_interceptor_path_easing_damping_coefficient, 0.0f); ease_c618(&moby->pos.z, vector_scratch[2], - &moby_vars->unk190[3], + &moby_vars->position_velocity[2], 0.005f, l14_blarg_heavy_interceptor_path_easing_damping_coefficient, 0.0f); @@ -584,24 +605,24 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { FUN_L00_0025d808_c618(((int *)l14_paths[moby_vars->path_index]), vector_scratch, &moby_vars->path_segment, - &moby_vars->unk1C0[3], + &moby_vars->aim_path_segment_distance, moby_vars->rejoin_path_loop, 0.0f); ease_c618(moby_vars->aim_point_position, vector_scratch[0], - moby_vars->unk180, + moby_vars->aim_point_velocity, l14_blarg_heavy_interceptor_path_easing_error_gain, l14_blarg_heavy_interceptor_path_easing_damping_coefficient, 0.0f); ease_c618(&moby_vars->aim_point_position[1], vector_scratch[1], - &moby_vars->unk180[1], + &moby_vars->aim_point_velocity[1], l14_blarg_heavy_interceptor_path_easing_error_gain, l14_blarg_heavy_interceptor_path_easing_damping_coefficient, 0.0f); ease_c618(&moby_vars->aim_point_position[2], vector_scratch[2], - &moby_vars->unk180[2], + &moby_vars->aim_point_velocity[2], l14_blarg_heavy_interceptor_path_easing_error_gain, l14_blarg_heavy_interceptor_path_easing_damping_coefficient, 0.0f); @@ -614,7 +635,7 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { moby_vars->timer_1F0 = scale_game_frames(blarg_heavy_interceptor_death_fall_duration_frames_gp); activate_waiting_turrets_in_group(moby_vars->turret_group); - voice = *(s32 *)&moby_vars->unk1D0[0]; + voice = moby_vars->voice; if (voice != -1) { VoicePoolWindow *slot = (VoicePoolWindow *)((u8 *)&voice_pool + voice * 0x70); @@ -622,7 +643,7 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { release_voice_slot(voice); } } - *(s32 *)&moby_vars->unk1D0[0] = -1; + moby_vars->voice = -1; FUN_L00_0025e450_c618(moby, moby_vars->unk40, &moby->pos, @@ -657,9 +678,9 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { blarg_heavy_interceptor_death_launch_vertical_velocity_range_start_gp * frame_scale, blarg_heavy_interceptor_death_launch_vertical_velocity_range_end_gp * frame_scale); moby->scale *= 0.1f; - moby_vars->unk140[0] = 10.0f; - moby_vars->unk140[1] = 10.0f; - moby_vars->unk140[2] = 10.0f; + moby_vars->manipulator1_scale[0] = 10.0f; + moby_vars->manipulator1_scale[1] = 10.0f; + moby_vars->manipulator1_scale[2] = 10.0f; moby_vars->unk1F4 = randf_sym(0.0f, 0.08726646f); moby_vars->unk1F8 = randf_sym(0.0f, 0.08726646f); moby_vars->yaw_drift = randf_sym(0.0f, 0.08726646f); @@ -696,9 +717,9 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { moby_vars->death_velocity[2] -= blarg_heavy_interceptor_death_fall_gravity_gp * frame_scale_sq; moby->rot.z = fast_add_rotations(moby->rot.z, moby_vars->yaw_drift); - moby_vars->unk140[0] = 10.0f; - moby_vars->unk140[1] = 10.0f; - moby_vars->unk140[2] = 10.0f; + moby_vars->manipulator1_scale[0] = 10.0f; + moby_vars->manipulator1_scale[1] = 10.0f; + moby_vars->manipulator1_scale[2] = 10.0f; if (moby->pos.x < 2.0f || moby->pos.x > 1021.0f || moby->pos.y < 2.0f || moby->pos.y > 1021.0f || moby->pos.z < 2.0f || moby->pos.z > 1021.0f) { FUN_0020c828(moby); @@ -777,13 +798,13 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { moby->command = 0; } if (moby->state == INTERCEPTOR_STATE_PATROL_AND_SCAN && - !voice_is_playing(moby, *(s32 *)&moby_vars->unk1D0[0])) { - *(s32 *)&moby_vars->unk1D0[0] = allocate_voice_c618(0, 4, moby); + !voice_is_playing(moby, moby_vars->voice)) { + moby_vars->voice = allocate_voice_c618(0, 4, moby); } if ((moby->state == INTERCEPTOR_STATE_TRACK_TARGET || moby->state == INTERCEPTOR_STATE_WAIT_FOR_GROUP_READY) && - !voice_is_playing(moby, *(s32 *)&moby_vars->unk1D0[0])) { - *(s32 *)&moby_vars->unk1D0[0] = allocate_voice_c618(2, 4, moby); + !voice_is_playing(moby, moby_vars->voice)) { + moby_vars->voice = allocate_voice_c618(2, 4, moby); } } @@ -1246,7 +1267,7 @@ void draw_blarg_heavy_interceptor_spinning_beam(struct Moby *moby) { int i, j; float *beam_origin; - beam_origin = &d->unk1D0[1]; + beam_origin = d->beam_origin; beam_placement_scratch[3][0] = beam_origin[0]; beam_placement_scratch[3][1] = beam_origin[1]; beam_placement_scratch[3][2] = beam_origin[2] + 0.125f; @@ -1507,13 +1528,13 @@ void initialize_blarg_heavy_interceptor_paths(struct Moby *moby) { } } path = ((int *)l14_paths[moby_vars->spawn_path]); - *(int *)&moby_vars->unk190[0] = 0; + *(int *)&moby_vars->spawn_path_length = 0; for (i = 0; i < path[0]; i++) { segment_length = fast_vec_dist((char *)path + (i * 16 + 0x10), (char *)path + (((i + 1) % path[0]) * 16 + 0x10)); *(float *)((char *)path + (i << 4) + 0x1C) = segment_length; if (i != path[0] - 1) { - moby_vars->unk190[0] += segment_length; + moby_vars->spawn_path_length += segment_length; } } path = ((int *)l14_paths[moby_vars->patrol_path]); @@ -1524,11 +1545,11 @@ void initialize_blarg_heavy_interceptor_paths(struct Moby *moby) { if (moby_vars->initial_path_distance_fraction != 0.0f) { int *sampling_path = ((int *)l14_paths[moby_vars->path_index]); moby_vars->path_segment = 0; - moby_vars->unk1C0[3] = 0.0f; + moby_vars->aim_path_segment_distance = 0.0f; FUN_L00_0025d808_2af688(sampling_path, &moby->pos, &moby_vars->path_segment, - &moby_vars->unk1C0[3], + &moby_vars->aim_path_segment_distance, moby_vars->rejoin_path_loop, moby_vars->initial_path_distance_fraction * moby_vars->beam_rotation_blink_and_aim_path_state[3]); @@ -1539,12 +1560,13 @@ void initialize_blarg_heavy_interceptor_paths(struct Moby *moby) { &moby_vars->path_point, &moby_vars->path_point_segment_distance, moby_vars->rejoin_path_loop, - moby_vars->initial_path_distance_fraction * moby_vars->unk190[0]); + moby_vars->initial_path_distance_fraction * + moby_vars->spawn_path_length); } else { moby_vars->path_point = 0; moby_vars->path_segment = 0; moby_vars->path_point_segment_distance = 0.0f; - moby_vars->unk1C0[3] = 0.0f; + moby_vars->aim_path_segment_distance = 0.0f; } } @@ -1555,36 +1577,36 @@ extern int FUN_L00_0025d808_2af918(int *tab, float *out, int *a, float *b, int c void update_blarg_heavy_interceptor_patrol_aim_point(struct Moby *moby) { BlargHeavyInterceptorVars *interceptor_instance_vars = (BlargHeavyInterceptorVars *)moby->pvars; float path_target_position[4]; - float save = interceptor_instance_vars->unk1C0[3]; + float save = interceptor_instance_vars->aim_path_segment_distance; int save2 = interceptor_instance_vars->path_segment; int r = FUN_L00_0025d808_2af918( ((int *)l14_paths[interceptor_instance_vars->path_index]), path_target_position, &interceptor_instance_vars->path_segment, - &interceptor_instance_vars->unk1C0[3], + &interceptor_instance_vars->aim_path_segment_distance, interceptor_instance_vars->rejoin_path_loop, interceptor_instance_vars->beam_rotation_blink_and_aim_path_state[2]); FUN_L00_0025b8c0_c(interceptor_instance_vars->aim_point_position, - interceptor_instance_vars->unk180, + interceptor_instance_vars->aim_point_velocity, path_target_position[0], *(float *)&l14_blarg_heavy_interceptor_path_easing_error_gain, *(float *)&l14_blarg_heavy_interceptor_path_easing_damping_coefficient, 0.0f); FUN_L00_0025b8c0_c(&interceptor_instance_vars->aim_point_position[1], - &interceptor_instance_vars->unk180[1], + &interceptor_instance_vars->aim_point_velocity[1], path_target_position[1], *(float *)&l14_blarg_heavy_interceptor_path_easing_error_gain, *(float *)&l14_blarg_heavy_interceptor_path_easing_damping_coefficient, 0.0f); FUN_L00_0025b8c0_c(&interceptor_instance_vars->aim_point_position[2], - &interceptor_instance_vars->unk180[2], + &interceptor_instance_vars->aim_point_velocity[2], path_target_position[2], *(float *)&l14_blarg_heavy_interceptor_path_easing_error_gain, *(float *)&l14_blarg_heavy_interceptor_path_easing_damping_coefficient, 0.0f); if (interceptor_instance_vars->rejoin_path_loop == 0) { if (r != 0) { - interceptor_instance_vars->unk1C0[3] = save; + interceptor_instance_vars->aim_path_segment_distance = save; interceptor_instance_vars->path_segment = save2; interceptor_instance_vars->beam_rotation_blink_and_aim_path_state[2] = -interceptor_instance_vars->beam_rotation_blink_and_aim_path_state[2]; @@ -1608,11 +1630,11 @@ void update_blarg_heavy_interceptor_patrol_path_position(struct Moby *moby) { for (i = 0; i < source_segment_index; i++) { source_path_distance += *(float *)(seg + i * 16 + 0x1C); } - source_path_distance += heavy_interceptor_vars->unk1C0[3]; + source_path_distance += heavy_interceptor_vars->aim_path_segment_distance; tab = ((int *)l14_paths[heavy_interceptor_vars->spawn_path]); destination_path_distance = source_path_distance / heavy_interceptor_vars->beam_rotation_blink_and_aim_path_state[3] * - heavy_interceptor_vars->unk190[0]; + heavy_interceptor_vars->spawn_path_length; destination_path_loop_enabled = heavy_interceptor_vars->rejoin_path_loop; destination_segment_index = 0; frac = 0.0f; @@ -1623,19 +1645,19 @@ void update_blarg_heavy_interceptor_patrol_path_position(struct Moby *moby) { destination_path_loop_enabled, destination_path_distance); FUN_L00_0025b8c0_c(&moby->pos.x, - &heavy_interceptor_vars->unk190[1], + &heavy_interceptor_vars->position_velocity[0], destination_path_target_position[0], *(float *)&l14_blarg_heavy_interceptor_path_easing_error_gain, *(float *)&l14_blarg_heavy_interceptor_path_easing_damping_coefficient, 0.0f); FUN_L00_0025b8c0_c(&moby->pos.y, - &heavy_interceptor_vars->unk190[2], + &heavy_interceptor_vars->position_velocity[1], destination_path_target_position[1], *(float *)&l14_blarg_heavy_interceptor_path_easing_error_gain, *(float *)&l14_blarg_heavy_interceptor_path_easing_damping_coefficient, 0.0f); FUN_L00_0025b8c0_c(&moby->pos.z, - &heavy_interceptor_vars->unk190[3], + &heavy_interceptor_vars->position_velocity[2], destination_path_target_position[2], *(float *)&l14_blarg_heavy_interceptor_path_easing_error_gain, *(float *)&l14_blarg_heavy_interceptor_path_easing_damping_coefficient, @@ -1672,21 +1694,21 @@ void update_blarg_heavy_interceptor_return_path_position(struct Moby *moby, } FUN_L00_0025b8c0_c( &moby->pos.x, - &return_path_moby_vars->unk190[1], + &return_path_moby_vars->position_velocity[0], target_position[0], position_easing_factor, *(float *)&blarg_heavy_interceptor_return_path_position_damping_coefficient_gp, 0.0f); FUN_L00_0025b8c0_c( &moby->pos.y, - &return_path_moby_vars->unk190[2], + &return_path_moby_vars->position_velocity[1], target_position[1], position_easing_factor, *(float *)&blarg_heavy_interceptor_return_path_position_damping_coefficient_gp, 0.0f); FUN_L00_0025b8c0_c( &moby->pos.z, - &return_path_moby_vars->unk190[3], + &return_path_moby_vars->position_velocity[2], target_position[2], position_easing_factor, *(float *)&blarg_heavy_interceptor_return_path_position_damping_coefficient_gp, @@ -1751,17 +1773,18 @@ void update_blarg_heavy_interceptor_oscillation_and_patrol_heading(struct Moby * blarg_heavy_interceptor_rotation_oscillation_first_phase_increment_gp, blarg_heavy_interceptor_rotation_oscillation_second_phase_increment_gp); if (moby->state == INTERCEPTOR_STATE_PATROL_AND_SCAN) { - if (fast_dec_timer_s16((s16 *)&interceptor_private_vars->unk1B0[1])) { - *(s16 *)&interceptor_private_vars->unk1B0[1] = + if (fast_dec_timer_s16(&interceptor_private_vars->patrol_heading_timer)) { + interceptor_private_vars->patrol_heading_timer = scale_game_frames(blarg_heavy_interceptor_patrol_heading_change_interval_frames_gp); heading_offset = blarg_heavy_interceptor_patrol_heading_offset_magnitude_gp; if (random_integer_below(2)) heading_offset = -heading_offset; - interceptor_private_vars->unk1B0[0] = fast_add_rotations(moby->rot.z, heading_offset); + interceptor_private_vars->patrol_heading = + fast_add_rotations(moby->rot.z, heading_offset); } vendor_spring((f32 *)&moby->rot.z, - &interceptor_private_vars->unk1B0[2], - interceptor_private_vars->unk1B0[0], + &interceptor_private_vars->patrol_heading_velocity, + interceptor_private_vars->patrol_heading, blarg_heavy_interceptor_patrol_heading_error_gain_gp, blarg_heavy_interceptor_patrol_heading_damping_coefficient_gp, blarg_heavy_interceptor_patrol_heading_snap_threshold_scale_gp); @@ -1824,11 +1847,11 @@ int update_blarg_heavy_interceptor_aim_transforms(struct Moby *moby, int flag) { fast_arc_tan(half_span_vector[0], half_span_vector[1]), moby->rot.z); build_axis_rotation_quaternion( blarg_heavy_interceptor_private_vars->manipulator0_rotation, 2, rotation_angle); - blarg_heavy_interceptor_private_vars->unk1B0[3] = rotation_angle; + blarg_heavy_interceptor_private_vars->manipulator0_angle = rotation_angle; rotation_angle = -fast_arc_tan(vector_length_xy(half_span_vector), half_span_vector[2]); build_axis_rotation_quaternion( blarg_heavy_interceptor_private_vars->manipulator1_rotation, 1, rotation_angle); - blarg_heavy_interceptor_private_vars->unk1C0[0] = rotation_angle; + blarg_heavy_interceptor_private_vars->manipulator1_angle = rotation_angle; qcopy(blarg_heavy_interceptor_private_vars->cached_aim_point_position, blarg_heavy_interceptor_private_vars->aim_point_position); if (flag != 0) { diff --git a/src/overlays/l14/mobys/bolt_thief.c b/src/overlays/l14/mobys/bolt_thief.c index 297ca7b870..02caba40ae 100644 --- a/src/overlays/l14/mobys/bolt_thief.c +++ b/src/overlays/l14/mobys/bolt_thief.c @@ -1,6 +1,7 @@ /* Level 14 bolt thief moby class and its path movement. */ #include "types.h" #include "rnc/overlay/shared/mobys/hit_color_flash.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -31,31 +32,22 @@ enum { }; typedef struct { - char pad00[0x60]; - struct HitColorFlash hit_flash; - float knock[4]; /* 0x70: record func_L00_0025D5B0 fills (velocity first) */ - float knock_drag; /* 0x80 */ - float knock_gravity; /* 0x84 */ - float knock_speed; /* 0x88 */ - float knock_rise; /* 0x8C */ - int unknown90; - int knock_flags; /* 0x94 */ - char pad98[0x15]; - unsigned char knock_bAD; /* 0xAD */ - char padAE[0x22]; - int counter; /* 0xD0 */ - float timer; /* 0xD4 */ - int path; /* 0xD8: index into D_L14_001B0BB0 */ - int other_path; /* 0xDC */ - int trigger; /* 0xE0 */ - float vx; /* 0xE4 */ - float vy; /* 0xE8 */ - float vz; /* 0xEC */ - float turn; /* 0xF0 */ - char *child; /* 0xF4 */ - int unknownF8; - int mode; /* 0xFC */ -} L16CrateData; + char pad00[0x60]; + struct HitColorFlash hit_flash; + struct KnockbackMotion knockback; + int path_segment; /* 0xD0 */ + float path_segment_t; /* 0xD4 */ + int path; /* 0xD8: index into D_L14_001B0BB0 */ + int other_path; /* 0xDC */ + int trigger; /* 0xE0 */ + float vx; /* 0xE4 */ + float vy; /* 0xE8 */ + float vz; /* 0xEC */ + float turn; /* 0xF0 */ + char *child; /* 0xF4 */ + float path_speed; /* 0xF8: 0 uses the default rate */ + int mode; /* 0xFC */ +} BoltThiefVars; typedef struct { char pad00[0x10]; @@ -80,7 +72,7 @@ typedef struct { char pad54[0x1C]; unsigned char status; /* 0x70 */ char pad71[7]; - L16CrateData *data; /* 0x78 */ + BoltThiefVars *data; /* 0x78 */ char pad7C[0x18]; int bounds; /* 0x94 */ char pad98[0xC]; @@ -130,8 +122,8 @@ void bolt_thief_update(L16CrateMoby *moby) { BOLT_THIEF_MODE_PRIMARY_PATH_THEN_FACE_HERO = 1, BOLT_THIEF_MODE_FACE_HERO_FROM_START = 2 }; - L16CrateData *moby_data = moby->data; - char *hit; + BoltThiefVars *moby_data = moby->data; + char *hit; if ((moby->status & 2) && moby->frame == moby->animation && moby->frame == 1) blend_moby_animation(moby, 4, 0, scale_game_frames(5)); @@ -141,14 +133,14 @@ void bolt_thief_update(L16CrateMoby *moby) { if (hit && moby->state != BOLT_THIEF_STATE_KNOCKBACK) { struct Hero *player = &hero; - moby_data->knock_drag = 0.008f; - moby_data->knock_gravity = 0.0005f; - moby_data->knock_speed = frame_time * 24.0f; - moby_data->knock_rise = frame_time * 12.0f; - moby_data->knock_flags = 1; - moby_data->knock_bAD = 0; + moby_data->knockback.gravity = 0.008f; + moby_data->knockback.speed_approach_step = 0.0005f; + moby_data->knockback.speed = frame_time * 24.0f; + moby_data->knockback.vertical_speed = frame_time * 12.0f; + moby_data->knockback.flags = 1; + moby_data->knockback.unk3D = 0; trooper_start_knockback(moby, - moby_data->knock, + &moby_data->knockback, 1, 1, 0, @@ -238,10 +230,10 @@ void bolt_thief_update(L16CrateMoby *moby) { emit_moby_offset_particles(moby); break; case BOLT_THIEF_STATE_SETTLE_AT_PATH_END: { - L16CrateData *settle_data = moby->data; - char *path = ((char *)l14_paths[settle_data->path]); - float target[4]; - float zero; + BoltThiefVars *settle_data = moby->data; + char *path = ((char *)l14_paths[settle_data->path]); + float target[4]; + float zero; if (settle_data->mode == BOLT_THIEF_MODE_PATH_LOOP_WITH_LINKED_CHILD) update_linked_moby_position(moby); @@ -277,8 +269,8 @@ void bolt_thief_update(L16CrateMoby *moby) { } moby->state = BOLT_THIEF_STATE_FOLLOW_SECONDARY_PATH; blend_moby_animation(moby, 0, 0, 20); - settle_data->timer = zero; - settle_data->counter = 0; + settle_data->path_segment_t = zero; + settle_data->path_segment = 0; } } emit_moby_offset_particles(moby); @@ -291,9 +283,10 @@ void bolt_thief_update(L16CrateMoby *moby) { moby->state = BOLT_THIEF_STATE_WAIT_FOR_TRIGGER; moby->bounds = 0; moby->flags |= 0x41; - moby_data->timer = 0.0f; - moby_data->counter = 0; - moby_data->turn = moby_data->vx = moby_data->vy = moby_data->vz = moby_data->timer; + moby_data->path_segment_t = 0.0f; + moby_data->path_segment = 0; + moby_data->turn = moby_data->vx = moby_data->vy = moby_data->vz = + moby_data->path_segment_t; path = ((char *)l14_paths[moby_data->path]); qcopy(moby->position, path + 0x10); moby->rotation[2] = fast_arc_tan(*(float *)(path + 0x20) - *(float *)(path + 0x10), @@ -303,7 +296,7 @@ void bolt_thief_update(L16CrateMoby *moby) { } break; case BOLT_THIEF_STATE_KNOCKBACK: - if (step_moby_motion(moby, moby_data->knock) & 3) { + if (step_moby_motion(moby, &moby_data->knockback) & 3) { cart_burst(moby, moby->position, -1, 1.0f, 13.0f); mark_moby_for_removal(moby); return; @@ -317,27 +310,12 @@ void bolt_thief_update(L16CrateMoby *moby) { update_hit_color_flash(moby, &moby_data->hit_flash); } -extern int sample_path(char *, float *, float *, float *, int, float) __asm__("FUN_L00_0025d808"); +extern int sample_path(char *, float *, int *, float *, int, float) __asm__("FUN_L00_0025d808"); float bolt_thief_default_path_sample_rate_gp __asm__("D_L14_00161FB8") = 25.0f; extern void FUN_L00_00258278(char *, float, float *, float, float, float); -typedef struct BoltThiefVars { - u8 pad_0[0xD0]; - f32 unkD0; - f32 unkD4; - s32 path_D8; - s32 path_DC; - u8 pad_E0[0x4]; - f32 unkE4; - f32 unkE8; - f32 unkEC; - f32 unkF0; - u8 pad_F4[0x4]; - f32 unkF8; -} BoltThiefVars; - int update_bolt_thief_path_movement(struct Moby *moby) { float pos[4]; float delta[4]; @@ -347,28 +325,32 @@ int update_bolt_thief_path_movement(struct Moby *moby) { char *path; if (current_level_index == LEVEL_KALEBO3) path_sample_step = frame_time * 20.0f; - if (bolt_thief_state->unkF8 != 0.0f) - path_sample_step = bolt_thief_state->unkF8 * frame_time; + if (bolt_thief_state->path_speed != 0.0f) + path_sample_step = bolt_thief_state->path_speed * frame_time; if (moby->state == BOLT_THIEF_STATE_FOLLOW_SECONDARY_PATH) - path = ((char *)l14_paths[bolt_thief_state->path_DC]); + path = ((char *)l14_paths[bolt_thief_state->other_path]); else - path = ((char *)l14_paths[bolt_thief_state->path_D8]); - path_sample_result = sample_path( - path, pos, &bolt_thief_state->unkD0, &bolt_thief_state->unkD4, 0, path_sample_step); + path = ((char *)l14_paths[bolt_thief_state->path]); + path_sample_result = sample_path(path, + pos, + &bolt_thief_state->path_segment, + &bolt_thief_state->path_segment_t, + 0, + path_sample_step); vendor_spring(&moby->pos.x, - &bolt_thief_state->unkE4, + &bolt_thief_state->vx, pos[0], bolt_thief_path_spring_gain_gp, bolt_thief_path_spring_damping_gp, 0.0f); vendor_spring(&moby->pos.y, - &bolt_thief_state->unkE8, + &bolt_thief_state->vy, pos[1], bolt_thief_path_spring_gain_gp, bolt_thief_path_spring_damping_gp, 0.0f); vendor_spring(&moby->pos.z, - &bolt_thief_state->unkEC, + &bolt_thief_state->vz, pos[2], bolt_thief_path_spring_gain_gp, bolt_thief_path_spring_damping_gp, @@ -378,7 +360,7 @@ int update_bolt_thief_path_movement(struct Moby *moby) { if (absolute_float(delta[1]) > 0.01f) { FUN_L00_00258278(moby, fast_arc_tan(delta[0], delta[1]), - &bolt_thief_state->unkF0, + &bolt_thief_state->turn, bolt_thief_path_spring_gain_gp, bolt_thief_path_spring_damping_gp, 0.0f); diff --git a/src/overlays/l14/mobys/flying_debris.c b/src/overlays/l14/mobys/flying_debris.c index 227838764a..f14fcd29c3 100644 --- a/src/overlays/l14/mobys/flying_debris.c +++ b/src/overlays/l14/mobys/flying_debris.c @@ -69,17 +69,15 @@ extern int allocate_colored_effect_slot(float *, float, float, float, float, flo void flying_debris_update(struct Moby *moby) __asm__("FUN_L14_002bac78"); typedef struct FlyingDebrisVars { - f32 unk0; - f32 unk4; - f32 unk8; + f32 velocity[3]; u8 pad_C[0x4]; u8 timer_10; u8 pad_11[0x1]; s16 point_light_slot_index; - f32 unk14; - f32 unk18; - f32 unk1C; - struct Moby *unk20; + f32 spin_x; + f32 spin_y; + f32 spin_z; + struct Moby *owner; /* its class picks the impact sound */ } FlyingDebrisVars; /* Moby class 81 */ @@ -107,18 +105,18 @@ void flying_debris_update(struct Moby *moby) { return; } fast_vec_add(&moby->pos, &moby->pos, debris_vars); - if (absolute_float(debris_vars->unk0) > + if (absolute_float(debris_vars->velocity[0]) > flying_debris_horizontal_drag_speed_threshold_gp * frame_scale) - debris_vars->unk0 *= + debris_vars->velocity[0] *= (flying_debris_velocity_retention_factor_gp - 1.0f) * frame_scale + 1.0f; - if (absolute_float(debris_vars->unk4) > + if (absolute_float(debris_vars->velocity[1]) > flying_debris_horizontal_drag_speed_threshold_gp * frame_scale) - debris_vars->unk4 *= + debris_vars->velocity[1] *= (flying_debris_velocity_retention_factor_gp - 1.0f) * frame_scale + 1.0f; - if (debris_vars->unk8 > 0.0f) - debris_vars->unk8 *= + if (debris_vars->velocity[2] > 0.0f) + debris_vars->velocity[2] *= (flying_debris_velocity_retention_factor_gp - 1.0f) * frame_scale + 1.0f; - debris_vars->unk8 -= flying_debris_gravity_gp * frame_scale_sq; + debris_vars->velocity[2] -= flying_debris_gravity_gp * frame_scale_sq; if (moby->pos.x < 2.0f || moby->pos.x > 1021.0f || moby->pos.y < 2.0f || moby->pos.y > 1021.0f || moby->pos.z < 2.0f || moby->pos.z > 1021.0f) { remove_flying_debris((u8 *)moby); @@ -128,7 +126,7 @@ void flying_debris_update(struct Moby *moby) { (absolute_float(moby->pos.x - hero.motion.pos.f[0]) < 10.0f && absolute_float(moby->pos.y - hero.motion.pos.f[1]) < 10.0f)) { clear_u64_value(joint); - trooper_play_sound(1, 0, moby, debris_vars->unk20->oclass); + trooper_play_sound(1, 0, moby, debris_vars->owner->oclass); e450_b78(moby, joint, &moby->pos, @@ -150,9 +148,9 @@ void flying_debris_update(struct Moby *moby) { remove_flying_debris((u8 *)moby); return; } - moby->rot.x = fast_add_rotations(moby->rot.x, debris_vars->unk14); - moby->rot.y = fast_add_rotations(moby->rot.y, debris_vars->unk18); - moby->rot.z = fast_add_rotations(moby->rot.z, debris_vars->unk1C); + moby->rot.x = fast_add_rotations(moby->rot.x, debris_vars->spin_x); + moby->rot.y = fast_add_rotations(moby->rot.y, debris_vars->spin_y); + moby->rot.z = fast_add_rotations(moby->rot.z, debris_vars->spin_z); moby_point_position(moby, 0, joint); size = randf_sym(0.01f, 0.5f); fast_vec_scale(ofs, (char *)moby + 0xC0, size); diff --git a/src/overlays/l14/mobys/machinegun_turret.c b/src/overlays/l14/mobys/machinegun_turret.c index f40400fa6e..03a5162ffd 100644 --- a/src/overlays/l14/mobys/machinegun_turret.c +++ b/src/overlays/l14/mobys/machinegun_turret.c @@ -207,21 +207,21 @@ typedef struct MachinegunTurretVars { u8 pad_41[0x1F]; struct HitColorFlash hit_flash; f32 base_z; - s16 unk74; - s16 unk76; - f32 unk78; + s16 state_timer; + s16 target_wait_timer; + f32 inverse_state_frames; u8 pad_7C[0x4]; s32 aiming_cuboid; - f32 unk84; - s16 unk88; - u8 unk8A; - u8 unk8B; - f32 unk8C; - s32 unk90; - s32 unk94; + f32 base_heading; + s16 activated; + u8 started_deployed; + u8 target_wait_expired; + f32 sweep_angle; /* the retract eases rot.z from here back to base_heading */ + s32 target_volume; + s32 activation_delay_frames; s32 timer; s16 timer_9C; - s16 unk9E; + s16 reverse_sweep; } MachinegunTurretVars; void machinegun_turret_update(char *moby) __asm__("FUN_L14_002b3bf0"); @@ -252,54 +252,56 @@ void machinegun_turret_update(char *moby) { switch (MOBY(moby)->state) { case TURRET_STATE_INITIALIZE: machinegun_turret_private_vars->base_z = MOBY(moby)->pos.z; - machinegun_turret_private_vars->unk84 = MOBY(moby)->rot.z; - *(int *)&machinegun_turret_private_vars->unk8C = 0; - machinegun_turret_private_vars->unk74 = 0; + machinegun_turret_private_vars->base_heading = MOBY(moby)->rot.z; + *(int *)&machinegun_turret_private_vars->sweep_angle = 0; + machinegun_turret_private_vars->state_timer = 0; if (machinegun_turret_private_vars->aiming_cuboid == -1) { debug_print(D_L14_001FBD50, ((short)MOBY(moby)->save_id)); mark_moby_for_removal(moby); return; } - if (machinegun_turret_private_vars->unk90 == -1) { + if (machinegun_turret_private_vars->target_volume == -1) { debug_print(D_L14_001FBD78, ((short)MOBY(moby)->save_id)); mark_moby_for_removal(moby); return; } scaled_wait_frames_or_target_query_status = func_001F9850_2B4E40(machinegun_turret_target_wait_timeout_frames_gp); - machinegun_turret_private_vars->unk76 = scaled_wait_frames_or_target_query_status; - machinegun_turret_private_vars->unk8B = 0; - if (machinegun_turret_private_vars->unk88 != 0) { + machinegun_turret_private_vars->target_wait_timer = + scaled_wait_frames_or_target_query_status; + machinegun_turret_private_vars->target_wait_expired = 0; + if (machinegun_turret_private_vars->activated != 0) { MOBY(moby)->state = TURRET_STATE_WAIT_FOR_TARGET; - machinegun_turret_private_vars->unk8A = 1; + machinegun_turret_private_vars->started_deployed = 1; } else { MOBY(moby)->state = TURRET_STATE_WAIT_FOR_ACTIVATION; MOBY(moby)->pos.z = MOBY(moby)->pos.z - machinegun_turret_retraction_depth_gp; MOBY(moby)->collision = 0; - machinegun_turret_private_vars->unk8A = 0; + machinegun_turret_private_vars->started_deployed = 0; MOBY(moby)->flags = MOBY(moby)->flags & 0xEFFF; } machinegun_turret_private_vars->timer = - func_001F9850_2B4E40(machinegun_turret_private_vars->unk94); + func_001F9850_2B4E40(machinegun_turret_private_vars->activation_delay_frames); return; case TURRET_STATE_WAIT_FOR_ACTIVATION: - if (machinegun_turret_private_vars->unk88 == 0) { + if (machinegun_turret_private_vars->activated == 0) { return; } if (fast_dec_timer(&machinegun_turret_private_vars->timer) == 0) { return; } MOBY(moby)->state = TURRET_STATE_DEPLOY; - machinegun_turret_private_vars->unk74 = func_001F9850_2B4E40(D_L14_0016150C); - machinegun_turret_private_vars->unk78 = - 1.0f / func_001FA888_2B4E40(machinegun_turret_private_vars->unk74); + machinegun_turret_private_vars->state_timer = func_001F9850_2B4E40(D_L14_0016150C); + machinegun_turret_private_vars->inverse_state_frames = + 1.0f / func_001FA888_2B4E40(machinegun_turret_private_vars->state_timer); set_moby_animation(moby, 1, 0); MOBY(moby)->anim_speed = - 1.0f / (func_001FA888_2B4E40(machinegun_turret_private_vars->unk74) * D_L14_00161510); + 1.0f / + (func_001FA888_2B4E40(machinegun_turret_private_vars->state_timer) * D_L14_00161510); return; case TURRET_STATE_DEPLOY: { - float t = - (float)machinegun_turret_private_vars->unk74 * machinegun_turret_private_vars->unk78; + float t = (float)machinegun_turret_private_vars->state_timer * + machinegun_turret_private_vars->inverse_state_frames; MOBY(moby)->pos.z = machinegun_turret_private_vars->base_z - (0.0f + (machinegun_turret_retraction_depth_gp - 0.0f) * t); } @@ -309,52 +311,53 @@ void machinegun_turret_update(char *moby) { MOBY(moby)->anim_speed = 1.0f; } } - if (machinegun_turret_private_vars->unk74 < func_001F9850_2B4E40(D_L14_0016150C >> 1)) { + if (machinegun_turret_private_vars->state_timer < + func_001F9850_2B4E40(D_L14_0016150C >> 1)) { MOBY(moby)->collision = MOBY(moby)->pclass->collision; MOBY(moby)->flags = MOBY(moby)->flags | 0x1000; } - if (fast_dec_timer_s16(&machinegun_turret_private_vars->unk74) == 0) { + if (fast_dec_timer_s16(&machinegun_turret_private_vars->state_timer) == 0) { return; } - machinegun_turret_private_vars->unk76 = + machinegun_turret_private_vars->target_wait_timer = func_001F9850_2B4E40(machinegun_turret_target_wait_timeout_frames_gp); MOBY(moby)->state = TURRET_STATE_WAIT_FOR_TARGET; - machinegun_turret_private_vars->unk74 = func_001F9850_2B4E40(60); + machinegun_turret_private_vars->state_timer = func_001F9850_2B4E40(60); MOBY(moby)->pos.z = machinegun_turret_private_vars->base_z; - *(int *)&machinegun_turret_private_vars->unk8C = 0; + *(int *)&machinegun_turret_private_vars->sweep_angle = 0; return; case TURRET_STATE_WAIT_FOR_TARGET: scaled_wait_frames_or_target_query_status = select_moby_by_xy_distance(moby, (char *)target_point_scratch, 34.0f); if (scaled_wait_frames_or_target_query_status != MOBY_SELECTION_NO_TARGET) { if (is_point_inside_clip_volume(target_point_scratch, - machinegun_turret_private_vars->unk90) != 0) { + machinegun_turret_private_vars->target_volume) != 0) { MOBY(moby)->state = TURRET_STATE_AIM_AND_FIRE; set_moby_animation(moby, 3, 0); - machinegun_turret_private_vars->unk74 = func_001F9850_2B4E40(120); + machinegun_turret_private_vars->state_timer = func_001F9850_2B4E40(120); machinegun_turret_private_vars->timer_9C = func_001F9850_2B4E40(20); return; } } - if (machinegun_turret_private_vars->unk8A != 0) { + if (machinegun_turret_private_vars->started_deployed != 0) { return; } - if (fast_dec_timer_s16(&machinegun_turret_private_vars->unk76) == 0) { + if (fast_dec_timer_s16(&machinegun_turret_private_vars->target_wait_timer) == 0) { return; } - machinegun_turret_private_vars->unk8B = 1; + machinegun_turret_private_vars->target_wait_expired = 1; return; case TURRET_STATE_AIM_AND_FIRE: - if (machinegun_turret_private_vars->unk9E != 0) { + if (machinegun_turret_private_vars->reverse_sweep != 0) { signed_phase_increment = -machinegun_turret_aiming_phase_increment_gp; } else { signed_phase_increment = machinegun_turret_aiming_phase_increment_gp; } phase_angle = - fast_add_rotations(machinegun_turret_private_vars->unk8C, signed_phase_increment); - machinegun_turret_private_vars->unk8C = phase_angle; + fast_add_rotations(machinegun_turret_private_vars->sweep_angle, signed_phase_increment); + machinegun_turret_private_vars->sweep_angle = phase_angle; sine_input_angle = fast_add_rotations( - phase_angle, machinegun_turret_private_vars->unk84 * 0.01745329238474369f); + phase_angle, machinegun_turret_private_vars->base_heading * 0.01745329238474369f); aiming_cuboid_index = machinegun_turret_private_vars->aiming_cuboid; aiming_offset_vector = (int)l14_cuboids + (aiming_cuboid_index << 7) + 0x10; sine_scale = func_001F9FA8_2B4E40(sine_input_angle); @@ -421,11 +424,11 @@ void machinegun_turret_update(char *moby) { target_missing_or_outside_waking_cuboid = (scaled_wait_frames_or_target_query_status == MOBY_SELECTION_NO_TARGET || is_point_inside_clip_volume(target_query_result, - machinegun_turret_private_vars->unk90) == 0); + machinegun_turret_private_vars->target_volume) == 0); if (target_missing_or_outside_waking_cuboid == 0) { return; } - if (fast_dec_timer_s16(&machinegun_turret_private_vars->unk74) == 0) { + if (fast_dec_timer_s16(&machinegun_turret_private_vars->state_timer) == 0) { return; } if ((MOBY(moby)->anim_flags & 2) == 0) { @@ -435,21 +438,22 @@ void machinegun_turret_update(char *moby) { if (animation_sequence != 3) { return; } - machinegun_turret_private_vars->unk76 = + machinegun_turret_private_vars->target_wait_timer = func_001F9850_2B4E40(machinegun_turret_target_wait_timeout_frames_gp); MOBY(moby)->state = animation_sequence; set_moby_animation(moby, 2, 0); MOBY(moby)->anim_speed = 1.0f; return; case TURRET_STATE_RETRACT: { - float t = - (float)machinegun_turret_private_vars->unk74 * machinegun_turret_private_vars->unk78; + float t = (float)machinegun_turret_private_vars->state_timer * + machinegun_turret_private_vars->inverse_state_frames; MOBY(moby)->pos.z = machinegun_turret_private_vars->base_z - (machinegun_turret_retraction_depth_gp + (0.0f - machinegun_turret_retraction_depth_gp) * t); - MOBY(moby)->rot.z = - machinegun_turret_private_vars->unk84 + - (machinegun_turret_private_vars->unk8C - machinegun_turret_private_vars->unk84) * t; + MOBY(moby)->rot.z = machinegun_turret_private_vars->base_heading + + (machinegun_turret_private_vars->sweep_angle - + machinegun_turret_private_vars->base_heading) * + t; } if (MOBY(moby)->anim_flags & 2) { if (MOBY(moby)->seq == 4) { @@ -457,18 +461,19 @@ void machinegun_turret_update(char *moby) { MOBY(moby)->anim_speed = 1.0f; } } - if (machinegun_turret_private_vars->unk74 < func_001F9850_2B4E40(D_L14_0016150C >> 1)) { + if (machinegun_turret_private_vars->state_timer < + func_001F9850_2B4E40(D_L14_0016150C >> 1)) { MOBY(moby)->collision = 0; } - if (fast_dec_timer_s16(&machinegun_turret_private_vars->unk74) == 0) { + if (fast_dec_timer_s16(&machinegun_turret_private_vars->state_timer) == 0) { return; } - MOBY(moby)->rot.z = machinegun_turret_private_vars->unk84; + MOBY(moby)->rot.z = machinegun_turret_private_vars->base_heading; MOBY(moby)->state = TURRET_STATE_WAIT_FOR_ACTIVATION; - machinegun_turret_private_vars->unk74 = func_001F9850_2B4E40(60); - machinegun_turret_private_vars->unk88 = 0; + machinegun_turret_private_vars->state_timer = func_001F9850_2B4E40(60); + machinegun_turret_private_vars->activated = 0; machinegun_turret_private_vars->timer = - func_001F9850_2B4E40(machinegun_turret_private_vars->unk94); + func_001F9850_2B4E40(machinegun_turret_private_vars->activation_delay_frames); MOBY(moby)->pos.z = machinegun_turret_private_vars->base_z - machinegun_turret_retraction_depth_gp; MOBY(moby)->flags = MOBY(moby)->flags & 0xEFFF; diff --git a/src/overlays/l14/mobys/platform.c b/src/overlays/l14/mobys/platform.c index c5de30ed35..f71428af8d 100644 --- a/src/overlays/l14/mobys/platform.c +++ b/src/overlays/l14/mobys/platform.c @@ -42,12 +42,12 @@ void tilting_platform_update(struct Moby *moby) __asm__("FUN_L14_002de1f8"); typedef struct TiltingPlatformVars { u8 pad_0[0x20]; - f32 unk20[4]; + f32 carry[4]; /* carried-object state for update_entity_matrix */ u8 pad_30[0x2C]; s32 unk5C; - f32 unk60; + f32 up_vector_x_velocity; f32 up_vector_y_velocity; - f32 unk68; + f32 up_vector_z_velocity; u8 pad_6C[0x4]; s32 timer_70; } TiltingPlatformVars; @@ -70,14 +70,14 @@ void tilting_platform_update(struct Moby *moby) { moby->pos.z += 0.35f; tilting_platform_state->unk5C = 1; tilting_platform_state->timer_70 = 0; - qzero(&tilting_platform_state->unk60); + qzero(&tilting_platform_state->up_vector_x_velocity); qzero(&moby->rot); rotation = &moby->rot; } else { rotation = &moby->rot; } FUN_L14_002de2b8_call(moby, unused_platform_tilt_argument, 8.0f); - update_entity_matrix(tilting_platform_state->unk20, D_L14_0015F580, &old_rotation, rotation); + update_entity_matrix(tilting_platform_state->carry, D_L14_0015F580, &old_rotation, rotation); } /* Ported from rac1-decomp src/overlays/l14_oltanis/vendor_002ACCC0.c (func_L14_002DF6B8) */ @@ -156,7 +156,7 @@ void update_platform_tilt_basis(char *moby, f32 unused_arg1, f32 unused_arg2) { } vendor_spring((float *)&MOBY(moby)->rot_row2, - &platform_tilt_state->unk60, + &platform_tilt_state->up_vector_x_velocity, target_up_vector[0], 0.005f, 0.2f, @@ -168,7 +168,7 @@ void update_platform_tilt_basis(char *moby, f32 unused_arg1, f32 unused_arg2) { 0.2f, 0.0f); vendor_spring((float *)&MOBY(moby)->rot_row2.z, - &platform_tilt_state->unk68, + &platform_tilt_state->up_vector_z_velocity, target_up_vector[2], 0.005f, 0.2f, diff --git a/src/overlays/l14/mobys/racer.c b/src/overlays/l14/mobys/racer.c index 0d87ab481e..74bad8389b 100644 --- a/src/overlays/l14/mobys/racer.c +++ b/src/overlays/l14/mobys/racer.c @@ -54,7 +54,7 @@ struct L14RacerVars { s32 end_point; /* 0x84: D_L14_001B0BB0 entry the run ends at */ s32 start_point; /* 0x88: D_L14_001B0BB0 entry the run starts from (-1: none) */ u8 pad8C[0x64]; - s32 unkF0; + s32 light_slot; /* 0xF0: point light slot (-1: none) */ s32 unkF4; u8 padF8[8]; u8 manips[3][0x40]; /* 0x100: attached as manipulators 2..4 */ @@ -138,7 +138,7 @@ void level14_racer_update(struct Moby *racer_moby) { racer_moby->flags = (racer_moby->flags & 0xEFFF) | 0x41; racer_moby->collision = 0; racer_vars->unkF4 = -1; - racer_vars->unkF0 = -1; + racer_vars->light_slot = -1; fill_transfer_words(racer_vars->manips[0], 0, 0x40); attach_manipulator(racer_moby, 2, racer_vars->manips[0]); fill_transfer_words(racer_vars->manips[1], 0, 0x40); diff --git a/src/overlays/l14/mobys/racer_path_and_weapon.c b/src/overlays/l14/mobys/racer_path_and_weapon.c index 15f2d0b6a6..6433792ab5 100644 --- a/src/overlays/l14/mobys/racer_path_and_weapon.c +++ b/src/overlays/l14/mobys/racer_path_and_weapon.c @@ -47,38 +47,41 @@ typedef struct RacerVars { u8 pad_0[0x60]; s32 spline; s32 current_path_segment_index; - f32 unk68; + f32 path_segment_distance; s32 timer; - f32 unk70[4]; + f32 inverse_start_frames; /* 1 / timer at the start of the run */ + f32 lead_distance; + f32 lead_distance_blend_length; + u8 pad_7C[0x4]; u8 pad_80[0x4]; s32 initial_position_path_index; - s32 unk88; + s32 start_point; s16 nearest_segment; s16 lead_distance_blend_start_segment; f32 position_spring_velocity[3]; u8 pad_9C[0x4]; f32 bone_transform[16]; - f32 unkE0[4]; - s32 unkF0; + f32 lamp_glow_position[4]; + s32 light_slot; u8 pad_F4[0x1C]; u8 target_facing_yaw_quaternion; u8 pad_111[0x3F]; - u8 unk150; + u8 turn_quaternion; u8 pad_151[0x32]; - s8 unk183; + s8 aim_manipulator_absolute; u8 pad_184[0x8]; - f32 unk18C; + f32 aim_manipulator_blend; f32 rotation[4]; - f32 unk1A0[4]; - f32 unk1B0[4]; + f32 aim_manipulator_scale[4]; + f32 aim_manipulator_translation[4]; s32 aim_timer; s32 weapon_aim_blend_elapsed_frames; s32 timer_1C8; u8 pad_1CC[0x4]; f32 target_rotation[4]; - f32 unk1E0[4]; + f32 aim_point[4]; u8 pad_1F0[0x10]; - f32 unk200[4]; + f32 tail_glow_position[4]; } RacerVars; void initialize_racer_path_tracking(struct Moby *racer_moby) __asm__("FUN_L14_002d6358"); @@ -91,11 +94,11 @@ void initialize_racer_path_tracking(struct Moby *racer_moby) { int k; float z; unsigned short second_point_segment; - moby_data->unk70[1] = racer_path_lead_distance_gp; - *(int *)&moby_data->unk68 = 0; + moby_data->lead_distance = racer_path_lead_distance_gp; + *(int *)&moby_data->path_segment_distance = 0; moby_data->current_path_segment_index = 0; - z = moby_data->unk68; - tg = (char *)l14_paths[moby_data->unk88] + 0x30; + z = moby_data->path_segment_distance; + tg = (char *)l14_paths[moby_data->start_point] + 0x30; nearest_path_position.t = z; nearest_path_position.i = 0; FUN_L00_0025df68(path, @@ -111,7 +114,7 @@ void initialize_racer_path_tracking(struct Moby *racer_moby) { nearest_path_position.t = z; nearest_path_position.i = 0; FUN_L00_0025df68(path, - (char *)l14_paths[moby_data->unk88] + 0x20, + (char *)l14_paths[moby_data->start_point] + 0x20, nearest_path_position.v, &nearest_path_position.i, &nearest_path_position.t, @@ -121,9 +124,9 @@ void initialize_racer_path_tracking(struct Moby *racer_moby) { z); second_point_segment = nearest_path_position.i; moby_data->lead_distance_blend_start_segment = second_point_segment; - moby_data->unk70[2] = z; + moby_data->lead_distance_blend_length = z; for (k = (short)second_point_segment; k < moby_data->nearest_segment; k++) { - moby_data->unk70[2] += *(float *)(path + k * 16 + 0x1C); + moby_data->lead_distance_blend_length += *(float *)(path + k * 16 + 0x1C); } } @@ -141,7 +144,7 @@ int interpolate_racer_to_path_start(struct Moby *racer_moby) { lerp_vector(&racer_moby->pos, ent + 0x10, ((char *)l14_paths[moby_data->initial_position_path_index]) + 0x10, - remaining_frames * moby_data->unk70[0]); + remaining_frames * moby_data->inverse_start_frames); return ok; } @@ -315,22 +318,22 @@ void update_racer_path_and_weapon(struct Moby *racer_moby) { k++) { sum += *(float *)(path + k * 16 + 0x1C); } - sum += moby_data->unk68; - sum /= moby_data->unk70[2]; + sum += moby_data->path_segment_distance; + sum /= moby_data->lead_distance_blend_length; if (sum > 1.0f) { sum = 1.0f; } - moby_data->unk70[1] = + moby_data->lead_distance = racer_path_lead_distance_gp + (-3.0f - racer_path_lead_distance_gp) * sum; } - *(int *)&moby_data->unk68 = 0; + *(int *)&moby_data->path_segment_distance = 0; moby_data->current_path_segment_index = 0; - z = moby_data->unk68; + z = moby_data->path_segment_distance; FUN_L00_0025df68(path, &D_0013F3D0_67e8, &near.x, &moby_data->current_path_segment_index, - &moby_data->unk68, + &moby_data->path_segment_distance, 0, 20.0f, 5.0f, @@ -338,9 +341,9 @@ void update_racer_path_and_weapon(struct Moby *racer_moby) { FUN_L00_0025d808(path, &near, &moby_data->current_path_segment_index, - &moby_data->unk68, + &moby_data->path_segment_distance, 0, - -moby_data->unk70[1]); + -moby_data->lead_distance); vendor_spring(&racer_moby->pos.x, moby_data->position_spring_velocity, near.x, 0.01f, 0.2f, z); vendor_spring( &racer_moby->pos.y, &moby_data->position_spring_velocity[1], near.y, 0.01f, 0.2f, z); @@ -391,7 +394,7 @@ void update_racer_path_and_weapon(struct Moby *racer_moby) { &tf, 0, k + (1.0f - k) * aim_timer_fraction); - qcopy(moby_data->unk1E0, &joint_transform_and_aim_vectors[0]); + qcopy(moby_data->aim_point, &joint_transform_and_aim_vectors[0]); fast_vec_sub(&joint_transform_and_aim_vectors[1], &joint_transform_and_aim_vectors[0], &racer_moby->pos); @@ -422,7 +425,7 @@ void update_racer_path_and_weapon(struct Moby *racer_moby) { } turn = (turn - 0.0f) * blend + 0.0f; } - build_axis_rotation_quaternion(&moby_data->unk150, 2, turn); + build_axis_rotation_quaternion(&moby_data->turn_quaternion, 2, turn); moby_point_position(racer_moby, 4, &joint_transform_and_aim_vectors[2]); *(u128_67e8 *)&joint_transform_and_aim_vectors[3] = 0; joint_transform_and_aim_vectors[3].z = 1.0f; @@ -450,22 +453,22 @@ void update_racer_path_and_weapon(struct Moby *racer_moby) { } else { qcopy(moby_data->rotation, &rot); } - moby_data->unk183 = 1; - moby_data->unk18C = 1.0f; + moby_data->aim_manipulator_absolute = 1; + moby_data->aim_manipulator_blend = 1.0f; *(u128_67e8 *)&one = 0; one.x = 1.0f; one.y = 1.0f; one.z = 1.0f; one.w = 1.0f; - qcopy(moby_data->unk1A0, &one); - qcopy(moby_data->unk1B0, &scl); + qcopy(moby_data->aim_manipulator_scale, &one); + qcopy(moby_data->aim_manipulator_translation, &scl); if (fast_dec_timer(&moby_data->aim_timer) != 0) { racer_moby->command = 4; moby_data->weapon_aim_blend_elapsed_frames = 0; } if (racer_moby->command == 3) { if (set_beam_origin_transform_and_endpoint( - racer_moby, moby_data->bone_transform, moby_data->unk1E0) == 0) { + racer_moby, moby_data->bone_transform, moby_data->aim_point) == 0) { register_beam_slot(racer_moby, 3, 1); } ray.flags = 0x10001; @@ -479,7 +482,8 @@ void update_racer_path_and_weapon(struct Moby *racer_moby) { ray.b19 = 1; ray.oclass = racer_moby->oclass; ray.b18 = 0; - collision_line(&moby_data->bone_transform[12], moby_data->unk1E0, 9, racer_moby, &ray); + collision_line( + &moby_data->bone_transform[12], moby_data->aim_point, 9, racer_moby, &ray); } else if (racer_moby->command == 2 || racer_moby->command == 4) { char *muzzle_flash_particle; float muzzle_light_position_w; @@ -505,29 +509,31 @@ void update_racer_path_and_weapon(struct Moby *racer_moby) { qcopy(&ray.self, muzzle); ((float *)&ray.self)[2] -= 0.5f; muzzle_light_position_w = (muzzle_light_full_blend_position_w - 0.1f) * blend + 0.1f; - if (moby_data->unkF0 == -1) { - moby_data->unkF0 = allocate_colored_effect_slot(&ray.self, - muzzle_light_position_w, - 0.0f, - muzzle_light_color_component_x, - muzzle_light_color_component_y, - muzzle_light_color_component_z); + if (moby_data->light_slot == -1) { + moby_data->light_slot = + allocate_colored_effect_slot(&ray.self, + muzzle_light_position_w, + 0.0f, + muzzle_light_color_component_x, + muzzle_light_color_component_y, + muzzle_light_color_component_z); } - if (moby_data->unkF0 >= 0) { - float *muzzle_light_entry = (float *)(D_L14_001809C0 + (moby_data->unkF0 << 5)); + if (moby_data->light_slot >= 0) { + float *muzzle_light_entry = + (float *)(D_L14_001809C0 + (moby_data->light_slot << 5)); qcopy(muzzle_light_entry + 4, &ray.self); muzzle_light_entry[7] = muzzle_light_position_w; muzzle_light_entry[0] = muzzle_light_color_component_x; muzzle_light_entry[1] = muzzle_light_color_component_y; muzzle_light_entry[2] = muzzle_light_color_component_z; } - } else if (moby_data->unkF0 != -1) { - release_point_light_slot(moby_data->unkF0); - moby_data->unkF0 = -1; + } else if (moby_data->light_slot != -1) { + release_point_light_slot(moby_data->light_slot); + moby_data->light_slot = -1; } - } else if (moby_data->unkF0 != -1) { - release_point_light_slot(moby_data->unkF0); - moby_data->unkF0 = -1; + } else if (moby_data->light_slot != -1) { + release_point_light_slot(moby_data->light_slot); + moby_data->light_slot = -1; } fast_vec_sub(&joint_transform_and_aim_vectors[0], &D_0013F3D0_67e8, &racer_moby->pos); target_yaw_offset = fast_subtract_rotations( @@ -551,7 +557,7 @@ void advance_moby_along_path(struct Moby *moby) { FUN_L00_0025d808((int)l14_splines[path_index].path, &moby->pos, &path_tracking_state->current_path_segment_index, - &path_tracking_state->unk68, + &path_tracking_state->path_segment_distance, 0, l14_racer_path_follow_speed * frame_time); } @@ -648,15 +654,15 @@ void update_moby_joint_visual_effects(struct Moby *moby) { moby_point_position(moby, 1, joint_position); fast_vec_sub(glow_position_offset, joint_position, D_L14_001674C0); fast_vec_normalize(glow_position_offset, glow_position_offset, -0.5f); - fast_vec_add(moby_data->unkE0, joint_position, glow_position_offset); + fast_vec_add(moby_data->lamp_glow_position, joint_position, glow_position_offset); if ((unsigned int)(moby->state - 3) < 3) { joint_position[2] += 1.0f; - if (moby_data->unkF0 == -1) { - moby_data->unkF0 = allocate_colored_effect_slot( + if (moby_data->light_slot == -1) { + moby_data->light_slot = allocate_colored_effect_slot( joint_position, joint_light_position_w_gp, 0.0f, 0.5f, 0.5f, 1.0f); } - if (moby_data->unkF0 >= 0) { - char *e = D_L14_001809C0 + moby_data->unkF0 * 32; + if (moby_data->light_slot >= 0) { + char *e = D_L14_001809C0 + moby_data->light_slot * 32; qcopy(e + 0x10, joint_position); *(float *)(e + 0x1C) = joint_light_position_w_gp; } @@ -687,6 +693,6 @@ void update_moby_joint_visual_effects(struct Moby *moby) { *(int *)(e + 0x18) = 0x7F7F7F; *(short *)(e + 0x16) = 3; } - moby_point_position(moby, 6, moby_data->unk200); + moby_point_position(moby, 6, moby_data->tail_glow_position); add_draw_callback(draw_racer_glow_quads, moby); } From f2ea57ad65582ae1dd04ad36da93a29f7c87131d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:26:32 +0000 Subject: [PATCH 082/213] decomp: name snagglebeast, taxi, falling platform, bombomatic and mine group fields in l07 --- src/overlays/l07/mobys/bombomatic.c | 60 ++++---- .../l07/mobys/command_falling_platform.c | 94 ++++++------ .../l07/mobys/hero_falling_platform.c | 13 +- src/overlays/l07/mobys/machinegun_turret.c | 4 +- src/overlays/l07/mobys/mine_group.c | 58 ++++---- .../l07/mobys/mission_gated_taxi_platform.c | 84 +++++------ src/overlays/l07/mobys/snagglebeast.c | 134 ++++++++++-------- src/overlays/l14/mobys/path_mover.c | 4 +- 8 files changed, 232 insertions(+), 219 deletions(-) diff --git a/src/overlays/l07/mobys/bombomatic.c b/src/overlays/l07/mobys/bombomatic.c index 50d05a7f44..8c9e9393b3 100644 --- a/src/overlays/l07/mobys/bombomatic.c +++ b/src/overlays/l07/mobys/bombomatic.c @@ -159,22 +159,22 @@ char *spawn_bombomatic_projectile(char *spawn_position, typedef struct BombomaticVars { u8 pad_0[0x20]; - u8 unk20; - u8 pad_21[0x5]; + f32 health; + u8 pad_24[0x2]; s16 unk26; u8 pad_28[0x38]; struct HitColorFlash hit_flash; u8 manipulator_70; u8 pad_71[0xF]; - u8 unk80; + u8 spin_quaternion; /* quat of manipulator_70, turned by spin_angle */ u8 pad_81[0x2F]; - s32 unkB0; - s32 unkB4; - s16 timer_B8; - s16 launch_burst_index; - f32 unkBC; - f32 unkC0; - s32 unkC4; + s32 start_delay_frames; + s32 next_phase_frame; /* game frame (D_L07_0015F5CC) of the next state change */ + s16 timer_B8; + s16 launch_burst_index; + f32 launch_yaw; + f32 spin_angle; + s32 alternate_launch; /* toggled per shot; between 40 and 90 away only every other shot fires */ } BombomaticVars; /* Moby class 1041 */ @@ -229,7 +229,7 @@ void bombomatic_update(char *moby) { return; } hit_info = FUN_L00_0025a420(moby, 0x230000, 0); - health_ptr = &moby_data->unk20; + health_ptr = &moby_data->health; hit_reaction_result = resolve_moby_hit_response(moby, hit_info, health_ptr, 0, &ia, 0, 0, 4); switch (hit_reaction_result) { case HIT_REACTION_NONE: @@ -333,25 +333,26 @@ void bombomatic_update(char *moby) { get_target_sight(moby, target_buffer, 20.0f); switch (((unsigned char *)moby)[0x20]) { case BOMBOMATIC_INITIALIZE: { - int initial_delay_frames = scale_game_frames(moby_data->unkB0); + int initial_delay_frames = scale_game_frames(moby_data->start_delay_frames); int random_initial_delay; int random_initial_delay_frames; random_initial_delay = random_int_between(0, 10); random_initial_delay_frames = scale_game_frames(random_initial_delay); - moby_data->unkB4 = D_L07_0015F5CC + initial_delay_frames + random_initial_delay_frames; + moby_data->next_phase_frame = + D_L07_0015F5CC + initial_delay_frames + random_initial_delay_frames; attach_manipulator(moby, 0, &moby_data->manipulator_70); - *(int *)&moby_data->unkC0 = 0; + *(int *)&moby_data->spin_angle = 0; allocate_voice_for_target_entry(0, 4, (int)moby); MOBY(moby)->state = BOMBOMATIC_WAIT_TO_LAUNCH; - moby_data->unkC4 = 0; + moby_data->alternate_launch = 0; break; } case BOMBOMATIC_WAIT_TO_LAUNCH: { - if (moby_data->unkB4 <= D_L07_0015F5CC) { + if (moby_data->next_phase_frame <= D_L07_0015F5CC) { int r9 = scale_game_frames(0xB4); - moby_data->unkB4 = D_L07_0015F5CC + r9; + moby_data->next_phase_frame = D_L07_0015F5CC + r9; moby_data->timer_B8 = 0; - moby_data->unkBC = random_angle_radians(); + moby_data->launch_yaw = random_angle_radians(); moby_data->launch_burst_index = 0; MOBY(moby)->state = BOMBOMATIC_LAUNCH_BURST; } @@ -363,16 +364,16 @@ void bombomatic_update(char *moby) { moby_data->timer_B8 = scale_game_frames(7); if (((unsigned char *)moby)[0x31] == 0) { if (!(vector_distance_xy(moby + 0x10, debris_far_point) < 90.0f && - (moby_data->unkC4 & 1) != 0)) { + (moby_data->alternate_launch & 1) != 0)) { if (!(vector_distance_xy(moby + 0x10, debris_far_point) < 40.0f)) { goto eeE4; } } } - moby_data->unkC4 ^= 1; + moby_data->alternate_launch ^= 1; if (vector_distance_xy(moby + 0x10, target_buffer) < 20.0f) { - moby_data->unkBC = fast_arc_tan(target_buffer[0] - MOBY(moby)->pos.x, - target_buffer[1] - MOBY(moby)->pos.y); + moby_data->launch_yaw = fast_arc_tan(target_buffer[0] - MOBY(moby)->pos.x, + target_buffer[1] - MOBY(moby)->pos.y); } launch_work_vector[0] = random_float_between(3.0f, 11.0f); launch_work_vector[1] = random_float_between(-2.0f, 2.0f); @@ -387,7 +388,8 @@ void bombomatic_update(char *moby) { FUN_L00_0024f7c8(moby, i, candidate_point_position); f = fast_arc_tan(candidate_point_position[0] - MOBY(moby)->pos.x, candidate_point_position[1] - MOBY(moby)->pos.y); - g = fast_subtract_rotations(moby_data->unkBC, D_0015ED6C_gp * 17.80235863f); + g = fast_subtract_rotations(moby_data->launch_yaw, + D_0015ED6C_gp * 17.80235863f); f = fast_difference_between_rotations(f, g); if (f < best) { qcopy(vF0, candidate_point_position); @@ -397,7 +399,7 @@ void bombomatic_update(char *moby) { qcopy(vA0, vF0); } qzero(launch_rotation); - launch_rotation[2] = moby_data->unkBC; + launch_rotation[2] = moby_data->launch_yaw; euler_rotation_matrix(vB0, launch_rotation); transform_vector(launch_work_vector, launch_work_vector, vB0); fast_vec_normalize(debris_velocity, launch_work_vector, D_0015ED6C_gp * 7.0f); @@ -410,9 +412,9 @@ void bombomatic_update(char *moby) { moby_data->launch_burst_index = moby_data->launch_burst_index + 1; } eeE4: - if (moby_data->unkB4 <= D_L07_0015F5CC) { + if (moby_data->next_phase_frame <= D_L07_0015F5CC) { int r9 = scale_game_frames(0x78); - moby_data->unkB4 = D_L07_0015F5CC + r9; + moby_data->next_phase_frame = D_L07_0015F5CC + r9; MOBY(moby)->state = BOMBOMATIC_WAIT_TO_LAUNCH; } break; @@ -421,8 +423,8 @@ void bombomatic_update(char *moby) { if (((unsigned char *)moby)[0x20] != 0) { float f = D_0015ED6C_gp * 17.80235863f; - float g = fast_add_rotations(moby_data->unkC0, f); - moby_data->unkC0 = g; - build_axis_rotation_quaternion(&moby_data->unk80, 2, g); + float g = fast_add_rotations(moby_data->spin_angle, f); + moby_data->spin_angle = g; + build_axis_rotation_quaternion(&moby_data->spin_quaternion, 2, g); } } diff --git a/src/overlays/l07/mobys/command_falling_platform.c b/src/overlays/l07/mobys/command_falling_platform.c index 8ca22a5788..869f5b1a28 100644 --- a/src/overlays/l07/mobys/command_falling_platform.c +++ b/src/overlays/l07/mobys/command_falling_platform.c @@ -42,18 +42,18 @@ typedef struct CommandFallingPlatformVars { s32 parent_index; f32 saved_rot_x; f32 saved_rot_y; - s32 unkAC; + s32 sway_timer; f32 fall_speed; - f32 unkB4; - f32 unkB8; - u8 unkBC; + f32 gravity_scale; + f32 float_height; /* water line the platform bobs at */ + u8 recovers; /* nonzero: floats back up after the fall instead of being removed */ u8 pre_fall_delay; u8 fall_signaling_enabled; u8 parent_fall_signal; - f32 unkC0; - f32 unkC4; - s32 unkC8; - f32 unkCC; + f32 sway_phase; + f32 roll_phase; + s32 crossing_sound_timer; /* a sound plays when it crosses float_height */ + f32 last_z; } CommandFallingPlatformVars; /* Moby class 1069 */ @@ -94,7 +94,7 @@ void command_falling_platform_update(char *moby) { if (((unsigned char *)moby)[0xBC] == 2) { MOBY(moby)->state = PLATFORM_TIMED_SWAY_BEFORE_FALL; MOBY(moby)->command = 3; - falling_platform_vars->unkAC = falling_platform_vars->pre_fall_delay; + falling_platform_vars->sway_timer = falling_platform_vars->pre_fall_delay; } switch (((unsigned char *)moby)[0x20]) { case PLATFORM_INITIALIZE: @@ -107,14 +107,14 @@ void command_falling_platform_update(char *moby) { MOBY(moby)->rot.z = fast_add_rotations(MOBY(moby)->rot.z, 3.1415927f); falling_platform_vars->saved_rot_x = MOBY(moby)->rot.x; falling_platform_vars->saved_rot_y = MOBY(moby)->rot.y; - falling_platform_vars->unkC8 = -1; + falling_platform_vars->crossing_sound_timer = -1; MOBY(moby)->state = PLATFORM_COMMAND_GATED_SWAY; MOBY(moby)->command = 0; if (((unsigned char *)moby)[0xB0] != 0xFF) { if (visited52[((unsigned char *)moby)[0xB0] + current_level_index * 16] != 0xFF) break; MOBY(moby)->pos.z -= 5.0f; - if (falling_platform_vars->unkBC == 0) { + if (falling_platform_vars->recovers == 0) { mark_moby_for_removal(moby); return; } @@ -124,33 +124,33 @@ void command_falling_platform_update(char *moby) { case PLATFORM_COMMAND_GATED_SWAY: if (((unsigned char *)moby)[0xBC] != 1) break; - if (falling_platform_vars->unkAC == 0) - falling_platform_vars->unkAC = rand() % 10; + if (falling_platform_vars->sway_timer == 0) + falling_platform_vars->sway_timer = rand() % 10; if (falling_platform_vars->fall_signaling_enabled != 0) FUN_L01_0026e090(((unsigned char *)moby)[0x21], 2); MOBY(moby)->rot.x = fast_add_rotations( falling_platform_vars->saved_rot_x, - fast_sin( - normalize_angle(convert_integer_to_float(falling_platform_vars->unkAC) * 0.75f)) * + fast_sin(normalize_angle(convert_integer_to_float(falling_platform_vars->sway_timer) * + 0.75f)) * 0.017453292f); MOBY(moby)->rot.y = fast_add_rotations( falling_platform_vars->saved_rot_y, - fast_cos( - normalize_angle(convert_integer_to_float(falling_platform_vars->unkAC) * 0.89f)) * + fast_cos(normalize_angle(convert_integer_to_float(falling_platform_vars->sway_timer) * + 0.89f)) * 0.017453292f); break; case PLATFORM_TIMED_SWAY_BEFORE_FALL: MOBY(moby)->rot.x = fast_add_rotations( falling_platform_vars->saved_rot_x, - fast_sin( - normalize_angle(convert_integer_to_float(falling_platform_vars->unkAC) * 0.75f)) * + fast_sin(normalize_angle(convert_integer_to_float(falling_platform_vars->sway_timer) * + 0.75f)) * 0.017453292f); MOBY(moby)->rot.y = fast_add_rotations( falling_platform_vars->saved_rot_y, - fast_cos( - normalize_angle(convert_integer_to_float(falling_platform_vars->unkAC) * 0.89f)) * + fast_cos(normalize_angle(convert_integer_to_float(falling_platform_vars->sway_timer) * + 0.89f)) * 0.017453292f); - if (!fast_dec_timer(&falling_platform_vars->unkAC)) + if (!fast_dec_timer(&falling_platform_vars->sway_timer)) break; if (falling_platform_vars->fall_signaling_enabled != 0) { parent_data[0x19D] = falling_platform_vars->parent_fall_signal; @@ -169,11 +169,11 @@ void command_falling_platform_update(char *moby) { float gravity = frame_time_sq; float drop = 15.0f; MOBY(moby)->pos.z -= descent; - falling_platform_vars->fall_speed -= falling_platform_vars->unkB4 * gravity; + falling_platform_vars->fall_speed -= falling_platform_vars->gravity_scale * gravity; MOBY(moby)->pos.z += falling_platform_vars->fall_speed; - if (!(MOBY(moby)->pos.z < falling_platform_vars->unkB8 - drop)) + if (!(MOBY(moby)->pos.z < falling_platform_vars->float_height - drop)) break; - if (falling_platform_vars->unkBC != 0) { + if (falling_platform_vars->recovers != 0) { falling_platform_vars->fall_speed = 0.0f; MOBY(moby)->state = PLATFORM_PARENT_GATED_RECOVERY_SETUP; } else { @@ -186,25 +186,25 @@ void command_falling_platform_update(char *moby) { if (((unsigned char *)parent_data)[0xEF] < 2 && ((unsigned char *)parent)[0x20] > 11) break; falling_platform_vars->fall_speed = random_float_between(frame_time, frame_time * 4.0f); - falling_platform_vars->unkC0 = random_angle_radians(); - falling_platform_vars->unkC4 = random_angle_radians(); + falling_platform_vars->sway_phase = random_angle_radians(); + falling_platform_vars->roll_phase = random_angle_radians(); MOBY(moby)->state = PLATFORM_HEIGHT_RECOVERY_AND_SWAY; MOBY(moby)->rot.x = 0.0f; MOBY(moby)->rot.y = 0.0f; - falling_platform_vars->unkAC = 0; + falling_platform_vars->sway_timer = 0; break; case PLATFORM_HEIGHT_RECOVERY_AND_SWAY: target = MOBY(moby)->pos.z + falling_platform_vars->fall_speed; - height = falling_platform_vars->unkB8; + height = falling_platform_vars->float_height; if (hero.air_frames.s == 0 && (char *)hero.ground_moby == moby) { - if (falling_platform_vars->unkAC == 0) + if (falling_platform_vars->sway_timer == 0) FUN_0022da68(0, 0, (int)moby); timer = scale_game_frames(90); - if (falling_platform_vars->unkAC < timer) - falling_platform_vars->unkAC = scale_game_frames(90); + if (falling_platform_vars->sway_timer < timer) + falling_platform_vars->sway_timer = scale_game_frames(90); } - if (falling_platform_vars->unkAC != 0) { - if (MOBY(moby)->pos.z > falling_platform_vars->unkB8 - 2.6f) { + if (falling_platform_vars->sway_timer != 0) { + if (MOBY(moby)->pos.z > falling_platform_vars->float_height - 2.6f) { falling_platform_vars->fall_speed = -(frame_time * 0.25f); } else { falling_platform_vars->fall_speed = 0.0f; @@ -227,13 +227,15 @@ void command_falling_platform_update(char *moby) { } } MOBY(moby)->pos.z += falling_platform_vars->fall_speed; - falling_platform_vars->unkC0 = fast_add_rotations(falling_platform_vars->unkC0, 0.01f); - falling_platform_vars->unkC4 = fast_add_rotations(falling_platform_vars->unkC0, 0.017f); - sway = fast_sin(falling_platform_vars->unkC0) * 0.02f; - roll = fast_sin(falling_platform_vars->unkC4) * 0.02f; - if (falling_platform_vars->unkAC != 0) { + falling_platform_vars->sway_phase = + fast_add_rotations(falling_platform_vars->sway_phase, 0.01f); + falling_platform_vars->roll_phase = + fast_add_rotations(falling_platform_vars->sway_phase, 0.017f); + sway = fast_sin(falling_platform_vars->sway_phase) * 0.02f; + roll = fast_sin(falling_platform_vars->roll_phase) * 0.02f; + if (falling_platform_vars->sway_timer != 0) { float forward, side; - fast_dec_timer(&falling_platform_vars->unkAC); + fast_dec_timer(&falling_platform_vars->sway_timer); fast_vec_sub(platform_to_hero_offset, &hero.motion.pos, moby + 0x10); forward = fast_vec_dot(platform_to_hero_offset, moby + 0xC0); side = fast_vec_dot(platform_to_hero_offset, moby + 0xD0) * -0.03f; @@ -259,16 +261,18 @@ void command_falling_platform_update(char *moby) { MOBY(moby)->rot.y = -0.5235988f; break; } - if (((unsigned char *)moby)[0x20] == 5 && fast_dec_timer(&falling_platform_vars->unkC8)) { - float last = falling_platform_vars->unkCC; - float height = falling_platform_vars->unkB8; + if (((unsigned char *)moby)[0x20] == 5 && + fast_dec_timer(&falling_platform_vars->crossing_sound_timer)) { + float last = falling_platform_vars->last_z; + float height = falling_platform_vars->float_height; if ((height <= last && MOBY(moby)->pos.z < height) || (last <= height && height < MOBY(moby)->pos.z)) { FUN_0022da68(0, 0, (int)moby); - falling_platform_vars->unkC8 = rand() % scale_game_frames(20) + scale_game_frames(20); + falling_platform_vars->crossing_sound_timer = + rand() % scale_game_frames(20) + scale_game_frames(20); } } - falling_platform_vars->unkCC = MOBY(moby)->pos.z; + falling_platform_vars->last_z = MOBY(moby)->pos.z; fast_vec_add(delta, delta, moby + 0x10); update_entity_matrix(falling_platform_vars->transform, delta, rotation, moby + 0x40); } diff --git a/src/overlays/l07/mobys/hero_falling_platform.c b/src/overlays/l07/mobys/hero_falling_platform.c index be66f4579b..c85c57a229 100644 --- a/src/overlays/l07/mobys/hero_falling_platform.c +++ b/src/overlays/l07/mobys/hero_falling_platform.c @@ -36,11 +36,10 @@ typedef struct HeroFallingPlatformVars { u8 pad_29[0x15]; s16 unk3E; u8 pad_40[0x20]; - f32 unk60[4]; - u8 pad_70[0x30]; + f32 transform[16]; s16 timer_A0; s16 contact_sound_entry_index; - f32 unkA4; + f32 fall_speed; f32 unkA8; f32 unkAC; } HeroFallingPlatformVars; @@ -98,7 +97,7 @@ void hero_falling_platform_update(char *moby) { MOBY(moby)->pos.z -= descent_frame_scale * 0.002f; } if (fast_dec_timer_s16(&moby_data->timer_A0)) { - moby_data->unkA4 = frame_scale * 0.002f; + moby_data->fall_speed = frame_scale * 0.002f; MOBY(moby)->state = LEAF_ACCELERATED_FALL; } break; @@ -108,8 +107,8 @@ void hero_falling_platform_update(char *moby) { tilt_descent_work_value = fast_sin(tilt_descent_work_value); gravity_step = frame_time_sq * 9.8f; MOBY(moby)->pos.z -= tilt_descent_work_value + tilt_descent_work_value; - moby_data->unkA4 += gravity_step; - MOBY(moby)->pos.z -= moby_data->unkA4; + moby_data->fall_speed += gravity_step; + MOBY(moby)->pos.z -= moby_data->fall_speed; if (MOBY(moby)->pos.z < 2.0f) { mark_moby_for_removal(moby); return; @@ -119,5 +118,5 @@ void hero_falling_platform_update(char *moby) { break; } fast_vec_sub(position_delta, moby + 0x10, previous_position); - update_entity_matrix(moby_data->unk60, position_delta, moby + 0x40, moby + 0x40); + update_entity_matrix(moby_data->transform, position_delta, moby + 0x40, moby + 0x40); } diff --git a/src/overlays/l07/mobys/machinegun_turret.c b/src/overlays/l07/mobys/machinegun_turret.c index 8ce3328af3..141a416df0 100644 --- a/src/overlays/l07/mobys/machinegun_turret.c +++ b/src/overlays/l07/mobys/machinegun_turret.c @@ -61,7 +61,7 @@ typedef struct MachinegunTurretVars { u8 pad_96[0x2]; s32 burst_pause; u16 burst_timer; - u8 unk9E; + u8 solid_shots; /* solid_collision of the shots it fires */ } MachinegunTurretVars; /* Moby class 1126 */ @@ -173,7 +173,7 @@ void machinegun_turret_update(unsigned char *moby) { velocity[2] = 0.0f; FUN_0022da68(0, 0, moby); spawn_machinegun_turret_projectile( - position, velocity, moby, (u8)turret_instance_vars->unk9E); + position, velocity, moby, (u8)turret_instance_vars->solid_shots); } if (turret_instance_vars->burst_pause != 0) { if (fast_dec_timer_s16(&turret_instance_vars->burst_timer) != 0) { diff --git a/src/overlays/l07/mobys/mine_group.c b/src/overlays/l07/mobys/mine_group.c index 7643f4363f..be6555239b 100644 --- a/src/overlays/l07/mobys/mine_group.c +++ b/src/overlays/l07/mobys/mine_group.c @@ -18,7 +18,7 @@ extern void mark_moby_for_removal(void *) __asm__("FUN_0020c828"); struct SpawnClassView { u8 pad0[0x10]; - u32 unk10; /* 0x10 */ + u32 collision; /* 0x10 */ u8 pad14[0x10]; f32 scale; /* 0x24 */ u8 pad28[0x1C]; @@ -27,7 +27,7 @@ struct SpawnClassView { struct SpawnMobyView { u8 pad0[0x36]; - s16 unk36; /* 0x36 */ + s16 occlusion; /* 0x36 */ u8 pad38[0x39]; u8 unk71; /* 0x71 */ }; @@ -174,11 +174,11 @@ void reset_moby_from_class_defaults(struct Moby *moby) { moby->draw_dist = 0xFF; moby->visible = 1; update_moby_grids(moby, 0x80807F7F); - ((struct SpawnMobyView *)moby)->unk36 = 0x7F80; + ((struct SpawnMobyView *)moby)->occlusion = 0x7F80; moby->lod_dist = 0xFF; moby->hit_slot = 0xFF; ((struct SpawnMobyView *)moby)->unk71 = 0xFF; - moby->collision = ((struct SpawnClassView *)moby->pclass)->unk10; + moby->collision = ((struct SpawnClassView *)moby->pclass)->collision; copy_hero_moby_field_38(moby); update_entity(moby); animation_timer = get_moby_target_info(moby); @@ -188,21 +188,21 @@ void reset_moby_from_class_defaults(struct Moby *moby) { typedef struct MineGroupVars { u8 pad_0[0x20]; - f32 unk20; + f32 health; u8 pad_24[0x2]; s16 surviving_hit_frame_count; u8 pad_28[0x38]; struct HitColorFlash hit_flash; - s32 unk70; - s32 unk74; - s32 unk78; - f32 unk7C; - f32 unk80; + s32 path; + s32 group; + s32 child_count; + f32 speed; + f32 spacing; /* path distance between the placed mines */ s32 child_reset_gate; u8 pad_88[0x8]; s32 child_reset_segment_index; - u8 unk94; - u8 unk95; + u8 hittable; /* 0: no collision */ + u8 shown; /* 0: sets moby flag 1 */ } MineGroupVars; /* Moby class 871 */ @@ -244,8 +244,8 @@ void mine_group_update(struct Moby *moby) { boltcrate_pvars = (MineGroupVars *)moby->pvars; if (!boltcrate_pvars) return; - remaining = &boltcrate_pvars->unk20; - if (boltcrate_pvars->unk94) { + remaining = &boltcrate_pvars->health; + if (boltcrate_pvars->hittable) { limit = find_moby_hit(moby, 0x230000, 0); hit_response_code = resolve_moby_hit_response(moby, limit, remaining, 0, &count, 0, 0, 4); switch ((unsigned)hit_response_code) { @@ -269,7 +269,7 @@ void mine_group_update(struct Moby *moby) { float step = *(float *)(limit + 0x2c); if (*remaining <= step) { *remaining = 0.0f; - set_moby_list_state(boltcrate_pvars->unk74, 3); + set_moby_list_state(boltcrate_pvars->group, 3); clear_u64_value(position); spawn_explosion(moby, position, @@ -300,9 +300,9 @@ void mine_group_update(struct Moby *moby) { moby->hit_slot = 0xff; } update_hit_color_flash(moby, &boltcrate_pvars->hit_flash); - if (boltcrate_pvars->unk70 == -1) + if (boltcrate_pvars->path == -1) return; - path = D_L07_001B0530[boltcrate_pvars->unk70]; + path = D_L07_001B0530[boltcrate_pvars->path]; switch (moby->state) { case INITIALIZE_PATH_CHILDREN: { int j; @@ -315,8 +315,8 @@ void mine_group_update(struct Moby *moby) { *(float *)(path + offset + 0x1c) = fast_vec_dist(path + 0x10 + j * 16, path + 0x10 + ((j + 1) % *(int *)path) * 16); } - if (get_first_moby_in_group(¤t, boltcrate_pvars->unk74, 1, 0)) { - debug_print(mine_group_not_found_message, boltcrate_pvars->unk74); + if (get_first_moby_in_group(¤t, boltcrate_pvars->group, 1, 0)) { + debug_print(mine_group_not_found_message, boltcrate_pvars->group); return; } child_placement_segment_index = boltcrate_pvars->child_reset_segment_index = @@ -332,30 +332,30 @@ void mine_group_update(struct Moby *moby) { ((MineSegmentView *)follower)->segment = child_placement_segment_index; ((MineSegmentView *)follower)->next_segment = child_placement_segment_index + 1; if (get_next_moby_in_group(¤t, current, 1, 0)) { - int child_count = boltcrate_pvars->unk78; + int child_count = boltcrate_pvars->child_count; if (placed < child_count - 1) { debug_print( - D_L07_00211580, placed + 1, boltcrate_pvars->unk74, child_count); + D_L07_00211580, placed + 1, boltcrate_pvars->group, child_count); } else if (placed == child_count - 1) { debug_print( - mine_group_extra_mines_message, boltcrate_pvars->unk74, child_count); + mine_group_extra_mines_message, boltcrate_pvars->group, child_count); } - boltcrate_pvars->unk78 = placed + 1; + boltcrate_pvars->child_count = placed + 1; break; } sample_path(path, position, &child_placement_segment_index, (float *)&child_placement_segment_distance, - boltcrate_pvars->unk80, + boltcrate_pvars->spacing, 1); placed++; - } while (placed < boltcrate_pvars->unk78); - if (!boltcrate_pvars->unk94) { + } while (placed < boltcrate_pvars->child_count); + if (!boltcrate_pvars->hittable) { moby->collision = 0; moby->flags &= 0xefff; } - if (!boltcrate_pvars->unk95) + if (!boltcrate_pvars->shown) moby->flags |= 1; moby->state = ADVANCE_PATH_CHILDREN; break; @@ -363,12 +363,12 @@ void mine_group_update(struct Moby *moby) { case ADVANCE_PATH_CHILDREN: { int cursor = 0; get_first_moby_in_group(&cursor, ((MineGroupView *)boltcrate_pvars)->group, 1, 0); - for (i = 0; i < boltcrate_pvars->unk78; i++) { + for (i = 0; i < boltcrate_pvars->child_count; i++) { child = *(int *)(cursor + 0x78); { float segment_distance = fast_vec_dist((char *)child + 0x80, path + 0x10 + *(int *)(child + 0x90) * 16); - float step = boltcrate_pvars->unk7C * frame_time; + float step = boltcrate_pvars->speed * frame_time; distance = segment_distance; sample_path( path, (char *)child + 0x80, (int *)((char *)child + 0x90), &distance, step, 1); diff --git a/src/overlays/l07/mobys/mission_gated_taxi_platform.c b/src/overlays/l07/mobys/mission_gated_taxi_platform.c index 3975c17b14..68881ea160 100644 --- a/src/overlays/l07/mobys/mission_gated_taxi_platform.c +++ b/src/overlays/l07/mobys/mission_gated_taxi_platform.c @@ -51,17 +51,17 @@ typedef struct MissionGatedTaxiPlatformVars { f32 transform[16]; u8 command; u8 pad_A1[0x3]; - f32 unkA4; - f32 unkA8; - f32 unkAC; - f32 unkB0; + f32 t; /* position along the path, 0 to 1 */ + f32 speed; + f32 target_speed; /* +-1 / travel frames */ + f32 travel_time; /* seconds per trip */ s32 path; - s16 unkB8; + s16 retrigger; /* set when the hero steps off while stopped */ s16 timer; - f32 unkBC; + f32 rise; /* height gained this frame */ u8 pad_C0[0x4]; - s32 unkC4; - s32 unkC8; + s32 voice; + s32 free_ride; /* nonzero: boarding does not put the hero in the ride state */ } MissionGatedTaxiPlatformVars; /* Moby class 1474 */ @@ -96,16 +96,16 @@ void mission_gated_taxi_platform_update(struct Moby *moby) { if ((moby->command = mission_gated_taxi_vars->command) == 0) { f = 1.0f; } - mission_gated_taxi_vars->unkA4 = f; + mission_gated_taxi_vars->t = f; pts = path + 0x10; qcopy(&moby->pos, truncate_float_to_s32(f) ? pts + (*(int *)path - 1) * 16 : pts); mission_gated_taxi_vars->timer = 0; - *(int *)&mission_gated_taxi_vars->unkA8 = 0; - *(int *)&mission_gated_taxi_vars->unkBC = 0; + *(int *)&mission_gated_taxi_vars->speed = 0; + *(int *)&mission_gated_taxi_vars->rise = 0; moby->state = TAXI_PLATFORM_STATE_INITIALIZED; moby->update_dist = 0xFF; moby->draw_dist = 0xFF; - mission_gated_taxi_vars->unkC4 = -1; + mission_gated_taxi_vars->voice = -1; moby->flags &= 0xFFBE; moby->collision = moby->pclass->collision; } @@ -118,28 +118,28 @@ void mission_gated_taxi_platform_update(struct Moby *moby) { moby->scale = *(float *)(class_defaults + 0x24); qcopy(&moby->pos, path + 0x10); moby->command = 1; - mission_gated_taxi_vars->unkA4 = 0.0f; + mission_gated_taxi_vars->t = 0.0f; } break; } case TAXI_WAIT_FOR_HERO_BOARDING: - if (mission_gated_taxi_vars->unkB8 != 0) { + if (mission_gated_taxi_vars->retrigger != 0) { if (is_hero_on_moby(moby)) { - if (mission_gated_taxi_vars->unkC8 == 0) { + if (mission_gated_taxi_vars->free_ride == 0) { if (is_hero_on_moby(moby)) { hero_set_state(0x72, 1); } } moby->command = 2; - mission_gated_taxi_vars->unkAC = - 1.0f / scale_time(mission_gated_taxi_vars->unkB0 * 60.0f); - mission_gated_taxi_vars->unkB8 = 0; + mission_gated_taxi_vars->target_speed = + 1.0f / scale_time(mission_gated_taxi_vars->travel_time * 60.0f); + mission_gated_taxi_vars->retrigger = 0; } } break; case TAXI_TRAVERSE_PATH: if (mission_gated_taxi_vars->timer != 0 || - (mission_gated_taxi_vars->unkBC < 0.0f && + (mission_gated_taxi_vars->rise < 0.0f && vector_distance_xy(&moby->pos, &hero.motion.pos) < 2.0f && absolute_float(hero.motion.pos.f[2] - moby->pos.z) < 4.0f && moby->pos.z - hero.motion.pos.f[2] > 1.0f)) { @@ -147,57 +147,57 @@ void mission_gated_taxi_platform_update(struct Moby *moby) { if (mission_gated_taxi_vars->timer == 0) { mission_gated_taxi_vars->timer = scale_game_frames(30); } - r = mission_gated_taxi_vars->unkC4; - *(int *)&mission_gated_taxi_vars->unkA8 = 0; + r = mission_gated_taxi_vars->voice; + *(int *)&mission_gated_taxi_vars->speed = 0; if (r != -1) { unsigned char *s = (unsigned char *)((char *)&D_0013E550) + r * 0x70; if (*(unsigned char **)(s + 0x88) == moby && s[0x74] != 0) { release_voice_slot(r); } } - mission_gated_taxi_vars->unkC4 = -1; + mission_gated_taxi_vars->voice = -1; } else { int i; float segment_fraction_work_value, t; char *segment_start_position; - if (!voice_is_playing(moby, mission_gated_taxi_vars->unkC4)) { - mission_gated_taxi_vars->unkC4 = allocate_voice_for_target_entry(0, 4, (int)moby); + if (!voice_is_playing(moby, mission_gated_taxi_vars->voice)) { + mission_gated_taxi_vars->voice = allocate_voice_for_target_entry(0, 4, (int)moby); } - mission_gated_taxi_vars->unkA8 += mission_gated_taxi_vars->unkAC * frame_time; - if (absolute_float(mission_gated_taxi_vars->unkA8) > - absolute_float(mission_gated_taxi_vars->unkAC)) { - mission_gated_taxi_vars->unkA8 = mission_gated_taxi_vars->unkAC; + mission_gated_taxi_vars->speed += mission_gated_taxi_vars->target_speed * frame_time; + if (absolute_float(mission_gated_taxi_vars->speed) > + absolute_float(mission_gated_taxi_vars->target_speed)) { + mission_gated_taxi_vars->speed = mission_gated_taxi_vars->target_speed; } - mission_gated_taxi_vars->unkA4 = - mission_gated_taxi_vars->unkA4 + mission_gated_taxi_vars->unkA8; - if (0.5f < absolute_float(mission_gated_taxi_vars->unkA4 - 0.5f)) { + mission_gated_taxi_vars->t = + mission_gated_taxi_vars->t + mission_gated_taxi_vars->speed; + if (0.5f < absolute_float(mission_gated_taxi_vars->t - 0.5f)) { int r; - if (mission_gated_taxi_vars->unkC8 == 0 && is_hero_on_moby(moby)) { + if (mission_gated_taxi_vars->free_ride == 0 && is_hero_on_moby(moby)) { set_hero_idle_state_for_vehicle_mode(); } - if (0.0f < mission_gated_taxi_vars->unkAC) { + if (0.0f < mission_gated_taxi_vars->target_speed) { moby->command = 3; - mission_gated_taxi_vars->unkA4 = 1.0f; + mission_gated_taxi_vars->t = 1.0f; } else { moby->command = 1; - mission_gated_taxi_vars->unkA4 = 0.0f; + mission_gated_taxi_vars->t = 0.0f; } - *(int *)&mission_gated_taxi_vars->unkA8 = 0; + *(int *)&mission_gated_taxi_vars->speed = 0; mission_gated_taxi_vars->timer = scale_game_frames(15); - r = mission_gated_taxi_vars->unkC4; + r = mission_gated_taxi_vars->voice; if (r != -1) { unsigned char *s = (unsigned char *)((char *)&D_0013E550) + r * 0x70; if (*(unsigned char **)(s + 0x88) == moby && s[0x74] != 0) { release_voice_slot(r); } } - mission_gated_taxi_vars->unkC4 = -1; + mission_gated_taxi_vars->voice = -1; } segment_fraction_work_value = convert_integer_to_float(*(int *)path - 1); - i = truncate_float_to_s32(segment_fraction_work_value * mission_gated_taxi_vars->unkA4); + i = truncate_float_to_s32(segment_fraction_work_value * mission_gated_taxi_vars->t); segment_fraction_work_value = convert_integer_to_float(*(int *)path - 1); t = convert_integer_to_float(i); - segment_fraction_work_value *= mission_gated_taxi_vars->unkA4; + segment_fraction_work_value *= mission_gated_taxi_vars->t; segment_fraction_work_value -= t; if (i == *(int *)path - 1) { qcopy(&moby->pos, path + 0x10 + i * 16); @@ -208,7 +208,7 @@ void mission_gated_taxi_platform_update(struct Moby *moby) { path_segment_offset, path_segment_offset, segment_fraction_work_value); fast_vec_add(&moby->pos, path_segment_offset, segment_start_position); } - mission_gated_taxi_vars->unkBC = moby->pos.z - orig[2]; + mission_gated_taxi_vars->rise = moby->pos.z - orig[2]; } break; case TAXI_WAIT_FOR_HERO_TO_LEAVE: @@ -222,7 +222,7 @@ void mission_gated_taxi_platform_update(struct Moby *moby) { if (!is_hero_on_moby(moby)) { if (2.0f < vector_distance_xy(&moby->pos, &hero.motion.pos)) { if (mission_gated_taxi_vars->timer == 0) { - mission_gated_taxi_vars->unkB8 = 1; + mission_gated_taxi_vars->retrigger = 1; } } } diff --git a/src/overlays/l07/mobys/snagglebeast.c b/src/overlays/l07/mobys/snagglebeast.c index 7790a762f8..0bc4924e20 100644 --- a/src/overlays/l07/mobys/snagglebeast.c +++ b/src/overlays/l07/mobys/snagglebeast.c @@ -99,7 +99,7 @@ typedef struct SnagglebeastVars { f32 rope_end_position[4]; f32 rope_tip_velocity[4]; f32 rope_tip_position[4]; - f32 unk150[4]; + f32 rope_target[4]; /* 3 above the position of hero.ground_moby */ s32 timer; s32 substate; s32 turn_controller_state; @@ -113,15 +113,15 @@ typedef struct SnagglebeastVars { s16 timer_198; s16 timer_19A; u8 navigation_mask; - u8 unk19D; + u8 path_select; s16 ammo_drain_step; s32 path_1A0; - s32 unk1A4; - s32 unk1A8; + s32 hero_volume; /* clip volume: updates only while the hero is inside */ + s32 target_nav_point; f32 drop_path_distance; s32 health_hud_handle; s32 health_display; - f32 unk1B8; + f32 ground_z; u8 pad_1BC[0x4]; s32 nav_point; u8 hero_captured; @@ -129,8 +129,8 @@ typedef struct SnagglebeastVars { u8 sphere_shade; u8 hero_capture_attack_enabled; f32 sphere_fade; - s32 unk1CC; - s32 unk1D0; + s32 death_effect_moby; + s32 death_raised_moby; /* raised to z 34.6 after the death */ u8 pad_1D4[0x1C]; s32 cuboid; u8 turn_saved_state; @@ -146,9 +146,9 @@ typedef struct SnagglebeastVars { s16 point_light; u8 pad_282[0xE]; s32 chase_path; - s32 unk294; - s32 unk298; - s32 unk29C; + s32 capture_turn_done; /* 1 once the capture turn toward the hero ran */ + s32 chase_frames; + s32 path_1A0_volume; /* the chase uses path_1A0 while the hero is inside */ u8 manipulator[1]; } SnagglebeastVars; @@ -1030,8 +1030,9 @@ void snagglebeast_update(unsigned char *moby) { apply_snagglebeast_big_head_cheat((char *)moby); if (scene_state == 2) return; - if (snagglebeast_instance_state->unk1A4 != -1 && - !is_point_inside_clip_volume(((char *)&hero) + 0x80, snagglebeast_instance_state->unk1A4)) + if (snagglebeast_instance_state->hero_volume != -1 && + !is_point_inside_clip_volume(((char *)&hero) + 0x80, + snagglebeast_instance_state->hero_volume)) return; if (MOBY(moby)->visible != 0) { if (fast_vec_dist(moby + 0x10, &D_L07_00166E40) < 35.0f) { @@ -1097,7 +1098,7 @@ void snagglebeast_update(unsigned char *moby) { sight_ready = 0; break; case SNAGGLEBEAST_PHASE_AFTER_FIRST_TIMED_DAMAGE: - if (snagglebeast_instance_state->unk1A8 != -1) { + if (snagglebeast_instance_state->target_nav_point != -1) { follow_target = 1; path_point_ready = 1; timer194 = 0; @@ -1108,7 +1109,7 @@ void snagglebeast_update(unsigned char *moby) { sight_ready = 0; break; case SNAGGLEBEAST_PHASE_AFTER_SECOND_TIMED_DAMAGE: - if (snagglebeast_instance_state->unk1A8 != -1) { + if (snagglebeast_instance_state->target_nav_point != -1) { follow_target = 1; path_point_ready = 1; timer194 = 0; @@ -1254,7 +1255,7 @@ void snagglebeast_update(unsigned char *moby) { snagglebeast_instance_state->navigation_mask = 7; MOBY(moby)->update_dist = 0xFF; MOBY(moby)->draw_dist = 0xFF; - snagglebeast_instance_state->unk1A8 = -1; + snagglebeast_instance_state->target_nav_point = -1; snagglebeast_instance_state->health_hud_handle = -1; snagglebeast_instance_state->nav_point = select_point_index_by_distance( moby + 0x10, D_L07_001B0530[snagglebeast_instance_state->nav_path], 0.0f); @@ -1304,7 +1305,7 @@ void snagglebeast_update(unsigned char *moby) { snagglebeast_instance_state->rope_extension_length = 0.0f; snagglebeast_instance_state->hero_captured = 0; MOBY(moby)->state = SNAGGLEBEAST_CAPTURE_HERO_AND_DRAIN_AMMO; - snagglebeast_instance_state->unk294 = 0; + snagglebeast_instance_state->capture_turn_done = 0; snagglebeast_instance_state->voice = FUN_0022da68(9, 4, (int)moby); } if (target_close) { @@ -1321,7 +1322,7 @@ void snagglebeast_update(unsigned char *moby) { FUN_00212f90(moby, 0xA, r, random_int_between(0x14, 0x1E)); } MOBY(moby)->anim_speed = 1.5f; - snagglebeast_instance_state->unk298 = 0; + snagglebeast_instance_state->chase_frames = 0; MOBY(moby)->state = SNAGGLEBEAST_CHASE_TARGET; } break; @@ -1484,9 +1485,9 @@ void snagglebeast_update(unsigned char *moby) { fast_vec_scale(snagglebeast_instance_state->rope_tip_velocity, snagglebeast_instance_state->rope_tip_velocity, 1.0f / (float)scale_game_frames(0x3C)); - qcopy(snagglebeast_instance_state->unk150, + qcopy(snagglebeast_instance_state->rope_target, snagglebeast_instance_state->rope_tip_position); - *(int *)&snagglebeast_instance_state->unk150[3] = 0; + *(int *)&snagglebeast_instance_state->rope_target[3] = 0; snagglebeast_instance_state->substate = 1; } else { if (snagglebeast_instance_state->timer < scale_game_frames(0x3C)) { @@ -1512,9 +1513,9 @@ void snagglebeast_update(unsigned char *moby) { collect_snagglebeast_navigation_ids(moby, snagglebeast_instance_state, &direction); if (!path_point_ready) { thr = 6.0f; - if (snagglebeast_instance_state->unk29C != -1 && + if (snagglebeast_instance_state->path_1A0_volume != -1 && (snagglebeast_instance_state->navigation_mask & 3) == 0 && - is_point_inside_clip_volume(&sight, snagglebeast_instance_state->unk29C)) { + is_point_inside_clip_volume(&sight, snagglebeast_instance_state->path_1A0_volume)) { qcopy(&velocity, D_L07_001B0530[snagglebeast_instance_state->path_1A0] + select_point_index_by_distance( @@ -1539,7 +1540,7 @@ void snagglebeast_update(unsigned char *moby) { } else { qcopy(&velocity, D_L07_001B0530[snagglebeast_instance_state->nav_path] + - snagglebeast_instance_state->unk1A8 * 16 + 0x10); + snagglebeast_instance_state->target_nav_point * 16 + 0x10); dd = vector_distance_xy(moby + 0x10, &velocity); } update_snagglebeast_chase_speed((struct ChaserAnim *)moby, @@ -1547,13 +1548,13 @@ void snagglebeast_update(unsigned char *moby) { dd, thr, 1.5f); - if ((snagglebeast_instance_state->unk298 & 3) == 0) + if ((snagglebeast_instance_state->chase_frames & 3) == 0) select_snagglebeast_chase_waypoint((char *)moby, snagglebeast_instance_state, &velocity, snagglebeast_instance_state->rope_tip_position); qcopy(&position, snagglebeast_instance_state->rope_tip_position); - snagglebeast_instance_state->unk298 += 1; + snagglebeast_instance_state->chase_frames += 1; if (snagglebeast_instance_state->turn_start_angle < fast_difference_between_rotations(MOBY(moby)->rot.z, fast_arc_tan(position.f[0] - MOBY(moby)->pos.x, @@ -1604,7 +1605,7 @@ void snagglebeast_update(unsigned char *moby) { int r2 = random_int_between(0, 9); FUN_00212f90(moby, r1, r2, random_int_between(0x14, 0x28)); } - snagglebeast_instance_state->unk1A8 = -1; + snagglebeast_instance_state->target_nav_point = -1; MOBY(moby)->state = SNAGGLEBEAST_IDLE; break; } @@ -1639,9 +1640,10 @@ void snagglebeast_update(unsigned char *moby) { snagglebeast_instance_state->substate = 0; { char *g = ((char *)&hero); - qcopy(snagglebeast_instance_state->unk150, *(char **)(g + 0x2FC) + 0x10); + qcopy(snagglebeast_instance_state->rope_target, + *(char **)(g + 0x2FC) + 0x10); } - snagglebeast_instance_state->unk150[2] += 3.0f; + snagglebeast_instance_state->rope_target[2] += 3.0f; MOBY(moby)->state = SNAGGLEBEAST_ROPE_ATTACK; } if (sight_ready) { @@ -1653,7 +1655,7 @@ void snagglebeast_update(unsigned char *moby) { snagglebeast_instance_state->substate = 0; snagglebeast_instance_state->rope_extension_length = 0.0f; snagglebeast_instance_state->hero_captured = 0; - snagglebeast_instance_state->unk294 = 0; + snagglebeast_instance_state->capture_turn_done = 0; MOBY(moby)->state = SNAGGLEBEAST_CAPTURE_HERO_AND_DRAIN_AMMO; snagglebeast_instance_state->voice = FUN_0022da68(9, 4, (int)moby); } @@ -1761,9 +1763,9 @@ void snagglebeast_update(unsigned char *moby) { if (MOBY(moby)->command >= 8) MOBY(moby)->command = 8; if (((ChaserPathPoints *)snagglebeast_instance_state) - ->linked_mobys[snagglebeast_instance_state->unk19D] != -1) { + ->linked_mobys[snagglebeast_instance_state->path_select] != -1) { int k2; - k = snagglebeast_instance_state->unk19D; + k = snagglebeast_instance_state->path_select; k2 = k + 3; if (((ChaserPathPoints *)snagglebeast_instance_state)->linked_mobys[k2] != -1) { char *linked_moby_vars = @@ -1819,7 +1821,7 @@ void snagglebeast_update(unsigned char *moby) { (snagglebeast_instance_state->velocity)[2] = z; (snagglebeast_instance_state->velocity)[2] -= frame_time * 9.8f; fast_vec_add(moby + 0x10, moby + 0x10, snagglebeast_instance_state->velocity); - if (MOBY(moby)->pos.z < snagglebeast_instance_state->unk1B8) + if (MOBY(moby)->pos.z < snagglebeast_instance_state->ground_z) done = 1; } else { if (compute_interpolated_record_value(moby) > 79.0f) @@ -1885,7 +1887,7 @@ void snagglebeast_update(unsigned char *moby) { } } else { if (fast_dec_timer(&snagglebeast_instance_state->timer)) { - switch (snagglebeast_instance_state->unk19D) { + switch (snagglebeast_instance_state->path_select) { case SNAGGLEBEAST_PATH_SELECT_FIRST_POINT: qcopy(snagglebeast_instance_state->rope_end_position, D_L07_001B0530[snagglebeast_instance_state->path_1A0] + 0x10); @@ -1913,9 +1915,9 @@ void snagglebeast_update(unsigned char *moby) { break; } } - snagglebeast_instance_state->unk1A8 = + snagglebeast_instance_state->target_nav_point = ((ChaserPathPoints *)snagglebeast_instance_state) - ->path_points[snagglebeast_instance_state->unk19D]; + ->path_points[snagglebeast_instance_state->path_select]; build_symmetric_adjacency_masks((int *)&position, (int)collect_snagglebeast_navigation_ids( moby, snagglebeast_instance_state, &position), @@ -1943,16 +1945,17 @@ void snagglebeast_update(unsigned char *moby) { qcopy(moby + 0x10, snagglebeast_instance_state->turn_target); MOBY(moby)->rot.z = snagglebeast_instance_state->turn_target[3]; if (((ChaserPathPoints *)snagglebeast_instance_state) - ->linked_mobys[snagglebeast_instance_state->unk19D] != -1) { - *(unsigned char *)(level_mobys + - ((ChaserPathPoints *)snagglebeast_instance_state) - ->linked_mobys[snagglebeast_instance_state->unk19D] * - 0x100 + - 0xBC) = 0; + ->linked_mobys[snagglebeast_instance_state->path_select] != -1) { + *(unsigned char + *)(level_mobys + + ((ChaserPathPoints *)snagglebeast_instance_state) + ->linked_mobys[snagglebeast_instance_state->path_select] * + 0x100 + + 0xBC) = 0; } MOBY(moby)->anim_speed = 1.5f; MOBY(moby)->command += 1; - snagglebeast_instance_state->unk298 = 0; + snagglebeast_instance_state->chase_frames = 0; MOBY(moby)->state = SNAGGLEBEAST_CHASE_AFTER_TRANSFORM_RESTORE; snagglebeast_instance_state->timer = scale_game_frames(0x37); } @@ -1960,7 +1963,7 @@ void snagglebeast_update(unsigned char *moby) { } case SNAGGLEBEAST_CAPTURE_HERO_AND_DRAIN_AMMO: { float fr; - if (snagglebeast_instance_state->unk294 <= 0) { + if (snagglebeast_instance_state->capture_turn_done <= 0) { if (start_snagglebeast_turn_toward_target( moby, snagglebeast_instance_state, (float *)(((char *)&hero) + 0x80), 6, 0)) break; @@ -2169,17 +2172,21 @@ void snagglebeast_update(unsigned char *moby) { } case SNAGGLEBEAST_ROPE_ATTACK: if (snagglebeast_instance_state->substate <= 0) { - if (start_snagglebeast_turn_toward_target( - moby, snagglebeast_instance_state, snagglebeast_instance_state->unk150, 7, 1)) + if (start_snagglebeast_turn_toward_target(moby, + snagglebeast_instance_state, + snagglebeast_instance_state->rope_target, + 7, + 1)) break; } - FUN_L00_00258278((struct Moby *)moby, - fast_arc_tan(snagglebeast_instance_state->unk150[0] - MOBY(moby)->pos.x, - snagglebeast_instance_state->unk150[1] - MOBY(moby)->pos.y), - (float *)&snagglebeast_instance_state->turn_controller_state, - frame_time_sq * 2.0943952f, - frame_time_sq * 0.6981317f, - frame_time * 2.0943952f); + FUN_L00_00258278( + (struct Moby *)moby, + fast_arc_tan(snagglebeast_instance_state->rope_target[0] - MOBY(moby)->pos.x, + snagglebeast_instance_state->rope_target[1] - MOBY(moby)->pos.y), + (float *)&snagglebeast_instance_state->turn_controller_state, + frame_time_sq * 2.0943952f, + frame_time_sq * 0.6981317f, + frame_time * 2.0943952f); switch (snagglebeast_instance_state->substate) { case SNAGGLEBEAST_ROPE_START_ATTACK_ANIMATION: if (MOBY(moby)->prev_seq != 7) @@ -2199,7 +2206,7 @@ void snagglebeast_update(unsigned char *moby) { fast_vec_scale(&position, &position, 0.5f); qcopy(snagglebeast_instance_state->rope_start_position, &position); fast_vec_sub(snagglebeast_instance_state->rope_tip_velocity, - snagglebeast_instance_state->unk150, + snagglebeast_instance_state->rope_target, snagglebeast_instance_state->rope_start_position); fast_vec_normalize(snagglebeast_instance_state->rope_tip_velocity, snagglebeast_instance_state->rope_tip_velocity, @@ -2278,7 +2285,7 @@ void snagglebeast_update(unsigned char *moby) { snagglebeast_instance_state->velocity, snagglebeast_instance_state->velocity, 1.0f); snagglebeast_instance_state->velocity[2] = 1.0f; qcopy(&position, moby + 0x10); - position.f[2] = snagglebeast_instance_state->unk1B8 + 1.0f; + position.f[2] = snagglebeast_instance_state->ground_z + 1.0f; spawn_explosion(moby, snagglebeast_instance_state->velocity, &position, @@ -2298,9 +2305,9 @@ void snagglebeast_update(unsigned char *moby) { -1, 0); MOBY(moby)->flags |= 0x41; - if (snagglebeast_instance_state->unk1CC != -1) - initialize_moby_particle_effect_state(level_mobys + - (snagglebeast_instance_state->unk1CC << 8)); + if (snagglebeast_instance_state->death_effect_moby != -1) + initialize_moby_particle_effect_state( + level_mobys + (snagglebeast_instance_state->death_effect_moby << 8)); MOBY(moby)->state = SNAGGLEBEAST_POST_DEATH_CLEANUP; MOBY(moby)->pos.z = 20.0f; } @@ -2311,9 +2318,9 @@ void snagglebeast_update(unsigned char *moby) { snagglebeast_instance_state->substate = 0; { char *g = ((char *)&hero); - qcopy(snagglebeast_instance_state->unk150, *(char **)(g + 0x2FC) + 0x10); + qcopy(snagglebeast_instance_state->rope_target, *(char **)(g + 0x2FC) + 0x10); } - snagglebeast_instance_state->unk150[2] += 3.0f; + snagglebeast_instance_state->rope_target[2] += 3.0f; MOBY(moby)->state = SNAGGLEBEAST_ROPE_ATTACK; } else { MOBY(moby)->state = SNAGGLEBEAST_IDLE; @@ -2323,14 +2330,15 @@ void snagglebeast_update(unsigned char *moby) { case SNAGGLEBEAST_POST_DEATH_CLEANUP: if (snagglebeast_instance_state->point_light != -1) release_point_light_slot(snagglebeast_instance_state->point_light); - if (snagglebeast_instance_state->unk1D0 == -1 || - !(*(float *)(level_mobys + (snagglebeast_instance_state->unk1D0 << 8) + 0x18) < - 34.5f)) { + if (snagglebeast_instance_state->death_raised_moby == -1 || + !(*(float *)(level_mobys + (snagglebeast_instance_state->death_raised_moby << 8) + + 0x18) < 34.5f)) { mark_moby_for_removal(moby); return; } - *(float *)(level_mobys + (snagglebeast_instance_state->unk1D0 << 8) + 0x18) += - (34.6f - *(float *)(level_mobys + (snagglebeast_instance_state->unk1D0 << 8) + 0x18)) * + *(float *)(level_mobys + (snagglebeast_instance_state->death_raised_moby << 8) + 0x18) += + (34.6f - *(float *)(level_mobys + + (snagglebeast_instance_state->death_raised_moby << 8) + 0x18)) * 0.1f; break; case 17: diff --git a/src/overlays/l14/mobys/path_mover.c b/src/overlays/l14/mobys/path_mover.c index 329fa89a06..e3d99269e4 100644 --- a/src/overlays/l14/mobys/path_mover.c +++ b/src/overlays/l14/mobys/path_mover.c @@ -36,7 +36,7 @@ typedef struct { f32 rise; /* 0xBC: height gained this frame */ s32 trigger; /* 0xC0: clip volume that activates it, -1 once active */ s32 voice; /* 0xC4 */ - s32 silent; /* 0xC8 */ + s32 free_ride; /* 0xC8: nonzero: the hero is not locked while riding */ s32 show_volume; /* 0xCC: clip volume that makes it visible, -1 once shown */ f32 ease[3]; /* 0xD0: per-axis easing state for vendor_spring */ } PathMoverVars; @@ -170,7 +170,7 @@ void path_mover_update(struct Moby *moby) { } break; case PATH_MOVER_COMMAND_TRAVERSE_PATH: - if (path_mover_vars->silent == 0 && is_hero_on_moby(moby)) { + if (path_mover_vars->free_ride == 0 && is_hero_on_moby(moby)) { hero.jump_lock_timer = 4; hero.edge_brake_lock_timer = 4; } From 275eb5df3e2c92c489f171b11b2b793126518a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:29:39 +0000 Subject: [PATCH 083/213] decomp: name blarg trooper, leg rig, woodcut bot and snow plow fields in l04 --- include/rnc/overlay/l04/leg_rig.h | 26 ++-- src/overlays/l04/mobys/blarg_trooper.c | 173 +++++++++++++------------ src/overlays/l04/mobys/eudora_bridge.c | 12 +- src/overlays/l04/mobys/leg_walker.c | 64 +++++---- src/overlays/l04/mobys/lieutenant.c | 4 +- src/overlays/l04/mobys/snow_plow.c | 87 +++++++------ src/overlays/l04/mobys/woodcut_bot.c | 126 +++++++----------- 7 files changed, 242 insertions(+), 250 deletions(-) diff --git a/include/rnc/overlay/l04/leg_rig.h b/include/rnc/overlay/l04/leg_rig.h index 6beafc618f..c5ba73901e 100644 --- a/include/rnc/overlay/l04/leg_rig.h +++ b/include/rnc/overlay/l04/leg_rig.h @@ -8,7 +8,7 @@ /* Attachment record handed to attach_manipulator. */ typedef struct { - /* 0x00 */ u8 unk0; + /* 0x00 */ u8 anim_joint; /* 0x01 */ u8 attached; /* 0x02 */ u8 pad2[0xE]; /* 0x10 */ sceVu0FVECTOR rot; /* quaternion, turned by rig_animate */ @@ -55,7 +55,7 @@ typedef struct { typedef struct { /* 0x000 */ f32 pts[6][4]; /* joint positions from transform_scaled_vertex_batch */ /* 0x060 */ u8 pad60[0xC]; - /* 0x06C */ f32 heading; /* turn target while unkEE & 4 is set */ + /* 0x06C */ f32 heading; /* turn target while control_flags & 4 is set */ /* 0x070 */ LegRigAnim *anims[13]; /* 0x0A4 */ u8 padA4[0xC]; /* 0x0B0 */ u8 unkB0; @@ -66,21 +66,21 @@ typedef struct { /* 0x0B5 */ u8 jointB5; /* 0x0B6 */ u8 mode; /* 0x0B7 */ u8 unkB7; - /* 0x0B8 */ s32 unkB8; - /* 0x0BC */ s32 unkBC; + /* 0x0B8 */ s32 pitch_target; /* f32 bits: spring_turn target for rot.y */ + /* 0x0BC */ s32 pitch_velocity; /* f32 bits */ /* 0x0C0 */ f32 speed; - /* 0x0C4 */ f32 unkC4; - /* 0x0C8 */ s32 unkC8; - /* 0x0CC */ f32 unkCC; - /* 0x0D0 */ f32 unkD0; - /* 0x0D4 */ f32 unkD4; + /* 0x0C4 */ f32 max_speed_step; /* speed moves toward the gait speed by at most this */ + /* 0x0C8 */ s32 turn_velocity; /* f32 bits: spring_turn velocity of rot.z */ + /* 0x0CC */ f32 turn_gain; + /* 0x0D0 */ f32 turn_damping; + /* 0x0D4 */ f32 max_turn_step; /* 0x0D8 */ s32 unkD8; - /* 0x0DC */ f32 unkDC; - /* 0x0E0 */ f32 unkE0; + /* 0x0DC */ f32 gravity_step; + /* 0x0E0 */ f32 probe_lift; /* walker gait animations set probe_offset to twice this */ /* 0x0E4 */ s32 unkE4; - /* 0x0E8 */ s32 unkE8; + /* 0x0E8 */ s32 probe_offset; /* f32 bits: eases back to 0 */ /* 0x0EC */ s16 unkEC; - /* 0x0EE */ s16 unkEE; + /* 0x0EE */ s16 control_flags; /* 4: steer to heading at speed instead of by the legs */ /* 0x0F0 */ LegRigLeg legs[2]; } LegRig; diff --git a/src/overlays/l04/mobys/blarg_trooper.c b/src/overlays/l04/mobys/blarg_trooper.c index 1d379688dc..66e234558c 100644 --- a/src/overlays/l04/mobys/blarg_trooper.c +++ b/src/overlays/l04/mobys/blarg_trooper.c @@ -1,6 +1,7 @@ /* Level 04 moby class blarg_trooper. */ #include "types.h" #include "rnc/overlay/shared/mobys/hit_color_flash.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" #include "qcopy.h" @@ -18,50 +19,50 @@ #include "rnc/overlay/shared/math/quad.h" typedef struct BlargTrooperVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 unk29; - u8 pad_2A[0x4]; - u8 unk2E; - u8 pad_2F[0x9]; - s32 retimer; - u8 pad_3C[0x1C]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x5]; - struct HitColorFlash hit_flash; - f32 motion[4]; - f32 unk80[4]; - u8 pad_90[0x30]; - f32 unkC0[4]; - f32 unkD0[4]; - s32 path_when_selected; - s32 path_when_unselected; - s16 path_selector; - u8 pad_EA[0x2]; - f32 yaw_turn_velocity; - s16 timer_F0; - s16 timer_F2; - f32 recoil_speed; - char *gun_moby; - u8 unkFC; - u8 unkFD; - u8 unkFE; - u8 unkFF; - u8 pad_100[0x8]; - s32 timer_108; - u8 pad_10C[0x4]; - f32 manipulator0[4]; - u8 pad_120[0x58]; - f32 unk178; - u8 pad_17C[0x14]; - f32 manipulator1[4]; - u8 pad_1A0[0x58]; - f32 unk1F8; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 unk29; + u8 pad_2A[0x4]; + u8 unk2E; + u8 pad_2F[0x9]; + s32 retimer; + u8 pad_3C[0x1C]; + u8 unk58; + u8 pad_59[0x1]; + u8 unk5A; + u8 pad_5B[0x5]; + struct HitColorFlash hit_flash; + struct KnockbackMotion knockback; + f32 fall_speed; + f32 spawn_z; /* removed once it falls 5 below it */ + f32 prev_anim_frame; + f32 sight_range; /* doubled while alerted */ + s32 path_when_selected; + s32 path_when_unselected; + s16 path_selector; + u8 pad_EA[0x2]; + f32 yaw_turn_velocity; + s16 timer_F0; + s16 timer_F2; + f32 recoil_speed; + char *gun_moby; + u8 starts_aiming; + u8 shots_left; + u8 alert_timer; /* 240 frames after a hit; doubles sight_range */ + u8 idle_anim_timer; + u8 pad_100[0x8]; + s32 timer_108; + u8 pad_10C[0x4]; + f32 manipulator0[4]; + u8 pad_120[0x58]; + f32 manipulator0_turn; /* rot target z of the joint 5 ease */ + u8 pad_17C[0x14]; + f32 manipulator1[4]; + u8 pad_1A0[0x58]; + f32 manipulator1_turn; /* rot target z of the joint 6 ease */ } BlargTrooperVars; /* Ported from rac1-decomp (src/overlays/l04_eudora/vendor_0029FCF0.c: func_L04_002C5B88), where it is exact; names translated to the US level program. */ @@ -219,7 +220,7 @@ void blarg_trooper_update(struct Moby *moby) { flag = 0; blarg_trooper_pvars = (char *)moby->pvars; - if (blarg_trooper_pvars->retimer != 0 || blarg_trooper_pvars->unkFE != 0) { + if (blarg_trooper_pvars->retimer != 0 || blarg_trooper_pvars->alert_timer != 0) { flag = 1; } pos = (float *)&moby->pos; @@ -231,10 +232,10 @@ void blarg_trooper_update(struct Moby *moby) { } } if (flag) { - float x = blarg_trooper_pvars->unkD0[3]; + float x = blarg_trooper_pvars->sight_range; target_selection_distance_limit = x + x; } else { - target_selection_distance_limit = blarg_trooper_pvars->unkD0[3]; + target_selection_distance_limit = blarg_trooper_pvars->sight_range; } select_moby_combat_target(moby, update_scratch.tgt, target_selection_distance_limit); target = *(char **)&update_scratch.tgt[16]; @@ -306,7 +307,7 @@ void blarg_trooper_update(struct Moby *moby) { if (t <= 0.0f) { r = 1; } - blarg_trooper_pvars->unkFE = scale_game_frames(0xF0); + blarg_trooper_pvars->alert_timer = scale_game_frames(0xF0); switch (r) { case BLARG_TROOPER_HIT_REACTION_NONE: break; @@ -319,20 +320,21 @@ void blarg_trooper_update(struct Moby *moby) { float b = frame_time * 17.0f; float fatal_knockback_horizontal_speed_adjustment = frame_time_sq * 20.0f; float d = frame_time * 13.0f; - blarg_trooper_pvars->unk80[0] = a; - blarg_trooper_pvars->unk80[2] = b; - blarg_trooper_pvars->unk80[1] = fatal_knockback_horizontal_speed_adjustment; - blarg_trooper_pvars->unk80[3] = d; + blarg_trooper_pvars->knockback.gravity = a; + blarg_trooper_pvars->knockback.speed = b; + blarg_trooper_pvars->knockback.speed_approach_step = + fatal_knockback_horizontal_speed_adjustment; + blarg_trooper_pvars->knockback.vertical_speed = d; } *(OvlQuad *)update_scratch.w.p.v70 = *(OvlQuad *)(hit + 0x10); trooper_knockback_arc(update_scratch.w.p.v70, &fatal_knockback_yaw, - &blarg_trooper_pvars->unk80[2], - &blarg_trooper_pvars->unk80[3]); + &blarg_trooper_pvars->knockback.speed, + &blarg_trooper_pvars->knockback.vertical_speed); trooper_start_knockback( - fatal_knockback_yaw, moby, blarg_trooper_pvars->motion, 0xD, 1, 0); - blarg_trooper_pvars->unkC0[0] = 12.0f; - blarg_trooper_pvars->unkC0[1] = 25.0f; + fatal_knockback_yaw, moby, &blarg_trooper_pvars->knockback, 0xD, 1, 0); + blarg_trooper_pvars->knockback.apex_animation_frame = 12.0f; + blarg_trooper_pvars->knockback.landing_animation_frame = 25.0f; moby->state = BLARG_TROOPER_STATE_DYING; FUN_L00_00257470(moby, 0, -1); break; @@ -380,10 +382,10 @@ void blarg_trooper_update(struct Moby *moby) { } moby->hit_slot = 0xFF; if (blarg_trooper_pvars->retimer != 0) { - blarg_trooper_pvars->unkFE = scale_game_frames(0xF0); + blarg_trooper_pvars->alert_timer = scale_game_frames(0xF0); } blarg_trooper_pvars->retimer = 0; - FUN_L00_001fefc8(&blarg_trooper_pvars->unkFE); + FUN_L00_001fefc8(&blarg_trooper_pvars->alert_timer); fast_dec_timer(&blarg_trooper_pvars->timer_108); switch (moby->state) { case BLARG_TROOPER_STATE_INITIALIZE: @@ -394,19 +396,19 @@ void blarg_trooper_update(struct Moby *moby) { blarg_trooper_pvars->unk2E = 1; blarg_trooper_pvars->unk29 = 1; blarg_trooper_pvars->timer_F0 = 0; - blarg_trooper_pvars->unkFE = 0; - blarg_trooper_pvars->unkFF = 0; - blarg_trooper_pvars->unkD0[0] = 0.0f; + blarg_trooper_pvars->alert_timer = 0; + blarg_trooper_pvars->idle_anim_timer = 0; + blarg_trooper_pvars->fall_speed = 0.0f; { float z = moby->pos.z; blarg_trooper_pvars->unk58 = 8; - blarg_trooper_pvars->unkD0[1] = z; + blarg_trooper_pvars->spawn_z = z; blarg_trooper_pvars->unk5A = 0xA; } if (rand() & 1) { moby->flags |= 0x8000; } - if (blarg_trooper_pvars->unkFC != 0) { + if (blarg_trooper_pvars->starts_aiming != 0) { blend_moby_animation(moby, (void *)3, 0, (void *)scale_game_frames(0xA)); moby->state = BLARG_TROOPER_STATE_AIM; } else { @@ -493,8 +495,8 @@ void blarg_trooper_update(struct Moby *moby) { } else if (f < -0.7853982f) { f = -0.7853982f; } - blarg_trooper_pvars->unk178 = f * 0.7f; - blarg_trooper_pvars->unk1F8 = f * 0.4f; + blarg_trooper_pvars->manipulator0_turn = f * 0.7f; + blarg_trooper_pvars->manipulator1_turn = f * 0.4f; update_scratch.w.p.v70[0] = fast_cos(moby->rot.z) * (frame_time * 2.5f); update_scratch.w.p.v70[1] = fast_sin(moby->rot.z) * (frame_time * 2.5f); update_scratch.w.p.v70[2] = 0.0f; @@ -539,9 +541,10 @@ void blarg_trooper_update(struct Moby *moby) { } else { k = 0; } - if (FUN_L00_001fefc8(&blarg_trooper_pvars->unkFF) != 0 && k != moby->prev_seq) { + if (FUN_L00_001fefc8(&blarg_trooper_pvars->idle_anim_timer) != 0 && + k != moby->prev_seq) { blend_moby_animation(moby, (void *)k, 0, (void *)scale_game_frames(0xA)); - blarg_trooper_pvars->unkFF = scale_game_frames(0xF); + blarg_trooper_pvars->idle_anim_timer = scale_game_frames(0xF); } if (blarg_trooper_pvars->timer_F2 == 0) { if (target_distance < 1.0f && fast_difference_between_rotations( @@ -550,11 +553,11 @@ void blarg_trooper_update(struct Moby *moby) { moby->rot.z) < 0.2617994f) { moby->state = BLARG_TROOPER_STATE_MELEE_ATTACK; blend_moby_animation(moby, (void *)7, 0, (void *)scale_game_frames(7)); - blarg_trooper_pvars->unkFF = 0; + blarg_trooper_pvars->idle_anim_timer = 0; } else if (target_distance < 14.0f) { moby->state = BLARG_TROOPER_STATE_AIM; blend_moby_animation(moby, (void *)3, 0, (void *)scale_game_frames(7)); - blarg_trooper_pvars->unkFF = 0; + blarg_trooper_pvars->idle_anim_timer = 0; } } } else { @@ -593,7 +596,7 @@ void blarg_trooper_update(struct Moby *moby) { case BLARG_TROOPER_STATE_JUMP: if (moby->prev_seq != 2) { blend_moby_animation(moby, (void *)2, 0, (void *)scale_game_frames(7)); - blarg_trooper_pvars->unkD0[0] = -(frame_time * 7.668f); + blarg_trooper_pvars->fall_speed = -(frame_time * 7.668f); } else if (moby->anim_flags & 2) { blend_moby_animation(moby, 0, 0, (void *)scale_game_frames(0xA)); moby->state = BLARG_TROOPER_STATE_IDLE; @@ -643,7 +646,7 @@ void blarg_trooper_update(struct Moby *moby) { moby->state = BLARG_TROOPER_STATE_FIRE; blend_moby_animation(moby, (void *)5, 0, (void *)scale_game_frames(7)); blarg_trooper_pvars->timer_F2 = scale_game_frames(0x1E); - blarg_trooper_pvars->unkFD = 3; + blarg_trooper_pvars->shots_left = 3; break; } } @@ -669,7 +672,7 @@ void blarg_trooper_update(struct Moby *moby) { moby->state = BLARG_TROOPER_STATE_MELEE_ATTACK; blend_moby_animation(moby, (void *)7, 0, (void *)scale_game_frames(7)); } - if (moby->prev_seq == 5 && blarg_trooper_pvars->unkD0[2] < 2.0f && alive >= 2.0f && + if (moby->prev_seq == 5 && blarg_trooper_pvars->prev_anim_frame < 2.0f && alive >= 2.0f && (o = blarg_trooper_pvars->gun_moby) != 0) { float a; moby_point_position(o, 0, update_scratch.w.p.v70); @@ -686,9 +689,9 @@ void blarg_trooper_update(struct Moby *moby) { update_scratch.w.p.v70, update_scratch.w.p.v80, truncate_float_to_s32(14.0f / (frame_time * 10.0f))); - FUN_L00_001fefc8(&blarg_trooper_pvars->unkFD); + FUN_L00_001fefc8(&blarg_trooper_pvars->shots_left); } else if ((moby->anim_flags & 2) && blarg_trooper_pvars->timer_F2 == 0 && - blarg_trooper_pvars->unkFD == 0) { + blarg_trooper_pvars->shots_left == 0) { blarg_trooper_pvars->timer_F2 = scale_game_frames(0xB4); moby->state = BLARG_TROOPER_STATE_AIM; blend_moby_animation(moby, (void *)4, 0, (void *)scale_game_frames(0xA)); @@ -762,7 +765,7 @@ void blarg_trooper_update(struct Moby *moby) { } break; case BLARG_TROOPER_STATE_DYING: - if (step_moby_motion(moby, blarg_trooper_pvars->motion) & 0x60) { + if (step_moby_motion(moby, &blarg_trooper_pvars->knockback) & 0x60) { destroy_blarg_trooper(moby); return; } @@ -788,14 +791,14 @@ void blarg_trooper_update(struct Moby *moby) { } else if (f < -0.9599311f) { f = -0.9599311f; } - blarg_trooper_pvars->unk178 = f * 0.5f; - blarg_trooper_pvars->unk1F8 = f * 0.5f; + blarg_trooper_pvars->manipulator0_turn = f * 0.5f; + blarg_trooper_pvars->manipulator1_turn = f * 0.5f; } } } if (moby->flags & 0x8000) { - blarg_trooper_pvars->unk178 = -blarg_trooper_pvars->unk178; - blarg_trooper_pvars->unk1F8 = -blarg_trooper_pvars->unk1F8; + blarg_trooper_pvars->manipulator0_turn = -blarg_trooper_pvars->manipulator0_turn; + blarg_trooper_pvars->manipulator1_turn = -blarg_trooper_pvars->manipulator1_turn; } update_joint_animation( moby, blarg_trooper_pvars->manipulator0, 5, frame_scale_sq * 0.018f, frame_scale_sq * 0.3f); @@ -824,20 +827,20 @@ void blarg_trooper_update(struct Moby *moby) { moby_point_position(moby, 1, update_scratch.w.m); blarg_trooper_pvars->gun_moby = spawn_moby_attachment(moby, update_scratch.w.m); } - blarg_trooper_pvars->unkD0[0] = blarg_trooper_pvars->unkD0[0] + frame_time_sq * 9.8f; - moby->pos.z = moby->pos.z - (blarg_trooper_pvars->unkD0[0] - 2.0f); + blarg_trooper_pvars->fall_speed = blarg_trooper_pvars->fall_speed + frame_time_sq * 9.8f; + moby->pos.z = moby->pos.z - (blarg_trooper_pvars->fall_speed - 2.0f); { float g = probe_ground_height(pos, 0, 0.5f); moby->pos.z = moby->pos.z - 2.0f; if (moby->pos.z < g) { moby->pos.z = g; - blarg_trooper_pvars->unkD0[0] = 0.0f; + blarg_trooper_pvars->fall_speed = 0.0f; } } - if (moby->pos.z < blarg_trooper_pvars->unkD0[1] - 5.0f) { + if (moby->pos.z < blarg_trooper_pvars->spawn_z - 5.0f) { FUN_L00_00257470(moby, 0, -1); destroy_blarg_trooper(moby); return; } - blarg_trooper_pvars->unkD0[2] = alive; + blarg_trooper_pvars->prev_anim_frame = alive; } diff --git a/src/overlays/l04/mobys/eudora_bridge.c b/src/overlays/l04/mobys/eudora_bridge.c index cf61568959..8778458bcc 100644 --- a/src/overlays/l04/mobys/eudora_bridge.c +++ b/src/overlays/l04/mobys/eudora_bridge.c @@ -21,9 +21,9 @@ typedef struct { /* The fields of a moby class header read when a moby changes class. */ typedef struct { u8 pad0[0xE]; - u8 unkE; + u8 lod_trans; u8 padF; - u32 unk10; + u32 collision; u8 pad14[0x10]; f32 scale; /* 0x24 */ } MobyClassHeader; @@ -64,8 +64,8 @@ void eudora_bridge_update(struct Moby *moby) { moby->unk71 = 0xFF; moby->scale = ((MobyClassHeader *)moby->pclass)->scale; update_moby_animation_state(moby); - moby->lod_dist = ((MobyClassHeader *)moby->pclass)->unkE; - moby->collision = ((MobyClassHeader *)moby->pclass)->unk10; + moby->lod_dist = ((MobyClassHeader *)moby->pclass)->lod_trans; + moby->collision = ((MobyClassHeader *)moby->pclass)->collision; refresh_moby_spatial_bounds_from_basis(moby); } break; @@ -97,8 +97,8 @@ void eudora_bridge_update(struct Moby *moby) { moby->unk71 = 0xFF; moby->scale = ((MobyClassHeader *)moby->pclass)->scale; update_moby_animation_state(moby); - moby->lod_dist = ((MobyClassHeader *)moby->pclass)->unkE; - moby->collision = ((MobyClassHeader *)moby->pclass)->unk10; + moby->lod_dist = ((MobyClassHeader *)moby->pclass)->lod_trans; + moby->collision = ((MobyClassHeader *)moby->pclass)->collision; refresh_moby_spatial_bounds_from_basis(moby); moby->state = EUDORA_BRIDGE_STATE_RELEASE_MOVEMENT_VOICE; } diff --git a/src/overlays/l04/mobys/leg_walker.c b/src/overlays/l04/mobys/leg_walker.c index 748bec76b8..e445bb9b53 100644 --- a/src/overlays/l04/mobys/leg_walker.c +++ b/src/overlays/l04/mobys/leg_walker.c @@ -113,13 +113,13 @@ void initialize_leg_rig(struct Moby *moby, LegRig *rig) { if (rig->legs[k].manip_a.attached == 0) attach_manipulator(moby, rig->legs[k].slot_a, &rig->legs[k].manip_a); } - rig->unkEE = 0; + rig->control_flags = 0; rig->unkB7 = 0; - rig->unkB8 = 0; - rig->unkBC = 0; + rig->pitch_target = 0; + rig->pitch_velocity = 0; rig->speed = 0.0f; - rig->unkC8 = 0; - rig->unkE8 = 0; + rig->turn_velocity = 0; + rig->probe_offset = 0; rig->unkD8 = 0; rig->unkE4 = 0; rig->unkEC = 0; @@ -409,23 +409,35 @@ s32 leg_walker_update(struct Moby *moby, LegRig *rig, f32 speed, f32 heading, f3 animation_start(moby->class_slot, moby->prev_seq); } mode = rig_pick_mode(moby, rig, time); - if (rig->unkEE & 4) { - moby->rot.z = spring_turn( - moby->rot.z, rig->heading, rig->unkCC, rig->unkD0, rig->unkD4, (f32 *)&rig->unkC8); + if (rig->control_flags & 4) { + moby->rot.z = spring_turn(moby->rot.z, + rig->heading, + rig->turn_gain, + rig->turn_damping, + rig->max_turn_step, + (f32 *)&rig->turn_velocity); } else if (mode & 0xF) { - moby->rot.z = spring_turn( - moby->rot.z, heading, rig->unkCC, rig->unkD0, rig->unkD4, (f32 *)&rig->unkC8); + moby->rot.z = spring_turn(moby->rot.z, + heading, + rig->turn_gain, + rig->turn_damping, + rig->max_turn_step, + (f32 *)&rig->turn_velocity); } else { - moby->rot.z = spring_turn( - moby->rot.z, heading, 0.0f, rig->unkD0 + rig->unkD0, rig->unkD4, (f32 *)&rig->unkC8); + moby->rot.z = spring_turn(moby->rot.z, + heading, + 0.0f, + rig->turn_damping + rig->turn_damping, + rig->max_turn_step, + (f32 *)&rig->turn_velocity); } rig_animate(moby, rig, mode, heading); moby->rot.y = spring_turn(moby->rot.y, - *(f32 *)&rig->unkB8, + *(f32 *)&rig->pitch_target, 0.005f, 0.01f, D_0015ED60 * 0.017453292f, - (f32 *)&rig->unkBC); + (f32 *)&rig->pitch_velocity); local.joints[0] = rig->legs[0].joint; local.joints[1] = rig->legs[0].joint2; local.joints[2] = rig->legs[1].joint; @@ -433,7 +445,7 @@ s32 leg_walker_update(struct Moby *moby, LegRig *rig, f32 speed, f32 heading, f3 local.joints[4] = rig->jointB4; local.joints[5] = rig->jointB5; transform_scaled_vertex_batch(moby, 6, local.joints, transformed); - if (!(rig->unkEE & 4)) { + if (!(rig->control_flags & 4)) { s32 active = mode | (rig->mode & 0x30); s32 bit = 1; f32 count = 0.0f; @@ -471,7 +483,7 @@ s32 leg_walker_update(struct Moby *moby, LegRig *rig, f32 speed, f32 heading, f3 } fast_vec_add(pos, pos, &shift); { - f32 max_step = rig->unkC4; + f32 max_step = rig->max_speed_step; s32 previous_mode = rig->mode; rig->mode = mode; @@ -490,18 +502,18 @@ s32 leg_walker_update(struct Moby *moby, LegRig *rig, f32 speed, f32 heading, f3 } flags = update_leg_rig_height_and_tilt(moby, rig); walker_update_gait(moby, rig, speed, heading, step, changed); - if (!(rig->unkEE & 4)) { + if (!(rig->control_flags & 4)) { rig_probe_setup(moby, 0, &probe_kind, &local.v.ground, &probe_start, &probe_end); if (moby->prev_seq == rig->anims[3]->id || moby->prev_seq == rig->anims[1]->id || moby->prev_seq == rig->anims[2]->id) { - *(f32 *)&rig->unkE8 = rig->unkE0 + rig->unkE0; + *(f32 *)&rig->probe_offset = rig->probe_lift + rig->probe_lift; } else if (moby->prev_seq == rig->anims[7]->id && (rig->mode & 0xF)) { - *(f32 *)&rig->unkE8 = rig->unkE0 + rig->unkE0; + *(f32 *)&rig->probe_offset = rig->probe_lift + rig->probe_lift; } else if (moby->prev_seq == moby->seq) { - *(f32 *)&rig->unkE8 = *(f32 *)&rig->unkE8 * 0.9f; + *(f32 *)&rig->probe_offset = *(f32 *)&rig->probe_offset * 0.9f; } - local.v.ground.z += *(f32 *)&rig->unkE8; - probe_end -= *(f32 *)&rig->unkE8; + local.v.ground.z += *(f32 *)&rig->probe_offset; + probe_end -= *(f32 *)&rig->probe_offset; fast_vec_sub(&local.v.offset, pos, &local.v.ground); for (tries = 0; tries < 8 && rig_probe(&local.v.ground, 4, probe_start, moby, probe_end); tries++) { @@ -614,10 +626,10 @@ void reset_leg_rig_from_animation(struct Moby *moby, LegRig *rig) { } } rig->mode = rig_pick_mode(moby, rig, animation_time); - rig->unkB8 = 0; - rig->unkBC = 0; - rig->unkC8 = 0; - rig->unkE8 = 0; + rig->pitch_target = 0; + rig->pitch_velocity = 0; + rig->turn_velocity = 0; + rig->probe_offset = 0; rig->unkD8 = 0; rig->unkE4 = 0; rig->unkEC = 0; diff --git a/src/overlays/l04/mobys/lieutenant.c b/src/overlays/l04/mobys/lieutenant.c index ef3ee56276..e38678fee4 100644 --- a/src/overlays/l04/mobys/lieutenant.c +++ b/src/overlays/l04/mobys/lieutenant.c @@ -19,7 +19,7 @@ * its phase reaches 2, and closes when the slot is already used. */ struct VendorMobyView { u8 pad0[0x7F]; - u8 unk7F; + u8 shadow_range; /* 0x7F */ u8 pad80[0x30]; u8 slot; /* 0xB0 */ u8 padB1[0xF]; @@ -66,7 +66,7 @@ void lieutenant_update(struct Moby *moby) { if (moby->visible != 0 && fast_vec_dist(&moby->pos, D_L04_00166F40) < 30.0f) { FUN_L00_0025a120(moby); - ((struct VendorMobyView *)moby)->unk7F = 0x18; + ((struct VendorMobyView *)moby)->shadow_range = 0x18; } attach_big_head_cheat_manipulator_to_matching_moby(moby); switch (moby->state) { diff --git a/src/overlays/l04/mobys/snow_plow.c b/src/overlays/l04/mobys/snow_plow.c index ab69bf61b7..c8c3794bf3 100644 --- a/src/overlays/l04/mobys/snow_plow.c +++ b/src/overlays/l04/mobys/snow_plow.c @@ -60,22 +60,21 @@ typedef struct SnowPlowVars { u8 pad_0[0x60]; s32 path; u8 pad_64[0x18]; - f32 unk7C; + f32 turn_velocity; u8 pad_80[0x7C]; - f32 unkFC; + f32 speed; /* gunship speed (gunship_update) */ u8 pad_100[0x1C]; - s32 unk11C; + s32 movement_delay_timer; /* gunship movement delay, stored as a word */ u8 pad_120[0x18]; - f32 unk138; + f32 initial_speed; u8 pad_13C[0x4]; - f32 unk140; - f32 unk144; + f32 spin_angle0; + f32 spin_angle1; u8 selected_clip_volume_index; u8 clip_volume_movement_state; s16 clip_volume_movement_timer; f32 saved_return_heading; - s32 unk150; - u8 pad_154[0xC]; + s32 clip_volumes[4]; /* -1: none; entering one sends the plow to its cuboid */ f32 saved_return_position[4]; s32 hit_recovery_timer; s32 hit_recovery_active; @@ -83,11 +82,11 @@ typedef struct SnowPlowVars { s32 linked_moby_index; u8 manipulator; u8 pad_181[0xF]; - u8 unk190; + u8 manipulator_quat; u8 pad_191[0x2F]; - u8 unk1C0; + u8 manipulator1; u8 pad_1C1[0xF]; - u8 unk1D0; + u8 manipulator1_quat; } SnowPlowVars; /* Class-dependent movement, manipulator rotation, hit effects and visibility. */ @@ -163,7 +162,7 @@ void snow_plow_update(struct Moby *moby) { } moby->draw_dist = 0x7f; moby->update_dist = 0xff; - snow_plow_vars->unk138 = snow_plow_vars->unkFC; + snow_plow_vars->initial_speed = snow_plow_vars->speed; snow_plow_vars->saved_draw_distance = moby->draw_dist; } amount = 0.0f; @@ -172,14 +171,14 @@ void snow_plow_update(struct Moby *moby) { fast_dec_timer_s16(&snow_plow_vars->clip_volume_movement_timer); switch (snow_plow_vars->clip_volume_movement_state) { case SNOW_PLOW_SCAN_CLIP_VOLUMES: { - float length = snow_plow_vars->unkFC; - float target = snow_plow_vars->unk138; + float length = snow_plow_vars->speed; + float target = snow_plow_vars->initial_speed; if (length < target) { - snow_plow_vars->unkFC = length + frame_time_sq * 20.0f; - if (target < snow_plow_vars->unkFC) - snow_plow_vars->unkFC = target; + snow_plow_vars->speed = length + frame_time_sq * 20.0f; + if (target < snow_plow_vars->speed) + snow_plow_vars->speed = target; } - p = &snow_plow_vars->unk150; + p = snow_plow_vars->clip_volumes; i = 0; do { if (snow_plow_vars->clip_volume_movement_timer == 0 && p[i] != -1 && @@ -188,9 +187,9 @@ void snow_plow_update(struct Moby *moby) { snow_plow_vars->selected_clip_volume_index = *(unsigned char *)&p[i]; snow_plow_vars->clip_volume_movement_state = SNOW_PLOW_MOVE_TO_CLIP_VOLUME; snow_plow_vars->saved_return_heading = moby->rot.z; - *(int *)&snow_plow_vars->unk7C = 0; + *(int *)&snow_plow_vars->turn_velocity = 0; moby->state = SNOW_PLOW_WAIT_TO_RESUME_PATH; - snow_plow_vars->unk11C = scale_game_frames(36000); + snow_plow_vars->movement_delay_timer = scale_game_frames(36000); break; } ++i; @@ -200,7 +199,7 @@ void snow_plow_update(struct Moby *moby) { case SNOW_PLOW_MOVE_TO_CLIP_VOLUME: FUN_L00_00258278(moby, l04_cuboids[snow_plow_vars->selected_clip_volume_index].rot.z, - &snow_plow_vars->unk7C, + &snow_plow_vars->turn_velocity, frame_time_sq * 1.0471976f, frame_time_sq * 3.1415927f, frame_time * 3.1415927f); @@ -220,14 +219,14 @@ void snow_plow_update(struct Moby *moby) { break; case SNOW_PLOW_WAIT_BEFORE_RETURN: if (snow_plow_vars->clip_volume_movement_timer == 0) { - snow_plow_vars->unk7C = amount; + snow_plow_vars->turn_velocity = amount; snow_plow_vars->clip_volume_movement_state = SNOW_PLOW_RETURN_TO_SAVED_TRANSFORM; } break; case SNOW_PLOW_RETURN_TO_SAVED_TRANSFORM: FUN_L00_00258278(moby, snow_plow_vars->saved_return_heading, - &snow_plow_vars->unk7C, + &snow_plow_vars->turn_velocity, frame_time_sq * 1.0471976f, frame_time_sq * 3.1415927f, frame_time * 3.1415927f); @@ -236,9 +235,9 @@ void snow_plow_update(struct Moby *moby) { moby->rot.z, snow_plow_vars->saved_return_heading) < 0.034906585f) { snow_plow_vars->clip_volume_movement_state = SNOW_PLOW_SCAN_CLIP_VOLUMES; snow_plow_vars->clip_volume_movement_timer = scale_game_frames(600); - snow_plow_vars->unkFC = amount; - snow_plow_vars->unk7C = amount; - snow_plow_vars->unk11C = 0; + snow_plow_vars->speed = amount; + snow_plow_vars->turn_velocity = amount; + snow_plow_vars->movement_delay_timer = 0; } fast_vec_sub(&delta, snow_plow_vars->saved_return_position, &moby->pos); length = fast_vec_length(&delta); @@ -266,23 +265,24 @@ void snow_plow_update(struct Moby *moby) { case SNOW_PLOW_CLASS_OFFSET_WITH_THREE_HIT_SPAWNS_AND_TARGET_VOICE_SELECTOR_ZERO: case SNOW_PLOW_CLASS_OFFSET_WITH_TARGET_VOICE_SELECTOR_ZERO: attach_manipulator((char *)moby, 0, &snow_plow_vars->manipulator); - *(int *)&snow_plow_vars->unk140 = 0; + *(int *)&snow_plow_vars->spin_angle0 = 0; break; case SNOW_PLOW_CLASS_OFFSET_WITH_TWO_ROTATING_MANIPULATORS: case SNOW_PLOW_CLASS_OFFSET_WITH_TWO_POINT_CART_BURST: attach_manipulator((char *)moby, 0, &snow_plow_vars->manipulator); - *(int *)&snow_plow_vars->unk140 = 0; - attach_manipulator((char *)moby, 1, &snow_plow_vars->unk1C0); - *(int *)&snow_plow_vars->unk144 = 0; + *(int *)&snow_plow_vars->spin_angle0 = 0; + attach_manipulator((char *)moby, 1, &snow_plow_vars->manipulator1); + *(int *)&snow_plow_vars->spin_angle1 = 0; break; } } else { switch ((short)(moby->oclass - 0x1d2)) { case SNOW_PLOW_CLASS_OFFSET_WITH_THREE_HIT_SPAWNS_AND_TARGET_VOICE_SELECTOR_ONE: case SNOW_PLOW_CLASS_OFFSET_WITH_QUARTER_TURN_LINKED_MOBY: - snow_plow_vars->unk140 = - fast_add_rotations(snow_plow_vars->unk140, frame_time * 12.566371f); - build_axis_rotation_quaternion(&snow_plow_vars->unk190, 0, snow_plow_vars->unk140); + snow_plow_vars->spin_angle0 = + fast_add_rotations(snow_plow_vars->spin_angle0, frame_time * 12.566371f); + build_axis_rotation_quaternion( + &snow_plow_vars->manipulator_quat, 0, snow_plow_vars->spin_angle0); break; case SNOW_PLOW_CLASS_OFFSET_WITH_HIT_SPHERE_QUERY_AND_TARGET_VOICE: case SNOW_PLOW_CLASS_OFFSET_WITH_HIT_SPHERE_QUERY_WITHOUT_TARGET_VOICE: @@ -290,18 +290,21 @@ void snow_plow_update(struct Moby *moby) { case SNOW_PLOW_CLASS_OFFSET_WITH_FOUR_HIT_SPAWNS_AND_TARGET_VOICE_SELECTOR_ONE: case SNOW_PLOW_CLASS_OFFSET_WITH_THREE_HIT_SPAWNS_AND_TARGET_VOICE_SELECTOR_ZERO: case SNOW_PLOW_CLASS_OFFSET_WITH_TARGET_VOICE_SELECTOR_ZERO: - snow_plow_vars->unk140 = - fast_add_rotations(snow_plow_vars->unk140, frame_time * 12.566371f); - build_axis_rotation_quaternion(&snow_plow_vars->unk190, 2, snow_plow_vars->unk140); + snow_plow_vars->spin_angle0 = + fast_add_rotations(snow_plow_vars->spin_angle0, frame_time * 12.566371f); + build_axis_rotation_quaternion( + &snow_plow_vars->manipulator_quat, 2, snow_plow_vars->spin_angle0); break; case SNOW_PLOW_CLASS_OFFSET_WITH_TWO_ROTATING_MANIPULATORS: case SNOW_PLOW_CLASS_OFFSET_WITH_TWO_POINT_CART_BURST: - snow_plow_vars->unk140 = - fast_add_rotations(snow_plow_vars->unk140, frame_time * 12.566371f); - build_axis_rotation_quaternion(&snow_plow_vars->unk190, 2, snow_plow_vars->unk140); - snow_plow_vars->unk144 = - fast_add_rotations(snow_plow_vars->unk144, frame_time * 12.566371f); - build_axis_rotation_quaternion(&snow_plow_vars->unk1D0, 2, snow_plow_vars->unk144); + snow_plow_vars->spin_angle0 = + fast_add_rotations(snow_plow_vars->spin_angle0, frame_time * 12.566371f); + build_axis_rotation_quaternion( + &snow_plow_vars->manipulator_quat, 2, snow_plow_vars->spin_angle0); + snow_plow_vars->spin_angle1 = + fast_add_rotations(snow_plow_vars->spin_angle1, frame_time * 12.566371f); + build_axis_rotation_quaternion( + &snow_plow_vars->manipulator1_quat, 2, snow_plow_vars->spin_angle1); break; } } diff --git a/src/overlays/l04/mobys/woodcut_bot.c b/src/overlays/l04/mobys/woodcut_bot.c index 827235756e..346d435636 100644 --- a/src/overlays/l04/mobys/woodcut_bot.c +++ b/src/overlays/l04/mobys/woodcut_bot.c @@ -17,6 +17,7 @@ #include "rnc/overlay/shared/world/level_path.h" #include "sda.h" #include "rnc/overlay/shared/math/quad.h" +#include "rnc/overlay/l04/leg_rig.h" extern void initialize_leg_rig_angle_defaults(void *, char *) __asm__("FUN_L04_00292370"); extern void initialize_leg_rig(void *, char *) __asm__("FUN_L04_002923b8"); @@ -24,53 +25,13 @@ extern void initialize_leg_rig(void *, char *) __asm__("FUN_L04_002923b8"); void initialize_woodcut_bot_movement_data(void *moby) __asm__("FUN_L04_002d1418"); typedef struct WoodcutBotVars { - u8 pad_0[0x160]; - u8 unk160; - u8 pad_161[0x6F]; - s32 unk1D0; - s32 unk1D4; - s32 unk1D8; - s32 unk1DC; - s32 unk1E0; - s32 unk1E4; - s32 unk1E8; - s32 unk1EC; - s32 unk1F0; - s32 unk1F4; - s32 unk1F8; - s32 unk1FC; - s32 unk200; - u8 pad_204[0xC]; - u8 unk210; - u8 unk211; - u8 unk212; - u8 unk213; - u8 auxiliary_joint_a; - u8 auxiliary_joint_b; - u8 pad_216[0xE]; - f32 movement_acceleration_step_limit; - u8 pad_228[0x4]; - f32 unk22C; - f32 unk230; - f32 unk234; - u8 pad_238[0x4]; - f32 movement_gravity_step; - f32 unk240; - u8 pad_244[0xC]; - u8 leg_a_joint; - u8 leg_a_secondary_joint; - u8 leg_a_manipulator_slot_a; - u8 leg_a_manipulator_slot_b; - u8 pad_254[0xAC]; - u8 leg_b_joint; - u8 leg_b_secondary_joint; - u8 leg_b_manipulator_slot_a; - u8 leg_b_manipulator_slot_b; + u8 pad_0[0x160]; + LegRig rig; } WoodcutBotVars; void initialize_woodcut_bot_movement_data(void *moby) { WoodcutBotVars *moby_vars = (WoodcutBotVars *)MOBY(moby)->pvars; - char *movement_data = &moby_vars->unk160; + char *movement_data = (char *)&moby_vars->rig; float speed; float angleHalf; float angleFull; @@ -78,19 +39,32 @@ void initialize_woodcut_bot_movement_data(void *moby) { float amount; float frameScale; float otherScale; - moby_vars->unk1D0 = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); - moby_vars->unk1D4 = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); - moby_vars->unk1D8 = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); - moby_vars->unk1DC = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); - moby_vars->unk1E0 = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); - moby_vars->unk1E4 = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); - moby_vars->unk1E8 = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); - moby_vars->unk1EC = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x54) + 0x14); - moby_vars->unk1F0 = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); - moby_vars->unk1F4 = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); - moby_vars->unk1F8 = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); - moby_vars->unk1FC = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); - moby_vars->unk200 = *(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); + moby_vars->rig.anims[0] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); + moby_vars->rig.anims[1] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); + moby_vars->rig.anims[2] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); + moby_vars->rig.anims[3] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); + moby_vars->rig.anims[4] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); + moby_vars->rig.anims[5] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); + moby_vars->rig.anims[6] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); + moby_vars->rig.anims[7] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x54) + 0x14); + moby_vars->rig.anims[8] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); + moby_vars->rig.anims[9] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); + moby_vars->rig.anims[10] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); + moby_vars->rig.anims[11] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); + moby_vars->rig.anims[12] = + (LegRigAnim *)*(int *)(*(char **)(((char *)MOBY(moby)->pclass) + 0x70) + 0x14); initialize_leg_rig_angle_defaults(moby, movement_data); frameScale = frame_time_sq; otherScale = frame_time; @@ -99,26 +73,26 @@ void initialize_woodcut_bot_movement_data(void *moby) { speed = frameScale * 9.8f; angleHalf = frameScale * 3.1415927f; amount = frameScale * 10.0f; - moby_vars->auxiliary_joint_a = 7; - moby_vars->unk210 = 0; - moby_vars->unk211 = 0; - moby_vars->movement_gravity_step = speed; - moby_vars->unk22C = angleHalf; - moby_vars->unk230 = angleFull; - moby_vars->unk234 = angleOther; - moby_vars->movement_acceleration_step_limit = amount; - moby_vars->unk212 = 0xff; - moby_vars->unk213 = 0x10; - moby_vars->auxiliary_joint_b = 7; - moby_vars->leg_a_joint = 10; - moby_vars->leg_a_secondary_joint = 8; - moby_vars->leg_a_manipulator_slot_b = 12; - moby_vars->leg_a_manipulator_slot_a = 14; - moby_vars->leg_b_joint = 11; - moby_vars->leg_b_secondary_joint = 9; - moby_vars->leg_b_manipulator_slot_b = 13; - moby_vars->leg_b_manipulator_slot_a = 15; - moby_vars->unk240 = 0.5f; + moby_vars->rig.jointB4 = 7; + moby_vars->rig.unkB0 = 0; + moby_vars->rig.unkB1 = 0; + moby_vars->rig.gravity_step = speed; + moby_vars->rig.turn_gain = angleHalf; + moby_vars->rig.turn_damping = angleFull; + moby_vars->rig.max_turn_step = angleOther; + moby_vars->rig.max_speed_step = amount; + moby_vars->rig.unkB2 = 0xff; + moby_vars->rig.unkB3 = 0x10; + moby_vars->rig.jointB5 = 7; + moby_vars->rig.legs[0].joint = 10; + moby_vars->rig.legs[0].joint2 = 8; + moby_vars->rig.legs[0].slot_b = 12; + moby_vars->rig.legs[0].slot_a = 14; + moby_vars->rig.legs[1].joint = 11; + moby_vars->rig.legs[1].joint2 = 9; + moby_vars->rig.legs[1].slot_b = 13; + moby_vars->rig.legs[1].slot_a = 15; + moby_vars->rig.probe_lift = 0.5f; initialize_leg_rig(moby, movement_data); } From 4386ab71d2b9d08de3f82da6ae24d04694b6ace0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:32:20 +0000 Subject: [PATCH 084/213] decomp: name extermibot, extermitank, amoeboid, sharkigator and platform fields in l05 --- src/overlays/l05/mobys/amoeboid.c | 45 +++---- src/overlays/l05/mobys/drain_cover.c | 22 ++-- src/overlays/l05/mobys/electric_gate.c | 12 +- src/overlays/l05/mobys/extermibot.c | 142 ++++++++++----------- src/overlays/l05/mobys/extermitank.c | 131 +++++++++---------- src/overlays/l05/mobys/floating_platform.c | 23 ++-- src/overlays/l05/mobys/fog_zone.c | 23 ++-- src/overlays/l05/mobys/sharkigator.c | 46 +++---- src/overlays/l05/mobys/skid_mcmarx.c | 9 +- src/overlays/l05/mobys/taxi.c | 10 +- src/overlays/l05/mobys/triggered_motion.c | 52 ++++---- src/overlays/l05/mobys/triggered_slide.c | 25 ++-- 12 files changed, 267 insertions(+), 273 deletions(-) diff --git a/src/overlays/l05/mobys/amoeboid.c b/src/overlays/l05/mobys/amoeboid.c index a594557d0c..a9b5fac6b7 100644 --- a/src/overlays/l05/mobys/amoeboid.c +++ b/src/overlays/l05/mobys/amoeboid.c @@ -1,5 +1,6 @@ /* Level 05 moby class amoeboid. */ #include "types.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" #include "rnc/overlay/shared/world/level_path.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -18,7 +19,6 @@ extern float approach_angle(float *, float *, float, float, float, float) __asm__("FUN_L00_0025be00"); extern int move_moby_with_ground_and_collision_checks( void *, void *, void *, void *, float) __asm__("FUN_L00_00258b50"); -extern void FUN_L01_0026d930(char *p); extern void handle_amoeboid_hits(unsigned char *m) __asm__("FUN_L05_002daf58"); extern void spawn_amoeboid_particles(unsigned char *moby) __asm__("FUN_L05_002db018"); void mark_moby_for_removal(void *obj) __asm__("FUN_0020c828"); @@ -27,20 +27,14 @@ void amoeboid_update(struct Moby *m) __asm__("FUN_L05_002dac80"); typedef struct Moby Moby; typedef struct AmoeboidVars { - u8 pad_0[0x40]; - u8 unk40; - u8 pad_41[0x1F]; - s32 unk60; - u8 pad_64[0x4]; - f32 unk68; - f32 unk6C; - u8 pad_70[0x14]; - f32 movement_speed_cap; - u8 pad_88[0x28]; - s32 path_B0; - s32 unkB4; - s32 timer_B8; - f32 unkBC; + u8 pad_0[0x40]; + u8 displacement; /* move output of move_moby_with_ground_and_collision_checks */ + u8 pad_41[0x1F]; + struct GroundMoveControl move; + s32 path_B0; + s32 path_point; + s32 timer_B8; + f32 turn_velocity; } AmoeboidVars; /* Moby class 133 */ @@ -63,22 +57,22 @@ void amoeboid_update(struct Moby *moby) { mark_moby_for_removal(moby); return; } - FUN_L01_0026d930(&moby_data->unk60); - moby_data->unk6C = 1.0f; - moby_data->unk68 = 1.0f; + init_ground_move_control(&moby_data->move); + moby_data->move.max_climb = 1.0f; + moby_data->move.max_drop = 1.0f; { int r = truncate_float_to_s32(409.6f); float movement_speed_limit = frame_time * 4.0f; - moby_data->unk60 = r; - moby_data->movement_speed_cap = movement_speed_limit; + moby_data->move.collision_radius_1024ths = r; + moby_data->move.max_speed = movement_speed_limit; } break; case AMOEBOID_FOLLOW_PATH: { - char *path_node_base = ((char *)l05_paths[moby_data->path_B0]) + moby_data->unkB4 * 16; + char *path_node_base = ((char *)l05_paths[moby_data->path_B0]) + moby_data->path_point * 16; float yaw = fast_arc_tan(*(float *)(path_node_base + 0x10) - moby->pos.x, *(float *)(path_node_base + 0x14) - moby->pos.y); approach_angle(&moby->rot.z, - &moby_data->unkBC, + &moby_data->turn_velocity, yaw, frame_time_sq * 1.0471976f, frame_time_sq * 1.0471976f, @@ -87,13 +81,14 @@ void amoeboid_update(struct Moby *moby) { facing_direction[1] = fast_sin(moby->rot.z); facing_direction[2] = 0.0f; move_moby_with_ground_and_collision_checks( - moby, &moby_data->unk60, facing_direction, &moby_data->unk40, 1.0f); + moby, &moby_data->move, facing_direction, &moby_data->displacement, 1.0f); if (fast_dec_timer(&moby_data->timer_B8) != 0 || vector_distance_xy(&moby->pos, ((char *)l05_paths[moby_data->path_B0]) + - (moby_data->unkB4 * 16 + 0x10)) < 1.0f) { + (moby_data->path_point * 16 + 0x10)) < 1.0f) { int r = random_integer_below(*(int *)l05_paths[moby_data->path_B0]); - moby_data->unkB4 = (moby_data->unkB4 + r) % *(int *)l05_paths[moby_data->path_B0]; + moby_data->path_point = + (moby_data->path_point + r) % *(int *)l05_paths[moby_data->path_B0]; moby_data->timer_B8 = scale_game_frames(600); } spawn_amoeboid_particles(moby); diff --git a/src/overlays/l05/mobys/drain_cover.c b/src/overlays/l05/mobys/drain_cover.c index 5a9559ccb4..9193251792 100644 --- a/src/overlays/l05/mobys/drain_cover.c +++ b/src/overlays/l05/mobys/drain_cover.c @@ -475,11 +475,11 @@ extern float fast_add_rotations(float, float); typedef struct DrainCoverVars { u8 pad_0[0x90]; f32 tilt_x_velocity; - f32 unk94; - f32 unk98; - f32 unk9C; - f32 unkA0; - f32 unkA4; + f32 tilt_y_velocity; + f32 wobble_x_phase; + f32 wobble_y_phase; + f32 wobble_x_rate; + f32 wobble_y_rate; } DrainCoverVars; void update_drain_cover_tilt(char *moby, float turn_scale, float speed_scale) { @@ -509,11 +509,13 @@ void update_drain_cover_tilt(char *moby, float turn_scale, float speed_scale) { vertical = 0.0f; } - drain_cover_vars->unk98 = fast_add_rotations(drain_cover_vars->unk98, drain_cover_vars->unkA0); - drain_cover_vars->unk9C = fast_add_rotations(drain_cover_vars->unk9C, drain_cover_vars->unkA4); - angle0 = fast_sin(drain_cover_vars->unk98); + drain_cover_vars->wobble_x_phase = + fast_add_rotations(drain_cover_vars->wobble_x_phase, drain_cover_vars->wobble_x_rate); + drain_cover_vars->wobble_y_phase = + fast_add_rotations(drain_cover_vars->wobble_y_phase, drain_cover_vars->wobble_y_rate); + angle0 = fast_sin(drain_cover_vars->wobble_x_phase); target0 = fast_add_rotations(vertical, angle0 * turn_scale * D_L05_00161DD8); - angle1 = fast_sin(drain_cover_vars->unk9C); + angle1 = fast_sin(drain_cover_vars->wobble_y_phase); target1 = fast_add_rotations(horizontal, angle1 * turn_scale * D_L05_00161DD8); rate0 = drain_cover_tilt_acceleration_gp * speed_scale * 0.017453292f * frame_time_sq; @@ -523,7 +525,7 @@ void update_drain_cover_tilt(char *moby, float turn_scale, float speed_scale) { &MOBY(moby)->rot.x, target0, &drain_cover_vars->tilt_x_velocity, rate0, rate1, limit); approach_angle(&MOBY(moby)->rot.y, target1, - &drain_cover_vars->unk94, + &drain_cover_vars->tilt_y_velocity, drain_cover_tilt_acceleration_gp * speed_scale * 0.017453292f * frame_time_sq, drain_cover_tilt_deceleration_gp * speed_scale * 0.017453292f * frame_time_sq, drain_cover_tilt_max_speed_gp * 0.017453292f * frame_time); diff --git a/src/overlays/l05/mobys/electric_gate.c b/src/overlays/l05/mobys/electric_gate.c index 0a14725196..ed09361d92 100644 --- a/src/overlays/l05/mobys/electric_gate.c +++ b/src/overlays/l05/mobys/electric_gate.c @@ -23,7 +23,7 @@ void electric_gate_update(char *m) __asm__("FUN_L05_0030dc68"); typedef struct ElectricGateVars { u8 pad_0[0x4]; - s32 *unk4; + s32 *voice; /* voice slot shared by the gates, -1: none */ } ElectricGateVars; /* Moby class 838 */ @@ -47,7 +47,7 @@ void electric_gate_update(char *gate_moby) { MOBY(gate_moby)->flags |= 1; MOBY(gate_moby)->state = ELECTRIC_GATE_WAIT_FOR_TRIGGER; MOBY(gate_moby)->visible = 0; - *electric_gate_vars->unk4 = -1; + *electric_gate_vars->voice = -1; break; case ELECTRIC_GATE_WAIT_FOR_TRIGGER: if (*(int *)&electric_gate_beam_callback_frame_gp != D_L05_0015F5CC_e[2]) { @@ -57,7 +57,7 @@ void electric_gate_update(char *gate_moby) { gate_position = gate_moby + 0x10; tab = D_L05_001671C0; if (fast_vec_dist(gate_position, tab) < 64.0f) { - voice_slot_index = *electric_gate_vars->unk4; + voice_slot_index = *electric_gate_vars->voice; if (voice_slot_index >= 0) { voice_pool_base = D_0013E550; voice_owner = *(char **)(voice_pool_base + voice_slot_index * 0x70 + 0x88); @@ -71,16 +71,16 @@ void electric_gate_update(char *gate_moby) { goto after; } voice_position_base = voice_pool_base + 0x90; - *(char **)(voice_pool_base + *electric_gate_vars->unk4 * 0x70 + 0x88) = + *(char **)(voice_pool_base + *electric_gate_vars->voice * 0x70 + 0x88) = gate_moby; - qcopy(*electric_gate_vars->unk4 * 0x70 + voice_position_base, + qcopy(*electric_gate_vars->voice * 0x70 + voice_position_base, gate_position); } goto after; } } } - *electric_gate_vars->unk4 = allocate_voice_for_target_entry(0, 4, gate_moby); + *electric_gate_vars->voice = allocate_voice_for_target_entry(0, 4, gate_moby); } after: if (*(int *)electric_gate_vars >= 0) { diff --git a/src/overlays/l05/mobys/extermibot.c b/src/overlays/l05/mobys/extermibot.c index 65ba1477f3..6ff920a6a1 100644 --- a/src/overlays/l05/mobys/extermibot.c +++ b/src/overlays/l05/mobys/extermibot.c @@ -10,6 +10,7 @@ #include "rnc/overlay/shared/mobys/build_symmetric_adjacency_masks.h" #include "qcopy.h" #include "rnc/overlay/shared/mobys/knockback_motion.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" enum { EXTERMIBOT_INITIALIZE = 0, @@ -49,7 +50,6 @@ extern float approach_angle(float *, float *, float, float, float, float) __asm__("FUN_L00_0025be00"); extern int move_moby_with_ground_and_collision_checks( void *, void *, void *, void *, float) __asm__("FUN_L00_00258b50"); -extern void FUN_L01_0026d930(char *p); /* Extermibot update: wakes from its dormant pose, walks its path, closes in on the target and strikes it, bursts into sparks between strikes, and dies on a hit. */ /* Ported from rac1-decomp (src/overlays/l05_rilgar/vendor_002D28D0.c: func_L05_003033A0), where it is exact; names translated to the US level program. */ @@ -100,53 +100,47 @@ extern char extermibot_strike_flags_selector[] __asm__("D_001404A8"); void extermibot_update(unsigned char *m) __asm__("FUN_L05_00301f48"); typedef struct ExtermibotVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 unk29; - u8 pad_2A[0x6]; - f32 unk30; - u8 pad_34[0x24]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x15]; - u8 motion; - u8 pad_71[0x5F]; - s32 move; - u8 pad_D4[0x4]; - f32 unkD8; - f32 unkDC; - u8 pad_E0[0x14]; - f32 speed; - u8 pad_F8[0x68]; - struct Moby *target; - s32 mode; - u8 pad_168[0x8]; - u8 manipulator; - u8 pad_171[0xFF]; - u8 unk270; - u8 pad_271[0xF]; - f32 goal[4]; - f32 yaw_vel; - f32 unk294; - f32 path_heading_offset_degrees; - u8 pad_29C[0x10]; - s32 unk2AC; - s32 target_pursuit_timer; - s32 hide_below_start_on_init; - s32 activation_moby_index; - s32 activation_clip_volume_index; - s32 path; - s32 path_pos; - u8 pad_2C8[0x8]; - s16 unk2D0; - s16 wander_elapsed_frames; - u8 pad_2D4[0x4]; - f32 glow_phase_angle; - s32 temporary_flags_applied; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 unk29; + u8 pad_2A[0x6]; + f32 unk30; + u8 pad_34[0x24]; + u8 unk58; + u8 pad_59[0x1]; + u8 unk5A; + u8 pad_5B[0x15]; + struct KnockbackMotion motion; + struct GroundMoveControl move; + u8 pad_120[0x40]; + struct Moby *target; + s32 mode; + u8 pad_168[0x8]; + u8 manipulator; + u8 pad_171[0xFF]; + u8 home_position; + u8 pad_271[0xF]; + f32 goal[4]; + f32 yaw_vel; + f32 path_heading_offset; + f32 path_heading_offset_degrees; + u8 pad_29C[0x10]; + s32 unk2AC; + s32 target_pursuit_timer; + s32 hide_below_start_on_init; + s32 activation_moby_index; + s32 activation_clip_volume_index; + s32 path; + s32 path_pos; + u8 pad_2C8[0x8]; + s16 strike_delay_timer; + s16 wander_elapsed_frames; + u8 pad_2D4[0x4]; + f32 glow_phase_angle; + s32 temporary_flags_applied; } ExtermibotVars; /* Moby class 623 */ @@ -183,7 +177,7 @@ void extermibot_update(unsigned char *moby) { switch (MOBY(moby)->state) { case EXTERMIBOT_INITIALIZE: MOBY(moby)->flags |= 0x1000; - qcopy(&moby_data->unk270, moby + 0x10); + qcopy(&moby_data->home_position, moby + 0x10); moby_data->health = 2.0f; moby_data->unk29 = 0; moby_data->target_pursuit_timer = 0; @@ -192,16 +186,16 @@ void extermibot_update(unsigned char *moby) { moby_data->max_health = 2; moby_data->unk58 = truncate_float_to_s32(14.0f); moby_data->unk5A = truncate_float_to_s32(11.2f); - FUN_L01_0026d930(&moby_data->move); + init_ground_move_control(&moby_data->move); { float movement_scale = D_L05_00161A98; - moby_data->unkDC = 2.0f; - moby_data->unkD8 = 2.0f; + moby_data->move.max_climb = 2.0f; + moby_data->move.max_drop = 2.0f; { int quantized_movement_scale = truncate_float_to_s32(movement_scale * 409.6f); float initial_movement_speed = D_0015ED6C * 6.0f; - moby_data->move = quantized_movement_scale; - moby_data->speed = initial_movement_speed; + moby_data->move.collision_radius_1024ths = quantized_movement_scale; + moby_data->move.max_speed = initial_movement_speed; } } moby_data->glow_phase_angle = random_angle_radians(); @@ -242,7 +236,8 @@ void extermibot_update(unsigned char *moby) { moby_data->path_heading_offset_degrees = -moby_data->path_heading_offset_degrees; } - moby_data->unk294 = moby_data->path_heading_offset_degrees * 0.017453292f; + moby_data->path_heading_offset = + moby_data->path_heading_offset_degrees * 0.017453292f; moby_data->unk2AC = scale_game_frames((int)random_float_between(30.0f, 90.0f)); MOBY(moby)->state = EXTERMIBOT_FOLLOW_TARGET; if (MOBY(moby)->prev_seq != 1) @@ -260,7 +255,7 @@ void extermibot_update(unsigned char *moby) { if (MOBY(moby)->visible != 0 && (random_integer_below(0xFF) & 1)) { FUN_L00_00257d78(moby_data->goal, 0.0f, 4.0f); moby_data->goal[2] = 0.0f; - fast_vec_add(moby_data->goal, moby_data->goal, &moby_data->unk270); + fast_vec_add(moby_data->goal, moby_data->goal, &moby_data->home_position); moby_data->wander_elapsed_frames = 0; MOBY(moby)->command = MOBY(moby)->state; MOBY(moby)->state = EXTERMIBOT_WANDER_NEAR_START; @@ -311,7 +306,7 @@ void extermibot_update(unsigned char *moby) { int near; moby_yaw_ptr = (float *)&MOBY(moby)->rot.z; moby_position = moby + 0x10; - approach_value(&moby_data->speed, D_0015ED6C * 6.0f, D_0015ED70 * 6.0f); + approach_value(&moby_data->move.max_speed, D_0015ED6C * 6.0f, D_0015ED70 * 6.0f); yaw = fast_arc_tan(MOBY(target_moby)->pos.x - MOBY(moby)->pos.x, MOBY(target_moby)->pos.y - MOBY(moby)->pos.y); approach_angle(moby_yaw_ptr, @@ -348,7 +343,8 @@ void extermibot_update(unsigned char *moby) { } else if (moby_data->target_pursuit_timer != 0) { if (vector_distance_xy(moby_position, target_moby + 0x10) < 3.0f) { MOBY(moby)->state = EXTERMIBOT_AIM_BEFORE_STRIKE; - moby_data->unk2D0 = scale_game_frames(extermibot_pre_strike_delay_frames_gp); + moby_data->strike_delay_timer = + scale_game_frames(extermibot_pre_strike_delay_frames_gp); if (MOBY(moby)->prev_seq != 2) blend_moby_animation(moby, 2, 0, scale_game_frames(10)); } @@ -359,13 +355,14 @@ void extermibot_update(unsigned char *moby) { } case EXTERMIBOT_WAIT_FOR_TARGET_IN_STRIKE_RANGE: if (moby_data->target_pursuit_timer == 0) { - moby_data->speed = 0.0f; + moby_data->move.max_speed = 0.0f; MOBY(moby)->state = EXTERMIBOT_RETURN_TO_START; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(20)); } else if (vector_distance_xy(moby + 0x10, target_moby + 0x10) < 3.0f) { MOBY(moby)->state = EXTERMIBOT_AIM_BEFORE_STRIKE; - moby_data->unk2D0 = scale_game_frames(extermibot_pre_strike_delay_frames_gp); + moby_data->strike_delay_timer = + scale_game_frames(extermibot_pre_strike_delay_frames_gp); if (MOBY(moby)->prev_seq != 2) blend_moby_animation(moby, 2, 0, scale_game_frames(10)); } @@ -384,7 +381,7 @@ void extermibot_update(unsigned char *moby) { if (random_integer_below(0xFF) & 1) { FUN_L00_00257d78(moby_data->goal, 0.0f, 4.0f); moby_data->goal[2] = 0.0f; - fast_vec_add(moby_data->goal, moby_data->goal, &moby_data->unk270); + fast_vec_add(moby_data->goal, moby_data->goal, &moby_data->home_position); moby_data->wander_elapsed_frames = scale_game_frames(0x5A); MOBY(moby)->command = MOBY(moby)->state; MOBY(moby)->state = EXTERMIBOT_WANDER_NEAR_START; @@ -397,14 +394,16 @@ void extermibot_update(unsigned char *moby) { break; case EXTERMIBOT_FOLLOW_TARGET: { float target_distance_xy = vector_distance_xy(moby + 0x10, target_moby + 0x10); - FUN_L05_00303b08_c((struct Moby *)moby, (s32)(target_moby + 0x10), moby_data->unk294); + FUN_L05_00303b08_c( + (struct Moby *)moby, (s32)(target_moby + 0x10), moby_data->path_heading_offset); if (target_distance_xy < 3.0f && fast_difference_between_rotations( MOBY(moby)->rot.z, fast_arc_tan(MOBY(target_moby)->pos.x - MOBY(moby)->pos.x, MOBY(target_moby)->pos.y - MOBY(moby)->pos.y)) < 0.7853982f) { MOBY(moby)->state = EXTERMIBOT_AIM_BEFORE_STRIKE; - moby_data->unk2D0 = scale_game_frames(extermibot_pre_strike_delay_frames_gp); + moby_data->strike_delay_timer = + scale_game_frames(extermibot_pre_strike_delay_frames_gp); if (MOBY(moby)->prev_seq != 2) blend_moby_animation(moby, 2, 0, scale_game_frames(10)); } @@ -426,10 +425,10 @@ void extermibot_update(unsigned char *moby) { if ((MOBY(moby)->anim_flags & 2) && MOBY(moby)->prev_seq == 2) { blend_moby_animation(moby, 7, 0, scale_game_frames(5)); } - if (fast_dec_timer_s16(&moby_data->unk2D0) != 0) { + if (fast_dec_timer_s16(&moby_data->strike_delay_timer) != 0) { float a; MOBY(moby)->state = EXTERMIBOT_STRIKE_TARGET; - moby_data->unk2D0 = 0; + moby_data->strike_delay_timer = 0; if (MOBY(moby)->prev_seq != 3) blend_moby_animation(moby, 3, 0, scale_game_frames(1)); a = fast_add_rotations(MOBY(moby)->rot.z, 0.0f); @@ -549,11 +548,12 @@ void extermibot_update(unsigned char *moby) { fast_arc_tan(MOBY(target_moby)->pos.x - MOBY(moby)->pos.x, MOBY(target_moby)->pos.y - MOBY(moby)->pos.y)) < 0.2617994f) { MOBY(moby)->state = EXTERMIBOT_AIM_BEFORE_STRIKE; - moby_data->unk2D0 = scale_game_frames(extermibot_pre_strike_delay_frames_gp); + moby_data->strike_delay_timer = + scale_game_frames(extermibot_pre_strike_delay_frames_gp); if (MOBY(moby)->prev_seq != 7) blend_moby_animation(moby, 7, 0, scale_game_frames(5)); } else { - moby_data->speed = 0.0f; + moby_data->move.max_speed = 0.0f; MOBY(moby)->state = EXTERMIBOT_FOLLOW_TARGET; if (MOBY(moby)->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); @@ -561,8 +561,8 @@ void extermibot_update(unsigned char *moby) { } break; case EXTERMIBOT_RETURN_TO_START: - FUN_L05_00303b08_c((struct Moby *)moby, (s32)(&moby_data->unk270), 0.0f); - if (vector_distance_xy(moby + 0x10, &moby_data->unk270) < 1.0f) { + FUN_L05_00303b08_c((struct Moby *)moby, (s32)(&moby_data->home_position), 0.0f); + if (vector_distance_xy(moby + 0x10, &moby_data->home_position) < 1.0f) { MOBY(moby)->state = EXTERMIBOT_IDLE_AND_CHECK_TARGET_PATH; if (MOBY(moby)->prev_seq != 0) blend_moby_animation(moby, 0, 0, scale_game_frames(3)); @@ -580,7 +580,7 @@ void extermibot_update(unsigned char *moby) { 1, moby_data->path_pos, moby + 0x10, - (s32)(&moby_data->unk270), + (s32)(&moby_data->home_position), path_goal_or_facing_vector, (D_L05_00161A98) * 0.4f) != 0) { MOBY(moby)->state = EXTERMIBOT_FOLLOW_TARGET; @@ -1054,7 +1054,7 @@ int test_extermibot_offset_path_clearance(char *moby, float *goal, float probe_o ExtermibotVars *moby_data = (ExtermibotVars *)MOBY(moby)->pvars; float probe_heading; probe_heading = fast_arc_tan(goal[0] - MOBY(moby)->pos.x, goal[1] - MOBY(moby)->pos.y); - probe_heading = fast_add_rotations(probe_heading, moby_data->unk294 * 1.5f); + probe_heading = fast_add_rotations(probe_heading, moby_data->path_heading_offset * 1.5f); probe_position[0] = FUN_001f9dc8_c(probe_heading) * fast_vec_dist(goal, (float *)&MOBY(moby)->pos); probe_position[1] = diff --git a/src/overlays/l05/mobys/extermitank.c b/src/overlays/l05/mobys/extermitank.c index 971a1f962c..caa73f8a75 100644 --- a/src/overlays/l05/mobys/extermitank.c +++ b/src/overlays/l05/mobys/extermitank.c @@ -1,5 +1,7 @@ /* Level 05 moby class extermitank. */ #include "types.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/world/level_path.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -28,7 +30,6 @@ extern float scale_time(float) __asm__("FUN_001f96b0"); extern float fast_cos(float); extern float fast_sin(float); float absolute_float(float input) __asm__("func_001F99C0"); -extern void FUN_L01_0026d930(char *p); extern char D_L05_001671C0[]; extern float fast_vec_dist(void *, void *); extern void FUN_L00_0024f7c8(void *, int, void *); @@ -97,64 +98,52 @@ typedef char *(*Spawn_305778)(void *, void *, void *, int, int, long, long, long void extermitank_update(unsigned char *m) __asm__("FUN_L05_00304320"); typedef struct ExtermitankVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 unk29; - u8 pad_2A[0x4]; - u8 lifecycle_state; - u8 pad_2F[0x9]; - s32 retimer; - u8 pad_3C[0x2]; - u16 unk3E; - f32 velocity[4]; - u8 pad_50[0x8]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x5]; - f32 motion[4]; - s32 mover; - u8 pad_74[0x4]; - f32 unk78; - f32 unk7C; - u8 pad_80[0x4]; - f32 child_animation_speed_bias; - u8 pad_88[0xC]; - f32 unk94; - u8 pad_98[0x14]; - f32 unkAC; - f32 unkB0; - f32 unkB4; - u8 pad_B8[0x8]; - s32 path_point; - u8 pad_C4[0xC]; - char *path; - s32 path_index; - u8 pad_D8[0x18]; - u8 manipulator0; - u8 pad_F1[0xF]; - f32 manipulator0_rotation[4]; - u8 pad_110[0x20]; - u8 manipulator1; - u8 pad_131[0xF]; - f32 manipulator1_rotation[4]; - u8 pad_150[0x24]; - f32 firing_range_xy; - s32 firing_range_timer; - u8 pad_17C[0x4]; - s32 unk180; - char *tread_moby0; - char *tread_moby1; - u8 pad_18C[0x4]; - s32 path_190; - f32 turret_yaw; - f32 turret_pitch; - u8 pad_19C[0x2]; - s16 removal_scaled_frames; - f32 particle_slots[4]; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 unk29; + u8 pad_2A[0x4]; + u8 lifecycle_state; + u8 pad_2F[0x9]; + s32 retimer; + u8 pad_3C[0x2]; + u16 unk3E; + f32 velocity[4]; + u8 pad_50[0x8]; + u8 unk58; + u8 pad_59[0x1]; + u8 unk5A; + u8 pad_5B[0x5]; + struct HitColorFlash hit_flash; + struct GroundMoveControl mover; + s32 path_point; + u8 pad_C4[0xC]; + char *path; + s32 path_index; + u8 pad_D8[0x18]; + u8 manipulator0; + u8 pad_F1[0xF]; + f32 manipulator0_rotation[4]; + u8 pad_110[0x20]; + u8 manipulator1; + u8 pad_131[0xF]; + f32 manipulator1_rotation[4]; + u8 pad_150[0x24]; + f32 firing_range_xy; + s32 firing_range_timer; + u8 pad_17C[0x4]; + s32 unk180; + char *tread_moby0; + char *tread_moby1; + u8 pad_18C[0x4]; + s32 path_190; + f32 turret_yaw; + f32 turret_pitch; + u8 pad_19C[0x2]; + s16 removal_scaled_frames; + f32 particle_slots[4]; } ExtermitankVars; /* Moby class 625 */ @@ -222,20 +211,20 @@ void extermitank_update(unsigned char *moby) { MOBY(moby)->flags |= 0x1000; g = ((char *)&D_0013F350); MOBY(moby)->spawn_frame = *(long *)(*(char **)(g + 0x2080) + 0x38); - FUN_L01_0026d930(&extermitank_vars->mover); - extermitank_vars->unk7C = 2.0f; - extermitank_vars->unk78 = 4.0f; - extermitank_vars->mover = 0x38D; - extermitank_vars->unkAC = 0.01f; - extermitank_vars->unkB0 = 0.3f; - extermitank_vars->unkB4 = 0.1f; + init_ground_move_control(&extermitank_vars->mover); + extermitank_vars->mover.max_climb = 2.0f; + extermitank_vars->mover.max_drop = 4.0f; + extermitank_vars->mover.collision_radius_1024ths = 0x38D; + extermitank_vars->mover.turn_spring = 0.01f; + extermitank_vars->mover.turn_damping = 0.3f; + extermitank_vars->mover.max_turn_step = 0.1f; extermitank_vars->path = ((char *)l05_paths[extermitank_vars->path_index]); extermitank_vars->path_point = 1; qcopy(moby + 0x10, extermitank_vars->path + 0x10); MOBY(moby)->state = EXTERMITANK_FOLLOW_PATH; if (MOBY(moby)->prev_seq != 0) blend_moby_animation(moby, 0, 0, 0); - extermitank_vars->unk94 = D_L05_00161AF8 * D_0015ED6C_gp; + extermitank_vars->mover.max_speed = D_L05_00161AF8 * D_0015ED6C_gp; clear_u64_value(extermitank_vars->velocity); extermitank_vars->unk3E |= 2; extermitank_vars->lifecycle_state = 1; @@ -743,7 +732,7 @@ void handle_extermitank_hits_and_sync_children(char *moby) { } } update_motion: - start_hit_color_flash(moby, extermitank_hit_sync_vars->motion); + start_hit_color_flash(moby, &extermitank_hit_sync_vars->hit_flash); mark_children: ((unsigned char *)moby)[0xa4] = 0xff; if (extermitank_hit_sync_vars->tread_moby0 != 0) @@ -772,7 +761,7 @@ void handle_extermitank_hits_and_sync_children(char *moby) { offset_scale = extermitank_child_animation_speed_offset_scale_gp; *(float *)(extermitank_hit_sync_vars->tread_moby0 + 0x58) = speed; *(float *)(extermitank_hit_sync_vars->tread_moby0 + 0x58) += - extermitank_hit_sync_vars->child_animation_speed_bias * offset_scale; + extermitank_hit_sync_vars->mover.turn_velocity * offset_scale; first = extermitank_hit_sync_vars->tread_moby0; qcopy(first + 0x40, moby + 0x40); qcopy(first + 0x10, moby + 0x10); @@ -785,12 +774,12 @@ void handle_extermitank_hits_and_sync_children(char *moby) { offset_scale = extermitank_child_animation_speed_offset_scale_gp; *(float *)(extermitank_hit_sync_vars->tread_moby1 + 0x58) = speed; *(float *)(extermitank_hit_sync_vars->tread_moby1 + 0x58) -= - extermitank_hit_sync_vars->child_animation_speed_bias * offset_scale; + extermitank_hit_sync_vars->mover.turn_velocity * offset_scale; second = extermitank_hit_sync_vars->tread_moby1; qcopy(second + 0x40, moby + 0x40); qcopy(second + 0x10, moby + 0x10); } - update_hit_color_flash(moby, extermitank_hit_sync_vars->motion); + update_hit_color_flash(moby, &extermitank_hit_sync_vars->hit_flash); } /* Drops stale entries from the moby's 8 slots, then pushes each remaining one away from the hero. */ /* Ported from rac1-decomp (src/overlays/l05_rilgar/vendor_002D28D0.c: func_L05_00306CF0), where it is exact; names translated to the US level program. */ diff --git a/src/overlays/l05/mobys/floating_platform.c b/src/overlays/l05/mobys/floating_platform.c index 25a99e95fc..7dfb22142b 100644 --- a/src/overlays/l05/mobys/floating_platform.c +++ b/src/overlays/l05/mobys/floating_platform.c @@ -31,11 +31,11 @@ void floating_platform_update(unsigned char *moby) __asm__("FUN_L05_0030bd typedef struct FloatingPlatformVars { u8 pad_0[0x20]; - f32 unk20[4]; + f32 carry[4]; /* carried-object state for update_entity_matrix */ u8 pad_30[0x30]; - f32 unk60; + f32 rotation_y_phase; u8 pad_64[0x8]; - f32 unk6C; + f32 rotation_x_phase; u8 pad_70[0x8]; s32 timer_78; } FloatingPlatformVars; @@ -60,8 +60,8 @@ void floating_platform_update(unsigned char *moby) { floating_platform_vars->timer_78 = truncate_float_to_s32( scale_time(random_float_between((float)floating_platform_voice_interval_min_gp, (float)floating_platform_voice_interval_max_gp))); - floating_platform_vars->unk60 = random_angle_radians(); - floating_platform_vars->unk6C = random_angle_radians(); + floating_platform_vars->rotation_y_phase = random_angle_radians(); + floating_platform_vars->rotation_x_phase = random_angle_radians(); MOBY(moby)->state = FLOATING_PLATFORM_UPDATE_ROCKING; break; case FLOATING_PLATFORM_UPDATE_ROCKING: @@ -76,19 +76,20 @@ void floating_platform_update(unsigned char *moby) { previous_rotation_ptr = previous_rotation; current_rotation = (char *)moby + 0x40; qcopy(previous_rotation_ptr, current_rotation); - rotation_y_phase = fast_add_rotations(floating_platform_vars->unk60, + rotation_y_phase = fast_add_rotations(floating_platform_vars->rotation_y_phase, floating_platform_rotation_y_phase_rate_degrees_gp * DEG_TO_RAD * frame_time); k = floating_platform_rotation_x_phase_rate_degrees_gp * DEG_TO_RAD * frame_time; - floating_platform_vars->unk60 = rotation_y_phase; - floating_platform_vars->unk6C = fast_add_rotations(floating_platform_vars->unk6C, k); + floating_platform_vars->rotation_y_phase = rotation_y_phase; + floating_platform_vars->rotation_x_phase = + fast_add_rotations(floating_platform_vars->rotation_x_phase, k); MOBY(moby)->rot.y = floating_platform_rotation_y_amplitude_degrees_gp * DEG_TO_RAD * - fast_sin(floating_platform_vars->unk60); + fast_sin(floating_platform_vars->rotation_y_phase); MOBY(moby)->rot.x = floating_platform_rotation_x_amplitude_degrees_gp * DEG_TO_RAD * - fast_sin(floating_platform_vars->unk6C); + fast_sin(floating_platform_vars->rotation_x_phase); fast_vec_sub(position_delta, position, previous_position); update_entity_matrix( - floating_platform_vars->unk20, position_delta, previous_rotation_ptr, current_rotation); + floating_platform_vars->carry, position_delta, previous_rotation_ptr, current_rotation); break; } } diff --git a/src/overlays/l05/mobys/fog_zone.c b/src/overlays/l05/mobys/fog_zone.c index 9e9050ca8e..904605e855 100644 --- a/src/overlays/l05/mobys/fog_zone.c +++ b/src/overlays/l05/mobys/fog_zone.c @@ -46,9 +46,9 @@ typedef struct FogZoneVars { u8 pad_26[0x2]; s32 clip_volume_28; s32 clip_volume_2C; - s32 unk30; - s32 unk34; - s32 unk38; + s32 saved_blend_color; + s32 fog_color; + s32 fog_volume; /* the colour tweens from saved_blend_color to fog_color inside it */ } FogZoneVars; /* Moby class 841 */ @@ -92,8 +92,8 @@ void fog_zone_update(struct Moby *moby) { (l05_volume_blended_color_lower_middle_byte << 8) + (l05_volume_blended_color_upper_middle_byte << 16) + (l05_volume_blended_color_high_byte << 24); - fog_zone_vars->unk34 = 0x40408070; - fog_zone_vars->unk30 = saved_volume_blend_color; + fog_zone_vars->fog_color = 0x40408070; + fog_zone_vars->saved_blend_color = saved_volume_blend_color; } moby->state = FOG_ZONE_WAIT_TO_APPLY_PRESET; break; @@ -135,16 +135,17 @@ void fog_zone_update(struct Moby *moby) { break; } hero_position = (char *)&hero.motion.pos; - if (is_point_inside_clip_volume(hero_position, fog_zone_vars->unk38)) { + if (is_point_inside_clip_volume(hero_position, fog_zone_vars->fog_volume)) { int c; - fast_vec_sub( - hero_offset_from_volume_origin, hero_position, &l05_cuboids[fog_zone_vars->unk38].pos); + fast_vec_sub(hero_offset_from_volume_origin, + hero_position, + &l05_cuboids[fog_zone_vars->fog_volume].pos); hero_offset_from_volume_origin[3] = 0.0f; transform_vector_by_basis(hero_position_in_volume_space, hero_offset_from_volume_origin, - l05_cuboids[fog_zone_vars->unk38].to_local); - c = fast_tween_color(fog_zone_vars->unk30, - fog_zone_vars->unk34, + l05_cuboids[fog_zone_vars->fog_volume].to_local); + c = fast_tween_color(fog_zone_vars->saved_blend_color, + fog_zone_vars->fog_color, (hero_position_in_volume_space[0] + 1.0f) * 0.5f); l05_volume_blended_color_lower_middle_byte = c >> 8; l05_volume_blended_color_upper_middle_byte = c >> 16; diff --git a/src/overlays/l05/mobys/sharkigator.c b/src/overlays/l05/mobys/sharkigator.c index 46eaf270d2..b14a699efa 100644 --- a/src/overlays/l05/mobys/sharkigator.c +++ b/src/overlays/l05/mobys/sharkigator.c @@ -42,11 +42,11 @@ typedef struct SharkigatorVars { u8 pad_0[0x60]; s32 path_60; s32 start_in_leap_wait; - s32 unk68; + s32 target_point; s32 timer_6C; - f32 unk70; - f32 unk74; - f32 unk78; + f32 turn_velocity; + f32 start_z; + f32 vertical_speed; s32 timer_7C; f32 unk80; } SharkigatorVars; @@ -90,7 +90,7 @@ state_zero: { MOBY(moby)->state = SHARKIGATOR_WAIT_TO_LEAP; MOBY(moby)->flags |= 1; MOBY(moby)->update_dist = 0xff; - sharkigator_instance_vars->unk74 = MOBY(moby)->pos.z; + sharkigator_instance_vars->start_z = MOBY(moby)->pos.z; sharkigator_instance_vars->timer_7C = scale_game_frames(30); return; } @@ -99,7 +99,7 @@ state_zero: { mark_moby_2d1688(moby); return; } - sharkigator_instance_vars->unk68 = random_integer_below(*(int *)l05_paths[index]); + sharkigator_instance_vars->target_point = random_integer_below(*(int *)l05_paths[index]); sharkigator_instance_vars->timer_6C = scale_game_frames(600); if (MOBY(moby)->prev_seq != 1) { set_action_2d1688(moby, 1, 0, scale_game_frames(10)); @@ -113,7 +113,8 @@ state_zero: { } state_one: { path = ((char *)l05_paths[sharkigator_instance_vars->path_60]); - qcopy(working_position_or_basis_offset, path + sharkigator_instance_vars->unk68 * 16 + 0x10); + qcopy(working_position_or_basis_offset, + path + sharkigator_instance_vars->target_point * 16 + 0x10); point = moby + 0x48; { float y = working_position_or_basis_offset[1]; @@ -124,7 +125,7 @@ state_one: { float pi = 3.1415927f; float turn_step = frame_time_sq * pi; steer_2d1688((float *)(point), - &sharkigator_instance_vars->unk70, + &sharkigator_instance_vars->turn_velocity, height, turn_step, turn_step, @@ -135,8 +136,9 @@ state_one: { height = fast_vec_dist(moby + 0x10, working_position_or_basis_offset); if (height < 3.0f || fast_dec_timer(&sharkigator_instance_vars->timer_6C) != 0) { index = random_integer_below(*(int *)l05_paths[sharkigator_instance_vars->path_60]); - sharkigator_instance_vars->unk68 = (sharkigator_instance_vars->unk68 + index) % - *(int *)l05_paths[sharkigator_instance_vars->path_60]; + sharkigator_instance_vars->target_point = + (sharkigator_instance_vars->target_point + index) % + *(int *)l05_paths[sharkigator_instance_vars->path_60]; sharkigator_instance_vars->timer_6C = scale_game_frames(600); } if ((hero.state.control_mode == HERO_MODE_WATER_SURFACE || hero.state.current == 0x12) && @@ -148,7 +150,7 @@ state_one: { } advance_accelerated_scalar((float *)&MOBY(moby)->pos.z, speed, - &sharkigator_instance_vars->unk78, + &sharkigator_instance_vars->vertical_speed, frame_time_sq + frame_time_sq, frame_time_sq + frame_time_sq, frame_time + frame_time); @@ -157,7 +159,7 @@ state_one: { state_two: { char *path; fast_dec_timer(&sharkigator_instance_vars->timer_7C); - height = absolute_float(hero.water_surface_z - sharkigator_instance_vars->unk74); + height = absolute_float(hero.water_surface_z - sharkigator_instance_vars->start_z); if (height < 0.33f && hero.state.control_mode == HERO_MODE_WATER_SURFACE) { char *point; if (sharkigator_instance_vars->timer_7C != 0) @@ -174,7 +176,7 @@ state_two: { { float speed = frame_time * 10.0f; MOBY(moby)->pos.z -= 2.0f; - sharkigator_instance_vars->unk78 = speed; + sharkigator_instance_vars->vertical_speed = speed; } MOBY(moby)->flags &= 0xfffe; if (MOBY(moby)->prev_seq != state) @@ -198,7 +200,7 @@ state_three: { { struct Hero *hero_actor = &hero; if (hero_actor->water_surface_z < MOBY(moby)->pos.z || - sharkigator_instance_vars->unk78 < 0.0f) { + sharkigator_instance_vars->vertical_speed < 0.0f) { if (hero_actor->state.current != 0x72) { qcopy_nc(working_position_or_basis_offset, &hero_actor->motion.pos); { @@ -232,9 +234,9 @@ state_three: { *(moby + 0x18) load below out of the join; folds to nothing. */ moby++; moby--; - speed = sharkigator_instance_vars->unk78; + speed = sharkigator_instance_vars->vertical_speed; } else { - speed = sharkigator_instance_vars->unk78; + speed = sharkigator_instance_vars->vertical_speed; } } { @@ -242,14 +244,14 @@ state_three: { float threshold = frame_time + frame_time; MOBY(moby)->pos.z = MOBY(moby)->pos.z + speed; { - float speed = sharkigator_instance_vars->unk78 - acceleration; - sharkigator_instance_vars->unk78 = speed; + float speed = sharkigator_instance_vars->vertical_speed - acceleration; + sharkigator_instance_vars->vertical_speed = speed; if (speed < threshold) { fast_vec_normalize((l05_sharkigator_position_offset_distance), working_position_or_basis_offset, moby + 0xe0); steer_2d1688((float *)&MOBY(moby)->rot.y, - &sharkigator_instance_vars->unk70, + &sharkigator_instance_vars->turn_velocity, 1.5533431f, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, @@ -261,7 +263,7 @@ state_three: { } } } - if (sharkigator_instance_vars->unk78 < 0.0f) { + if (sharkigator_instance_vars->vertical_speed < 0.0f) { if (MOBY(moby)->pos.z < hero.water_surface_z && MOBY(moby)->command == 0) { MOBY(moby)->command = 1; allocate_voice_for_target_entry_2d1688(0, 0, moby); @@ -274,8 +276,8 @@ state_three: { spawn_sharkigator_splash_effects((int)moby, (char *)working_position_or_basis_offset); } } - if (sharkigator_instance_vars->unk78 < 0.0f && - MOBY(moby)->pos.z < sharkigator_instance_vars->unk74 - 8.0f) + if (sharkigator_instance_vars->vertical_speed < 0.0f && + MOBY(moby)->pos.z < sharkigator_instance_vars->start_z - 8.0f) hero_respawn(); if ((MOBY(moby)->anim_flags & 2) != 0 && MOBY(moby)->prev_seq != 1) set_action_2d1688(moby, 1, 0, scale_game_frames(10)); diff --git a/src/overlays/l05/mobys/skid_mcmarx.c b/src/overlays/l05/mobys/skid_mcmarx.c index 4b0aa88517..c1beb6f1d6 100644 --- a/src/overlays/l05/mobys/skid_mcmarx.c +++ b/src/overlays/l05/mobys/skid_mcmarx.c @@ -148,7 +148,7 @@ typedef struct SkidMcmarxVars { f32 jump_target_node[4]; s32 path_220; u8 pad_224[0x20]; - char *unk244; + char *active_path; /* path being followed (path_220 or a branch) */ u8 pad_248[0x4]; f32 racer_vertical_speed; u8 pad_250[0x8]; @@ -161,7 +161,7 @@ typedef struct SkidMcmarxVars { void start_racer_branch_jump(char *moby) { SkidMcmarxVars *moby_data = (SkidMcmarxVars *)MOBY(moby)->pvars; - char *active_path = moby_data->unk244; + char *active_path = moby_data->active_path; int path_node_index; int path_node_byte_offset; if (active_path != ((char *)l05_paths[moby_data->path_220])) { @@ -171,11 +171,12 @@ void start_racer_branch_jump(char *moby) { if (*(float *)(active_path + path_node_byte_offset + 0x1C) == 1.0f) { while (*(float *)(active_path + path_node_byte_offset + 0x1C) != 2.0f) { path_node_index = offset_path_index(active_path, path_node_index, 1, 1); - active_path = moby_data->unk244; + active_path = moby_data->active_path; path_node_byte_offset = path_node_index * 16; } moby_data->jump_landing_node_index = path_node_index; - qcopy(moby_data->jump_target_node, moby_data->unk244 + path_node_index * 16 + 0x10); + qcopy(moby_data->jump_target_node, + moby_data->active_path + path_node_index * 16 + 0x10); moby_data->jump_elapsed_frames = 1; } } diff --git a/src/overlays/l05/mobys/taxi.c b/src/overlays/l05/mobys/taxi.c index be601f5f2d..263c92cad8 100644 --- a/src/overlays/l05/mobys/taxi.c +++ b/src/overlays/l05/mobys/taxi.c @@ -37,7 +37,7 @@ void taxi_update(struct Moby *moby) __asm__("FUN_L05_00318c78"); typedef struct TaxiVars { u8 pad_0[0x20]; - u8 unk20; + u8 carry; /* carried-object state for update_entity_matrix (FUN_L00_00260738) */ u8 pad_21[0x3F]; f32 pose_position[4]; f32 pose_rotation[4]; @@ -54,7 +54,7 @@ typedef struct TaxiVars { s16 stop_index; s16 destination_stop; s32 branch_mission; - s32 unkBC; + s32 second_mission; /* checked with branch_mission */ f32 blend_t; s32 blend_speed; u8 pad_C8[0xC]; @@ -210,7 +210,7 @@ void taxi_update(struct Moby *moby) { break; case TAXI_WAIT_FOR_ACTIVATION: if (D_0014C050[current_level_index][taxi_data->branch_mission] == 0xFF || - D_0014C050[current_level_index][taxi_data->unkBC] == 0xFF) { + D_0014C050[current_level_index][taxi_data->second_mission] == 0xFF) { char *model = moby->pclass; unsigned short flags = moby->flags; int class_collision = *(int *)(model + 0x10); @@ -242,7 +242,7 @@ void taxi_update(struct Moby *moby) { taxi_data->voice = -1; } fast_vec_sub(position_delta, &moby->pos, old_position); - FUN_L00_00260738(&taxi_data->unk20, position_delta, old_rotation, &moby->rot); + FUN_L00_00260738(&taxi_data->carry, position_delta, old_rotation, &moby->rot); } /* Taxi stop selection shared by route helpers. */ @@ -271,7 +271,7 @@ void initialize_taxi_stop_state(void *moby_v) { case TAXI_BRANCHING_STOP: { int k = current_level_index << 4; if (visited52[taxi_stop_vars->branch_mission + k] != 0xFF && - visited52[taxi_stop_vars->unkBC + k] != 0xFF) { + visited52[taxi_stop_vars->second_mission + k] != 0xFF) { moby[0x20] = 6; MOBY(moby)->flags = MOBY(moby)->flags | 1; moby[0x31] = 0; diff --git a/src/overlays/l05/mobys/triggered_motion.c b/src/overlays/l05/mobys/triggered_motion.c index f08b392ce0..c625faebd5 100644 --- a/src/overlays/l05/mobys/triggered_motion.c +++ b/src/overlays/l05/mobys/triggered_motion.c @@ -24,13 +24,13 @@ typedef struct TriggeredMotionVars { u8 pad_0[0x10]; u8 manipulator_10; u8 pad_11[0xF]; - u8 unk20; + u8 manipulator_quat; u8 pad_21[0x2F]; - s32 unk50; - s32 unk54; - s32 unk58; - f32 unk5C; - f32 unk60; + s32 upside_down; /* nonzero: rot.x = pi and raised by 4 */ + s32 starts_open; /* nonzero: starts shifted and waits to return */ + s32 trigger_moby; /* moby index whose command byte triggers it */ + f32 move_speed; + f32 manipulator_angle; f32 manipulator_angular_velocity; } TriggeredMotionVars; @@ -55,31 +55,32 @@ void triggered_motion_update(char *moby) { switch (MOBY(moby)->state) { case MOBY_INITIALIZE: - if (motion_and_manipulator_vars->unk50 != 0) { + if (motion_and_manipulator_vars->upside_down != 0) { MOBY(moby)->rot.x = 3.1415927f; MOBY(moby)->pos.z += 4.0f; } qcopy(motion_and_manipulator_vars, moby + 0x10); attach_manipulator(moby, 0, &motion_and_manipulator_vars->manipulator_10); - if (motion_and_manipulator_vars->unk54 != 0) { - motion_and_manipulator_vars->unk60 = 0.0f; + if (motion_and_manipulator_vars->starts_open != 0) { + motion_and_manipulator_vars->manipulator_angle = 0.0f; MOBY(moby)->state = MOBY_WAIT_TO_RETURN_TO_SAVED_POSITION; - if (motion_and_manipulator_vars->unk50 != 0) + if (motion_and_manipulator_vars->upside_down != 0) fast_vec_scale(target, moby + 0xD0, 2.0f); else fast_vec_scale(target, moby + 0xD0, -2.0f); fast_vec_add(moby + 0x10, moby + 0x10, target); } else { MOBY(moby)->state = MOBY_WAIT_FOR_TRIGGER; - motion_and_manipulator_vars->unk60 = 0.5934119f; - build_axis_rotation_quaternion(&motion_and_manipulator_vars->unk20, 0, 0.5934119f); + motion_and_manipulator_vars->manipulator_angle = 0.5934119f; + build_axis_rotation_quaternion( + &motion_and_manipulator_vars->manipulator_quat, 0, 0.5934119f); } *(long long *)(moby + 0x38) = *(long long *)(D_001413D0_lui + 0x38); break; case MOBY_WAIT_FOR_TRIGGER: case MOBY_WAIT_TO_RETURN_TO_SAVED_POSITION: { u8 trigger = - ((u8 *)*(int *)&D_L05_0015FFD8)[motion_and_manipulator_vars->unk58 * 256 + 0xBC]; + ((u8 *)*(int *)&D_L05_0015FFD8)[motion_and_manipulator_vars->trigger_moby * 256 + 0xBC]; if (trigger == 0) return; if (MOBY(moby)->state == MOBY_WAIT_TO_RETURN_TO_SAVED_POSITION && trigger != 2) { @@ -103,30 +104,31 @@ void triggered_motion_update(char *moby) { end = 0.0f; approach = -0.5934119f; } - approach_angle(&motion_and_manipulator_vars->unk60, + approach_angle(&motion_and_manipulator_vars->manipulator_angle, &motion_and_manipulator_vars->manipulator_angular_velocity, approach, frame_time_sq * 4.1887903f, frame_time_sq * 4.1887903f, frame_time * 12.566371f); - if (motion_and_manipulator_vars->unk60 > 0.5934119f || - motion_and_manipulator_vars->unk60 < 0.0f) { - if (motion_and_manipulator_vars->unk60 > 0.5934119f) - motion_and_manipulator_vars->unk60 = 0.5934119f; - else if (motion_and_manipulator_vars->unk60 < 0.0f) - motion_and_manipulator_vars->unk60 = 0.0f; + if (motion_and_manipulator_vars->manipulator_angle > 0.5934119f || + motion_and_manipulator_vars->manipulator_angle < 0.0f) { + if (motion_and_manipulator_vars->manipulator_angle > 0.5934119f) + motion_and_manipulator_vars->manipulator_angle = 0.5934119f; + else if (motion_and_manipulator_vars->manipulator_angle < 0.0f) + motion_and_manipulator_vars->manipulator_angle = 0.0f; if (MOBY(moby)->command == 0) { MOBY(moby)->command = 1; motion_and_manipulator_vars->manipulator_angular_velocity *= -0.33f; - } else if (motion_and_manipulator_vars->unk60 == end) { + } else if (motion_and_manipulator_vars->manipulator_angle == end) { if (MOBY(moby)->state == MOBY_SETTLE_AT_UPPER_MANIPULATOR_ANGLE) MOBY(moby)->state = MOBY_MOTION_SEQUENCE_COMPLETE; else MOBY(moby)->state = MOBY_MOVE_TO_OFFSET_POSITION; } } - build_axis_rotation_quaternion( - &motion_and_manipulator_vars->unk20, 0, motion_and_manipulator_vars->unk60); + build_axis_rotation_quaternion(&motion_and_manipulator_vars->manipulator_quat, + 0, + motion_and_manipulator_vars->manipulator_angle); } break; case MOBY_MOVE_TO_OFFSET_POSITION: case MOBY_RETURN_TO_SAVED_POSITION: @@ -143,9 +145,9 @@ void triggered_motion_update(char *moby) { frame_time_sq * 12.0f, frame_time * 10.0f, &stopped, - &motion_and_manipulator_vars->unk5C); + &motion_and_manipulator_vars->move_speed); fast_vec_sub(delta, target, moby + 0x10); - fast_vec_normalize(delta, delta, motion_and_manipulator_vars->unk5C); + fast_vec_normalize(delta, delta, motion_and_manipulator_vars->move_speed); fast_vec_add(moby + 0x10, moby + 0x10, delta); if (!(fast_vec_dist(moby + 0x10, target) < 0.0001f)) return; diff --git a/src/overlays/l05/mobys/triggered_slide.c b/src/overlays/l05/mobys/triggered_slide.c index d1f088da2a..0443012e24 100644 --- a/src/overlays/l05/mobys/triggered_slide.c +++ b/src/overlays/l05/mobys/triggered_slide.c @@ -20,12 +20,12 @@ void triggered_slide_update(char *moby) __asm__("FUN_L05_0030e508"); typedef struct TriggeredSlideVars { u8 pad_0[0x8]; - f32 unk8; + f32 lower_speed; /* z of the slide velocity (pvars 0x0), reused while lowering */ u8 pad_C[0x4]; s32 cuboid_10; - s32 unk14; - f32 unk18; - s32 unk1C; + s32 trigger_moby; /* moby index whose command byte triggers it */ + f32 slide_distance; + s32 reversed; /* nonzero: offset and slide along -axes[1] */ } TriggeredSlideVars; /* Moby class 843 */ @@ -54,9 +54,10 @@ void triggered_slide_update(char *moby) { initial_pose_entry = &l05_cuboids[slide_and_lowering_vars->cuboid_10]; qcopy(moby + 0x10, &initial_pose_entry->pos); MOBY(moby)->rot.z = initial_pose_entry->rot.z; - fast_vec_normalize( - slide_motion_scratch, &initial_pose_entry->axes[1], slide_and_lowering_vars->unk18); - if (slide_and_lowering_vars->unk1C != 0) { + fast_vec_normalize(slide_motion_scratch, + &initial_pose_entry->axes[1], + slide_and_lowering_vars->slide_distance); + if (slide_and_lowering_vars->reversed != 0) { fast_vec_scale(slide_motion_scratch, slide_motion_scratch, -1.0f); MOBY(moby)->flags |= 0x8000; } @@ -65,8 +66,8 @@ void triggered_slide_update(char *moby) { break; } case MOBY_WAIT_FOR_TRIGGER: - if ((*(unsigned char **)&D_L05_0015FFD8)[slide_and_lowering_vars->unk14 * 256 + 0xBC] != - 0) { + if ((*(unsigned char **)&D_L05_0015FFD8)[slide_and_lowering_vars->trigger_moby * 256 + + 0xBC] != 0) { allocate_voice_for_target_entry(0, 0, moby); MOBY(moby)->state = MOBY_SLIDE_TO_END_POINT; clear_u64_value(slide_and_lowering_vars); @@ -74,10 +75,10 @@ void triggered_slide_update(char *moby) { break; case MOBY_SLIDE_TO_END_POINT: pose_entry = &l05_cuboids[slide_and_lowering_vars->cuboid_10]; - reach = slide_and_lowering_vars->unk18 * 3.0f; + reach = slide_and_lowering_vars->slide_distance * 3.0f; slide_step_distance = 0.0f; fast_vec_normalize(slide_motion_scratch, &pose_entry->axes[1], reach); - if (slide_and_lowering_vars->unk1C != 0) { + if (slide_and_lowering_vars->reversed != 0) { fast_vec_scale(slide_motion_scratch, slide_motion_scratch, -1.0f); } fast_vec_add(slide_motion_scratch, &pose_entry->pos, slide_motion_scratch); @@ -104,7 +105,7 @@ void triggered_slide_update(char *moby) { frame_time_sq * 40.0f, frame_time * 10.0f, (float *)&MOBY(moby)->pos.z, - &slide_and_lowering_vars->unk8); + &slide_and_lowering_vars->lower_speed); if (MOBY(moby)->pos.z < pose_entry->pos.z - 5.9f) { MOBY(moby)->state = MOBY_LOWERING_COMPLETE; } From dc47c314f54ed76dd84a7df27ccfaaf733378c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:34:47 +0000 Subject: [PATCH 085/213] decomp: name homing mine spawner, helicopter and platform fields in l12 --- src/overlays/l12/mobys/helicopter.c | 38 ++++++------- src/overlays/l12/mobys/homing_mine_spawner.c | 55 ++++++++++--------- .../l12/mobys/planetbuster_maximus_part.c | 16 +++--- src/overlays/l12/mobys/platform.c | 28 +++++----- 4 files changed, 69 insertions(+), 68 deletions(-) diff --git a/src/overlays/l12/mobys/helicopter.c b/src/overlays/l12/mobys/helicopter.c index d907221a7d..9e9d928cc9 100644 --- a/src/overlays/l12/mobys/helicopter.c +++ b/src/overlays/l12/mobys/helicopter.c @@ -52,21 +52,21 @@ void process_helicopter_hits_and_reactivation(struct Moby *moby, int flag) __asm__("FUN_L12_002ebca8"); typedef struct HelicopterVars { - u8 pad_0[0x28]; - u8 unk28; - u8 pad_29[0x1]; - u8 unk2A; - u8 unk2B; - u8 unk2C; - u8 pad_2D[0x3]; - f32 unk30; - u8 pad_34[0x2C]; - s32 unk60; - u8 pad_64[0xC]; - char *unk70; + u8 pad_0[0x28]; + u8 unk28; + u8 pad_29[0x1]; + u8 unk2A; + u8 unk2B; + u8 unk2C; + u8 pad_2D[0x3]; + f32 unk30; + u8 pad_34[0x2C]; + s32 path_node; /* path cursor (initialize_path_descriptor): node, step at +4, nodes at +0x10 */ + u8 pad_64[0xC]; + char *path_nodes; s32 path_74; u8 pad_78[0x28]; - s32 unkA0; + s32 start_node; s32 timer_A4; } HelicopterVars; @@ -157,10 +157,10 @@ void helicopter_update(char *moby) { char *tbl; int initial_node_index; int last_node_index; - initialize_path_descriptor(&moby_vars->unk60); + initialize_path_descriptor(&moby_vars->path_node); tbl = ((char *)l12_paths[moby_vars->path_74]); - moby_vars->unk70 = tbl; - initial_node_index = moby_vars->unkA0; + moby_vars->path_nodes = tbl; + initial_node_index = moby_vars->start_node; last_node_index = *(int *)tbl - 1; if (last_node_index < initial_node_index) initial_node_index = last_node_index; @@ -170,14 +170,14 @@ void helicopter_update(char *moby) { moby_vars->unk2C = 0x2C; moby_vars->unk30 = 1.4f; moby_vars->unk2B = 1; - moby_vars->unk60 = initial_node_index; + moby_vars->path_node = initial_node_index; MOBY(moby)->state = HELICOPTER_FOLLOW_PATH; MOBY(moby)->draw_dist = 0xAA; MOBY(moby)->flags |= 0x1000; } break; case HELICOPTER_FOLLOW_PATH: { - char *path_state = &moby_vars->unk60; + char *path_state = &moby_vars->path_node; int current_node_index = *(int *)path_state; char *tbl = *(char **)(path_state + 0x10); int step = *(char *)(path_state + 4); @@ -202,7 +202,7 @@ void helicopter_update(char *moby) { helicopter_rotation_smoothing_divisor_gp); if (fast_vec_dist(moby + 0x10, C) < helicopter_path_speed_gp * D_0015ED6C) { char *path; - moby_vars->unk60 = next_node_index; + moby_vars->path_node = next_node_index; path = *(char **)(path_state + 0x10); if (next_node_index == *(int *)path - 1) { qcopy((moby + 0x10), path + 0x10); diff --git a/src/overlays/l12/mobys/homing_mine_spawner.c b/src/overlays/l12/mobys/homing_mine_spawner.c index 3f3b508306..9dddc7646e 100644 --- a/src/overlays/l12/mobys/homing_mine_spawner.c +++ b/src/overlays/l12/mobys/homing_mine_spawner.c @@ -39,27 +39,26 @@ void spawn_next_linked_moby(struct Moby *m) __asm__("FUN_L12_003076e0"); typedef struct HomingMineSpawnerVars { u8 pad_0[0x38]; - s32 unk38; + s32 reset_alert; /* nonzero: restarts the 180-frame wider range */ u8 pad_3C[0x34]; - u8 unk70; + u8 target_position; /* target record of select_moby_combat_target; the hero by default */ u8 pad_71[0x7]; - f32 unk78; + f32 target_z; u8 pad_7C[0x34]; - s32 unkB0; - s32 unkB4; + s32 target_moby; + s32 target_status; u8 pad_B8[0x8]; - s32 unkC0; - u8 pad_C4[0x2C]; - s32 unkF0; - f32 unkF4; - f32 unkF8; + s32 linked_mobys[12]; /* moby indices spawned in order, -1 ends the list */ + s32 spawn_index; + f32 base_range; + f32 range; /* base_range, + 5 while timer_FE runs */ s16 timer_FC; s16 timer_FE; } HomingMineSpawnerVars; void spawn_next_linked_moby(struct Moby *spawner) { HomingMineSpawnerVars *spawner_data = (HomingMineSpawnerVars *)spawner->pvars; - int *indexed_spawner_data = (int *)((u8 *)spawner_data + (spawner_data->unkF0 << 2)); + int *indexed_spawner_data = (int *)((u8 *)spawner_data + (spawner_data->spawn_index << 2)); struct Moby *spawned_moby = (struct Moby *)((unsigned char *)D_L12_0015FFD8_p + (indexed_spawner_data[0x30] << 8)); struct MobyClass *moby_class; @@ -105,7 +104,7 @@ void homing_mine_spawner_update(struct Moby *spawner) { int *slots; int i; update_homing_mine_spawner_target(spawner); - slots = &spawner_data->unkC0; + slots = spawner_data->linked_mobys; switch (spawner->state) { case HOMING_MINE_SPAWNER_CLEAR_LINKED_MOBYS: for (i = 0; i < 12; i++) { @@ -120,8 +119,9 @@ void homing_mine_spawner_update(struct Moby *spawner) { spawner->state = HOMING_MINE_SPAWNER_WAIT_FOR_PROXIMITY; break; case HOMING_MINE_SPAWNER_WAIT_FOR_PROXIMITY: - if (spawner_data->unkB4 != 2) { - if (vector_distance_xy(&spawner->pos, &spawner_data->unk70) < spawner_data->unkF8) { + if (spawner_data->target_status != 2) { + if (vector_distance_xy(&spawner->pos, &spawner_data->target_position) < + spawner_data->range) { spawner->state = HOMING_MINE_SPAWNER_WAIT_FOR_PRESPAWN_ANIMATION; } } @@ -139,14 +139,14 @@ void homing_mine_spawner_update(struct Moby *spawner) { break; case HOMING_MINE_SPAWNER_SPAWN_LINKED_MOBYS: if (fast_dec_timer_s16(&spawner_data->timer_FC)) { - if (slots[spawner_data->unkF0] != -1) { + if (slots[spawner_data->spawn_index] != -1) { spawn_next_linked_moby(spawner); spawner->command = spawner->command == 0; spawner_data->timer_FC = scale_game_frames(0x28); } - spawner_data->unkF0 += 1; + spawner_data->spawn_index += 1; } - if (spawner_data->unkF0 == 12 || slots[spawner_data->unkF0] == -1) { + if (spawner_data->spawn_index == 12 || slots[spawner_data->spawn_index] == -1) { spawner->state = HOMING_MINE_SPAWNER_WAIT_FOR_POSTSPAWN_ANIMATION; } break; @@ -177,24 +177,25 @@ void update_homing_mine_spawner_target(struct Moby *spawner) { HomingMineSpawnerVars *spawner_data = (HomingMineSpawnerVars *)spawner->pvars; char *pad; if (spawner->state != HOMING_MINE_SPAWNER_CLEAR_LINKED_MOBYS) { - if (spawner_data->unk38 != 0) { + if (spawner_data->reset_alert != 0) { spawner_data->timer_FE = scale_game_frames(0xB4); } - spawner_data->unk38 = 0; + spawner_data->reset_alert = 0; if (fast_dec_timer_s16(&spawner_data->timer_FE)) { - spawner_data->unkF8 = spawner_data->unkF4; + spawner_data->range = spawner_data->base_range; } else { - spawner_data->unkF8 = spawner_data->unkF4 + 5.0f; + spawner_data->range = spawner_data->base_range + 5.0f; } - if (select_moby_combat_target(spawner, &spawner_data->unk70, spawner_data->unkF8) != 2) { - if (absolute_float(spawner->pos.z - spawner_data->unk78) > 3.0f) { - spawner_data->unkB4 = 2; + if (select_moby_combat_target( + spawner, &spawner_data->target_position, spawner_data->range) != 2) { + if (absolute_float(spawner->pos.z - spawner_data->target_z) > 3.0f) { + spawner_data->target_status = 2; } } - if (spawner_data->unkB0 == 0) { + if (spawner_data->target_moby == 0) { pad = D_0013E533 + 0xE1D; - spawner_data->unkB0 = *(int *)(pad + 0x2080); - qcopy(&spawner_data->unk70, pad + 0x80); + spawner_data->target_moby = *(int *)(pad + 0x2080); + qcopy(&spawner_data->target_position, pad + 0x80); } } } diff --git a/src/overlays/l12/mobys/planetbuster_maximus_part.c b/src/overlays/l12/mobys/planetbuster_maximus_part.c index 6f64f0f218..a0a83a6d7d 100644 --- a/src/overlays/l12/mobys/planetbuster_maximus_part.c +++ b/src/overlays/l12/mobys/planetbuster_maximus_part.c @@ -663,7 +663,7 @@ typedef struct PlanetbusterMaximusVars { s32 path; u8 pad_5C4[0x4]; f32 vertical_oscillation_previous_offset; - f32 unk5CC; + f32 vertical_oscillation_phase; u8 pad_5D0[0x14]; u8 rotation_common_factor_phase; u8 pad_5E5[0x3]; @@ -681,7 +681,7 @@ typedef struct PlanetbusterMaximusVars { s32 transition_target_camera_point; f32 camera_transition_fraction; f32 camera_transition_step; - f32 unk618; + f32 base_z; s32 height_timer_refresh_clip_volume; s32 timer; s32 linked_parts_flags_clip_volume; @@ -723,7 +723,7 @@ void planetbuster_maximus_part_update(char *moby) { capture_linked_moby_relative_transforms(moby, moby_data, 0x11); path = ((P_7DB0 **)&(*(int *)l12_paths))[moby_data->path]; qcopy(moby + 0x10, path + 1); - moby_data->unk618 = MOBY(moby)->pos.z; + moby_data->base_z = MOBY(moby)->pos.z; MOBY(moby)->rot.z = fast_arc_tan(path[2].v[0] - path[1].v[0], path[2].v[1] - path[1].v[1]); if (*(float *)(D_0013F3D0 + 0x8) < 52.0f) { @@ -770,7 +770,7 @@ void planetbuster_maximus_part_update(char *moby) { r = is_point_inside_clip_volume(clip_test_position, moby_data->height_raise_clip_volume); if (*(float *)(clip_test_position + 8) > 52.0f && r == 0) { approach_value( - (float *)&MOBY(moby)->pos.z, moby_data->unk618, D_0015ED6C_gp + D_0015ED6C_gp); + (float *)&MOBY(moby)->pos.z, moby_data->base_z, D_0015ED6C_gp + D_0015ED6C_gp); } else { float add = 3.0f; if (r) @@ -783,7 +783,7 @@ void planetbuster_maximus_part_update(char *moby) { add = 19.0f; vendor_spring((float *)&MOBY(moby)->pos.z, &moby_data->height_spring_velocity, - moby_data->unk618 + add, + moby_data->base_z + add, frame_scale_sq_macro * 0.03f, frame_scale_sq_macro * 0.3f, D_0015ED6C_gp * 2.7f); @@ -791,7 +791,7 @@ void planetbuster_maximus_part_update(char *moby) { update_moby_vertical_oscillation(0.7f, D_0015ED6C_gp * 1.2217305f, moby, - &moby_data->unk5CC, + &moby_data->vertical_oscillation_phase, &moby_data->vertical_oscillation_previous_offset); update_moby_rotation_oscillation( moby, @@ -823,7 +823,7 @@ void planetbuster_maximus_part_update(char *moby) { update_moby_vertical_oscillation(0.7f, D_0015ED6C_gp * 1.2217305f, moby, - &moby_data->unk5CC, + &moby_data->vertical_oscillation_phase, &moby_data->vertical_oscillation_previous_offset); update_moby_rotation_oscillation( moby, @@ -887,7 +887,7 @@ void planetbuster_maximus_part_update(char *moby) { update_moby_vertical_oscillation(0.7f, D_0015ED6C_gp * 1.2217305f, moby, - &moby_data->unk5CC, + &moby_data->vertical_oscillation_phase, &moby_data->vertical_oscillation_previous_offset); update_moby_rotation_oscillation( moby, diff --git a/src/overlays/l12/mobys/platform.c b/src/overlays/l12/mobys/platform.c index f457a8dfde..b8c6966ef4 100644 --- a/src/overlays/l12/mobys/platform.c +++ b/src/overlays/l12/mobys/platform.c @@ -109,12 +109,12 @@ void steer_platform_toward_target(char *moby, typedef struct PlatformVars { u8 pad_0[0x40]; - f32 unk40[4]; + f32 velocity[4]; u8 pad_50[0x80]; - f32 unkD0; - f32 unkD4; + f32 max_speed; + f32 acceleration; u8 pad_D8[0x20]; - f32 unkF8; + f32 yaw_velocity; } PlatformVars; void steer_platform_toward_target( @@ -128,22 +128,22 @@ void steer_platform_toward_target( float yaw_angular_velocity_limit = 1.9198622f; fast_vec_sub(target_offset, target, moby + 0x10); target_distance = fast_vec_length(target_offset); - speed = fast_vec_length(moby_vars->unk40); + speed = fast_vec_length(moby_vars->velocity); if (brake) { if (speed == 0.0f) speed = D_0015ED6C_k * 0.01f; - acc = moby_vars->unkD4 * D_0015ED70_k; + acc = moby_vars->acceleration * D_0015ED70_k; if (acc < speed * speed / (target_distance + target_distance)) speed -= acc; - else if (speed < moby_vars->unkD0 * D_0015ED6C_k) + else if (speed < moby_vars->max_speed * D_0015ED6C_k) speed += acc; } else { - if (speed < moby_vars->unkD0 * D_0015ED6C_k) - speed += moby_vars->unkD4 * D_0015ED70_k; - else if (moby_vars->unkD0 * D_0015ED6C_k < speed) - speed -= moby_vars->unkD4 * D_0015ED70_k; + if (speed < moby_vars->max_speed * D_0015ED6C_k) + speed += moby_vars->acceleration * D_0015ED70_k; + else if (moby_vars->max_speed * D_0015ED6C_k < speed) + speed -= moby_vars->acceleration * D_0015ED70_k; } - fast_vec_normalize(moby_vars->unk40, target_offset, speed); + fast_vec_normalize(moby_vars->velocity, target_offset, speed); appr_k(moby + 0x40, target_angles[0], fast_difference_between_rotations(target_angles[0], MOBY(moby)->rot.x) / @@ -154,12 +154,12 @@ void steer_platform_toward_target( platform_tilt_approach_divisor_gp); spring_angle((float *)&MOBY(moby)->rot.z, target_angles[2], - &moby_vars->unkF8, + &moby_vars->yaw_velocity, 0, D_0015ED64_k * 0.005f, D_0015ED64_k * 0.3f, D_0015ED6C_k * yaw_angular_velocity_limit); - fast_vec_add(moby + 0x10, moby + 0x10, moby_vars->unk40); + fast_vec_add(moby + 0x10, moby + 0x10, moby_vars->velocity); } /* Projects a moby's offset from a reference point into a 2D pair, or zeroes it. */ /* Ported from rac1-decomp (src/overlays/l12_hoven/vendor_002C0310.c: func_L12_002E5138), where it is exact; names translated to the US level program. */ From 68ba5dfacd880fd47f38128dd6e89679e059b872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:34:48 +0000 Subject: [PATCH 086/213] decomp: name puffoid, teleporter, psytcopus and resort owner fields in l11 --- src/overlays/l11/mobys/ammocrate.c | 6 ++--- src/overlays/l11/mobys/psytcopus.c | 14 +++++----- src/overlays/l11/mobys/puffoid.c | 34 ++++++++++++------------ src/overlays/l11/mobys/resort_owner.c | 15 ++++++----- src/overlays/l11/mobys/seesaw_platform.c | 4 +-- src/overlays/l11/mobys/teleporter.c | 31 ++++++++++----------- 6 files changed, 53 insertions(+), 51 deletions(-) diff --git a/src/overlays/l11/mobys/ammocrate.c b/src/overlays/l11/mobys/ammocrate.c index be57e76845..0a01baa265 100644 --- a/src/overlays/l11/mobys/ammocrate.c +++ b/src/overlays/l11/mobys/ammocrate.c @@ -80,7 +80,7 @@ void ammocrate_update(struct Moby *m) __asm__("FUN_L11_0030f728"); typedef struct AmmocrateVars { u8 pad_0[0x10]; f32 velocity[4]; - f32 unk20[4]; + f32 position_offset[4]; f32 wobble_phase; struct Moby *child; u8 pad_38[0x38]; @@ -191,7 +191,7 @@ void ammocrate_update(struct Moby *pickup) { fast_vec_scale(pickup_vars->velocity, pickup_vars->velocity, 0.9f); pickup_vars->velocity[2] -= frame_time_sq * 9.8f; fast_vec_add(pickup_vars, pickup_vars, pickup_vars->velocity); - fast_vec_add(&pickup->pos, pickup_vars, pickup_vars->unk20); + fast_vec_add(&pickup->pos, pickup_vars, pickup_vars->position_offset); if (sync_ship_pickup_child_pose(pickup, pickup_vars)) { if (pickup_vars->child->seq == 1) { fast_vec_scale(pickup_vars->velocity, pickup_vars->velocity, 0.8f); @@ -214,7 +214,7 @@ void ammocrate_update(struct Moby *pickup) { fast_vec_add(pickup_vars->velocity, pickup_vars->velocity, &pickup_vector_scratch); } fast_vec_add(pickup_vars, pickup_vars, pickup_vars->velocity); - fast_vec_add(&pickup->pos, pickup_vars, pickup_vars->unk20); + fast_vec_add(&pickup->pos, pickup_vars, pickup_vars->position_offset); if (sync_ship_pickup_child_pose(pickup, pickup_vars)) { if (pickup_vars->child->state == 2) { pickup->state = pickup_vars->child->state; diff --git a/src/overlays/l11/mobys/psytcopus.c b/src/overlays/l11/mobys/psytcopus.c index 3b50aa33d0..f7fe75a008 100644 --- a/src/overlays/l11/mobys/psytcopus.c +++ b/src/overlays/l11/mobys/psytcopus.c @@ -46,11 +46,11 @@ struct PokiPathVars { struct KnockbackMotion knockback; /* 0x70 */ Vec4f goal; /* 0xD0 */ u8 pad_E0[0x30]; - struct Moby *target; /* 0x110 */ - s32 unk114; /* 0x114 */ + struct Moby *target; /* 0x110 */ + s32 target_status; /* 0x114 */ u8 pad_118[0x18]; - s32 unk130; /* 0x130 */ - s32 start_path; /* 0x134 */ + s32 starts_on_path; /* 0x130 */ + s32 start_path; /* 0x134 */ u8 pad_138[4]; s32 path_index; /* 0x13C */ f32 reach; /* 0x140 */ @@ -132,7 +132,7 @@ void psytcopus_update(struct Moby *psytcopus) { if (psytcopus->prev_seq != 0) { blend_moby_animation(psytcopus, 0, 0, scale_game_frames(10)); } - if (psytcopus_vars->unk130 != 0) { + if (psytcopus_vars->starts_on_path != 0) { psytcopus->state = 1; qcopy(&psytcopus->pos, (char *)(s32 *)l11_paths[psytcopus_vars->start_path] + 0x10); break; @@ -153,7 +153,7 @@ void psytcopus_update(struct Moby *psytcopus) { frame_time_sq * 6.2831855f, frame_time * 6.2831855f); } - if (psytcopus_vars->unk114 != 2) { + if (psytcopus_vars->target_status != 2) { psytcopus->state = PSYTCOPUS_STATE_CREATE_PROJECTILE; if (psytcopus->prev_seq != 2) { blend_moby_animation(psytcopus, 2, 0, scale_game_frames(10)); @@ -381,7 +381,7 @@ void handle_psytcopus_hits(struct Moby *psytcopus) { psytcopus, &psytcopus_vars->goal, 0, 0, path + 4, *path, psytcopus_vars->reach) != 2 && (psytcopus_vars->reach < vector_distance_xy(&psytcopus->pos, &psytcopus_vars->goal) || absolute_float(psytcopus->pos.z - psytcopus_vars->goal.z) > 3.0f)) { - psytcopus_vars->unk114 = 2; + psytcopus_vars->target_status = 2; } if (psytcopus_vars->target == 0) { psytcopus_vars->target = D_001413D0; diff --git a/src/overlays/l11/mobys/puffoid.c b/src/overlays/l11/mobys/puffoid.c index b4e34255ee..3af21e6064 100644 --- a/src/overlays/l11/mobys/puffoid.c +++ b/src/overlays/l11/mobys/puffoid.c @@ -74,9 +74,9 @@ typedef struct { f32 goal[4]; /* 0x1D0 */ u8 pad1E0[0x30]; struct Moby *target; /* 0x210 */ - s32 unk214; /* 0x214: 2 = target in range */ - u8 pad218[8]; - f32 home[4]; /* 0x220 */ + s32 target_status; /* 0x214: status word of the target record at goal; 2 once the goal is out of reach */ + u8 pad218[8]; + f32 home[4]; /* 0x220 */ s32 path_index; /* 0x230: path index for FUN_L00_00261968 / the landing check */ s32 path; /* 0x234: index into l11_paths */ s32 mode; /* 0x238: start mode */ @@ -208,7 +208,7 @@ void puffoid_update(struct Moby *moby) { frame_time_sq * 8.726646f, frame_time_sq * 8.726646f, frame_time * 12.566371f); - if (puffoid_vars->unk214 != 2 && random_integer_below(9) == 0) { + if (puffoid_vars->target_status != 2 && random_integer_below(9) == 0) { moby->state = PUFFOID_STATE_JUMP_HOME; if (moby->prev_seq != 0) { blend_moby_animation(moby, 0, 0, 5); @@ -247,7 +247,7 @@ void puffoid_update(struct Moby *moby) { } break; case PUFFOID_STATE_IDLE: - if (puffoid_vars->unk214 != 2) { + if (puffoid_vars->target_status != 2) { puffoid_vars->chase_heading_offset_radians = random_float_between(-puffoid_chase_heading_offset_limit_degrees_gp, puffoid_chase_heading_offset_limit_degrees_gp) * @@ -275,7 +275,7 @@ void puffoid_update(struct Moby *moby) { case PUFFOID_STATE_WANDER_NEAR_HOME: update_moby_target_heading_and_conditional_movement((char *)moby, puffoid_vars->wander_destination); - if (puffoid_vars->unk214 != 2) { + if (puffoid_vars->target_status != 2) { puffoid_vars->chase_heading_offset_radians = random_float_between(-puffoid_chase_heading_offset_limit_degrees_gp, puffoid_chase_heading_offset_limit_degrees_gp) * @@ -302,7 +302,7 @@ void puffoid_update(struct Moby *moby) { update_moby_target_heading_and_conditional_movement((char *)moby, (float *)&target->pos); } - if (puffoid_vars->unk214 == 2) { + if (puffoid_vars->target_status == 2) { moby->state = PUFFOID_STATE_RETURN_HOME; } break; @@ -325,7 +325,7 @@ void puffoid_update(struct Moby *moby) { update_moby_target_heading_and_conditional_movement((char *)moby, puffoid_vars->goal); } if (moby->anim_flags & 2) { - if (puffoid_vars->unk214 != 2) { + if (puffoid_vars->target_status != 2) { moby->state = PUFFOID_STATE_CHASE_TARGET; } else if (puffoid_vars->timer == 0) { moby->state = PUFFOID_STATE_RETURN_HOME; @@ -340,7 +340,7 @@ void puffoid_update(struct Moby *moby) { if (moby->prev_seq != 1) { blend_moby_animation(moby, 1, 0, scale_game_frames(10)); } - } else if (puffoid_vars->unk214 == 2) { + } else if (puffoid_vars->target_status == 2) { moby->state = PUFFOID_STATE_RETURN_HOME; } qcopy(pos, &moby->pos); @@ -353,7 +353,7 @@ void puffoid_update(struct Moby *moby) { if (moby->prev_seq != 0) { blend_moby_animation(moby, 0, 0, scale_game_frames(10)); } - } else if (puffoid_vars->unk214 != 2) { + } else if (puffoid_vars->target_status != 2) { puffoid_vars->chase_heading_offset_radians = random_float_between(-puffoid_chase_heading_offset_limit_degrees_gp, puffoid_chase_heading_offset_limit_degrees_gp) * @@ -405,7 +405,7 @@ void puffoid_update(struct Moby *moby) { case PUFFOID_STATE_WAIT_FOR_CARRIER_JUMP: { float basis[16]; float dest[4]; - if (puffoid_vars->unk214 != 2 && count_group_puffoids_in_states_13_to_17(moby) < 5) { + if (puffoid_vars->target_status != 2 && count_group_puffoids_in_states_13_to_17(moby) < 5) { struct Moby *carrier_moby = (struct Moby *)(D_L11_0015FFD8_4318 + (puffoid_vars->carrier << 8)); transpose_rotation_matrix(basis, &carrier_moby->rot_row0); @@ -470,7 +470,7 @@ void puffoid_update(struct Moby *moby) { &moby->rot, &moby->pos, &moby->rot); - if (puffoid_vars->unk214 != 2) { + if (puffoid_vars->target_status != 2) { puffoid_vars->chase_heading_offset_radians = random_float_between(-puffoid_chase_heading_offset_limit_degrees_gp, puffoid_chase_heading_offset_limit_degrees_gp) * @@ -496,7 +496,7 @@ void puffoid_update(struct Moby *moby) { blend_moby_animation(moby, 2, 0, scale_game_frames(10)); } } - if (puffoid_vars->unk214 == 2) { + if (puffoid_vars->target_status == 2) { moby->state = PUFFOID_STATE_CARRIER_IDLE; } break; @@ -514,7 +514,7 @@ void puffoid_update(struct Moby *moby) { if (moby->prev_seq != 1) { blend_moby_animation(moby, 1, 0, scale_game_frames(10)); } - } else if (puffoid_vars->unk214 == 2) { + } else if (puffoid_vars->target_status == 2) { moby->state = PUFFOID_STATE_CARRIER_IDLE; } qcopy(pos, &moby->pos); @@ -695,8 +695,8 @@ struct L11PatrolVars { u8 pad1A8[0x28]; Vec4f goal; /* 0x1D0 */ u8 pad1E0[0x30]; - struct Moby *target; /* 0x210 */ - s32 unk214; /* 0x214 */ + struct Moby *target; /* 0x210 */ + s32 target_status; /* 0x214 */ u8 pad218[0x18]; s32 path_index; /* 0x230 */ s32 path2_index; /* 0x234 */ @@ -904,7 +904,7 @@ void update_puffoid_damage_and_path_goal(struct Moby *moby) { qcopy(&position_scratch, goal_check_position); if (vector_distance_xy(position_scratch.f, &patrol_vars->goal.x) > patrol_vars->reach || position_scratch.f[2] - patrol_vars->goal.z > 3.0f) { - patrol_vars->unk214 = 2; + patrol_vars->target_status = 2; } } if (patrol_vars->target == 0) { diff --git a/src/overlays/l11/mobys/resort_owner.c b/src/overlays/l11/mobys/resort_owner.c index 41b7b09656..337eff6d48 100644 --- a/src/overlays/l11/mobys/resort_owner.c +++ b/src/overlays/l11/mobys/resort_owner.c @@ -337,15 +337,15 @@ struct PokKeeperVars { u8 pad30[0x26]; s16 unk56; u8 pad58[8]; - s32 leg_paths[3]; /* 0x60: per-leg clearance paths, set from unk70[] */ + s32 leg_paths[3]; /* 0x60: per-leg clearance paths, set from leg_path_ids[] */ u8 pad6C[4]; - s32 unk70[3]; + s32 leg_path_ids[3]; u8 pad7C[0x54]; s32 leg_entry_points[4]; s32 points[4]; /* 0xE0: path point of each leg */ s32 gates[2]; /* 0xF0: gate mobys */ s32 volumes[2]; /* 0xF8 */ - s32 unk100; + s32 final_leg_trigger_moby; s32 paired_rotation_moby; s32 first_gate_open_mission; s32 path_complete_mission; @@ -389,9 +389,9 @@ void update_resort_owner_state_transitions(void *resort_owner_moby) { case RESORT_OWNER_INITIALIZE: initialize_npc_dialogue(moby, moby_vars->talk); moby->update_dist = 0xFF; - build_symmetric_adjacency_masks(&moby_vars->leg_paths[0], 1, moby_vars->unk70[0]); - build_symmetric_adjacency_masks(&moby_vars->leg_paths[1], 1, moby_vars->unk70[1]); - build_symmetric_adjacency_masks(&moby_vars->leg_paths[2], 1, moby_vars->unk70[2]); + build_symmetric_adjacency_masks(&moby_vars->leg_paths[0], 1, moby_vars->leg_path_ids[0]); + build_symmetric_adjacency_masks(&moby_vars->leg_paths[1], 1, moby_vars->leg_path_ids[1]); + build_symmetric_adjacency_masks(&moby_vars->leg_paths[2], 1, moby_vars->leg_path_ids[2]); clear_u64_value(&moby_vars->velocity); clear_u64_value(&moby_vars->displacement); if (D_0013D4EE) { @@ -570,7 +570,8 @@ void update_resort_owner_state_transitions(void *resort_owner_moby) { } break; case RESORT_OWNER_WAIT_TO_ADVANCE_FINAL_PATH_LEG: - if (is_moby_in_state_five((struct Moby *)(D_L11_0015FFD8 + (moby_vars->unk100 << 8)))) { + if (is_moby_in_state_five( + (struct Moby *)(D_L11_0015FFD8 + (moby_vars->final_leg_trigger_moby << 8)))) { moby_vars->leg += 1; FUN_L11_002d2088_c(moby, 3); } diff --git a/src/overlays/l11/mobys/seesaw_platform.c b/src/overlays/l11/mobys/seesaw_platform.c index 71f0fd52dc..71b8a0e6aa 100644 --- a/src/overlays/l11/mobys/seesaw_platform.c +++ b/src/overlays/l11/mobys/seesaw_platform.c @@ -30,7 +30,7 @@ extern float seesaw_fall_tilt_threshold_degrees_gp __asm__("D_L11_00161F84") __a /* Private variables of the tilting platform (seesaw_platform_update). */ struct L11TiltVars { u8 pad0[0x20]; - u8 unk20[0x3C]; /* 0x20: rider state for update_entity_matrix */ + u8 carry[0x3C]; /* 0x20: rider state for update_entity_matrix */ s32 unk5C; /* 0x5C */ f32 spin; /* 0x60: rot.y speed */ }; @@ -84,5 +84,5 @@ void seesaw_platform_update(struct Moby *platform) { } platform->rot.y = fast_add_rotations(platform->rot.y, platform_vars->spin); fast_vec_add(&platform_translation_delta, &platform_translation_delta, &platform->pos); - update_entity_matrix(platform_vars->unk20, &platform_translation_delta, &rot, &platform->rot); + update_entity_matrix(platform_vars->carry, &platform_translation_delta, &rot, &platform->rot); } diff --git a/src/overlays/l11/mobys/teleporter.c b/src/overlays/l11/mobys/teleporter.c index 3d6f71af9d..c1760908a2 100644 --- a/src/overlays/l11/mobys/teleporter.c +++ b/src/overlays/l11/mobys/teleporter.c @@ -54,10 +54,10 @@ typedef struct TeleporterVars { char *parts[3]; f32 part_extension; f32 part_tilt; - s32 unk28; - s32 unk2C; - s32 unk30; - s32 unk34; + s32 part_extension_speed; /* f32 bits */ + s32 part_tilt_speed; /* f32 bits */ + s32 music_track; /* request_music_track (FUN_L01_0027a248) on arrival, -1: none */ + s32 music_transition; u8 pad_38[0x4]; f32 ring_radius; } TeleporterVars; @@ -129,8 +129,8 @@ void teleporter_update(struct Moby *moby) { break; allocate_voice_for_target_entry(0, 0, (void *)moby); moby->state = TELEPORTER_OPEN_PARTS; - teleporter_instance_vars->unk28 = 0; - teleporter_instance_vars->unk2C = 0; + teleporter_instance_vars->part_extension_speed = 0; + teleporter_instance_vars->part_tilt_speed = 0; request_hero_target_pose(&moby->pos.x, 0, moby->rot.z); FUN_L00_002598b0_2518((int)moby, 1.5f, &moby->pos, 0x10000, 20.0f, 1.0f, 0, 1, 0); break; @@ -139,14 +139,14 @@ void teleporter_update(struct Moby *moby) { int teleport_transition_status = get_hero_target_pose_status(); if (teleporter_instance_vars->part_extension < 1.0f) { advance_accelerated_scalar(&teleporter_instance_vars->part_extension, - (float *)&teleporter_instance_vars->unk28, + (float *)&teleporter_instance_vars->part_extension_speed, 1.0f, teleporter_parts_acceleration_gp * frame_time_sq, teleporter_parts_deceleration_gp * frame_time_sq, teleporter_parts_max_speed_gp * frame_time); } else if (teleporter_instance_vars->part_tilt < 1.0f) { advance_accelerated_scalar(&teleporter_instance_vars->part_tilt, - (float *)&teleporter_instance_vars->unk2C, + (float *)&teleporter_instance_vars->part_tilt_speed, 1.0f, teleporter_parts_acceleration_gp * frame_time_sq, teleporter_parts_deceleration_gp * frame_time_sq, @@ -181,9 +181,10 @@ void teleporter_update(struct Moby *moby) { destination_position[2] += 0.2f; FUN_L00_00216f90_2518(destination_position, destination_moby + 0x40, 0, 1); D_001413F5_lui = 1; - if (teleporter_instance_vars->unk30 != -1 && teleporter_instance_vars->unk34 != -1) { - FUN_L01_0027a248_2518(teleporter_instance_vars->unk30, - teleporter_instance_vars->unk34); + if (teleporter_instance_vars->music_track != -1 && + teleporter_instance_vars->music_transition != -1) { + FUN_L01_0027a248_2518(teleporter_instance_vars->music_track, + teleporter_instance_vars->music_transition); } FUN_L11_002f3040_2518(destination_moby); MOBY(destination_moby)->state = TELEPORTER_RESET; @@ -196,8 +197,8 @@ void teleporter_update(struct Moby *moby) { moby->state = TELEPORTER_WAIT_FOR_ACTIVATION; teleporter_instance_vars->part_extension = 0.0f; teleporter_instance_vars->part_tilt = 0.0f; - *(float *)&teleporter_instance_vars->unk28 = 0.0f; - *(float *)&teleporter_instance_vars->unk2C = 0.0f; + *(float *)&teleporter_instance_vars->part_extension_speed = 0.0f; + *(float *)&teleporter_instance_vars->part_tilt_speed = 0.0f; teleporter_instance_vars->ring_radius = 1.95f; update_teleporter_child_transforms(moby); } @@ -210,14 +211,14 @@ void teleporter_update(struct Moby *moby) { approach_value(&teleporter_instance_vars->ring_radius, 1.95f, frame_time * 4.0f); } else if (0.0f < teleporter_instance_vars->part_tilt) { advance_accelerated_scalar(&teleporter_instance_vars->part_tilt, - (float *)&teleporter_instance_vars->unk28, + (float *)&teleporter_instance_vars->part_extension_speed, 0.0f, teleporter_parts_acceleration_gp * frame_time_sq, teleporter_parts_deceleration_gp * frame_time_sq, teleporter_parts_max_speed_gp * frame_time); } else if (0.0f < teleporter_instance_vars->part_extension) { advance_accelerated_scalar(&teleporter_instance_vars->part_extension, - (float *)&teleporter_instance_vars->unk2C, + (float *)&teleporter_instance_vars->part_tilt_speed, 0.0f, teleporter_parts_acceleration_gp * frame_time_sq, teleporter_parts_deceleration_gp * frame_time_sq, From f53472fff2c898c8e987b1973042d079a3b34ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:35:55 +0000 Subject: [PATCH 087/213] decomp: name alien queen and countdown sequence fields in l06 --- src/overlays/l06/mobys/alien_queen.c | 18 +++++++++--------- src/overlays/l06/mobys/countdown_sequence.c | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/overlays/l06/mobys/alien_queen.c b/src/overlays/l06/mobys/alien_queen.c index 779d1e8c0a..f47f781a27 100644 --- a/src/overlays/l06/mobys/alien_queen.c +++ b/src/overlays/l06/mobys/alien_queen.c @@ -373,7 +373,7 @@ typedef struct AlienQueenVars { u8 unk5A; u8 pad_5B[0x5]; struct HitColorFlash hit_flash; - u8 unk70; + u8 goal; /* target record (FUN_L00_0025ff38): target at +0x40 */ u8 pad_71[0x3F]; char *target; s32 target_selection_status; @@ -395,11 +395,11 @@ typedef struct AlienQueenVars { s32 health_sixteenths; s32 saved_path_point_count; f32 camera_blend_fraction; - u8 unk11C; + u8 camera_blend_speed; u8 pad_11D[0x3]; s32 timer_120; u8 pad_124[0x4]; - f32 unk128; + f32 glow_phase; s32 timer_12C; u8 unk130; u8 pad_131[0x3F]; @@ -454,7 +454,7 @@ void alien_queen_update(unsigned char *moby) { 0.5f); alien_queen_update_vars->path_midpoint[3] = vector_distance_xy( alien_queen_update_vars->home_position, alien_queen_update_vars->path_midpoint); - alien_queen_update_vars->unk128 = random_angle_radians(); + alien_queen_update_vars->glow_phase = random_angle_radians(); alien_queen_update_vars->timer_12C = scale_game_frames(0x1E); MOBY(moby)->collision = 0; MOBY(moby)->flags = (MOBY(moby)->flags | 0x4001) & 0xEFFF; @@ -962,15 +962,15 @@ void update_alien_queen_hit_response_and_recovery(char *moby) { 1.0f - convert_integer_to_float(++alien_queen_hit_recovery_vars->timer_12C) / 10.0f; } } - alien_queen_hit_recovery_vars->unk128 = - fast_add_rotations(alien_queen_hit_recovery_vars->unk128, + alien_queen_hit_recovery_vars->glow_phase = + fast_add_rotations(alien_queen_hit_recovery_vars->glow_phase, alien_queen_glow_phase_speed_degrees_gp * 0.017453292f * frame_time); MOBY(moby)->glow_color = fast_tween_color(l06_alien_queen_glow_tween_start_color, l06_alien_queen_glow_tween_end_color, - (fast_sin(alien_queen_hit_recovery_vars->unk128) + 1.0f) * 0.5f); + (fast_sin(alien_queen_hit_recovery_vars->glow_phase) + 1.0f) * 0.5f); path = D_L06_001B0C30[alien_queen_hit_recovery_vars->path]; - FUN_L00_0025ff38(moby, &alien_queen_hit_recovery_vars->unk70, 0, 0, path + 4, *path, 255.0f); + FUN_L00_0025ff38(moby, &alien_queen_hit_recovery_vars->goal, 0, 0, path + 4, *path, 255.0f); if (*(int *)&alien_queen_hit_recovery_vars->target == 0) *(int *)&alien_queen_hit_recovery_vars->target = D_L06_001413D0; } @@ -1028,7 +1028,7 @@ int update_alien_queen_intro_camera(char *moby) { } else { blend_acceleration_step = *(float *)&frame_time_sq * 3.0f; advance_accelerated_scalar(&alien_queen_state->camera_blend_fraction, - (float *)&alien_queen_state->unk11C, + (float *)&alien_queen_state->camera_blend_speed, 1.0f, blend_acceleration_step, blend_acceleration_step, diff --git a/src/overlays/l06/mobys/countdown_sequence.c b/src/overlays/l06/mobys/countdown_sequence.c index 7dbe01dd92..1a61efbcdf 100644 --- a/src/overlays/l06/mobys/countdown_sequence.c +++ b/src/overlays/l06/mobys/countdown_sequence.c @@ -170,7 +170,7 @@ typedef struct CountdownSequenceVars { s32 unk0; s32 unk4; s32 unk8; - s32 unkC; + s32 raised_cuboid; /* cuboid moved up by 10 when the countdown starts */ s32 unk10; s32 unk14; s32 unk18; @@ -247,7 +247,7 @@ void countdown_sequence_update(unsigned char *moby) { clear_moby_list_state_18(moby_vars->unk8); set_moby_state_3(D_L06_0015FFD8_301b90 + (moby_vars->unk20 << 8)); { - ((LevelCuboid *)((moby_vars->unkC << 7) + (int)l06_cuboids))->pos.z += 10.0f; + ((LevelCuboid *)((moby_vars->raised_cuboid << 7) + (int)l06_cuboids))->pos.z += 10.0f; p = D_L06_001B0C30_301b90[moby_vars->path_index]; qcopy(va, (char *)p + 0x20); qcopy(vb, (char *)p + 0x10); From 8e499e3fdb81acd3035824f0bf18d44670798248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:38:11 +0000 Subject: [PATCH 088/213] decomp: name the GS register and texture coordinate fields of the geometry quads --- src/overlays/l06/mobys/breakable_window.c | 8 ++-- src/overlays/l06/mobys/dual_texture_meshes.c | 42 +++++++++---------- .../l14/mobys/path_lightning_controller.c | 12 +++--- src/overlays/l14/mobys/ribbon_effect.c | 18 ++++---- .../l18/mobys/draw_moby_billboard_quad_pair.c | 8 ++-- .../l18/mobys/drek_boss_damage_ring.c | 8 ++-- .../l18/mobys/drek_boss_ring_projectile.c | 8 ++-- .../shared/enemies/hero_seeking_mine.c | 8 ++-- .../shared/enemies/plasmabot_death_debris.c | 28 ++++++------- .../initialize_level_transition_with_audio.c | 2 +- src/overlays/shared/props/electric_water.c | 8 ++-- .../shared/props/linked_spark_emitter.c | 12 +++--- src/overlays/shared/props/updraft_vent.c | 10 ++--- .../shared/rendering/effects/beam_slots.c | 18 ++++---- src/overlays/shared/weapons/mine.c | 12 +++--- src/overlays/shared/weapons/morphoray.c | 40 +++++++++--------- src/overlays/shared/weapons/taunter.c | 8 ++-- src/overlays/shared/weapons/tesla_claw_beam.c | 8 ++-- src/overlays/shared/weapons/walloper.c | 32 +++++++------- 19 files changed, 145 insertions(+), 145 deletions(-) diff --git a/src/overlays/l06/mobys/breakable_window.c b/src/overlays/l06/mobys/breakable_window.c index 3db0ffd421..260dca2e1d 100644 --- a/src/overlays/l06/mobys/breakable_window.c +++ b/src/overlays/l06/mobys/breakable_window.c @@ -62,7 +62,7 @@ typedef struct { V3003f0 corner[4]; unsigned int color[4]; UV3003f0 uv[4]; - long unk70, tex, unk80, unk88; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Q3003f0; typedef struct { @@ -783,13 +783,13 @@ void draw_backdrop_mesh(void) { I3003f0 *quad_corner_index_pair; quad.tex = get_effect_texture(backdrop_mesh_effect_texture_index_gp); - quad.unk88 = (long)backdrop_mesh_blend_color_a_selector_gp | + quad.alpha = (long)backdrop_mesh_blend_color_a_selector_gp | ((long)backdrop_mesh_blend_color_b_selector_gp << 2) | ((long)backdrop_mesh_blend_alpha_c_selector_gp << 4) | ((long)backdrop_mesh_blend_color_d_selector_gp << 6) | ((long)backdrop_mesh_blend_fixed_alpha_gp << 32); - quad.unk80 = 0xFF9000000260L; - quad.unk70 = 0; + quad.tex1 = 0xFF9000000260L; + quad.clamp = 0; set_identity_matrix(&backdrop_draw_transform); shared_quad_vertex_color = l06_backdrop_mesh_vertex_color; backdrop_draw_transform.translation_z = moby_breakup_z_offset_gp; diff --git a/src/overlays/l06/mobys/dual_texture_meshes.c b/src/overlays/l06/mobys/dual_texture_meshes.c index 68d3783de0..4748d0f13d 100644 --- a/src/overlays/l06/mobys/dual_texture_meshes.c +++ b/src/overlays/l06/mobys/dual_texture_meshes.c @@ -16,7 +16,7 @@ typedef struct { u128 v[4]; int color[4]; float uv[4][2]; - long unk70, tex, unk80, unk88; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Packet_2fd1a0; #include "rnc/overlay/l06/mobys/dual_texture_meshes_data/draw_dual_texture_50_quad_mesh.h" @@ -498,7 +498,7 @@ typedef struct { u128 v[4]; int color[4]; float uv[4][2]; - long unk70, tex, unk80, unk88; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Packet; short D_L06_001EF310[58][4][2] = { @@ -955,7 +955,7 @@ typedef struct { u128 v[4]; int color[4]; float uv[4][2]; - long unk70, tex, unk80, unk88; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Packet_2fd748; short D_L06_001DF6F0[864][4][2] = { @@ -5429,17 +5429,17 @@ void draw_dual_texture_50_quad_mesh(void) { long tex = get_effect_texture(dual_texture_mesh_first_pass_texture_index_gp); first_pass_quad_packet.tex = tex; second_pass_quad_packet.tex = get_effect_texture(0x2a); - second_pass_quad_packet.unk80 = 0xFF9000000260L; - first_pass_quad_packet.unk80 = 0xFF9000000260L; + second_pass_quad_packet.tex1 = 0xFF9000000260L; + first_pass_quad_packet.tex1 = 0xFF9000000260L; flags = (long)dual_texture_mesh_blend_color_a_selector_gp; flags |= (long)dual_texture_mesh_blend_color_b_selector_gp << 2; flags |= (long)dual_texture_mesh_blend_alpha_c_selector_gp << 4; flags |= (long)dual_texture_mesh_blend_color_d_selector_gp << 6; flags |= (long)dual_texture_mesh_blend_fixed_alpha_gp << 32; - second_pass_quad_packet.unk88 = flags; - first_pass_quad_packet.unk88 = flags; - second_pass_quad_packet.unk70 = 0; - first_pass_quad_packet.unk70 = 0; + second_pass_quad_packet.alpha = flags; + first_pass_quad_packet.alpha = flags; + second_pass_quad_packet.clamp = 0; + first_pass_quad_packet.clamp = 0; matrix_ptr = matrix; set_identity_matrix(matrix); first_pass_quad_packet.color[0] = first_pass_quad_packet.color[1] = @@ -5503,12 +5503,12 @@ void draw_dual_texture_58_quad_mesh(void) { (long)dual_texture_mesh_blend_alpha_c_selector_gp << 4 | (long)dual_texture_mesh_blend_color_d_selector_gp << 6 | (long)dual_texture_mesh_blend_fixed_alpha_gp << 32; - mesh_second_pass_quad_packet.unk88 = flags; - mesh_first_pass_quad_packet.unk88 = flags; - mesh_second_pass_quad_packet.unk80 = 0xFF9000000260L; - mesh_first_pass_quad_packet.unk80 = 0xFF9000000260L; - mesh_second_pass_quad_packet.unk70 = 0; - mesh_first_pass_quad_packet.unk70 = 0; + mesh_second_pass_quad_packet.alpha = flags; + mesh_first_pass_quad_packet.alpha = flags; + mesh_second_pass_quad_packet.tex1 = 0xFF9000000260L; + mesh_first_pass_quad_packet.tex1 = 0xFF9000000260L; + mesh_second_pass_quad_packet.clamp = 0; + mesh_first_pass_quad_packet.clamp = 0; set_identity_matrix(matrix_ptr); mesh_first_pass_quad_packet.color[3] = l06_dual_texture_mesh_first_pass_vertex_color; mesh_first_pass_quad_packet.color[2] = l06_dual_texture_mesh_first_pass_vertex_color; @@ -5576,12 +5576,12 @@ void draw_dual_texture_864_quad_mesh(void) { (long)dual_texture_mesh_blend_alpha_c_selector_gp << 4 | (long)dual_texture_mesh_blend_color_d_selector_gp << 6 | (long)dual_texture_mesh_blend_fixed_alpha_gp << 32; - second_texture_pass_quad_packet.unk88 = flags; - first_texture_pass_quad_packet.unk88 = flags; - second_texture_pass_quad_packet.unk80 = 0xFF9000000260L; - first_texture_pass_quad_packet.unk80 = 0xFF9000000260L; - second_texture_pass_quad_packet.unk70 = 0; - first_texture_pass_quad_packet.unk70 = 0; + second_texture_pass_quad_packet.alpha = flags; + first_texture_pass_quad_packet.alpha = flags; + second_texture_pass_quad_packet.tex1 = 0xFF9000000260L; + first_texture_pass_quad_packet.tex1 = 0xFF9000000260L; + second_texture_pass_quad_packet.clamp = 0; + first_texture_pass_quad_packet.clamp = 0; set_identity_matrix(matrix_ptr); first_texture_pass_quad_packet.color[3] = l06_dual_texture_mesh_first_pass_vertex_color; first_texture_pass_quad_packet.color[2] = l06_dual_texture_mesh_first_pass_vertex_color; diff --git a/src/overlays/l14/mobys/path_lightning_controller.c b/src/overlays/l14/mobys/path_lightning_controller.c index ad50cc931c..17a73ad36a 100644 --- a/src/overlays/l14/mobys/path_lightning_controller.c +++ b/src/overlays/l14/mobys/path_lightning_controller.c @@ -336,10 +336,10 @@ typedef struct { V_2EF078 v[4]; int col[4]; float uv[4][2]; - long r70; + long clamp; long tex; - long r80; - long r88; + long tex1; + long alpha; } Q_2EF078; extern V_2EF078 D_L14_001DFD80[]; @@ -378,9 +378,9 @@ void draw_branched_lightning_arc(void) { V_2EF078 *nd; layer_quads[0].tex = get_effect_texture(0x2D); - layer_quads[0].r88 = 0x8000000048L; - layer_quads[0].r80 = 0xFF9000000260L; - layer_quads[0].r70 = 0; + layer_quads[0].alpha = 0x8000000048L; + layer_quads[0].tex1 = 0xFF9000000260L; + layer_quads[0].clamp = 0; outer_vertex_alpha = func_001FA898_r(convert_integer_to_float(lightning_main_arc_point_ages[0]) / convert_integer_to_float(scale_game_frames(D_L14_00161C70_gp)) * 255.0f) - diff --git a/src/overlays/l14/mobys/ribbon_effect.c b/src/overlays/l14/mobys/ribbon_effect.c index e7d76ad974..0d3f8698ee 100644 --- a/src/overlays/l14/mobys/ribbon_effect.c +++ b/src/overlays/l14/mobys/ribbon_effect.c @@ -222,10 +222,10 @@ typedef struct { V_DF510 v[4]; int col[4]; float uv[4][2]; - long r70; + long clamp; long tex; - long r80; - long r88; + long tex1; + long alpha; } Q_DF510; extern char D_L14_001674C0[]; @@ -249,9 +249,9 @@ void draw_ribbon_effect_path( int i; layer_quads[0].tex = get_effect_texture(0x2D); - layer_quads[0].r88 = 0x8000000048L; - layer_quads[0].r80 = 0xFF9000000260L; - layer_quads[0].r70 = 0; + layer_quads[0].alpha = 0x8000000048L; + layer_quads[0].tex1 = 0xFF9000000260L; + layer_quads[0].clamp = 0; layer_quads[0].col[0] = layer_quads[0].col[1] = layer_quads[0].col[2] = layer_quads[0].col[3] = (outer_alpha << 24) | 0x7F7F7F; layer_quads[1].tex = get_effect_texture(0x2C); @@ -260,9 +260,9 @@ void draw_ribbon_effect_path( layer_quads[1].col[2] = inner_layer_color; layer_quads[1].col[1] = inner_layer_color; layer_quads[1].col[0] = inner_layer_color; - layer_quads[1].r88 = layer_quads[0].r88; - layer_quads[1].r80 = layer_quads[0].r80; - layer_quads[1].r70 = layer_quads[0].r70; + layer_quads[1].alpha = layer_quads[0].alpha; + layer_quads[1].tex1 = layer_quads[0].tex1; + layer_quads[1].clamp = layer_quads[0].clamp; layer_quads[1].uv[0][0] = 1.0f; layer_quads[1].uv[0][1] = 0.0f; layer_quads[1].uv[1][0] = 1.0f; diff --git a/src/overlays/l18/mobys/draw_moby_billboard_quad_pair.c b/src/overlays/l18/mobys/draw_moby_billboard_quad_pair.c index 93323f21aa..a4e38a3724 100644 --- a/src/overlays/l18/mobys/draw_moby_billboard_quad_pair.c +++ b/src/overlays/l18/mobys/draw_moby_billboard_quad_pair.c @@ -31,7 +31,7 @@ typedef struct { Vec130 corner[4]; unsigned int color[4]; UVec130 uv[4]; - long unk70, tex, unk80, unk88; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Qec130; extern unsigned int l18_billboard_quad_pair_first_color __asm__("D_L18_001620A0") @@ -74,9 +74,9 @@ void draw_moby_billboard_quad_pair(void *mv) { moby_position = (Vec130 *)mv; quad.tex = get_effect_texture(0xB); moby_position = (Vec130 *)((char *)moby_position + 0x10); - quad.unk88 = 0x8000000048L; - quad.unk80 = 0xFF9000000260L; - quad.unk70 = 0; + quad.alpha = 0x8000000048L; + quad.tex1 = 0xFF9000000260L; + quad.clamp = 0; fast_vec_sub(&quad_transform[3], &D_L18_001677C0, moby_position); vscl_ec130(&quad_transform[3], &quad_transform[3], 0.3f); fast_vec_add(&quad_transform[3], &quad_transform[3], moby_position); diff --git a/src/overlays/l18/mobys/drek_boss_damage_ring.c b/src/overlays/l18/mobys/drek_boss_damage_ring.c index 106fa0d64b..4c0b5769ec 100644 --- a/src/overlays/l18/mobys/drek_boss_damage_ring.c +++ b/src/overlays/l18/mobys/drek_boss_damage_ring.c @@ -120,7 +120,7 @@ typedef struct { V_dc4b8 corner[4]; unsigned int color[4]; UV uv[4]; - long unk70, tex, unk80, unk88; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Q_dc4b8; extern int get_effect_texture(int) __asm__("FUN_001f44b8"); @@ -160,9 +160,9 @@ void draw_class_274_ring_effect(char *moby) { for (i = 0; i < 4; i++) { quad[i].tex = get_effect_texture(14); gi = class_274_ring_layer_radius_offset_gp * (float)i; - quad[i].unk70 = 0; - quad[i].unk80 = 0xFF9000000260L; - quad[i].unk88 = (long)class_274_ring_blend_minuend_selector_gp | + quad[i].clamp = 0; + quad[i].tex1 = 0xFF9000000260L; + quad[i].alpha = (long)class_274_ring_blend_minuend_selector_gp | ((long)class_274_ring_blend_subtrahend_selector_gp << 2) | ((long)class_274_ring_blend_alpha_factor_selector_gp << 4) | ((long)class_274_ring_blend_addend_selector_gp << 6) | 0x8000000000L; diff --git a/src/overlays/l18/mobys/drek_boss_ring_projectile.c b/src/overlays/l18/mobys/drek_boss_ring_projectile.c index 641b2330d1..861ddb8a98 100644 --- a/src/overlays/l18/mobys/drek_boss_ring_projectile.c +++ b/src/overlays/l18/mobys/drek_boss_ring_projectile.c @@ -269,7 +269,7 @@ typedef struct { V_dba20 corner[4]; unsigned int color[4]; UV_dba20 uv[4]; - long unk70, tex, unk80, unk88; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Q_dba20; typedef struct { @@ -326,9 +326,9 @@ void draw_expanding_projectile_ring(M_dba20 *moby) { float fj; float layer_phase, color_fade_weight, rad; quad_packets[j].tex = get_effect_texture(0xE); - quad_packets[j].unk70 = 0; - quad_packets[j].unk80 = 0xFF9000000260L; - quad_packets[j].unk88 = + quad_packets[j].clamp = 0; + quad_packets[j].tex1 = 0xFF9000000260L; + quad_packets[j].alpha = (long)expanding_projectile_ring_blend_minuend_selector_gp | ((long)expanding_projectile_ring_blend_subtrahend_selector_gp << 2) | ((long)expanding_projectile_ring_blend_alpha_factor_selector_gp << 4) | diff --git a/src/overlays/shared/enemies/hero_seeking_mine.c b/src/overlays/shared/enemies/hero_seeking_mine.c index b9036a48ba..ccb4552121 100644 --- a/src/overlays/shared/enemies/hero_seeking_mine.c +++ b/src/overlays/shared/enemies/hero_seeking_mine.c @@ -13,9 +13,9 @@ typedef struct { float v[4][4]; int col[4]; float uv[4][2]; - long long r70; + long long clamp; long long texture; /* get_effect_texture */ - unsigned long long r80; + unsigned long long tex1; unsigned long long alpha; /* GS ALPHA register value (0x8000000044) */ } EffectQuad; @@ -207,9 +207,9 @@ void draw_group_moby_effect_quads(unsigned char *moby) { int i, j; effect_quad.texture = get_effect_texture(8); - effect_quad.r80 = 0xff9000000260LL; + effect_quad.tex1 = 0xff9000000260LL; effect_quad.alpha = 0x8000000044LL; - effect_quad.r70 = 0; + effect_quad.clamp = 0; { int count = 3; float *source = group_moby_effect_quad_uvs; diff --git a/src/overlays/shared/enemies/plasmabot_death_debris.c b/src/overlays/shared/enemies/plasmabot_death_debris.c index cb2e4c5a1b..478fa61449 100644 --- a/src/overlays/shared/enemies/plasmabot_death_debris.c +++ b/src/overlays/shared/enemies/plasmabot_death_debris.c @@ -212,11 +212,11 @@ typedef struct { typedef struct { GlowVec_bfa8 corner[4]; u32 color[4]; - s32 unk50, unk54, unk58; - f32 unk5C, unk60; + s32 u0, v0, u1; /* texture coordinates of the four corners */ + f32 v1, u2; s32 corner_2_texture_t; - f32 unk68, unk6C; - s64 unk70, tex, unk80, unk88; + f32 u3, v3; + s64 clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } GlowQuad_bfa8; extern GlowVec_bfa8 l01_moby_offset_quad_source_corners[4] __asm__("D_L01_0020B9D0"); @@ -256,17 +256,17 @@ void draw_moby_offset_textured_quad(char *moby) { local.src_corner[2].q = source_corner_2; local.src_corner[3].q = source_corner_3; local.quad.tex = get_effect_texture(0xB); - local.quad.unk88 = 0x8000000048L; - local.quad.unk80 = 0xFF9000000260L; - local.quad.unk70 = 5; - local.quad.unk50 = 0; - local.quad.unk54 = 0; - local.quad.unk58 = 0; - local.quad.unk5C = one; - local.quad.unk60 = one; + local.quad.alpha = 0x8000000048L; + local.quad.tex1 = 0xFF9000000260L; + local.quad.clamp = 5; + local.quad.u0 = 0; + local.quad.v0 = 0; + local.quad.u1 = 0; + local.quad.v1 = one; + local.quad.u2 = one; local.quad.corner_2_texture_t = 0; - local.quad.unk68 = one; - local.quad.unk6C = one; + local.quad.u3 = one; + local.quad.v3 = one; fast_vec_scale(&local.basis.offset, moby + 0xc0, moby_quad_c0_offset_scale_gp); fast_vec_scale(&local.basis.partial, moby + 0xe0, moby_quad_e0_offset_scale_gp); diff --git a/src/overlays/shared/game/initialize_level_transition_with_audio.c b/src/overlays/shared/game/initialize_level_transition_with_audio.c index 4ac2834768..aa10de810e 100644 --- a/src/overlays/shared/game/initialize_level_transition_with_audio.c +++ b/src/overlays/shared/game/initialize_level_transition_with_audio.c @@ -363,7 +363,7 @@ typedef struct { struct { float u, v; } uv[4]; - long unk70, tex, unk80, unk88; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Q_28efc8; typedef struct { diff --git a/src/overlays/shared/props/electric_water.c b/src/overlays/shared/props/electric_water.c index 0bb74efac5..324c149edf 100644 --- a/src/overlays/shared/props/electric_water.c +++ b/src/overlays/shared/props/electric_water.c @@ -1114,7 +1114,7 @@ typedef struct { V2d8e48 corner[4]; unsigned int color[4]; UV2d8e48 uv[4]; - long unk70, tex, unk80, unk88; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Q2d8e48; extern unsigned int l15_electric_water_bolt_start_first_quad_color __asm__("D_L15_00161CAC") @@ -1145,9 +1145,9 @@ void draw_electric_water_bolt_start_quads(void *mv) { bolt_start_position = *(V2d8e48 **)((char *)mv + 0x78); quad.tex = get_effect_texture(0xB); bolt_start_position = (V2d8e48 *)((char *)bolt_start_position + 0xF0); - quad.unk88 = 0x8000000048L; - quad.unk80 = 0xFF9000000260L; - quad.unk70 = 0; + quad.alpha = 0x8000000048L; + quad.tex1 = 0xFF9000000260L; + quad.clamp = 0; fast_vec_sub(&quad_transform[3], &D_L15_001673C0, bolt_start_position); fast_vec_normalize(&quad_transform[3], &quad_transform[3], 0.3f); fast_vec_add(&quad_transform[3], &quad_transform[3], bolt_start_position); diff --git a/src/overlays/shared/props/linked_spark_emitter.c b/src/overlays/shared/props/linked_spark_emitter.c index 779540489b..117c26ad14 100644 --- a/src/overlays/shared/props/linked_spark_emitter.c +++ b/src/overlays/shared/props/linked_spark_emitter.c @@ -20,9 +20,9 @@ typedef struct { float v[4][4]; int col[4]; float uv[4][2]; - long long r70; + long long clamp; long long texture; /* get_effect_texture */ - unsigned long long r80; + unsigned long long tex1; unsigned long long alpha; /* GS ALPHA register value (0x8000000044) */ } EffectQuad; @@ -195,8 +195,8 @@ int draw_spark_emitter_effect_quads(unsigned char *moby) { qcopy(position, &MOBY(moby)->pos); position[3] = 1.0f; uniform_color_quad.texture = get_effect_texture(0x2c); - uniform_color_quad.r80 = 0xff9000000260ULL; - uniform_color_quad.r70 = 0; + uniform_color_quad.tex1 = 0xff9000000260ULL; + uniform_color_quad.clamp = 0; alternating_corner_color_quad.texture = get_effect_texture(0x2c); secondVertices = alternating_corner_color_quad.v; firstUv = uniform_color_quad.uv; @@ -206,8 +206,8 @@ int draw_spark_emitter_effect_quads(unsigned char *moby) { secondUv2 = alternating_corner_color_quad.uv[2]; firstUv3 = uniform_color_quad.uv[3]; secondUv3 = alternating_corner_color_quad.uv[3]; - alternating_corner_color_quad.r70 = 0; - alternating_corner_color_quad.r80 = 0xff9000000260ULL; + alternating_corner_color_quad.clamp = 0; + alternating_corner_color_quad.tex1 = 0xff9000000260ULL; alternating_corner_color_quad.col[3] = 0; alternating_corner_color_quad.col[1] = 0; for (corner = 0; corner < 4; corner++) { diff --git a/src/overlays/shared/props/updraft_vent.c b/src/overlays/shared/props/updraft_vent.c index 7df8b1ee44..52d9ea4137 100644 --- a/src/overlays/shared/props/updraft_vent.c +++ b/src/overlays/shared/props/updraft_vent.c @@ -68,7 +68,7 @@ typedef struct { QuadCorner corner[4]; int color[4]; float uv[4][2]; - long unk70, tex, unk80, alpha; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } TrailQuad; extern QuadCorner l10_animated_quad_second_base_corners[] __asm__("D_L10_001DA310"); @@ -109,11 +109,11 @@ void draw_moby_animated_quad_layers(unsigned char *moby) { qcopy(position, &MOBY(moby)->pos); position[3] = 1.0f; uniform_color_quad.tex = get_effect_texture(0x2C); - uniform_color_quad.unk80 = 0xFF9000000260L; - uniform_color_quad.unk70 = 0; + uniform_color_quad.tex1 = 0xFF9000000260L; + uniform_color_quad.clamp = 0; alternating_color_quad.tex = get_effect_texture(0x2C); - alternating_color_quad.unk80 = 0xFF9000000260L; - alternating_color_quad.unk70 = 0; + alternating_color_quad.tex1 = 0xFF9000000260L; + alternating_color_quad.clamp = 0; alternating_color_quad.color[3] = 0; alternating_color_quad.color[1] = 0; second_quad = &alternating_color_quad; diff --git a/src/overlays/shared/rendering/effects/beam_slots.c b/src/overlays/shared/rendering/effects/beam_slots.c index b66d1cd580..373d947672 100644 --- a/src/overlays/shared/rendering/effects/beam_slots.c +++ b/src/overlays/shared/rendering/effects/beam_slots.c @@ -142,10 +142,10 @@ typedef struct { f32 v[4][4]; s32 col[4]; f32 uv[4][2]; - s64 r70; + s64 clamp; s64 r78; - u64 r80; - u64 r88; + u64 tex1; + u64 alpha; } Q_e3388; extern void normalize_vector_xyz(void *, void *, f32) __asm__("FUN_001f9bf8"); @@ -717,9 +717,9 @@ void draw_beam_endpoint_quads_with_glow(s32 unused, s32 beam_slot) { FUN_001f9bf8_e3388(endpoint_quad_side_axis, endpoint_quad_side_axis, -1.0f); FUN_001f9ad8_e3388(endpoint_quad_up_axis, endpoint_quad_side_axis, endpoint_to_camera_axis); geometry_quad.r78 = get_effect_texture(0xB); - geometry_quad.r88 = 0xFF00000044; - geometry_quad.r80 = 0xFF9000000260; - geometry_quad.r70 = 5; + geometry_quad.alpha = 0xFF00000044; + geometry_quad.tex1 = 0xFF9000000260; + geometry_quad.clamp = 5; geometry_quad.col[3] = -1; geometry_quad.col[2] = -1; geometry_quad.col[1] = -1; @@ -742,7 +742,7 @@ void draw_beam_endpoint_quads_with_glow(s32 unused, s32 beam_slot) { FUN_001f9a10_e3388(geometry_quad.v[i], geometry_quad.v[i], core_quad_jitter_offset); } draw_geometry_quad(&geometry_quad, 0, 0); - geometry_quad.r88 = 0xFF00000048; + geometry_quad.alpha = 0xFF00000048; geometry_quad.col[3] = 0x607F4040; geometry_quad.col[2] = 0x607F4040; geometry_quad.col[1] = 0x607F4040; @@ -760,7 +760,7 @@ void draw_beam_endpoint_quads_with_glow(s32 unused, s32 beam_slot) { FUN_001f9bf8_e3388(endpoint_quad_side_axis, endpoint_quad_side_axis, -1.0f); FUN_001f9ad8_e3388(endpoint_quad_up_axis, endpoint_quad_side_axis, endpoint_to_camera_axis); quad_scale = random_float_between(0.2f, 0.225f); - geometry_quad.r88 = 0xFF00000044; + geometry_quad.alpha = 0xFF00000044; geometry_quad.col[3] = -1; geometry_quad.col[2] = -1; geometry_quad.col[1] = -1; @@ -771,7 +771,7 @@ void draw_beam_endpoint_quads_with_glow(s32 unused, s32 beam_slot) { FUN_001f9a10_e3388(geometry_quad.v[i], geometry_quad.v[i], core_quad_jitter_offset); } draw_geometry_quad(&geometry_quad, 0, 0); - geometry_quad.r88 = 0xFF00000048; + geometry_quad.alpha = 0xFF00000048; geometry_quad.col[3] = 0x607F4040; geometry_quad.col[2] = 0x607F4040; geometry_quad.col[1] = 0x607F4040; diff --git a/src/overlays/shared/weapons/mine.c b/src/overlays/shared/weapons/mine.c index e4962d03fe..1994595387 100644 --- a/src/overlays/shared/weapons/mine.c +++ b/src/overlays/shared/weapons/mine.c @@ -218,10 +218,10 @@ typedef struct { V_2a9c50 corner[4]; u32 color[4]; f32 uv[8]; - s64 unk70; + s64 clamp; s64 tex; - s64 unk80; - s64 unk88; + s64 tex1; + s64 alpha; } Q_2a9c50; typedef struct { @@ -306,9 +306,9 @@ void draw_mine_predicted_impact_marker(M_2a9c50 *moby) { quad.color[2] = 0x80808080; quad.color[3] = 0x80808080; quad.tex = get_effect_texture(odd ? 0x12 : 0x11); - quad.unk80 = 0xFF9000000260L; - quad.unk88 = 0x8000000048L; - quad.unk70 = 0; + quad.tex1 = 0xFF9000000260L; + quad.alpha = 0x8000000048L; + quad.clamp = 0; quad.corner[0].f[0] = -1.0f; quad.corner[0].f[1] = 0.0f; quad.corner[0].f[2] = 1.0f; diff --git a/src/overlays/shared/weapons/morphoray.c b/src/overlays/shared/weapons/morphoray.c index d088181ba3..27aae47811 100644 --- a/src/overlays/shared/weapons/morphoray.c +++ b/src/overlays/shared/weapons/morphoray.c @@ -119,7 +119,7 @@ typedef struct { OvlQuad corner[4]; int color[4]; float uv[8]; - long unk70, tex, unk80, unk88; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Quad; typedef struct { @@ -129,11 +129,11 @@ typedef struct { typedef struct { V_2be890 corner[4]; int color[4]; - int unk50, unk54, unk58; - float unk5C, unk60; - int corner_2_texture_v; - float unk68, unk6C; - long unk70, tex, unk80, unk88; + int u0, v0, u1; /* texture coordinates of the four corners */ + float v1, u2; + int v2; + float u3, v3; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Q_2be890; extern float fast_difference_between_rotations(float, float) __asm__("FUN_001fa688"); @@ -2054,9 +2054,9 @@ void draw_beam_ring_and_rail_effects(void *moby) { k = D_0013E535; c = k ? D_L00_00161798 : beam_ring_default_vertex_color_gp; quad.tex = get_effect_texture(beam_ring_texture_index_gp); - quad.unk80 = 0xFF9000000260L; - quad.unk88 = 0x8000000048L; - quad.unk70 = 0; + quad.tex1 = 0xFF9000000260L; + quad.alpha = 0x8000000048L; + quad.clamp = 0; quad.color[3] = c; quad.color[2] = c; quad.color[1] = c; @@ -2350,21 +2350,21 @@ void draw_beam_origin_camera_facing_quads(void *mv) { int i, j; quad.tex = get_effect_texture(11); first_pass_vertex_color = beam_origin_quad_first_pass_vertex_color_gp; - quad.unk88 = 0x8000000048L; - quad.unk80 = 0xFF9000000260L; - quad.unk70 = 0; - quad.unk50 = 0; - quad.unk54 = 0; + quad.alpha = 0x8000000048L; + quad.tex1 = 0xFF9000000260L; + quad.clamp = 0; + quad.u0 = 0; + quad.v0 = 0; quad.color[3] = first_pass_vertex_color; quad.color[2] = first_pass_vertex_color; quad.color[1] = first_pass_vertex_color; quad.color[0] = first_pass_vertex_color; - quad.unk58 = 0; - quad.unk5C = 1.0f; - quad.unk60 = 1.0f; - quad.corner_2_texture_v = 0; - quad.unk68 = 1.0f; - quad.unk6C = 1.0f; + quad.u1 = 0; + quad.v1 = 1.0f; + quad.u2 = 1.0f; + quad.v2 = 0; + quad.u3 = 1.0f; + quad.v3 = 1.0f; FUN_001f9bf8_2be890(&offset_vector, moby_bytes + 0xD0, beam_origin_quad_basis_offset_length_gp); FUN_001f9a10_2be890(&camera_facing_transform[3], &beam_nodes[0], &offset_vector); FUN_001f9a28_2be890( diff --git a/src/overlays/shared/weapons/taunter.c b/src/overlays/shared/weapons/taunter.c index b21081babf..aee847a7ff 100644 --- a/src/overlays/shared/weapons/taunter.c +++ b/src/overlays/shared/weapons/taunter.c @@ -82,7 +82,7 @@ typedef struct { struct { f32 u, v; } uv[4]; - long unk70, tex, unk80, unk88; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Q_2b7568; typedef struct { @@ -645,9 +645,9 @@ void draw_taunter_effect_quads(u8 *source_moby) { f32 fade_factor, sz; u32 col; quad.tex = get_effect_texture(8); - quad.unk88 = 0x8000000048L; - quad.unk80 = 0xFF9000000260L; - quad.unk70 = 0; + quad.alpha = 0x8000000048L; + quad.tex1 = 0xFF9000000260L; + quad.clamp = 0; quad.uv[0].u = 0.0f; quad.uv[0].v = 0.0f; quad.uv[1].u = 0.0f; diff --git a/src/overlays/shared/weapons/tesla_claw_beam.c b/src/overlays/shared/weapons/tesla_claw_beam.c index 1b7f4e247c..20cb7f3e30 100644 --- a/src/overlays/shared/weapons/tesla_claw_beam.c +++ b/src/overlays/shared/weapons/tesla_claw_beam.c @@ -59,7 +59,7 @@ typedef struct { V_2bb0b0 corner[4]; unsigned int color[4]; UV uv[4]; - long unk70, tex, unk80, unk88; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Q_2bb0b0; extern float fast_add_rotations(float, float) __asm__("FUN_001fa580"); @@ -1593,9 +1593,9 @@ void draw_beam_anchor_camera_facing_quads(void *mv) { float corner_scale; int i; quad.tex = get_effect_texture(0xB); - quad.unk88 = 0x8000000048L; - quad.unk80 = 0xFF9000000260L; - quad.unk70 = 0; + quad.alpha = 0x8000000048L; + quad.tex1 = 0xFF9000000260L; + quad.clamp = 0; fast_vec_sub( &camera_facing_transform[3], &(*(V_2bb0b0 *)&g_debug_camera), quad_anchor_position); fast_vec_normalize(&camera_facing_transform[3], &camera_facing_transform[3], 0.3f); diff --git a/src/overlays/shared/weapons/walloper.c b/src/overlays/shared/weapons/walloper.c index b37ae07f80..65cb457621 100644 --- a/src/overlays/shared/weapons/walloper.c +++ b/src/overlays/shared/weapons/walloper.c @@ -42,11 +42,11 @@ typedef struct { typedef struct { V_2bc1a0 corner[4]; unsigned int color[4]; - int unk50, unk54, unk58; - float unk5C, unk60; - int corner_2_texture_v; - float unk68, unk6C; - long unk70, tex, unk80, unk88; + int u0, v0, u1; /* texture coordinates of the four corners */ + float v1, u2; + int v2; + float u3, v3; + long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Q_2bc1a0; extern float fast_vec_length(void *) __asm__("FUN_001f9af0"); @@ -1047,17 +1047,17 @@ void draw_walloper_camera_facing_quad(void *mv) { walloper_quad_basis_offset_scale_gp, &scaled_basis_offset, moby_bytes + 0xD0); fast_vec_add(&camera_facing_transform[3], &scaled_basis_offset, moby_bytes + 0x10); quad.tex = get_effect_texture(walloper_quad_texture_index_gp); - quad.unk88 = 0x8000000048L; - quad.unk80 = 0xFF9000000260L; - quad.unk70 = 0; - quad.unk50 = 0; - quad.unk54 = 0; - quad.unk58 = 0; - quad.unk5C = 1.0f; - quad.unk60 = 1.0f; - quad.corner_2_texture_v = 0; - quad.unk68 = 1.0f; - quad.unk6C = 1.0f; + quad.alpha = 0x8000000048L; + quad.tex1 = 0xFF9000000260L; + quad.clamp = 0; + quad.u0 = 0; + quad.v0 = 0; + quad.u1 = 0; + quad.v1 = 1.0f; + quad.u2 = 1.0f; + quad.v2 = 0; + quad.u3 = 1.0f; + quad.v3 = 1.0f; if (!random_integer_below(4)) uniform_vertex_color = l00_walloper_quad_rare_base_vertex_color; else From 31092abcded03705c611c8b5bb2606fd955dd97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:40:29 +0000 Subject: [PATCH 089/213] decomp: name mine, turret shot and thrown weapon fields in shared weapons --- include/rnc/overlay/shared/weapons/mine.h | 2 +- src/overlays/l00/mobys/veldin_robot_enemy.c | 12 ++++---- .../shared/enemies/gadgebot_spawn_container.c | 12 ++++---- src/overlays/shared/weapons/bomb_glove_bomb.c | 12 ++++---- src/overlays/shared/weapons/decoy.c | 8 +++--- .../draw_moby_oscillating_textured_quads.c | 12 ++++---- .../shared/weapons/glove_of_doom_bomb.c | 6 ++-- src/overlays/shared/weapons/mine.c | 14 +++++----- src/overlays/shared/weapons/turret_shot.c | 28 +++++++++---------- 9 files changed, 53 insertions(+), 53 deletions(-) diff --git a/include/rnc/overlay/shared/weapons/mine.h b/include/rnc/overlay/shared/weapons/mine.h index 6942cabfdd..7500684715 100644 --- a/include/rnc/overlay/shared/weapons/mine.h +++ b/include/rnc/overlay/shared/weapons/mine.h @@ -32,7 +32,7 @@ struct W910 { short homing_phase; /* 0x52: 1 rise, 2 fall, 0 level */ M910 *target; /* 0x54 */ int homing_timer; /* 0x58: the mine explodes when it runs out */ - int i5C; + int spawn_frame; float f60; float f64; int voice; /* 0x68: -1 none */ diff --git a/src/overlays/l00/mobys/veldin_robot_enemy.c b/src/overlays/l00/mobys/veldin_robot_enemy.c index bd6bd533ba..87d3f01680 100644 --- a/src/overlays/l00/mobys/veldin_robot_enemy.c +++ b/src/overlays/l00/mobys/veldin_robot_enemy.c @@ -622,10 +622,10 @@ typedef struct { s32 unk64; f32 unk68; f32 unk6C; - s64 unk70; + s64 clamp; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ s64 tex; - s64 unk80; - s64 unk88; + s64 tex1; + s64 alpha; } GlowQuad; typedef struct { @@ -663,9 +663,9 @@ void draw_veldin_robot_effect_quad(GlowMoby *moby) { fast_vec_normalize(&quad_transform[1], &quad_transform[1], -1.0f); fast_vec_cross(&quad_transform[2], &quad_transform[1], &quad_transform[0]); quad.tex = get_effect_texture(0xB); - quad.unk88 = 0x8000000048L; - quad.unk80 = 0xFF9000000260L; - quad.unk70 = 5; + quad.alpha = 0x8000000048L; + quad.tex1 = 0xFF9000000260L; + quad.clamp = 5; quad.color[3] = 0x80FFFFFF; quad.color[2] = 0x80FFFFFF; quad.color[1] = 0x80FFFFFF; diff --git a/src/overlays/shared/enemies/gadgebot_spawn_container.c b/src/overlays/shared/enemies/gadgebot_spawn_container.c index 845eee438e..d43aa1c538 100644 --- a/src/overlays/shared/enemies/gadgebot_spawn_container.c +++ b/src/overlays/shared/enemies/gadgebot_spawn_container.c @@ -23,10 +23,10 @@ typedef struct { float corner[4][4]; int color[4]; float uv[4][2]; - long unk70; + long clamp; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ long tex; - long unk80; - long unk88; + long tex1; + long alpha; } L06BackdropQuad; extern unsigned char *spawn_spinning_fade_in_out_effect_particle( @@ -268,13 +268,13 @@ void draw_gadgebot_spawn_container(char *moby) { } } quad.tex = get_effect_texture(*(int *)&gadgebot_container_texture_index_gp); - quad.unk80 = 0xff9000000260L; - quad.unk88 = (long)*(int *)&gadgebot_container_blend_minuend_selector_gp | + quad.tex1 = 0xff9000000260L; + quad.alpha = (long)*(int *)&gadgebot_container_blend_minuend_selector_gp | (long)*(int *)&gadgebot_container_blend_subtrahend_selector_gp << 2 | (long)*(int *)&gadgebot_container_blend_factor_selector_gp << 4 | (long)*(int *)&gadgebot_container_blend_addend_selector_gp << 6 | (long)*(int *)&gadgebot_container_blend_fixed_alpha_gp << 32; - quad.unk70 = 0; + quad.clamp = 0; quad.color[3] = *(int *)&gadgebot_container_quad_color_gp; quad.color[2] = *(int *)&gadgebot_container_quad_color_gp; quad.color[1] = *(int *)&gadgebot_container_quad_color_gp; diff --git a/src/overlays/shared/weapons/bomb_glove_bomb.c b/src/overlays/shared/weapons/bomb_glove_bomb.c index 2f1b69c76a..0066958c62 100644 --- a/src/overlays/shared/weapons/bomb_glove_bomb.c +++ b/src/overlays/shared/weapons/bomb_glove_bomb.c @@ -54,10 +54,10 @@ typedef struct { V_2acbf0_002acbf0 corner[4]; u32 color[4]; f32 uv[8]; - s64 unk70; + s64 clamp; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ s64 tex; - s64 unk80; - s64 unk88; + s64 tex1; + s64 alpha; } Q_2acbf0_002acbf0; typedef struct { @@ -779,9 +779,9 @@ void draw_bomb_landing_marker(M_2acbf0_002acbf0 *moby) { quad.color[2] = 0x80808080; quad.color[3] = 0x80808080; quad.tex = get_effect_texture(odd ? 0x12 : 0x11); - quad.unk80 = 0xFF9000000260L; - quad.unk88 = 0x8000000048L; - quad.unk70 = 0; + quad.tex1 = 0xFF9000000260L; + quad.alpha = 0x8000000048L; + quad.clamp = 0; quad.corner[0].f[0] = -1.0f; quad.corner[0].f[1] = 0.0f; quad.corner[0].f[2] = 1.0f; diff --git a/src/overlays/shared/weapons/decoy.c b/src/overlays/shared/weapons/decoy.c index 05b599eb48..a954ec8394 100644 --- a/src/overlays/shared/weapons/decoy.c +++ b/src/overlays/shared/weapons/decoy.c @@ -44,7 +44,7 @@ typedef struct DecoyVars { u8 pad20[0x20]; char *holder; s16 timer; - s16 unk46; + s16 landing_predicted; f32 health; f32 target_rot_x; f32 target_rot_y; @@ -95,7 +95,7 @@ typedef struct { Vec4 normal; /* 0x30: surface normal there */ struct Moby *holder; /* 0x40: moby it was thrown from */ s16 timer; /* 0x44 */ - s16 unk46; + s16 landing_predicted; } ThrowVars; extern void fast_vec_sub(void *, void *, void *) __asm__("FUN_001f9a28"); @@ -402,7 +402,7 @@ s32 predict_thrown_moby_landing(ThrowVars *throw_vars, struct Moby *thrown_moby, prediction_countdown = timer; if (flag) - throw_vars->unk46 = 1; + throw_vars->landing_predicted = 1; } } predicted_velocity.f[2] -= frame_time * 0.5f; @@ -589,7 +589,7 @@ void decoy_update(char *moby) { else MOBY(moby)->flags &= 0xffbe; if (*(short *)(decoy_instance_vars->holder + 0xa6) == 0x232 && - decoy_instance_vars->unk46 == 0 && + decoy_instance_vars->landing_predicted == 0 && FUN_001ff3d8_2c4380(&decoy_instance_vars->velocity) > 0.0f) { if (hero.ground_moby == 0 || !FUN_L00_002603d0((int)hero.ground_moby)) predict_thrown_moby_landing((ThrowVars *)decoy_instance_vars, (struct Moby *)moby, 1); diff --git a/src/overlays/shared/weapons/draw_moby_oscillating_textured_quads.c b/src/overlays/shared/weapons/draw_moby_oscillating_textured_quads.c index 7223859510..4e1051d956 100644 --- a/src/overlays/shared/weapons/draw_moby_oscillating_textured_quads.c +++ b/src/overlays/shared/weapons/draw_moby_oscillating_textured_quads.c @@ -19,10 +19,10 @@ typedef struct { V_2acbf0_002acbf0 corner[4]; u32 color[4]; f32 uv[8]; - s64 unk70; + s64 clamp; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ s64 tex; - s64 unk80; - s64 unk88; + s64 tex1; + s64 alpha; } Q_2acbf0_002acbf0; typedef struct { @@ -83,9 +83,9 @@ void draw_moby_oscillating_textured_quads(M_2acbf0_002acbf0 *moby) { quad.color[2] = 0x80808080; quad.color[3] = 0x80808080; quad.tex = get_effect_texture(odd ? 0x12 : 0x11); - quad.unk80 = 0xFF9000000260L; - quad.unk88 = 0x8000000048L; - quad.unk70 = 0; + quad.tex1 = 0xFF9000000260L; + quad.alpha = 0x8000000048L; + quad.clamp = 0; quad.corner[0].f[0] = -1.0f; quad.corner[0].f[1] = 0.0f; quad.corner[0].f[2] = 1.0f; diff --git a/src/overlays/shared/weapons/glove_of_doom_bomb.c b/src/overlays/shared/weapons/glove_of_doom_bomb.c index 84a9962b7e..2cbb38dc67 100644 --- a/src/overlays/shared/weapons/glove_of_doom_bomb.c +++ b/src/overlays/shared/weapons/glove_of_doom_bomb.c @@ -37,7 +37,7 @@ typedef struct { struct Moby *holder; /* 0x30: moby it was thrown from */ s32 effect_timer; /* 0x34 */ s16 timer; /* 0x38 */ - s16 unk46; + s16 landing_predicted; s32 spawn_count; /* 0x3C */ } ThrowVars; @@ -116,7 +116,7 @@ s32 predict_doom_bot_spawner_landing(ThrowVars *throw_vars, struct Moby *thrown_ prediction_timer = timer; if (flag) - throw_vars->unk46 = 1; + throw_vars->landing_predicted = 1; } } simulated_velocity.f[2] -= D_0015ED6C * 0.5f; @@ -220,7 +220,7 @@ void doom_bot_spawner_update(struct Moby *thrown_moby) { thrown_moby->flags |= 0x41; else thrown_moby->flags &= 0xffbe; - if (spawner_throw_vars->holder->oclass == 0xe5 && spawner_throw_vars->unk46 == 0 && + if (spawner_throw_vars->holder->oclass == 0xe5 && spawner_throw_vars->landing_predicted == 0 && fast_vec_length(spawner_throw_vars) > 0.0f) { if (!hero.ground_moby || !get_moby_pvars_link((char *)hero.ground_moby)) predict_doom_bot_spawner_landing(spawner_throw_vars, thrown_moby, 1); diff --git a/src/overlays/shared/weapons/mine.c b/src/overlays/shared/weapons/mine.c index 1994595387..ac8cbde57f 100644 --- a/src/overlays/shared/weapons/mine.c +++ b/src/overlays/shared/weapons/mine.c @@ -39,7 +39,7 @@ typedef struct MineVars { f32 unk38; f32 unk3C; u8 pad40[0x1c]; - s32 unk5C; + s32 spawn_frame; /* game frame at spawn; with 8 mines out the oldest gets -1 */ f32 unk60; f32 unk64; s32 voice; @@ -373,7 +373,7 @@ typedef union { typedef struct { u8 pad[0x5C]; - s32 i5C; + s32 spawn_frame; } D_2aa008; typedef struct { @@ -440,7 +440,7 @@ unsigned char *spawn_mine(int mine_owner_moby, OvlQuad *spawn_position) { mine_vars->unk60 = z; mine_vars->bob_phase = z; mine_vars->bob_amplitude = z; - mine_vars->unk5C = x; + mine_vars->spawn_frame = x; mine_vars->bob_start_frame = 0; mine_vars->voice = -1; MOBY(mine_moby)->collision = 0; @@ -494,15 +494,15 @@ void initialize_moby_motion_at_position(V_2aa008 *requested_position, if (scanned_moby->moby_class == initialized_moby->moby_class) if (scanned_moby != initialized_moby) { if (best == 0 || - ((D_2aa008 *)scanned_moby->moby_private_vars)->i5C < bestv) { - bestv = ((D_2aa008 *)scanned_moby->moby_private_vars)->i5C; + ((D_2aa008 *)scanned_moby->moby_private_vars)->spawn_frame < bestv) { + bestv = ((D_2aa008 *)scanned_moby->moby_private_vars)->spawn_frame; best = scanned_moby; } count++; } } if (count >= 8) - ((D_2aa008 *)best->moby_private_vars)->i5C = -1; + ((D_2aa008 *)best->moby_private_vars)->spawn_frame = -1; qcopy(&initialized_moby->v10, requested_position); vector_scratch.q = ((Q_2aa008 *)hero.moby)->v10.q; vector_scratch.f[2] = requested_position->f[2]; @@ -1154,7 +1154,7 @@ void mine_update(M910 *mine_moby) { } } v->extended_range = 0; - if (v->i5C < 0 || *(int *)&mine_force_burst != 0) { + if (v->spawn_frame < 0 || *(int *)&mine_force_burst != 0) { cart_burst(mine_moby, &mine_moby->pos, -1, 0.33f, 13.0f); mine_spawn_drops(mine_moby, D_L00_001B07B0); mark_moby_for_removal(mine_moby); diff --git a/src/overlays/shared/weapons/turret_shot.c b/src/overlays/shared/weapons/turret_shot.c index c345b2ae3a..92000224e6 100644 --- a/src/overlays/shared/weapons/turret_shot.c +++ b/src/overlays/shared/weapons/turret_shot.c @@ -17,15 +17,15 @@ /* pvars of the projectile moby FUN_L09_00307ba8 spawns */ typedef struct { - OvlVec4 vel; /* 0x00 */ - f32 spin; /* 0x10 */ - s32 unk14; /* 0x14 */ - void *owner; /* 0x18 */ - s16 life; /* 0x1C */ - s16 life_max; /* 0x1E */ - f32 dist; /* 0x20: distance from the hero at spawn */ - s32 unk24; /* 0x24 */ - s32 unk28; /* 0x28 */ + OvlVec4 vel; /* 0x00 */ + f32 spin; /* 0x10 */ + s32 unk14; /* 0x14 */ + void *owner; /* 0x18 */ + s16 life; /* 0x1C */ + s16 life_max; /* 0x1E */ + f32 dist; /* 0x20: distance from the hero at spawn */ + s32 approached; /* 0x24: set once the shot got closer to the hero */ + s32 sound_played; /* 0x28 */ } ShotVars; /* Optional query block for collision_line: a swept probe along dir. */ @@ -102,8 +102,8 @@ struct Moby *spawn_turret_shot(void *owner, OvlVec4 *pos, OvlVec4 *vel, s32 life projectile_vars->life = life; projectile_vars->life_max = life; projectile_vars->dist = fast_vec_dist((OvlVec4 *)&spawned_moby->pos, &D_0013F3D0_307ba8); - projectile_vars->unk24 = 0; - projectile_vars->unk28 = 0; + projectile_vars->approached = 0; + projectile_vars->sound_played = 0; trail = life * 5 / 4; spawned_moby->flags |= 0x200; spawned_moby->alpha = 0x40; @@ -139,13 +139,13 @@ void turret_shot_update(struct Moby *projectile_moby) { distance_to_hero = fast_vec_dist(&projectile_moby->pos, &D_0013F3D0_307d68); qcopy(&previous_projectile_position, &projectile_moby->pos); fast_vec_add(&projectile_moby->pos, &projectile_moby->pos, &projectile_vars->vel); - if (projectile_vars->unk28 == 0 && projectile_vars->unk24 != 0 && + if (projectile_vars->sound_played == 0 && projectile_vars->approached != 0 && projectile_vars->dist < distance_to_hero && distance_to_hero < 3.0f) { allocate_voice_for_target_entry(0, 0, projectile_moby); - projectile_vars->unk28 = 1; + projectile_vars->sound_played = 1; } if (distance_to_hero < projectile_vars->dist) - projectile_vars->unk24 = 1; + projectile_vars->approached = 1; projectile_vars->dist = distance_to_hero; if (projectile_moby->pos.x < 2.0f || 1021.0f < projectile_moby->pos.x || projectile_moby->pos.y < 2.0f || 1021.0f < projectile_moby->pos.y || From 5d42b320c28e74dbf36321bb38ba1fb7e3f37b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:42:49 +0000 Subject: [PATCH 090/213] decomp: name the big head cheat manipulator fields in enemy pvars --- src/overlays/l02/mobys/sand_shark.c | 4 ++-- src/overlays/l03/mobys/mine_layer.c | 6 +++--- src/overlays/l06/mobys/alien_queen.c | 5 +++-- src/overlays/l06/mobys/alien_snapper.c | 4 ++-- src/overlays/l08/mobys/blarg_bombthrower.c | 4 ++-- src/overlays/l10/mobys/darter.c | 4 ++-- src/overlays/l10/mobys/screamer.c | 4 ++-- src/overlays/l13/mobys/blarg_space_commando.c | 4 ++-- src/overlays/l16/mobys/chomper.c | 4 ++-- src/overlays/shared/enemies/blarg_space_commando.c | 4 ++-- src/overlays/shared/enemies/frog.c | 5 +++-- src/overlays/shared/enemies/horny_toad.c | 4 ++-- src/overlays/shared/enemies/large_amoeboid.c | 4 ++-- src/overlays/shared/enemies/plasmabot.c | 8 ++++---- src/overlays/shared/enemies/seeker.c | 4 ++-- 15 files changed, 35 insertions(+), 33 deletions(-) diff --git a/src/overlays/l02/mobys/sand_shark.c b/src/overlays/l02/mobys/sand_shark.c index 4c7dc85694..2112e3f950 100644 --- a/src/overlays/l02/mobys/sand_shark.c +++ b/src/overlays/l02/mobys/sand_shark.c @@ -243,7 +243,7 @@ typedef struct { /* 0x294 */ float navigation_arrive_distance; /* 0x298 */ int outside_path_return_active; /* 0x29C */ int death_landing_particles_emitted; - /* 0x2A0 */ char unk2A0[0x10]; + /* 0x2A0 */ char big_head_manipulator[0x10]; } Varsd3e50; extern float D_0015ED6C; @@ -311,7 +311,7 @@ void sand_shark_update(struct Moby *moby) { *(volatile unsigned int *)0x10000010 = 0x81; *(volatile unsigned int *)0x10000000 = 0; sand_shark_behavior_vars = (Varsd3e50 *)moby->pvars; - FUN_L00_00263ac8_e50(moby, 0, sand_shark_behavior_vars->unk2A0, 2.1f); + FUN_L00_00263ac8_e50(moby, 0, sand_shark_behavior_vars->big_head_manipulator, 2.1f); if (moby->visible != 0 && fast_vec_dist(&moby->pos, D_L02_001673C0_e50) < 28.0f) { FUN_L00_0025a120_e50(moby); moby->shadow_range = 0x16; diff --git a/src/overlays/l03/mobys/mine_layer.c b/src/overlays/l03/mobys/mine_layer.c index ccf5195dd8..7ea1d2049a 100644 --- a/src/overlays/l03/mobys/mine_layer.c +++ b/src/overlays/l03/mobys/mine_layer.c @@ -60,8 +60,8 @@ typedef struct { s16 fire_timer; /* 0x154 */ s16 patrol_timer; /* 0x156 */ u8 pad158[4]; - s32 alert_timer; /* 0x15C */ - u8 unk160[0x10]; /* 0x160: FUN_L00_00263ac8 record */ + s32 alert_timer; /* 0x15C */ + u8 big_head_manipulator[0x10]; /* 0x160: FUN_L00_00263ac8 record */ } TrooperVars; s32 mine_layer_fire_interval_frames_gp __asm__("D_L03_00161918") = 0x12c; @@ -127,7 +127,7 @@ void mine_layer_update(struct Moby *mine_layer_moby) { select_moby_target_with_hero_fallback(mine_layer_moby, &target, 100.0f); sight = 14.0f; - FUN_L00_00263ac8(mine_layer_moby, 0, mine_layer_vars->unk160, 4.5f); + FUN_L00_00263ac8(mine_layer_moby, 0, mine_layer_vars->big_head_manipulator, 4.5f); handle_mine_layer_damage(mine_layer_moby); if (mine_layer_vars->alerted) { mine_layer_vars->alerted = 0; diff --git a/src/overlays/l06/mobys/alien_queen.c b/src/overlays/l06/mobys/alien_queen.c index f47f781a27..a86226d4b6 100644 --- a/src/overlays/l06/mobys/alien_queen.c +++ b/src/overlays/l06/mobys/alien_queen.c @@ -401,7 +401,7 @@ typedef struct AlienQueenVars { u8 pad_124[0x4]; f32 glow_phase; s32 timer_12C; - u8 unk130; + u8 big_head_manipulator; u8 pad_131[0x3F]; s32 intro_or_recovery_delay_active; f32 recovery_health; @@ -416,7 +416,8 @@ void alien_queen_update(unsigned char *moby) { FUN_L06_002fa9c0_c(moby); target = alien_queen_update_vars->target; - func_L00_00264B40_q(moby, *(int *)&D_L06_00161EF0, 1.9f, &alien_queen_update_vars->unk130); + func_L00_00264B40_q( + moby, *(int *)&D_L06_00161EF0, 1.9f, &alien_queen_update_vars->big_head_manipulator); if ((unsigned char)moby[0x31] != 0 && fast_vec_dist(moby + 0x10, D_L06_00167540_q) < 45.0f) { func_L00_0025B178_q(moby); moby[0x7F] = 0x24; diff --git a/src/overlays/l06/mobys/alien_snapper.c b/src/overlays/l06/mobys/alien_snapper.c index ef57be7d33..f6b3e409a2 100644 --- a/src/overlays/l06/mobys/alien_snapper.c +++ b/src/overlays/l06/mobys/alien_snapper.c @@ -136,7 +136,7 @@ typedef struct { f32 f1C8; /* 0x1C8 */ s32 f1CC; /* 0x1CC */ u8 pad1D0[0x10]; - u8 f1E0[0x10]; /* 0x1E0 */ + u8 big_head_manipulator[0x10]; /* 0x1E0 */ } SnapperVars_91A8; typedef struct { @@ -292,7 +292,7 @@ void alien_snapper_update(Moby *moby) { float bite_query_position[4]; update_alien_snapper_hit_response_and_targeting(moby); - func_L00_00264B40_91A8(2.3f, moby, 1, snapper_behavior->f1E0); + func_L00_00264B40_91A8(2.3f, moby, 1, snapper_behavior->big_head_manipulator); if (moby->visible != 0 && fast_vec_dist(&moby->pos, D_L06_00167540_macro) < 27.0f) { func_L00_0025B178_91A8(moby); moby->shadow_range = 0x15; diff --git a/src/overlays/l08/mobys/blarg_bombthrower.c b/src/overlays/l08/mobys/blarg_bombthrower.c index 70489eb06f..cf134af5dd 100644 --- a/src/overlays/l08/mobys/blarg_bombthrower.c +++ b/src/overlays/l08/mobys/blarg_bombthrower.c @@ -85,7 +85,7 @@ typedef struct { short s130, s132; int waypoint_reselection_timer; char pad138[0x28]; - char blk160[0x10]; + char big_head_manipulator[0x10]; } Data_DBF68; char *spawn_bomb_with_velocity(int arg, char *pos, char *vec) __asm__("FUN_L08_002d22e0"); @@ -219,7 +219,7 @@ void blarg_bombthrower_update(struct Moby *moby) { struct Moby *old_waypoint; damage = 0.0f; - func_L00_00264B40_x(moby, D_L08_001619AC_gp, 3.0f, bombthrower_vars->blk160); + func_L00_00264B40_x(moby, D_L08_001619AC_gp, 3.0f, bombthrower_vars->big_head_manipulator); if (moby->visible != 0) { if (fast_vec_dist(&moby->pos, D_L08_001675C0) < 29.0f) { FUN_L00_0025a120(moby); diff --git a/src/overlays/l10/mobys/darter.c b/src/overlays/l10/mobys/darter.c index 70409d040d..458aa6447a 100644 --- a/src/overlays/l10/mobys/darter.c +++ b/src/overlays/l10/mobys/darter.c @@ -114,7 +114,7 @@ typedef struct Vars_2e01a8 { float height_offset; int height_timer; char p1A8[0xC8]; - char a270[4]; + char big_head_manipulator[4]; } Vars_2e01a8; extern float l10_darter_attack_distance __asm__("D_L10_00161DFC") __attribute__((sda)); @@ -155,7 +155,7 @@ void darter_update(Moby *moby) { update_darter_hit_reactions_and_targeting(moby); target = darter_vars->target; - func_L00_00264B40_2E0630(2.5f, moby, 1, darter_vars->a270); + func_L00_00264B40_2E0630(2.5f, moby, 1, darter_vars->big_head_manipulator); if (moby->visible != 0 && fast_vec_dist(&moby->pos, &D_L10_00167240) < 29.0f) { func_L00_0025B178_2E0630(moby); moby->shadow_range = 0x17; diff --git a/src/overlays/l10/mobys/screamer.c b/src/overlays/l10/mobys/screamer.c index 4fe2d709b7..8af041acd7 100644 --- a/src/overlays/l10/mobys/screamer.c +++ b/src/overlays/l10/mobys/screamer.c @@ -70,7 +70,7 @@ typedef struct D_2E0630 { char p178[0x24]; int wander_timer; char p1A0[0xD0]; - char sound_state[4]; + char big_head_manipulator[4]; } D_2E0630; /* Entry 2 is the moby array D_L10_0015FFD8. Retail reaches it with the lui/lw macro in some functions and through $gp in toxic_crab_update; going through this table 8 bytes lower keeps the macro form under SN. */ @@ -111,7 +111,7 @@ void screamer_update(Moby *moby) { func_L10_002E0FF8_2E0630(moby); leader = screamer_data->leader; - func_L00_00264B40_2E0630(2.5f, moby, 0, screamer_data->sound_state); + func_L00_00264B40_2E0630(2.5f, moby, 0, screamer_data->big_head_manipulator); if (moby->visible != 0 && fast_vec_dist(&moby->pos, &D_L10_00167240) < 29.0f) { func_L00_0025B178_2E0630(moby); moby->shadow_range = 0x17; diff --git a/src/overlays/l13/mobys/blarg_space_commando.c b/src/overlays/l13/mobys/blarg_space_commando.c index 1ff9ea9f3f..775643616b 100644 --- a/src/overlays/l13/mobys/blarg_space_commando.c +++ b/src/overlays/l13/mobys/blarg_space_commando.c @@ -120,7 +120,7 @@ typedef struct { u8 pad1AC[0x34]; Vec4 muzzle_position; u8 pad1F0[0x210]; - u8 unk400[1]; + u8 big_head_manipulator[1]; } Vars_309330; extern int move_moby_with_ground_and_collision_checks( @@ -194,7 +194,7 @@ void blarg_space_commando_update(struct Moby *moby) { FUN_L13_00308d10_c(moby); target = blarg_space_commando_vars->target; - FUN_L00_00263ac8(2.5f, moby, 1, blarg_space_commando_vars->unk400); + FUN_L00_00263ac8(2.5f, moby, 1, blarg_space_commando_vars->big_head_manipulator); if (moby->visible != 0 && fast_vec_dist(&moby->pos, D_L13_001670C0) < 28.0f) { FUN_L00_0025a120(moby); moby->shadow_range = 0x16; diff --git a/src/overlays/l16/mobys/chomper.c b/src/overlays/l16/mobys/chomper.c index 907b071c6b..bd02ab62c7 100644 --- a/src/overlays/l16/mobys/chomper.c +++ b/src/overlays/l16/mobys/chomper.c @@ -99,14 +99,14 @@ typedef struct ChomperVars { f32 travel_distance_velocity; f32 previous_height_drop; u8 pad_20C[0x14]; - u8 unk220; + u8 big_head_manipulator; } ChomperVars; /* Moby class 1445 */ void chomper_update(struct Moby *chomper_moby) { ChomperVars *chomper_data = (ChomperVars *)chomper_moby->pvars; update_chomper_hit_reaction_and_target(chomper_moby); - FUN_L00_00263ac8(2.1f, (int)chomper_moby, 1, &chomper_data->unk220); + FUN_L00_00263ac8(2.1f, (int)chomper_moby, 1, &chomper_data->big_head_manipulator); if (chomper_moby->visible != 0 && fast_vec_dist(&chomper_moby->pos, D_L16_001671C0) < 29.0f) { FUN_L00_0025a120(chomper_moby); chomper_moby->shadow_range = 23; diff --git a/src/overlays/shared/enemies/blarg_space_commando.c b/src/overlays/shared/enemies/blarg_space_commando.c index f4d2bbbcce..0100365924 100644 --- a/src/overlays/shared/enemies/blarg_space_commando.c +++ b/src/overlays/shared/enemies/blarg_space_commando.c @@ -79,7 +79,7 @@ typedef struct { u8 pad1B0[0x50]; Vec4 melee_sweep_previous_position; u8 pad210[0x210]; - u8 unk420[1]; + u8 big_head_manipulator[1]; } Moby1068Vars; extern f32 D_L06_00161FA8 __attribute__((sda)); @@ -151,7 +151,7 @@ void blarg_space_commando_update(struct Moby *moby) { FUN_L06_002feb40_u(moby); target = blarg_commando_state->target; - FUN_L00_00263ac8(moby, 1, blarg_commando_state->unk420, 2.5f); + FUN_L00_00263ac8(moby, 1, blarg_commando_state->big_head_manipulator, 2.5f); if (moby->visible != 0 && fast_vec_dist(&moby->pos, &D_L06_00167540) < 27.0f) { FUN_L00_0025a120(moby); moby->shadow_range = 0x15; diff --git a/src/overlays/shared/enemies/frog.c b/src/overlays/shared/enemies/frog.c index a70067ef4e..552c3dda55 100644 --- a/src/overlays/shared/enemies/frog.c +++ b/src/overlays/shared/enemies/frog.c @@ -80,7 +80,7 @@ typedef struct FrogVars { f32 unk244; f32 glow_animation_phase; f32 path_activation_distance_xy; - u8 unk250[0x4]; + u8 big_head_manipulator[0x4]; } FrogVars; struct MobyHit { @@ -286,7 +286,8 @@ void frog_update(unsigned char *moby) { return; } } - FUN_L00_00263ac8(2.1f, (int)moby, 1, (unsigned char *)(&frog_instance_vars->unk250)); + FUN_L00_00263ac8( + 2.1f, (int)moby, 1, (unsigned char *)(&frog_instance_vars->big_head_manipulator)); update_frog_health_respawn_and_target(moby); if (MOBY(moby)->visible != 0 && fast_vec_dist(&MOBY(moby)->pos, D_L06_00167540) < 14.0f) { FUN_L00_0025a120(moby); diff --git a/src/overlays/shared/enemies/horny_toad.c b/src/overlays/shared/enemies/horny_toad.c index 1b25cb43e6..26c79c0651 100644 --- a/src/overlays/shared/enemies/horny_toad.c +++ b/src/overlays/shared/enemies/horny_toad.c @@ -77,7 +77,7 @@ typedef struct { float turn_speed; float move_speed; float movement_yaw_offset; - u8 unk200[0x40]; + u8 big_head_manipulator[0x40]; ToadVec wander_center; float unk250; float unk254; @@ -215,7 +215,7 @@ void horny_toad_update(Moby *moby) { FUN_L00_0025a120_2d4610(moby); moby->shadow_range = 0x15; } - FUN_L00_00263ac8_2d4610(2.1f, (int)moby, 1, horny_toad_vars->unk200); + FUN_L00_00263ac8_2d4610(2.1f, (int)moby, 1, horny_toad_vars->big_head_manipulator); switch (moby->state) { case HORNY_TOAD_INITIALIZE: { float k; diff --git a/src/overlays/shared/enemies/large_amoeboid.c b/src/overlays/shared/enemies/large_amoeboid.c index 684211acba..eeaeda9c11 100644 --- a/src/overlays/shared/enemies/large_amoeboid.c +++ b/src/overlays/shared/enemies/large_amoeboid.c @@ -88,7 +88,7 @@ typedef struct LargeAmoeboidVars { s32 activation_volume; s32 target_search_gate_moby_index; u8 pad264[0xc]; - u8 unk270[0x4]; + u8 big_head_manipulator[0x4]; } LargeAmoeboidVars; typedef int u128_2F0040 __attribute__((mode(TI))); @@ -251,7 +251,7 @@ void large_amoeboid_update(unsigned char *moby) { MOBY(moby)->flags |= 1; return; } - FUN_L00_00263ac8(2.9f, moby, 0, &large_amoeboid_vars->unk270); + FUN_L00_00263ac8(2.9f, moby, 0, &large_amoeboid_vars->big_head_manipulator); if (MOBY(moby)->visible != 0 && fast_vec_dist(&MOBY(moby)->pos, camera_pos) < 28.0f) { FUN_L00_0025a120(moby); MOBY(moby)->shadow_range = 0x16; diff --git a/src/overlays/shared/enemies/plasmabot.c b/src/overlays/shared/enemies/plasmabot.c index c578b8794a..cbf6584a50 100644 --- a/src/overlays/shared/enemies/plasmabot.c +++ b/src/overlays/shared/enemies/plasmabot.c @@ -89,9 +89,9 @@ typedef struct PlasmabotVars { u8 aim_joint_rotation[0x30]; u8 manipulator_attachment_header[0x10]; u8 aim_quaternion_storage[0x70]; - u8 unk1E0[0x10]; + u8 exhaust_position[0x10]; u8 nozzle_position[0x10]; - u8 unk200[0x10]; + u8 joint6_position[0x10]; u8 beam_start_position_storage[0x10]; u8 beam_end_position_storage[0x14]; f32 target_range; @@ -963,7 +963,7 @@ void draw_plasmabot_effect_quads(struct Moby *moby) { int j; int alpha; - qcopy(&quad_transform[3], &plasmabot_effect_private_vars->unk1E0); + qcopy(&quad_transform[3], &plasmabot_effect_private_vars->exhaust_position); quad_transform[3].f[3] = 1.0f; fast_vec_sub(&quad_transform[0], ((char *)&D_L14_001674C0), &quad_transform[3]); fast_vec_normalize(&quad_transform[0], &quad_transform[0], 1.0f); @@ -992,7 +992,7 @@ void draw_plasmabot_effect_quads(struct Moby *moby) { } fast_draw_quad_real(&pk, 0, 0); - qcopy(&quad_transform[3], &plasmabot_effect_private_vars->unk200); + qcopy(&quad_transform[3], &plasmabot_effect_private_vars->joint6_position); pp = &plasmabot_effect_private_vars->beam_end_position_storage; fast_vec_sub(&quad_transform[0], ((char *)&D_L14_001674C0), &quad_transform[3]); beam_start_position = &plasmabot_effect_private_vars->beam_start_position_storage; diff --git a/src/overlays/shared/enemies/seeker.c b/src/overlays/shared/enemies/seeker.c index ee92fcab42..799c4086ec 100644 --- a/src/overlays/shared/enemies/seeker.c +++ b/src/overlays/shared/enemies/seeker.c @@ -58,7 +58,7 @@ typedef struct { s32 voice; s32 moving; u8 pad19C[0xE4]; - u8 unk280[1]; + u8 big_head_manipulator[1]; } Moby52Vars; #include "rnc/overlay/shared/enemies/seeker_globals.h" @@ -118,7 +118,7 @@ void seeker_update(struct Moby *moby) { update_seeker_damage_and_target(moby); target = seeker_instance_vars->target; - FUN_L00_00263ac8(moby, 0, seeker_instance_vars->unk280, 2.7f); + FUN_L00_00263ac8(moby, 0, seeker_instance_vars->big_head_manipulator, 2.7f); if (moby->visible != 0 && fast_vec_dist(&moby->pos, &D_L09_00166F40) < 29.0f) { FUN_L00_0025a120(moby); moby->shadow_range = 0x17; From 0ec21ed9486881f374073da3c72715d833e6525f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:44:53 +0000 Subject: [PATCH 091/213] decomp: name the robot probe, quad and clank trigger dialogue fields in l00 --- .../l00/mobys/clank_cutscene_trigger.c | 34 ++++++++-------- src/overlays/l00/mobys/veldin_robot_enemy.c | 40 +++++++++---------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/overlays/l00/mobys/clank_cutscene_trigger.c b/src/overlays/l00/mobys/clank_cutscene_trigger.c index e64ab114ac..a56aea5bf9 100644 --- a/src/overlays/l00/mobys/clank_cutscene_trigger.c +++ b/src/overlays/l00/mobys/clank_cutscene_trigger.c @@ -267,14 +267,14 @@ void draw_sky_shells_with_particles_and_rotating_shell(void) { typedef struct { u8 pad0[0x20]; - u8 unk20[4]; - s16 unk24; + u8 talk[4]; /* dialogue record (initialize_npc_dialogue / update_npc_dialogue) */ + s16 talk_mode; u8 pad26[6]; - f32 unk2C; + f32 talk_range; u8 pad30[0x26]; s16 unk56; u8 pad58[8]; - s32 unk60; + s32 talk_volume; /* talk_range is 16 while the hero is inside */ } DoorVars; typedef struct { @@ -282,7 +282,7 @@ typedef struct { u8 state; u8 pad21[0xF]; u8 alpha; - u8 unk31; + u8 visible; u8 pad32[2]; u16 flags; u8 pad36[0x42]; @@ -305,22 +305,22 @@ void clank_cutscene_trigger_update(DoorMoby *moby) { vars = moby->vars; if (D_L00_0015F5C4 == 2) { - moby->unk31 = 0; + moby->visible = 0; moby->flags |= 1; } else { - moby->unk31 = 1; + moby->visible = 1; moby->flags &= ~1; } switch (moby->state) { case CLANK_TRIGGER_INITIALIZE_DIALOGUE: D_00141628[0] = 1; - initialize_npc_dialogue(moby, vars->unk20); + initialize_npc_dialogue(moby, vars->talk); if (alternate_item_available[8] != 0) { vars->unk56 = 1; - vars->unk2C = 3.0f; - vars->unk24 = 0; + vars->talk_range = 3.0f; + vars->talk_mode = 0; } else { - vars->unk2C = 255.0f; + vars->talk_range = 255.0f; } alternate_item_available[8] = 1; moby->alpha = 0xFF; @@ -328,17 +328,17 @@ void clank_cutscene_trigger_update(DoorMoby *moby) { break; case CLANK_TRIGGER_POLL_DIALOGUE: if (vars->unk56 != 0) { - if (is_point_inside_clip_volume((s32)(&hero.motion.pos), vars->unk60) != 0) { - vars->unk2C = 16.0f; + if (is_point_inside_clip_volume((s32)(&hero.motion.pos), vars->talk_volume) != 0) { + vars->talk_range = 16.0f; } else { - vars->unk2C = 3.0f; + vars->talk_range = 3.0f; } } - if (update_npc_dialogue(moby, vars->unk20) != 0) { + if (update_npc_dialogue(moby, vars->talk) != 0) { moby->state = CLANK_TRIGGER_WAIT_TO_REPOLL_DIALOGUE; - vars->unk2C = 3.0f; + vars->talk_range = 3.0f; } - if (vars->unk24 >= 4 && D_L00_0015F5C4 != 6) { + if (vars->talk_mode >= 4 && D_L00_0015F5C4 != 6) { request_space_load(1); } break; diff --git a/src/overlays/l00/mobys/veldin_robot_enemy.c b/src/overlays/l00/mobys/veldin_robot_enemy.c index 87d3f01680..99981ff595 100644 --- a/src/overlays/l00/mobys/veldin_robot_enemy.c +++ b/src/overlays/l00/mobys/veldin_robot_enemy.c @@ -124,8 +124,8 @@ typedef struct { s32 flags; u8 unk88; u8 unk89; - u16 unk8A; - f32 unk8C; + u16 oclass; + f32 radius; s32 unk90; } ElectroidProbe; @@ -311,12 +311,12 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { query.flags = 0x10000; query.moby = moby; query.unk90 = 1; - query.unk8C = 1.0f; + query.radius = 1.0f; query.dir[0] = fast_cos(moby->rot.f[2]); query.dir[1] = fast_sin(moby->rot.f[2]); query.dir[3] = 5627.925f; query.unk89 = 1; - query.unk8A = moby->oclass; + query.oclass = moby->oclass; query.dir[2] = 1.0f; query.unk88 = 0; if (moby->blend_source_animation == moby->anim && @@ -614,14 +614,14 @@ typedef union { typedef struct { GlowVec corner[4]; u32 color[4]; - s32 unk50; - s32 unk54; - s32 unk58; - f32 unk5C; - f32 unk60; - s32 unk64; - f32 unk68; - f32 unk6C; + s32 u0; /* texture coordinates of the four corners */ + s32 v0; + s32 u1; + f32 v1; + f32 u2; + s32 v2; + f32 u3; + f32 v3; s64 clamp; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ s64 tex; s64 tex1; @@ -669,15 +669,15 @@ void draw_veldin_robot_effect_quad(GlowMoby *moby) { quad.color[3] = 0x80FFFFFF; quad.color[2] = 0x80FFFFFF; quad.color[1] = 0x80FFFFFF; - quad.unk50 = 0; - quad.unk54 = 0; - quad.unk58 = 0; - quad.unk5C = one; - quad.unk60 = one; + quad.u0 = 0; + quad.v0 = 0; + quad.u1 = 0; + quad.v1 = one; + quad.u2 = one; quad.color[0] = 0x80FFFFFF; - quad.unk64 = 0; - quad.unk68 = one; - quad.unk6C = one; + quad.v2 = 0; + quad.u3 = one; + quad.v3 = one; template_corner = l00_veldin_robot_effect_quad_template_corners; quad_corner = quad.corner; for (i = 0; i < 4; i++) { From 3787d521e8a1338714d7401b7d1ab8b4713fc047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:44:53 +0000 Subject: [PATCH 092/213] decomp: name blarg ship spin and fleet beam endpoint fields in l17 --- src/overlays/l17/mobys/blarg_ship.c | 10 +++++----- src/overlays/l17/mobys/fleet_beam.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/overlays/l17/mobys/blarg_ship.c b/src/overlays/l17/mobys/blarg_ship.c index daa77f053b..2e49b9fb84 100644 --- a/src/overlays/l17/mobys/blarg_ship.c +++ b/src/overlays/l17/mobys/blarg_ship.c @@ -43,8 +43,8 @@ typedef struct BlargShipVars { s32 path_node; f32 path_t; f32 speed; - f32 unk70; - f32 unk74; + f32 spin_angle; + f32 spin_rate; f32 unk78; u8 pad_7C[0x8]; s32 reactivation_frames; @@ -94,8 +94,8 @@ void blarg_ship_update(struct Moby *moby) { if (moby_pvars->formation_slot == 0) { moby->state = BLARG_SHIP_FOLLOW_PATH; moby_pvars->speed = randf_sym(0.3f, 0.5f); - moby_pvars->unk70 = random_angle_radians(); - moby_pvars->unk74 = randf_sym(60.0f, 120.0f) * DEG_TO_RAD * frame_time; + moby_pvars->spin_angle = random_angle_radians(); + moby_pvars->spin_rate = randf_sym(60.0f, 120.0f) * DEG_TO_RAD * frame_time; moby_pvars->unk78 = random_float_between(8.0f, 12.0f); } else { moby->state = BLARG_SHIP_INACTIVE; @@ -117,7 +117,7 @@ void blarg_ship_update(struct Moby *moby) { (moby_pvars->path_node + **(int **)(D_L17_001B0DB0 + moby_pvars->path * 4) - 1) % **(int **)(D_L17_001B0DB0 + moby_pvars->path * 4); } - fast_add_rotations(moby_pvars->unk70, moby_pvars->unk74); + fast_add_rotations(moby_pvars->spin_angle, moby_pvars->spin_rate); update_moby_path_transform(moby); if (moby->state == BLARG_SHIP_BURST_AND_HIDE) { cart_burst(moby, &moby->pos, -1, 2.0f, 13.0f); diff --git a/src/overlays/l17/mobys/fleet_beam.c b/src/overlays/l17/mobys/fleet_beam.c index ea6c9553cb..63c2ed69c4 100644 --- a/src/overlays/l17/mobys/fleet_beam.c +++ b/src/overlays/l17/mobys/fleet_beam.c @@ -86,7 +86,7 @@ typedef struct FleetBeamVars { f32 oscillation_step; f32 anim_start; f32 anim_frames_per_radian; - s32 unk60; + s32 endpoint_moby; /* moby placed at the far end of the beam (0: none) */ u8 pad_64[0x4]; s32 oscillation_moby_index; } FleetBeamVars; @@ -138,7 +138,7 @@ void fleet_beam_update(struct Moby *beam_moby) { } else { beam_moby->state = BEAM_UPDATE_STATIONARY; } - beam_vars->unk60 = 0; + beam_vars->endpoint_moby = 0; beam_vars->beam_width = 0.1f; *(OvlQuad *)beam_vector_scratch = 0; beam_vector_scratch[0] = 13.0f; @@ -199,15 +199,15 @@ void fleet_beam_update(struct Moby *beam_moby) { transform_vector_by_basis(beam_vector_scratch, beam_vector_scratch, &beam_moby->rot_row0); fast_vec_add(beam_geometry_scratch, &beam_moby->pos, beam_vars->beam_offset); *(OvlQuad *)beam_endpoint_and_offset_scratch = *(OvlQuad *)beam_geometry_scratch; - if (beam_vars->unk60 != 0) { + if (beam_vars->endpoint_moby != 0) { fast_vec_normalize(beam_vars->beam_end, beam_vector_scratch, -(*(float *)&fleet_beam_endpoint_axis_offset - 0.2f)); - fast_vec_normalize(*(char **)&beam_vars->unk60 + 0x10, + fast_vec_normalize(*(char **)&beam_vars->endpoint_moby + 0x10, beam_vector_scratch, -*(float *)&fleet_beam_endpoint_axis_offset); fast_vec_add(beam_geometry_scratch, beam_vars->beam_end, beam_endpoint_and_offset_scratch); - beam_endpoint_record = *(char **)&beam_vars->unk60; + beam_endpoint_record = *(char **)&beam_vars->endpoint_moby; *(OvlQuad *)&beam_vars->beam_end[0] = *(OvlQuad *)beam_geometry_scratch; fast_vec_add( beam_geometry_scratch, beam_endpoint_record + 0x10, beam_endpoint_and_offset_scratch); From bfcea575c827111d2197f08f47c6d9039bfa8c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:44:53 +0000 Subject: [PATCH 093/213] decomp: name the camera transition hero placement fields in l18 --- src/overlays/l18/mobys/camera_transition.c | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/overlays/l18/mobys/camera_transition.c b/src/overlays/l18/mobys/camera_transition.c index 7f513d26b3..1c67e62a6a 100644 --- a/src/overlays/l18/mobys/camera_transition.c +++ b/src/overlays/l18/mobys/camera_transition.c @@ -55,9 +55,9 @@ typedef struct BossCameraTransitionVars { f32 start_rotation_z; u8 pad_2C[0x4]; f32 end_rotation[4]; - u8 unk40; + u8 hero_position; /* where FUN_L00_00216f90 places the hero */ u8 pad_41[0xB]; - f32 unk4C; + f32 hero_yaw; u8 pad_50[0x10]; f32 transition_progress; s32 transition_progress_rate; @@ -98,9 +98,9 @@ void boss_camera_transition_update(struct Moby *moby) { if (1.0f <= t) { camera_transition_active = 1; clear_u64_value(transition_scratch_vectors); - transition_scratch_vectors[2] = transition_private_vars->unk4C; + transition_scratch_vectors[2] = transition_private_vars->hero_yaw; FUN_L00_00216f90_q( - &transition_private_vars->unk40, transition_scratch_vectors, 0x72, 1); + &transition_private_vars->hero_position, transition_scratch_vectors, 0x72, 1); FUN_L00_002eaaa0_q( transition_private_vars, &transition_private_vars->start_rotation, 1, 0, 0); if (transition_private_vars->transition_mode == 1) { @@ -148,16 +148,18 @@ void boss_camera_transition_update(struct Moby *moby) { if (1.0f <= transition_progress) { camera_transition_active = 0; clear_u64_value(transition_scratch_vectors + 8); - transition_scratch_vectors[10] = transition_private_vars->unk4C; + transition_scratch_vectors[10] = transition_private_vars->hero_yaw; FUN_L00_00216f90_q( - &transition_private_vars->unk40, transition_scratch_vectors + 8, 0, 0); + &transition_private_vars->hero_position, transition_scratch_vectors + 8, 0, 0); jet_end_mount(2); moby->state = STATE_POST_TRANSITION_RAMP_DOWN; } else if (*(int *)(camera_secondary_mode_lui) != 0x72) { clear_u64_value(transition_scratch_vectors + 8); - transition_scratch_vectors[10] = transition_private_vars->unk4C; - FUN_L00_00216f90_q( - &transition_private_vars->unk40, transition_scratch_vectors + 8, 0x72, 1); + transition_scratch_vectors[10] = transition_private_vars->hero_yaw; + FUN_L00_00216f90_q(&transition_private_vars->hero_position, + transition_scratch_vectors + 8, + 0x72, + 1); return; } } @@ -201,17 +203,17 @@ void boss_camera_transition_update(struct Moby *moby) { camera_transition_active = 0; transition_private_vars->transition_progress = 1.0f; clear_u64_value(transition_scratch_vectors + 8); - transition_scratch_vectors[10] = transition_private_vars->unk4C; + transition_scratch_vectors[10] = transition_private_vars->hero_yaw; FUN_L00_00216f90_q( - &transition_private_vars->unk40, transition_scratch_vectors + 8, 0, 0); + &transition_private_vars->hero_position, transition_scratch_vectors + 8, 0, 0); jet_end_mount(3); moby->state = STATE_POST_TRANSITION_RAMP_DOWN; } } else if (*(int *)(camera_secondary_mode_lui) != 0x72) { clear_u64_value(transition_scratch_vectors + 8); - transition_scratch_vectors[10] = transition_private_vars->unk4C; + transition_scratch_vectors[10] = transition_private_vars->hero_yaw; FUN_L00_00216f90_q( - &transition_private_vars->unk40, transition_scratch_vectors + 8, 0x72, 1); + &transition_private_vars->hero_position, transition_scratch_vectors + 8, 0x72, 1); return; } else { approach_value(&transition_private_vars->ramp, 0.0f, (*(float *)&frame_time) * 4.0f); @@ -263,7 +265,7 @@ void start_camera_transition(struct Moby *moby, qcopy(&position_rotation_transition_vars->end_position, transition_target_position); qcopy(&position_rotation_transition_vars->start_rotation, transition_start_rotation); qcopy(position_rotation_transition_vars->end_rotation, transition_target_rotation); - qcopy(&position_rotation_transition_vars->unk40, transition_setup_vector); + qcopy(&position_rotation_transition_vars->hero_position, transition_setup_vector); moby->state = CAMERA_TRANSITION_STATE_PRE_TRANSITION_RAMP_UP; position_rotation_transition_vars->progress_acceleration = frame_time_sq * 0.333f; position_rotation_transition_vars->max_progress_rate = From 8457d9e1c4dfb5c6a6bcca509c2464dc1d2c0beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:46:45 +0000 Subject: [PATCH 094/213] decomp: name the turret camera shake fields in l09 --- src/overlays/l09/mobys/turret.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/overlays/l09/mobys/turret.c b/src/overlays/l09/mobys/turret.c index 17f2e598ba..b17e0cef4c 100644 --- a/src/overlays/l09/mobys/turret.c +++ b/src/overlays/l09/mobys/turret.c @@ -56,11 +56,11 @@ typedef struct { typedef struct { u8 pad0[0x160]; - f32 unk160; + f32 shake_amplitude; u8 pad164[4]; s32 longer_shot_response_frame_count; u8 pad16C[4]; - f32 unk170; + f32 shake2_amplitude; u8 pad174[4]; s32 shorter_shot_response_frame_count; } TurretShake; @@ -263,10 +263,10 @@ void turret_update(struct Moby *moby) { moby_point_position(moby, 1, &muzzle); spawn_turret_shot(moby, &muzzle, &shot, scale_game_frames(90)); allocate_voice_for_target_entry(0, 0, moby); - l09_turret_shot_response_state.unk160 = 0.03f; + l09_turret_shot_response_state.shake_amplitude = 0.03f; l09_turret_shot_response_state.longer_shot_response_frame_count = scale_game_frames(10); - l09_turret_shot_response_state.unk170 = 0.03f; + l09_turret_shot_response_state.shake2_amplitude = 0.03f; l09_turret_shot_response_state.shorter_shot_response_frame_count = scale_game_frames(7); turret_vars->barrel = 0; @@ -312,10 +312,10 @@ void turret_update(struct Moby *moby) { moby_point_position(moby, 2, &muzzle); spawn_turret_shot(moby, &muzzle, &shot, scale_game_frames(90)); allocate_voice_for_target_entry(0, 0, moby); - l09_turret_shot_response_state.unk160 = 0.03f; + l09_turret_shot_response_state.shake_amplitude = 0.03f; l09_turret_shot_response_state.longer_shot_response_frame_count = scale_game_frames(10); - l09_turret_shot_response_state.unk170 = 0.03f; + l09_turret_shot_response_state.shake2_amplitude = 0.03f; l09_turret_shot_response_state.shorter_shot_response_frame_count = scale_game_frames(7); turret_vars->barrel = 1; From 2156761a6a1297eb84020c55b03fe471fad5f75a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:48:52 +0000 Subject: [PATCH 095/213] decomp: name the hero loop voice slot and last ground height --- include/rnc/hero/hero.h | 4 ++-- src/check/hero_layout_check.c | 4 ++-- .../l01/hero/update_hero_motion_for_current_state.c | 8 ++++---- src/overlays/l02/hero/update_hero_state_motion.c | 8 ++++---- .../l03/hero/update_hero_motion_for_current_state.c | 8 ++++---- src/overlays/l05/hero/hero_set_state.c | 2 +- src/overlays/l05/hero/update_hero_motion_by_state.c | 12 ++++++------ .../l06/hero/update_hero_motion_for_current_state.c | 8 ++++---- .../l08/hero/update_hero_motion_for_current_state.c | 8 ++++---- src/overlays/l11/hero/update_hero_motion_by_state.c | 8 ++++---- .../l12/hero/update_hero_motion_for_current_state.c | 8 ++++---- src/overlays/l14/hero/update_hero_motion_by_state.c | 8 ++++---- .../l15/hero/update_hero_motion_for_current_state.c | 8 ++++---- src/overlays/l16/hero/hero_set_state.c | 2 +- .../l16/hero/update_hero_motion_for_current_state.c | 12 ++++++------ .../l17/hero/update_hero_motion_for_current_state.c | 8 ++++---- .../l18/hero/update_hero_motion_for_current_state.c | 8 ++++---- src/overlays/shared/hero/hero_update_movement.c | 8 ++++---- 18 files changed, 66 insertions(+), 66 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index 9d4d5f179b..946aac0e29 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -529,7 +529,7 @@ struct Hero { union { f32 f; s32 i; - } unk8B8; /* 0x8B8: read as a float, zeroed as an int */ + } last_ground_z; /* 0x8B8: read as a float, zeroed as an int */ s16 hoverboard_airborne; /* 0x8BC */ s16 board_respawn_delay; /* 0x8BE */ s32 race_position; /* 0x8C0: 1..3 picks the HUD rank string (FUN_L05_00266320) */ @@ -805,7 +805,7 @@ struct Hero { s32 grind_voice; /* 0x2218: voice of sound slot 0, -1 = none (slots 0-7 run to 0x2234, FUN_L00_00206c08) */ s32 unk221C; /* 0x221C: voice of sound slot 1 */ s32 voice_slot2; /* 0x2220 */ - s32 unk2224; /* 0x2224 */ + s32 loop_voice_slot; /* 0x2224: voice of the looping move sound, -1 = none */ s32 voice_slot4; /* 0x2228 */ s32 pack_swim_voice; /* 0x222C */ s32 voice_slot6; /* 0x2230 */ diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index 11007cdeb2..3118a30e38 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -296,7 +296,7 @@ HERO_OFFSET_CHECK(off_course_reset_pending, 0x8AF); HERO_OFFSET_CHECK(height_ring_count, 0x8B0); HERO_OFFSET_CHECK(ground_distance_history_index, 0x8B2); HERO_OFFSET_CHECK(race_path, 0x8B4); -HERO_OFFSET_CHECK(unk8B8, 0x8B8); +HERO_OFFSET_CHECK(last_ground_z, 0x8B8); HERO_OFFSET_CHECK(hoverboard_airborne, 0x8BC); HERO_OFFSET_CHECK(board_respawn_delay, 0x8BE); HERO_OFFSET_CHECK(boost_pad_timer, 0x8C4); @@ -479,7 +479,7 @@ HERO_OFFSET_CHECK(selected_item, 0x20D4); HERO_OFFSET_CHECK(saved_item, 0x20F0); HERO_OFFSET_CHECK(restore_item, 0x210C); HERO_OFFSET_CHECK(voice_slot2, 0x2220); -HERO_OFFSET_CHECK(unk2224, 0x2224); +HERO_OFFSET_CHECK(loop_voice_slot, 0x2224); HERO_OFFSET_CHECK(voice_slot4, 0x2228); HERO_OFFSET_CHECK(pack_swim_voice, 0x222C); HERO_OFFSET_CHECK(fidget_index, 0x2270); diff --git a/src/overlays/l01/hero/update_hero_motion_for_current_state.c b/src/overlays/l01/hero/update_hero_motion_for_current_state.c index 44d0a62273..920d71af58 100644 --- a/src/overlays/l01/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l01/hero/update_hero_motion_for_current_state.c @@ -1949,14 +1949,14 @@ void update_hero_motion_for_current_state(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, (int)hero.moby, 2); } else { - if (hero.unk2224 != -1) { - Row13E650 *e = (Row13E650 *)(((char *)&voice_pool) + hero.unk2224 * 0x70); + if (hero.loop_voice_slot != -1) { + Row13E650 *e = (Row13E650 *)(((char *)&voice_pool) + hero.loop_voice_slot * 0x70); if (e->f88 == hero.moby && e->f74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, (int)hero.moby, 0x12); } v = frame_time * 3.0f; diff --git a/src/overlays/l02/hero/update_hero_state_motion.c b/src/overlays/l02/hero/update_hero_state_motion.c index ade43e7b98..2f04b0d1f3 100644 --- a/src/overlays/l02/hero/update_hero_state_motion.c +++ b/src/overlays/l02/hero/update_hero_state_motion.c @@ -2104,14 +2104,14 @@ void update_hero_state_motion(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, (int)hero.moby, 2); } else { - if (hero.unk2224 != -1) { - Row13E650 *e = (Row13E650 *)(((char *)&voice_pool) + hero.unk2224 * 0x70); + if (hero.loop_voice_slot != -1) { + Row13E650 *e = (Row13E650 *)(((char *)&voice_pool) + hero.loop_voice_slot * 0x70); if (e->f88 == hero.moby && e->f74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, (int)hero.moby, 0x12); } v = frame_time * 3.0f; diff --git a/src/overlays/l03/hero/update_hero_motion_for_current_state.c b/src/overlays/l03/hero/update_hero_motion_for_current_state.c index d1eb34a2ab..7b053a6abb 100644 --- a/src/overlays/l03/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l03/hero/update_hero_motion_for_current_state.c @@ -2101,15 +2101,15 @@ void update_hero_motion_for_current_state(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, MV(hero.moby), 2); } else { - if (hero.unk2224 != -1) { + if (hero.loop_voice_slot != -1) { struct VoiceSlot *alternate_landing_voice_slot = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.unk2224 * 0x70); + (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); if (alternate_landing_voice_slot->pm88 == MV(hero.moby) && alternate_landing_voice_slot->b74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, MV(hero.moby), 0x12); } sp = frame_time * 3.0f; diff --git a/src/overlays/l05/hero/hero_set_state.c b/src/overlays/l05/hero/hero_set_state.c index 468124dd5d..f795f53f65 100644 --- a/src/overlays/l05/hero/hero_set_state.c +++ b/src/overlays/l05/hero/hero_set_state.c @@ -492,7 +492,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { s->hoverboard_airborne = 0; s->board_jump_frames = 0; s->boost_pad_timer = 0; - s->unk8B8.i = 0; + s->last_ground_z.i = 0; s->race_ammo = 0; s->off_course_reset_pending = 0; } diff --git a/src/overlays/l05/hero/update_hero_motion_by_state.c b/src/overlays/l05/hero/update_hero_motion_by_state.c index 71dc540297..a186289f28 100644 --- a/src/overlays/l05/hero/update_hero_motion_by_state.c +++ b/src/overlays/l05/hero/update_hero_motion_by_state.c @@ -890,10 +890,10 @@ void update_hero_motion_by_state(void) { if (hero.frames_off_ground.s == 0 && hero.board_jump_frames == 0) { hero.hoverboard_airborne = 0; } - } else if (hero.unk8B8.f - hero.ground_z.f > 0.3f) { + } else if (hero.last_ground_z.f - hero.ground_z.f > 0.3f) { hero.hoverboard_airborne = 1; } - hero.unk8B8.f = hero.ground_z.f; + hero.last_ground_z.f = hero.ground_z.f; { s32 d = 0; if (hero.board_boost_active != 0 && hero.boost_speed != frame_time * 11.0f) { @@ -2699,14 +2699,14 @@ void update_hero_motion_by_state(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { - if (hero.unk2224 != -1) { + if (hero.loop_voice_slot != -1) { struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.unk2224 * 0x70); + (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, (struct MobyView *)hero.moby, 0x12); } sp = frame_time * 3.0f; diff --git a/src/overlays/l06/hero/update_hero_motion_for_current_state.c b/src/overlays/l06/hero/update_hero_motion_for_current_state.c index 980d5747a4..a9e2fa8241 100644 --- a/src/overlays/l06/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l06/hero/update_hero_motion_for_current_state.c @@ -2656,15 +2656,15 @@ void update_hero_motion_for_current_state(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { - if (hero.unk2224 != -1) { + if (hero.loop_voice_slot != -1) { struct VoiceSlot *landing_entry4_voice_slot = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.unk2224 * 0x70); + (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); if (landing_entry4_voice_slot->pm88 == (struct MobyView *)hero.moby && landing_entry4_voice_slot->b74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, (struct MobyView *)hero.moby, 0x12); } sp = D_0015ED6C_c * 3.0f; diff --git a/src/overlays/l08/hero/update_hero_motion_for_current_state.c b/src/overlays/l08/hero/update_hero_motion_for_current_state.c index 875e038406..a81b443897 100644 --- a/src/overlays/l08/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l08/hero/update_hero_motion_for_current_state.c @@ -2537,14 +2537,14 @@ void update_hero_motion_for_current_state(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, MV(hero.moby), 2); } else { - if (hero.unk2224 != -1) { + if (hero.loop_voice_slot != -1) { struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.unk2224 * 0x70); + (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); if (e->pm88 == MV(hero.moby) && e->b74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, MV(hero.moby), 0x12); } sp = frame_time * 3.0f; diff --git a/src/overlays/l11/hero/update_hero_motion_by_state.c b/src/overlays/l11/hero/update_hero_motion_by_state.c index 72b5697ef6..5b613516a5 100644 --- a/src/overlays/l11/hero/update_hero_motion_by_state.c +++ b/src/overlays/l11/hero/update_hero_motion_by_state.c @@ -2008,14 +2008,14 @@ void update_hero_motion_by_state(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, MV(hero.moby), 2); } else { - if (hero.unk2224 != -1) { + if (hero.loop_voice_slot != -1) { struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.unk2224 * 0x70); + (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); if (e->pm88 == MV(hero.moby) && e->b74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, MV(hero.moby), 0x12); } sp = frame_time * 3.0f; diff --git a/src/overlays/l12/hero/update_hero_motion_for_current_state.c b/src/overlays/l12/hero/update_hero_motion_for_current_state.c index 4d0c424850..8e80dd7cbc 100644 --- a/src/overlays/l12/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l12/hero/update_hero_motion_for_current_state.c @@ -2459,14 +2459,14 @@ void update_hero_motion_for_current_state(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, MV(hero.moby), 2); } else { - if (hero.unk2224 != -1) { + if (hero.loop_voice_slot != -1) { struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.unk2224 * 0x70); + (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); if (e->pm88 == MV(hero.moby) && e->b74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, MV(hero.moby), 0x12); } sp = frame_time * 3.0f; diff --git a/src/overlays/l14/hero/update_hero_motion_by_state.c b/src/overlays/l14/hero/update_hero_motion_by_state.c index daf2ce23be..e95049fa6a 100644 --- a/src/overlays/l14/hero/update_hero_motion_by_state.c +++ b/src/overlays/l14/hero/update_hero_motion_by_state.c @@ -2257,15 +2257,15 @@ void update_hero_motion_by_state(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, MV(hero.moby), 2); } else { - if (hero.unk2224 != -1) { + if (hero.loop_voice_slot != -1) { struct VoiceSlot *alternate_landing_voice_slot = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.unk2224 * 0x70); + (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); if (alternate_landing_voice_slot->pm88 == MV(hero.moby) && alternate_landing_voice_slot->b74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, MV(hero.moby), 0x12); } sp = frame_time * 3.0f; diff --git a/src/overlays/l15/hero/update_hero_motion_for_current_state.c b/src/overlays/l15/hero/update_hero_motion_for_current_state.c index 052877e685..364d03bcc3 100644 --- a/src/overlays/l15/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l15/hero/update_hero_motion_for_current_state.c @@ -2256,14 +2256,14 @@ void update_hero_motion_for_current_state(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { - if (hero.unk2224 != -1) { + if (hero.loop_voice_slot != -1) { struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.unk2224 * 0x70); + (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, (struct MobyView *)hero.moby, 0x12); } sp = frame_time * 3.0f; diff --git a/src/overlays/l16/hero/hero_set_state.c b/src/overlays/l16/hero/hero_set_state.c index b3148e3c17..87d3060eed 100644 --- a/src/overlays/l16/hero/hero_set_state.c +++ b/src/overlays/l16/hero/hero_set_state.c @@ -505,7 +505,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { s->hoverboard_airborne = 0; s->board_jump_frames = 0; s->boost_pad_timer = 0; - s->unk8B8.i = 0; + s->last_ground_z.i = 0; s->race_ammo = 0; s->off_course_reset_pending = 0; } diff --git a/src/overlays/l16/hero/update_hero_motion_for_current_state.c b/src/overlays/l16/hero/update_hero_motion_for_current_state.c index 8885e6de87..7adf037487 100644 --- a/src/overlays/l16/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l16/hero/update_hero_motion_for_current_state.c @@ -1046,10 +1046,10 @@ void update_hero_motion_for_current_state(void) { if (hero.frames_off_ground.s == 0 && hero.board_jump_frames == 0) { hero.hoverboard_airborne = 0; } - } else if (hero.unk8B8.f - hero.ground_z.f > 0.3f) { + } else if (hero.last_ground_z.f - hero.ground_z.f > 0.3f) { hero.hoverboard_airborne = 1; } - hero.unk8B8.f = hero.ground_z.f; + hero.last_ground_z.f = hero.ground_z.f; { s32 d = 0; if (hero.board_boost_active != 0 && hero.boost_speed != frame_time * 11.0f) { @@ -2837,14 +2837,14 @@ void update_hero_motion_for_current_state(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { - if (hero.unk2224 != -1) { + if (hero.loop_voice_slot != -1) { struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.unk2224 * 0x70); + (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, (struct MobyView *)hero.moby, 0x12); } sp = frame_time * 3.0f; diff --git a/src/overlays/l17/hero/update_hero_motion_for_current_state.c b/src/overlays/l17/hero/update_hero_motion_for_current_state.c index dc3509562d..a9bc00821e 100644 --- a/src/overlays/l17/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l17/hero/update_hero_motion_for_current_state.c @@ -2567,14 +2567,14 @@ void update_hero_motion_for_current_state(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { - if (hero.unk2224 != -1) { + if (hero.loop_voice_slot != -1) { struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.unk2224 * 0x70); + (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, (struct MobyView *)hero.moby, 0x12); } sp = frame_time * 3.0f; diff --git a/src/overlays/l18/hero/update_hero_motion_for_current_state.c b/src/overlays/l18/hero/update_hero_motion_for_current_state.c index 398d991a7f..f26decd7bf 100644 --- a/src/overlays/l18/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l18/hero/update_hero_motion_for_current_state.c @@ -2449,14 +2449,14 @@ void update_hero_motion_for_current_state(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { - if (hero.unk2224 != -1) { + if (hero.loop_voice_slot != -1) { struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.unk2224 * 0x70); + (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, (struct MobyView *)hero.moby, 0x12); } sp = frame_time * 3.0f; diff --git a/src/overlays/shared/hero/hero_update_movement.c b/src/overlays/shared/hero/hero_update_movement.c index ea1f6b732e..eeb23bd37c 100644 --- a/src/overlays/shared/hero/hero_update_movement.c +++ b/src/overlays/shared/hero/hero_update_movement.c @@ -2643,14 +2643,14 @@ void hero_update_movement(void) { hero.voice_slot4 = -1; release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { - if (hero.unk2224 != -1) { + if (hero.loop_voice_slot != -1) { struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.unk2224 * 0x70); + (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { - release_voice_slot(hero.unk2224); + release_voice_slot(hero.loop_voice_slot); } } - hero.unk2224 = -1; + hero.loop_voice_slot = -1; release_voice_slot_cf(4, (struct MobyView *)hero.moby, 0x12); } sp = frame_time * 3.0f; From 0ec53803fb2ad5433389d0bc988cd87849fe5e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:57:34 +0000 Subject: [PATCH 096/213] decomp: name bolt pickup, bombthrower, bolt thief, bomber tank and dialogue NPC fields in l08 --- src/overlays/l08/mobys/batalia_bolt_pickup.c | 228 ++++++++++--------- src/overlays/l08/mobys/batalia_deserter.c | 16 +- src/overlays/l08/mobys/blarg_bombthrower.c | 139 ++++++----- src/overlays/l08/mobys/bolt_pickup.c | 6 +- src/overlays/l08/mobys/bolt_thief.c | 72 +++--- src/overlays/l08/mobys/bomber_tank.c | 29 +-- src/overlays/l08/mobys/commando.c | 22 +- src/overlays/l08/mobys/effect_emitter.c | 8 +- src/overlays/l08/mobys/the_plumber_batalia.c | 24 +- 9 files changed, 279 insertions(+), 265 deletions(-) diff --git a/src/overlays/l08/mobys/batalia_bolt_pickup.c b/src/overlays/l08/mobys/batalia_bolt_pickup.c index fd92d24636..5590b4b40b 100644 --- a/src/overlays/l08/mobys/batalia_bolt_pickup.c +++ b/src/overlays/l08/mobys/batalia_bolt_pickup.c @@ -42,27 +42,29 @@ typedef int u128_4BE8_p __attribute__((mode(TI))); typedef struct { float anchor[4]; /* 0x00 */ - float v10[4]; /* 0x10 */ - float v20[4]; /* 0x20 */ - float v30[4]; /* 0x30 */ + float surface_rotation[4]; /* 0x10: euler angles of the surface basis */ + float pose_position[4]; /* 0x20: attachment-local pose, or the pose to fall back to */ + float pose_rotation[4]; /* 0x30 */ float velocity[4]; /* 0x40 */ float spin_x, spin_y, spin_z; /* 0x50 */ int pad5C; - float f60, f64; /* 0x60 */ - int timer; /* 0x68 */ - short s6C, s6E; /* 0x6C */ + float orbit_angle; /* 0x60: spin about the surface normal */ + float roll_angle; /* 0x64: roll on the surface; sideways swerve while flying to the hero */ + int timer; /* 0x68 */ + short quad_visible; + short s6E; union { - int i; - float f; + int quad_timer; /* frames until the rotating quad shows or hides */ + float launch_speed; /* speed along the launch velocity while flying to the hero */ } u70; - float f74; /* 0x74 */ + float quad_angle_or_homing_speed; /* 0x74: rotating quad angle; speed toward the hero */ union { - int i; - char *p; + int quad_color; + char *target; /* the hero's moby */ } u78; union { - int i; - float f; + int carrier; /* moby the pickup rides on */ + float target_height; /* offset along the target's up row */ } u7C; } Vars_4BE8; @@ -239,28 +241,36 @@ void update_batalia_bolt_pickup(struct Moby *moby) { } } set_batalia_bolt_pickup_surface_rotation((char *)moby, direction); - vars->f60 = random_angle_radians(); - vars->f64 = moby->rot.x; + vars->orbit_angle = random_angle_radians(); + vars->roll_angle = moby->rot.x; FUN_L08_002e4e90_c((char *)moby, (float *)&moby->pos, (float *)&moby->rot); if (linked != 0 && FUN_L00_002603d0(linked) != 0) { - vars->u7C.i = linked; - convert_pose_to_reference_local( - moby, linked, vars->anchor, vars->v10, vars->v20, vars->v30); + vars->u7C.carrier = linked; + convert_pose_to_reference_local(moby, + linked, + vars->anchor, + vars->surface_rotation, + vars->pose_position, + vars->pose_rotation); } moby->state = BOLT_PICKUP_WAIT_FOR_HERO; - vars->s6C = 0; - vars->u70.i = + vars->quad_visible = 0; + vars->u70.quad_timer = truncate_float_to_s32(random_float_between(0.0f, (float)scale_game_frames(600))); - vars->u78.i = l08_bolt_pickup_initial_rotating_quad_color; + vars->u78.quad_color = l08_bolt_pickup_initial_rotating_quad_color; break; } case BOLT_PICKUP_WAIT_FOR_HERO: { Vars_4BE8 *vars = (Vars_4BE8 *)moby->pvars; - if (vars->u7C.i != 0) { - transform_attachment_pose( - moby, vars->u7C.i, vars->v20, vars->v30, vars->anchor, vars->v10); - if ((signed char)((struct Moby *)vars->u7C.i)->state < 0) { + if (vars->u7C.carrier != 0) { + transform_attachment_pose(moby, + vars->u7C.carrier, + vars->pose_position, + vars->pose_rotation, + vars->anchor, + vars->surface_rotation); + if ((signed char)((struct Moby *)vars->u7C.carrier)->state < 0) { vars = (Vars_4BE8 *)moby->pvars; clear_u64_value(vars->velocity); build_axis_roll_matrix(vars, @@ -286,55 +296,58 @@ void update_batalia_bolt_pickup(struct Moby *moby) { } switch (moby->oclass) { case MOBY_CLASS_TEN_BOLT_PICKUP: - vars->f60 = fast_add_rotations(vars->f60, - l08_ten_bolt_pickup_surface_orbit_speed_degrees * - 0.017453292f * frame_time); - vars->f64 = fast_add_rotations( - vars->f64, ten_bolt_pickup_surface_roll_speed_degrees * 0.017453292f * frame_time); + vars->orbit_angle = fast_add_rotations(vars->orbit_angle, + l08_ten_bolt_pickup_surface_orbit_speed_degrees * + 0.017453292f * frame_time); + vars->roll_angle = fast_add_rotations(vars->roll_angle, + ten_bolt_pickup_surface_roll_speed_degrees * + 0.017453292f * frame_time); break; case MOBY_CLASS_FIVE_BOLT_PICKUP: - vars->f60 = fast_add_rotations(vars->f60, - l08_five_bolt_pickup_surface_orbit_speed_degrees * - 0.017453292f * frame_time); - vars->f64 = fast_add_rotations( - vars->f64, five_bolt_pickup_surface_roll_speed_degrees * 0.017453292f * frame_time); + vars->orbit_angle = fast_add_rotations( + vars->orbit_angle, + l08_five_bolt_pickup_surface_orbit_speed_degrees * 0.017453292f * frame_time); + vars->roll_angle = fast_add_rotations(vars->roll_angle, + five_bolt_pickup_surface_roll_speed_degrees * + 0.017453292f * frame_time); break; default: - vars->f60 = fast_add_rotations(vars->f60, - bolt_pickup_default_surface_orbit_speed_degrees * - 0.017453292f * frame_time); - vars->f64 = fast_add_rotations(vars->f64, - l08_bolt_pickup_default_surface_roll_speed_degrees * - 0.017453292f * frame_time); + vars->orbit_angle = fast_add_rotations(vars->orbit_angle, + bolt_pickup_default_surface_orbit_speed_degrees * + 0.017453292f * frame_time); + vars->roll_angle = fast_add_rotations( + vars->roll_angle, + l08_bolt_pickup_default_surface_roll_speed_degrees * 0.017453292f * frame_time); break; } FUN_L08_002e4e90_c((char *)moby, (float *)&moby->pos, (float *)&moby->rot); - if (vars->s6C != 0) { - vars->f74 = fast_add_rotations(vars->f74, frame_time * 5.2359877f); - if (vars->u70.i > 12) { - vars->u78.i += 0x5000000; + if (vars->quad_visible != 0) { + vars->quad_angle_or_homing_speed = + fast_add_rotations(vars->quad_angle_or_homing_speed, frame_time * 5.2359877f); + if (vars->u70.quad_timer > 12) { + vars->u78.quad_color += 0x5000000; } else { - vars->u78.i -= 0x5000000; + vars->u78.quad_color -= 0x5000000; } - if (fast_dec_timer(&vars->u70.i) != 0) { - vars->s6C = 0; - vars->u70.i = truncate_float_to_s32(random_float_between( + if (fast_dec_timer(&vars->u70.quad_timer) != 0) { + vars->quad_visible = 0; + vars->u70.quad_timer = truncate_float_to_s32(random_float_between( (float)scale_game_frames(300), (float)scale_game_frames(600))); } else if (moby->visible != 0 && bolt_pickup_rotating_quad_enabled != 0) { add_draw_callback(FUN_L08_002e5188_c, moby); return; } - } else if (fast_dec_timer(&vars->u70.i) != 0) { - vars->u70.i = 24; - vars->f74 = random_angle_radians(); - vars->s6C = 1; + } else if (fast_dec_timer(&vars->u70.quad_timer) != 0) { + vars->u70.quad_timer = 24; + vars->quad_angle_or_homing_speed = random_angle_radians(); + vars->quad_visible = 1; } break; } case BOLT_PICKUP_TURN_TOWARD_HERO: { Vars_4BE8 *vars = (Vars_4BE8 *)moby->pvars; - euler_rotation_matrix(surface_basis_and_collection_vectors, vars->v10); + euler_rotation_matrix(surface_basis_and_collection_vectors, vars->surface_rotation); qcopy(direction, surface_basis_and_collection_vectors + 8); if (fast_dec_timer(&vars->timer) != 0) { Vars_4BE8 *vars = (Vars_4BE8 *)moby->pvars; @@ -350,33 +363,34 @@ void update_batalia_bolt_pickup(struct Moby *moby) { deg_to_rad * frame_time); moby->flags |= 0x100; fast_vec_normalize(vars->velocity, direction, frame_time * 8.0f); - vars->f74 = 0.0f; - vars->u70.f = frame_time * 8.0f; - vars->u78.p = *(char **)(hero_pos + 0x2000); - vars->u7C.f = 0.5f; + vars->quad_angle_or_homing_speed = 0.0f; + vars->u70.launch_speed = frame_time * 8.0f; + vars->u78.target = *(char **)(hero_pos + 0x2000); + vars->u7C.target_height = 0.5f; if (l08_bolt_pickup_last_collection_sound_frame + scale_game_frames(3) < D_L08_0015F5CC) { l08_bolt_pickup_last_collection_sound_frame = D_L08_0015F5CC; allocate_voice_for_target_entry(0, 0x20, moby); - vars->f64 = 0.0f; + vars->roll_angle = 0.0f; } else { - vars->f64 = random_float_between(-30.0f, 30.0f) * deg_to_rad; + vars->roll_angle = random_float_between(-30.0f, 30.0f) * deg_to_rad; } moby->state = BOLT_PICKUP_FLY_TO_HERO_AND_CREDIT_BOLTS; } else { if (scale_game_frames(10) < vars->timer) { float goal_yaw = fast_add_rotations( - vars->f60, fast_sin((float)(vars->timer % 8 - 4) * 0.7854f) * 0.17453292f); + vars->orbit_angle, + fast_sin((float)(vars->timer % 8 - 4) * 0.7854f) * 0.17453292f); - step_angle_toward_target(&vars->f60, goal_yaw, 0.5235988f, 0); + step_angle_toward_target(&vars->orbit_angle, goal_yaw, 0.5235988f, 0); } else { float goal_yaw = fast_add_rotations(fast_arc_tan(hero.motion.pos.f[0] - moby->pos.x, hero.motion.pos.f[1] - moby->pos.y), 1.5707964f); - step_angle_toward_target(&vars->f60, goal_yaw, 0.08726646f, 0); - if (fast_difference_between_rotations(vars->f60, goal_yaw) < 0.08726646f) { + step_angle_toward_target(&vars->orbit_angle, goal_yaw, 0.08726646f, 0); + if (fast_difference_between_rotations(vars->orbit_angle, goal_yaw) < 0.08726646f) { vars->timer = 0; } } @@ -389,38 +403,39 @@ void update_batalia_bolt_pickup(struct Moby *moby) { float collection_target_distance; float fade_range; - if (vars->u78.p == 0) { + if (vars->u78.target == 0) { break; } - fast_vec_normalize(point, vars->u78.p + 0xE0, vars->u7C.f); - fast_vec_add(point, point, vars->u78.p + 0x10); + fast_vec_normalize(point, vars->u78.target + 0xE0, vars->u7C.target_height); + fast_vec_add(point, point, vars->u78.target + 0x10); fast_vec_sub(direction, point, &moby->pos); - if (vars->f64 != 0.0f) { - float sine = fast_sin(vars->f64); - float cosine = fast_cos(vars->f64); + if (vars->roll_angle != 0.0f) { + float sine = fast_sin(vars->roll_angle); + float cosine = fast_cos(vars->roll_angle); direction[0] = cosine * direction[0] + sine * direction[1]; direction[1] = cosine * direction[1] - sine * direction[0]; } collection_target_distance = fast_vec_dist(point, &moby->pos); - fast_vec_normalize(vars->velocity, vars->velocity, vars->u70.f); + fast_vec_normalize(vars->velocity, vars->velocity, vars->u70.launch_speed); fast_vec_add(&moby->pos, &moby->pos, vars->velocity); - fast_vec_normalize(direction, direction, vars->f74); + fast_vec_normalize(direction, direction, vars->quad_angle_or_homing_speed); fast_vec_add(&moby->pos, &moby->pos, direction); collection_motion_reference = D_0013F490; fast_vec_add(&moby->pos, &moby->pos, collection_motion_reference); fast_vec_sub(local, &moby->pos, collection_motion_reference + 0x160); transform_vector(local, local, collection_motion_reference - 0x100); - if (((struct Moby *)vars->u78.p)->oclass != 0 || local[2] > 0.0f) { - approach_value( - &vars->u70.f, 0.0f, l08_bolt_pickup_collection_acceleration * frame_time_sq); - approach_value(&vars->f74, + if (((struct Moby *)vars->u78.target)->oclass != 0 || local[2] > 0.0f) { + approach_value(&vars->u70.launch_speed, + 0.0f, + l08_bolt_pickup_collection_acceleration * frame_time_sq); + approach_value(&vars->quad_angle_or_homing_speed, l08_bolt_pickup_collection_target_speed * frame_time, l08_bolt_pickup_collection_acceleration * frame_time_sq); } else { fast_vec_normalize(surface_basis_and_collection_vectors, collection_motion_reference - 0x120, - vars->u70.f); + vars->u70.launch_speed); fast_vec_sub(surface_basis_and_collection_vectors + 4, surface_basis_and_collection_vectors, vars->velocity); @@ -428,10 +443,10 @@ void update_batalia_bolt_pickup(struct Moby *moby) { l08_bolt_pickup_collection_acceleration * frame_time_sq); fast_vec_add(vars->velocity, vars->velocity, surface_basis_and_collection_vectors + 4); } - if (collection_target_distance < vars->f74) { - vars->f74 = collection_target_distance; + if (collection_target_distance < vars->quad_angle_or_homing_speed) { + vars->quad_angle_or_homing_speed = collection_target_distance; } - fade_range = vars->f74 * (float)scale_game_frames(20); + fade_range = vars->quad_angle_or_homing_speed * (float)scale_game_frames(20); if (collection_target_distance < fade_range) { if (fast_vec_dist(point, &moby->pos) > 0.52f) { if (bolt_pickup_collection_alpha_fade_enabled != 0) { @@ -572,10 +587,10 @@ void update_batalia_bolt_pickup(struct Moby *moby) { mark_moby_for_removal(moby); return; } - if (moby->pos.z < vars->f60 - 4.0f && moby->pos.z < hero.motion.pos.f[2] - 4.0f) { + if (moby->pos.z < vars->orbit_angle - 4.0f && moby->pos.z < hero.motion.pos.f[2] - 4.0f) { Vars_4BE8 *vars = (Vars_4BE8 *)moby->pvars; - *(u128_4BE8_p *)vars->v10 = *(u128_4BE8_p *)((char *)&hero + 0x90); + *(u128_4BE8_p *)vars->surface_rotation = *(u128_4BE8_p *)((char *)&hero + 0x90); vars->timer = scale_game_frames(1); moby->state = BOLT_PICKUP_TURN_TOWARD_HERO; break; @@ -600,10 +615,10 @@ void update_batalia_bolt_pickup(struct Moby *moby) { matrix_to_euler(&moby->rot_row0, &moby->rot); fast_vec_normalize(direction, coll->n, 1.0f); set_batalia_bolt_pickup_surface_rotation((char *)moby, direction); - vars->f60 = random_angle_radians(); - vars->f64 = random_angle_radians(); - FUN_L08_002e4e90_c((char *)moby, vars->v20, vars->v30); - fast_vec_sub(vars->velocity, vars->v20, &moby->pos); + vars->orbit_angle = random_angle_radians(); + vars->roll_angle = random_angle_radians(); + FUN_L08_002e4e90_c((char *)moby, vars->pose_position, vars->pose_rotation); + fast_vec_sub(vars->velocity, vars->pose_position, &moby->pos); fast_vec_scale(vars->velocity, vars->velocity, per_frame); if (coll->moby != 0) { unsigned char *carrier = FUN_L00_002603d0(coll->moby); @@ -611,17 +626,20 @@ void update_batalia_bolt_pickup(struct Moby *moby) { if (carrier != 0) { fast_vec_add(vars->velocity, vars->velocity, carrier + 0x10); fast_vec_scale(point, carrier + 0x10, convert_integer_to_float(frames)); - fast_vec_add(vars->v20, vars->v20, point); + fast_vec_add(vars->pose_position, vars->pose_position, point); fast_vec_add(vars->anchor, vars->anchor, point); } } vars->velocity[2] += frame_time_sq * 10.8f * (float)(frames >> 1); - vars->spin_x = fast_subtract_rotations(vars->v30[0], moby->rot.x) * per_frame; - vars->spin_y = fast_subtract_rotations(vars->v30[1], moby->rot.y) * per_frame; - vars->spin_z = fast_subtract_rotations(vars->v30[2], moby->rot.z) * per_frame; + vars->spin_x = + fast_subtract_rotations(vars->pose_rotation[0], moby->rot.x) * per_frame; + vars->spin_y = + fast_subtract_rotations(vars->pose_rotation[1], moby->rot.y) * per_frame; + vars->spin_z = + fast_subtract_rotations(vars->pose_rotation[2], moby->rot.z) * per_frame; moby->state = BOLT_PICKUP_RETURN_TO_SURFACE; vars->timer = frames; - vars->u7C.i = D_L08_00174658_lui; + vars->u7C.carrier = D_L08_00174658_lui; if (absolute_float(moby->pos.z - hero.motion.pos.f[2]) < hero.reach_distance && vector_distance_xy(&moby->pos, hero.motion.pos.f) < hero.reach_height) { Vars_4BE8 *vars = (Vars_4BE8 *)moby->pvars; @@ -653,33 +671,37 @@ void update_batalia_bolt_pickup(struct Moby *moby) { } if (moby->command != 0) { moby->state = BOLT_PICKUP_WAIT_FOR_HERO; - if (vars->u7C.i != 0) { + if (vars->u7C.carrier != 0) { Vars_4BE8 *vars = (Vars_4BE8 *)moby->pvars; - convert_pose_to_reference_local( - moby, vars->u7C.i, vars->anchor, vars->v10, vars->v20, vars->v30); + convert_pose_to_reference_local(moby, + vars->u7C.carrier, + vars->anchor, + vars->surface_rotation, + vars->pose_position, + vars->pose_rotation); } else { - qcopy(&moby->pos, vars->v20); - qcopy(&moby->rot, vars->v30); + qcopy(&moby->pos, vars->pose_position); + qcopy(&moby->rot, vars->pose_rotation); } break; } frames = truncate_float_to_s32((float)scale_game_frames(20)); per_frame = 1.0f / convert_integer_to_float(frames); moby->command++; - vars->spin_x = fast_subtract_rotations(vars->v30[0], moby->rot.x) * per_frame; - vars->spin_y = fast_subtract_rotations(vars->v30[1], moby->rot.y) * per_frame; - vars->spin_z = fast_subtract_rotations(vars->v30[2], moby->rot.z) * per_frame; - fast_vec_sub(vars->velocity, vars->v20, &moby->pos); + vars->spin_x = fast_subtract_rotations(vars->pose_rotation[0], moby->rot.x) * per_frame; + vars->spin_y = fast_subtract_rotations(vars->pose_rotation[1], moby->rot.y) * per_frame; + vars->spin_z = fast_subtract_rotations(vars->pose_rotation[2], moby->rot.z) * per_frame; + fast_vec_sub(vars->velocity, vars->pose_position, &moby->pos); fast_vec_scale(vars->velocity, vars->velocity, per_frame); vars->timer = frames; - if (vars->u7C.i != 0) { - unsigned char *carrier = FUN_L00_002603d0(vars->u7C.i); + if (vars->u7C.carrier != 0) { + unsigned char *carrier = FUN_L00_002603d0(vars->u7C.carrier); if (carrier != 0) { fast_vec_add(vars->velocity, vars->velocity, carrier + 0x10); fast_vec_scale(direction, carrier + 0x10, convert_integer_to_float(frames)); - fast_vec_add(vars->v20, vars->v20, direction); + fast_vec_add(vars->pose_position, vars->pose_position, direction); fast_vec_add(vars->anchor, vars->anchor, direction); } } diff --git a/src/overlays/l08/mobys/batalia_deserter.c b/src/overlays/l08/mobys/batalia_deserter.c index 56ed495da7..0772071f46 100644 --- a/src/overlays/l08/mobys/batalia_deserter.c +++ b/src/overlays/l08/mobys/batalia_deserter.c @@ -95,13 +95,13 @@ extern L16WatchPlayer D_0013E633_watch __asm__("D_0013E533"); typedef struct { char pad00[0x24]; - short h24; + short dialogue_mode; char pad26[6]; - float f2C; + float dialogue_radius; /* 0x2C: dialogue record (at 0x20) facing tolerance */ char pad30[0x10]; - void *p40; + void *name_text; char pad44[0x12]; - short h56; + short dialogue_entry; char pad58[0xC]; int i64; char pad68[0x18]; @@ -184,8 +184,8 @@ void batalia_deserter_update(WM *moby) { mark_moby_for_removal(moby); return; } - deserter_data->f2C = 4.0f; - deserter_data->p40 = (void *)batalia_deserter_name_text; + deserter_data->dialogue_radius = 4.0f; + deserter_data->name_text = (void *)batalia_deserter_name_text; moby->state = DESERTER_WAIT_FOR_PLAYER; if (deserter_data->i64 >= 0) initialize_npc_dialogue(moby, (char *)deserter_data + 0x20); @@ -202,11 +202,11 @@ void batalia_deserter_update(WM *moby) { blend_moby_animation(moby, random_integer_below(2) + 1, 0, scale_game_frames(20)); } if (D_0013F350_g.f2FC == 0 && - (scale_game_frames(30) < D_0013F350_g.f300 || deserter_data->h56 != 0)) { + (scale_game_frames(30) < D_0013F350_g.f300 || deserter_data->dialogue_entry != 0)) { update_npc_dialogue(moby, (char *)deserter_data + 0x20); begin_dialogue_camera_transition(moby, 2.2f); } - if (deserter_data->h24 == 4) { + if (deserter_data->dialogue_mode == 4) { unlock_planet(9); memcard_save_data(0, -1); mark_moby_for_removal(moby); diff --git a/src/overlays/l08/mobys/blarg_bombthrower.c b/src/overlays/l08/mobys/blarg_bombthrower.c index cf134af5dd..201350c991 100644 --- a/src/overlays/l08/mobys/blarg_bombthrower.c +++ b/src/overlays/l08/mobys/blarg_bombthrower.c @@ -13,6 +13,8 @@ #include "rnc/overlay/shared/mobys/find_moby_hit.h" #include "rnc/overlay/shared/mobys/moby_point_position.h" #include "rnc/overlay/shared/mobys/step_moby_motion.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" #include "rnc/mobys/resolve_moby_hit_response.h" #include "rnc/math/random.h" @@ -48,44 +50,30 @@ typedef struct { } Look; typedef struct { - char pad0[0x20]; - float health; - char pad24[5]; - unsigned char b29; - char pad2A[0xE]; - int alternate_throw_trigger; - char pad3C[4]; - float v40[4]; - char pad50[8]; - unsigned char b58; - char pad59; - unsigned char b5A; - char pad5B[5]; - struct HitColorFlash hit_flash; - char blk70[0x10]; - float f80, f84, f88, f8C; - int pad90; - int i94; - char pad98[0x15]; - unsigned char bAD; - char padAE[0x12]; - float fC0, fC4; - char padC8[8]; - char blkD0[8]; - float fD8, fDC; - char padE0[0x14]; - float fF4; - char padF8[0x14]; - float f10C, f110, f114; - char pad118[8]; - struct Moby *waypoint; - struct Moby *thrown_bomb; - int throw_delay_timer; - char blk12C[4]; - short s130, s132; - int waypoint_reselection_timer; - char pad138[0x28]; - char big_head_manipulator[0x10]; + char pad0[0x20]; + float health; + char pad24[5]; + unsigned char b29; + char pad2A[0xE]; + int alternate_throw_trigger; + char pad3C[4]; + float move_displacement[4]; + char pad50[8]; + unsigned char b58; + char pad59; + unsigned char b5A; + char pad5B[5]; + struct HitColorFlash hit_flash; + struct KnockbackMotion knockback; + struct GroundMoveControl move; + struct Moby *waypoint; + struct Moby *thrown_bomb; + int throw_delay_timer; + float turn_velocity; + short s130, s132; + int waypoint_reselection_timer; + char pad138[0x28]; + char big_head_manipulator[0x10]; } Data_DBF68; char *spawn_bomb_with_velocity(int arg, char *pos, char *vec) __asm__("FUN_L08_002d22e0"); @@ -252,44 +240,45 @@ void blarg_bombthrower_update(struct Moby *moby) { bombthrower_vars->hit_flash.flash_red = 100; } else { char *hero_bytes; - bombthrower_vars->f80 = frame_time_sq * 30.0f; - bombthrower_vars->f88 = frame_time * 5.0f; - bombthrower_vars->f8C = frame_time * 7.0f; - bombthrower_vars->i94 = 9; - bombthrower_vars->f84 = 0.0005f; - bombthrower_vars->bAD = 0; + bombthrower_vars->knockback.gravity = frame_time_sq * 30.0f; + bombthrower_vars->knockback.speed = frame_time * 5.0f; + bombthrower_vars->knockback.vertical_speed = frame_time * 7.0f; + bombthrower_vars->knockback.flags = 9; + bombthrower_vars->knockback.speed_approach_step = 0.0005f; + bombthrower_vars->knockback.unk3D = 0; hero_bytes = (char *)&hero; trooper_start_knockback(moby, - bombthrower_vars->blk70, + &bombthrower_vars->knockback, fast_arc_tan(moby->pos.x - *(float *)(hero_bytes + 0x80), moby->pos.y - *(float *)(hero_bytes + 0x84)), 6, 1, 0); - bombthrower_vars->fC0 = 6.0f; - bombthrower_vars->fC4 = 10.0f; + bombthrower_vars->knockback.apex_animation_frame = 6.0f; + bombthrower_vars->knockback.landing_animation_frame = 10.0f; bombthrower_vars->hit_flash.flash_red = 0x78; moby->state = BOMBTHROWER_STATE_DAMAGE_KNOCKBACK; } } else { char *hero_bytes; - bombthrower_vars->i94 = 9; - bombthrower_vars->f84 = 0.0005f; - bombthrower_vars->f80 = frame_time_sq * 30.0f; - bombthrower_vars->f88 = + bombthrower_vars->knockback.flags = 9; + bombthrower_vars->knockback.speed_approach_step = 0.0005f; + bombthrower_vars->knockback.gravity = frame_time_sq * 30.0f; + bombthrower_vars->knockback.speed = l08_bombthrower_death_horizontal_knockback_speed_gp * frame_time; - bombthrower_vars->f8C = l08_bombthrower_death_vertical_knockback_speed_gp * frame_time; - bombthrower_vars->bAD = 0; + bombthrower_vars->knockback.vertical_speed = + l08_bombthrower_death_vertical_knockback_speed_gp * frame_time; + bombthrower_vars->knockback.unk3D = 0; hero_bytes = (char *)&hero; trooper_start_knockback(moby, - bombthrower_vars->blk70, + &bombthrower_vars->knockback, fast_arc_tan(moby->pos.x - *(float *)(hero_bytes + 0x80), moby->pos.y - *(float *)(hero_bytes + 0x84)), 9, 1, 0); - bombthrower_vars->fC0 = 6.0f; - bombthrower_vars->fC4 = 10.0f; + bombthrower_vars->knockback.apex_animation_frame = 6.0f; + bombthrower_vars->knockback.landing_animation_frame = 10.0f; explode_2D5FA8_c(moby, 0, -1); bombthrower_vars->hit_flash.flash_red = 0xFA; moby->state = BOMBTHROWER_STATE_DYING; @@ -309,16 +298,16 @@ void blarg_bombthrower_update(struct Moby *moby) { moby->flags |= 0x1000; bombthrower_vars->b29 = 1; bombthrower_vars->health = 2.0f; - FUN_L01_0026d930(bombthrower_vars->blkD0); - bombthrower_vars->fDC = 2.0f; - bombthrower_vars->fD8 = 2.0f; - bombthrower_vars->f10C = 0.03f; - bombthrower_vars->f110 = 0.3f; - bombthrower_vars->f114 = 0.25f; - bombthrower_vars->fF4 = D_L08_00161978_gp * frame_time; + FUN_L01_0026d930((char *)&bombthrower_vars->move); + bombthrower_vars->move.max_climb = 2.0f; + bombthrower_vars->move.max_drop = 2.0f; + bombthrower_vars->move.turn_spring = 0.03f; + bombthrower_vars->move.turn_damping = 0.3f; + bombthrower_vars->move.max_turn_step = 0.25f; + bombthrower_vars->move.max_speed = D_L08_00161978_gp * frame_time; bombthrower_vars->b58 = truncate_float_to_s32(17.0f); bombthrower_vars->b5A = truncate_float_to_s32(10.4f); - clear_u64_value(bombthrower_vars->v40); + clear_u64_value(bombthrower_vars->move_displacement); bombthrower_vars->waypoint = (struct Moby *)FUN_L08_002daa10_c((char *)moby); bombthrower_vars->waypoint->command = 1; bombthrower_vars->throw_delay_timer = scale_game_frames(0xB4); @@ -330,9 +319,9 @@ void blarg_bombthrower_update(struct Moby *moby) { break; case BOMBTHROWER_STATE_APPROACH_WAYPOINT: step_mover_2e3f20((char *)moby, - bombthrower_vars->blkD0, + (char *)&bombthrower_vars->move, (float *)&bombthrower_vars->waypoint->pos, - (char *)bombthrower_vars->v40); + (char *)bombthrower_vars->move_displacement); if (fast_vec_dist(&moby->pos, &bombthrower_vars->waypoint->pos) < 3.0f) { if (fast_difference_between_rotations( moby->rot.z, @@ -372,9 +361,9 @@ void blarg_bombthrower_update(struct Moby *moby) { break; case BOMBTHROWER_STATE_MOVE_ONTO_WAYPOINT: step_mover_2e3f20((char *)moby, - bombthrower_vars->blkD0, + (char *)&bombthrower_vars->move, (float *)&bombthrower_vars->waypoint->pos, - (char *)bombthrower_vars->v40); + (char *)bombthrower_vars->move_displacement); if (moby->anim_flags & 2) { FUN_00212f90(bombthrower_vars->waypoint, 1, 0, scale_game_frames(6)); qcopy(&moby->pos, &bombthrower_vars->waypoint->pos); @@ -393,7 +382,7 @@ void blarg_bombthrower_update(struct Moby *moby) { float target_distance_xy = vector_distance_xy(&moby->pos, &target->pos); func_L00_002592B0_x(fast_arc_tan(target->pos.x - moby->pos.x, target->pos.y - moby->pos.y), moby, - bombthrower_vars->blk12C, + &bombthrower_vars->turn_velocity, 0.02f, 0.3f, 0.2f); @@ -426,8 +415,10 @@ void blarg_bombthrower_update(struct Moby *moby) { point[2] = 0.0f; fast_vec_add(point, point, &bombthrower_vars->waypoint->pos); if (0.2f < vector_distance_xy(&moby->pos, point)) { - step_mover_2e3f20( - (char *)moby, bombthrower_vars->blkD0, point, (char *)bombthrower_vars->v40); + step_mover_2e3f20((char *)moby, + (char *)&bombthrower_vars->move, + point, + (char *)bombthrower_vars->move_displacement); } if (moby->anim_flags & 2) { LevelCamera *cam; @@ -460,7 +451,7 @@ void blarg_bombthrower_update(struct Moby *moby) { case BOMBTHROWER_STATE_THROW_BOMB: func_L00_002592B0_x(fast_arc_tan(target->pos.x - moby->pos.x, target->pos.y - moby->pos.y), moby, - bombthrower_vars->blk12C, + &bombthrower_vars->turn_velocity, 0.02f, 0.3f, 0.2f); @@ -517,7 +508,7 @@ void blarg_bombthrower_update(struct Moby *moby) { case BOMBTHROWER_STATE_DAMAGE_KNOCKBACK: case BOMBTHROWER_STATE_MOTION_RECOVERY: case BOMBTHROWER_STATE_FALL_RECOVERY: - if (step_moby_motion(moby, bombthrower_vars->blk70) & 0x40) { + if (step_moby_motion(moby, &bombthrower_vars->knockback) & 0x40) { old_waypoint = bombthrower_vars->waypoint; if ((bombthrower_vars->waypoint = (struct Moby *)FUN_L08_002daa10_c((char *)moby)) == 0) { @@ -538,7 +529,7 @@ void blarg_bombthrower_update(struct Moby *moby) { } break; case BOMBTHROWER_STATE_DYING: - if (step_moby_motion(moby, bombthrower_vars->blk70) & 0x40) { + if (step_moby_motion(moby, &bombthrower_vars->knockback) & 0x40) { moby->anim_speed = 0.0f; moby->state = BOMBTHROWER_STATE_FADE_OUT; moby->collision = 0; diff --git a/src/overlays/l08/mobys/bolt_pickup.c b/src/overlays/l08/mobys/bolt_pickup.c index 6e69fe73a4..3d3d982d17 100644 --- a/src/overlays/l08/mobys/bolt_pickup.c +++ b/src/overlays/l08/mobys/bolt_pickup.c @@ -33,7 +33,7 @@ typedef struct MobyData { float f8; float fC; float vel[4]; - int f20; + int bolt_value; /* bolts credited on pickup */ Target *target; int ticks; int f2C; @@ -203,8 +203,8 @@ void bolt_pickup_update(Moby_2B94B0 *moby) { break; if (moby_data->target != 0) moby_data->target->fA = 0; - current_bolt_count = current_bolt_count + moby_data->f20; - ((int *)level_bolts)[D_0015ED84] = ((int *)level_bolts)[D_0015ED84] + moby_data->f20; + current_bolt_count = current_bolt_count + moby_data->bolt_value; + ((int *)level_bolts)[D_0015ED84] = ((int *)level_bolts)[D_0015ED84] + moby_data->bolt_value; allocate_voice_for_target_entry(0, 0, moby); queue_animation_update(2, 0x754E, diff --git a/src/overlays/l08/mobys/bolt_thief.c b/src/overlays/l08/mobys/bolt_thief.c index 8d0e10a396..03e02b78f2 100644 --- a/src/overlays/l08/mobys/bolt_thief.c +++ b/src/overlays/l08/mobys/bolt_thief.c @@ -3,6 +3,7 @@ #include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "asm.h" #include "rnc/mobys/moby.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" #include "sda.h" #include "rnc/math/fast_math.h" #include "rnc/math/asm_helpers.h" @@ -51,27 +52,22 @@ begin_bolt_attraction(struct Moby *, struct Moby *, float, float) __asm__("FUN_L extern void FUN_00212f90(struct Moby *, int, int, int); typedef struct { - char pad0[0x29]; - unsigned char b29; - char pad2A[0x16]; - Vec4 v40; - char pad50[0x10]; - struct HitColorFlash hit_flash; - char x70[0x10]; - float f80, f84, f88, f8C; - int w90, w94; - char pad98[0x15]; - unsigned char bAD; - char padAE[0x22]; - SwarmPathFollower follow[2]; - char pad130[0x28]; - struct Moby *list[0x32]; - int w220; - float f224; - char pad228[4]; - int w22C; - char pad230[0x30]; - unsigned char x260[1]; + char pad0[0x29]; + unsigned char b29; + char pad2A[0x16]; + Vec4 v40; + char pad50[0x10]; + struct HitColorFlash hit_flash; + struct KnockbackMotion knockback; + SwarmPathFollower follow[2]; + char pad130[0x28]; + struct Moby *list[0x32]; + int trigger_path; /* path whose first point wakes the thief */ + float turn_velocity; + char pad228[4]; + int pickups_taken; + char pad230[0x30]; + unsigned char big_head_manipulator[1]; } BoltThiefVars; void bolt_thief_update(struct Moby *moby) __asm__("FUN_L08_002e2df0"); @@ -120,7 +116,7 @@ void bolt_thief_update(struct Moby *moby) { BoltThiefVars *bolt_thief_instance_vars; bolt_thief_instance_vars = moby->pvars; - FUN_L00_00263ac8(2.5f, moby, 1, bolt_thief_instance_vars->x260); + FUN_L00_00263ac8(2.5f, moby, 1, bolt_thief_instance_vars->big_head_manipulator); if (moby->visible != 0) { if (fast_vec_dist(&moby->pos, D_L08_001675C0) < 29.0f) { FUN_L00_0025a120(moby); @@ -140,16 +136,16 @@ void bolt_thief_update(struct Moby *moby) { { float speed8 = D_0015ED6C * 8.0f; float speed10 = D_0015ED6C * 10.0f; - bolt_thief_instance_vars->f80 = 0.008f; - bolt_thief_instance_vars->f84 = 0.0005f; - bolt_thief_instance_vars->w94 = 1; - bolt_thief_instance_vars->f88 = speed8; - bolt_thief_instance_vars->f8C = speed10; - bolt_thief_instance_vars->bAD = 0; + bolt_thief_instance_vars->knockback.gravity = 0.008f; + bolt_thief_instance_vars->knockback.speed_approach_step = 0.0005f; + bolt_thief_instance_vars->knockback.flags = 1; + bolt_thief_instance_vars->knockback.speed = speed8; + bolt_thief_instance_vars->knockback.vertical_speed = speed10; + bolt_thief_instance_vars->knockback.unk3D = 0; } trooper_start_knockback( moby, - bolt_thief_instance_vars->x70, + &bolt_thief_instance_vars->knockback, fast_arc_tan(moby->pos.x - hero.motion.pos.f[0], moby->pos.y - hero.motion.pos.f[1]), 4, 1, @@ -180,7 +176,7 @@ void bolt_thief_update(struct Moby *moby) { } break; case BOLT_THIEF_WAIT_FOR_HERO_NEAR_TRIGGER: - qcopy(&point, &l08_paths[bolt_thief_instance_vars->w220]->points[0]); + qcopy(&point, &l08_paths[bolt_thief_instance_vars->trigger_path]->points[0]); if (fast_vec_dist(hero.motion.pos.f, &point) < 24.0f) { build_bolt_thief_target_list((char *)moby); moby->state = BOLT_THIEF_FOLLOW_PRIMARY_PATH_TO_EXIT; @@ -200,7 +196,8 @@ void bolt_thief_update(struct Moby *moby) { (follower->point + follower->path->count + follower->direction) % follower->path->count; heading = fast_arc_tan(follower->path->points[next].f[0] - moby->pos.x, follower->path->points[next].f[1] - moby->pos.y); - FUN_L00_00258278(moby, heading, &bolt_thief_instance_vars->f224, 0.01f, 0.3f, 0.1f); + FUN_L00_00258278( + moby, heading, &bolt_thief_instance_vars->turn_velocity, 0.01f, 0.3f, 0.1f); path = follower->path; qcopy(&point, &path->points[next]); if (path->points[next].f[3] == 0.0f) { @@ -255,7 +252,7 @@ void bolt_thief_update(struct Moby *moby) { if (fast_vec_length(&point) < 2.0f * D_0015ED6C) { other->state = BOLT_PICKUP_COLLECTION_TRIGGERED; bolt_thief_instance_vars->list[i] = 0; - bolt_thief_instance_vars->w22C++; + bolt_thief_instance_vars->pickups_taken++; } } } @@ -280,7 +277,8 @@ void bolt_thief_update(struct Moby *moby) { (follower->point + follower->path->count + follower->direction) % follower->path->count; heading = fast_arc_tan(follower->path->points[next].f[0] - moby->pos.x, follower->path->points[next].f[1] - moby->pos.y); - FUN_L00_00258278(moby, heading, &bolt_thief_instance_vars->f224, 0.01f, 0.3f, 0.1f); + FUN_L00_00258278( + moby, heading, &bolt_thief_instance_vars->turn_velocity, 0.01f, 0.3f, 0.1f); qcopy(&point, &follower->path->points[next]); for (i = 0; i < 0x32; i++) { struct Moby *other = bolt_thief_instance_vars->list[i]; @@ -325,7 +323,8 @@ void bolt_thief_update(struct Moby *moby) { (follower->point + follower->path->count + follower->direction) % follower->path->count; heading = fast_arc_tan(follower->path->points[next].f[0] - moby->pos.x, follower->path->points[next].f[1] - moby->pos.y); - FUN_L00_00258278(moby, heading, &bolt_thief_instance_vars->f224, 0.01f, 0.3f, 0.1f); + FUN_L00_00258278( + moby, heading, &bolt_thief_instance_vars->turn_velocity, 0.01f, 0.3f, 0.1f); qcopy(&point, &follower->path->points[next]); fast_vec_sub(&step, &point, &moby->pos); fast_vec_normalize(&step, &step, bolt_thief_waypoint_speed_gp * D_0015ED6C); @@ -346,7 +345,8 @@ void bolt_thief_update(struct Moby *moby) { heading = fast_arc_tan(hero.motion.pos.f[0] - moby->pos.x, hero.motion.pos.f[1] - moby->pos.y); hero_position = hero.motion.pos.f; - FUN_L00_00258278(moby, heading, &bolt_thief_instance_vars->f224, 0.01f, 0.3f, 0.1f); + FUN_L00_00258278( + moby, heading, &bolt_thief_instance_vars->turn_velocity, 0.01f, 0.3f, 0.1f); distance = fast_vec_dist(hero_position, &moby->pos); if (distance < 17.0f || find_listed_moby_by_data_id(moby) != 0) { SwarmPathFollower *follower; @@ -363,7 +363,7 @@ void bolt_thief_update(struct Moby *moby) { break; } case BOLT_THIEF_KNOCKBACK: - if (step_moby_motion(moby, bolt_thief_instance_vars->x70) & 3) { + if (step_moby_motion(moby, &bolt_thief_instance_vars->knockback) & 3) { cart_burst(moby, &moby->pos, -1, 1.0f, 13.0f); mark_moby_for_removal(moby); return; diff --git a/src/overlays/l08/mobys/bomber_tank.c b/src/overlays/l08/mobys/bomber_tank.c index c8c0879cb8..7f482f5df7 100644 --- a/src/overlays/l08/mobys/bomber_tank.c +++ b/src/overlays/l08/mobys/bomber_tank.c @@ -102,7 +102,7 @@ typedef struct { u8 pad0[0x20]; f32 health; /* 0x20 */ u8 pad24[4]; - u8 unk28; + u8 hit_response_class; u8 unk29; u8 unk2A; u8 pad2B[3]; @@ -123,7 +123,7 @@ typedef struct { u8 padF8[8]; u8 manipulator[0x40]; /* 0x100 */ s32 trigger_moby; /* 0x140: index of the moby whose pvars float reaching 1.0 releases the tank */ - s32 unk144; + s32 debris_group_moby; /* 0x144: index of the moby whose linked group holds the debris */ u8 pad148[4]; s32 start_point; /* 0x14C: D_L08_001B0CB0 index */ s32 path; /* 0x150: D_L08_001B0CB0 index */ @@ -205,7 +205,7 @@ void bomber_tank_update(Moby *moby) { bomber_tank_update_vars->part_b->collision = 0; if (moby->prev_seq != 0) blend_moby_animation(moby, 0, 0, 0); - } else if (bomber_tank_update_vars->unk144 > 0) { + } else if (bomber_tank_update_vars->debris_group_moby > 0) { if (D_0013D3B6 == 0) { moby->state = BOMBER_TANK_STATE_SCATTER_GROUP_AND_ACTIVATE; moby->flags |= 0x41; @@ -231,7 +231,7 @@ void bomber_tank_update(Moby *moby) { } clear_u64_value(&bomber_tank_update_vars->unk40); bomber_tank_update_vars->unk29 = 0; - bomber_tank_update_vars->unk28 = 3; + bomber_tank_update_vars->hit_response_class = 3; bomber_tank_update_vars->unk30 = 3.0f; bomber_tank_update_vars->health = 9.0f; bomber_tank_update_vars->unk2A = 12; @@ -369,11 +369,11 @@ typedef struct { struct HitColorFlash hit_flash; float target[4]; char padC0[0x30]; - int fF0; + int target_moby; /* 0xF0: the hero moby when unset */ int mode; char padF8[0x18]; - float f110[4]; - float f120[4]; + float manipulator_rotation[4]; /* 0x110: turret yaw and pitch */ + float manipulator_scale[4]; char pad130[0x24]; int path; char pad158[8]; @@ -474,7 +474,7 @@ void update_bomber_tank_damage_and_aim(Moby *moby) { qcopy(burst_position_or_aim_scratch, &moby->pos); burst_position_or_aim_scratch[2] += 3.0f; bomber_tank_damage_and_aim_vars->hit_flash.flash_red = 0xFA; - clear_u64_value(bomber_tank_damage_and_aim_vars->f120); + clear_u64_value(bomber_tank_damage_and_aim_vars->manipulator_scale); spawn_explosion(moby, bomber_tank_damage_and_aim_vars->f40, burst_position_or_aim_scratch, @@ -667,8 +667,8 @@ void update_bomber_tank_damage_and_aim(Moby *moby) { 0, ((Path *)l08_paths[bomber_tank_damage_and_aim_vars->path])->list, ((Path *)l08_paths[bomber_tank_damage_and_aim_vars->path])->count); - if (bomber_tank_damage_and_aim_vars->fF0 == 0) - bomber_tank_damage_and_aim_vars->fF0 = *(int *)D_001413D0; + if (bomber_tank_damage_and_aim_vars->target_moby == 0) + bomber_tank_damage_and_aim_vars->target_moby = *(int *)D_001413D0; if (bomber_tank_damage_and_aim_vars->mode != BOMBER_TANK_MODE_INHIBIT_ACTIVATION_AND_TARGET_AIM) { float yaw, distance, pitch; @@ -713,11 +713,12 @@ void update_bomber_tank_damage_and_aim(Moby *moby) { } build_axis_rotation_quaternion( burst_position_or_aim_scratch, 1, bomber_tank_damage_and_aim_vars->pitch); - build_axis_rotation_quaternion( - bomber_tank_damage_and_aim_vars->f110, 2, bomber_tank_damage_and_aim_vars->yaw); - multiply_quaternions(bomber_tank_damage_and_aim_vars->f110, + build_axis_rotation_quaternion(bomber_tank_damage_and_aim_vars->manipulator_rotation, + 2, + bomber_tank_damage_and_aim_vars->yaw); + multiply_quaternions(bomber_tank_damage_and_aim_vars->manipulator_rotation, burst_position_or_aim_scratch, - bomber_tank_damage_and_aim_vars->f110); + bomber_tank_damage_and_aim_vars->manipulator_rotation); { short saved_anim0 = bomber_tank_damage_and_aim_vars->hit_flash.timer; short saved_anim2 = bomber_tank_damage_and_aim_vars->hit_flash.phase; diff --git a/src/overlays/l08/mobys/commando.c b/src/overlays/l08/mobys/commando.c index fc071a01f2..f9dc8a4c63 100644 --- a/src/overlays/l08/mobys/commando.c +++ b/src/overlays/l08/mobys/commando.c @@ -73,13 +73,13 @@ extern L16WatchPlayer D_0013E633_watch __asm__("D_0013E533"); typedef struct { char pad00[0x24]; - short h24; + short dialogue_mode; char pad26[2]; - unsigned char b28; + unsigned char dialogue_any_direction; /* 0x28: skips the facing check */ char pad29[3]; - float f2C; + float dialogue_radius; /* 0x2C: dialogue record (at 0x20) facing tolerance */ char pad30[0x10]; - void *p40; + void *name_text; char pad44[0x1C]; char body[0x64]; float pitch; @@ -92,7 +92,7 @@ typedef struct { char pad14C[0x14]; float target[4]; char pad170[0x10]; - int joint; + int reposition_cuboid; /* D_L08_001600EC row it moves to after the first talk */ char pad184[4]; int moving_timer; int target_timer; @@ -139,13 +139,13 @@ void commando_update(WM *moby) { mark_moby_for_removal(moby); return; } - commando_vars->f2C = 3.0f; - commando_vars->p40 = commando_name_string; + commando_vars->dialogue_radius = 3.0f; + commando_vars->name_text = commando_name_string; if (!D_0013D3B4) { moby->state = COMMANDO_DIALOGUE_BEFORE_REPOSITION; } else { char *b = D_L08_001600EC; - int j = commando_vars->joint; + int j = commando_vars->reposition_cuboid; qcopy(moby->position, b + j * 0x80 + 0x30); qcopy((char *)moby + 0x40, b + j * 0x80 + 0x70); moby->state = COMMANDO_DIALOGUE_AFTER_REPOSITION; @@ -155,7 +155,7 @@ void commando_update(WM *moby) { case COMMANDO_DIALOGUE_BEFORE_REPOSITION: if (update_npc_dialogue(moby, (char *)commando_vars + 0x20)) { char *b = D_L08_001600EC; - int j = commando_vars->joint; + int j = commando_vars->reposition_cuboid; qcopy(moby->position, b + j * 0x80 + 0x30); qcopy((char *)moby + 0x40, b + j * 0x80 + 0x70); moby->state = COMMANDO_DIALOGUE_AFTER_REPOSITION; @@ -174,8 +174,8 @@ void commando_update(WM *moby) { break; case COMMANDO_POST_DIALOGUE: if (level_game_mode != 2) { - commando_vars->b28 = 1; - if (commando_vars->h24 == 3) { + commando_vars->dialogue_any_direction = 1; + if (commando_vars->dialogue_mode == 3) { unlock_planet(10); queue_planet_unlock_message(10); jet_clear_persistent(((unsigned char *)moby)[0xB0]); diff --git a/src/overlays/l08/mobys/effect_emitter.c b/src/overlays/l08/mobys/effect_emitter.c index 6cbfc7a1ba..0f58add2e5 100644 --- a/src/overlays/l08/mobys/effect_emitter.c +++ b/src/overlays/l08/mobys/effect_emitter.c @@ -18,8 +18,8 @@ typedef struct EffectEmitterVars { u8 pad_0[0x4]; f32 half_width; u8 pad_8[0x4]; - f32 unkC; - s32 unk10; + f32 effect_scale; + s32 effect_life; /* frames */ s32 count_per_frame; f32 min_speed_y; f32 max_speed_y; @@ -51,7 +51,7 @@ void effect_emitter_update(struct Moby *moby) { effect_direction[3] = 0; spawn_effect_with_initial_motion(effect_position, effect_direction, - effect_spawn_settings->unk10, - effect_spawn_settings->unkC); + effect_spawn_settings->effect_life, + effect_spawn_settings->effect_scale); } } diff --git a/src/overlays/l08/mobys/the_plumber_batalia.c b/src/overlays/l08/mobys/the_plumber_batalia.c index ae73b83423..849d4ccb14 100644 --- a/src/overlays/l08/mobys/the_plumber_batalia.c +++ b/src/overlays/l08/mobys/the_plumber_batalia.c @@ -81,15 +81,15 @@ typedef struct { typedef struct { char pad00[4]; - short sub; + short dialogue_mode; /* 0x04: 3 when the talk is done */ char pad06[0x1A]; - void *p20; + void *name_text; char pad24[0x12]; - short h36; + short dialogue_entry; /* 0x36 */ char pad38[0x10]; - int i48; + int camera_cuboid; /* 0x48: D_L08_001600EC row */ char pad4C[4]; - int i50; + int cannon_moby; /* 0x50: index of the cannon moby */ char pad54[0xC]; char body[0x64]; float pitch; @@ -182,26 +182,26 @@ void the_plumber_batalia_update(L14WatchMoby *moby) { mark_moby_for_removal(moby); return; } - watch_data->p20 = (void *)batalia_plumber_name_text; + watch_data->name_text = (void *)batalia_plumber_name_text; moby->state = PLUMBER_UPDATE_DIALOGUE; initialize_npc_dialogue(moby, watch_data); break; case PLUMBER_UPDATE_DIALOGUE: if (update_npc_dialogue(moby, watch_data)) begin_dialogue_camera_transition(moby, 2.7f); - if (watch_data->h36 == 2) { - char *camera_record = D_L08_001600EC + watch_data->i48 * 128; + if (watch_data->dialogue_entry == 2) { + char *camera_record = D_L08_001600EC + watch_data->camera_cuboid * 128; jet_reset_camera(camera_record + 0x30, camera_record + 0x70); moby->state = PLUMBER_SCRIPTED_HANDOFF; - request_batalia_cannon_mount(D_L08_0015FFD8 + watch_data->i50 * 256); + request_batalia_cannon_mount(D_L08_0015FFD8 + watch_data->cannon_moby * 256); } - if (watch_data->sub == 3) { + if (watch_data->dialogue_mode == 3) { FUN_L08_002a1880(1); moby->state = PLUMBER_SAVE_AND_REMOVE; } - if (watch_data->sub == 4) { + if (watch_data->dialogue_mode == 4) { hero_respawn(); - watch_data->sub = -1; + watch_data->dialogue_mode = -1; } break; case PLUMBER_SCRIPTED_HANDOFF: From fb8f09df03377355973de8d901bd843c5e656d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:00:22 +0000 Subject: [PATCH 097/213] decomp: share the hero motion moby view with Moby's field names and name the swing target pvars --- .../rnc/overlay/shared/hero/hero_moby_view.h | 65 ++++++ .../update_hero_motion_for_current_state.c | 162 +++++---------- .../l05/hero/update_hero_motion_by_state.c | 194 +++++++----------- .../update_hero_motion_for_current_state.c | 172 ++++++---------- .../update_hero_motion_for_current_state.c | 171 ++++++--------- .../l11/hero/update_hero_motion_by_state.c | 166 ++++++--------- .../update_hero_motion_for_current_state.c | 173 ++++++---------- .../l14/hero/update_hero_motion_by_state.c | 169 ++++++--------- .../update_hero_motion_for_current_state.c | 146 +++++-------- .../update_hero_motion_for_current_state.c | 185 +++++++---------- .../update_hero_motion_for_current_state.c | 192 +++++++---------- .../update_hero_motion_for_current_state.c | 161 ++++++--------- 12 files changed, 753 insertions(+), 1203 deletions(-) create mode 100644 include/rnc/overlay/shared/hero/hero_moby_view.h diff --git a/include/rnc/overlay/shared/hero/hero_moby_view.h b/include/rnc/overlay/shared/hero/hero_moby_view.h new file mode 100644 index 0000000000..36ae79a6d2 --- /dev/null +++ b/include/rnc/overlay/shared/hero/hero_moby_view.h @@ -0,0 +1,65 @@ +#ifndef LOMBYTE_RNC_OVERLAY_SHARED_HERO_HERO_MOBY_VIEW_H +#define LOMBYTE_RNC_OVERLAY_SHARED_HERO_HERO_MOBY_VIEW_H + +#include "types.h" +#include "rnc/math/vector.h" + +/* The pvars of a swingshot target (Hero.swing_target_moby), as the level copies of the + hero motion update read them while the hero swings. */ +struct SwingTargetVars { + u8 pad0[0xC]; + f32 max_speed; /* 0x0C: the swing speed is eased down to it */ + u8 pad10[0x24]; + s32 align_yaw; /* 0x34: nonzero eases Hero.swing_yaw toward the target's rot.z */ +}; + +/* A moby as the level copies of the hero motion update read it: the layout and names of + struct Moby (rnc/mobys/moby.h). The unions keep the single-float loads of pos and rot. */ +struct MobyView { + u8 pad0[0x10]; + union { + Vec4 v; + f32 x; + struct { + u8 pad[0x4]; + f32 v; + } y; + struct { + u8 pad[0x8]; + f32 v; + } z; + } pos; /* 0x10 */ + u8 pad20[0x3]; + u8 alpha; /* 0x23 */ + u8 pad24[0xC]; + u8 update_dist; /* 0x30 */ + u8 visible; + s16 draw_dist; + u16 flags; /* 0x34 */ + u8 pad36[0xA]; + union { + Vec4 v; + struct { + u8 pad[0x8]; + f32 v; + } z; + } rot; /* 0x40 */ + u8 frame; + u8 prev_frame; + u8 seq; + u8 prev_seq; + u8 pad54[0x1C]; + u8 anim_flags; /* 0x70 */ + u8 pad71[0x7]; + struct SwingTargetVars *pvars; /* 0x78: only read on the swing target */ + u8 pad7C[0x2A]; + s16 oclass; /* 0xA6 */ + u8 padA8[0x14]; + u8 command; /* 0xBC */ + u8 padBD[0x3]; + Vec4 rot_row0; /* 0xC0 */ +}; + +#define MV(p) ((struct MobyView *)(p)) + +#endif /* LOMBYTE_RNC_OVERLAY_SHARED_HERO_HERO_MOBY_VIEW_H */ diff --git a/src/overlays/l03/hero/update_hero_motion_for_current_state.c b/src/overlays/l03/hero/update_hero_motion_for_current_state.c index 7b053a6abb..960edcd211 100644 --- a/src/overlays/l03/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l03/hero/update_hero_motion_for_current_state.c @@ -92,53 +92,7 @@ s32 find_first_nearby_registered_path(Vec4 *from, #include "rnc/hero/hero.h" #include "rnc/math/fast_math.h" -struct MobyView { - u8 pad0[0xC]; - f32 fC; - union { - Vec4 v10; - f32 f10; - struct { - u8 pad[0x4]; - f32 v; - } f14; - struct { - u8 pad[0x8]; - f32 v; - } f18; - } u10; - u8 pad20[0x3]; - u8 b23; - u8 pad24[0xC]; - u8 b30; - u8 b31; - s16 h32; - union { - s32 i34; - u16 uh34; - } u34; - u8 pad38[0x8]; - union { - Vec4 v40; - struct { - u8 pad[0x8]; - f32 v; - } f48; - } u40; - u8 pad50[0x1]; - u8 b51; - u8 b52; - u8 b53; - u8 pad54[0x1C]; - u8 b70; - u8 pad71[0x7]; - struct MobyView *pm78; - u8 pad7C[0x2A]; - s16 hA6; - u8 padA8[0x18]; - Vec4 vC0; -}; -#define MV(p) ((struct MobyView *)(p)) +#include "rnc/overlay/shared/hero/hero_moby_view.h" struct PlayerJointTable { u8 pad0[0x60]; @@ -317,7 +271,7 @@ void update_hero_motion_for_current_state(void) __asm__("FUN_L03_0020ef60" void update_hero_motion_for_current_state(void) { struct MobyView *moby = MV(hero.moby); s32 initial_state_step = hero.state.step; - s32 anim = moby->b53; + s32 anim = moby->prev_seq; f32 speed; Vec4 spatial_scratch_or_hit_descriptor; Vec4 v10; @@ -380,8 +334,8 @@ void update_hero_motion_for_current_state(void) { } } if (hero.state.current == HERO_STATE_CROUCH || hero.state.current == 0x17) { - if (hero.stick_magnitude > 0.2f || MV(hero.moby)->b53 == 0xE || - MV(hero.moby)->b53 == 0xF) { + if (hero.stick_magnitude > 0.2f || MV(hero.moby)->prev_seq == 0xE || + MV(hero.moby)->prev_seq == 0xF) { if (hero.state.current == HERO_STATE_CROUCH) { turn_to( 0, frame_scale_sq * 0.002f, frame_scale_sq * 0.07f, frame_time * 6.981317f); @@ -391,7 +345,7 @@ void update_hero_motion_for_current_state(void) { if (absolute_float(hero.motion.yaw_rate) > frame_time * 0.34906584f) { s32 neg = hero.motion.yaw_rate < 0.0f; s32 anim = neg + 0xE; - if (MV(hero.moby)->b53 != anim) { + if (MV(hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(5)); } hero.anim_speed = @@ -407,7 +361,7 @@ void update_hero_motion_for_current_state(void) { if (hero.state.current == 0x17) { anim = get_hero_idle_animation_index(0); } - if (MV(hero.moby)->b53 != anim) { + if (MV(hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(7)); } } @@ -421,14 +375,14 @@ void update_hero_motion_for_current_state(void) { } speed = frame_time_sq * 12.0f * s; hero.unk2290 = speed; - if (MV(hero.moby)->b52 == MV(hero.moby)->b53 && MV(hero.moby)->b52 != 0x14) { + if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq && MV(hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; - if (scale_game_frames(5) < r && MV(hero.moby)->b51 < 5.5f) { + if (scale_game_frames(5) < r && MV(hero.moby)->prev_frame < 5.5f) { adjust_hero_animation_speed_for_target_frame(13.0f, r, 0.5f, -1.0f); if (hero.anim_speed > 1.1f) { hero.anim_speed = 1.1f; } - } else if (MV(hero.moby)->b51 > 6.5f) { + } else if (MV(hero.moby)->prev_frame > 6.5f) { hero.anim_speed = 1.0f; } } @@ -473,27 +427,27 @@ void update_hero_motion_for_current_state(void) { if (m == NULL) { goto drop; } - qcopy(&m->u10.v10, &hero.motion.pos); - qcopy(&m->u40.v40, &hero.motion.rot); - m->h32 = h40; - MV(hero.sink_effect_moby)->b31 = 1; - MV(hero.sink_effect_moby)->b30 = 0; - MV(hero.sink_effect_moby)->b23 = 0; - MV(hero.sink_effect_moby)->u34.uh34 |= 0x800; + qcopy(&m->pos.v, &hero.motion.pos); + qcopy(&m->rot.v, &hero.motion.rot); + m->draw_dist = h40; + MV(hero.sink_effect_moby)->visible = 1; + MV(hero.sink_effect_moby)->update_dist = 0; + MV(hero.sink_effect_moby)->alpha = 0; + MV(hero.sink_effect_moby)->flags |= 0x800; update_entity(MV(hero.sink_effect_moby)); allocate_voice_for_target_entry(0, 0, MV(hero.sink_effect_moby)); } if (MV(hero.sink_effect_moby) != NULL) { struct MobyView *m; struct MobyView *o; - MV(hero.sink_effect_moby)->b23 += truncate_float_to_s32(frame_scale * 5.0f); - if (MV(hero.sink_effect_moby)->b23 > 0x80) { - MV(hero.sink_effect_moby)->b23 = 0x80; + MV(hero.sink_effect_moby)->alpha += truncate_float_to_s32(frame_scale * 5.0f); + if (MV(hero.sink_effect_moby)->alpha > 0x80) { + MV(hero.sink_effect_moby)->alpha = 0x80; } m = MV(hero.sink_effect_moby); o = MV(hero.moby); - qcopy(&m->u10.v10, &o->u10.v10); - qcopy(&m->u40.v40, &o->u40.v40); + qcopy(&m->pos.v, &o->pos.v); + qcopy(&m->rot.v, &o->rot.v); update_entity(m); } drop: @@ -706,7 +660,7 @@ void update_hero_motion_for_current_state(void) { spatial_scratch_or_hit_descriptor_tail.f[0] = 0.4f; transform_vector_by_basis(&spatial_scratch_or_hit_descriptor_tail, &spatial_scratch_or_hit_descriptor_tail, - &MV(pl->moby)->vC0); + &MV(pl->moby)->rot_row0); fast_vec_add(&spatial_scratch_or_hit_descriptor, &spatial_scratch_or_hit_descriptor, &spatial_scratch_or_hit_descriptor_tail); @@ -728,7 +682,7 @@ void update_hero_motion_for_current_state(void) { } if (hero.state.current == 0x35 && fast_dec_timer_s16(&hero.pack_particle_timer) != 0) { struct MobyView *gm = MV(hero.items[3].moby); - if (gm != NULL && gm->hA6 == 0x261) { + if (gm != NULL && gm->oclass == 0x261) { s32 i; for (i = 0; i < 4; i++) { moby_point_position(gm, i % 2, &spatial_scratch_or_hit_descriptor); @@ -736,7 +690,7 @@ void update_hero_motion_for_current_state(void) { spatial_scratch_or_hit_descriptor_tail.f[0] = -0.15f; transform_vector_by_basis(&spatial_scratch_or_hit_descriptor_tail, &spatial_scratch_or_hit_descriptor_tail, - &MV(hero.moby)->vC0); + &MV(hero.moby)->rot_row0); fast_vec_add(&spatial_scratch_or_hit_descriptor, &spatial_scratch_or_hit_descriptor, &spatial_scratch_or_hit_descriptor_tail); @@ -842,7 +796,7 @@ void update_hero_motion_for_current_state(void) { spatial_scratch_or_hit_descriptor_tail.f[0] = 0.4f; transform_vector_by_basis(&spatial_scratch_or_hit_descriptor_tail, &spatial_scratch_or_hit_descriptor_tail, - &MV(hero.moby)->vC0); + &MV(hero.moby)->rot_row0); fast_vec_add(&spatial_scratch_or_hit_descriptor, &spatial_scratch_or_hit_descriptor, &spatial_scratch_or_hit_descriptor_tail); @@ -940,9 +894,9 @@ void update_hero_motion_for_current_state(void) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } - if (anim != -1 && MV(hero.moby)->b52 != 0x36) { + if (anim != -1 && MV(hero.moby)->seq != 0x36) { set_hero_animation(anim, 0, frames); - } else if ((MV(hero.moby)->b70 & 2) && MV(hero.moby)->b52 == 0x36) { + } else if ((MV(hero.moby)->anim_flags & 2) && MV(hero.moby)->seq == 0x36) { s32 an = get_hero_idle_animation_index(0); set_hero_animation(an, 0, scale_game_frames(5)); } @@ -964,16 +918,15 @@ void update_hero_motion_for_current_state(void) { &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } if (MV(hero.grapple_target) != NULL) { - hero.motion.move_yaw = - fast_arc_tan(MV(hero.grapple_target)->u10.f10 - moby->u10.f10, - MV(hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + hero.motion.move_yaw = fast_arc_tan(MV(hero.grapple_target)->pos.x - moby->pos.x, + MV(hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.15f, frame_time * 6.2831855f); } break; case HERO_STATE_APPROACH_TARGET_MOBY: { f32 hit; f32 hit2; - qcopy(&spatial_scratch_or_hit_descriptor, &MV(hero.grapple_target)->u10.v10); + qcopy(&spatial_scratch_or_hit_descriptor, &MV(hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &spatial_scratch_or_hit_descriptor); hero.target_arrival_frames = scale_game_frames(60); @@ -982,9 +935,8 @@ void update_hero_motion_for_current_state(void) { } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); - hero.motion.move_yaw = - fast_arc_tan(MV(hero.grapple_target)->u10.f10 - moby->u10.f10, - MV(hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + hero.motion.move_yaw = fast_arc_tan(MV(hero.grapple_target)->pos.x - moby->pos.x, + MV(hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.03f, frame_scale_sq * 0.15f, frame_time * 7.330383f); } else if (hero.state.step == 1) { approach_value(&hero.grapple_pull_speed, 0.0f, frame_time_sq * 42.0f); @@ -1020,7 +972,7 @@ void update_hero_motion_for_current_state(void) { &spatial_scratch_or_hit_descriptor_tail, &hero.motion.pos); fast_vec_sub( - &v10, &MV(hero.grapple_target)->u10.v10, &spatial_scratch_or_hit_descriptor_tail); + &v10, &MV(hero.grapple_target)->pos.v, &spatial_scratch_or_hit_descriptor_tail); fast_vec_normalize(&hero.motion.velocity, &v10, hero.grapple_pull_speed); if (scale_game_frames(30) > hero.target_arrival_frames) { f32 t = scale_game_frames(30) - hero.target_arrival_frames; @@ -1033,7 +985,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.displacement); fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; - qcopy(&spatial_scratch_or_hit_descriptor, &MV(hero.grapple_target)->u10.v10); + qcopy(&spatial_scratch_or_hit_descriptor, &MV(hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &spatial_scratch_or_hit_descriptor); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); @@ -1050,14 +1002,14 @@ void update_hero_motion_for_current_state(void) { case HERO_STATE_GRAPPLE_SWING_ENTRY: { f32 vz; s32 above; - if ((hero.anim_flags & 2) && moby->b53 == 0x34) { + if ((hero.anim_flags & 2) && moby->prev_seq == 0x34) { set_hero_animation(0x35, 10, scale_game_frames(12)); hero.anim_speed = 0.3f; } vz = hero.motion.velocity.f[2]; - if (MV(hero.swing_target_moby) != NULL && MV(hero.swing_target_moby)->pm78 != NULL && - MV(hero.swing_target_moby)->pm78->u34.i34 != 0) { - f32 a = MV(hero.swing_target_moby)->u40.f48.v; + if (MV(hero.swing_target_moby) != NULL && MV(hero.swing_target_moby)->pvars != NULL && + MV(hero.swing_target_moby)->pvars->align_yaw != 0) { + f32 a = MV(hero.swing_target_moby)->rot.z.v; if (fast_difference_between_rotations(a, hero.motion.rot.f[2]) > 90.0f) { a = fast_add_rotations(a, 3.1415927f); } @@ -1072,7 +1024,7 @@ void update_hero_motion_for_current_state(void) { hero.motion.move_yaw = hero.swing_yaw; turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.3f, frame_time * 4.712389f); fast_vec_sub(&spatial_scratch_or_hit_descriptor, - &MV(hero.swing_target_moby)->u10.v10, + &MV(hero.swing_target_moby)->pos.v, &hero.motion.pos); fast_vec_normalize( &spatial_scratch_or_hit_descriptor, &spatial_scratch_or_hit_descriptor, 1.0f); @@ -1109,7 +1061,7 @@ void update_hero_motion_for_current_state(void) { frame_scale_sq * 0.2f, frame_time * 9.599311f); above = 1; - if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->u10.f18.v)) { + if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->pos.z.v)) { above = 0; } if (hero.swing_hooked != 0) { @@ -1131,7 +1083,7 @@ void update_hero_motion_for_current_state(void) { } if (hero.swing_hooked != 0) { f32 s; - if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < + if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->pos.v) < hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( @@ -1139,7 +1091,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_entry_push != 0 && gravity_z(&hero.motion.velocity) > 0.0f) { fast_vec_sub(&motion_offset_or_position, &hero.motion.pos, - &MV(hero.swing_target_moby)->u10.v10); + &MV(hero.swing_target_moby)->pos.v); add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 57.0f); } @@ -1150,12 +1102,12 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &motion_offset_or_position); } { - struct MobyView *r; + struct SwingTargetVars *r; if (MV(hero.swing_target_moby) != NULL && - (r = MV(hero.swing_target_moby)->pm78) != NULL) { + (r = MV(hero.swing_target_moby)->pvars) != NULL) { f32 len = fast_vec_length(&hero.motion.velocity); - if (r->fC < len) { - approach_value(&len, r->fC, frame_time_sq * 15.0f); + if (r->max_speed < len) { + approach_value(&len, r->max_speed, frame_time_sq * 15.0f); fast_vec_normalize(&hero.motion.velocity, &hero.motion.velocity, len); } } @@ -1169,9 +1121,9 @@ void update_hero_motion_for_current_state(void) { vD0.f[2] = 0.0f; fast_vec_add(&vD0, &vD0, &hero.motion.pos); fast_vec_add(&motion_offset_or_position, &vD0, &hero.motion.velocity); - fast_vec_sub(&vC0, &motion_offset_or_position, &MV(hero.swing_target_moby)->u10.v10); + fast_vec_sub(&vC0, &motion_offset_or_position, &MV(hero.swing_target_moby)->pos.v); fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); - fast_vec_add(&motion_offset_or_position, &MV(hero.swing_target_moby)->u10.v10, &vC0); + fast_vec_add(&motion_offset_or_position, &MV(hero.swing_target_moby)->pos.v, &vC0); fast_vec_sub(&hero.motion.velocity, &motion_offset_or_position, &vD0); old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, @@ -1216,18 +1168,18 @@ void update_hero_motion_for_current_state(void) { up = forward_component(&motion_offset_or_position) > 0.0f; } if (up) { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 6, scale_game_frames(17)); hero.swing_anim_dir = 1; - } else if (MV(hero.moby)->b52 == MV(hero.moby)->b53) { + } else if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(42.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } } else { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 0x15, scale_game_frames(9)); hero.swing_anim_dir = 2; - } else if (MV(hero.moby)->b52 == MV(hero.moby)->b53) { + } else if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(12.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } @@ -1290,7 +1242,7 @@ void update_hero_motion_for_current_state(void) { } hero.target_speed = 0.0f; if (MV(hero.melee_target) != NULL) { - f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->u10.v10); + f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1419,7 +1371,7 @@ void update_hero_motion_for_current_state(void) { tb = &D_L03_0017BD28[hero.attack_record]; hero.target_speed = 0.0f; if (MV(hero.melee_target) != NULL && scale_game_frames(4) > hero.state_timer) { - f32 d = vector_distance_xy(&MV(hero.melee_target)->u10.v10, &hero.motion.pos) - 0.5f; + f32 d = vector_distance_xy(&MV(hero.melee_target)->pos.v, &hero.motion.pos) - 0.5f; f32 attack_spacing_offset; f32 tol; f32 mx; @@ -1570,7 +1522,7 @@ void update_hero_motion_for_current_state(void) { spatial_scratch_or_hit_descriptor.f[3] = 5627.925f; ((u8 *)&v10)[8] = 0; a = hero.motion.rot.f[2]; - ((s16 *)&v10)[5] = o->hA6; + ((s16 *)&v10)[5] = o->oclass; yaw_matrix_or_spatial_vectors[0].f[0] = fast_cos(a) * 0.8f; yaw_matrix_or_spatial_vectors[0].f[1] = fast_sin(a) * 0.8f; yaw_matrix_or_spatial_vectors[0].f[2] = 0.55f; @@ -1817,7 +1769,7 @@ void update_hero_motion_for_current_state(void) { s32 idx; s32 n; compute_hero_fixed_offset_world_position(&spatial_scratch_or_hit_descriptor); - if (MV(hero.moby)->b53 == 0x66) { + if (MV(hero.moby)->prev_seq == 0x66) { release_voice_slot_cf(0, MV(hero.moby), 0); if (D_L03_0015F5CC & 1) { f32 a; @@ -2486,7 +2438,7 @@ void update_hero_motion_for_current_state(void) { if (initial_state_step != hero.state.step) { hero.step_frames = 0; } - if (anim != moby->b53) { + if (anim != moby->prev_seq) { hero.anim_seq_frames = 0; } } diff --git a/src/overlays/l05/hero/update_hero_motion_by_state.c b/src/overlays/l05/hero/update_hero_motion_by_state.c index a186289f28..3247e4ea58 100644 --- a/src/overlays/l05/hero/update_hero_motion_by_state.c +++ b/src/overlays/l05/hero/update_hero_motion_by_state.c @@ -25,54 +25,7 @@ #include "rnc/overlay/shared/rendering/effects/update_three_phase_effect_particle.h" #include "rnc/overlay/shared/hero/adjust_hero_pose_targets_from_motion.h" -struct MobyView { - u8 pad0[0xC]; - f32 fC; - union { - Vec4 v10; - f32 f10; - struct { - u8 pad[0x4]; - f32 v; - } f14; - struct { - u8 pad[0x8]; - f32 v; - } f18; - } u10; - u8 pad20[0x3]; - u8 b23; - u8 pad24[0xC]; - u8 b30; - u8 b31; - s16 h32; - union { - s32 i34; - u16 uh34; - } u34; - u8 pad38[0x8]; - union { - Vec4 v40; - struct { - u8 pad[0x8]; - f32 v; - } f48; - } u40; - u8 pad50[0x1]; - u8 b51; - u8 b52; - u8 b53; - u8 pad54[0x1C]; - u8 b70; - u8 pad71[0x7]; - struct MobyView *pm78; - u8 pad7C[0x2A]; - s16 hA6; - u8 padA8[0x14]; - u8 bBC; - u8 padBD[0x3]; - Vec4 vC0; -}; +#include "rnc/overlay/shared/hero/hero_moby_view.h" struct PlayerJointTable { u8 pad0[0x60]; @@ -273,7 +226,7 @@ void update_hero_motion_by_state(void) __asm__("FUN_L05_00244a70"); void update_hero_motion_by_state(void) { struct MobyView *moby = (struct MobyView *)hero.moby; s32 state_step_on_entry = hero.state.step; - s32 anim = moby->b53; + s32 anim = moby->prev_seq; f32 speed; Vec4 vector_and_hit_scratch; Vec4 v10; @@ -335,8 +288,8 @@ void update_hero_motion_by_state(void) { } } if (hero.state.current == HERO_STATE_CROUCH || hero.state.current == 0x17) { - if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->b53 == 0xE || - ((struct MobyView *)hero.moby)->b53 == 0xF) { + if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->prev_seq == 0xE || + ((struct MobyView *)hero.moby)->prev_seq == 0xF) { if (hero.state.current == HERO_STATE_CROUCH) { turn_to( 0, frame_scale_sq * 0.002f, frame_scale_sq * 0.07f, frame_time * 6.981317f); @@ -346,7 +299,7 @@ void update_hero_motion_by_state(void) { if (absolute_float(hero.motion.yaw_rate) > frame_time * 0.34906584f) { s32 neg = hero.motion.yaw_rate < 0.0f; s32 anim = neg + 0xE; - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(5)); } hero.anim_speed = @@ -362,7 +315,7 @@ void update_hero_motion_by_state(void) { if (hero.state.current == 0x17) { anim = get_hero_idle_animation_index(0); } - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(7)); } } @@ -376,15 +329,15 @@ void update_hero_motion_by_state(void) { } speed = frame_time_sq * 12.0f * s; hero.unk2290 = speed; - if (((struct MobyView *)hero.moby)->b52 == ((struct MobyView *)hero.moby)->b53 && - ((struct MobyView *)hero.moby)->b52 != 0x14) { + if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && + ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; - if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->b51 < 5.5f) { + if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->prev_frame < 5.5f) { adjust_hero_animation_speed_for_target_frame(13.0f, r, 0.5f, -1.0f); if (hero.anim_speed > 1.1f) { hero.anim_speed = 1.1f; } - } else if (((struct MobyView *)hero.moby)->b51 > 6.5f) { + } else if (((struct MobyView *)hero.moby)->prev_frame > 6.5f) { hero.anim_speed = 1.0f; } } @@ -432,28 +385,28 @@ void update_hero_motion_by_state(void) { if (m == NULL) { goto drop; } - qcopy(&m->u10.v10, &hero.motion.pos); - qcopy(&m->u40.v40, &hero.motion.rot); - m->h32 = h40; - ((struct MobyView *)hero.sink_effect_moby)->b31 = 1; - ((struct MobyView *)hero.sink_effect_moby)->b30 = 0; - ((struct MobyView *)hero.sink_effect_moby)->b23 = 0; - ((struct MobyView *)hero.sink_effect_moby)->u34.uh34 |= 0x800; + qcopy(&m->pos.v, &hero.motion.pos); + qcopy(&m->rot.v, &hero.motion.rot); + m->draw_dist = h40; + ((struct MobyView *)hero.sink_effect_moby)->visible = 1; + ((struct MobyView *)hero.sink_effect_moby)->update_dist = 0; + ((struct MobyView *)hero.sink_effect_moby)->alpha = 0; + ((struct MobyView *)hero.sink_effect_moby)->flags |= 0x800; update_entity((struct MobyView *)hero.sink_effect_moby); allocate_voice_for_target_entry(0, 0, (struct MobyView *)hero.sink_effect_moby); } if ((struct MobyView *)hero.sink_effect_moby != NULL) { struct MobyView *m; struct MobyView *o; - ((struct MobyView *)hero.sink_effect_moby)->b23 += + ((struct MobyView *)hero.sink_effect_moby)->alpha += truncate_float_to_s32(frame_scale * 5.0f); - if (((struct MobyView *)hero.sink_effect_moby)->b23 > 0x80) { - ((struct MobyView *)hero.sink_effect_moby)->b23 = 0x80; + if (((struct MobyView *)hero.sink_effect_moby)->alpha > 0x80) { + ((struct MobyView *)hero.sink_effect_moby)->alpha = 0x80; } m = (struct MobyView *)hero.sink_effect_moby; o = (struct MobyView *)hero.moby; - qcopy(&m->u10.v10, &o->u10.v10); - qcopy(&m->u40.v40, &o->u40.v40); + qcopy(&m->pos.v, &o->pos.v); + qcopy(&m->rot.v, &o->rot.v); update_entity(m); } drop: @@ -665,7 +618,7 @@ void update_hero_motion_by_state(void) { vector_matrix_and_hit_scratch.f[0] = 0.4f; transform_vector_by_basis(&vector_matrix_and_hit_scratch, &vector_matrix_and_hit_scratch, - &((struct MobyView *)pl->moby)->vC0); + &((struct MobyView *)pl->moby)->rot_row0); fast_vec_add(&vector_and_hit_scratch, &vector_and_hit_scratch, &vector_matrix_and_hit_scratch); @@ -687,7 +640,7 @@ void update_hero_motion_by_state(void) { } if (hero.state.current == 0x35 && fast_dec_timer_s16(&hero.pack_particle_timer) != 0) { struct MobyView *gm = (struct MobyView *)hero.items[3].moby; - if (gm != NULL && gm->hA6 == 0x261) { + if (gm != NULL && gm->oclass == 0x261) { s32 i; for (i = 0; i < 4; i++) { moby_point_position(gm, i % 2, &vector_and_hit_scratch); @@ -695,7 +648,7 @@ void update_hero_motion_by_state(void) { vector_matrix_and_hit_scratch.f[0] = -0.15f; transform_vector_by_basis(&vector_matrix_and_hit_scratch, &vector_matrix_and_hit_scratch, - &((struct MobyView *)hero.moby)->vC0); + &((struct MobyView *)hero.moby)->rot_row0); fast_vec_add(&vector_and_hit_scratch, &vector_and_hit_scratch, &vector_matrix_and_hit_scratch); @@ -801,7 +754,7 @@ void update_hero_motion_by_state(void) { vector_matrix_and_hit_scratch.f[0] = 0.4f; transform_vector_by_basis(&vector_matrix_and_hit_scratch, &vector_matrix_and_hit_scratch, - &((struct MobyView *)hero.moby)->vC0); + &((struct MobyView *)hero.moby)->rot_row0); fast_vec_add( &vector_and_hit_scratch, &vector_and_hit_scratch, &vector_matrix_and_hit_scratch); qcopy(&v10, &hero.motion.displacement); @@ -955,7 +908,7 @@ void update_hero_motion_by_state(void) { fast_dec_timer(&hero.boost_frames); } if ((struct MobyView *)hero.hoverboard_moby != NULL) { - ((struct MobyView *)hero.hoverboard_moby)->bBC = 1; + ((struct MobyView *)hero.hoverboard_moby)->command = 1; } } else { hero.board_boost_active = 0; @@ -1103,7 +1056,7 @@ void update_hero_motion_by_state(void) { fast_vec_scale(&v10, &hero.motion.displacement, 7.0f); for (i = 0; i < n; i++) { if (is_moby_in_class_range_500_to_540(D_L05_00178300[i]) != 0 || - ((struct MobyView *)D_L05_00178300[i])->hA6 == 0x85) { + ((struct MobyView *)D_L05_00178300[i])->oclass == 0x85) { spawn_nearby_effect(D_L05_00178300[i], (struct MobyView *)hero.moby, 0x10000, @@ -1122,7 +1075,7 @@ void update_hero_motion_by_state(void) { s32 n; s32 k; if (m != NULL) { - m->bBC = 2; + m->command = 2; } len = vector_length_xy(&hero.motion.velocity); approach_value(&len, 0.0f, frame_time_sq * 15.0f); @@ -1152,7 +1105,7 @@ void update_hero_motion_by_state(void) { case HERO_STATE_HOVERBOARD_RESPAWN_POSITION_OR_TIMEOUT_WAIT: { struct MobyView *m = (struct MobyView *)hero.hoverboard_moby; if (m != NULL) { - m->bBC = 2; + m->command = 2; } clear_u64_value(&hero.motion.velocity); reduce_and_apply_hero_planar_velocity_addend(frame_time_sq * 4.5f); @@ -1172,16 +1125,16 @@ void update_hero_motion_by_state(void) { case 0x39: case HERO_STATE_ANIMATION_WAIT_TO_IDLE: if ((struct MobyView *)hero.ground_moby != NULL && - ((struct MobyView *)hero.ground_moby)->hA6 == 0x155) { + ((struct MobyView *)hero.ground_moby)->oclass == 0x155) { f32 d; f32 ground_moby_yaw_step_limit; clear_u64_value(&vector_and_hit_scratch); fast_vec_add(&vector_and_hit_scratch, &vector_and_hit_scratch, - &((struct MobyView *)hero.ground_moby)->u10.v10); + &((struct MobyView *)hero.ground_moby)->pos.v); fast_vec_sub(&hero.motion.velocity, &vector_and_hit_scratch, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 2.0f); - d = fast_subtract_rotations(((struct MobyView *)hero.ground_moby)->u40.f48.v, + d = fast_subtract_rotations(((struct MobyView *)hero.ground_moby)->rot.z.v, hero.motion.rot.f[2]); ground_moby_yaw_step_limit = frame_time * 9.424778f; if (d > ground_moby_yaw_step_limit) { @@ -1213,10 +1166,10 @@ void update_hero_motion_by_state(void) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } - if (anim != -1 && ((struct MobyView *)hero.moby)->b52 != 0x36) { + if (anim != -1 && ((struct MobyView *)hero.moby)->seq != 0x36) { set_hero_animation(anim, 0, frames); - } else if ((((struct MobyView *)hero.moby)->b70 & 2) && - ((struct MobyView *)hero.moby)->b52 == 0x36) { + } else if ((((struct MobyView *)hero.moby)->anim_flags & 2) && + ((struct MobyView *)hero.moby)->seq == 0x36) { s32 an = get_hero_idle_animation_index(0); set_hero_animation(an, 0, scale_game_frames(5)); } @@ -1239,15 +1192,15 @@ void update_hero_motion_by_state(void) { } if ((struct MobyView *)hero.grapple_target != NULL) { hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.15f, frame_time * 6.2831855f); } break; case HERO_STATE_APPROACH_TARGET_MOBY: { f32 hit; f32 hit2; - qcopy(&vector_and_hit_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); + qcopy(&vector_and_hit_scratch, &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_and_hit_scratch); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { @@ -1256,8 +1209,8 @@ void update_hero_motion_by_state(void) { if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.03f, frame_scale_sq * 0.15f, frame_time * 7.330383f); } else if (hero.state.step == 1) { approach_value(&hero.grapple_pull_speed, 0.0f, frame_time_sq * 42.0f); @@ -1290,9 +1243,8 @@ void update_hero_motion_by_state(void) { vector_matrix_and_hit_scratch.f[2] = 0.0f; fast_vec_add( &vector_matrix_and_hit_scratch, &vector_matrix_and_hit_scratch, &hero.motion.pos); - fast_vec_sub(&v10, - &((struct MobyView *)hero.grapple_target)->u10.v10, - &vector_matrix_and_hit_scratch); + fast_vec_sub( + &v10, &((struct MobyView *)hero.grapple_target)->pos.v, &vector_matrix_and_hit_scratch); fast_vec_normalize(&hero.motion.velocity, &v10, hero.grapple_pull_speed); if (scale_game_frames(30) > hero.target_arrival_frames) { f32 t = scale_game_frames(30) - hero.target_arrival_frames; @@ -1305,7 +1257,7 @@ void update_hero_motion_by_state(void) { qcopy(&hero.motion.velocity, &hero.motion.displacement); fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; - qcopy(&vector_and_hit_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); + qcopy(&vector_and_hit_scratch, &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_and_hit_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&vector_and_rotation_scratch, &v10, &vector_and_hit_scratch); @@ -1319,15 +1271,15 @@ void update_hero_motion_by_state(void) { case HERO_STATE_GRAPPLE_SWING_ENTRY: { f32 vz; s32 above; - if ((hero.anim_flags & 2) && moby->b53 == 0x34) { + if ((hero.anim_flags & 2) && moby->prev_seq == 0x34) { set_hero_animation(0x35, 10, scale_game_frames(12)); hero.anim_speed = 0.3f; } vz = hero.motion.velocity.f[2]; if ((struct MobyView *)hero.swing_target_moby != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78 != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78->u34.i34 != 0) { - f32 a = ((struct MobyView *)hero.swing_target_moby)->u40.f48.v; + ((struct MobyView *)hero.swing_target_moby)->pvars != NULL && + ((struct MobyView *)hero.swing_target_moby)->pvars->align_yaw != 0) { + f32 a = ((struct MobyView *)hero.swing_target_moby)->rot.z.v; if (fast_difference_between_rotations(a, hero.motion.rot.f[2]) > 90.0f) { a = fast_add_rotations(a, 3.1415927f); } @@ -1342,7 +1294,7 @@ void update_hero_motion_by_state(void) { hero.motion.move_yaw = hero.swing_yaw; turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.3f, frame_time * 4.712389f); fast_vec_sub(&vector_and_hit_scratch, - &((struct MobyView *)hero.swing_target_moby)->u10.v10, + &((struct MobyView *)hero.swing_target_moby)->pos.v, &hero.motion.pos); fast_vec_normalize(&vector_and_hit_scratch, &vector_and_hit_scratch, 1.0f); if (vector_and_hit_scratch.f[2] < 0.23f) { @@ -1376,7 +1328,7 @@ void update_hero_motion_by_state(void) { frame_scale_sq * 0.2f, frame_time * 9.599311f); above = 1; - if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { + if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->pos.z.v)) { above = 0; } if (hero.swing_hooked != 0) { @@ -1400,7 +1352,7 @@ void update_hero_motion_by_state(void) { if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10) < + &((struct MobyView *)hero.swing_target_moby)->pos.v) < hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( @@ -1408,7 +1360,7 @@ void update_hero_motion_by_state(void) { if (hero.swing_entry_push != 0 && gravity_z(&hero.motion.velocity) > 0.0f) { fast_vec_sub(&rotation_and_motion_scratch[3], &hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &((struct MobyView *)hero.swing_target_moby)->pos.v); add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 57.0f); } @@ -1420,12 +1372,12 @@ void update_hero_motion_by_state(void) { &hero.motion.velocity, &hero.motion.velocity, &rotation_and_motion_scratch[3]); } { - struct MobyView *r; + struct SwingTargetVars *r; if ((struct MobyView *)hero.swing_target_moby != NULL && - (r = ((struct MobyView *)hero.swing_target_moby)->pm78) != NULL) { + (r = ((struct MobyView *)hero.swing_target_moby)->pvars) != NULL) { f32 len = fast_vec_length(&hero.motion.velocity); - if (r->fC < len) { - approach_value(&len, r->fC, frame_time_sq * 15.0f); + if (r->max_speed < len) { + approach_value(&len, r->max_speed, frame_time_sq * 15.0f); fast_vec_normalize(&hero.motion.velocity, &hero.motion.velocity, len); } } @@ -1441,10 +1393,10 @@ void update_hero_motion_by_state(void) { fast_vec_add(&rotation_and_motion_scratch[3], &vD0, &hero.motion.velocity); fast_vec_sub(&vC0, &rotation_and_motion_scratch[3], - &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &((struct MobyView *)hero.swing_target_moby)->pos.v); fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&rotation_and_motion_scratch[3], - &((struct MobyView *)hero.swing_target_moby)->u10.v10, + &((struct MobyView *)hero.swing_target_moby)->pos.v, &vC0); fast_vec_sub(&hero.motion.velocity, &rotation_and_motion_scratch[3], &vD0); old = hero.swing_rope_length; @@ -1492,20 +1444,20 @@ void update_hero_motion_by_state(void) { up = forward_component(&rotation_and_motion_scratch[3]) > 0.0f; } if (up) { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 6, scale_game_frames(17)); hero.swing_anim_dir = 1; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(42.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } } else { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 0x15, scale_game_frames(9)); hero.swing_anim_dir = 2; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(12.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } @@ -1572,7 +1524,7 @@ void update_hero_motion_by_state(void) { hero.target_speed = 0.0f; if ((struct MobyView *)hero.melee_target != NULL) { f32 d = vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.melee_target)->u10.v10); + &((struct MobyView *)hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1705,7 +1657,7 @@ void update_hero_motion_by_state(void) { hero.target_speed = 0.0f; if ((struct MobyView *)hero.melee_target != NULL && scale_game_frames(4) > hero.state_timer) { - f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->u10.v10, + f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->pos.v, &hero.motion.pos) - 0.5f; f32 off; @@ -1858,7 +1810,7 @@ void update_hero_motion_by_state(void) { vector_and_hit_scratch.f[3] = 5627.925f; ((u8 *)&v10)[8] = 0; a = hero.motion.rot.f[2]; - ((s16 *)&v10)[5] = o->hA6; + ((s16 *)&v10)[5] = o->oclass; rotation_and_collision_scratch[0].f[0] = fast_cos(a) * 0.8f; rotation_and_collision_scratch[0].f[1] = fast_sin(a) * 0.8f; rotation_and_collision_scratch[0].f[2] = 0.55f; @@ -2321,14 +2273,14 @@ void update_hero_motion_by_state(void) { f32 a; f32 k; fast_vec_sub(&vector_matrix_and_hit_scratch, - &((struct MobyView *)hero.grind_look_moby)->u10.v10, + &((struct MobyView *)hero.grind_look_moby)->pos.v, &hero.motion.pos); transform_vector_by_basis(&vector_matrix_and_hit_scratch, &vector_matrix_and_hit_scratch, (Vec4 *)hero.inv_rot_matrix); a = fast_arc_tan(vector_matrix_and_hit_scratch.f[0], vector_matrix_and_hit_scratch.f[1]); - if (((struct MobyView *)hero.moby)->b52 == 0x31) { + if (((struct MobyView *)hero.moby)->seq == 0x31) { a = fast_subtract_rotations(a, 1.5707964f); AN.f278 = a * 0.3f; AN.f1C8 = a * 0.2f; @@ -2337,15 +2289,15 @@ void update_hero_motion_by_state(void) { AN.f278 = a * 0.3f; AN.f1C8 = a * 0.5f; } - } else if (((struct MobyView *)hero.moby)->b53 == 0x31) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x31) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); - } else if (((struct MobyView *)hero.moby)->b53 == 0x4B) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x4B) { AN.f278 = fast_add_rotations(0.13962634f, hero.rail_lean); AN.f118 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); AN.f1C8 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); - } else if (((struct MobyView *)hero.moby)->b53 == 0x4A) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x4A) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); @@ -3105,7 +3057,7 @@ void update_hero_motion_by_state(void) { if (state_step_on_entry != hero.state.step) { hero.step_frames = 0; } - if (anim != moby->b53) { + if (anim != moby->prev_seq) { hero.anim_seq_frames = 0; } } diff --git a/src/overlays/l06/hero/update_hero_motion_for_current_state.c b/src/overlays/l06/hero/update_hero_motion_for_current_state.c index a9e2fa8241..17f26bb474 100644 --- a/src/overlays/l06/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l06/hero/update_hero_motion_for_current_state.c @@ -782,52 +782,7 @@ void update_hero_airborne_planar_velocity(void) { #include "rnc/math/vector.h" #include "rnc/math/fast_math.h" -struct MobyView { - u8 pad0[0xC]; - f32 fC; - union { - Vec4 v10; - f32 f10; - struct { - u8 pad[0x4]; - f32 v; - } f14; - struct { - u8 pad[0x8]; - f32 v; - } f18; - } u10; - u8 pad20[0x3]; - u8 b23; - u8 pad24[0xC]; - u8 b30; - u8 b31; - s16 h32; - union { - s32 i34; - u16 uh34; - } u34; - u8 pad38[0x8]; - union { - Vec4 v40; - struct { - u8 pad[0x8]; - f32 v; - } f48; - } u40; - u8 pad50[0x1]; - u8 b51; - u8 b52; - u8 b53; - u8 pad54[0x1C]; - u8 b70; - u8 pad71[0x7]; - struct MobyView *pm78; - u8 pad7C[0x2A]; - s16 hA6; - u8 padA8[0x18]; - Vec4 vC0; -}; +#include "rnc/overlay/shared/hero/hero_moby_view.h" struct PlayerJointTable { u8 pad0[0x60]; @@ -1019,7 +974,7 @@ void update_hero_motion_for_current_state(void) __asm__("FUN_L06_0022e020"); void update_hero_motion_for_current_state(void) { struct MobyView *moby = (struct MobyView *)hero.moby; s32 initial_state_step = hero.state.step; - s32 anim = moby->b53; + s32 anim = moby->prev_seq; f32 speed; Vec4 vector_or_hit_descriptor_scratch; Vec4 v10; @@ -1079,8 +1034,8 @@ void update_hero_motion_for_current_state(void) { } } if (hero.state.current == HERO_STATE_CROUCH || hero.state.current == 0x17) { - if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->b53 == 0xE || - ((struct MobyView *)hero.moby)->b53 == 0xF) { + if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->prev_seq == 0xE || + ((struct MobyView *)hero.moby)->prev_seq == 0xF) { if (hero.state.current == HERO_STATE_CROUCH) { turn_to(0, frame_scale_sq * 0.002f, @@ -1092,7 +1047,7 @@ void update_hero_motion_for_current_state(void) { if (absolute_float(hero.motion.yaw_rate) > D_0015ED6C_c * 0.34906584f) { s32 neg = hero.motion.yaw_rate < 0.0f; s32 anim = neg + 0xE; - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(5)); } hero.anim_speed = @@ -1108,7 +1063,7 @@ void update_hero_motion_for_current_state(void) { if (hero.state.current == 0x17) { anim = get_hero_help_value(0); } - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(7)); } } @@ -1122,15 +1077,15 @@ void update_hero_motion_for_current_state(void) { } speed = frame_time_sq * 12.0f * s; hero.unk2290 = speed; - if (((struct MobyView *)hero.moby)->b52 == ((struct MobyView *)hero.moby)->b53 && - ((struct MobyView *)hero.moby)->b52 != 0x14) { + if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && + ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; - if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->b51 < 5.5f) { + if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->prev_frame < 5.5f) { adjust_hero_animation_speed_for_target_frame(13.0f, r, 0.5f, -1.0f); if (hero.anim_speed > 1.1f) { hero.anim_speed = 1.1f; } - } else if (((struct MobyView *)hero.moby)->b51 > 6.5f) { + } else if (((struct MobyView *)hero.moby)->prev_frame > 6.5f) { hero.anim_speed = 1.0f; } } @@ -1178,28 +1133,28 @@ void update_hero_motion_for_current_state(void) { if (m == NULL) { goto drop; } - qcopy(&m->u10.v10, &hero.motion.pos); - qcopy(&m->u40.v40, &hero.motion.rot); - m->h32 = h40; - ((struct MobyView *)hero.sink_effect_moby)->b31 = 1; - ((struct MobyView *)hero.sink_effect_moby)->b30 = 0; - ((struct MobyView *)hero.sink_effect_moby)->b23 = 0; - ((struct MobyView *)hero.sink_effect_moby)->u34.uh34 |= 0x800; + qcopy(&m->pos.v, &hero.motion.pos); + qcopy(&m->rot.v, &hero.motion.rot); + m->draw_dist = h40; + ((struct MobyView *)hero.sink_effect_moby)->visible = 1; + ((struct MobyView *)hero.sink_effect_moby)->update_dist = 0; + ((struct MobyView *)hero.sink_effect_moby)->alpha = 0; + ((struct MobyView *)hero.sink_effect_moby)->flags |= 0x800; update_entity((struct MobyView *)hero.sink_effect_moby); allocate_voice_for_target_entry(0, 0, (struct MobyView *)hero.sink_effect_moby); } if ((struct MobyView *)hero.sink_effect_moby != NULL) { struct MobyView *m; struct MobyView *o; - ((struct MobyView *)hero.sink_effect_moby)->b23 += + ((struct MobyView *)hero.sink_effect_moby)->alpha += truncate_float_to_s32(frame_scale * 5.0f); - if (((struct MobyView *)hero.sink_effect_moby)->b23 > 0x80) { - ((struct MobyView *)hero.sink_effect_moby)->b23 = 0x80; + if (((struct MobyView *)hero.sink_effect_moby)->alpha > 0x80) { + ((struct MobyView *)hero.sink_effect_moby)->alpha = 0x80; } m = (struct MobyView *)hero.sink_effect_moby; o = (struct MobyView *)hero.moby; - qcopy(&m->u10.v10, &o->u10.v10); - qcopy(&m->u40.v40, &o->u40.v40); + qcopy(&m->pos.v, &o->pos.v); + qcopy(&m->rot.v, &o->rot.v); update_entity(m); } drop: @@ -1233,10 +1188,10 @@ void update_hero_motion_for_current_state(void) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } - if (anim != -1 && ((struct MobyView *)hero.moby)->b52 != 0x36) { + if (anim != -1 && ((struct MobyView *)hero.moby)->seq != 0x36) { set_hero_animation(anim, 0, frames); - } else if ((((struct MobyView *)hero.moby)->b70 & 2) && - ((struct MobyView *)hero.moby)->b52 == 0x36) { + } else if ((((struct MobyView *)hero.moby)->anim_flags & 2) && + ((struct MobyView *)hero.moby)->seq == 0x36) { s32 an = get_hero_help_value(0); set_hero_animation(an, 0, scale_game_frames(5)); } @@ -1259,16 +1214,15 @@ void update_hero_motion_for_current_state(void) { } if ((struct MobyView *)hero.grapple_target != NULL) { hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.15f, D_0015ED6C_c * 6.2831855f); } break; case HERO_STATE_APPROACH_TARGET_MOBY: { f32 hit; f32 hit2; - qcopy(&vector_or_hit_descriptor_scratch, - &((struct MobyView *)hero.grapple_target)->u10.v10); + qcopy(&vector_or_hit_descriptor_scratch, &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_or_hit_descriptor_scratch); hero.target_arrival_frames = scale_game_frames(60); @@ -1278,8 +1232,8 @@ void update_hero_motion_for_current_state(void) { if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, D_0015ED6C_c * 27.0f, frame_time_sq * 80.0f); hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.03f, frame_scale_sq * 0.15f, D_0015ED6C_c * 7.330383f); } else if (hero.state.step == 1) { approach_value(&hero.grapple_pull_speed, 0.0f, frame_time_sq * 42.0f); @@ -1313,9 +1267,8 @@ void update_hero_motion_for_current_state(void) { vector_or_descriptor_scratch.f[2] = 0.0f; fast_vec_add( &vector_or_descriptor_scratch, &vector_or_descriptor_scratch, &hero.motion.pos); - FUN_001f9a28_c(&v10, - &((struct MobyView *)hero.grapple_target)->u10.v10, - &vector_or_descriptor_scratch); + FUN_001f9a28_c( + &v10, &((struct MobyView *)hero.grapple_target)->pos.v, &vector_or_descriptor_scratch); fast_vec_normalize(&hero.motion.velocity, &v10, hero.grapple_pull_speed); if (scale_game_frames(30) > hero.target_arrival_frames) { f32 t = scale_game_frames(30) - hero.target_arrival_frames; @@ -1328,8 +1281,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.displacement); fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; - qcopy(&vector_or_hit_descriptor_scratch, - &((struct MobyView *)hero.grapple_target)->u10.v10); + qcopy(&vector_or_hit_descriptor_scratch, &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_or_hit_descriptor_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); @@ -1345,15 +1297,15 @@ void update_hero_motion_for_current_state(void) { case HERO_STATE_GRAPPLE_SWING_ENTRY: { f32 vz; s32 above; - if ((hero.anim_flags & 2) && moby->b53 == 0x34) { + if ((hero.anim_flags & 2) && moby->prev_seq == 0x34) { set_hero_animation(0x35, 10, scale_game_frames(12)); hero.anim_speed = 0.3f; } vz = hero.motion.velocity.f[2]; if ((struct MobyView *)hero.swing_target_moby != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78 != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78->u34.i34 != 0) { - f32 a = ((struct MobyView *)hero.swing_target_moby)->u40.f48.v; + ((struct MobyView *)hero.swing_target_moby)->pvars != NULL && + ((struct MobyView *)hero.swing_target_moby)->pvars->align_yaw != 0) { + f32 a = ((struct MobyView *)hero.swing_target_moby)->rot.z.v; if (fast_difference_between_rotations(a, hero.motion.rot.f[2]) > 90.0f) { a = fast_add_rotations(a, 3.1415927f); } @@ -1368,7 +1320,7 @@ void update_hero_motion_for_current_state(void) { hero.motion.move_yaw = hero.swing_yaw; turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.3f, D_0015ED6C_c * 4.712389f); FUN_001f9a28_c(&vector_or_hit_descriptor_scratch, - &((struct MobyView *)hero.swing_target_moby)->u10.v10, + &((struct MobyView *)hero.swing_target_moby)->pos.v, &hero.motion.pos); fast_vec_normalize( &vector_or_hit_descriptor_scratch, &vector_or_hit_descriptor_scratch, 1.0f); @@ -1404,7 +1356,7 @@ void update_hero_motion_for_current_state(void) { frame_scale_sq * 0.2f, D_0015ED6C_c * 9.599311f); above = 1; - if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { + if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->pos.z.v)) { above = 0; } if (hero.swing_hooked != 0) { @@ -1427,7 +1379,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10) < + &((struct MobyView *)hero.swing_target_moby)->pos.v) < hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( @@ -1435,7 +1387,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_entry_push != 0 && gravity_z(&hero.motion.velocity) > 0.0f) { FUN_001f9a28_c(&position_or_delta_scratch, &hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &((struct MobyView *)hero.swing_target_moby)->pos.v); add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 57.0f); } @@ -1446,12 +1398,12 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &position_or_delta_scratch); } { - struct MobyView *r; + struct SwingTargetVars *r; if ((struct MobyView *)hero.swing_target_moby != NULL && - (r = ((struct MobyView *)hero.swing_target_moby)->pm78) != NULL) { + (r = ((struct MobyView *)hero.swing_target_moby)->pvars) != NULL) { f32 len = fast_vec_length(&hero.motion.velocity); - if (r->fC < len) { - approach_value(&len, r->fC, frame_time_sq * 15.0f); + if (r->max_speed < len) { + approach_value(&len, r->max_speed, frame_time_sq * 15.0f); fast_vec_normalize(&hero.motion.velocity, &hero.motion.velocity, len); } } @@ -1467,10 +1419,10 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&position_or_delta_scratch, &vD0, &hero.motion.velocity); FUN_001f9a28_c(&vC0, &position_or_delta_scratch, - &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &((struct MobyView *)hero.swing_target_moby)->pos.v); fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&position_or_delta_scratch, - &((struct MobyView *)hero.swing_target_moby)->u10.v10, + &((struct MobyView *)hero.swing_target_moby)->pos.v, &vC0); FUN_001f9a28_c(&hero.motion.velocity, &position_or_delta_scratch, &vD0); previous_swing_radius = hero.swing_rope_length; @@ -1516,20 +1468,20 @@ void update_hero_motion_for_current_state(void) { up = forward_component(&position_or_delta_scratch) > 0.0f; } if (up) { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 6, scale_game_frames(17)); hero.swing_anim_dir = 1; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(42.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } } else { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 0x15, scale_game_frames(9)); hero.swing_anim_dir = 2; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(12.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } @@ -1593,7 +1545,7 @@ void update_hero_motion_for_current_state(void) { hero.target_speed = 0.0f; if ((struct MobyView *)hero.melee_target != NULL) { f32 d = vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.melee_target)->u10.v10); + &((struct MobyView *)hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = D_0015ED6C_c * 4.5f; } @@ -1727,7 +1679,7 @@ void update_hero_motion_for_current_state(void) { hero.target_speed = 0.0f; if ((struct MobyView *)hero.melee_target != NULL && scale_game_frames(4) > hero.state_timer) { - f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->u10.v10, + f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->pos.v, &hero.motion.pos) - 0.5f; f32 off; @@ -1880,7 +1832,7 @@ void update_hero_motion_for_current_state(void) { vector_or_hit_descriptor_scratch.f[3] = 5627.925f; ((u8 *)&v10)[8] = 0; a = hero.motion.rot.f[2]; - ((s16 *)&v10)[5] = o->hA6; + ((s16 *)&v10)[5] = o->oclass; matrix_or_vector_scratch[0].f[0] = fast_cos(a) * 0.8f; matrix_or_vector_scratch[0].f[1] = fast_sin(a) * 0.8f; matrix_or_vector_scratch[0].f[2] = 0.55f; @@ -2202,14 +2154,14 @@ void update_hero_motion_for_current_state(void) { f32 a; f32 k; FUN_001f9a28_c(&vector_or_descriptor_scratch, - &((struct MobyView *)hero.grind_look_moby)->u10.v10, + &((struct MobyView *)hero.grind_look_moby)->pos.v, &hero.motion.pos); transform_vector_by_basis(&vector_or_descriptor_scratch, &vector_or_descriptor_scratch, (Vec4 *)hero.inv_rot_matrix); a = fast_arc_tan(vector_or_descriptor_scratch.f[0], vector_or_descriptor_scratch.f[1]); - if (((struct MobyView *)hero.moby)->b52 == 0x31) { + if (((struct MobyView *)hero.moby)->seq == 0x31) { a = fast_subtract_rotations(a, 1.5707964f); AN.f278 = a * 0.3f; AN.f1C8 = a * 0.2f; @@ -2218,15 +2170,15 @@ void update_hero_motion_for_current_state(void) { AN.f278 = a * 0.3f; AN.f1C8 = a * 0.5f; } - } else if (((struct MobyView *)hero.moby)->b53 == 0x31) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x31) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); - } else if (((struct MobyView *)hero.moby)->b53 == 0x4B) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x4B) { AN.f278 = fast_add_rotations(0.13962634f, hero.rail_lean); AN.f118 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); AN.f1C8 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); - } else if (((struct MobyView *)hero.moby)->b53 == 0x4A) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x4A) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); @@ -3264,7 +3216,7 @@ void update_hero_motion_for_current_state(void) { if (initial_state_step != hero.state.step) { hero.step_frames = 0; } - if (anim != moby->b53) { + if (anim != moby->prev_seq) { hero.anim_seq_frames = 0; } } diff --git a/src/overlays/l08/hero/update_hero_motion_for_current_state.c b/src/overlays/l08/hero/update_hero_motion_for_current_state.c index a81b443897..66cee269e2 100644 --- a/src/overlays/l08/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l08/hero/update_hero_motion_for_current_state.c @@ -154,53 +154,8 @@ void apply_hero_ground_type_effects(void) { #include "rnc/math/vector.h" #include "rnc/math/fast_math.h" -struct MobyView { - u8 pad0[0xC]; - f32 fC; - union { - Vec4 v10; - f32 f10; - struct { - u8 pad[0x4]; - f32 v; - } f14; - struct { - u8 pad[0x8]; - f32 v; - } f18; - } u10; - u8 pad20[0x3]; - u8 b23; - u8 pad24[0xC]; - u8 b30; - u8 b31; - s16 h32; - union { - s32 i34; - u16 uh34; - } u34; - u8 pad38[0x8]; - union { - Vec4 v40; - struct { - u8 pad[0x8]; - f32 v; - } f48; - } u40; - u8 pad50[0x1]; - u8 b51; - u8 b52; - u8 b53; - u8 pad54[0x1C]; - u8 b70; - u8 pad71[0x7]; - struct MobyView *pm78; - u8 pad7C[0x2A]; - s16 hA6; - u8 padA8[0x18]; - Vec4 vC0; -}; -#define MV(p) ((struct MobyView *)(p)) +#include "rnc/overlay/shared/hero/hero_moby_view.h" + /* Second name for hero: one call needs it to keep the original address CSE. */ extern struct Hero hero_b __asm__("D_0013F350"); @@ -386,7 +341,7 @@ void update_hero_motion_for_current_state(void) __asm__("FUN_L08_002284e0"); void update_hero_motion_for_current_state(void) { struct MobyView *moby = MV(hero.moby); s32 saved_state_step = hero.state.step; - s32 anim = moby->b53; + s32 anim = moby->prev_seq; f32 speed; Vec4 vector_and_attack_descriptor_scratch; Vec4 v10; @@ -449,8 +404,8 @@ void update_hero_motion_for_current_state(void) { } } if (hero.state.current == HERO_STATE_CROUCH || hero.state.current == 0x17) { - if (hero.stick_magnitude > 0.2f || MV(hero.moby)->b53 == 0xE || - MV(hero.moby)->b53 == 0xF) { + if (hero.stick_magnitude > 0.2f || MV(hero.moby)->prev_seq == 0xE || + MV(hero.moby)->prev_seq == 0xF) { if (hero.state.current == HERO_STATE_CROUCH) { turn_to( 0, frame_scale_sq * 0.002f, frame_scale_sq * 0.07f, frame_time * 6.981317f); @@ -460,7 +415,7 @@ void update_hero_motion_for_current_state(void) { if (absolute_float(hero.motion.yaw_rate) > frame_time * 0.34906584f) { s32 neg = hero.motion.yaw_rate < 0.0f; s32 anim = neg + 0xE; - if (MV(hero.moby)->b53 != anim) { + if (MV(hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(5)); } hero.anim_speed = @@ -476,7 +431,7 @@ void update_hero_motion_for_current_state(void) { if (hero.state.current == 0x17) { anim = get_hero_idle_animation_index(0); } - if (MV(hero.moby)->b53 != anim) { + if (MV(hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(7)); } } @@ -490,14 +445,14 @@ void update_hero_motion_for_current_state(void) { } speed = frame_time_sq * 12.0f * s; hero.unk2290 = speed; - if (MV(hero.moby)->b52 == MV(hero.moby)->b53 && MV(hero.moby)->b52 != 0x14) { + if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq && MV(hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; - if (scale_game_frames(5) < r && MV(hero.moby)->b51 < 5.5f) { + if (scale_game_frames(5) < r && MV(hero.moby)->prev_frame < 5.5f) { adjust_hero_animation_speed_for_target_frame(13.0f, r, 0.5f, -1.0f); if (hero.anim_speed > 1.1f) { hero.anim_speed = 1.1f; } - } else if (MV(hero.moby)->b51 > 6.5f) { + } else if (MV(hero.moby)->prev_frame > 6.5f) { hero.anim_speed = 1.0f; } } @@ -542,27 +497,27 @@ void update_hero_motion_for_current_state(void) { if (m == NULL) { goto drop; } - qcopy(&m->u10.v10, &hero.motion.pos); - qcopy(&m->u40.v40, &hero.motion.rot); - m->h32 = h40; - MV(hero.sink_effect_moby)->b31 = 1; - MV(hero.sink_effect_moby)->b30 = 0; - MV(hero.sink_effect_moby)->b23 = 0; - MV(hero.sink_effect_moby)->u34.uh34 |= 0x800; + qcopy(&m->pos.v, &hero.motion.pos); + qcopy(&m->rot.v, &hero.motion.rot); + m->draw_dist = h40; + MV(hero.sink_effect_moby)->visible = 1; + MV(hero.sink_effect_moby)->update_dist = 0; + MV(hero.sink_effect_moby)->alpha = 0; + MV(hero.sink_effect_moby)->flags |= 0x800; update_entity(MV(hero.sink_effect_moby)); allocate_voice_for_target_entry(0, 0, MV(hero.sink_effect_moby)); } if (MV(hero.sink_effect_moby) != NULL) { struct MobyView *m; struct MobyView *o; - MV(hero.sink_effect_moby)->b23 += truncate_float_to_s32(frame_scale * 5.0f); - if (MV(hero.sink_effect_moby)->b23 > 0x80) { - MV(hero.sink_effect_moby)->b23 = 0x80; + MV(hero.sink_effect_moby)->alpha += truncate_float_to_s32(frame_scale * 5.0f); + if (MV(hero.sink_effect_moby)->alpha > 0x80) { + MV(hero.sink_effect_moby)->alpha = 0x80; } m = MV(hero.sink_effect_moby); o = MV(hero.moby); - qcopy(&m->u10.v10, &o->u10.v10); - qcopy(&m->u40.v40, &o->u40.v40); + qcopy(&m->pos.v, &o->pos.v); + qcopy(&m->rot.v, &o->rot.v); update_entity(m); } drop: @@ -774,7 +729,7 @@ void update_hero_motion_for_current_state(void) { vector_and_hit_descriptor_scratch.f[0] = 0.4f; transform_vector_by_basis(&vector_and_hit_descriptor_scratch, &vector_and_hit_descriptor_scratch, - &MV(pl->moby)->vC0); + &MV(pl->moby)->rot_row0); fast_vec_add(&vector_and_attack_descriptor_scratch, &vector_and_attack_descriptor_scratch, &vector_and_hit_descriptor_scratch); @@ -796,7 +751,7 @@ void update_hero_motion_for_current_state(void) { } if (hero.state.current == 0x35 && fast_dec_timer_s16(&hero.pack_particle_timer) != 0) { struct MobyView *gm = MV(hero.items[3].moby); - if (gm != NULL && gm->hA6 == 0x261) { + if (gm != NULL && gm->oclass == 0x261) { s32 i; for (i = 0; i < 4; i++) { moby_point_position(gm, i % 2, &vector_and_attack_descriptor_scratch); @@ -804,7 +759,7 @@ void update_hero_motion_for_current_state(void) { vector_and_hit_descriptor_scratch.f[0] = -0.15f; transform_vector_by_basis(&vector_and_hit_descriptor_scratch, &vector_and_hit_descriptor_scratch, - &MV(hero.moby)->vC0); + &MV(hero.moby)->rot_row0); fast_vec_add(&vector_and_attack_descriptor_scratch, &vector_and_attack_descriptor_scratch, &vector_and_hit_descriptor_scratch); @@ -913,7 +868,7 @@ void update_hero_motion_for_current_state(void) { vector_and_hit_descriptor_scratch.f[0] = 0.4f; transform_vector_by_basis(&vector_and_hit_descriptor_scratch, &vector_and_hit_descriptor_scratch, - &MV(hero.moby)->vC0); + &MV(hero.moby)->rot_row0); fast_vec_add(&vector_and_attack_descriptor_scratch, &vector_and_attack_descriptor_scratch, &vector_and_hit_descriptor_scratch); @@ -1011,9 +966,9 @@ void update_hero_motion_for_current_state(void) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } - if (anim != -1 && MV(hero.moby)->b52 != 0x36) { + if (anim != -1 && MV(hero.moby)->seq != 0x36) { set_hero_animation(anim, 0, frames); - } else if ((MV(hero.moby)->b70 & 2) && MV(hero.moby)->b52 == 0x36) { + } else if ((MV(hero.moby)->anim_flags & 2) && MV(hero.moby)->seq == 0x36) { s32 an = get_hero_idle_animation_index(0); set_hero_animation(an, 0, scale_game_frames(5)); } @@ -1035,16 +990,15 @@ void update_hero_motion_for_current_state(void) { &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } if (MV(hero.grapple_target) != NULL) { - hero.motion.move_yaw = - fast_arc_tan(MV(hero.grapple_target)->u10.f10 - moby->u10.f10, - MV(hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + hero.motion.move_yaw = fast_arc_tan(MV(hero.grapple_target)->pos.x - moby->pos.x, + MV(hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.15f, frame_time * 6.2831855f); } break; case HERO_STATE_APPROACH_TARGET_MOBY: { f32 hit; f32 hit2; - qcopy(&vector_and_attack_descriptor_scratch, &MV(hero.grapple_target)->u10.v10); + qcopy(&vector_and_attack_descriptor_scratch, &MV(hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_and_attack_descriptor_scratch); hero.target_arrival_frames = scale_game_frames(60); @@ -1053,9 +1007,8 @@ void update_hero_motion_for_current_state(void) { } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); - hero.motion.move_yaw = - fast_arc_tan(MV(hero.grapple_target)->u10.f10 - moby->u10.f10, - MV(hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + hero.motion.move_yaw = fast_arc_tan(MV(hero.grapple_target)->pos.x - moby->pos.x, + MV(hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.03f, frame_scale_sq * 0.15f, frame_time * 7.330383f); } else if (hero.state.step == 1) { approach_value(&hero.grapple_pull_speed, 0.0f, frame_time_sq * 42.0f); @@ -1090,7 +1043,7 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&vector_and_hit_descriptor_scratch, &vector_and_hit_descriptor_scratch, &hero.motion.pos); - fast_vec_sub(&v10, &MV(hero.grapple_target)->u10.v10, &vector_and_hit_descriptor_scratch); + fast_vec_sub(&v10, &MV(hero.grapple_target)->pos.v, &vector_and_hit_descriptor_scratch); fast_vec_normalize(&hero.motion.velocity, &v10, hero.grapple_pull_speed); if (scale_game_frames(30) > hero.target_arrival_frames) { f32 t = scale_game_frames(30) - hero.target_arrival_frames; @@ -1103,7 +1056,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.displacement); fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; - qcopy(&vector_and_attack_descriptor_scratch, &MV(hero.grapple_target)->u10.v10); + qcopy(&vector_and_attack_descriptor_scratch, &MV(hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_and_attack_descriptor_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); @@ -1118,14 +1071,14 @@ void update_hero_motion_for_current_state(void) { case HERO_STATE_GRAPPLE_SWING_ENTRY: { f32 vz; s32 above; - if ((hero.anim_flags & 2) && moby->b53 == 0x34) { + if ((hero.anim_flags & 2) && moby->prev_seq == 0x34) { set_hero_animation(0x35, 10, scale_game_frames(12)); hero.anim_speed = 0.3f; } vz = hero.motion.velocity.f[2]; - if (MV(hero.swing_target_moby) != NULL && MV(hero.swing_target_moby)->pm78 != NULL && - MV(hero.swing_target_moby)->pm78->u34.i34 != 0) { - f32 a = MV(hero.swing_target_moby)->u40.f48.v; + if (MV(hero.swing_target_moby) != NULL && MV(hero.swing_target_moby)->pvars != NULL && + MV(hero.swing_target_moby)->pvars->align_yaw != 0) { + f32 a = MV(hero.swing_target_moby)->rot.z.v; if (fast_difference_between_rotations(a, hero.motion.rot.f[2]) > 90.0f) { a = fast_add_rotations(a, 3.1415927f); } @@ -1140,7 +1093,7 @@ void update_hero_motion_for_current_state(void) { hero.motion.move_yaw = hero.swing_yaw; turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.3f, frame_time * 4.712389f); fast_vec_sub(&vector_and_attack_descriptor_scratch, - &MV(hero.swing_target_moby)->u10.v10, + &MV(hero.swing_target_moby)->pos.v, &hero.motion.pos); fast_vec_normalize( &vector_and_attack_descriptor_scratch, &vector_and_attack_descriptor_scratch, 1.0f); @@ -1177,7 +1130,7 @@ void update_hero_motion_for_current_state(void) { frame_scale_sq * 0.2f, frame_time * 9.599311f); above = 1; - if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->u10.f18.v)) { + if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->pos.z.v)) { above = 0; } if (hero.swing_hooked != 0) { @@ -1199,7 +1152,7 @@ void update_hero_motion_for_current_state(void) { } if (hero.swing_hooked != 0) { f32 s; - if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < + if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->pos.v) < hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( @@ -1207,7 +1160,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_entry_push != 0 && gravity_z(&hero.motion.velocity) > 0.0f) { fast_vec_sub(&movement_vector_scratch, &hero.motion.pos, - &MV(hero.swing_target_moby)->u10.v10); + &MV(hero.swing_target_moby)->pos.v); add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 57.0f); } @@ -1218,12 +1171,12 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &movement_vector_scratch); } { - struct MobyView *r; + struct SwingTargetVars *r; if (MV(hero.swing_target_moby) != NULL && - (r = MV(hero.swing_target_moby)->pm78) != NULL) { + (r = MV(hero.swing_target_moby)->pvars) != NULL) { f32 len = fast_vec_length(&hero.motion.velocity); - if (r->fC < len) { - approach_value(&len, r->fC, frame_time_sq * 15.0f); + if (r->max_speed < len) { + approach_value(&len, r->max_speed, frame_time_sq * 15.0f); fast_vec_normalize(&hero.motion.velocity, &hero.motion.velocity, len); } } @@ -1237,9 +1190,9 @@ void update_hero_motion_for_current_state(void) { vD0.f[2] = 0.0f; fast_vec_add(&vD0, &vD0, &hero.motion.pos); fast_vec_add(&movement_vector_scratch, &vD0, &hero.motion.velocity); - fast_vec_sub(&vC0, &movement_vector_scratch, &MV(hero.swing_target_moby)->u10.v10); + fast_vec_sub(&vC0, &movement_vector_scratch, &MV(hero.swing_target_moby)->pos.v); fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); - fast_vec_add(&movement_vector_scratch, &MV(hero.swing_target_moby)->u10.v10, &vC0); + fast_vec_add(&movement_vector_scratch, &MV(hero.swing_target_moby)->pos.v, &vC0); fast_vec_sub(&hero.motion.velocity, &movement_vector_scratch, &vD0); old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, @@ -1284,18 +1237,18 @@ void update_hero_motion_for_current_state(void) { up = forward_component(&movement_vector_scratch) > 0.0f; } if (up) { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 6, scale_game_frames(17)); hero.swing_anim_dir = 1; - } else if (MV(hero.moby)->b52 == MV(hero.moby)->b53) { + } else if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(42.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } } else { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 0x15, scale_game_frames(9)); hero.swing_anim_dir = 2; - } else if (MV(hero.moby)->b52 == MV(hero.moby)->b53) { + } else if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(12.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } @@ -1358,7 +1311,7 @@ void update_hero_motion_for_current_state(void) { } hero.target_speed = 0.0f; if (MV(hero.melee_target) != NULL) { - f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->u10.v10); + f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1488,7 +1441,7 @@ void update_hero_motion_for_current_state(void) { tb = &D_L08_0017C428[hero.attack_record]; hero.target_speed = 0.0f; if (MV(hero.melee_target) != NULL && scale_game_frames(4) > hero.state_timer) { - f32 d = vector_distance_xy(&MV(hero.melee_target)->u10.v10, &hero.motion.pos) - 0.5f; + f32 d = vector_distance_xy(&MV(hero.melee_target)->pos.v, &hero.motion.pos) - 0.5f; f32 attack_target_distance_offset; f32 tol; f32 mx; @@ -1639,7 +1592,7 @@ void update_hero_motion_for_current_state(void) { vector_and_attack_descriptor_scratch.f[3] = 5627.925f; ((u8 *)&v10)[8] = 0; a = hero.motion.rot.f[2]; - ((s16 *)&v10)[5] = o->hA6; + ((s16 *)&v10)[5] = o->oclass; rotation_matrix_and_vector_scratch[0].f[0] = fast_cos(a) * 0.8f; rotation_matrix_and_vector_scratch[0].f[1] = fast_sin(a) * 0.8f; rotation_matrix_and_vector_scratch[0].f[2] = 0.55f; @@ -2091,14 +2044,14 @@ void update_hero_motion_for_current_state(void) { f32 a; f32 k; fast_vec_sub(&vector_and_hit_descriptor_scratch, - &MV(hero.grind_look_moby)->u10.v10, + &MV(hero.grind_look_moby)->pos.v, &hero.motion.pos); transform_vector_by_basis(&vector_and_hit_descriptor_scratch, &vector_and_hit_descriptor_scratch, (Vec4 *)hero.inv_rot_matrix); a = fast_arc_tan(vector_and_hit_descriptor_scratch.f[0], vector_and_hit_descriptor_scratch.f[1]); - if (MV(hero.moby)->b52 == 0x31) { + if (MV(hero.moby)->seq == 0x31) { a = fast_subtract_rotations(a, 1.5707964f); AN.f278 = a * 0.3f; AN.f1C8 = a * 0.2f; @@ -2107,15 +2060,15 @@ void update_hero_motion_for_current_state(void) { AN.f278 = a * 0.3f; AN.f1C8 = a * 0.5f; } - } else if (MV(hero.moby)->b53 == 0x31) { + } else if (MV(hero.moby)->prev_seq == 0x31) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); - } else if (MV(hero.moby)->b53 == 0x4B) { + } else if (MV(hero.moby)->prev_seq == 0x4B) { AN.f278 = fast_add_rotations(0.13962634f, hero.rail_lean); AN.f118 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); AN.f1C8 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); - } else if (MV(hero.moby)->b53 == 0x4A) { + } else if (MV(hero.moby)->prev_seq == 0x4A) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); @@ -2924,7 +2877,7 @@ void update_hero_motion_for_current_state(void) { if (saved_state_step != hero.state.step) { hero.step_frames = 0; } - if (anim != moby->b53) { + if (anim != moby->prev_seq) { hero.anim_seq_frames = 0; } } diff --git a/src/overlays/l11/hero/update_hero_motion_by_state.c b/src/overlays/l11/hero/update_hero_motion_by_state.c index 5b613516a5..66cdcf7911 100644 --- a/src/overlays/l11/hero/update_hero_motion_by_state.c +++ b/src/overlays/l11/hero/update_hero_motion_by_state.c @@ -137,53 +137,7 @@ void update_hero_surface_condition_flags(void) { #include "rnc/math/vector.h" #include "rnc/math/fast_math.h" -struct MobyView { - u8 pad0[0xC]; - f32 fC; - union { - Vec4 v10; - f32 f10; - struct { - u8 pad[0x4]; - f32 v; - } f14; - struct { - u8 pad[0x8]; - f32 v; - } f18; - } u10; - u8 pad20[0x3]; - u8 b23; - u8 pad24[0xC]; - u8 b30; - u8 b31; - s16 h32; - union { - s32 i34; - u16 uh34; - } u34; - u8 pad38[0x8]; - union { - Vec4 v40; - struct { - u8 pad[0x8]; - f32 v; - } f48; - } u40; - u8 pad50[0x1]; - u8 b51; - u8 b52; - u8 b53; - u8 pad54[0x1C]; - u8 b70; - u8 pad71[0x7]; - struct MobyView *pm78; - u8 pad7C[0x2A]; - s16 hA6; - u8 padA8[0x18]; - Vec4 vC0; -}; -#define MV(p) ((struct MobyView *)(p)) +#include "rnc/overlay/shared/hero/hero_moby_view.h" struct PlayerJointTable { u8 pad0[0x60]; @@ -369,7 +323,7 @@ void update_hero_motion_by_state(void) __asm__("FUN_L11_00246b70"); void update_hero_motion_by_state(void) { struct MobyView *moby = MV(hero.moby); s32 initial_state_step = hero.state.step; - s32 anim = moby->b53; + s32 anim = moby->prev_seq; f32 speed; Vec4 vector_and_hit_descriptor_head_scratch; Vec4 v10; @@ -432,8 +386,8 @@ void update_hero_motion_by_state(void) { } } if (hero.state.current == HERO_STATE_CROUCH || hero.state.current == 0x17) { - if (hero.stick_magnitude > 0.2f || MV(hero.moby)->b53 == 0xE || - MV(hero.moby)->b53 == 0xF) { + if (hero.stick_magnitude > 0.2f || MV(hero.moby)->prev_seq == 0xE || + MV(hero.moby)->prev_seq == 0xF) { if (hero.state.current == HERO_STATE_CROUCH) { turn_to( 0, frame_scale_sq * 0.002f, frame_scale_sq * 0.07f, frame_time * 6.981317f); @@ -443,7 +397,7 @@ void update_hero_motion_by_state(void) { if (absolute_float(hero.motion.yaw_rate) > frame_time * 0.34906584f) { s32 neg = hero.motion.yaw_rate < 0.0f; s32 anim = neg + 0xE; - if (MV(hero.moby)->b53 != anim) { + if (MV(hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(5)); } hero.anim_speed = @@ -459,7 +413,7 @@ void update_hero_motion_by_state(void) { if (hero.state.current == 0x17) { anim = get_hero_idle_animation_index(0); } - if (MV(hero.moby)->b53 != anim) { + if (MV(hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(7)); } } @@ -473,14 +427,14 @@ void update_hero_motion_by_state(void) { } speed = frame_time_sq * 12.0f * s; hero.unk2290 = speed; - if (MV(hero.moby)->b52 == MV(hero.moby)->b53 && MV(hero.moby)->b52 != 0x14) { + if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq && MV(hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; - if (scale_game_frames(5) < r && MV(hero.moby)->b51 < 5.5f) { + if (scale_game_frames(5) < r && MV(hero.moby)->prev_frame < 5.5f) { adjust_hero_animation_speed_for_target_frame(13.0f, r, 0.5f, -1.0f); if (hero.anim_speed > 1.1f) { hero.anim_speed = 1.1f; } - } else if (MV(hero.moby)->b51 > 6.5f) { + } else if (MV(hero.moby)->prev_frame > 6.5f) { hero.anim_speed = 1.0f; } } @@ -525,27 +479,27 @@ void update_hero_motion_by_state(void) { if (m == NULL) { goto drop; } - qcopy(&m->u10.v10, &hero.motion.pos); - qcopy(&m->u40.v40, &hero.motion.rot); - m->h32 = h40; - MV(hero.sink_effect_moby)->b31 = 1; - MV(hero.sink_effect_moby)->b30 = 0; - MV(hero.sink_effect_moby)->b23 = 0; - MV(hero.sink_effect_moby)->u34.uh34 |= 0x800; + qcopy(&m->pos.v, &hero.motion.pos); + qcopy(&m->rot.v, &hero.motion.rot); + m->draw_dist = h40; + MV(hero.sink_effect_moby)->visible = 1; + MV(hero.sink_effect_moby)->update_dist = 0; + MV(hero.sink_effect_moby)->alpha = 0; + MV(hero.sink_effect_moby)->flags |= 0x800; update_entity(MV(hero.sink_effect_moby)); allocate_voice_for_target_entry(0, 0, MV(hero.sink_effect_moby)); } if (MV(hero.sink_effect_moby) != NULL) { struct MobyView *m; struct MobyView *o; - MV(hero.sink_effect_moby)->b23 += truncate_float_to_s32(frame_scale * 5.0f); - if (MV(hero.sink_effect_moby)->b23 > 0x80) { - MV(hero.sink_effect_moby)->b23 = 0x80; + MV(hero.sink_effect_moby)->alpha += truncate_float_to_s32(frame_scale * 5.0f); + if (MV(hero.sink_effect_moby)->alpha > 0x80) { + MV(hero.sink_effect_moby)->alpha = 0x80; } m = MV(hero.sink_effect_moby); o = MV(hero.moby); - qcopy(&m->u10.v10, &o->u10.v10); - qcopy(&m->u40.v40, &o->u40.v40); + qcopy(&m->pos.v, &o->pos.v); + qcopy(&m->rot.v, &o->rot.v); update_entity(m); } drop: @@ -758,7 +712,7 @@ void update_hero_motion_by_state(void) { vector_and_hit_descriptor_scratch.f[0] = 0.4f; transform_vector_by_basis(&vector_and_hit_descriptor_scratch, &vector_and_hit_descriptor_scratch, - &MV(pl->moby)->vC0); + &MV(pl->moby)->rot_row0); fast_vec_add(&vector_and_hit_descriptor_head_scratch, &vector_and_hit_descriptor_head_scratch, &vector_and_hit_descriptor_scratch); @@ -780,7 +734,7 @@ void update_hero_motion_by_state(void) { } if (hero.state.current == 0x35 && fast_dec_timer_s16(&hero.pack_particle_timer) != 0) { struct MobyView *gm = MV(hero.items[3].moby); - if (gm != NULL && gm->hA6 == 0x261) { + if (gm != NULL && gm->oclass == 0x261) { s32 i; for (i = 0; i < 4; i++) { moby_point_position(gm, i % 2, &vector_and_hit_descriptor_head_scratch); @@ -788,7 +742,7 @@ void update_hero_motion_by_state(void) { vector_and_hit_descriptor_scratch.f[0] = -0.15f; transform_vector_by_basis(&vector_and_hit_descriptor_scratch, &vector_and_hit_descriptor_scratch, - &MV(hero.moby)->vC0); + &MV(hero.moby)->rot_row0); fast_vec_add(&vector_and_hit_descriptor_head_scratch, &vector_and_hit_descriptor_head_scratch, &vector_and_hit_descriptor_scratch); @@ -897,7 +851,7 @@ void update_hero_motion_by_state(void) { vector_and_hit_descriptor_scratch.f[0] = 0.4f; transform_vector_by_basis(&vector_and_hit_descriptor_scratch, &vector_and_hit_descriptor_scratch, - &MV(hero.moby)->vC0); + &MV(hero.moby)->rot_row0); fast_vec_add(&vector_and_hit_descriptor_head_scratch, &vector_and_hit_descriptor_head_scratch, &vector_and_hit_descriptor_scratch); @@ -977,17 +931,17 @@ void update_hero_motion_by_state(void) { case 0x38: case 0x39: case HERO_STATE_ANIMATION_WAIT_TO_IDLE: - if (MV(hero.ground_moby) != NULL && MV(hero.ground_moby)->hA6 == 0x155) { + if (MV(hero.ground_moby) != NULL && MV(hero.ground_moby)->oclass == 0x155) { f32 d; f32 max_yaw_step; clear_u64_value(&vector_and_hit_descriptor_head_scratch); fast_vec_add(&vector_and_hit_descriptor_head_scratch, &vector_and_hit_descriptor_head_scratch, - &MV(hero.ground_moby)->u10.v10); + &MV(hero.ground_moby)->pos.v); fast_vec_sub( &hero.motion.velocity, &vector_and_hit_descriptor_head_scratch, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 2.0f); - d = fast_subtract_rotations(MV(hero.ground_moby)->u40.f48.v, hero.motion.rot.f[2]); + d = fast_subtract_rotations(MV(hero.ground_moby)->rot.z.v, hero.motion.rot.f[2]); max_yaw_step = frame_time * 9.424778f; if (d > max_yaw_step) { d = max_yaw_step; @@ -1018,9 +972,9 @@ void update_hero_motion_by_state(void) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } - if (anim != -1 && MV(hero.moby)->b52 != 0x36) { + if (anim != -1 && MV(hero.moby)->seq != 0x36) { set_hero_animation(anim, 0, frames); - } else if ((MV(hero.moby)->b70 & 2) && MV(hero.moby)->b52 == 0x36) { + } else if ((MV(hero.moby)->anim_flags & 2) && MV(hero.moby)->seq == 0x36) { s32 an = get_hero_idle_animation_index(0); set_hero_animation(an, 0, scale_game_frames(5)); } @@ -1042,16 +996,15 @@ void update_hero_motion_by_state(void) { &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } if (MV(hero.grapple_target) != NULL) { - hero.motion.move_yaw = - fast_arc_tan(MV(hero.grapple_target)->u10.f10 - moby->u10.f10, - MV(hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + hero.motion.move_yaw = fast_arc_tan(MV(hero.grapple_target)->pos.x - moby->pos.x, + MV(hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.15f, frame_time * 6.2831855f); } break; case HERO_STATE_APPROACH_TARGET_MOBY: { f32 hit; f32 hit2; - qcopy(&vector_and_hit_descriptor_head_scratch, &MV(hero.grapple_target)->u10.v10); + qcopy(&vector_and_hit_descriptor_head_scratch, &MV(hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_and_hit_descriptor_head_scratch); hero.target_arrival_frames = scale_game_frames(60); @@ -1060,9 +1013,8 @@ void update_hero_motion_by_state(void) { } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); - hero.motion.move_yaw = - fast_arc_tan(MV(hero.grapple_target)->u10.f10 - moby->u10.f10, - MV(hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + hero.motion.move_yaw = fast_arc_tan(MV(hero.grapple_target)->pos.x - moby->pos.x, + MV(hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.03f, frame_scale_sq * 0.15f, frame_time * 7.330383f); } else if (hero.state.step == 1) { approach_value(&hero.grapple_pull_speed, 0.0f, frame_time_sq * 42.0f); @@ -1097,7 +1049,7 @@ void update_hero_motion_by_state(void) { fast_vec_add(&vector_and_hit_descriptor_scratch, &vector_and_hit_descriptor_scratch, &hero.motion.pos); - fast_vec_sub(&v10, &MV(hero.grapple_target)->u10.v10, &vector_and_hit_descriptor_scratch); + fast_vec_sub(&v10, &MV(hero.grapple_target)->pos.v, &vector_and_hit_descriptor_scratch); fast_vec_normalize(&hero.motion.velocity, &v10, hero.grapple_pull_speed); if (scale_game_frames(30) > hero.target_arrival_frames) { f32 t = scale_game_frames(30) - hero.target_arrival_frames; @@ -1110,7 +1062,7 @@ void update_hero_motion_by_state(void) { qcopy(&hero.motion.velocity, &hero.motion.displacement); fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; - qcopy(&vector_and_hit_descriptor_head_scratch, &MV(hero.grapple_target)->u10.v10); + qcopy(&vector_and_hit_descriptor_head_scratch, &MV(hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_and_hit_descriptor_head_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); @@ -1125,14 +1077,14 @@ void update_hero_motion_by_state(void) { case HERO_STATE_GRAPPLE_SWING_ENTRY: { f32 vz; s32 above; - if ((hero.anim_flags & 2) && moby->b53 == 0x34) { + if ((hero.anim_flags & 2) && moby->prev_seq == 0x34) { set_hero_animation(0x35, 10, scale_game_frames(12)); hero.anim_speed = 0.3f; } vz = hero.motion.velocity.f[2]; - if (MV(hero.swing_target_moby) != NULL && MV(hero.swing_target_moby)->pm78 != NULL && - MV(hero.swing_target_moby)->pm78->u34.i34 != 0) { - f32 a = MV(hero.swing_target_moby)->u40.f48.v; + if (MV(hero.swing_target_moby) != NULL && MV(hero.swing_target_moby)->pvars != NULL && + MV(hero.swing_target_moby)->pvars->align_yaw != 0) { + f32 a = MV(hero.swing_target_moby)->rot.z.v; if (fast_difference_between_rotations(a, hero.motion.rot.f[2]) > 90.0f) { a = fast_add_rotations(a, 3.1415927f); } @@ -1147,7 +1099,7 @@ void update_hero_motion_by_state(void) { hero.motion.move_yaw = hero.swing_yaw; turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.3f, frame_time * 4.712389f); fast_vec_sub(&vector_and_hit_descriptor_head_scratch, - &MV(hero.swing_target_moby)->u10.v10, + &MV(hero.swing_target_moby)->pos.v, &hero.motion.pos); fast_vec_normalize( &vector_and_hit_descriptor_head_scratch, &vector_and_hit_descriptor_head_scratch, 1.0f); @@ -1183,7 +1135,7 @@ void update_hero_motion_by_state(void) { frame_scale_sq * 0.2f, frame_time * 9.599311f); above = 1; - if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->u10.f18.v)) { + if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->pos.z.v)) { above = 0; } if (hero.swing_hooked != 0) { @@ -1205,7 +1157,7 @@ void update_hero_motion_by_state(void) { } if (hero.swing_hooked != 0) { f32 s; - if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < + if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->pos.v) < hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( @@ -1213,7 +1165,7 @@ void update_hero_motion_by_state(void) { if (hero.swing_entry_push != 0 && gravity_z(&hero.motion.velocity) > 0.0f) { fast_vec_sub(&motion_vector_scratch, &hero.motion.pos, - &MV(hero.swing_target_moby)->u10.v10); + &MV(hero.swing_target_moby)->pos.v); add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 57.0f); } @@ -1224,12 +1176,12 @@ void update_hero_motion_by_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &motion_vector_scratch); } { - struct MobyView *r; + struct SwingTargetVars *r; if (MV(hero.swing_target_moby) != NULL && - (r = MV(hero.swing_target_moby)->pm78) != NULL) { + (r = MV(hero.swing_target_moby)->pvars) != NULL) { f32 len = fast_vec_length(&hero.motion.velocity); - if (r->fC < len) { - approach_value(&len, r->fC, frame_time_sq * 15.0f); + if (r->max_speed < len) { + approach_value(&len, r->max_speed, frame_time_sq * 15.0f); fast_vec_normalize(&hero.motion.velocity, &hero.motion.velocity, len); } } @@ -1243,9 +1195,9 @@ void update_hero_motion_by_state(void) { vD0.f[2] = 0.0f; fast_vec_add(&vD0, &vD0, &hero.motion.pos); fast_vec_add(&motion_vector_scratch, &vD0, &hero.motion.velocity); - fast_vec_sub(&vC0, &motion_vector_scratch, &MV(hero.swing_target_moby)->u10.v10); + fast_vec_sub(&vC0, &motion_vector_scratch, &MV(hero.swing_target_moby)->pos.v); fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); - fast_vec_add(&motion_vector_scratch, &MV(hero.swing_target_moby)->u10.v10, &vC0); + fast_vec_add(&motion_vector_scratch, &MV(hero.swing_target_moby)->pos.v, &vC0); fast_vec_sub(&hero.motion.velocity, &motion_vector_scratch, &vD0); old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, @@ -1289,18 +1241,18 @@ void update_hero_motion_by_state(void) { up = forward_component(&motion_vector_scratch) > 0.0f; } if (up) { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 6, scale_game_frames(17)); hero.swing_anim_dir = 1; - } else if (MV(hero.moby)->b52 == MV(hero.moby)->b53) { + } else if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(42.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } } else { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 0x15, scale_game_frames(9)); hero.swing_anim_dir = 2; - } else if (MV(hero.moby)->b52 == MV(hero.moby)->b53) { + } else if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(12.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } @@ -1362,7 +1314,7 @@ void update_hero_motion_by_state(void) { } hero.target_speed = 0.0f; if (MV(hero.melee_target) != NULL) { - f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->u10.v10); + f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1491,7 +1443,7 @@ void update_hero_motion_by_state(void) { tb = &D_L11_0017C628[hero.attack_record]; hero.target_speed = 0.0f; if (MV(hero.melee_target) != NULL && scale_game_frames(4) > hero.state_timer) { - f32 d = vector_distance_xy(&MV(hero.melee_target)->u10.v10, &hero.motion.pos) - 0.5f; + f32 d = vector_distance_xy(&MV(hero.melee_target)->pos.v, &hero.motion.pos) - 0.5f; f32 attack_spacing_offset; f32 tol; f32 mx; @@ -1642,7 +1594,7 @@ void update_hero_motion_by_state(void) { vector_and_hit_descriptor_head_scratch.f[3] = 5627.925f; ((u8 *)&v10)[8] = 0; a = hero.motion.rot.f[2]; - ((s16 *)&v10)[5] = o->hA6; + ((s16 *)&v10)[5] = o->oclass; matrix_and_vector_scratch[0].f[0] = fast_cos(a) * 0.8f; matrix_and_vector_scratch[0].f[1] = fast_sin(a) * 0.8f; matrix_and_vector_scratch[0].f[2] = 0.55f; @@ -2393,7 +2345,7 @@ void update_hero_motion_by_state(void) { if (initial_state_step != hero.state.step) { hero.step_frames = 0; } - if (anim != moby->b53) { + if (anim != moby->prev_seq) { hero.anim_seq_frames = 0; } } diff --git a/src/overlays/l12/hero/update_hero_motion_for_current_state.c b/src/overlays/l12/hero/update_hero_motion_for_current_state.c index 8e80dd7cbc..5fbe2f9f20 100644 --- a/src/overlays/l12/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l12/hero/update_hero_motion_for_current_state.c @@ -415,53 +415,8 @@ void update_hero_ground_contact_and_gravity(void) { #include "rnc/math/vector.h" #include "rnc/math/fast_math.h" -struct MobyView { - u8 pad0[0xC]; - f32 fC; - union { - Vec4 v10; - f32 f10; - struct { - u8 pad[0x4]; - f32 v; - } f14; - struct { - u8 pad[0x8]; - f32 v; - } f18; - } u10; - u8 pad20[0x3]; - u8 b23; - u8 pad24[0xC]; - u8 b30; - u8 b31; - s16 h32; - union { - s32 i34; - u16 uh34; - } u34; - u8 pad38[0x8]; - union { - Vec4 v40; - struct { - u8 pad[0x8]; - f32 v; - } f48; - } u40; - u8 pad50[0x1]; - u8 b51; - u8 b52; - u8 b53; - u8 pad54[0x1C]; - u8 b70; - u8 pad71[0x7]; - struct MobyView *pm78; - u8 pad7C[0x2A]; - s16 hA6; - u8 padA8[0x18]; - Vec4 vC0; -}; -#define MV(p) ((struct MobyView *)(p)) +#include "rnc/overlay/shared/hero/hero_moby_view.h" + /* Second name for hero: one call needs it to keep the original address CSE. */ extern struct Hero hero_b __asm__("D_0013F350"); @@ -657,7 +612,7 @@ void update_hero_motion_for_current_state(void) __asm__("FUN_L12_00238900"); void update_hero_motion_for_current_state(void) { struct MobyView *moby = MV(hero.moby); s32 entry_state_step = hero.state.step; - s32 anim = moby->b53; + s32 anim = moby->prev_seq; f32 speed; Vec4 geometry_and_hit_descriptor_scratch; Vec4 v10; @@ -724,8 +679,8 @@ void update_hero_motion_for_current_state(void) { } } if (hero.state.current == HERO_STATE_CROUCH || hero.state.current == 0x17) { - if (hero.stick_magnitude > 0.2f || MV(hero.moby)->b53 == 0xE || - MV(hero.moby)->b53 == 0xF) { + if (hero.stick_magnitude > 0.2f || MV(hero.moby)->prev_seq == 0xE || + MV(hero.moby)->prev_seq == 0xF) { if (hero.state.current == HERO_STATE_CROUCH) { turn_to( 0, frame_scale_sq * 0.002f, frame_scale_sq * 0.07f, frame_time * 6.981317f); @@ -735,7 +690,7 @@ void update_hero_motion_for_current_state(void) { if (absolute_float(hero.motion.yaw_rate) > frame_time * 0.34906584f) { s32 neg = hero.motion.yaw_rate < 0.0f; s32 anim = neg + 0xE; - if (MV(hero.moby)->b53 != anim) { + if (MV(hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(5)); } hero.anim_speed = @@ -751,7 +706,7 @@ void update_hero_motion_for_current_state(void) { if (hero.state.current == 0x17) { anim = hero_get_gadget_anim_id(0); } - if (MV(hero.moby)->b53 != anim) { + if (MV(hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(7)); } } @@ -765,14 +720,14 @@ void update_hero_motion_for_current_state(void) { } speed = frame_time_sq * 12.0f * s; hero.unk2290 = speed; - if (MV(hero.moby)->b52 == MV(hero.moby)->b53 && MV(hero.moby)->b52 != 0x14) { + if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq && MV(hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; - if (scale_game_frames(5) < r && MV(hero.moby)->b51 < 5.5f) { + if (scale_game_frames(5) < r && MV(hero.moby)->prev_frame < 5.5f) { adjust_hero_animation_speed_for_target_frame(13.0f, r, 0.5f, -1.0f); if (hero.anim_speed > 1.1f) { hero.anim_speed = 1.1f; } - } else if (MV(hero.moby)->b51 > 6.5f) { + } else if (MV(hero.moby)->prev_frame > 6.5f) { hero.anim_speed = 1.0f; } } @@ -821,27 +776,27 @@ void update_hero_motion_for_current_state(void) { if (m == NULL) { goto drop; } - qcopy(&m->u10.v10, &hero.motion.pos); - qcopy(&m->u40.v40, &hero.motion.rot); - m->h32 = h40; - MV(hero.sink_effect_moby)->b31 = 1; - MV(hero.sink_effect_moby)->b30 = 0; - MV(hero.sink_effect_moby)->b23 = 0; - MV(hero.sink_effect_moby)->u34.uh34 |= 0x800; + qcopy(&m->pos.v, &hero.motion.pos); + qcopy(&m->rot.v, &hero.motion.rot); + m->draw_dist = h40; + MV(hero.sink_effect_moby)->visible = 1; + MV(hero.sink_effect_moby)->update_dist = 0; + MV(hero.sink_effect_moby)->alpha = 0; + MV(hero.sink_effect_moby)->flags |= 0x800; update_entity(MV(hero.sink_effect_moby)); allocate_voice_for_target_entry(0, 0, MV(hero.sink_effect_moby)); } if (MV(hero.sink_effect_moby) != NULL) { struct MobyView *m; struct MobyView *o; - MV(hero.sink_effect_moby)->b23 += truncate_float_to_s32(frame_scale * 5.0f); - if (MV(hero.sink_effect_moby)->b23 > 0x80) { - MV(hero.sink_effect_moby)->b23 = 0x80; + MV(hero.sink_effect_moby)->alpha += truncate_float_to_s32(frame_scale * 5.0f); + if (MV(hero.sink_effect_moby)->alpha > 0x80) { + MV(hero.sink_effect_moby)->alpha = 0x80; } m = MV(hero.sink_effect_moby); o = MV(hero.moby); - qcopy(&m->u10.v10, &o->u10.v10); - qcopy(&m->u40.v40, &o->u40.v40); + qcopy(&m->pos.v, &o->pos.v); + qcopy(&m->rot.v, &o->rot.v); update_entity(m); } drop: @@ -1054,7 +1009,7 @@ void update_hero_motion_for_current_state(void) { geometry_rotation_and_hit_descriptor_scratch.f[0] = 0.4f; transform_vector_by_basis(&geometry_rotation_and_hit_descriptor_scratch, &geometry_rotation_and_hit_descriptor_scratch, - &MV(pl->moby)->vC0); + &MV(pl->moby)->rot_row0); fast_vec_add(&geometry_and_hit_descriptor_scratch, &geometry_and_hit_descriptor_scratch, &geometry_rotation_and_hit_descriptor_scratch); @@ -1076,7 +1031,7 @@ void update_hero_motion_for_current_state(void) { } if (hero.state.current == 0x35 && fast_dec_timer_s16(&hero.pack_particle_timer) != 0) { struct MobyView *gm = MV(hero.items[3].moby); - if (gm != NULL && gm->hA6 == 0x261) { + if (gm != NULL && gm->oclass == 0x261) { s32 i; for (i = 0; i < 4; i++) { moby_point_position(gm, i % 2, &geometry_and_hit_descriptor_scratch); @@ -1084,7 +1039,7 @@ void update_hero_motion_for_current_state(void) { geometry_rotation_and_hit_descriptor_scratch.f[0] = -0.15f; transform_vector_by_basis(&geometry_rotation_and_hit_descriptor_scratch, &geometry_rotation_and_hit_descriptor_scratch, - &MV(hero.moby)->vC0); + &MV(hero.moby)->rot_row0); fast_vec_add(&geometry_and_hit_descriptor_scratch, &geometry_and_hit_descriptor_scratch, &geometry_rotation_and_hit_descriptor_scratch); @@ -1193,7 +1148,7 @@ void update_hero_motion_for_current_state(void) { geometry_rotation_and_hit_descriptor_scratch.f[0] = 0.4f; transform_vector_by_basis(&geometry_rotation_and_hit_descriptor_scratch, &geometry_rotation_and_hit_descriptor_scratch, - &MV(hero.moby)->vC0); + &MV(hero.moby)->rot_row0); fast_vec_add(&geometry_and_hit_descriptor_scratch, &geometry_and_hit_descriptor_scratch, &geometry_rotation_and_hit_descriptor_scratch); @@ -1273,17 +1228,17 @@ void update_hero_motion_for_current_state(void) { case 0x38: case 0x39: case HERO_STATE_ANIMATION_WAIT_TO_IDLE: - if (MV(hero.ground_moby) != NULL && MV(hero.ground_moby)->hA6 == 0x155) { + if (MV(hero.ground_moby) != NULL && MV(hero.ground_moby)->oclass == 0x155) { f32 d; f32 max_yaw_step; clear_u64_value(&geometry_and_hit_descriptor_scratch); fast_vec_add(&geometry_and_hit_descriptor_scratch, &geometry_and_hit_descriptor_scratch, - &MV(hero.ground_moby)->u10.v10); + &MV(hero.ground_moby)->pos.v); fast_vec_sub( &hero.motion.velocity, &geometry_and_hit_descriptor_scratch, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 2.0f); - d = fast_subtract_rotations(MV(hero.ground_moby)->u40.f48.v, hero.motion.rot.f[2]); + d = fast_subtract_rotations(MV(hero.ground_moby)->rot.z.v, hero.motion.rot.f[2]); max_yaw_step = frame_time * 9.424778f; if (d > max_yaw_step) { d = max_yaw_step; @@ -1314,9 +1269,9 @@ void update_hero_motion_for_current_state(void) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } - if (anim != -1 && MV(hero.moby)->b52 != 0x36) { + if (anim != -1 && MV(hero.moby)->seq != 0x36) { set_hero_animation(anim, 0, frames); - } else if ((MV(hero.moby)->b70 & 2) && MV(hero.moby)->b52 == 0x36) { + } else if ((MV(hero.moby)->anim_flags & 2) && MV(hero.moby)->seq == 0x36) { s32 an = hero_get_gadget_anim_id(0); set_hero_animation(an, 0, scale_game_frames(5)); } @@ -1338,16 +1293,15 @@ void update_hero_motion_for_current_state(void) { &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } if (MV(hero.grapple_target) != NULL) { - hero.motion.move_yaw = - fast_arc_tan(MV(hero.grapple_target)->u10.f10 - moby->u10.f10, - MV(hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + hero.motion.move_yaw = fast_arc_tan(MV(hero.grapple_target)->pos.x - moby->pos.x, + MV(hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.15f, frame_time * 6.2831855f); } break; case HERO_STATE_APPROACH_TARGET_MOBY: { f32 hit; f32 hit2; - qcopy(&geometry_and_hit_descriptor_scratch, &MV(hero.grapple_target)->u10.v10); + qcopy(&geometry_and_hit_descriptor_scratch, &MV(hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &geometry_and_hit_descriptor_scratch); hero.target_arrival_frames = scale_game_frames(60); @@ -1356,9 +1310,8 @@ void update_hero_motion_for_current_state(void) { } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); - hero.motion.move_yaw = - fast_arc_tan(MV(hero.grapple_target)->u10.f10 - moby->u10.f10, - MV(hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + hero.motion.move_yaw = fast_arc_tan(MV(hero.grapple_target)->pos.x - moby->pos.x, + MV(hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.03f, frame_scale_sq * 0.15f, frame_time * 7.330383f); } else if (hero.state.step == 1) { approach_value(&hero.grapple_pull_speed, 0.0f, frame_time_sq * 42.0f); @@ -1394,7 +1347,7 @@ void update_hero_motion_for_current_state(void) { &geometry_rotation_and_hit_descriptor_scratch, &hero.motion.pos); fast_vec_sub( - &v10, &MV(hero.grapple_target)->u10.v10, &geometry_rotation_and_hit_descriptor_scratch); + &v10, &MV(hero.grapple_target)->pos.v, &geometry_rotation_and_hit_descriptor_scratch); fast_vec_normalize(&hero.motion.velocity, &v10, hero.grapple_pull_speed); if (scale_game_frames(30) > hero.target_arrival_frames) { f32 t = scale_game_frames(30) - hero.target_arrival_frames; @@ -1407,7 +1360,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.displacement); fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; - qcopy(&geometry_and_hit_descriptor_scratch, &MV(hero.grapple_target)->u10.v10); + qcopy(&geometry_and_hit_descriptor_scratch, &MV(hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &geometry_and_hit_descriptor_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); @@ -1423,14 +1376,14 @@ void update_hero_motion_for_current_state(void) { case HERO_STATE_GRAPPLE_SWING_ENTRY: { f32 vz; s32 above; - if ((hero.anim_flags & 2) && moby->b53 == 0x34) { + if ((hero.anim_flags & 2) && moby->prev_seq == 0x34) { set_hero_animation(0x35, 10, scale_game_frames(12)); hero.anim_speed = 0.3f; } vz = hero.motion.velocity.f[2]; - if (MV(hero.swing_target_moby) != NULL && MV(hero.swing_target_moby)->pm78 != NULL && - MV(hero.swing_target_moby)->pm78->u34.i34 != 0) { - f32 a = MV(hero.swing_target_moby)->u40.f48.v; + if (MV(hero.swing_target_moby) != NULL && MV(hero.swing_target_moby)->pvars != NULL && + MV(hero.swing_target_moby)->pvars->align_yaw != 0) { + f32 a = MV(hero.swing_target_moby)->rot.z.v; if (fast_difference_between_rotations(a, hero.motion.rot.f[2]) > 90.0f) { a = fast_add_rotations(a, 3.1415927f); } @@ -1445,7 +1398,7 @@ void update_hero_motion_for_current_state(void) { hero.motion.move_yaw = hero.swing_yaw; turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.3f, frame_time * 4.712389f); fast_vec_sub(&geometry_and_hit_descriptor_scratch, - &MV(hero.swing_target_moby)->u10.v10, + &MV(hero.swing_target_moby)->pos.v, &hero.motion.pos); fast_vec_normalize( &geometry_and_hit_descriptor_scratch, &geometry_and_hit_descriptor_scratch, 1.0f); @@ -1482,7 +1435,7 @@ void update_hero_motion_for_current_state(void) { frame_scale_sq * 0.2f, frame_time * 9.599311f); above = 1; - if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->u10.f18.v)) { + if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->pos.z.v)) { above = 0; } if (hero.swing_hooked != 0) { @@ -1504,7 +1457,7 @@ void update_hero_motion_for_current_state(void) { } if (hero.swing_hooked != 0) { f32 s; - if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < + if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->pos.v) < hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( @@ -1512,7 +1465,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_entry_push != 0 && gravity_z(&hero.motion.velocity) > 0.0f) { fast_vec_sub(&movement_vector_scratch, &hero.motion.pos, - &MV(hero.swing_target_moby)->u10.v10); + &MV(hero.swing_target_moby)->pos.v); add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 57.0f); } @@ -1523,12 +1476,12 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &movement_vector_scratch); } { - struct MobyView *r; + struct SwingTargetVars *r; if (MV(hero.swing_target_moby) != NULL && - (r = MV(hero.swing_target_moby)->pm78) != NULL) { + (r = MV(hero.swing_target_moby)->pvars) != NULL) { f32 len = fast_vec_length(&hero.motion.velocity); - if (r->fC < len) { - approach_value(&len, r->fC, frame_time_sq * 15.0f); + if (r->max_speed < len) { + approach_value(&len, r->max_speed, frame_time_sq * 15.0f); fast_vec_normalize(&hero.motion.velocity, &hero.motion.velocity, len); } } @@ -1542,9 +1495,9 @@ void update_hero_motion_for_current_state(void) { vD0.f[2] = 0.0f; fast_vec_add(&vD0, &vD0, &hero.motion.pos); fast_vec_add(&movement_vector_scratch, &vD0, &hero.motion.velocity); - fast_vec_sub(&vC0, &movement_vector_scratch, &MV(hero.swing_target_moby)->u10.v10); + fast_vec_sub(&vC0, &movement_vector_scratch, &MV(hero.swing_target_moby)->pos.v); fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); - fast_vec_add(&movement_vector_scratch, &MV(hero.swing_target_moby)->u10.v10, &vC0); + fast_vec_add(&movement_vector_scratch, &MV(hero.swing_target_moby)->pos.v, &vC0); fast_vec_sub(&hero.motion.velocity, &movement_vector_scratch, &vD0); old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, @@ -1589,18 +1542,18 @@ void update_hero_motion_for_current_state(void) { up = forward_component(&movement_vector_scratch) > 0.0f; } if (up) { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 6, scale_game_frames(17)); hero.swing_anim_dir = 1; - } else if (MV(hero.moby)->b52 == MV(hero.moby)->b53) { + } else if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(42.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } } else { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 0x15, scale_game_frames(9)); hero.swing_anim_dir = 2; - } else if (MV(hero.moby)->b52 == MV(hero.moby)->b53) { + } else if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(12.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } @@ -1664,7 +1617,7 @@ void update_hero_motion_for_current_state(void) { hero.target_speed = 0.0f; if (hero.on_ice_ground != 0) { if (MV(hero.melee_target) != NULL) { - f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->u10.v10); + f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1678,7 +1631,7 @@ void update_hero_motion_for_current_state(void) { } } else { if (MV(hero.melee_target) != NULL) { - f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->u10.v10); + f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1826,7 +1779,7 @@ void update_hero_motion_for_current_state(void) { tb = &D_L12_0017C0A8[hero.attack_record]; hero.target_speed = 0.0f; if (MV(hero.melee_target) != NULL && scale_game_frames(4) > hero.state_timer) { - f32 d = vector_distance_xy(&MV(hero.melee_target)->u10.v10, &hero.motion.pos) - 0.5f; + f32 d = vector_distance_xy(&MV(hero.melee_target)->pos.v, &hero.motion.pos) - 0.5f; f32 combo_target_distance_offset; f32 tol; f32 mx; @@ -1988,7 +1941,7 @@ void update_hero_motion_for_current_state(void) { geometry_and_hit_descriptor_scratch.f[3] = 5627.925f; ((u8 *)&v10)[8] = 0; a = hero.motion.rot.f[2]; - ((s16 *)&v10)[5] = o->hA6; + ((s16 *)&v10)[5] = o->oclass; rotation_matrix_and_geometry_scratch[0].f[0] = fast_cos(a) * 0.8f; rotation_matrix_and_geometry_scratch[0].f[1] = fast_sin(a) * 0.8f; rotation_matrix_and_geometry_scratch[0].f[2] = 0.55f; @@ -2214,7 +2167,7 @@ void update_hero_motion_for_current_state(void) { FUN_L12_0022c6c8(0.04f, 0.2f); FUN_L12_0022c6e0(0.04f, 0.2f); FUN_L12_0022c6f8(0.02f, 0.2f); - if (moby->b53 == 0x37) { + if (moby->prev_seq == 0x37) { a = hero.motion.yaw_error; if (a > 1.4f) { a = 1.4f; @@ -2227,7 +2180,7 @@ void update_hero_motion_for_current_state(void) { AN.f278 = a * 0.4f; AN.f274 = absolute_float(a) * -0.09f; AN.f270 = absolute_float(a) * 0.08f; - } else if (moby->b53 == 0x6D) { + } else if (moby->prev_seq == 0x6D) { f32 ang = fast_add_rotations( fast_subtract_rotations( fast_arc_tan(hero.motion.displacement.f[0], hero.motion.displacement.f[1]), @@ -2859,7 +2812,7 @@ void update_hero_motion_for_current_state(void) { if (entry_state_step != hero.state.step) { hero.step_frames = 0; } - if (anim != moby->b53) { + if (anim != moby->prev_seq) { hero.anim_seq_frames = 0; } } diff --git a/src/overlays/l14/hero/update_hero_motion_by_state.c b/src/overlays/l14/hero/update_hero_motion_by_state.c index e95049fa6a..2679f7828b 100644 --- a/src/overlays/l14/hero/update_hero_motion_by_state.c +++ b/src/overlays/l14/hero/update_hero_motion_by_state.c @@ -293,53 +293,8 @@ void update_hero_smoothed_parameters(void) { #include "rnc/math/vector.h" #include "rnc/math/fast_math.h" -struct MobyView { - u8 pad0[0xC]; - f32 fC; - union { - Vec4 v10; - f32 f10; - struct { - u8 pad[0x4]; - f32 v; - } f14; - struct { - u8 pad[0x8]; - f32 v; - } f18; - } u10; - u8 pad20[0x3]; - u8 b23; - u8 pad24[0xC]; - u8 b30; - u8 b31; - s16 h32; - union { - s32 i34; - u16 uh34; - } u34; - u8 pad38[0x8]; - union { - Vec4 v40; - struct { - u8 pad[0x8]; - f32 v; - } f48; - } u40; - u8 pad50[0x1]; - u8 b51; - u8 b52; - u8 b53; - u8 pad54[0x1C]; - u8 b70; - u8 pad71[0x7]; - struct MobyView *pm78; - u8 pad7C[0x2A]; - s16 hA6; - u8 padA8[0x18]; - Vec4 vC0; -}; -#define MV(p) ((struct MobyView *)(p)) +#include "rnc/overlay/shared/hero/hero_moby_view.h" + /* Second name for hero: one call needs it to keep the original address CSE. */ extern struct Hero hero_b __asm__("D_0013F350"); @@ -527,7 +482,7 @@ void update_hero_motion_by_state(void) __asm__("FUN_L14_00228cd0"); void update_hero_motion_by_state(void) { struct MobyView *moby = MV(hero.moby); s32 state_step_before_update = hero.state.step; - s32 anim = moby->b53; + s32 anim = moby->prev_seq; f32 speed; Vec4 vector_and_descriptor_scratch; Vec4 v10; @@ -590,8 +545,8 @@ void update_hero_motion_by_state(void) { } } if (hero.state.current == HERO_STATE_CROUCH || hero.state.current == 0x17) { - if (hero.stick_magnitude > 0.2f || MV(hero.moby)->b53 == 0xE || - MV(hero.moby)->b53 == 0xF) { + if (hero.stick_magnitude > 0.2f || MV(hero.moby)->prev_seq == 0xE || + MV(hero.moby)->prev_seq == 0xF) { if (hero.state.current == HERO_STATE_CROUCH) { turn_to( 0, frame_scale_sq * 0.002f, frame_scale_sq * 0.07f, frame_time * 6.981317f); @@ -601,7 +556,7 @@ void update_hero_motion_by_state(void) { if (absolute_float(hero.motion.yaw_rate) > frame_time * 0.34906584f) { s32 neg = hero.motion.yaw_rate < 0.0f; s32 anim = neg + 0xE; - if (MV(hero.moby)->b53 != anim) { + if (MV(hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(5)); } hero.anim_speed = @@ -617,7 +572,7 @@ void update_hero_motion_by_state(void) { if (hero.state.current == 0x17) { anim = hero_get_gadget_anim_id(0); } - if (MV(hero.moby)->b53 != anim) { + if (MV(hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(7)); } } @@ -631,14 +586,14 @@ void update_hero_motion_by_state(void) { } speed = frame_time_sq * 12.0f * s; hero.unk2290 = speed; - if (MV(hero.moby)->b52 == MV(hero.moby)->b53 && MV(hero.moby)->b52 != 0x14) { + if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq && MV(hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; - if (scale_game_frames(5) < r && MV(hero.moby)->b51 < 5.5f) { + if (scale_game_frames(5) < r && MV(hero.moby)->prev_frame < 5.5f) { adjust_hero_animation_speed_for_target_frame(13.0f, r, 0.5f, -1.0f); if (hero.anim_speed > 1.1f) { hero.anim_speed = 1.1f; } - } else if (MV(hero.moby)->b51 > 6.5f) { + } else if (MV(hero.moby)->prev_frame > 6.5f) { hero.anim_speed = 1.0f; } } @@ -687,27 +642,27 @@ void update_hero_motion_by_state(void) { if (m == NULL) { goto drop; } - qcopy(&m->u10.v10, &hero.motion.pos); - qcopy(&m->u40.v40, &hero.motion.rot); - m->h32 = h40; - MV(hero.sink_effect_moby)->b31 = 1; - MV(hero.sink_effect_moby)->b30 = 0; - MV(hero.sink_effect_moby)->b23 = 0; - MV(hero.sink_effect_moby)->u34.uh34 |= 0x800; + qcopy(&m->pos.v, &hero.motion.pos); + qcopy(&m->rot.v, &hero.motion.rot); + m->draw_dist = h40; + MV(hero.sink_effect_moby)->visible = 1; + MV(hero.sink_effect_moby)->update_dist = 0; + MV(hero.sink_effect_moby)->alpha = 0; + MV(hero.sink_effect_moby)->flags |= 0x800; update_entity(MV(hero.sink_effect_moby)); allocate_voice_for_target_entry(0, 0, MV(hero.sink_effect_moby)); } if (MV(hero.sink_effect_moby) != NULL) { struct MobyView *m; struct MobyView *o; - MV(hero.sink_effect_moby)->b23 += truncate_float_to_s32(frame_scale * 5.0f); - if (MV(hero.sink_effect_moby)->b23 > 0x80) { - MV(hero.sink_effect_moby)->b23 = 0x80; + MV(hero.sink_effect_moby)->alpha += truncate_float_to_s32(frame_scale * 5.0f); + if (MV(hero.sink_effect_moby)->alpha > 0x80) { + MV(hero.sink_effect_moby)->alpha = 0x80; } m = MV(hero.sink_effect_moby); o = MV(hero.moby); - qcopy(&m->u10.v10, &o->u10.v10); - qcopy(&m->u40.v40, &o->u40.v40); + qcopy(&m->pos.v, &o->pos.v); + qcopy(&m->rot.v, &o->rot.v); update_entity(m); } drop: @@ -741,9 +696,9 @@ void update_hero_motion_by_state(void) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } - if (anim != -1 && MV(hero.moby)->b52 != 0x36) { + if (anim != -1 && MV(hero.moby)->seq != 0x36) { set_hero_animation(anim, 0, frames); - } else if ((MV(hero.moby)->b70 & 2) && MV(hero.moby)->b52 == 0x36) { + } else if ((MV(hero.moby)->anim_flags & 2) && MV(hero.moby)->seq == 0x36) { s32 an = hero_get_gadget_anim_id(0); set_hero_animation(an, 0, scale_game_frames(5)); } @@ -765,16 +720,15 @@ void update_hero_motion_by_state(void) { &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } if (MV(hero.grapple_target) != NULL) { - hero.motion.move_yaw = - fast_arc_tan(MV(hero.grapple_target)->u10.f10 - moby->u10.f10, - MV(hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + hero.motion.move_yaw = fast_arc_tan(MV(hero.grapple_target)->pos.x - moby->pos.x, + MV(hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.15f, frame_time * 6.2831855f); } break; case HERO_STATE_APPROACH_TARGET_MOBY: { f32 hit; f32 hit2; - qcopy(&vector_and_descriptor_scratch, &MV(hero.grapple_target)->u10.v10); + qcopy(&vector_and_descriptor_scratch, &MV(hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_and_descriptor_scratch); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { @@ -782,9 +736,8 @@ void update_hero_motion_by_state(void) { } if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); - hero.motion.move_yaw = - fast_arc_tan(MV(hero.grapple_target)->u10.f10 - moby->u10.f10, - MV(hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + hero.motion.move_yaw = fast_arc_tan(MV(hero.grapple_target)->pos.x - moby->pos.x, + MV(hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.03f, frame_scale_sq * 0.15f, frame_time * 7.330383f); } else if (hero.state.step == 1) { approach_value(&hero.grapple_pull_speed, 0.0f, frame_time_sq * 42.0f); @@ -818,7 +771,7 @@ void update_hero_motion_by_state(void) { fast_vec_add(&vector_and_hit_descriptor_scratch, &vector_and_hit_descriptor_scratch, &hero.motion.pos); - fast_vec_sub(&v10, &MV(hero.grapple_target)->u10.v10, &vector_and_hit_descriptor_scratch); + fast_vec_sub(&v10, &MV(hero.grapple_target)->pos.v, &vector_and_hit_descriptor_scratch); fast_vec_normalize(&hero.motion.velocity, &v10, hero.grapple_pull_speed); if (scale_game_frames(30) > hero.target_arrival_frames) { f32 t = scale_game_frames(30) - hero.target_arrival_frames; @@ -831,7 +784,7 @@ void update_hero_motion_by_state(void) { qcopy(&hero.motion.velocity, &hero.motion.displacement); fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; - qcopy(&vector_and_descriptor_scratch, &MV(hero.grapple_target)->u10.v10); + qcopy(&vector_and_descriptor_scratch, &MV(hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &vector_and_descriptor_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&motion_vector_scratch, &v10, &vector_and_descriptor_scratch); @@ -845,14 +798,14 @@ void update_hero_motion_by_state(void) { case HERO_STATE_GRAPPLE_SWING_ENTRY: { f32 vz; s32 above; - if ((hero.anim_flags & 2) && moby->b53 == 0x34) { + if ((hero.anim_flags & 2) && moby->prev_seq == 0x34) { set_hero_animation(0x35, 10, scale_game_frames(12)); hero.anim_speed = 0.3f; } vz = hero.motion.velocity.f[2]; - if (MV(hero.swing_target_moby) != NULL && MV(hero.swing_target_moby)->pm78 != NULL && - MV(hero.swing_target_moby)->pm78->u34.i34 != 0) { - f32 a = MV(hero.swing_target_moby)->u40.f48.v; + if (MV(hero.swing_target_moby) != NULL && MV(hero.swing_target_moby)->pvars != NULL && + MV(hero.swing_target_moby)->pvars->align_yaw != 0) { + f32 a = MV(hero.swing_target_moby)->rot.z.v; if (fast_difference_between_rotations(a, hero.motion.rot.f[2]) > 90.0f) { a = fast_add_rotations(a, 3.1415927f); } @@ -867,7 +820,7 @@ void update_hero_motion_by_state(void) { hero.motion.move_yaw = hero.swing_yaw; turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.3f, frame_time * 4.712389f); fast_vec_sub( - &vector_and_descriptor_scratch, &MV(hero.swing_target_moby)->u10.v10, &hero.motion.pos); + &vector_and_descriptor_scratch, &MV(hero.swing_target_moby)->pos.v, &hero.motion.pos); fast_vec_normalize(&vector_and_descriptor_scratch, &vector_and_descriptor_scratch, 1.0f); if (vector_and_descriptor_scratch.f[2] < 0.23f) { vector_and_descriptor_scratch.f[2] = 0.23f; @@ -899,7 +852,7 @@ void update_hero_motion_by_state(void) { frame_scale_sq * 0.2f, frame_time * 9.599311f); above = 1; - if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->u10.f18.v)) { + if (!(hero.motion.pos.f[2] < MV(hero.swing_target_moby)->pos.z.v)) { above = 0; } if (hero.swing_hooked != 0) { @@ -921,7 +874,7 @@ void update_hero_motion_by_state(void) { } if (hero.swing_hooked != 0) { f32 s; - if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->u10.v10) < + if (vector_distance_xy(&hero.motion.pos, &MV(hero.swing_target_moby)->pos.v) < hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( @@ -929,7 +882,7 @@ void update_hero_motion_by_state(void) { if (hero.swing_entry_push != 0 && gravity_z(&hero.motion.velocity) > 0.0f) { fast_vec_sub(&motion_vector_scratch, &hero.motion.pos, - &MV(hero.swing_target_moby)->u10.v10); + &MV(hero.swing_target_moby)->pos.v); add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 57.0f); } @@ -940,12 +893,12 @@ void update_hero_motion_by_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &motion_vector_scratch); } { - struct MobyView *r; + struct SwingTargetVars *r; if (MV(hero.swing_target_moby) != NULL && - (r = MV(hero.swing_target_moby)->pm78) != NULL) { + (r = MV(hero.swing_target_moby)->pvars) != NULL) { f32 len = fast_vec_length(&hero.motion.velocity); - if (r->fC < len) { - approach_value(&len, r->fC, frame_time_sq * 15.0f); + if (r->max_speed < len) { + approach_value(&len, r->max_speed, frame_time_sq * 15.0f); fast_vec_normalize(&hero.motion.velocity, &hero.motion.velocity, len); } } @@ -959,9 +912,9 @@ void update_hero_motion_by_state(void) { vD0.f[2] = 0.0f; fast_vec_add(&vD0, &vD0, &hero.motion.pos); fast_vec_add(&motion_vector_scratch, &vD0, &hero.motion.velocity); - fast_vec_sub(&vC0, &motion_vector_scratch, &MV(hero.swing_target_moby)->u10.v10); + fast_vec_sub(&vC0, &motion_vector_scratch, &MV(hero.swing_target_moby)->pos.v); fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); - fast_vec_add(&motion_vector_scratch, &MV(hero.swing_target_moby)->u10.v10, &vC0); + fast_vec_add(&motion_vector_scratch, &MV(hero.swing_target_moby)->pos.v, &vC0); fast_vec_sub(&hero.motion.velocity, &motion_vector_scratch, &vD0); swing_radius_before_spring = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, @@ -1005,18 +958,18 @@ void update_hero_motion_by_state(void) { up = forward_component(&motion_vector_scratch) > 0.0f; } if (up) { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 6, scale_game_frames(17)); hero.swing_anim_dir = 1; - } else if (MV(hero.moby)->b52 == MV(hero.moby)->b53) { + } else if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(42.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } } else { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 0x15, scale_game_frames(9)); hero.swing_anim_dir = 2; - } else if (MV(hero.moby)->b52 == MV(hero.moby)->b53) { + } else if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(12.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } @@ -1079,7 +1032,7 @@ void update_hero_motion_by_state(void) { hero.target_speed = 0.0f; if (hero.on_ice_ground != 0) { if (MV(hero.melee_target) != NULL) { - f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->u10.v10); + f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1093,7 +1046,7 @@ void update_hero_motion_by_state(void) { } } else { if (MV(hero.melee_target) != NULL) { - f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->u10.v10); + f32 d = vector_distance_xy(&hero.motion.pos, &MV(hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1240,7 +1193,7 @@ void update_hero_motion_by_state(void) { tb = &D_L14_0017C328[hero.attack_record]; hero.target_speed = 0.0f; if (MV(hero.melee_target) != NULL && scale_game_frames(4) > hero.state_timer) { - f32 d = vector_distance_xy(&MV(hero.melee_target)->u10.v10, &hero.motion.pos) - 0.5f; + f32 d = vector_distance_xy(&MV(hero.melee_target)->pos.v, &hero.motion.pos) - 0.5f; f32 attack_spacing_offset; f32 tol; f32 mx; @@ -1402,7 +1355,7 @@ void update_hero_motion_by_state(void) { vector_and_descriptor_scratch.f[3] = 5627.925f; ((u8 *)&v10)[8] = 0; a = hero.motion.rot.f[2]; - ((s16 *)&v10)[5] = o->hA6; + ((s16 *)&v10)[5] = o->oclass; matrix_and_vector_scratch[0].f[0] = fast_cos(a) * 0.8f; matrix_and_vector_scratch[0].f[1] = fast_sin(a) * 0.8f; matrix_and_vector_scratch[0].f[2] = 0.55f; @@ -1605,7 +1558,7 @@ void update_hero_motion_by_state(void) { FUN_L14_0021c5c8(0.04f, 0.2f); FUN_L14_0021c5e0(0.04f, 0.2f); FUN_L14_0021c5f8(0.02f, 0.2f); - if (moby->b53 == 0x37) { + if (moby->prev_seq == 0x37) { a = hero.motion.yaw_error; if (a > 1.4f) { a = 1.4f; @@ -1618,7 +1571,7 @@ void update_hero_motion_by_state(void) { AN.f278 = a * 0.4f; AN.f274 = absolute_float(a) * -0.09f; AN.f270 = absolute_float(a) * 0.08f; - } else if (moby->b53 == 0x6D) { + } else if (moby->prev_seq == 0x6D) { f32 planar_direction_angle = fast_add_rotations( fast_subtract_rotations( fast_arc_tan(hero.motion.displacement.f[0], hero.motion.displacement.f[1]), @@ -1809,14 +1762,14 @@ void update_hero_motion_by_state(void) { f32 a; f32 k; fast_vec_sub(&vector_and_hit_descriptor_scratch, - &MV(hero.grind_look_moby)->u10.v10, + &MV(hero.grind_look_moby)->pos.v, &hero.motion.pos); transform_vector_by_basis(&vector_and_hit_descriptor_scratch, &vector_and_hit_descriptor_scratch, (Vec4 *)hero.inv_rot_matrix); a = fast_arc_tan(vector_and_hit_descriptor_scratch.f[0], vector_and_hit_descriptor_scratch.f[1]); - if (MV(hero.moby)->b52 == 0x31) { + if (MV(hero.moby)->seq == 0x31) { a = fast_subtract_rotations(a, 1.5707964f); AN.f278 = a * 0.3f; AN.f1C8 = a * 0.2f; @@ -1825,15 +1778,15 @@ void update_hero_motion_by_state(void) { AN.f278 = a * 0.3f; AN.f1C8 = a * 0.5f; } - } else if (MV(hero.moby)->b53 == 0x31) { + } else if (MV(hero.moby)->prev_seq == 0x31) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); - } else if (MV(hero.moby)->b53 == 0x4B) { + } else if (MV(hero.moby)->prev_seq == 0x4B) { AN.f278 = fast_add_rotations(0.13962634f, hero.rail_lean); AN.f118 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); AN.f1C8 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); - } else if (MV(hero.moby)->b53 == 0x4A) { + } else if (MV(hero.moby)->prev_seq == 0x4A) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); @@ -2632,7 +2585,7 @@ void update_hero_motion_by_state(void) { if (state_step_before_update != hero.state.step) { hero.step_frames = 0; } - if (anim != moby->b53) { + if (anim != moby->prev_seq) { hero.anim_seq_frames = 0; } } diff --git a/src/overlays/l15/hero/update_hero_motion_for_current_state.c b/src/overlays/l15/hero/update_hero_motion_for_current_state.c index 364d03bcc3..b6248bd0f7 100644 --- a/src/overlays/l15/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l15/hero/update_hero_motion_for_current_state.c @@ -349,52 +349,7 @@ s32 process_hero_incoming_hit(s32 apply_hit_reaction) { #include "rnc/math/vector.h" #include "rnc/math/fast_math.h" -struct MobyView { - u8 pad0[0xC]; - f32 fC; - union { - Vec4 v10; - f32 f10; - struct { - u8 pad[0x4]; - f32 v; - } f14; - struct { - u8 pad[0x8]; - f32 v; - } f18; - } u10; - u8 pad20[0x3]; - u8 b23; - u8 pad24[0xC]; - u8 b30; - u8 b31; - s16 h32; - union { - s32 i34; - u16 uh34; - } u34; - u8 pad38[0x8]; - union { - Vec4 v40; - struct { - u8 pad[0x8]; - f32 v; - } f48; - } u40; - u8 pad50[0x1]; - u8 b51; - u8 b52; - u8 b53; - u8 pad54[0x1C]; - u8 b70; - u8 pad71[0x7]; - struct MobyView *pm78; - u8 pad7C[0x2A]; - s16 hA6; - u8 padA8[0x18]; - Vec4 vC0; -}; +#include "rnc/overlay/shared/hero/hero_moby_view.h" struct PlayerJointTable { u8 pad0[0x60]; @@ -593,7 +548,7 @@ void update_hero_motion_for_current_state(void) { struct MobyView *moby = (struct MobyView *)hero.moby; s32 state_step_at_entry = hero.state.step; - s32 anim = moby->b53; + s32 anim = moby->prev_seq; f32 speed; Vec4 spatial_or_hit_descriptor_work; Vec4 v10; @@ -655,8 +610,8 @@ void update_hero_motion_for_current_state(void) { } } if (hero.state.current == HERO_STATE_CROUCH || hero.state.current == 0x17) { - if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->b53 == 0xE || - ((struct MobyView *)hero.moby)->b53 == 0xF) { + if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->prev_seq == 0xE || + ((struct MobyView *)hero.moby)->prev_seq == 0xF) { if (hero.state.current == HERO_STATE_CROUCH) { turn_to( 0, frame_scale_sq * 0.002f, frame_scale_sq * 0.07f, frame_time * 6.981317f); @@ -666,7 +621,7 @@ void update_hero_motion_for_current_state(void) { if (absolute_float(hero.motion.yaw_rate) > frame_time * 0.34906584f) { s32 neg = hero.motion.yaw_rate < 0.0f; s32 anim = neg + 0xE; - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(5)); } hero.anim_speed = @@ -682,7 +637,7 @@ void update_hero_motion_for_current_state(void) { if (hero.state.current == 0x17) { anim = get_hero_help_value(0); } - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(7)); } } @@ -696,15 +651,15 @@ void update_hero_motion_for_current_state(void) { } speed = frame_time_sq * 12.0f * s; hero.unk2290 = speed; - if (((struct MobyView *)hero.moby)->b52 == ((struct MobyView *)hero.moby)->b53 && - ((struct MobyView *)hero.moby)->b52 != 0x14) { + if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && + ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; - if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->b51 < 5.5f) { + if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->prev_frame < 5.5f) { adjust_hero_animation_speed_for_target_frame(13.0f, r, 0.5f, -1.0f); if (hero.anim_speed > 1.1f) { hero.anim_speed = 1.1f; } - } else if (((struct MobyView *)hero.moby)->b51 > 6.5f) { + } else if (((struct MobyView *)hero.moby)->prev_frame > 6.5f) { hero.anim_speed = 1.0f; } } @@ -943,7 +898,7 @@ void update_hero_motion_for_current_state(void) { spatial_or_hit_descriptor_tail_work.f[0] = 0.4f; transform_vector_by_basis(&spatial_or_hit_descriptor_tail_work, &spatial_or_hit_descriptor_tail_work, - &((struct MobyView *)pl->moby)->vC0); + &((struct MobyView *)pl->moby)->rot_row0); fast_vec_add(&spatial_or_hit_descriptor_work, &spatial_or_hit_descriptor_work, &spatial_or_hit_descriptor_tail_work); @@ -965,7 +920,7 @@ void update_hero_motion_for_current_state(void) { } if (hero.state.current == 0x35 && fast_dec_timer_s16(&hero.pack_particle_timer) != 0) { struct MobyView *gm = (struct MobyView *)hero.items[3].moby; - if (gm != NULL && gm->hA6 == 0x261) { + if (gm != NULL && gm->oclass == 0x261) { s32 i; for (i = 0; i < 4; i++) { moby_point_position(gm, i % 2, &spatial_or_hit_descriptor_work); @@ -973,7 +928,7 @@ void update_hero_motion_for_current_state(void) { spatial_or_hit_descriptor_tail_work.f[0] = -0.15f; transform_vector_by_basis(&spatial_or_hit_descriptor_tail_work, &spatial_or_hit_descriptor_tail_work, - &((struct MobyView *)hero.moby)->vC0); + &((struct MobyView *)hero.moby)->rot_row0); fast_vec_add(&spatial_or_hit_descriptor_work, &spatial_or_hit_descriptor_work, &spatial_or_hit_descriptor_tail_work); @@ -1079,7 +1034,7 @@ void update_hero_motion_for_current_state(void) { spatial_or_hit_descriptor_tail_work.f[0] = 0.4f; transform_vector_by_basis(&spatial_or_hit_descriptor_tail_work, &spatial_or_hit_descriptor_tail_work, - &((struct MobyView *)hero.moby)->vC0); + &((struct MobyView *)hero.moby)->rot_row0); fast_vec_add(&spatial_or_hit_descriptor_work, &spatial_or_hit_descriptor_work, &spatial_or_hit_descriptor_tail_work); @@ -1177,10 +1132,10 @@ void update_hero_motion_for_current_state(void) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } - if (anim != -1 && ((struct MobyView *)hero.moby)->b52 != 0x36) { + if (anim != -1 && ((struct MobyView *)hero.moby)->seq != 0x36) { set_hero_animation(anim, 0, frames); - } else if ((((struct MobyView *)hero.moby)->b70 & 2) && - ((struct MobyView *)hero.moby)->b52 == 0x36) { + } else if ((((struct MobyView *)hero.moby)->anim_flags & 2) && + ((struct MobyView *)hero.moby)->seq == 0x36) { s32 an = get_hero_help_value(0); set_hero_animation(an, 0, scale_game_frames(5)); } @@ -1203,15 +1158,15 @@ void update_hero_motion_for_current_state(void) { } if ((struct MobyView *)hero.grapple_target != NULL) { hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.15f, frame_time * 6.2831855f); } break; case HERO_STATE_APPROACH_TARGET_MOBY: { f32 hit; f32 hit2; - qcopy(&spatial_or_hit_descriptor_work, &((struct MobyView *)hero.grapple_target)->u10.v10); + qcopy(&spatial_or_hit_descriptor_work, &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &spatial_or_hit_descriptor_work); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { @@ -1220,8 +1175,8 @@ void update_hero_motion_for_current_state(void) { if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.03f, frame_scale_sq * 0.15f, frame_time * 7.330383f); } else if (hero.state.step == 1) { approach_value(&hero.grapple_pull_speed, 0.0f, frame_time_sq * 42.0f); @@ -1256,7 +1211,7 @@ void update_hero_motion_for_current_state(void) { &spatial_or_hit_descriptor_tail_work, &hero.motion.pos); fast_vec_sub(&v10, - &((struct MobyView *)hero.grapple_target)->u10.v10, + &((struct MobyView *)hero.grapple_target)->pos.v, &spatial_or_hit_descriptor_tail_work); fast_vec_normalize(&hero.motion.velocity, &v10, hero.grapple_pull_speed); if (scale_game_frames(30) > hero.target_arrival_frames) { @@ -1270,7 +1225,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.displacement); fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; - qcopy(&spatial_or_hit_descriptor_work, &((struct MobyView *)hero.grapple_target)->u10.v10); + qcopy(&spatial_or_hit_descriptor_work, &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &spatial_or_hit_descriptor_work); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&motion_work_vector, &v10, &spatial_or_hit_descriptor_work); @@ -1284,15 +1239,15 @@ void update_hero_motion_for_current_state(void) { case HERO_STATE_GRAPPLE_SWING_ENTRY: { f32 vz; s32 above; - if ((hero.anim_flags & 2) && moby->b53 == 0x34) { + if ((hero.anim_flags & 2) && moby->prev_seq == 0x34) { set_hero_animation(0x35, 10, scale_game_frames(12)); hero.anim_speed = 0.3f; } vz = hero.motion.velocity.f[2]; if ((struct MobyView *)hero.swing_target_moby != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78 != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78->u34.i34 != 0) { - f32 a = ((struct MobyView *)hero.swing_target_moby)->u40.f48.v; + ((struct MobyView *)hero.swing_target_moby)->pvars != NULL && + ((struct MobyView *)hero.swing_target_moby)->pvars->align_yaw != 0) { + f32 a = ((struct MobyView *)hero.swing_target_moby)->rot.z.v; if (fast_difference_between_rotations(a, hero.motion.rot.f[2]) > 90.0f) { a = fast_add_rotations(a, 3.1415927f); } @@ -1307,7 +1262,7 @@ void update_hero_motion_for_current_state(void) { hero.motion.move_yaw = hero.swing_yaw; turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.3f, frame_time * 4.712389f); fast_vec_sub(&spatial_or_hit_descriptor_work, - &((struct MobyView *)hero.swing_target_moby)->u10.v10, + &((struct MobyView *)hero.swing_target_moby)->pos.v, &hero.motion.pos); fast_vec_normalize(&spatial_or_hit_descriptor_work, &spatial_or_hit_descriptor_work, 1.0f); if (spatial_or_hit_descriptor_work.f[2] < 0.23f) { @@ -1341,7 +1296,7 @@ void update_hero_motion_for_current_state(void) { frame_scale_sq * 0.2f, frame_time * 9.599311f); above = 1; - if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { + if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->pos.z.v)) { above = 0; } if (hero.swing_hooked != 0) { @@ -1363,7 +1318,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10) < + &((struct MobyView *)hero.swing_target_moby)->pos.v) < hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( @@ -1371,7 +1326,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_entry_push != 0 && gravity_z(&hero.motion.velocity) > 0.0f) { fast_vec_sub(&motion_work_vector, &hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &((struct MobyView *)hero.swing_target_moby)->pos.v); add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 57.0f); } @@ -1382,12 +1337,12 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &motion_work_vector); } { - struct MobyView *r; + struct SwingTargetVars *r; if ((struct MobyView *)hero.swing_target_moby != NULL && - (r = ((struct MobyView *)hero.swing_target_moby)->pm78) != NULL) { + (r = ((struct MobyView *)hero.swing_target_moby)->pvars) != NULL) { f32 len = fast_vec_length(&hero.motion.velocity); - if (r->fC < len) { - approach_value(&len, r->fC, frame_time_sq * 15.0f); + if (r->max_speed < len) { + approach_value(&len, r->max_speed, frame_time_sq * 15.0f); fast_vec_normalize(&hero.motion.velocity, &hero.motion.velocity, len); } } @@ -1402,10 +1357,10 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&vD0, &vD0, &hero.motion.pos); fast_vec_add(&motion_work_vector, &vD0, &hero.motion.velocity); fast_vec_sub( - &vC0, &motion_work_vector, &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &vC0, &motion_work_vector, &((struct MobyView *)hero.swing_target_moby)->pos.v); fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add( - &motion_work_vector, &((struct MobyView *)hero.swing_target_moby)->u10.v10, &vC0); + &motion_work_vector, &((struct MobyView *)hero.swing_target_moby)->pos.v, &vC0); fast_vec_sub(&hero.motion.velocity, &motion_work_vector, &vD0); old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, @@ -1449,20 +1404,20 @@ void update_hero_motion_for_current_state(void) { up = forward_component(&motion_work_vector) > 0.0f; } if (up) { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 6, scale_game_frames(17)); hero.swing_anim_dir = 1; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(42.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } } else { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 0x15, scale_game_frames(9)); hero.swing_anim_dir = 2; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(12.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } @@ -1529,7 +1484,7 @@ void update_hero_motion_for_current_state(void) { hero.target_speed = 0.0f; if ((struct MobyView *)hero.melee_target != NULL) { f32 d = vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.melee_target)->u10.v10); + &((struct MobyView *)hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1662,7 +1617,7 @@ void update_hero_motion_for_current_state(void) { hero.target_speed = 0.0f; if ((struct MobyView *)hero.melee_target != NULL && scale_game_frames(4) > hero.state_timer) { - f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->u10.v10, + f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->pos.v, &hero.motion.pos) - 0.5f; f32 off; @@ -1815,7 +1770,7 @@ void update_hero_motion_for_current_state(void) { spatial_or_hit_descriptor_work.f[3] = 5627.925f; ((u8 *)&v10)[8] = 0; a = hero.motion.rot.f[2]; - ((s16 *)&v10)[5] = o->hA6; + ((s16 *)&v10)[5] = o->oclass; rotation_matrix_or_vector_work[0].f[0] = fast_cos(a) * 0.8f; rotation_matrix_or_vector_work[0].f[1] = fast_sin(a) * 0.8f; rotation_matrix_or_vector_work[0].f[2] = 0.55f; @@ -2597,7 +2552,8 @@ void update_hero_motion_for_current_state(void) { v10.f[3] = 5627.925f; ((u8 *)&spatial_or_hit_descriptor_tail_work)[8] = 7; ((u8 *)&spatial_or_hit_descriptor_tail_work)[9] = 1; - ((s16 *)&spatial_or_hit_descriptor_tail_work)[5] = ((struct MobyView *)hero.moby)->hA6; + ((s16 *)&spatial_or_hit_descriptor_tail_work)[5] = + ((struct MobyView *)hero.moby)->oclass; switch (hero.attack_record) { case HERO_ATTACK_RECORD_POINT_3_HIT_QUERY: if (hero.anim_frame > 7.0f && hero.anim_frame < 14.0f) { @@ -2697,7 +2653,7 @@ void update_hero_motion_for_current_state(void) { } else if (hero.anim_changing == 0 && hero.anim_frame <= 22.0f) { fast_vec_normalize(&spatial_or_hit_descriptor_work, &hero, 3.0f); spatial_or_hit_descriptor_work.f[2] += 5.0f; - add_vectors(&v10, &spatial_or_hit_descriptor_work, &moby->u10.v10); + add_vectors(&v10, &spatial_or_hit_descriptor_work, &moby->pos.v); set_giant_clank_charged_blast_position(moby, &spatial_or_hit_descriptor_work); hero.anim_speed = 0.5f; } @@ -2957,7 +2913,7 @@ void update_hero_motion_for_current_state(void) { if (state_step_at_entry != hero.state.step) { hero.step_frames = 0; } - if (anim != moby->b53) { + if (anim != moby->prev_seq) { hero.anim_seq_frames = 0; } } diff --git a/src/overlays/l16/hero/update_hero_motion_for_current_state.c b/src/overlays/l16/hero/update_hero_motion_for_current_state.c index 7adf037487..c3740807f4 100644 --- a/src/overlays/l16/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l16/hero/update_hero_motion_for_current_state.c @@ -28,54 +28,7 @@ #include "rnc/overlay/shared/rendering/effects/update_three_phase_effect_particle.h" #include "rnc/overlay/shared/hero/adjust_hero_pose_targets_from_motion.h" -struct MobyView { - u8 pad0[0xC]; - f32 fC; - union { - Vec4 v10; - f32 f10; - struct { - u8 pad[0x4]; - f32 v; - } f14; - struct { - u8 pad[0x8]; - f32 v; - } f18; - } u10; - u8 pad20[0x3]; - u8 b23; - u8 pad24[0xC]; - u8 b30; - u8 b31; - s16 h32; - union { - s32 i34; - u16 uh34; - } u34; - u8 pad38[0x8]; - union { - Vec4 v40; - struct { - u8 pad[0x8]; - f32 v; - } f48; - } u40; - u8 pad50[0x1]; - u8 b51; - u8 b52; - u8 b53; - u8 pad54[0x1C]; - u8 b70; - u8 pad71[0x7]; - struct MobyView *pm78; - u8 pad7C[0x2A]; - s16 hA6; - u8 padA8[0x14]; - u8 bBC; - u8 padBD[0x3]; - Vec4 vC0; -}; +#include "rnc/overlay/shared/hero/hero_moby_view.h" struct PlayerJointTable { u8 pad0[0x60]; @@ -275,7 +228,7 @@ void update_hero_motion_for_current_state(void) __asm__("FUN_L16_00214598"); void update_hero_motion_for_current_state(void) { struct MobyView *moby = (struct MobyView *)hero.moby; s32 state_step_at_entry = hero.state.step; - s32 anim = moby->b53; + s32 anim = moby->prev_seq; struct Hero *pl0; f32 speed; Vec4 primary_vector_scratch; @@ -338,8 +291,8 @@ void update_hero_motion_for_current_state(void) { } } if (hero.state.current == HERO_STATE_CROUCH || hero.state.current == 0x17) { - if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->b53 == 0xE || - ((struct MobyView *)hero.moby)->b53 == 0xF) { + if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->prev_seq == 0xE || + ((struct MobyView *)hero.moby)->prev_seq == 0xF) { if (hero.state.current == HERO_STATE_CROUCH) { turn_to( 0, frame_scale_sq * 0.002f, frame_scale_sq * 0.07f, frame_time * 6.981317f); @@ -349,7 +302,7 @@ void update_hero_motion_for_current_state(void) { if (absolute_float(hero.motion.yaw_rate) > frame_time * 0.34906584f) { s32 neg = hero.motion.yaw_rate < 0.0f; s32 anim = neg + 0xE; - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(5)); } hero.anim_speed = @@ -365,7 +318,7 @@ void update_hero_motion_for_current_state(void) { if (hero.state.current == 0x17) { anim = get_hero_idle_animation_index(0); } - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(7)); } } @@ -379,15 +332,15 @@ void update_hero_motion_for_current_state(void) { } speed = frame_time_sq * 12.0f * s; hero.unk2290 = speed; - if (((struct MobyView *)hero.moby)->b52 == ((struct MobyView *)hero.moby)->b53 && - ((struct MobyView *)hero.moby)->b52 != 0x14) { + if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && + ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; - if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->b51 < 5.5f) { + if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->prev_frame < 5.5f) { adjust_hero_animation_speed_for_target_frame(13.0f, r, 0.5f, -1.0f); if (hero.anim_speed > 1.1f) { hero.anim_speed = 1.1f; } - } else if (((struct MobyView *)hero.moby)->b51 > 6.5f) { + } else if (((struct MobyView *)hero.moby)->prev_frame > 6.5f) { hero.anim_speed = 1.0f; } } @@ -432,28 +385,28 @@ void update_hero_motion_for_current_state(void) { if (m == NULL) { goto drop; } - qcopy(&m->u10.v10, &hero.motion.pos); - qcopy(&m->u40.v40, &hero.motion.rot); - m->h32 = h40; - ((struct MobyView *)hero.sink_effect_moby)->b31 = 1; - ((struct MobyView *)hero.sink_effect_moby)->b30 = 0; - ((struct MobyView *)hero.sink_effect_moby)->b23 = 0; - ((struct MobyView *)hero.sink_effect_moby)->u34.uh34 |= 0x800; + qcopy(&m->pos.v, &hero.motion.pos); + qcopy(&m->rot.v, &hero.motion.rot); + m->draw_dist = h40; + ((struct MobyView *)hero.sink_effect_moby)->visible = 1; + ((struct MobyView *)hero.sink_effect_moby)->update_dist = 0; + ((struct MobyView *)hero.sink_effect_moby)->alpha = 0; + ((struct MobyView *)hero.sink_effect_moby)->flags |= 0x800; update_entity((struct MobyView *)hero.sink_effect_moby); allocate_voice_for_target_entry(0, 0, (struct MobyView *)hero.sink_effect_moby); } if ((struct MobyView *)hero.sink_effect_moby != NULL) { struct MobyView *m; struct MobyView *o; - ((struct MobyView *)hero.sink_effect_moby)->b23 += + ((struct MobyView *)hero.sink_effect_moby)->alpha += truncate_float_to_s32(frame_scale * 5.0f); - if (((struct MobyView *)hero.sink_effect_moby)->b23 > 0x80) { - ((struct MobyView *)hero.sink_effect_moby)->b23 = 0x80; + if (((struct MobyView *)hero.sink_effect_moby)->alpha > 0x80) { + ((struct MobyView *)hero.sink_effect_moby)->alpha = 0x80; } m = (struct MobyView *)hero.sink_effect_moby; o = (struct MobyView *)hero.moby; - qcopy(&m->u10.v10, &o->u10.v10); - qcopy(&m->u40.v40, &o->u40.v40); + qcopy(&m->pos.v, &o->pos.v); + qcopy(&m->rot.v, &o->rot.v); update_entity(m); } drop: @@ -665,7 +618,7 @@ void update_hero_motion_for_current_state(void) { auxiliary_vector_scratch.f[0] = 0.4f; transform_vector_by_basis(&auxiliary_vector_scratch, &auxiliary_vector_scratch, - &((struct MobyView *)pl->moby)->vC0); + &((struct MobyView *)pl->moby)->rot_row0); fast_vec_add( &primary_vector_scratch, &primary_vector_scratch, &auxiliary_vector_scratch); qcopy(&v10, &hero_b.motion.displacement); @@ -685,7 +638,7 @@ void update_hero_motion_for_current_state(void) { } if (hero.state.current == 0x35 && fast_dec_timer_s16(&hero.pack_particle_timer) != 0) { struct MobyView *gm = (struct MobyView *)hero.items[3].moby; - if (gm != NULL && gm->hA6 == 0x261) { + if (gm != NULL && gm->oclass == 0x261) { s32 i; for (i = 0; i < 4; i++) { moby_point_position(gm, i % 2, &primary_vector_scratch); @@ -693,7 +646,7 @@ void update_hero_motion_for_current_state(void) { auxiliary_vector_scratch.f[0] = -0.15f; transform_vector_by_basis(&auxiliary_vector_scratch, &auxiliary_vector_scratch, - &((struct MobyView *)hero.moby)->vC0); + &((struct MobyView *)hero.moby)->rot_row0); fast_vec_add(&primary_vector_scratch, &primary_vector_scratch, &auxiliary_vector_scratch); @@ -799,7 +752,7 @@ void update_hero_motion_for_current_state(void) { auxiliary_vector_scratch.f[0] = 0.4f; transform_vector_by_basis(&auxiliary_vector_scratch, &auxiliary_vector_scratch, - &((struct MobyView *)hero.moby)->vC0); + &((struct MobyView *)hero.moby)->rot_row0); fast_vec_add( &primary_vector_scratch, &primary_vector_scratch, &auxiliary_vector_scratch); qcopy(&v10, &hero.motion.displacement); @@ -1111,7 +1064,7 @@ void update_hero_motion_for_current_state(void) { fast_dec_timer(&hero.boost_frames); } if ((struct MobyView *)hero.hoverboard_moby != NULL) { - ((struct MobyView *)hero.hoverboard_moby)->bBC = 1; + ((struct MobyView *)hero.hoverboard_moby)->command = 1; } } else { hero.board_boost_active = 0; @@ -1259,7 +1212,7 @@ void update_hero_motion_for_current_state(void) { fast_vec_scale(&v10, &hero.motion.displacement, 7.0f); for (i = 0; i < n; i++) { if (is_moby_in_class_range_500_to_540(D_L16_00178300[i]) != 0 || - ((struct MobyView *)D_L16_00178300[i])->hA6 == 0x85) { + ((struct MobyView *)D_L16_00178300[i])->oclass == 0x85) { spawn_nearby_effect(D_L16_00178300[i], (struct MobyView *)hero.moby, 0x10000, @@ -1278,7 +1231,7 @@ void update_hero_motion_for_current_state(void) { s32 n; s32 k; if (m != NULL) { - m->bBC = 2; + m->command = 2; } len = vector_length_xy(&hero.motion.velocity); approach_value(&len, 0.0f, frame_time_sq * 15.0f); @@ -1308,7 +1261,7 @@ void update_hero_motion_for_current_state(void) { case HERO_STATE_HOVERBOARD_RESPAWN_POSITION_OR_TIMEOUT_WAIT: { struct MobyView *m = (struct MobyView *)hero.hoverboard_moby; if (m != NULL) { - m->bBC = 2; + m->command = 2; } clear_u64_value(&hero.motion.velocity); reduce_and_apply_hero_planar_velocity_addend(frame_time_sq * 4.5f); @@ -1345,10 +1298,10 @@ void update_hero_motion_for_current_state(void) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } - if (anim != -1 && ((struct MobyView *)hero.moby)->b52 != 0x36) { + if (anim != -1 && ((struct MobyView *)hero.moby)->seq != 0x36) { set_hero_animation(anim, 0, frames); - } else if ((((struct MobyView *)hero.moby)->b70 & 2) && - ((struct MobyView *)hero.moby)->b52 == 0x36) { + } else if ((((struct MobyView *)hero.moby)->anim_flags & 2) && + ((struct MobyView *)hero.moby)->seq == 0x36) { s32 an = get_hero_idle_animation_index(0); set_hero_animation(an, 0, scale_game_frames(5)); } @@ -1371,15 +1324,15 @@ void update_hero_motion_for_current_state(void) { } if ((struct MobyView *)hero.grapple_target != NULL) { hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.15f, frame_time * 6.2831855f); } break; case HERO_STATE_APPROACH_TARGET_MOBY: { f32 hit; f32 hit2; - qcopy(&primary_vector_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); + qcopy(&primary_vector_scratch, &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &primary_vector_scratch); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { @@ -1388,8 +1341,8 @@ void update_hero_motion_for_current_state(void) { if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.03f, frame_scale_sq * 0.15f, frame_time * 7.330383f); } else if (hero.state.step == 1) { approach_value(&hero.grapple_pull_speed, 0.0f, frame_time_sq * 42.0f); @@ -1422,7 +1375,7 @@ void update_hero_motion_for_current_state(void) { auxiliary_vector_scratch.f[2] = 0.0f; fast_vec_add(&auxiliary_vector_scratch, &auxiliary_vector_scratch, &hero.motion.pos); fast_vec_sub( - &v10, &((struct MobyView *)hero.grapple_target)->u10.v10, &auxiliary_vector_scratch); + &v10, &((struct MobyView *)hero.grapple_target)->pos.v, &auxiliary_vector_scratch); fast_vec_normalize(&hero.motion.velocity, &v10, hero.grapple_pull_speed); if (scale_game_frames(30) > hero.target_arrival_frames) { f32 t = scale_game_frames(30) - hero.target_arrival_frames; @@ -1435,7 +1388,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.displacement); fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; - qcopy(&primary_vector_scratch, &((struct MobyView *)hero.grapple_target)->u10.v10); + qcopy(&primary_vector_scratch, &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &primary_vector_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&vector_scratch, &v10, &primary_vector_scratch); @@ -1447,15 +1400,15 @@ void update_hero_motion_for_current_state(void) { case HERO_STATE_GRAPPLE_SWING_ENTRY: { f32 vz; s32 above; - if ((hero.anim_flags & 2) && moby->b53 == 0x34) { + if ((hero.anim_flags & 2) && moby->prev_seq == 0x34) { set_hero_animation(0x35, 10, scale_game_frames(12)); hero.anim_speed = 0.3f; } vz = hero.motion.velocity.f[2]; if ((struct MobyView *)hero.swing_target_moby != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78 != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78->u34.i34 != 0) { - f32 a = ((struct MobyView *)hero.swing_target_moby)->u40.f48.v; + ((struct MobyView *)hero.swing_target_moby)->pvars != NULL && + ((struct MobyView *)hero.swing_target_moby)->pvars->align_yaw != 0) { + f32 a = ((struct MobyView *)hero.swing_target_moby)->rot.z.v; if (fast_difference_between_rotations(a, hero.motion.rot.f[2]) > 90.0f) { a = fast_add_rotations(a, 3.1415927f); } @@ -1470,7 +1423,7 @@ void update_hero_motion_for_current_state(void) { hero.motion.move_yaw = hero.swing_yaw; turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.3f, frame_time * 4.712389f); fast_vec_sub(&primary_vector_scratch, - &((struct MobyView *)hero.swing_target_moby)->u10.v10, + &((struct MobyView *)hero.swing_target_moby)->pos.v, &hero.motion.pos); fast_vec_normalize(&primary_vector_scratch, &primary_vector_scratch, 1.0f); if (primary_vector_scratch.f[2] < 0.23f) { @@ -1502,7 +1455,7 @@ void update_hero_motion_for_current_state(void) { frame_scale_sq * 0.2f, frame_time * 9.599311f); above = 1; - if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { + if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->pos.z.v)) { above = 0; } if (hero.swing_hooked != 0) { @@ -1525,7 +1478,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10) < + &((struct MobyView *)hero.swing_target_moby)->pos.v) < hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( @@ -1533,7 +1486,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_entry_push != 0 && gravity_z(&hero.motion.velocity) > 0.0f) { fast_vec_sub(&matrix_vector_workspace[3], &hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &((struct MobyView *)hero.swing_target_moby)->pos.v); add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 57.0f); } @@ -1544,12 +1497,12 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &matrix_vector_workspace[3]); } { - struct MobyView *r; + struct SwingTargetVars *r; if ((struct MobyView *)hero.swing_target_moby != NULL && - (r = ((struct MobyView *)hero.swing_target_moby)->pm78) != NULL) { + (r = ((struct MobyView *)hero.swing_target_moby)->pvars) != NULL) { f32 len = fast_vec_length(&hero.motion.velocity); - if (r->fC < len) { - approach_value(&len, r->fC, frame_time_sq * 15.0f); + if (r->max_speed < len) { + approach_value(&len, r->max_speed, frame_time_sq * 15.0f); fast_vec_normalize(&hero.motion.velocity, &hero.motion.velocity, len); } } @@ -1565,10 +1518,10 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&matrix_vector_workspace[3], &vD0, &hero.motion.velocity); fast_vec_sub(&vC0, &matrix_vector_workspace[3], - &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &((struct MobyView *)hero.swing_target_moby)->pos.v); fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&matrix_vector_workspace[3], - &((struct MobyView *)hero.swing_target_moby)->u10.v10, + &((struct MobyView *)hero.swing_target_moby)->pos.v, &vC0); fast_vec_sub(&hero.motion.velocity, &matrix_vector_workspace[3], &vD0); old = hero.swing_rope_length; @@ -1614,20 +1567,20 @@ void update_hero_motion_for_current_state(void) { up = forward_component(&matrix_vector_workspace[3]) > 0.0f; } if (up) { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 6, scale_game_frames(17)); hero.swing_anim_dir = 1; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(42.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } } else { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 0x15, scale_game_frames(9)); hero.swing_anim_dir = 2; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(12.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } @@ -1691,7 +1644,7 @@ void update_hero_motion_for_current_state(void) { hero.target_speed = 0.0f; if ((struct MobyView *)hero.melee_target != NULL) { f32 d = vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.melee_target)->u10.v10); + &((struct MobyView *)hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1821,7 +1774,7 @@ void update_hero_motion_for_current_state(void) { hero.target_speed = 0.0f; if ((struct MobyView *)hero.melee_target != NULL && scale_game_frames(4) > hero.state_timer) { - f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->u10.v10, + f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->pos.v, &hero.motion.pos) - 0.5f; f32 off; @@ -1974,7 +1927,7 @@ void update_hero_motion_for_current_state(void) { primary_vector_scratch.f[3] = 5627.925f; ((u8 *)&v10)[8] = 0; a = hero.motion.rot.f[2]; - ((s16 *)&v10)[5] = o->hA6; + ((s16 *)&v10)[5] = o->oclass; vector_matrix_scratch[0].f[0] = fast_cos(a) * 0.8f; vector_matrix_scratch[0].f[1] = fast_sin(a) * 0.8f; vector_matrix_scratch[0].f[2] = 0.55f; @@ -2411,13 +2364,13 @@ void update_hero_motion_for_current_state(void) { f32 a; f32 k; fast_vec_sub(&auxiliary_vector_scratch, - &((struct MobyView *)hero.grind_look_moby)->u10.v10, + &((struct MobyView *)hero.grind_look_moby)->pos.v, &hero.motion.pos); transform_vector_by_basis(&auxiliary_vector_scratch, &auxiliary_vector_scratch, (Vec4 *)hero.inv_rot_matrix); a = fast_arc_tan(auxiliary_vector_scratch.f[0], auxiliary_vector_scratch.f[1]); - if (((struct MobyView *)hero.moby)->b52 == 0x31) { + if (((struct MobyView *)hero.moby)->seq == 0x31) { a = fast_subtract_rotations(a, 1.5707964f); AN.f278 = a * 0.3f; AN.f1C8 = a * 0.2f; @@ -2426,15 +2379,15 @@ void update_hero_motion_for_current_state(void) { AN.f278 = a * 0.3f; AN.f1C8 = a * 0.5f; } - } else if (((struct MobyView *)hero.moby)->b53 == 0x31) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x31) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); - } else if (((struct MobyView *)hero.moby)->b53 == 0x4B) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x4B) { AN.f278 = fast_add_rotations(0.13962634f, hero.rail_lean); AN.f118 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); AN.f1C8 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); - } else if (((struct MobyView *)hero.moby)->b53 == 0x4A) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x4A) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); @@ -3219,7 +3172,7 @@ void update_hero_motion_for_current_state(void) { if (state_step_at_entry != hero.state.step) { hero.step_frames = 0; } - if (anim != moby->b53) { + if (anim != moby->prev_seq) { hero.anim_seq_frames = 0; } } diff --git a/src/overlays/l17/hero/update_hero_motion_for_current_state.c b/src/overlays/l17/hero/update_hero_motion_for_current_state.c index a9bc00821e..5710f93811 100644 --- a/src/overlays/l17/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l17/hero/update_hero_motion_for_current_state.c @@ -28,52 +28,7 @@ #include "rnc/overlay/shared/rendering/effects/update_three_phase_effect_particle.h" #include "rnc/overlay/shared/hero/adjust_hero_pose_targets_from_motion.h" -struct MobyView { - u8 pad0[0xC]; - f32 fC; - union { - Vec4 v10; - f32 f10; - struct { - u8 pad[0x4]; - f32 v; - } f14; - struct { - u8 pad[0x8]; - f32 v; - } f18; - } u10; - u8 pad20[0x3]; - u8 b23; - u8 pad24[0xC]; - u8 b30; - u8 b31; - s16 h32; - union { - s32 i34; - u16 uh34; - } u34; - u8 pad38[0x8]; - union { - Vec4 v40; - struct { - u8 pad[0x8]; - f32 v; - } f48; - } u40; - u8 pad50[0x1]; - u8 b51; - u8 b52; - u8 b53; - u8 pad54[0x1C]; - u8 b70; - u8 pad71[0x7]; - struct MobyView *pm78; - u8 pad7C[0x2A]; - s16 hA6; - u8 padA8[0x18]; - Vec4 vC0; -}; +#include "rnc/overlay/shared/hero/hero_moby_view.h" struct PlayerJointTable { u8 pad0[0x60]; @@ -262,7 +217,7 @@ void update_hero_motion_for_current_state(void) __asm__("FUN_L17_00214760"); void update_hero_motion_for_current_state(void) { struct MobyView *moby = (struct MobyView *)hero.moby; s32 initial_state_step = hero.state.step; - s32 anim = moby->b53; + s32 anim = moby->prev_seq; f32 speed; Vec4 scratch_vector; Vec4 v10; @@ -328,8 +283,8 @@ void update_hero_motion_for_current_state(void) { } } if (hero.state.current == HERO_STATE_CROUCH || hero.state.current == 0x17) { - if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->b53 == 0xE || - ((struct MobyView *)hero.moby)->b53 == 0xF) { + if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->prev_seq == 0xE || + ((struct MobyView *)hero.moby)->prev_seq == 0xF) { if (hero.state.current == HERO_STATE_CROUCH) { turn_to( 0, frame_scale_sq * 0.002f, frame_scale_sq * 0.07f, frame_time * 6.981317f); @@ -339,7 +294,7 @@ void update_hero_motion_for_current_state(void) { if (absolute_float(hero.motion.yaw_rate) > frame_time * 0.34906584f) { s32 neg = hero.motion.yaw_rate < 0.0f; s32 anim = neg + 0xE; - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(5)); } hero.anim_speed = @@ -355,7 +310,7 @@ void update_hero_motion_for_current_state(void) { if (hero.state.current == 0x17) { anim = select_hero_help_value(0); } - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(7)); } } @@ -369,15 +324,15 @@ void update_hero_motion_for_current_state(void) { } speed = frame_time_sq * 12.0f * s; hero.unk2290 = speed; - if (((struct MobyView *)hero.moby)->b52 == ((struct MobyView *)hero.moby)->b53 && - ((struct MobyView *)hero.moby)->b52 != 0x14) { + if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && + ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; - if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->b51 < 5.5f) { + if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->prev_frame < 5.5f) { adjust_hero_animation_speed_for_target_frame(13.0f, r, 0.5f, -1.0f); if (hero.anim_speed > 1.1f) { hero.anim_speed = 1.1f; } - } else if (((struct MobyView *)hero.moby)->b51 > 6.5f) { + } else if (((struct MobyView *)hero.moby)->prev_frame > 6.5f) { hero.anim_speed = 1.0f; } } @@ -429,28 +384,28 @@ void update_hero_motion_for_current_state(void) { if (m == NULL) { goto drop; } - qcopy(&m->u10.v10, &hero.motion.pos); - qcopy(&m->u40.v40, &hero.motion.rot); - m->h32 = h40; - ((struct MobyView *)hero.sink_effect_moby)->b31 = 1; - ((struct MobyView *)hero.sink_effect_moby)->b30 = 0; - ((struct MobyView *)hero.sink_effect_moby)->b23 = 0; - ((struct MobyView *)hero.sink_effect_moby)->u34.uh34 |= 0x800; + qcopy(&m->pos.v, &hero.motion.pos); + qcopy(&m->rot.v, &hero.motion.rot); + m->draw_dist = h40; + ((struct MobyView *)hero.sink_effect_moby)->visible = 1; + ((struct MobyView *)hero.sink_effect_moby)->update_dist = 0; + ((struct MobyView *)hero.sink_effect_moby)->alpha = 0; + ((struct MobyView *)hero.sink_effect_moby)->flags |= 0x800; update_entity((struct MobyView *)hero.sink_effect_moby); allocate_voice_for_target_entry(0, 0, (struct MobyView *)hero.sink_effect_moby); } if ((struct MobyView *)hero.sink_effect_moby != NULL) { struct MobyView *m; struct MobyView *o; - ((struct MobyView *)hero.sink_effect_moby)->b23 += + ((struct MobyView *)hero.sink_effect_moby)->alpha += truncate_float_to_s32(frame_scale * 5.0f); - if (((struct MobyView *)hero.sink_effect_moby)->b23 > 0x80) { - ((struct MobyView *)hero.sink_effect_moby)->b23 = 0x80; + if (((struct MobyView *)hero.sink_effect_moby)->alpha > 0x80) { + ((struct MobyView *)hero.sink_effect_moby)->alpha = 0x80; } m = (struct MobyView *)hero.sink_effect_moby; o = (struct MobyView *)hero.moby; - qcopy(&m->u10.v10, &o->u10.v10); - qcopy(&m->u40.v40, &o->u40.v40); + qcopy(&m->pos.v, &o->pos.v); + qcopy(&m->rot.v, &o->rot.v); update_entity(m); } drop: @@ -662,7 +617,7 @@ void update_hero_motion_for_current_state(void) { vector_workspace.q = 0; vector_workspace.f[0] = 0.4f; transform_vector_by_basis( - &vector_workspace, &vector_workspace, &((struct MobyView *)pl->moby)->vC0); + &vector_workspace, &vector_workspace, &((struct MobyView *)pl->moby)->rot_row0); fast_vec_add(&scratch_vector, &scratch_vector, &vector_workspace); qcopy(&v10, &hero_b.motion.displacement); fast_vec_normalize(&vector_workspace, &vector_workspace, frame_time * 1.5f); @@ -680,7 +635,7 @@ void update_hero_motion_for_current_state(void) { } if (hero.state.current == 0x35 && fast_dec_timer_s16(&hero.pack_particle_timer) != 0) { struct MobyView *gm = (struct MobyView *)hero.items[3].moby; - if (gm != NULL && gm->hA6 == 0x261) { + if (gm != NULL && gm->oclass == 0x261) { s32 i; for (i = 0; i < 4; i++) { moby_point_position(gm, i % 2, &scratch_vector); @@ -688,7 +643,7 @@ void update_hero_motion_for_current_state(void) { vector_workspace.f[0] = -0.15f; transform_vector_by_basis(&vector_workspace, &vector_workspace, - &((struct MobyView *)hero.moby)->vC0); + &((struct MobyView *)hero.moby)->rot_row0); fast_vec_add(&scratch_vector, &scratch_vector, &vector_workspace); scratch_vector.f[0] += random_float_between(0.0f, 0.03f); scratch_vector.f[1] += random_float_between(0.0f, 0.03f); @@ -789,7 +744,7 @@ void update_hero_motion_for_current_state(void) { vector_workspace.q = 0; vector_workspace.f[0] = 0.4f; transform_vector_by_basis( - &vector_workspace, &vector_workspace, &((struct MobyView *)hero.moby)->vC0); + &vector_workspace, &vector_workspace, &((struct MobyView *)hero.moby)->rot_row0); fast_vec_add(&scratch_vector, &scratch_vector, &vector_workspace); qcopy(&v10, &hero.motion.displacement); fast_vec_normalize(&vector_workspace, &vector_workspace, frame_time * 1.5f); @@ -866,15 +821,15 @@ void update_hero_motion_for_current_state(void) { case 0x39: case HERO_STATE_ANIMATION_WAIT_TO_IDLE: if ((struct MobyView *)hero.ground_moby != NULL && - ((struct MobyView *)hero.ground_moby)->hA6 == 0x155) { + ((struct MobyView *)hero.ground_moby)->oclass == 0x155) { f32 d; f32 yaw_step_limit_or_path_cruise_speed; clear_u64_value(&scratch_vector); fast_vec_add( - &scratch_vector, &scratch_vector, &((struct MobyView *)hero.ground_moby)->u10.v10); + &scratch_vector, &scratch_vector, &((struct MobyView *)hero.ground_moby)->pos.v); fast_vec_sub(&hero.motion.velocity, &scratch_vector, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 2.0f); - d = fast_subtract_rotations(((struct MobyView *)hero.ground_moby)->u40.f48.v, + d = fast_subtract_rotations(((struct MobyView *)hero.ground_moby)->rot.z.v, hero.motion.rot.f[2]); yaw_step_limit_or_path_cruise_speed = frame_time * 9.424778f; if (d > yaw_step_limit_or_path_cruise_speed) { @@ -906,10 +861,10 @@ void update_hero_motion_for_current_state(void) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } - if (anim != -1 && ((struct MobyView *)hero.moby)->b52 != 0x36) { + if (anim != -1 && ((struct MobyView *)hero.moby)->seq != 0x36) { set_hero_animation(anim, 0, frames); - } else if ((((struct MobyView *)hero.moby)->b70 & 2) && - ((struct MobyView *)hero.moby)->b52 == 0x36) { + } else if ((((struct MobyView *)hero.moby)->anim_flags & 2) && + ((struct MobyView *)hero.moby)->seq == 0x36) { s32 an = select_hero_help_value(0); set_hero_animation(an, 0, scale_game_frames(5)); } @@ -932,15 +887,15 @@ void update_hero_motion_for_current_state(void) { } if ((struct MobyView *)hero.grapple_target != NULL) { hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.15f, frame_time * 6.2831855f); } break; case HERO_STATE_APPROACH_TARGET_MOBY: { f32 hit; f32 hit2; - qcopy(&scratch_vector, &((struct MobyView *)hero.grapple_target)->u10.v10); + qcopy(&scratch_vector, &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &scratch_vector); hero.target_arrival_frames = scale_game_frames(60); if (hero.grapple_pull_speed > 0.0f) { @@ -949,8 +904,8 @@ void update_hero_motion_for_current_state(void) { if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.03f, frame_scale_sq * 0.15f, frame_time * 7.330383f); } else if (hero.state.step == 1) { approach_value(&hero.grapple_pull_speed, 0.0f, frame_time_sq * 42.0f); @@ -982,7 +937,7 @@ void update_hero_motion_for_current_state(void) { fast_sin(fast_add_rotations(hero.motion.rot.f[2], -1.5707964f)) * -0.57f; vector_workspace.f[2] = 0.0f; fast_vec_add(&vector_workspace, &vector_workspace, &hero.motion.pos); - fast_vec_sub(&v10, &((struct MobyView *)hero.grapple_target)->u10.v10, &vector_workspace); + fast_vec_sub(&v10, &((struct MobyView *)hero.grapple_target)->pos.v, &vector_workspace); fast_vec_normalize(&hero.motion.velocity, &v10, hero.grapple_pull_speed); if (scale_game_frames(30) > hero.target_arrival_frames) { f32 t = scale_game_frames(30) - hero.target_arrival_frames; @@ -995,7 +950,7 @@ void update_hero_motion_for_current_state(void) { qcopy(&hero.motion.velocity, &hero.motion.displacement); fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; - qcopy(&scratch_vector, &((struct MobyView *)hero.grapple_target)->u10.v10); + qcopy(&scratch_vector, &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &scratch_vector); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); fast_vec_sub(&temporary_vector, &v10, &scratch_vector); @@ -1007,15 +962,15 @@ void update_hero_motion_for_current_state(void) { case HERO_STATE_GRAPPLE_SWING_ENTRY: { f32 vz; s32 above; - if ((hero.anim_flags & 2) && moby->b53 == 0x34) { + if ((hero.anim_flags & 2) && moby->prev_seq == 0x34) { set_hero_animation(0x35, 10, scale_game_frames(12)); hero.anim_speed = 0.3f; } vz = hero.motion.velocity.f[2]; if ((struct MobyView *)hero.swing_target_moby != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78 != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78->u34.i34 != 0) { - f32 a = ((struct MobyView *)hero.swing_target_moby)->u40.f48.v; + ((struct MobyView *)hero.swing_target_moby)->pvars != NULL && + ((struct MobyView *)hero.swing_target_moby)->pvars->align_yaw != 0) { + f32 a = ((struct MobyView *)hero.swing_target_moby)->rot.z.v; if (fast_difference_between_rotations(a, hero.motion.rot.f[2]) > 90.0f) { a = fast_add_rotations(a, 3.1415927f); } @@ -1029,9 +984,8 @@ void update_hero_motion_for_current_state(void) { } hero.motion.move_yaw = hero.swing_yaw; turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.3f, frame_time * 4.712389f); - fast_vec_sub(&scratch_vector, - &((struct MobyView *)hero.swing_target_moby)->u10.v10, - &hero.motion.pos); + fast_vec_sub( + &scratch_vector, &((struct MobyView *)hero.swing_target_moby)->pos.v, &hero.motion.pos); fast_vec_normalize(&scratch_vector, &scratch_vector, 1.0f); if (scratch_vector.f[2] < 0.23f) { scratch_vector.f[2] = 0.23f; @@ -1060,7 +1014,7 @@ void update_hero_motion_for_current_state(void) { frame_scale_sq * 0.2f, frame_time * 9.599311f); above = 1; - if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { + if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->pos.z.v)) { above = 0; } if (hero.swing_hooked != 0) { @@ -1082,7 +1036,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10) < + &((struct MobyView *)hero.swing_target_moby)->pos.v) < hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( @@ -1090,7 +1044,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_entry_push != 0 && gravity_z(&hero.motion.velocity) > 0.0f) { fast_vec_sub(&temporary_vector, &hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &((struct MobyView *)hero.swing_target_moby)->pos.v); add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 57.0f); } @@ -1101,12 +1055,12 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&hero.motion.velocity, &hero.motion.velocity, &temporary_vector); } { - struct MobyView *r; + struct SwingTargetVars *r; if ((struct MobyView *)hero.swing_target_moby != NULL && - (r = ((struct MobyView *)hero.swing_target_moby)->pm78) != NULL) { + (r = ((struct MobyView *)hero.swing_target_moby)->pvars) != NULL) { f32 len = fast_vec_length(&hero.motion.velocity); - if (r->fC < len) { - approach_value(&len, r->fC, frame_time_sq * 15.0f); + if (r->max_speed < len) { + approach_value(&len, r->max_speed, frame_time_sq * 15.0f); fast_vec_normalize(&hero.motion.velocity, &hero.motion.velocity, len); } } @@ -1121,10 +1075,10 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&vD0, &vD0, &hero.motion.pos); fast_vec_add(&temporary_vector, &vD0, &hero.motion.velocity); fast_vec_sub( - &vC0, &temporary_vector, &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &vC0, &temporary_vector, &((struct MobyView *)hero.swing_target_moby)->pos.v); fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add( - &temporary_vector, &((struct MobyView *)hero.swing_target_moby)->u10.v10, &vC0); + &temporary_vector, &((struct MobyView *)hero.swing_target_moby)->pos.v, &vC0); fast_vec_sub(&hero.motion.velocity, &temporary_vector, &vD0); old = hero.swing_rope_length; vendor_spring(&hero.swing_rope_length, @@ -1168,20 +1122,20 @@ void update_hero_motion_for_current_state(void) { up = forward_component(&temporary_vector) > 0.0f; } if (up) { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 6, scale_game_frames(17)); hero.swing_anim_dir = 1; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(42.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } } else { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 0x15, scale_game_frames(9)); hero.swing_anim_dir = 2; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(12.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } @@ -1246,7 +1200,7 @@ void update_hero_motion_for_current_state(void) { if (hero.on_ice_ground != 0) { if ((struct MobyView *)hero.melee_target != NULL) { f32 d = vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.melee_target)->u10.v10); + &((struct MobyView *)hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1261,7 +1215,7 @@ void update_hero_motion_for_current_state(void) { } else { if ((struct MobyView *)hero.melee_target != NULL) { f32 d = vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.melee_target)->u10.v10); + &((struct MobyView *)hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1409,7 +1363,7 @@ void update_hero_motion_for_current_state(void) { hero.target_speed = 0.0f; if ((struct MobyView *)hero.melee_target != NULL && scale_game_frames(4) > hero.state_timer) { - f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->u10.v10, + f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->pos.v, &hero.motion.pos) - 0.5f; f32 off; @@ -1573,7 +1527,7 @@ void update_hero_motion_for_current_state(void) { scratch_vector.f[3] = 5627.925f; ((u8 *)&v10)[8] = 0; a = hero.motion.rot.f[2]; - ((s16 *)&v10)[5] = o->hA6; + ((s16 *)&v10)[5] = o->oclass; matrix_vector_workspace[0].f[0] = fast_cos(a) * 0.8f; matrix_vector_workspace[0].f[1] = fast_sin(a) * 0.8f; matrix_vector_workspace[0].f[2] = 0.55f; @@ -1786,7 +1740,7 @@ void update_hero_motion_for_current_state(void) { FUN_L17_00207150(0.04f, 0.2f); FUN_L17_00207168(0.04f, 0.2f); FUN_L17_00207180(0.02f, 0.2f); - if (moby->b53 == 0x37) { + if (moby->prev_seq == 0x37) { a = hero.motion.yaw_error; if (a > 1.4f) { a = 1.4f; @@ -1799,7 +1753,7 @@ void update_hero_motion_for_current_state(void) { AN.f278 = a * 0.4f; AN.f274 = absolute_float(a) * -0.09f; AN.f270 = absolute_float(a) * 0.08f; - } else if (moby->b53 == 0x6D) { + } else if (moby->prev_seq == 0x6D) { f32 planar_direction_angle = fast_add_rotations( fast_subtract_rotations( fast_arc_tan(hero.motion.displacement.f[0], hero.motion.displacement.f[1]), @@ -2050,12 +2004,12 @@ void update_hero_motion_for_current_state(void) { f32 a; f32 k; fast_vec_sub(&vector_workspace, - &((struct MobyView *)hero.grind_look_moby)->u10.v10, + &((struct MobyView *)hero.grind_look_moby)->pos.v, &hero.motion.pos); transform_vector_by_basis( &vector_workspace, &vector_workspace, (Vec4 *)hero.inv_rot_matrix); a = fast_arc_tan(vector_workspace.f[0], vector_workspace.f[1]); - if (((struct MobyView *)hero.moby)->b52 == 0x31) { + if (((struct MobyView *)hero.moby)->seq == 0x31) { a = fast_subtract_rotations(a, 1.5707964f); AN.f278 = a * 0.3f; AN.f1C8 = a * 0.2f; @@ -2064,15 +2018,15 @@ void update_hero_motion_for_current_state(void) { AN.f278 = a * 0.3f; AN.f1C8 = a * 0.5f; } - } else if (((struct MobyView *)hero.moby)->b53 == 0x31) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x31) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); - } else if (((struct MobyView *)hero.moby)->b53 == 0x4B) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x4B) { AN.f278 = fast_add_rotations(0.13962634f, hero.rail_lean); AN.f118 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); AN.f1C8 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); - } else if (((struct MobyView *)hero.moby)->b53 == 0x4A) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x4A) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); @@ -2282,7 +2236,7 @@ void update_hero_motion_for_current_state(void) { s32 idx; s32 n; compute_hero_fixed_offset_world_position(&scratch_vector); - if (((struct MobyView *)hero.moby)->b53 == 0x66) { + if (((struct MobyView *)hero.moby)->prev_seq == 0x66) { release_voice_slot_cf(0, (struct MobyView *)hero.moby, 0); if (D_L17_0015F5CC & 1) { f32 a; @@ -3200,7 +3154,7 @@ void update_hero_motion_for_current_state(void) { if (initial_state_step != hero.state.step) { hero.step_frames = 0; } - if (anim != moby->b53) { + if (anim != moby->prev_seq) { hero.anim_seq_frames = 0; } } diff --git a/src/overlays/l18/hero/update_hero_motion_for_current_state.c b/src/overlays/l18/hero/update_hero_motion_for_current_state.c index f26decd7bf..a0761fc8da 100644 --- a/src/overlays/l18/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l18/hero/update_hero_motion_for_current_state.c @@ -28,52 +28,7 @@ #include "rnc/overlay/shared/rendering/effects/update_three_phase_effect_particle.h" #include "rnc/overlay/shared/hero/adjust_hero_pose_targets_from_motion.h" -struct MobyView { - u8 pad0[0xC]; - f32 fC; - union { - Vec4 v10; - f32 f10; - struct { - u8 pad[0x4]; - f32 v; - } f14; - struct { - u8 pad[0x8]; - f32 v; - } f18; - } u10; - u8 pad20[0x3]; - u8 b23; - u8 pad24[0xC]; - u8 b30; - u8 b31; - s16 h32; - union { - s32 i34; - u16 uh34; - } u34; - u8 pad38[0x8]; - union { - Vec4 v40; - struct { - u8 pad[0x8]; - f32 v; - } f48; - } u40; - u8 pad50[0x1]; - u8 b51; - u8 b52; - u8 b53; - u8 pad54[0x1C]; - u8 b70; - u8 pad71[0x7]; - struct MobyView *pm78; - u8 pad7C[0x2A]; - s16 hA6; - u8 padA8[0x18]; - Vec4 vC0; -}; +#include "rnc/overlay/shared/hero/hero_moby_view.h" struct PlayerJointTable { u8 pad0[0x60]; @@ -266,7 +221,7 @@ void update_hero_motion_for_current_state(void) { struct MobyView *moby = (struct MobyView *)hero.moby; s32 initial_state_step = hero.state.step; - s32 anim = moby->b53; + s32 anim = moby->prev_seq; f32 speed; Vec4 general_vector_or_hit_descriptor_scratch; Vec4 v10; @@ -329,8 +284,8 @@ void update_hero_motion_for_current_state(void) { } } if (hero.state.current == HERO_STATE_CROUCH || hero.state.current == 0x17) { - if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->b53 == 0xE || - ((struct MobyView *)hero.moby)->b53 == 0xF) { + if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->prev_seq == 0xE || + ((struct MobyView *)hero.moby)->prev_seq == 0xF) { if (hero.state.current == HERO_STATE_CROUCH) { turn_to( 0, frame_scale_sq * 0.002f, frame_scale_sq * 0.07f, frame_time * 6.981317f); @@ -340,7 +295,7 @@ void update_hero_motion_for_current_state(void) { if (absolute_float(hero.motion.yaw_rate) > frame_time * 0.34906584f) { s32 neg = hero.motion.yaw_rate < 0.0f; s32 anim = neg + 0xE; - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(5)); } hero.anim_speed = @@ -356,7 +311,7 @@ void update_hero_motion_for_current_state(void) { if (hero.state.current == 0x17) { anim = get_hero_help_value(0); } - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(7)); } } @@ -370,15 +325,15 @@ void update_hero_motion_for_current_state(void) { } speed = frame_time_sq * 12.0f * s; hero.unk2290 = speed; - if (((struct MobyView *)hero.moby)->b52 == ((struct MobyView *)hero.moby)->b53 && - ((struct MobyView *)hero.moby)->b52 != 0x14) { + if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && + ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; - if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->b51 < 5.5f) { + if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->prev_frame < 5.5f) { adjust_hero_animation_speed_for_target_frame(13.0f, r, 0.5f, -1.0f); if (hero.anim_speed > 1.1f) { hero.anim_speed = 1.1f; } - } else if (((struct MobyView *)hero.moby)->b51 > 6.5f) { + } else if (((struct MobyView *)hero.moby)->prev_frame > 6.5f) { hero.anim_speed = 1.0f; } } @@ -616,7 +571,7 @@ void update_hero_motion_for_current_state(void) { vector_or_hit_descriptor_scratch.f[0] = 0.4f; transform_vector_by_basis(&vector_or_hit_descriptor_scratch, &vector_or_hit_descriptor_scratch, - &((struct MobyView *)pl->moby)->vC0); + &((struct MobyView *)pl->moby)->rot_row0); fast_vec_add(&general_vector_or_hit_descriptor_scratch, &general_vector_or_hit_descriptor_scratch, &vector_or_hit_descriptor_scratch); @@ -638,7 +593,7 @@ void update_hero_motion_for_current_state(void) { } if (hero.state.current == 0x35 && fast_dec_timer_s16(&hero.pack_particle_timer) != 0) { struct MobyView *gm = (struct MobyView *)hero.items[3].moby; - if (gm != NULL && gm->hA6 == 0x261) { + if (gm != NULL && gm->oclass == 0x261) { s32 i; for (i = 0; i < 4; i++) { moby_point_position(gm, i % 2, &general_vector_or_hit_descriptor_scratch); @@ -646,7 +601,7 @@ void update_hero_motion_for_current_state(void) { vector_or_hit_descriptor_scratch.f[0] = -0.15f; transform_vector_by_basis(&vector_or_hit_descriptor_scratch, &vector_or_hit_descriptor_scratch, - &((struct MobyView *)hero.moby)->vC0); + &((struct MobyView *)hero.moby)->rot_row0); fast_vec_add(&general_vector_or_hit_descriptor_scratch, &general_vector_or_hit_descriptor_scratch, &vector_or_hit_descriptor_scratch); @@ -756,7 +711,7 @@ void update_hero_motion_for_current_state(void) { vector_or_hit_descriptor_scratch.f[0] = 0.4f; transform_vector_by_basis(&vector_or_hit_descriptor_scratch, &vector_or_hit_descriptor_scratch, - &((struct MobyView *)hero.moby)->vC0); + &((struct MobyView *)hero.moby)->rot_row0); fast_vec_add(&general_vector_or_hit_descriptor_scratch, &general_vector_or_hit_descriptor_scratch, &vector_or_hit_descriptor_scratch); @@ -837,17 +792,17 @@ void update_hero_motion_for_current_state(void) { case 0x39: case HERO_STATE_ANIMATION_WAIT_TO_IDLE: if ((struct MobyView *)hero.ground_moby != NULL && - ((struct MobyView *)hero.ground_moby)->hA6 == 0x155) { + ((struct MobyView *)hero.ground_moby)->oclass == 0x155) { f32 d; f32 yaw_step_limit_or_grind_cruise_speed; clear_u64_value(&general_vector_or_hit_descriptor_scratch); fast_vec_add(&general_vector_or_hit_descriptor_scratch, &general_vector_or_hit_descriptor_scratch, - &((struct MobyView *)hero.ground_moby)->u10.v10); + &((struct MobyView *)hero.ground_moby)->pos.v); fast_vec_sub( &hero.motion.velocity, &general_vector_or_hit_descriptor_scratch, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 2.0f); - d = fast_subtract_rotations(((struct MobyView *)hero.ground_moby)->u40.f48.v, + d = fast_subtract_rotations(((struct MobyView *)hero.ground_moby)->rot.z.v, hero.motion.rot.f[2]); yaw_step_limit_or_grind_cruise_speed = frame_time * 9.424778f; if (d > yaw_step_limit_or_grind_cruise_speed) { @@ -879,10 +834,10 @@ void update_hero_motion_for_current_state(void) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } - if (anim != -1 && ((struct MobyView *)hero.moby)->b52 != 0x36) { + if (anim != -1 && ((struct MobyView *)hero.moby)->seq != 0x36) { set_hero_animation(anim, 0, frames); - } else if ((((struct MobyView *)hero.moby)->b70 & 2) && - ((struct MobyView *)hero.moby)->b52 == 0x36) { + } else if ((((struct MobyView *)hero.moby)->anim_flags & 2) && + ((struct MobyView *)hero.moby)->seq == 0x36) { s32 an = get_hero_help_value(0); set_hero_animation(an, 0, scale_game_frames(5)); } @@ -905,8 +860,8 @@ void update_hero_motion_for_current_state(void) { } if ((struct MobyView *)hero.grapple_target != NULL) { hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.15f, frame_time * 6.2831855f); } break; @@ -914,7 +869,7 @@ void update_hero_motion_for_current_state(void) { f32 hit; f32 hit2; qcopy(&general_vector_or_hit_descriptor_scratch, - &((struct MobyView *)hero.grapple_target)->u10.v10); + &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &general_vector_or_hit_descriptor_scratch); hero.target_arrival_frames = scale_game_frames(60); @@ -924,8 +879,8 @@ void update_hero_motion_for_current_state(void) { if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.03f, frame_scale_sq * 0.15f, frame_time * 7.330383f); } else if (hero.state.step == 1) { approach_value(&hero.grapple_pull_speed, 0.0f, frame_time_sq * 42.0f); @@ -960,7 +915,7 @@ void update_hero_motion_for_current_state(void) { fast_vec_add( &vector_or_hit_descriptor_scratch, &vector_or_hit_descriptor_scratch, &hero.motion.pos); fast_vec_sub(&v10, - &((struct MobyView *)hero.grapple_target)->u10.v10, + &((struct MobyView *)hero.grapple_target)->pos.v, &vector_or_hit_descriptor_scratch); fast_vec_normalize(&hero.motion.velocity, &v10, hero.grapple_pull_speed); if (scale_game_frames(30) > hero.target_arrival_frames) { @@ -975,7 +930,7 @@ void update_hero_motion_for_current_state(void) { fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&general_vector_or_hit_descriptor_scratch, - &((struct MobyView *)hero.grapple_target)->u10.v10); + &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &general_vector_or_hit_descriptor_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); @@ -993,15 +948,15 @@ void update_hero_motion_for_current_state(void) { case HERO_STATE_GRAPPLE_SWING_ENTRY: { f32 vz; s32 above; - if ((hero.anim_flags & 2) && moby->b53 == 0x34) { + if ((hero.anim_flags & 2) && moby->prev_seq == 0x34) { set_hero_animation(0x35, 10, scale_game_frames(12)); hero.anim_speed = 0.3f; } vz = hero.motion.velocity.f[2]; if ((struct MobyView *)hero.swing_target_moby != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78 != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78->u34.i34 != 0) { - f32 a = ((struct MobyView *)hero.swing_target_moby)->u40.f48.v; + ((struct MobyView *)hero.swing_target_moby)->pvars != NULL && + ((struct MobyView *)hero.swing_target_moby)->pvars->align_yaw != 0) { + f32 a = ((struct MobyView *)hero.swing_target_moby)->rot.z.v; if (fast_difference_between_rotations(a, hero.motion.rot.f[2]) > 90.0f) { a = fast_add_rotations(a, 3.1415927f); } @@ -1016,7 +971,7 @@ void update_hero_motion_for_current_state(void) { hero.motion.move_yaw = hero.swing_yaw; turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.3f, frame_time * 4.712389f); fast_vec_sub(&general_vector_or_hit_descriptor_scratch, - &((struct MobyView *)hero.swing_target_moby)->u10.v10, + &((struct MobyView *)hero.swing_target_moby)->pos.v, &hero.motion.pos); fast_vec_normalize(&general_vector_or_hit_descriptor_scratch, &general_vector_or_hit_descriptor_scratch, @@ -1053,7 +1008,7 @@ void update_hero_motion_for_current_state(void) { frame_scale_sq * 0.2f, frame_time * 9.599311f); above = 1; - if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { + if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->pos.z.v)) { above = 0; } if (hero.swing_hooked != 0) { @@ -1077,7 +1032,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10) < + &((struct MobyView *)hero.swing_target_moby)->pos.v) < hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( @@ -1085,7 +1040,7 @@ void update_hero_motion_for_current_state(void) { if (hero.swing_entry_push != 0 && gravity_z(&hero.motion.velocity) > 0.0f) { fast_vec_sub(&position_or_displacement_scratch, &hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &((struct MobyView *)hero.swing_target_moby)->pos.v); add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 57.0f); } @@ -1098,12 +1053,12 @@ void update_hero_motion_for_current_state(void) { &hero.motion.velocity, &hero.motion.velocity, &position_or_displacement_scratch); } { - struct MobyView *r; + struct SwingTargetVars *r; if ((struct MobyView *)hero.swing_target_moby != NULL && - (r = ((struct MobyView *)hero.swing_target_moby)->pm78) != NULL) { + (r = ((struct MobyView *)hero.swing_target_moby)->pvars) != NULL) { f32 len = fast_vec_length(&hero.motion.velocity); - if (r->fC < len) { - approach_value(&len, r->fC, frame_time_sq * 15.0f); + if (r->max_speed < len) { + approach_value(&len, r->max_speed, frame_time_sq * 15.0f); fast_vec_normalize(&hero.motion.velocity, &hero.motion.velocity, len); } } @@ -1119,10 +1074,10 @@ void update_hero_motion_for_current_state(void) { fast_vec_add(&position_or_displacement_scratch, &vD0, &hero.motion.velocity); fast_vec_sub(&vC0, &position_or_displacement_scratch, - &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &((struct MobyView *)hero.swing_target_moby)->pos.v); fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&position_or_displacement_scratch, - &((struct MobyView *)hero.swing_target_moby)->u10.v10, + &((struct MobyView *)hero.swing_target_moby)->pos.v, &vC0); fast_vec_sub(&hero.motion.velocity, &position_or_displacement_scratch, &vD0); old = hero.swing_rope_length; @@ -1171,20 +1126,20 @@ void update_hero_motion_for_current_state(void) { up = forward_component(&position_or_displacement_scratch) > 0.0f; } if (up) { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 6, scale_game_frames(17)); hero.swing_anim_dir = 1; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(42.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } } else { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 0x15, scale_game_frames(9)); hero.swing_anim_dir = 2; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(12.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } @@ -1254,7 +1209,7 @@ void update_hero_motion_for_current_state(void) { hero.target_speed = 0.0f; if ((struct MobyView *)hero.melee_target != NULL) { f32 d = vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.melee_target)->u10.v10); + &((struct MobyView *)hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1391,7 +1346,7 @@ void update_hero_motion_for_current_state(void) { hero.target_speed = 0.0f; if ((struct MobyView *)hero.melee_target != NULL && scale_game_frames(4) > hero.state_timer) { - f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->u10.v10, + f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->pos.v, &hero.motion.pos) - 0.5f; f32 off; @@ -1544,7 +1499,7 @@ void update_hero_motion_for_current_state(void) { general_vector_or_hit_descriptor_scratch.f[3] = 5627.925f; ((u8 *)&v10)[8] = 0; a = hero.motion.rot.f[2]; - ((s16 *)&v10)[5] = o->hA6; + ((s16 *)&v10)[5] = o->oclass; rotation_matrix_or_vector_scratch[0].f[0] = fast_cos(a) * 0.8f; rotation_matrix_or_vector_scratch[0].f[1] = fast_sin(a) * 0.8f; rotation_matrix_or_vector_scratch[0].f[2] = 0.55f; @@ -1997,14 +1952,14 @@ void update_hero_motion_for_current_state(void) { f32 a; f32 k; fast_vec_sub(&vector_or_hit_descriptor_scratch, - &((struct MobyView *)hero.grind_look_moby)->u10.v10, + &((struct MobyView *)hero.grind_look_moby)->pos.v, &hero.motion.pos); transform_vector_by_basis(&vector_or_hit_descriptor_scratch, &vector_or_hit_descriptor_scratch, (Vec4 *)hero.inv_rot_matrix); a = fast_arc_tan(vector_or_hit_descriptor_scratch.f[0], vector_or_hit_descriptor_scratch.f[1]); - if (((struct MobyView *)hero.moby)->b52 == 0x31) { + if (((struct MobyView *)hero.moby)->seq == 0x31) { a = fast_subtract_rotations(a, 1.5707964f); AN.f278 = a * 0.3f; AN.f1C8 = a * 0.2f; @@ -2013,15 +1968,15 @@ void update_hero_motion_for_current_state(void) { AN.f278 = a * 0.3f; AN.f1C8 = a * 0.5f; } - } else if (((struct MobyView *)hero.moby)->b53 == 0x31) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x31) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); - } else if (((struct MobyView *)hero.moby)->b53 == 0x4B) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x4B) { AN.f278 = fast_add_rotations(0.13962634f, hero.rail_lean); AN.f118 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); AN.f1C8 = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); - } else if (((struct MobyView *)hero.moby)->b53 == 0x4A) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x4A) { AN.f278 = fast_add_rotations(-0.82030475f, hero.rail_lean); AN.f118 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); AN.f1C8 = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); @@ -2797,7 +2752,7 @@ void update_hero_motion_for_current_state(void) { v10.f[3] = 5627.925f; ((u8 *)&vector_or_hit_descriptor_scratch)[8] = 7; ((u8 *)&vector_or_hit_descriptor_scratch)[9] = 1; - ((s16 *)&vector_or_hit_descriptor_scratch)[5] = ((struct MobyView *)hero.moby)->hA6; + ((s16 *)&vector_or_hit_descriptor_scratch)[5] = ((struct MobyView *)hero.moby)->oclass; switch (hero.attack_record) { case ATTACK_RECORD_POINT_3_STRIKE: if (hero.anim_frame > 7.0f && hero.anim_frame < 14.0f) { @@ -2897,7 +2852,7 @@ void update_hero_motion_for_current_state(void) { } else if (hero.anim_changing == 0 && hero.anim_frame <= 22.0f) { fast_vec_normalize(&general_vector_or_hit_descriptor_scratch, &hero, 3.0f); general_vector_or_hit_descriptor_scratch.f[2] += 5.0f; - add_vectors(&v10, &general_vector_or_hit_descriptor_scratch, &moby->u10.v10); + add_vectors(&v10, &general_vector_or_hit_descriptor_scratch, &moby->pos.v); set_giant_clank_charged_blast_position(moby, &general_vector_or_hit_descriptor_scratch); hero.anim_speed = 0.5f; @@ -3160,7 +3115,7 @@ void update_hero_motion_for_current_state(void) { if (initial_state_step != hero.state.step) { hero.step_frames = 0; } - if (anim != moby->b53) { + if (anim != moby->prev_seq) { hero.anim_seq_frames = 0; } } From 0f8edc6099fedde79aa509325a7f6b2b8b3455e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:02:00 +0000 Subject: [PATCH 098/213] decomp: read the hero motion voice checks through the voice pool window --- .../update_hero_motion_for_current_state.c | 28 ++++++------- .../l05/hero/update_hero_motion_by_state.c | 42 +++++++++---------- .../update_hero_motion_for_current_state.c | 30 ++++++------- .../update_hero_motion_for_current_state.c | 28 +++++-------- .../l11/hero/update_hero_motion_by_state.c | 24 ++++------- .../update_hero_motion_for_current_state.c | 24 ++++------- .../l14/hero/update_hero_motion_by_state.c | 28 ++++++------- .../update_hero_motion_for_current_state.c | 24 ++++------- .../update_hero_motion_for_current_state.c | 42 +++++++++---------- .../update_hero_motion_for_current_state.c | 28 +++++-------- .../update_hero_motion_for_current_state.c | 28 +++++-------- 11 files changed, 134 insertions(+), 192 deletions(-) diff --git a/src/overlays/l03/hero/update_hero_motion_for_current_state.c b/src/overlays/l03/hero/update_hero_motion_for_current_state.c index 960edcd211..5bed80068c 100644 --- a/src/overlays/l03/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l03/hero/update_hero_motion_for_current_state.c @@ -161,12 +161,6 @@ extern void update_hero_water_height_and_bobbing(void) __asm__("FUN_L00_00227d40 #define PD controller_state extern struct PlayerJointTable D_L03_0017A780; #define AN D_L03_0017A780 -struct VoiceSlot { - u8 pad0[0x74]; - u8 b74; - u8 pad75[0x13]; - struct MobyView *pm88; -}; extern u8 swim_animation_speed_scale_table[] __asm__("D_L03_0017C0C0"); @@ -468,9 +462,10 @@ void update_hero_motion_for_current_state(void) { } else { s32 idx = hero.pack_swim_voice; if (idx != -1) { - struct VoiceSlot *swim_voice_slot = - (struct VoiceSlot *)(((u8 *)&voice_pool) + idx * 0x70); - if (swim_voice_slot->pm88 == MV(hero.moby) && swim_voice_slot->b74 != 0) { + VoicePoolWindow *swim_voice_slot = + (VoicePoolWindow *)(((u8 *)&voice_pool) + idx * 0x70); + if (swim_voice_slot->voice.owner == (VoiceMoby *)hero.moby && + swim_voice_slot->voice.state != 0) { release_voice_slot(idx); } } @@ -2044,9 +2039,10 @@ void update_hero_motion_for_current_state(void) { f32 sp; if (hero_slot_item_id(3) == 2) { if (hero.voice_slot4 != -1) { - struct VoiceSlot *landing_voice_slot = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); - if (landing_voice_slot->pm88 == MV(hero.moby) && landing_voice_slot->b74 != 0) { + VoicePoolWindow *landing_voice_slot = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); + if (landing_voice_slot->voice.owner == (VoiceMoby *)hero.moby && + landing_voice_slot->voice.state != 0) { release_voice_slot(hero.voice_slot4); } } @@ -2054,10 +2050,10 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(3, MV(hero.moby), 2); } else { if (hero.loop_voice_slot != -1) { - struct VoiceSlot *alternate_landing_voice_slot = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); - if (alternate_landing_voice_slot->pm88 == MV(hero.moby) && - alternate_landing_voice_slot->b74 != 0) { + VoicePoolWindow *alternate_landing_voice_slot = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); + if (alternate_landing_voice_slot->voice.owner == (VoiceMoby *)hero.moby && + alternate_landing_voice_slot->voice.state != 0) { release_voice_slot(hero.loop_voice_slot); } } diff --git a/src/overlays/l05/hero/update_hero_motion_by_state.c b/src/overlays/l05/hero/update_hero_motion_by_state.c index 3247e4ea58..a3d0f5e96f 100644 --- a/src/overlays/l05/hero/update_hero_motion_by_state.c +++ b/src/overlays/l05/hero/update_hero_motion_by_state.c @@ -110,12 +110,6 @@ extern Vec4 l05_hoverboard_trick_rotation_pivots[] __asm__("D_L05_00179BE0"); #define PD controller_state extern struct PlayerJointTable D_L05_0017AAE0; #define AN D_L05_0017AAE0 -struct VoiceSlot { - u8 pad0[0x74]; - u8 b74; - u8 pad75[0x13]; - struct MobyView *pm88; -}; extern s32 D_L05_001612D0; extern s32 D_L05_001612D8; @@ -427,8 +421,8 @@ void update_hero_motion_by_state(void) { } else { s32 idx = hero.pack_swim_voice; if (idx != -1) { - struct VoiceSlot *e = (struct VoiceSlot *)(((u8 *)&voice_pool) + idx * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = (VoicePoolWindow *)(((u8 *)&voice_pool) + idx * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(idx); } } @@ -866,9 +860,10 @@ void update_hero_motion_by_state(void) { release_voice_slot_cf(7, (struct MobyView *)hero.hoverboard_moby, 2); } else { if (hero.board_boost_voice != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.board_boost_voice * 0x70); - if (e->pm88 == (struct MobyView *)hero.hoverboard_moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.board_boost_voice * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.hoverboard_moby && + e->voice.state != 0) { release_voice_slot(hero.board_boost_voice); } } @@ -878,9 +873,10 @@ void update_hero_motion_by_state(void) { release_voice_slot_cf(6, (struct MobyView *)hero.hoverboard_moby, 0); } else { if (hero.voice_slot6 != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot6 * 0x70); - if (e->pm88 == (struct MobyView *)hero.hoverboard_moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot6 * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.hoverboard_moby && + e->voice.state != 0) { release_voice_slot(hero.voice_slot6); } } @@ -2125,9 +2121,9 @@ void update_hero_motion_by_state(void) { release_voice_slot_cf(0, (struct MobyView *)hero.moby, 0); } else { if (hero.grind_voice != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.grind_voice); } } @@ -2642,9 +2638,9 @@ void update_hero_motion_by_state(void) { f32 sp; if (hero_slot_item_id(3) == 2) { if (hero.voice_slot4 != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.voice_slot4); } } @@ -2652,9 +2648,9 @@ void update_hero_motion_by_state(void) { release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { if (hero.loop_voice_slot != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.loop_voice_slot); } } diff --git a/src/overlays/l06/hero/update_hero_motion_for_current_state.c b/src/overlays/l06/hero/update_hero_motion_for_current_state.c index 17f26bb474..843ce88f7f 100644 --- a/src/overlays/l06/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l06/hero/update_hero_motion_for_current_state.c @@ -858,12 +858,6 @@ extern void update_hero_water_height_and_bobbing(void) __asm__("FUN_L00_00227d40 #define PD controller_state extern struct PlayerJointTable D_L06_0017AE00; #define AN D_L06_0017AE00 -struct VoiceSlot { - u8 pad0[0x74]; - u8 b74; - u8 pad75[0x13]; - struct MobyView *pm88; -}; extern void release_voice_slot_cf(s32, struct MobyView *, s32) __asm__("FUN_L00_00216e48"); extern void release_voice_slot(s32) __asm__("FUN_0022d798"); @@ -2006,10 +2000,10 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(0, (struct MobyView *)hero.moby, 0); } else { if (hero.grind_voice != -1) { - struct VoiceSlot *grind_voice_slot = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); - if (grind_voice_slot->pm88 == (struct MobyView *)hero.moby && - grind_voice_slot->b74 != 0) { + VoicePoolWindow *grind_voice_slot = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); + if (grind_voice_slot->voice.owner == (VoiceMoby *)hero.moby && + grind_voice_slot->voice.state != 0) { release_voice_slot(hero.grind_voice); } } @@ -2598,10 +2592,10 @@ void update_hero_motion_for_current_state(void) { f32 sp; if (hero_slot_item_id(3) == 2) { if (hero.voice_slot4 != -1) { - struct VoiceSlot *landing_item_voice_slot = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); - if (landing_item_voice_slot->pm88 == (struct MobyView *)hero.moby && - landing_item_voice_slot->b74 != 0) { + VoicePoolWindow *landing_item_voice_slot = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); + if (landing_item_voice_slot->voice.owner == (VoiceMoby *)hero.moby && + landing_item_voice_slot->voice.state != 0) { release_voice_slot(hero.voice_slot4); } } @@ -2609,10 +2603,10 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { if (hero.loop_voice_slot != -1) { - struct VoiceSlot *landing_entry4_voice_slot = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); - if (landing_entry4_voice_slot->pm88 == (struct MobyView *)hero.moby && - landing_entry4_voice_slot->b74 != 0) { + VoicePoolWindow *landing_entry4_voice_slot = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); + if (landing_entry4_voice_slot->voice.owner == (VoiceMoby *)hero.moby && + landing_entry4_voice_slot->voice.state != 0) { release_voice_slot(hero.loop_voice_slot); } } diff --git a/src/overlays/l08/hero/update_hero_motion_for_current_state.c b/src/overlays/l08/hero/update_hero_motion_for_current_state.c index 66cee269e2..a8d219b6e1 100644 --- a/src/overlays/l08/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l08/hero/update_hero_motion_for_current_state.c @@ -229,12 +229,6 @@ extern void update_hero_water_height_and_bobbing(void) __asm__("FUN_L00_00227d40 #define PD controller_state extern struct PlayerJointTable D_L08_0017AE80; #define AN D_L08_0017AE80 -struct VoiceSlot { - u8 pad0[0x74]; - u8 b74; - u8 pad75[0x13]; - struct MobyView *pm88; -}; extern u8 l08_swim_speed_animation_samples[] __asm__("D_L08_0017C7C0"); @@ -538,8 +532,8 @@ void update_hero_motion_for_current_state(void) { } else { s32 idx = hero.pack_swim_voice; if (idx != -1) { - struct VoiceSlot *e = (struct VoiceSlot *)(((u8 *)&voice_pool) + idx * 0x70); - if (e->pm88 == MV(hero.moby) && e->b74 != 0) { + VoicePoolWindow *e = (VoicePoolWindow *)(((u8 *)&voice_pool) + idx * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(idx); } } @@ -1897,9 +1891,9 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(0, MV(hero.moby), 0); } else { if (hero.grind_voice != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); - if (e->pm88 == MV(hero.moby) && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.grind_voice); } } @@ -2481,9 +2475,9 @@ void update_hero_motion_for_current_state(void) { f32 sp; if (hero_slot_item_id(3) == 2) { if (hero.voice_slot4 != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); - if (e->pm88 == MV(hero.moby) && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.voice_slot4); } } @@ -2491,9 +2485,9 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(3, MV(hero.moby), 2); } else { if (hero.loop_voice_slot != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); - if (e->pm88 == MV(hero.moby) && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.loop_voice_slot); } } diff --git a/src/overlays/l11/hero/update_hero_motion_by_state.c b/src/overlays/l11/hero/update_hero_motion_by_state.c index 66cdcf7911..b42540d5e6 100644 --- a/src/overlays/l11/hero/update_hero_motion_by_state.c +++ b/src/overlays/l11/hero/update_hero_motion_by_state.c @@ -210,12 +210,6 @@ extern void update_hero_water_height_and_bobbing(void) __asm__("FUN_L00_00227d40 #define PD controller_state extern struct PlayerJointTable D_L11_0017B080; #define AN D_L11_0017B080 -struct VoiceSlot { - u8 pad0[0x74]; - u8 b74; - u8 pad75[0x13]; - struct MobyView *pm88; -}; extern s32 D_L11_001612D0; extern s32 D_L11_001612D8; @@ -520,9 +514,9 @@ void update_hero_motion_by_state(void) { } else { s32 voice_slot_index = hero.pack_swim_voice; if (voice_slot_index != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + voice_slot_index * 0x70); - if (e->pm88 == MV(hero.moby) && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + voice_slot_index * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(voice_slot_index); } } @@ -1951,9 +1945,9 @@ void update_hero_motion_by_state(void) { f32 sp; if (hero_slot_item_id(3) == 2) { if (hero.voice_slot4 != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); - if (e->pm88 == MV(hero.moby) && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.voice_slot4); } } @@ -1961,9 +1955,9 @@ void update_hero_motion_by_state(void) { release_voice_slot_cf(3, MV(hero.moby), 2); } else { if (hero.loop_voice_slot != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); - if (e->pm88 == MV(hero.moby) && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.loop_voice_slot); } } diff --git a/src/overlays/l12/hero/update_hero_motion_for_current_state.c b/src/overlays/l12/hero/update_hero_motion_for_current_state.c index 5fbe2f9f20..0081d49648 100644 --- a/src/overlays/l12/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l12/hero/update_hero_motion_for_current_state.c @@ -496,12 +496,6 @@ extern void update_hero_water_height_and_bobbing(void) __asm__("FUN_L00_00227d40 #define PD controller_state extern struct PlayerJointTable D_L12_0017AB00; #define AN D_L12_0017AB00 -struct VoiceSlot { - u8 pad0[0x74]; - u8 b74; - u8 pad75[0x13]; - struct MobyView *pm88; -}; extern s32 D_L12_001612D0; extern s32 D_L12_001612D8; @@ -817,9 +811,9 @@ void update_hero_motion_for_current_state(void) { } else { s32 voice_slot_index = hero.pack_swim_voice; if (voice_slot_index != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + voice_slot_index * 0x70); - if (e->pm88 == MV(hero.moby) && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + voice_slot_index * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(voice_slot_index); } } @@ -2403,9 +2397,9 @@ void update_hero_motion_for_current_state(void) { f32 sp; if (hero_slot_item_id(3) == 2) { if (hero.voice_slot4 != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); - if (e->pm88 == MV(hero.moby) && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.voice_slot4); } } @@ -2413,9 +2407,9 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(3, MV(hero.moby), 2); } else { if (hero.loop_voice_slot != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); - if (e->pm88 == MV(hero.moby) && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.loop_voice_slot); } } diff --git a/src/overlays/l14/hero/update_hero_motion_by_state.c b/src/overlays/l14/hero/update_hero_motion_by_state.c index 2679f7828b..30fc100099 100644 --- a/src/overlays/l14/hero/update_hero_motion_by_state.c +++ b/src/overlays/l14/hero/update_hero_motion_by_state.c @@ -370,12 +370,6 @@ extern void update_hero_water_height_and_bobbing(void) __asm__("FUN_L00_00227d40 #define PD controller_state extern struct PlayerJointTable D_L14_0017AD80; #define AN D_L14_0017AD80 -struct VoiceSlot { - u8 pad0[0x74]; - u8 b74; - u8 pad75[0x13]; - struct MobyView *pm88; -}; extern void release_voice_slot_cf(s32, struct MobyView *, s32) __asm__("FUN_L00_00216e48"); extern void release_voice_slot(s32) __asm__("FUN_0022d798"); @@ -1614,9 +1608,10 @@ void update_hero_motion_by_state(void) { release_voice_slot_cf(0, MV(hero.moby), 0); } else { if (hero.grind_voice != -1) { - struct VoiceSlot *grind_voice_slot = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); - if (grind_voice_slot->pm88 == MV(hero.moby) && grind_voice_slot->b74 != 0) { + VoicePoolWindow *grind_voice_slot = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); + if (grind_voice_slot->voice.owner == (VoiceMoby *)hero.moby && + grind_voice_slot->voice.state != 0) { release_voice_slot(hero.grind_voice); } } @@ -2201,9 +2196,10 @@ void update_hero_motion_by_state(void) { f32 sp; if (hero_slot_item_id(3) == 2) { if (hero.voice_slot4 != -1) { - struct VoiceSlot *landing_voice_slot = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); - if (landing_voice_slot->pm88 == MV(hero.moby) && landing_voice_slot->b74 != 0) { + VoicePoolWindow *landing_voice_slot = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); + if (landing_voice_slot->voice.owner == (VoiceMoby *)hero.moby && + landing_voice_slot->voice.state != 0) { release_voice_slot(hero.voice_slot4); } } @@ -2211,10 +2207,10 @@ void update_hero_motion_by_state(void) { release_voice_slot_cf(3, MV(hero.moby), 2); } else { if (hero.loop_voice_slot != -1) { - struct VoiceSlot *alternate_landing_voice_slot = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); - if (alternate_landing_voice_slot->pm88 == MV(hero.moby) && - alternate_landing_voice_slot->b74 != 0) { + VoicePoolWindow *alternate_landing_voice_slot = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); + if (alternate_landing_voice_slot->voice.owner == (VoiceMoby *)hero.moby && + alternate_landing_voice_slot->voice.state != 0) { release_voice_slot(hero.loop_voice_slot); } } diff --git a/src/overlays/l15/hero/update_hero_motion_for_current_state.c b/src/overlays/l15/hero/update_hero_motion_for_current_state.c index b6248bd0f7..15de741597 100644 --- a/src/overlays/l15/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l15/hero/update_hero_motion_for_current_state.c @@ -423,12 +423,6 @@ extern void update_hero_water_height_and_bobbing(void) __asm__("FUN_L00_00227d40 #define PD controller_state extern struct PlayerJointTable D_L15_0017AC80; #define AN D_L15_0017AC80 -struct VoiceSlot { - u8 pad0[0x74]; - u8 b74; - u8 pad75[0x13]; - struct MobyView *pm88; -}; extern s32 D_L15_001612D0; extern s32 D_L15_001612D8; @@ -704,9 +698,9 @@ void update_hero_motion_for_current_state(void) { } else { s32 voice_slot_index = hero.pack_swim_voice; if (voice_slot_index != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + voice_slot_index * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + voice_slot_index * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(voice_slot_index); } } @@ -2202,9 +2196,9 @@ void update_hero_motion_for_current_state(void) { f32 sp; if (hero_slot_item_id(3) == 2) { if (hero.voice_slot4 != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.voice_slot4); } } @@ -2212,9 +2206,9 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { if (hero.loop_voice_slot != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.loop_voice_slot); } } diff --git a/src/overlays/l16/hero/update_hero_motion_for_current_state.c b/src/overlays/l16/hero/update_hero_motion_for_current_state.c index c3740807f4..df2adf3cc7 100644 --- a/src/overlays/l16/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l16/hero/update_hero_motion_for_current_state.c @@ -117,12 +117,6 @@ extern Vec4 l16_hoverboard_trick_pivots_by_air_pose[] __asm__("D_L16_00179BE0"); #define PD controller_state extern struct PlayerJointTable D_L16_0017AAE0; #define AN D_L16_0017AAE0 -struct VoiceSlot { - u8 pad0[0x74]; - u8 b74; - u8 pad75[0x13]; - struct MobyView *pm88; -}; extern u8 swim_animation_speed_profile[] __asm__("D_L16_0017C420"); @@ -427,8 +421,8 @@ void update_hero_motion_for_current_state(void) { } else { s32 idx = hero.pack_swim_voice; if (idx != -1) { - struct VoiceSlot *e = (struct VoiceSlot *)(((u8 *)&voice_pool) + idx * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = (VoicePoolWindow *)(((u8 *)&voice_pool) + idx * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(idx); } } @@ -1022,9 +1016,10 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(7, (struct MobyView *)hero.hoverboard_moby, 2); } else { if (hero.board_boost_voice != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.board_boost_voice * 0x70); - if (e->pm88 == (struct MobyView *)hero.hoverboard_moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.board_boost_voice * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.hoverboard_moby && + e->voice.state != 0) { release_voice_slot(hero.board_boost_voice); } } @@ -1034,9 +1029,10 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(6, (struct MobyView *)hero.hoverboard_moby, 0); } else { if (hero.voice_slot6 != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot6 * 0x70); - if (e->pm88 == (struct MobyView *)hero.hoverboard_moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot6 * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.hoverboard_moby && + e->voice.state != 0) { release_voice_slot(hero.voice_slot6); } } @@ -2218,9 +2214,9 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(0, (struct MobyView *)hero.moby, 0); } else { if (hero.grind_voice != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.grind_voice); } } @@ -2781,9 +2777,9 @@ void update_hero_motion_for_current_state(void) { f32 sp; if (hero_slot_item_id(3) == 2) { if (hero.voice_slot4 != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.voice_slot4); } } @@ -2791,9 +2787,9 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { if (hero.loop_voice_slot != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.loop_voice_slot); } } diff --git a/src/overlays/l17/hero/update_hero_motion_for_current_state.c b/src/overlays/l17/hero/update_hero_motion_for_current_state.c index 5710f93811..7d9c5ed81a 100644 --- a/src/overlays/l17/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l17/hero/update_hero_motion_for_current_state.c @@ -103,12 +103,6 @@ extern void update_hero_water_height_and_bobbing(void) __asm__("FUN_L00_00227d40 #define PD controller_state extern struct PlayerJointTable D_L17_0017AF80; #define AN D_L17_0017AF80 -struct VoiceSlot { - u8 pad0[0x74]; - u8 b74; - u8 pad75[0x13]; - struct MobyView *pm88; -}; extern u8 l17_swim_speed_scale_by_animation_frame[] __asm__("D_L17_0017C8C0"); @@ -426,8 +420,8 @@ void update_hero_motion_for_current_state(void) { } else { s32 idx = hero.pack_swim_voice; if (idx != -1) { - struct VoiceSlot *e = (struct VoiceSlot *)(((u8 *)&voice_pool) + idx * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = (VoicePoolWindow *)(((u8 *)&voice_pool) + idx * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(idx); } } @@ -1862,9 +1856,9 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(0, (struct MobyView *)hero.moby, 0); } else { if (hero.grind_voice != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.grind_voice); } } @@ -2512,9 +2506,9 @@ void update_hero_motion_for_current_state(void) { f32 sp; if (hero_slot_item_id(3) == 2) { if (hero.voice_slot4 != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.voice_slot4); } } @@ -2522,9 +2516,9 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { if (hero.loop_voice_slot != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.loop_voice_slot); } } diff --git a/src/overlays/l18/hero/update_hero_motion_for_current_state.c b/src/overlays/l18/hero/update_hero_motion_for_current_state.c index a0761fc8da..55478245f7 100644 --- a/src/overlays/l18/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l18/hero/update_hero_motion_for_current_state.c @@ -103,12 +103,6 @@ extern void update_hero_water_height_and_bobbing(void) __asm__("FUN_L00_00227d40 #define PD controller_state extern struct PlayerJointTable D_L18_0017B080; #define AN D_L18_0017B080 -struct VoiceSlot { - u8 pad0[0x74]; - u8 b74; - u8 pad75[0x13]; - struct MobyView *pm88; -}; extern u8 hero_swim_speed_scale_data[] __asm__("D_L18_0017C9C0"); @@ -378,8 +372,8 @@ void update_hero_motion_for_current_state(void) { } else { s32 idx = hero.pack_swim_voice; if (idx != -1) { - struct VoiceSlot *e = (struct VoiceSlot *)(((u8 *)&voice_pool) + idx * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = (VoicePoolWindow *)(((u8 *)&voice_pool) + idx * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(idx); } } @@ -1804,9 +1798,9 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(0, (struct MobyView *)hero.moby, 0); } else { if (hero.grind_voice != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.grind_voice); } } @@ -2395,9 +2389,9 @@ void update_hero_motion_for_current_state(void) { f32 sp; if (hero_slot_item_id(3) == 2) { if (hero.voice_slot4 != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.voice_slot4); } } @@ -2405,9 +2399,9 @@ void update_hero_motion_for_current_state(void) { release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { if (hero.loop_voice_slot != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.loop_voice_slot); } } From 12f9f9e4dcfd31a4f9a6ae6886e1197e47d77c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:04:40 +0000 Subject: [PATCH 099/213] decomp: name poison vessel, helicopter, help hint, scientist and ultramech fields in l15 --- src/overlays/l15/mobys/helicopter.c | 12 +-- src/overlays/l15/mobys/help_hints.c | 88 +++++++++++--------- src/overlays/l15/mobys/poison_vessel.c | 56 ++++++------- src/overlays/l15/mobys/radial_ripple_mesh.c | 12 +-- src/overlays/l15/mobys/ultramech_scientist.c | 16 ++-- src/overlays/l15/mobys/ultramech_unlimited.c | 12 +-- src/overlays/l15/mobys/vertical_gate.c | 4 +- 7 files changed, 103 insertions(+), 97 deletions(-) diff --git a/src/overlays/l15/mobys/helicopter.c b/src/overlays/l15/mobys/helicopter.c index aaa6219f3d..88b872bc45 100644 --- a/src/overlays/l15/mobys/helicopter.c +++ b/src/overlays/l15/mobys/helicopter.c @@ -317,7 +317,7 @@ typedef struct { u8 pad26[2]; u8 hit_response_class; u8 pad29[5]; - u8 unk2E; + u8 removal_status; /* 0x2E: anything but 1 removes it */ u8 pad2F; f32 unk30; u8 pad34[0x24]; @@ -345,7 +345,7 @@ typedef struct { f32 wake_range; f32 chase_range; f32 range; - s32 unk1A4; + s32 giant_clank_only; /* 0x1A4: nonzero parks it unless the hero is Giant Clank */ f32 height; s32 entry_path; s32 trigger_volume; @@ -430,7 +430,7 @@ void helicopter_update(struct Moby *moby) { helicopter_instance_vars->pilot = create_class_55b_moby_from_source(moby); } if (moby->state != HELICOPTER_INITIALIZE && moby->state != HELICOPTER_DEAD_WAIT_FOR_RESET && - helicopter_instance_vars->unk1A4 != 0 && + helicopter_instance_vars->giant_clank_only != 0 && hero.vehicle_mode != HERO_VEHICLE_MODE_GIANT_CLANK) { moby->collision = 0; moby->flags = (moby->flags | 0x41) & 0xEFFF; @@ -462,7 +462,7 @@ void helicopter_update(struct Moby *moby) { if (goal.target == 0) goal.target = hero.moby; target = goal.target; - if (moby->state != HELICOPTER_INITIALIZE && helicopter_instance_vars->unk2E != 1) { + if (moby->state != HELICOPTER_INITIALIZE && helicopter_instance_vars->removal_status != 1) { if (helicopter_instance_vars->pilot != 0) mark_moby_for_removal(helicopter_instance_vars->pilot); mark_moby_for_removal(moby); @@ -478,7 +478,7 @@ void helicopter_update(struct Moby *moby) { helicopter_instance_vars->hit_response_class = 2; helicopter_instance_vars->unk58 = 0x19; helicopter_instance_vars->unk30 = 1.0f; - helicopter_instance_vars->unk2E = 1; + helicopter_instance_vars->removal_status = 1; helicopter_instance_vars->unk59 = 1; helicopter_instance_vars->unk5A = 6; moby->update_dist = 0xFF; @@ -513,7 +513,7 @@ void helicopter_update(struct Moby *moby) { helicopter_instance_vars->pilot->flags |= 0x41; break; case HELICOPTER_WAIT_FOR_ACTIVATION: - if (helicopter_instance_vars->unk1A4 != 0 && + if (helicopter_instance_vars->giant_clank_only != 0 && hero.vehicle_mode != HERO_VEHICLE_MODE_GIANT_CLANK) { moby->collision = 0; moby->flags = (moby->flags | 0x41) & 0xEFFF; diff --git a/src/overlays/l15/mobys/help_hints.c b/src/overlays/l15/mobys/help_hints.c index 272000aafc..bd05f8ff45 100644 --- a/src/overlays/l15/mobys/help_hints.c +++ b/src/overlays/l15/mobys/help_hints.c @@ -13,16 +13,16 @@ typedef struct Talk { int zone[4]; int npc[3]; - int vol1C; - int vol20[3]; - int vol2C; + int giant_clank_hint_volume; /* help 0x80 */ + int dwell_volumes[3]; + int visited_volume; /* sets hint_clip_volume_visited */ int pad30; int wait; - int hold38; - int hold3C; + int dwell_frames; + int npc_zone_frames; int last; char pad44[0x54 - 0x44]; - int vol54; + int help_88_volume; } Talk; typedef struct Help { @@ -31,13 +31,14 @@ typedef struct Help { int cur; } Help; +/* The help records (HelpRecord D_00141968) of help messages 0x7B and 0x7C. */ typedef struct Stats { char p0[0x3DA]; - unsigned short t3DA; + unsigned short help_7b_latest_time_bucket; char p1[0x3E0 - 0x3DC]; - unsigned short n3E0; - unsigned short t3E2; - int lv3E4; + unsigned short help_7c_count; + unsigned short help_7c_latest_time_bucket; + int help_7c_level_flags; } Stats; typedef struct Items { @@ -96,42 +97,42 @@ void help_hints_update(struct Moby *moby) { if (D_0013D4DF_2ed398[0] == 0) { int lim, now; now = scale_game_frames(D_0015EEA4_macro); - lim = now - ((Stats *)D_00141968_2ed398)->t3DA * 600; + lim = now - ((Stats *)D_00141968_2ed398)->help_7b_latest_time_bucket * 600; if ((int)((float)scale_game_frames(0x12) * 60.0f) < lim || - ((Stats *)D_00141968_2ed398)->t3DA * 600 == 0) { + ((Stats *)D_00141968_2ed398)->help_7b_latest_time_bucket * 600 == 0) { help_request(0x3A98, 0x7B); } else { now = scale_game_frames(D_0015EEA4_macro); - if (now / 600 > ((Stats *)D_00141968_2ed398)->t3DA) { - ((Stats *)D_00141968_2ed398)->t3DA = + if (now / 600 > ((Stats *)D_00141968_2ed398)->help_7b_latest_time_bucket) { + ((Stats *)D_00141968_2ed398)->help_7b_latest_time_bucket = scale_game_frames(D_0015EEA4_macro) / 600; } } - } else if (((Stats *)D_00141968_2ed398)->n3E0 != 0) { + } else if (((Stats *)D_00141968_2ed398)->help_7c_count != 0) { int lim, now; now = scale_game_frames(D_0015EEA4_macro); - lim = now - ((Stats *)D_00141968_2ed398)->t3E2 * 600; + lim = now - ((Stats *)D_00141968_2ed398)->help_7c_latest_time_bucket * 600; if ((int)((float)scale_game_frames(0x12) * 60.0f) < lim || - ((Stats *)D_00141968_2ed398)->t3E2 * 600 == 0) { + ((Stats *)D_00141968_2ed398)->help_7c_latest_time_bucket * 600 == 0) { help_request(0x3A99, 0x7C); } else { now = scale_game_frames(D_0015EEA4_macro); - if (now / 600 > ((Stats *)D_00141968_2ed398)->t3E2) { - ((Stats *)D_00141968_2ed398)->t3E2 = + if (now / 600 > ((Stats *)D_00141968_2ed398)->help_7c_latest_time_bucket) { + ((Stats *)D_00141968_2ed398)->help_7c_latest_time_bucket = scale_game_frames(D_0015EEA4_macro) / 600; } } } else { int now; - ((Stats *)D_00141968_2ed398)->n3E0++; + ((Stats *)D_00141968_2ed398)->help_7c_count++; now = scale_game_frames(D_0015EEA4_macro); - if (now / 600 > ((Stats *)D_00141968_2ed398)->t3E2) { - ((Stats *)D_00141968_2ed398)->t3E2 = + if (now / 600 > ((Stats *)D_00141968_2ed398)->help_7c_latest_time_bucket) { + ((Stats *)D_00141968_2ed398)->help_7c_latest_time_bucket = scale_game_frames(D_0015EEA4_macro) / 600; } - ((Stats *)D_00141968_2ed398)->lv3E4 = ((Stats *)D_00141968_2ed398)->lv3E4 | - (1 << current_level_index_macro) | - 0x80000000; + ((Stats *)D_00141968_2ed398)->help_7c_level_flags = + ((Stats *)D_00141968_2ed398)->help_7c_level_flags | + (1 << current_level_index_macro) | 0x80000000; } } } @@ -141,7 +142,8 @@ void help_hints_update(struct Moby *moby) { help_request(0x3A9F, 0x89); D_L15_0015F5A4 = 0; } - if (is_point_inside_clip_volume(&hero.motion.pos, hint_dialogue_data->vol54) != 0 && + if (is_point_inside_clip_volume(&hero.motion.pos, hint_dialogue_data->help_88_volume) != + 0 && hero.vehicle_mode == 3 && hero.glow_pulse_level == 0 && D_L15_00161AC0_macro == 0 && *(unsigned short *)(item_usage + 0x728) == 0) { help_request(0x3A9E, 0x88); @@ -158,16 +160,16 @@ void help_hints_update(struct Moby *moby) { } } if (found != 0) { - hint_dialogue_data->hold3C = hint_dialogue_data->hold3C + 1; + hint_dialogue_data->npc_zone_frames = hint_dialogue_data->npc_zone_frames + 1; } else { - hint_dialogue_data->hold3C = 0; + hint_dialogue_data->npc_zone_frames = 0; hint_dialogue_data->last = -1; } if (npc != -1) { npc_moby = (struct Moby *)((char *)l15_moby_array_macro + (npc << 8)); if (npc_moby != 0 && npc_moby->oclass == 0x4E && npc_moby->state != 0xFE && npc_moby->state != 0xFD && npc_moby->state != 3 && - hint_dialogue_data->hold3C > hint_dialogue_data->wait && pick != -1 && + hint_dialogue_data->npc_zone_frames > hint_dialogue_data->wait && pick != -1 && pick != hint_dialogue_data->last && (hero.state.control_mode < 2u || hero.state.control_mode == 9) && ((Help *)quartu_help_message_state)->busy == 0 && @@ -177,20 +179,22 @@ void help_hints_update(struct Moby *moby) { help_request(0x3A9A, 0x7D); } hint_dialogue_data->last = pick; - hint_dialogue_data->hold3C = 0; + hint_dialogue_data->npc_zone_frames = 0; } } if (hero.moby->seq == 0xC && hero.vehicle_mode == HERO_VEHICLE_MODE_GIANT_CLANK) { ((Items *)alternate_item_available)->giant_clank_zone_hint_suppressed = 1; } - if (is_point_inside_clip_volume(&hero.motion.pos, hint_dialogue_data->vol1C) != 0 && + if (is_point_inside_clip_volume(&hero.motion.pos, + hint_dialogue_data->giant_clank_hint_volume) != 0 && hero.vehicle_mode == HERO_VEHICLE_MODE_GIANT_CLANK && ((Items *)alternate_item_available)->giant_clank_zone_hint_suppressed == 0 && ((Help *)quartu_help_message_state)->busy == 0 && ((Help *)quartu_help_message_state)->cur == -1 && *(int *)(item_usage + 0x6EC) >= 0) { help_request(0x3A9C, 0x80); } - if (is_point_inside_clip_volume(&hero.motion.pos, hint_dialogue_data->vol20[0]) != 0 && + if (is_point_inside_clip_volume(&hero.motion.pos, hint_dialogue_data->dwell_volumes[0]) != + 0 && ((Help *)quartu_help_message_state)->busy == 0 && ((Help *)quartu_help_message_state)->cur == -1 && l15_dwell_zone_hint_enabled[0] == 0 && !(*(unsigned int *)(item_usage + 0x6FC) & (1 << current_level_index_macro))) { @@ -199,33 +203,35 @@ void help_hints_update(struct Moby *moby) { pick = -1; found = 0; for (j = 0; j < 3; j++) { - if (is_point_inside_clip_volume(&hero.motion.pos, hint_dialogue_data->vol20[j]) != 0) { + if (is_point_inside_clip_volume(&hero.motion.pos, + hint_dialogue_data->dwell_volumes[j]) != 0) { found = 1; - if (hint_dialogue_data->last != hint_dialogue_data->vol20[j]) { - pick = hint_dialogue_data->vol20[j]; + if (hint_dialogue_data->last != hint_dialogue_data->dwell_volumes[j]) { + pick = hint_dialogue_data->dwell_volumes[j]; } break; } } if (found == 0) { - hint_dialogue_data->hold38 = 0; + hint_dialogue_data->dwell_frames = 0; hint_dialogue_data->last = -1; } else { - hint_dialogue_data->hold38 = hint_dialogue_data->hold38 + 1; + hint_dialogue_data->dwell_frames = hint_dialogue_data->dwell_frames + 1; if (hero.state.current == 0x35) { - hint_dialogue_data->hold38 = 0; + hint_dialogue_data->dwell_frames = 0; hint_dialogue_data->last = -1; } } - if (scale_game_frames(0xE10) < hint_dialogue_data->hold38 && pick != -1 && + if (scale_game_frames(0xE10) < hint_dialogue_data->dwell_frames && pick != -1 && hero_is_in_special_state() != 0 && ((Help *)quartu_help_message_state)->busy == 0 && ((Help *)quartu_help_message_state)->cur == -1 && l15_dwell_zone_hint_enabled[0] != 0) { help_request(0x4E2E, 0x78); hint_dialogue_data->last = pick; - hint_dialogue_data->hold38 = 0; + hint_dialogue_data->dwell_frames = 0; } if (((Items *)alternate_item_available)->hint_clip_volume_visited == 0 && - is_point_inside_clip_volume(&hero.motion.pos, hint_dialogue_data->vol2C) != 0) { + is_point_inside_clip_volume(&hero.motion.pos, hint_dialogue_data->visited_volume) != + 0) { ((Items *)alternate_item_available)->hint_clip_volume_visited = 1; } break; diff --git a/src/overlays/l15/mobys/poison_vessel.c b/src/overlays/l15/mobys/poison_vessel.c index 8a9c18ffd4..a22f7fe0ec 100644 --- a/src/overlays/l15/mobys/poison_vessel.c +++ b/src/overlays/l15/mobys/poison_vessel.c @@ -44,10 +44,10 @@ typedef union Vec { } Vec; typedef struct Data { - float f0; - float f4; - float f8; - float fC; + float velocity_x; + float velocity_y; + float velocity_z; + float velocity_w; struct Moby_2E9358 *target; /* 0x10 */ } Data; @@ -56,15 +56,15 @@ typedef struct Moby_2E9358 { OvlQuad pos; /* 0x10 */ unsigned char state; /* 0x20 */ char pad21[0x1F]; - OvlQuad v40; /* 0x40 */ + OvlQuad rot; /* 0x40 */ char pad50[0x28]; Data *data; /* 0x78 */ char pad7C[0x28]; - unsigned char bA4; + unsigned char hit_slot; char padA5; short object_class; char padA8[0x14]; - unsigned char bBC; + unsigned char command; /* 0xBC: nonzero makes the vessel burst */ } Moby_2E9358; typedef struct Res { @@ -74,11 +74,11 @@ typedef struct Res { typedef struct Tb { char pad0[0x18]; - int f18; + int hit_moby; int f1C; - OvlQuad v20; + OvlQuad hit_position; OvlQuad v30; - OvlQuad v40; + OvlQuad hit_normal; } Tb; extern float probe_ground_height(void *, int, float) __asm__("func_00213508"); @@ -155,34 +155,34 @@ void poison_vessel_update(Moby_2E9358 *moby) { clear_u64_value(&collision_scratch_vector); if (coll_sphere(0.5f, &moby->pos, 1, moby)) { if (D_L15_00174458_lui[0] == 0 || get_moby_pvars_link(D_L15_00174458_lui[0]) == 0) { - moby->bBC = 1; + moby->command = 1; } } hit_result = find_moby_hit(moby, 0x830000, 0); if (hit_result != 0 && hit_result->owner != 0 && hit_result->owner->object_class != moby->object_class) { - moby->bBC = 1; + moby->command = 1; } - moby->bA4 = 0xFF; + moby->hit_slot = 0xFF; state = moby->state; switch (state) { case POISON_VESSEL_FREE_FLIGHT: - data->f8 = data->f8 - poison_vessel_gravity_gp * frame_time_sq; + data->velocity_z = data->velocity_z - poison_vessel_gravity_gp * frame_time_sq; add_vectors(&temporary_vector, &moby->pos, data); if (collision_line(&previous_position, &moby->pos, 0x10, moby, 0)) { - if (((Tb *)D_L15_001744C0_2E9358)->f18 != 0 && - get_moby_pvars_link(((Tb *)D_L15_001744C0_2E9358)->f18) != 0) { - data->target = (Moby_2E9358 *)((Tb *)D_L15_001744C0_2E9358)->f18; + if (((Tb *)D_L15_001744C0_2E9358)->hit_moby != 0 && + get_moby_pvars_link(((Tb *)D_L15_001744C0_2E9358)->hit_moby) != 0) { + data->target = (Moby_2E9358 *)((Tb *)D_L15_001744C0_2E9358)->hit_moby; moby->state = POISON_VESSEL_FOLLOW_TARGET; - data->f8 = 0.0f; - moby->pos = ((Tb *)D_L15_001744C0_2E9358)->v20; - } else if (((Tb *)D_L15_001744C0_2E9358)->f18 == D_001413D0_lui || - data->f8 < D_0015ED6C * -9.8f) { - moby->bBC = 1; - qcopy(&moby->pos, &((Tb *)D_L15_001744C0_2E9358)->v20); + data->velocity_z = 0.0f; + moby->pos = ((Tb *)D_L15_001744C0_2E9358)->hit_position; + } else if (((Tb *)D_L15_001744C0_2E9358)->hit_moby == D_001413D0_lui || + data->velocity_z < D_0015ED6C * -9.8f) { + moby->command = 1; + qcopy(&moby->pos, &((Tb *)D_L15_001744C0_2E9358)->hit_position); func_L00_001FF610_2E9358( - &collision_scratch_vector, data, &((Tb *)D_L15_001744C0_2E9358)->v40); + &collision_scratch_vector, data, &((Tb *)D_L15_001744C0_2E9358)->hit_normal); fast_vec_normalize( &collision_scratch_vector, &collision_scratch_vector, D_0015ED6C + D_0015ED6C); } @@ -195,13 +195,13 @@ void poison_vessel_update(Moby_2E9358 *moby) { if (target_moby->state == MOBY_STATE_MARKED_FOR_REMOVAL || data->target->state == 0xFD) { - moby->bBC = state; + moby->command = state; data->target = 0; } else if (D_L15_00174458_lui[0] != 0) { follow_context = get_moby_pvars_link(D_L15_00174458_lui[0]); if (follow_context != 0) { FUN_L00_00260400( - moby, data->target, &moby->pos, &moby->v40, &moby->pos, &moby->v40); + moby, data->target, &moby->pos, &moby->rot, &moby->pos, &moby->rot); fast_vec_sub(&temporary_vector, &moby->pos, &previous_position); *(OvlQuad *)data = temporary_vector.q; } @@ -209,13 +209,13 @@ void poison_vessel_update(Moby_2E9358 *moby) { } if (follow_context == 0) { moby->state = POISON_VESSEL_FREE_FLIGHT; - data->f8 = 0.0f; + data->velocity_z = 0.0f; data->target = 0; } break; } - if (moby->bBC != 0) { + if (moby->command != 0) { func_L00_0025F4A8_2E9358( moby, data, 0, 0.0f, 0.0f, 3, 3, 5, 2.0f, 1.0f, 4.0f, 1.0f, -1, 7.0f, 0, 1, -1, 0); trooper_play_sound(0, 0, moby, 0x79); diff --git a/src/overlays/l15/mobys/radial_ripple_mesh.c b/src/overlays/l15/mobys/radial_ripple_mesh.c index 7e8f6ec3d3..f898640e10 100644 --- a/src/overlays/l15/mobys/radial_ripple_mesh.c +++ b/src/overlays/l15/mobys/radial_ripple_mesh.c @@ -14,8 +14,8 @@ extern float multiply_global_factor_ed64(float) __asm__("FUN_001f96b0"); typedef struct { - float f0; - float f4; + float previous_phase; + float phase; } RippleData; typedef struct { @@ -783,9 +783,9 @@ void draw_moby_radial_ripple_mesh_buffers(struct Moby *moby) { vu1_add_g_sregister(0x42, ((long)ripple_mesh_buffers_alpha_1_fix << 32) | 0x44); vu1_add_g_sregister(8, 0); vu1_add_g_sregister(0x14, ((long)0xFF90 << 32) | 0x260); - ripple_data->f0 = ripple_data->f4; - ripple_data->f4 = fast_add_rotations( - ripple_data->f4, + ripple_data->previous_phase = ripple_data->phase; + ripple_data->phase = fast_add_rotations( + ripple_data->phase, 360.0f / multiply_global_factor_ed64(ripple_mesh_buffers_phase_advance_divisor_gp) * DEG_TO_RAD * frame_time); get_moby_color(moby, &r, &g, &b); @@ -800,7 +800,7 @@ void draw_moby_radial_ripple_mesh_buffers(struct Moby *moby) { FUN_L00_00200260(square_root(p[0] * p[0] + p[1] * p[1]), ripple_mesh_buffers_radial_wavelength_gp) * 6.2831855f / ripple_mesh_buffers_radial_wavelength_gp), - ripple_data->f4)); + ripple_data->phase)); *(float *)(j * 12 + ripple_mesh_buffers_world_vertex_tables[i]) = p[0] + moby->pos.x; *(float *)(j * 12 + ripple_mesh_buffers_world_vertex_tables[i] + 4) = p[1] + moby->pos.y; diff --git a/src/overlays/l15/mobys/ultramech_scientist.c b/src/overlays/l15/mobys/ultramech_scientist.c index 10e2341012..700b70f9d3 100644 --- a/src/overlays/l15/mobys/ultramech_scientist.c +++ b/src/overlays/l15/mobys/ultramech_scientist.c @@ -67,13 +67,13 @@ void ultramech_scientist_update(struct Moby *moby) __asm__("FUN_L15_002ec760"); typedef struct UltramechScientistVars { u8 pad_0[0x4]; - s16 unk4; + s16 dialogue_mode; u8 pad_6[0x2]; - u8 unk8; + u8 dialogue_any_direction; u8 pad_9[0x3]; - f32 unkC; + f32 dialogue_radius; u8 pad_10[0x26]; - s16 unk36; + s16 dialogue_entry; u8 pad_38[0x108]; s32 unk140; s32 first_pre_scene_moby_group_index; @@ -160,7 +160,7 @@ void ultramech_scientist_update(struct Moby *moby) { case ULTRAMECH_SCIENTIST_INITIALIZE: moby->state = ULTRAMECH_SCIENTIST_WAIT_FOR_DIALOGUE; moby->update_dist = 0xFF; - ultramech_scientist_private_data->unkC = 20.0f; + ultramech_scientist_private_data->dialogue_radius = 20.0f; initialize_npc_dialogue(moby, ultramech_scientist_private_data); if (visited52[ultramech_scientist_private_data->dialogue_mission_id + (current_level_index_gp << 4)] != 0xFF) { @@ -248,7 +248,7 @@ void ultramech_scientist_update(struct Moby *moby) { break; } moby->anim_speed = 1.0f; - if (ultramech_scientist_private_data->unk4 == 0) { + if (ultramech_scientist_private_data->dialogue_mode == 0) { if (ultramech_scientist_private_data->camera_reset_cuboid != -1) { char *paths = D_L15_001600EC; FUN_L00_00284e50( @@ -300,8 +300,8 @@ void ultramech_scientist_update(struct Moby *moby) { 0, 0); ultramech_scientist_private_data->unk140 = 1; - ultramech_scientist_private_data->unk36 = 1; - ultramech_scientist_private_data->unk8 = 1; + ultramech_scientist_private_data->dialogue_entry = 1; + ultramech_scientist_private_data->dialogue_any_direction = 1; unlock_planet(0x10); jet_clear_persistent(ultramech_scientist_private_data->pre_scene_persistent_mission_id); request_music_track(0, 5); diff --git a/src/overlays/l15/mobys/ultramech_unlimited.c b/src/overlays/l15/mobys/ultramech_unlimited.c index 3530b693ae..6dfe4d7fcb 100644 --- a/src/overlays/l15/mobys/ultramech_unlimited.c +++ b/src/overlays/l15/mobys/ultramech_unlimited.c @@ -146,9 +146,9 @@ struct UMoby { char pad21[3]; char *cls; char pad28[8]; - unsigned char b30; + unsigned char update_dist; char pad31; - unsigned short h32; + unsigned short draw_dist; unsigned short flags; char pad36[0xA]; Vec4 rot; @@ -210,7 +210,7 @@ struct UData { int activation_clip_volume; int snd; char pad1E4[0x1C]; - unsigned char v200[0x10]; + unsigned char big_head_manipulator[0x10]; }; typedef struct { @@ -323,7 +323,7 @@ void ultramech_unlimited_update(UMoby *ultramech_moby) { ultramech_moby->state = ULTRAMECH_WAIT_FOR_ACTIVATION; return; } - FUN_L00_00263ac8(2.5f, (int)ultramech_moby, 6, ultramech_vars->v200); + FUN_L00_00263ac8(2.5f, (int)ultramech_moby, 6, ultramech_vars->big_head_manipulator); switch (ultramech_moby->state) { case ULTRAMECH_INITIALIZE: ultramech_vars->health = 12.0f; @@ -334,8 +334,8 @@ void ultramech_unlimited_update(UMoby *ultramech_moby) { ultramech_vars->b29 = 0; { int ff = 0xFF; - ultramech_moby->h32 = ff; - ultramech_moby->b30 = ff; + ultramech_moby->draw_dist = ff; + ultramech_moby->update_dist = ff; } ultramech_vars->snd = -1; ultramech_vars->turnVel = 0.0f; diff --git a/src/overlays/l15/mobys/vertical_gate.c b/src/overlays/l15/mobys/vertical_gate.c index 89f66c7660..c759c7154b 100644 --- a/src/overlays/l15/mobys/vertical_gate.c +++ b/src/overlays/l15/mobys/vertical_gate.c @@ -29,7 +29,7 @@ typedef struct { Vec_2A48B0 pos; /* 0x10 */ unsigned char state; /* 0x20 */ char pad21[0xF]; - unsigned char f30; /* 0x30 */ + unsigned char update_dist; /* 0x30 */ char pad31[0x47]; GateVars *vars; /* 0x78 */ } GateMoby; @@ -78,7 +78,7 @@ void vertical_gate_update(GateMoby *gate_moby) { gate_moby->state = GATE_WAIT_TO_OPEN; gate_vars->locked = 0; if (gate_vars->key != -1) { - gate_moby->f30 = 0xFF; + gate_moby->update_dist = 0xFF; } if (D_0013DD50 != 0 && gate_vars->key != -1) { gate_moby->pos.z = gate_moby->pos.z - vertical_gate_travel_distance_gp; From bc3a1e9d9068e341732636b954bc8761236b567f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:08:23 +0000 Subject: [PATCH 100/213] decomp: name constructorbot, sand shark, nest and Skid's agent fields in l02 --- src/overlays/l02/mobys/constructorbot.c | 8 ++++---- src/overlays/l02/mobys/sand_shark.c | 9 +++++---- src/overlays/l02/mobys/sand_shark_nest.c | 8 ++++---- src/overlays/l02/mobys/skids_agent.c | 6 +++--- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/overlays/l02/mobys/constructorbot.c b/src/overlays/l02/mobys/constructorbot.c index 6fd3221efd..806b927772 100644 --- a/src/overlays/l02/mobys/constructorbot.c +++ b/src/overlays/l02/mobys/constructorbot.c @@ -34,9 +34,9 @@ extern void update_hit_color_flash(void *, void *) __asm__("FUN_L00_0025d538"); typedef struct { /* 0x000 */ char pad000[0x20]; - /* 0x020 */ float f20; + /* 0x020 */ float health; /* 0x024 */ char pad024[4]; - /* 0x028 */ char b28; + /* 0x028 */ char hit_response_class; /* 0x029 */ char b29; /* 0x02A */ char pad02A[6]; /* 0x030 */ float f30; @@ -195,14 +195,14 @@ void constructorbot_update(struct Moby *moby) { moby->spawn_frame = *(long *)(((char *)hero.moby) + 0x38); FUN_L01_0026d930(bot_private_vars->walk); step = D_0015ED6C * 4.0f; - bot_private_vars->b28 = 2; + bot_private_vars->hit_response_class = 2; bot_private_vars->walk_10c = 0.03f; bot_private_vars->walk_110 = 0.3f; bot_private_vars->walk_114 = 0.25f; bot_private_vars->walk_step = step; bot_private_vars->walk_dc = 2.0f; bot_private_vars->walk_d8 = 2.0f; - bot_private_vars->f20 = 3.0f; + bot_private_vars->health = 3.0f; clear_u64_value(bot_private_vars->velocity); reset_shot_tracking((char *)bot_private_vars->shots); switch (bot_private_vars->start) { diff --git a/src/overlays/l02/mobys/sand_shark.c b/src/overlays/l02/mobys/sand_shark.c index 2112e3f950..ce03e6d23a 100644 --- a/src/overlays/l02/mobys/sand_shark.c +++ b/src/overlays/l02/mobys/sand_shark.c @@ -1222,8 +1222,8 @@ typedef struct { float base_target_selection_range; /* 0x24C */ float effective_target_selection_range; char pad254[8]; - short t25C; /* 0x25C */ - short t25E; + short t25C; /* 0x25C */ + short range_boost_timer; /* while it runs the target range is 5 longer */ char pad260[0x1C]; int selected_relaunch_moby; /* 0x27C */ int entry_moby_state; @@ -1298,10 +1298,11 @@ void handle_sand_shark_damage_and_targeting(unsigned char *moby) { if (moby_vars->target_range_timer_refresh_request != 0 || (!fast_dec_timer_s16(&moby_vars->t25C) && vector_distance_xy(moby + 0x10, &hero.motion.pos) < 10.0f)) { - moby_vars->t25E = truncate_float_to_s32(scale_time(random_float_between(180.0f, 240.0f))); + moby_vars->range_boost_timer = + truncate_float_to_s32(scale_time(random_float_between(180.0f, 240.0f))); } moby_vars->target_range_timer_refresh_request = 0; - if (fast_dec_timer_s16(&moby_vars->t25E)) { + if (fast_dec_timer_s16(&moby_vars->range_boost_timer)) { moby_vars->effective_target_selection_range = moby_vars->base_target_selection_range; } else { moby_vars->effective_target_selection_range = moby_vars->base_target_selection_range + 5.0f; diff --git a/src/overlays/l02/mobys/sand_shark_nest.c b/src/overlays/l02/mobys/sand_shark_nest.c index 3ddfe861cf..3147e82b3a 100644 --- a/src/overlays/l02/mobys/sand_shark_nest.c +++ b/src/overlays/l02/mobys/sand_shark_nest.c @@ -98,8 +98,8 @@ extern int FUN_L00_001fefc8(void *); /* pvars of the class sand_shark_nest_update updates (only the fields it touches). */ typedef struct { char pad0[0x20]; - float f20; /* 0x20 */ - short s24; /* 0x24 */ + float health; /* 0x20 */ + short max_health; /* 0x24 */ char pad26[8]; unsigned char removal_request_state; /* 0x2E */ char pad2F[0x11]; @@ -176,8 +176,8 @@ void sand_shark_nest_update(unsigned char *moby) { MOBY(moby)->bolts = 1; } MOBY(moby)->state = SAND_SHARK_NEST_WAIT_FOR_SPAWN; - nest_vars->f20 = 3.0f; - nest_vars->s24 = 3; + nest_vars->health = 3.0f; + nest_vars->max_health = 3; nest_vars->removal_request_state = SAND_SHARK_NEST_REMOVAL_REQUEST_IDLE; nest_vars->timer = scale_game_frames(nest_vars->delay); if (nest_vars->spawner >= 0) { diff --git a/src/overlays/l02/mobys/skids_agent.c b/src/overlays/l02/mobys/skids_agent.c index f80a7a621a..eaadc9439a 100644 --- a/src/overlays/l02/mobys/skids_agent.c +++ b/src/overlays/l02/mobys/skids_agent.c @@ -65,7 +65,7 @@ void skids_agent_update(struct Moby *moby) __asm__("FUN_L02_002e0dc0"); typedef struct SkidsAgentVars { u8 pad_0[0x4]; - s16 unk4; + s16 dialogue_mode; u8 pad_6[0x2]; u8 any_direction; u8 pad_9[0x3]; @@ -178,14 +178,14 @@ void skids_agent_update(struct Moby *moby) { case SKIDS_AGENT_CONVERSATION_ACTIVE: if (level_game_mode != 2) { moby->state = SKIDS_AGENT_IDLE_AND_TALK; - if (skids_agent_vars->unk4 == 0) { + if (skids_agent_vars->dialogue_mode == 0) { jet_clear_persistent(moby->mission); if (skids_agent_vars->return_camera_cuboid_index != -1) { char *camera_transform_entry = (char *)l02_cuboids + (skids_agent_vars->return_camera_cuboid_index << 7); jet_reset_camera(camera_transform_entry + 0x30, camera_transform_entry + 0x70); } - } else if (skids_agent_vars->unk4 == 2) { + } else if (skids_agent_vars->dialogue_mode == 2) { moby->visible = 0; moby->collision = 0; moby->flags |= 1; From b30c3f33ae852e47d881960b1bef18df447acedd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:08:23 +0000 Subject: [PATCH 101/213] decomp: name Qwark's starfighter, robosquawker, space fighter, turret and projectile fields in l13 --- .../rnc/overlay/l13/mobys/projectile_moby.h | 9 +- src/overlays/l13/mobys/blarg_gunner.c | 10 +- src/overlays/l13/mobys/blarg_space_fighter.c | 83 ++-- src/overlays/l13/mobys/blarg_turret.c | 28 +- src/overlays/l13/mobys/homing_rocket.c | 7 +- src/overlays/l13/mobys/mine.c | 10 +- src/overlays/l13/mobys/qwarks_starfighter.c | 351 ++++++++--------- src/overlays/l13/mobys/robosquawker.c | 359 +++++++++--------- 8 files changed, 424 insertions(+), 433 deletions(-) diff --git a/include/rnc/overlay/l13/mobys/projectile_moby.h b/include/rnc/overlay/l13/mobys/projectile_moby.h index 2fb2d2d91f..31398953e5 100644 --- a/include/rnc/overlay/l13/mobys/projectile_moby.h +++ b/include/rnc/overlay/l13/mobys/projectile_moby.h @@ -24,10 +24,15 @@ typedef struct ProjectileMoby { char pad28[4]; float scale; char pad30; - unsigned char b31; + unsigned char visible; char pad32[0xE]; ProjectileVec4 rot; - char pad50[0x28]; + char pad50[2]; + char seq; + char prev_seq; + char pad54[0x1C]; + char anim_flags; + char pad71[7]; void *data; char pad7C[0x2A]; short cls_id; diff --git a/src/overlays/l13/mobys/blarg_gunner.c b/src/overlays/l13/mobys/blarg_gunner.c index 8da7b5cd5b..d357a5437b 100644 --- a/src/overlays/l13/mobys/blarg_gunner.c +++ b/src/overlays/l13/mobys/blarg_gunner.c @@ -46,9 +46,9 @@ extern void spawn_explosion(void *, int) __asm__("FUN_L00_0025e450"); typedef struct { - void *unk0; + void *damage_record; /* creature header: points at health */ u8 pad4[0x8]; - void *unkC; + void *hit_flash_record; /* creature header: points at hit_flash */ u8 pad10[0x10]; f32 health; s16 max_health; @@ -59,7 +59,7 @@ typedef struct { u8 pad2B[5]; f32 unk30; u8 pad34[0x2C]; - u8 unk60[0x10]; + u8 hit_flash[0x10]; struct Moby *parent; } Vars; @@ -77,8 +77,8 @@ struct Moby *spawn_blarg_turret_child(struct Moby *parent) { if (child_moby != 0) { child_vars = (Vars *)child_moby->pvars; child_vars->parent = parent; - child_vars->unk0 = &child_vars->health; - child_vars->unkC = child_vars->unk60; + child_vars->damage_record = &child_vars->health; + child_vars->hit_flash_record = child_vars->hit_flash; child_moby->update_dist = parent->update_dist; child_moby->draw_dist = child_vars->parent->draw_dist; child_moby->visible = 1; diff --git a/src/overlays/l13/mobys/blarg_space_fighter.c b/src/overlays/l13/mobys/blarg_space_fighter.c index d06575801c..4bb4a5a0cd 100644 --- a/src/overlays/l13/mobys/blarg_space_fighter.c +++ b/src/overlays/l13/mobys/blarg_space_fighter.c @@ -439,14 +439,14 @@ typedef float Vec_2C56B0[4] __attribute__((aligned(16))); typedef struct Cls_2C56B0 { char pad0[0x10]; - int f10; + int collision; /* MobyClass.collision */ } Cls_2C56B0; typedef struct Veh { char pad0[0x10]; V4_2C56B0 vel; char pad20[0x44]; - float f64; + float speed; } Veh; typedef struct Boss { @@ -462,25 +462,25 @@ typedef struct Moby_2C56B0 { char pad21[3]; Cls_2C56B0 *cls; char pad28[8]; - unsigned char b30; - unsigned char b31; - short h32; + unsigned char update_dist; + unsigned char visible; + short draw_dist; unsigned short flags; char pad36[0x42]; void *data; char pad7C[0x18]; - int f94; + int collision; char pad98[0xE]; - short hA6; + short oclass; char padA8[0xA]; short diagnostic_moby_number; char padB4[8]; - unsigned char bBC; + unsigned char command; } Moby_2C56B0; typedef struct Data_2C56B0 { char pad0[0x20]; - float f20; + float health; short reinitialization_health; char pad26[0x4A]; V4_2C56B0 vel; @@ -505,14 +505,14 @@ typedef struct Hero_2C56B0 { char pad0[0x15F0]; Moby_2C56B0 *veh; char pad15F4[0xA90]; - int f2084; + int state_current; /* Hero.state.current */ } Hero_2C56B0; typedef struct Snd { char pad0[0x74]; - unsigned char b74; + unsigned char voice_state; char pad75[0x13]; - void *f88; + void *voice_owner; } Snd; extern char blarg_space_fighter_missing_path_debug_format[] __asm__("D_L13_001F4700"); @@ -574,7 +574,7 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { } switch (moby->state) { case FIGHTER_INITIALIZE: - if (moby->b30 == 0 && moby->h32 == 0) { + if (moby->update_dist == 0 && moby->draw_dist == 0) { mark_moby_for_removal(moby); return; } @@ -594,13 +594,13 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { qcopy(&fighter_data->path_join_position, path + 0x20); qcopy(&moby->pos, &fighter_data->path_join_position); fighter_data->fire_exit_frame_counter = scale_game_frames(0x14) + 5; - moby->b30 = 0xFF; - moby->h32 = 0xFF; + moby->update_dist = 0xFF; + moby->draw_dist = 0xFF; moby->state = FIGHTER_WAIT_TO_JOIN_PATH; - moby->bBC = 0; + moby->command = 0; moby->flags = (moby->flags | 1) & 0xEFFF; - moby->f94 = 0; - moby->b31 = 0; + moby->collision = 0; + moby->visible = 0; fighter_data->path_node_step = 1; break; case FIGHTER_WAIT_TO_JOIN_PATH: { @@ -608,7 +608,7 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { if (fighter_data->linked_boss_index == -1 || (p = (Moby_2C56B0 *)(D_L13_0015FFD8 + (fighter_data->linked_boss_index << 8))) == 0 || p->state == MOBY_STATE_REMOVAL_AT_OR_ABOVE_INSTANCE_END || - p->state == MOBY_STATE_REMOVAL_BELOW_INSTANCE_END || p->bBC == 4) { + p->state == MOBY_STATE_REMOVAL_BELOW_INSTANCE_END || p->command == 4) { fast_vec_normalize(scratch_vector, D_L13_001670C0 + 0x84, 40.0f); fast_vec_sub(scratch_vector, D_L13_001670C0, scratch_vector); fighter_data->previous_path_node_index = fighter_data->target_path_node_index = @@ -616,8 +616,8 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { qcopy(&fighter_data->path_join_position, path + (fighter_data->previous_path_node_index * 16 + 0x10)); qcopy(&moby->pos, &fighter_data->path_join_position); - moby->f94 = moby->cls->f10; - moby->b31 = 1; + moby->collision = moby->cls->collision; + moby->visible = 1; moby->flags = (moby->flags & 0xFFFE) | 0x1000; moby->state = FIGHTER_FOLLOW_PATH_AND_ATTACK; } @@ -629,15 +629,15 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { float fighter_to_vehicle_distance; FUN_L13_002c37e0_c( - (unsigned char *)moby, (unsigned char *)fighter_data, &fighter_data->f20); + (unsigned char *)moby, (unsigned char *)fighter_data, &fighter_data->health); if (veh != 0 && veh->state != MOBY_STATE_REMOVAL_AT_OR_ABOVE_INSTANCE_END && veh->state != MOBY_STATE_REMOVAL_BELOW_INSTANCE_END) { vehd = veh->data; qcopy(hpos, &((Hero_2C56B0 *)(((char *)&D_0013F350)))->veh->pos); close = 0; fighter_to_vehicle_distance = fast_vec_dist(&moby->pos, hpos); - if (((Hero_2C56B0 *)(((char *)&D_0013F350)))->f2084 == 0x32 && - (veh->hA6 == 0x45 || veh->hA6 == 0x4DA)) { + if (((Hero_2C56B0 *)(((char *)&D_0013F350)))->state_current == 0x32 && + (veh->oclass == 0x45 || veh->oclass == 0x4DA)) { if (fighter_to_vehicle_distance < 110.0f) { close = 1; } @@ -645,7 +645,7 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { } else { qcopy(hpos, ((char *)&D_0013F3D0)); } - if (moby->b31 == 0) { + if (moby->visible == 0) { fighter_data->fire_exit_frame_counter++; } else if (close != 0) { fighter_data->fire_exit_frame_counter = 0; @@ -664,7 +664,7 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { if (boss == 0 || boss->state == MOBY_STATE_REMOVAL_AT_OR_ABOVE_INSTANCE_END || boss->state == MOBY_STATE_REMOVAL_BELOW_INSTANCE_END || boss->state == 1) { moby->state = FIGHTER_WAIT_TO_REINITIALIZE; - moby->f94 = 0; + moby->collision = 0; moby->flags = (moby->flags | 0x41) & 0xEFFF; return; } @@ -672,21 +672,21 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { Snd *e; if (fighter_data->fighter_voice_slot == -1 || (e = (Snd *)(((char *)&D_0013E550) + fighter_data->fighter_voice_slot * 0x70)) - ->f88 != moby || - e->b74 == 0) { + ->voice_owner != moby || + e->voice_state == 0) { fighter_data->fighter_voice_slot = -1; fighter_data->fighter_voice_slot = allocate_voice_for_target_entry(1, 4, moby); } } func_L13_002C5248_56B0(moby, fighter_data, 1); - switch (moby->bBC) { + switch (moby->command) { case FIGHTER_ATTACK_WAIT_TO_FIRE: - if (vehd != 0 && veh->state == 4 && moby->b31 != 0 && close != 0 && boss != 0 && + if (vehd != 0 && veh->state == 4 && moby->visible != 0 && close != 0 && boss != 0 && bossd->firing_fighter_update_count < 3) { fighter_data->attack_phase_timer = scale_game_frames(0x258); fighter_data->aim_offset_radius_scale = 1.0f; fighter_data->fire_exit_frame_counter = 0; - moby->bBC = 1; + moby->command = 1; } break; case FIGHTER_ATTACK_FIRE: @@ -694,17 +694,17 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { bossd->firing_fighter_update_count++; } if (bossd->firing_fighter_update_count < 4) { - if (moby->b31 == 0) { + if (moby->visible == 0) { fighter_data->fire_exit_frame_counter++; } - if (moby->b31 == 0 || close == 0 || + if (moby->visible == 0 || close == 0 || scale_game_frames(0x14) <= fighter_data->fire_exit_frame_counter) { fighter_data->attack_phase_timer = scale_game_frames(0x1E); - moby->bBC = 2; + moby->command = 2; } if (fast_dec_timer(&fighter_data->attack_phase_timer) != 0) { fighter_data->attack_phase_timer = scale_game_frames(0x78); - moby->bBC = 2; + moby->command = 2; } if (fast_dec_timer(&fighter_data->shot_interval_timer) != 0 && optional_glow_suppression_level < 0.9f && @@ -738,7 +738,8 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { lead = vector_distance_xy(&moby->pos, ((char *)&D_0013F3D0)); fast_vec_normalize(vehicle_lead_offset, &vehd->vel, - vehd->f64 * (lead / (vehd->f64 + D_0015ED6C * 50.0f))); + vehd->speed * + (lead / (vehd->speed + D_0015ED6C * 50.0f))); fast_vec_add(scratch_vector, scratch_vector, vehicle_lead_offset); fast_vec_sub(scratch_vector, scratch_vector, &moby->pos); fast_vec_normalize(spawn_position, scratch_vector, 2.6f); @@ -768,7 +769,7 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { break; case FIGHTER_ATTACK_COOLDOWN: if (fast_dec_timer(&fighter_data->attack_phase_timer) != 0) { - moby->bBC = 0; + moby->command = 0; } break; } @@ -780,7 +781,7 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { if (fighter_data->fighter_voice_slot != -1) { Snd *e = (Snd *)(((char *)&D_0013E550) + fighter_data->fighter_voice_slot * 0x70); - if (e->f88 == moby && e->b74 != 0) { + if (e->voice_owner == moby && e->voice_state != 0) { release_voice_slot(fighter_data->fighter_voice_slot); } fighter_data->fighter_voice_slot = -1; @@ -841,7 +842,7 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { } } moby->state = FIGHTER_WAIT_TO_REINITIALIZE; - moby->f94 = 0; + moby->collision = 0; moby->flags = (moby->flags | 0x41) & 0xEFFF; break; } @@ -850,8 +851,8 @@ void blarg_space_fighter_update(Moby_2C56B0 *moby) { if (fighter_data->linked_boss_index != -1 && (p = (Moby_2C56B0 *)(D_L13_0015FFD8 + (fighter_data->linked_boss_index << 8))) != 0 && p->state != MOBY_STATE_REMOVAL_AT_OR_ABOVE_INSTANCE_END && - p->state != MOBY_STATE_REMOVAL_BELOW_INSTANCE_END && p->bBC != 4) { - fighter_data->f20 = fighter_data->reinitialization_health; + p->state != MOBY_STATE_REMOVAL_BELOW_INSTANCE_END && p->command != 4) { + fighter_data->health = fighter_data->reinitialization_health; moby->state = FIGHTER_INITIALIZE; } break; diff --git a/src/overlays/l13/mobys/blarg_turret.c b/src/overlays/l13/mobys/blarg_turret.c index b9f22aa59f..ea63325fe7 100644 --- a/src/overlays/l13/mobys/blarg_turret.c +++ b/src/overlays/l13/mobys/blarg_turret.c @@ -67,13 +67,13 @@ typedef struct Data { Moby_2B5368 *target; char pad44[0xC]; int volume; - float f54; + float home_yaw; char pad58[4]; Moby_2B5368 *gun; - float f60; + float yaw_velocity; float f64; float f68; - float f6C; + float yaw_offset_limit_degrees; char fx[0x10]; } Data; @@ -130,7 +130,7 @@ void blarg_turret_update(Moby_2B5368 *turret_moby) { case BLARG_TURRET_STATE_INITIALIZE: turret_moby->scale = turret_moby->cls->scale * 1.5f; data->gun = FUN_L13_002b4958_2b0e80(turret_moby); - data->f54 = turret_moby->rot.z; + data->home_yaw = turret_moby->rot.z; if (turret_moby->animation_sequence_index != 0) { blend_moby_animation(turret_moby, 0, 0, 10); } @@ -140,7 +140,7 @@ void blarg_turret_update(Moby_2B5368 *turret_moby) { target_yaw_scratch = fast_difference_between_rotations(fast_arc_tan(target_moby->pos.x - turret_moby->pos.x, target_moby->pos.y - turret_moby->pos.y), - data->f54); + data->home_yaw); if (target_yaw_scratch < 1.5707964f && vector_distance_xy(&turret_moby->pos, &target_moby->pos) < 20.0f && (data->volume == -1 || @@ -154,8 +154,8 @@ void blarg_turret_update(Moby_2B5368 *turret_moby) { turret_moby->state = BLARG_TURRET_STATE_TRACK_TARGET; } approach_angle(&turret_moby->rot.z, - data->f54, - &data->f60, + data->home_yaw, + &data->yaw_velocity, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, frame_time * 12.566371f); @@ -173,7 +173,7 @@ void blarg_turret_update(Moby_2B5368 *turret_moby) { target_yaw_scratch = fast_difference_between_rotations(fast_arc_tan(target_moby->pos.x - turret_moby->pos.x, target_moby->pos.y - turret_moby->pos.y), - data->f54); + data->home_yaw); if (target_yaw_scratch >= 1.5707964f || vector_distance_xy(&turret_moby->pos, &target_moby->pos) > 22.0f || (data->volume != -1 && @@ -188,17 +188,17 @@ void blarg_turret_update(Moby_2B5368 *turret_moby) { target_yaw_scratch = fast_subtract_rotations(fast_arc_tan(target_moby->pos.x - turret_moby->pos.x, target_moby->pos.y - turret_moby->pos.y), - data->f54); - yaw_offset_limit_radians = data->f6C * 0.017453292f; + data->home_yaw); + yaw_offset_limit_radians = data->yaw_offset_limit_degrees * 0.017453292f; if (yaw_offset_limit_radians < target_yaw_scratch) { target_yaw_scratch = yaw_offset_limit_radians; } else if (target_yaw_scratch < -yaw_offset_limit_radians) { target_yaw_scratch = -yaw_offset_limit_radians; } - target_yaw_scratch = fast_add_rotations(target_yaw_scratch, data->f54); + target_yaw_scratch = fast_add_rotations(target_yaw_scratch, data->home_yaw); approach_angle(&turret_moby->rot.z, target_yaw_scratch, - &data->f60, + &data->yaw_velocity, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, frame_time * 12.566371f); @@ -241,8 +241,8 @@ void blarg_turret_update(Moby_2B5368 *turret_moby) { } case BLARG_TURRET_STATE_DESTRUCTION_DELAY: approach_angle(&turret_moby->rot.z, - data->f54, - &data->f60, + data->home_yaw, + &data->yaw_velocity, frame_time_sq * 12.566371f, frame_time_sq * 12.566371f, frame_time * 25.132742f); diff --git a/src/overlays/l13/mobys/homing_rocket.c b/src/overlays/l13/mobys/homing_rocket.c index 079cbfd1af..34cc42814e 100644 --- a/src/overlays/l13/mobys/homing_rocket.c +++ b/src/overlays/l13/mobys/homing_rocket.c @@ -100,7 +100,7 @@ typedef struct Hit_2C27B0 { typedef struct Veh_2C27B0 { char pad0[0x64]; - float f64; + float speed; char pad68[0x28]; float lead_yaw_offset; float lead_pitch_offset; @@ -292,7 +292,7 @@ void level_13_homing_rocket_update(ProjectileMoby *rocket_moby) { fast_add_rotations(hero_state->veh->rot.y, vd->lead_pitch_offset); build_spherical_offset_c(&scratch_vector, fast_vec_dist(&rocket_moby->pos, &hero_state->veh->pos) / - (rocket_data->speed + 24.0f) * vd->f64, + (rocket_data->speed + 24.0f) * vd->speed, vehicle_lead_yaw, -vehicle_lead_pitch); fast_vec_add(&scratch_vector, &scratch_vector, &hero_state->veh->pos); @@ -425,7 +425,8 @@ void level_13_homing_rocket_update(ProjectileMoby *rocket_moby) { } } if (fast_dec_timer(&rocket_data->timer) != 0 || - (rocket_moby->b31 == 0 && rocket_data->owner != 0 && rocket_data->owner->b31 != 0)) { + (rocket_moby->visible == 0 && rocket_data->owner != 0 && + rocket_data->owner->visible != 0)) { mark_moby_for_removal(rocket_moby); } } diff --git a/src/overlays/l13/mobys/mine.c b/src/overlays/l13/mobys/mine.c index de8a86b5c3..e5e6fe8baf 100644 --- a/src/overlays/l13/mobys/mine.c +++ b/src/overlays/l13/mobys/mine.c @@ -109,15 +109,15 @@ void level_13_mine_update(ProjectileMoby *moby) { short cls_id; moby->scale += ((moby->cls->scale + moby->cls->scale) - moby->scale) * (D_0015ED60 * 0.1f); - if ((moby->pad50[0x20] & 2) != 0 && (unsigned char)moby->pad50[2] != 2 && - (unsigned char)moby->pad50[3] != 2) { + if ((moby->anim_flags & 2) != 0 && (unsigned char)moby->seq != 2 && + (unsigned char)moby->prev_seq != 2) { blend_moby_animation(moby, 2, 0, 10); } pos = &moby->pos; velocity = (ProjectileVec4 *)(moby_data + 0x60); hero_state = (ProjectileHero *)D_0013F350; if (hero_state->veh != 0 && (distance = fast_vec_dist(pos, &hero_state->veh->pos)) < 60.0f && - moby->b31 != 0) { + moby->visible != 0) { factor = 1.0f - distance / 60.0f; if (factor > 1.0f) factor = 1.0f; @@ -171,7 +171,7 @@ void level_13_mine_update(ProjectileMoby *moby) { flags = 0; } if (flags != 0) { - if (moby->b31 != 0) { + if (moby->visible != 0) { if ((flags & 0x2000) != 0) { func_L00_0025F4A8_alt(moby, velocity, @@ -216,7 +216,7 @@ void level_13_mine_update(ProjectileMoby *moby) { return; } } - if (fast_dec_timer(moby_data + 0x70) != 0 && moby->b31 == 0) { + if (fast_dec_timer(moby_data + 0x70) != 0 && moby->visible == 0) { mark_moby_for_removal(moby); } } diff --git a/src/overlays/l13/mobys/qwarks_starfighter.c b/src/overlays/l13/mobys/qwarks_starfighter.c index 8776812e09..f65fb15492 100644 --- a/src/overlays/l13/mobys/qwarks_starfighter.c +++ b/src/overlays/l13/mobys/qwarks_starfighter.c @@ -658,11 +658,11 @@ struct Moby_2EAE80 { char pad21[0x57]; Vars_2EAE80 *vars; char pad7C[0x28]; - unsigned char bA4; + unsigned char hit_slot; char padA5; short oclass; char padA8[0x14]; - unsigned char bBC; + unsigned char command; }; typedef struct { @@ -684,7 +684,7 @@ typedef struct { char pad104[0x18]; int tractor_beam_voice_slot_index; char pad120[0x18]; - unsigned short h138; + unsigned short voice_line_flags; char pad13A[0xE]; unsigned char b148; } Data_2EAE80; @@ -758,9 +758,9 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { rf = 0; k6 = 6.0f; step = (float)dd->max_health / k6; - hi = (k6 - convert_integer_to_float(moby->bBC)) * step; - if (moby->bBC >= 5) { - hi = (k6 - convert_integer_to_float(moby->bBC - 1)) * step; + hi = (k6 - convert_integer_to_float(moby->command)) * step; + if (moby->command >= 5) { + hi = (k6 - convert_integer_to_float(moby->command - 1)) * step; } lo = hi + step * 0.3f; if (moby_data->first != 0) { @@ -769,28 +769,28 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { if (r != 0 && r->target != 0 && (r->target->oclass == 0x52 || r->target->oclass == 0x53 || r->target->oclass == 0xD4)) { - moby_data->first->bA4 = 0xFF; + moby_data->first->hit_slot = 0xFF; } else if (hit >= 2) { if (0.0f < r->damage_amount && r->damage_adjustment_selector == 0x3F1) { r->damage_amount = 0.3f; } - if (r != 0 && moby->bBC == 7) { + if (r != 0 && moby->command == 7) { r->damage_amount = r->damage_amount * 1.5f; } if (dd->health <= r->damage_amount) { func_L13_002EAC18_2EAE80(moby, moby_data, dd, r); mode = ATTACHMENT_DAMAGE_LETHAL; - moby_data->first->bA4 = 0xFF; + moby_data->first->hit_slot = 0xFF; } else { dd->health = dd->health - r->damage_amount; moby_data->hit_flash.flash_red = 0xFA; mode = ATTACHMENT_DAMAGE_APPLIED; moby_data->sub.h6 = scale_game_frames(0); start_hit_color_flash(moby, &moby_data->hit_flash); - moby_data->first->bA4 = 0xFF; + moby_data->first->hit_slot = 0xFF; } if (moby->state == STARFIGHTER_STATE_DEATH_FLIGHT) { - moby->bBC++; + moby->command++; rf = 1; { Vars_2EAE80 *v = (*(Moby_2EAE80 **)D_00140940)->vars; @@ -801,7 +801,7 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { v->f118 = 0; } } else if (dd->health < hi) { - int tv = l13_starfighter_attachment_slot_indices_by_command[moby->bBC - 1]; + int tv = l13_starfighter_attachment_slot_indices_by_command[moby->command - 1]; if (tv != -1) { allocate_voice_for_target_entry(7, 0, moby); @@ -810,7 +810,7 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { if (moby->state == STARFIGHTER_STATE_TRACTOR_BEAM) { moby->state = STARFIGHTER_STATE_FOLLOW_COMMAND_PATH_WITH_TIMED_VOLLEY; } - moby->bBC++; + moby->command++; if (moby_data->tractor_beam_voice_slot_index != -1) { if (((Voice *)(D_0013E550 + moby_data->tractor_beam_voice_slot_index * 0x70)) @@ -831,11 +831,11 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { v->f8C = 0; v->f118 = 0; } - moby_data->h138 = 0; + moby_data->voice_line_flags = 0; moby_data->b148 = 0; mode = ATTACHMENT_DAMAGE_STAGE_ADVANCED; - if (moby->bBC == 7) { - for (j = moby->bBC - 1; j < 10; j++) { + if (moby->command == 7) { + for (j = moby->command - 1; j < 10; j++) { func_L13_002EAAB8_2EAE80( moby, moby_data, @@ -857,7 +857,7 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { if (r != 0 && r->target != 0 && (r->target->oclass == 0x52 || r->target->oclass == 0x53 || r->target->oclass == 0xD4)) { - moby_data->list[i]->bA4 = 0xFF; + moby_data->list[i]->hit_slot = 0xFF; continue; } if (hit < 2) { @@ -873,23 +873,23 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { break; } } - if (r != 0 && moby->bBC == 7) { + if (r != 0 && moby->command == 7) { r->damage_amount = r->damage_amount * 1.5f; } if (dd->health <= r->damage_amount) { func_L13_002EAC18_2EAE80(moby, moby_data, dd, r); mode = ATTACHMENT_DAMAGE_LETHAL; - moby_data->list[i]->bA4 = 0xFF; + moby_data->list[i]->hit_slot = 0xFF; } else { dd->health = dd->health - r->damage_amount; moby_data->hit_flash.flash_red = 0xFA; mode = ATTACHMENT_DAMAGE_APPLIED; moby_data->sub.h6 = scale_game_frames(0); start_hit_color_flash(moby, &moby_data->hit_flash); - moby_data->list[i]->bA4 = 0xFF; + moby_data->list[i]->hit_slot = 0xFF; } if (moby->state == STARFIGHTER_STATE_DEATH_FLIGHT) { - moby->bBC++; + moby->command++; rf = 1; { Vars_2EAE80 *v = ((Hero_2EAE80 *)&hero)->piloted_ship_moby->vars; @@ -900,7 +900,7 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { v->f118 = 0; } } else if (dd->health < hi) { - int tv = l13_starfighter_attachment_slot_indices_by_command[moby->bBC - 1]; + int tv = l13_starfighter_attachment_slot_indices_by_command[moby->command - 1]; if (tv != -1) { func_L13_002EAAB8_2EAE80(moby, moby_data, tv); @@ -909,7 +909,7 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { if (moby->state == STARFIGHTER_STATE_TRACTOR_BEAM) { moby->state = STARFIGHTER_STATE_FOLLOW_COMMAND_PATH_WITH_TIMED_VOLLEY; } - moby->bBC++; + moby->command++; if (moby_data->tractor_beam_voice_slot_index != -1) { if (((Voice *)(D_0013E550 + moby_data->tractor_beam_voice_slot_index * 0x70)) ->f88 == moby && @@ -928,11 +928,11 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { v->f8C = 0; v->f118 = 0; } - moby_data->h138 = 0; + moby_data->voice_line_flags = 0; moby_data->b148 = 0; mode = ATTACHMENT_DAMAGE_STAGE_ADVANCED; - if (moby->bBC == 7) { - for (k = moby->bBC - 1; k < 10; k++) { + if (moby->command == 7) { + for (k = moby->command - 1; k < 10; k++) { func_L13_002EAAB8_2EAE80( moby, moby_data, l13_starfighter_attachment_slot_indices_by_command[k]); } @@ -944,7 +944,7 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { } if (mode > ATTACHMENT_DAMAGE_NONE) { if (rf != 0) { - switch (moby->bBC - 1) { + switch (moby->command - 1) { case DAMAGE_STAGE_SKIP_LINE_QUEUE: break; case DAMAGE_STAGE_QUEUE_RANDOM_LINE: @@ -968,14 +968,14 @@ void process_moby_attachment_damage(Moby_2EAE80 *moby, Data_2EAE80 *moby_data) { case DAMAGE_STAGE_SKIP_LINE_QUEUE_SECOND_ALTERNATE: break; } - } else if (moby->bBC == 7 && moby_data->b148 != 0) { - if (!(moby_data->h138 & 1) && + } else if (moby->command == 7 && moby_data->b148 != 0) { + if (!(moby_data->voice_line_flags & 1) && func_L13_002E9B30_2EAE80(moby, moby_data, 0x14, 2) != 0) { - moby_data->h138 |= 1; + moby_data->voice_line_flags |= 1; } - if (!(moby_data->h138 & 2) && + if (!(moby_data->voice_line_flags & 2) && func_L13_002E9B30_2EAE80(moby, moby_data, 0x14, 2) != 0) { - moby_data->h138 |= 2; + moby_data->voice_line_flags |= 2; } } } @@ -1450,57 +1450,58 @@ void update_qwarks_starfighter_attack_commands(void *mobyp, void *pp) { } typedef struct { - char pad0[0x20]; - float f20; - short starfighter_max_health; - char pad26[0x4A]; - float f70; - float flight_velocity_y; - int i78; - int pad7C; - float tractor_beam_endpoint[4]; - char pad90[0xC]; - short path_target_node_index; - short path_previous_node_index; - int iA0; - float pitch_spring_velocity; - float yaw_spring_velocity; - float flight_speed; - int paths[5]; - char *parts[10]; - char *owner; - char *command_joint_attachment_moby; - int iF4; - int attack_and_death_timer_frames; - unsigned char rocket_muzzle_toggle; - unsigned char attack_sequence_counter; - unsigned char mine_attack_selected; - unsigned char tractor_beam_capture_active; - int tractor_beam_cycle_timer_frames; - int hud104; - int health_hud_packed_value; - unsigned char path_traversal_direction; - unsigned char b10D; - unsigned char b10E; - unsigned char b10F; - char *child110; - int snd114; - int snd118; - int snd11C; - int light120; - int attack_cooldown_frames; - int pad128; - int vendor_item_id; - int pad130; - int linked_ship_moby_index; - unsigned short h138; - unsigned char queued_voice_line_pending; - unsigned char selected_path_slot; - int voice_line_history_mask; - int pad140; - short long_voice_line_cooldown_frames; - short short_voice_line_cooldown_frames; - unsigned char b148; + char pad0[0x20]; + float health; + short starfighter_max_health; + char pad26[0x4A]; + float flight_velocity_x; + float flight_velocity_y; + int i78; + int pad7C; + float tractor_beam_endpoint[4]; + char pad90[0xC]; + short path_target_node_index; + short path_previous_node_index; + int iA0; + float pitch_spring_velocity; + float yaw_spring_velocity; + float flight_speed; + int paths[5]; + char *parts[10]; + char *owner; + char *command_joint_attachment_moby; + int iF4; + int attack_and_death_timer_frames; + unsigned char rocket_muzzle_toggle; + unsigned char attack_sequence_counter; + unsigned char mine_attack_selected; + unsigned char tractor_beam_capture_active; + int tractor_beam_cycle_timer_frames; + int health_hud_handle; /* queue_animation_update handle */ + int health_hud_packed_value; + unsigned char path_traversal_direction; + unsigned char b10D; + unsigned char b10E; + unsigned char b10F; + char *child110; + int snd114; + int shield_voice; + int tractor_beam_voice; + int light120; + int attack_cooldown_frames; + int pad128; + int vendor_item_id; + int pad130; + int linked_ship_moby_index; + unsigned short + voice_line_flags; /* bits for lines already queued; a count while the owner is gone */ + unsigned char queued_voice_line_pending; + unsigned char selected_path_slot; + int voice_line_history_mask; + int pad140; + short long_voice_line_cooldown_frames; + short short_voice_line_cooldown_frames; + unsigned char b148; } Ship388; typedef struct { @@ -1512,21 +1513,21 @@ typedef struct { int pad28; float scale; unsigned char update_distance; - unsigned char b31; - short s32; + unsigned char visible; + short draw_dist; unsigned short flags; char pad36[0xA]; float rot[4]; char pad50[0x28]; Ship388 *d; char pad7C[0x18]; - int i94; + int collision; char pad98[0xE]; short cls_id; char padA8[8]; unsigned char visited_slot_index; char padB1[0xB]; - unsigned char bBC; + unsigned char command; char padBD[3]; float mat[3][4]; } Moby388; @@ -1641,13 +1642,13 @@ void qwarks_starfighter_update(Moby388 *moby) { int i; starfighter_vars->health_hud_packed_value = - truncate_float_to_s32(starfighter_vars->f20 * 16.0f) & 0xFFF0; + truncate_float_to_s32(starfighter_vars->health * 16.0f) & 0xFFF0; if (starfighter_vars->health_hud_packed_value >= truncate_float_to_s32(((float)starfighter_vars->starfighter_max_health - 0.5f) * 16.0f)) { starfighter_vars->health_hud_packed_value |= 0xF; } - if (0.5f < starfighter_vars->f20) { - int segment = ((truncate_float_to_s32(starfighter_vars->f20) % + if (0.5f < starfighter_vars->health) { + int segment = ((truncate_float_to_s32(starfighter_vars->health) % (starfighter_vars->starfighter_max_health / 6)) * 16) / (starfighter_vars->starfighter_max_health / 6); @@ -1679,7 +1680,8 @@ void qwarks_starfighter_update(Moby388 *moby) { } } starfighter_vars->flight_speed = frame_time * 42.0f * 0.1f; - starfighter_vars->f70 = fast_cos(moby->rot[2]) * starfighter_vars->flight_speed; + starfighter_vars->flight_velocity_x = + fast_cos(moby->rot[2]) * starfighter_vars->flight_speed; starfighter_vars->flight_velocity_y = fast_sin(moby->rot[2]) * starfighter_vars->flight_speed; starfighter_vars->i78 = 0; @@ -1687,7 +1689,7 @@ void qwarks_starfighter_update(Moby388 *moby) { starfighter_vars->path_previous_node_index = 0; starfighter_vars->path_target_node_index = 1; moby->update_distance = 0xFF; - moby->s32 = 0xFF; + moby->draw_dist = 0xFF; starfighter_vars->path_traversal_direction = 1; starfighter_vars->mine_attack_selected = 0; starfighter_vars->rocket_muzzle_toggle = 0; @@ -1695,18 +1697,18 @@ void qwarks_starfighter_update(Moby388 *moby) { starfighter_vars->b10E = 8; starfighter_vars->child110 = 0; starfighter_vars->snd114 = -1; - starfighter_vars->snd118 = -1; - starfighter_vars->snd11C = -1; - starfighter_vars->f20 = starfighter_vars->starfighter_max_health; + starfighter_vars->shield_voice = -1; + starfighter_vars->tractor_beam_voice = -1; + starfighter_vars->health = starfighter_vars->starfighter_max_health; starfighter_vars->light120 = -1; - starfighter_vars->h138 = 0; + starfighter_vars->voice_line_flags = 0; starfighter_vars->b148 = 0; starfighter_vars->voice_line_history_mask = 0; - if (starfighter_vars->hud104 != -1) { - set_animation_parameter(starfighter_vars->hud104, 0); - starfighter_vars->hud104 = -1; + if (starfighter_vars->health_hud_handle != -1) { + set_animation_parameter(starfighter_vars->health_hud_handle, 0); + starfighter_vars->health_hud_handle = -1; } - moby->i94 = 0; + moby->collision = 0; moby->flags |= 0x41; break; } @@ -1714,8 +1716,8 @@ void qwarks_starfighter_update(Moby388 *moby) { char *hero = ((char *)&D_0013F350); if (*(int *)(hero + 0x2084) == 0x32 && *(Moby388 **)(hero + 0x15F0) != 0) { moby->flags &= 0xFFBE; - moby->i94 = *(int *)(moby->cls + 0x10); - moby->s32 = 0x3FF; + moby->collision = *(int *)(moby->cls + 0x10); + moby->draw_dist = 0x3FF; if (*(Moby388 **)(hero + 0x15F0) != 0) { char *ship = (char *)(*(Moby388 **)(hero + 0x15F0))->d; int elapsed; @@ -1730,12 +1732,12 @@ void qwarks_starfighter_update(Moby388 *moby) { if (elapsed >= 0x29) { DebugPrint_alt(qwarks_starfighter_high_elapsed_time_adjustment_message); starfighter_vars->starfighter_max_health = 0x66; - starfighter_vars->f20 = 102.0f; + starfighter_vars->health = 102.0f; *(int *)(ship + 0x138) = 0x221; } else if (elapsed >= 0x1A) { DebugPrint_alt(qwarks_starfighter_mid_elapsed_time_adjustment_message); starfighter_vars->starfighter_max_health = 0x78; - starfighter_vars->f20 = 120.0f; + starfighter_vars->health = 120.0f; *(int *)(ship + 0x138) = 0x234; } } @@ -1748,10 +1750,10 @@ void qwarks_starfighter_update(Moby388 *moby) { char *hero = ((char *)&D_0013F350); if (*(Moby388 **)(hero + 0x15F0) != 0 && (*(Moby388 **)(hero + 0x15F0))->cls_id == 0x45) { - (*(Moby388 **)(hero + 0x15F0))->bBC = 0; + (*(Moby388 **)(hero + 0x15F0))->command = 0; } } - starfighter_vars->hud104 = + starfighter_vars->health_hud_handle = queue_animation_update(0x11, 0xFFFF, (int)reset_numeric_hud_element, @@ -1764,13 +1766,14 @@ void qwarks_starfighter_update(Moby388 *moby) { if (advance_moby_along_selected_path(moby, starfighter_vars, 0, 1) != 0) { char *hero = ((char *)&D_0013F350); char *ship; - moby->bBC = 1; + moby->command = 1; ship = (char *)(*(Moby388 **)(hero + 0x15F0))->d; *(int *)(ship + 0x88) = 0; *(int *)(ship + 0xEC) = 0; *(int *)(ship + 0x8C) = 0; *(int *)(ship + 0x118) = 0; - starfighter_vars->selected_path_slot = qwarks_starfighter_command_path_slots[moby->bBC]; + starfighter_vars->selected_path_slot = + qwarks_starfighter_command_path_slots[moby->command]; starfighter_vars->attack_and_death_timer_frames = scale_game_frames(0x14); moby->state = STARFIGHTER_STATE_FOLLOW_COMMAND_PATH; starfighter_vars->path_target_node_index = select_point_index_by_distance( @@ -1796,7 +1799,7 @@ void qwarks_starfighter_update(Moby388 *moby) { } case STARFIGHTER_STATE_FOLLOW_COMMAND_PATH: case STARFIGHTER_STATE_FOLLOW_COMMAND_PATH_WITH_TIMED_VOLLEY: - starfighter_vars->hud104 = + starfighter_vars->health_hud_handle = queue_animation_update(0x11, 0xFFFF, (int)reset_numeric_hud_element, @@ -1806,40 +1809,40 @@ void qwarks_starfighter_update(Moby388 *moby) { (starfighter_vars->starfighter_max_health << 4) | 0xF); if (*(Moby388 **)(((char *)&D_00140940)) != 0 && (*(Moby388 **)(((char *)&D_00140940)))->cls_id == 0x45) { - (*(Moby388 **)(((char *)&D_00140940)))->bBC = 0; + (*(Moby388 **)(((char *)&D_00140940)))->command = 0; } update_qwarks_starfighter_attack_commands(moby, starfighter_vars); if (update_moby_path_following_away_from_hero( moby, starfighter_vars, starfighter_vars->selected_path_slot, 1) & 2) { if (starfighter_vars->selected_path_slot != - qwarks_starfighter_command_path_slots[moby->bBC]) { + qwarks_starfighter_command_path_slots[moby->command]) { starfighter_vars->selected_path_slot = - qwarks_starfighter_command_path_slots[moby->bBC]; + qwarks_starfighter_command_path_slots[moby->command]; starfighter_vars->path_target_node_index = select_point_index_by_distance( moby->pos, walker_paths[starfighter_vars - ->paths[qwarks_starfighter_command_path_slots[moby->bBC]]], + ->paths[qwarks_starfighter_command_path_slots[moby->command]]], 0.0f); starfighter_vars->path_target_node_index = *(unsigned short *)((char *)starfighter_vars + 0x9C) + random_int_between(3, 7); starfighter_vars->path_target_node_index = starfighter_vars->path_target_node_index % *(int *) - walker_paths[starfighter_vars - ->paths[qwarks_starfighter_command_path_slots[moby->bBC]]]; + walker_paths[starfighter_vars->paths + [qwarks_starfighter_command_path_slots[moby->command]]]; starfighter_vars->path_previous_node_index = starfighter_vars->path_target_node_index - 1; if (starfighter_vars->path_previous_node_index < 0) { starfighter_vars->path_previous_node_index = - *(unsigned short *) - walker_paths[starfighter_vars->paths - [qwarks_starfighter_command_path_slots[moby->bBC]]] - + *(unsigned short *)walker_paths + [starfighter_vars + ->paths[qwarks_starfighter_command_path_slots[moby->command]]] - 1; } } } - if (moby->bBC != 4) { + if (moby->command != 4) { process_moby_attachment_damage(moby, starfighter_vars); } else { update_hit_color_flash(moby, (char *)starfighter_vars + 0x60); @@ -1847,7 +1850,7 @@ void qwarks_starfighter_update(Moby388 *moby) { break; case STARFIGHTER_STATE_TRACTOR_BEAM: { float hero_distance; - starfighter_vars->hud104 = + starfighter_vars->health_hud_handle = queue_animation_update(0x11, 0xFFFF, (int)reset_numeric_hud_element, @@ -1859,20 +1862,20 @@ void qwarks_starfighter_update(Moby388 *moby) { FUN_L00_0024f7c8(moby, 0x13, joint); hero_distance = fast_vec_dist(starfighter_vars->tractor_beam_endpoint, ((char *)&D_0013F3D0)); - if (starfighter_vars->snd11C != -1) { - char *voice = D_0013E633_snd + 0x1D + starfighter_vars->snd11C * 0x70; + if (starfighter_vars->tractor_beam_voice != -1) { + char *voice = D_0013E633_snd + 0x1D + starfighter_vars->tractor_beam_voice * 0x70; if (*(Moby388 **)(voice + 0x88) == moby && *(unsigned char *)(voice + 0x74) != 0) - goto have11C; + goto have_tractor_beam_voice; } - starfighter_vars->snd11C = -1; - starfighter_vars->snd11C = allocate_voice_for_target_entry(4, 4, (int)moby); - have11C: + starfighter_vars->tractor_beam_voice = -1; + starfighter_vars->tractor_beam_voice = allocate_voice_for_target_entry(4, 4, (int)moby); + have_tractor_beam_voice: if (starfighter_vars->tractor_beam_capture_active == 0) { { char *hero = ((char *)&D_0013F350); if (*(Moby388 **)(hero + 0x15F0) != 0 && (*(Moby388 **)(hero + 0x15F0))->cls_id == 0x45) { - (*(Moby388 **)(hero + 0x15F0))->bBC = 0; + (*(Moby388 **)(hero + 0x15F0))->command = 0; } } starfighter_vars->flight_speed += @@ -1887,9 +1890,9 @@ void qwarks_starfighter_update(Moby388 *moby) { } else { qcopy(offset, ((char *)&D_0013F3D0)); starfighter_vars->attack_and_death_timer_frames = scale_game_frames(0x78); - if (!(starfighter_vars->h138 & 4)) { + if (!(starfighter_vars->voice_line_flags & 4)) { if (queue_starfighter_voice_line(moby, starfighter_vars, 0x17, 4) != 0) { - starfighter_vars->h138 |= 4; + starfighter_vars->voice_line_flags |= 4; } } starfighter_vars->tractor_beam_capture_active = 1; @@ -1898,29 +1901,29 @@ void qwarks_starfighter_update(Moby388 *moby) { moby, starfighter_vars, starfighter_vars->selected_path_slot, 1) & 2) { if (starfighter_vars->selected_path_slot != - qwarks_starfighter_command_path_slots[moby->bBC]) { + qwarks_starfighter_command_path_slots[moby->command]) { starfighter_vars->selected_path_slot = - qwarks_starfighter_command_path_slots[moby->bBC]; + qwarks_starfighter_command_path_slots[moby->command]; starfighter_vars->path_target_node_index = select_point_index_by_distance( moby->pos, - walker_paths[starfighter_vars - ->paths[qwarks_starfighter_command_path_slots[moby->bBC]]], + walker_paths[starfighter_vars->paths + [qwarks_starfighter_command_path_slots[moby->command]]], 0.0f); starfighter_vars->path_target_node_index = *(unsigned short *)((char *)starfighter_vars + 0x9C) + random_int_between(3, 7); starfighter_vars->path_target_node_index = starfighter_vars->path_target_node_index % - *(int *) - walker_paths[starfighter_vars->paths - [qwarks_starfighter_command_path_slots[moby->bBC]]]; + *(int *)walker_paths + [starfighter_vars + ->paths[qwarks_starfighter_command_path_slots[moby->command]]]; starfighter_vars->path_previous_node_index = starfighter_vars->path_target_node_index - 1; if (starfighter_vars->path_previous_node_index < 0) { starfighter_vars->path_previous_node_index = *(unsigned short *)walker_paths - [starfighter_vars - ->paths[qwarks_starfighter_command_path_slots[moby->bBC]]] - + [starfighter_vars->paths + [qwarks_starfighter_command_path_slots[moby->command]]] - 1; } } @@ -1936,7 +1939,7 @@ void qwarks_starfighter_update(Moby388 *moby) { } qcopy(probe, starfighter_vars->tractor_beam_endpoint); probe[3] = 1.0f; - if (fast_bsphere_check(probe, 100.0f) <= 0 && moby->b31 == 0) { + if (fast_bsphere_check(probe, 100.0f) <= 0 && moby->visible == 0) { DebugPrint_alt(qwarks_starfighter_tractor_offscreen_abort_message); starfighter_vars->tractor_beam_cycle_timer_frames = 0; } @@ -1954,7 +1957,7 @@ void qwarks_starfighter_update(Moby388 *moby) { update_moby_spring_steering_and_banking(moby, starfighter_vars, yaw, pitch); if (*(Moby388 **)(hero + 0x15F0) != 0 && (*(Moby388 **)(hero + 0x15F0))->cls_id == 0x45) { - (*(Moby388 **)(hero + 0x15F0))->bBC = 1; + (*(Moby388 **)(hero + 0x15F0))->command = 1; } starfighter_vars->flight_speed *= 0.8f; fast_vec_dist(moby->pos, ((char *)&D_0013F3D0)); @@ -2006,7 +2009,7 @@ void qwarks_starfighter_update(Moby388 *moby) { } } } - if (moby->bBC != 4) { + if (moby->command != 4) { process_moby_attachment_damage(moby, starfighter_vars); } else { update_hit_color_flash(moby, (char *)starfighter_vars + 0x60); @@ -2026,14 +2029,14 @@ void qwarks_starfighter_update(Moby388 *moby) { char *dialog; if (*(Moby388 **)(((char *)&D_00140940)) != 0 && (*(Moby388 **)(((char *)&D_00140940)))->cls_id == 0x45) { - (*(Moby388 **)(((char *)&D_00140940)))->bBC = 0; + (*(Moby388 **)(((char *)&D_00140940)))->command = 0; } advance_moby_along_selected_path( moby, starfighter_vars, starfighter_vars->selected_path_slot, 1); dialog = (char *)&music_stream_state; if (*(int *)(dialog + 0x50) == 0) { int line = *(int *)(dialog + 0x1C); - if (line == -1 && (short)starfighter_vars->h138 <= 0) { + if (line == -1 && (short)starfighter_vars->voice_line_flags <= 0) { if (queue_starfighter_voice_line( moby, starfighter_vars, @@ -2041,7 +2044,7 @@ void qwarks_starfighter_update(Moby388 *moby) { 1) != 0) { l13_starfighter_owner_unavailable_voice_line_index = (l13_starfighter_owner_unavailable_voice_line_index + 1) % 4; - starfighter_vars->h138 += 1; + starfighter_vars->voice_line_flags += 1; } } } @@ -2051,7 +2054,7 @@ void qwarks_starfighter_update(Moby388 *moby) { float target_yaw, target_pitch; if (*(Moby388 **)(((char *)&D_00140940)) != 0 && (*(Moby388 **)(((char *)&D_00140940)))->cls_id == 0x45) { - (*(Moby388 **)(((char *)&D_00140940)))->bBC = 0; + (*(Moby388 **)(((char *)&D_00140940)))->command = 0; } if (starfighter_vars->attack_and_death_timer_frames == 1) { detach_moby_joint_attachment(moby, starfighter_vars, 8); @@ -2140,7 +2143,7 @@ void qwarks_starfighter_update(Moby388 *moby) { char *view; if (*(Moby388 **)(((char *)&D_00140940)) != 0 && (*(Moby388 **)(((char *)&D_00140940)))->cls_id == 0x45) { - (*(Moby388 **)(((char *)&D_00140940)))->bBC = 0; + (*(Moby388 **)(((char *)&D_00140940)))->command = 0; } moby->rot[0] = fast_add_rotations(moby->rot[0], frame_time * 4.1887903f); view = jet_camera47; @@ -2149,7 +2152,7 @@ void qwarks_starfighter_update(Moby388 *moby) { moby->scale *= 0.98f; if (starfighter_vars->attack_and_death_timer_frames == scale_game_frames(0x1E)) { spawn_explosion(moby, - &starfighter_vars->f70, + &starfighter_vars->flight_velocity_x, 0, 0.0f, 0.0f, @@ -2200,12 +2203,12 @@ void qwarks_starfighter_update(Moby388 *moby) { parts[i] = 0; } } - if (starfighter_vars->snd118 != -1) { - char *voice = D_0013E633_snd + 0x1D + starfighter_vars->snd118 * 0x70; + if (starfighter_vars->shield_voice != -1) { + char *voice = D_0013E633_snd + 0x1D + starfighter_vars->shield_voice * 0x70; if (*(Moby388 **)(voice + 0x88) == moby && *(unsigned char *)(voice + 0x74) != 0) { - release_voice_slot(starfighter_vars->snd118); + release_voice_slot(starfighter_vars->shield_voice); } - starfighter_vars->snd118 = -1; + starfighter_vars->shield_voice = -1; } if (starfighter_vars->snd114 != -1) { char *voice = D_0013E633_snd + 0x1D + starfighter_vars->snd114 * 0x70; @@ -2214,19 +2217,19 @@ void qwarks_starfighter_update(Moby388 *moby) { } starfighter_vars->snd114 = -1; } - if (starfighter_vars->snd11C != -1) { - char *voice = D_0013E633_snd + 0x1D + starfighter_vars->snd11C * 0x70; + if (starfighter_vars->tractor_beam_voice != -1) { + char *voice = D_0013E633_snd + 0x1D + starfighter_vars->tractor_beam_voice * 0x70; if (*(Moby388 **)(voice + 0x88) == moby && *(unsigned char *)(voice + 0x74) != 0) { - release_voice_slot(starfighter_vars->snd11C); + release_voice_slot(starfighter_vars->tractor_beam_voice); } - starfighter_vars->snd11C = -1; + starfighter_vars->tractor_beam_voice = -1; } if (starfighter_vars->light120 != -1) { release_point_light_slot(starfighter_vars->light120); } - if (starfighter_vars->hud104 != -1) { - set_animation_parameter(starfighter_vars->hud104, 0); - starfighter_vars->hud104 = -1; + if (starfighter_vars->health_hud_handle != -1) { + set_animation_parameter(starfighter_vars->health_hud_handle, 0); + starfighter_vars->health_hud_handle = -1; } path = walker_paths[starfighter_vars->paths[0]]; qcopy(moby->pos, path + 0x10); @@ -2250,15 +2253,15 @@ void qwarks_starfighter_update(Moby388 *moby) { starfighter_vars->b10E = 0; starfighter_vars->b10F = 0; starfighter_vars->attack_cooldown_frames = 0; - starfighter_vars->h138 = 0; + starfighter_vars->voice_line_flags = 0; starfighter_vars->queued_voice_line_pending = 0; starfighter_vars->selected_path_slot = 0; starfighter_vars->voice_line_history_mask = 0; starfighter_vars->long_voice_line_cooldown_frames = 0; starfighter_vars->short_voice_line_cooldown_frames = 0; starfighter_vars->b148 = 0; - moby->bBC = 0; - qzero(&starfighter_vars->f70); + moby->command = 0; + qzero(&starfighter_vars->flight_velocity_x); qzero(starfighter_vars->tractor_beam_endpoint); moby->state = STARFIGHTER_STATE_INITIALIZE; return; @@ -2278,29 +2281,29 @@ void qwarks_starfighter_update(Moby388 *moby) { if (moby->pos[2] > 1001.0f) moby->pos[2] = 1001.0f; - if (moby->bBC == 4) { + if (moby->command == 4) { if (starfighter_vars->child110 == 0) { starfighter_vars->child110 = spawn_qwarks_starfighter_shield(moby); } else if (((Moby388 *)starfighter_vars->child110)->state >= 3) { ((Moby388 *)starfighter_vars->child110)->state = 1; } - if (starfighter_vars->snd118 != -1) { - char *voice = D_0013E633_snd + 0x1D + starfighter_vars->snd118 * 0x70; + if (starfighter_vars->shield_voice != -1) { + char *voice = D_0013E633_snd + 0x1D + starfighter_vars->shield_voice * 0x70; if (*(Moby388 **)(voice + 0x88) == moby && *(unsigned char *)(voice + 0x74) != 0) - goto have118; + goto have_shield_voice; } - starfighter_vars->snd118 = -1; - starfighter_vars->snd118 = allocate_voice_for_target_entry(6, 4, (int)moby); - have118:; + starfighter_vars->shield_voice = -1; + starfighter_vars->shield_voice = allocate_voice_for_target_entry(6, 4, (int)moby); + have_shield_voice:; } else { if (starfighter_vars->child110 != 0) { Moby388 *child; - if (starfighter_vars->snd118 != -1) { - char *voice = D_0013E633_snd + 0x1D + starfighter_vars->snd118 * 0x70; + if (starfighter_vars->shield_voice != -1) { + char *voice = D_0013E633_snd + 0x1D + starfighter_vars->shield_voice * 0x70; if (*(Moby388 **)(voice + 0x88) == moby && *(unsigned char *)(voice + 0x74) != 0) { - release_voice_slot(starfighter_vars->snd118); + release_voice_slot(starfighter_vars->shield_voice); } - starfighter_vars->snd118 = -1; + starfighter_vars->shield_voice = -1; } child = (Moby388 *)starfighter_vars->child110; if (child == 0) { @@ -2360,9 +2363,9 @@ void qwarks_starfighter_update(Moby388 *moby) { 1) != 0) { l13_starfighter_owner_unavailable_voice_line_index = (l13_starfighter_owner_unavailable_voice_line_index + 1) % 4; - starfighter_vars->h138 = 1; + starfighter_vars->voice_line_flags = 1; } else { - starfighter_vars->h138 = 0; + starfighter_vars->voice_line_flags = 0; } } } diff --git a/src/overlays/l13/mobys/robosquawker.c b/src/overlays/l13/mobys/robosquawker.c index ff7999c759..2865d4d8bb 100644 --- a/src/overlays/l13/mobys/robosquawker.c +++ b/src/overlays/l13/mobys/robosquawker.c @@ -1,5 +1,7 @@ /* Level 13 robosquawker moby class: target selection, particle, ground height and update. */ #include "types.h" +#include "rnc/overlay/shared/mobys/knockback_motion.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" #include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "sda.h" #include "rnc/overlay/shared/rendering/effects/create_part.h" @@ -248,7 +250,7 @@ typedef struct { char pad0[0x20]; unsigned char state; char pad21[0x85]; - short hA6; + short oclass; } RsTargetMoby; typedef struct { @@ -261,72 +263,49 @@ typedef struct { } RsTarget; typedef struct { - char pad0[0x20]; - float health; - short max_health; - short damage_cooldown_frames; - unsigned char hit_response_class; - unsigned char b29; - char pad2A[0xE]; - int alert_refresh_requested; - char pad3C[4]; - RsVec v40; - char pad50[8]; - unsigned char b58; - char pad59; - unsigned char b5A; - char pad5B[0x6D]; - short hC8; - char padCA[6]; - void *pD0; - char padD4[0x3C]; - struct HitColorFlash hit_flash; - char x120[0x10]; - float motion_gravity_step; - float motion_horizontal_speed_change_limit; - float motion_horizontal_launch_step; - float motion_vertical_launch_step; - int motion_collision_radius_fixed_point; - int motion_behavior_flags; - float motion_bounce_restitution; - char pad14C[0x11]; - unsigned char b15D; - char pad15E[0x12]; - float motion_ascent_end_animation_frame; - float motion_descent_end_animation_frame; - char pad178[8]; - int w180; - int w184; - float ground_max_drop_height; - float ground_max_rise_height; - char pad190[8]; - float ground_vertical_step; - char pad19C[8]; - float ground_movement_step_length; - char pad1A8[0x10]; - int ground_movement_flags; - char pad1BC[0x14]; - RsVec home_position; - RsVec flight_destination; - float yaw_turn_step; - float chase_yaw_offset_radians; - float chase_yaw_offset_degrees; - float target_engagement_radius; - float default_target_engagement_radius; - float walking_speed; - short h208; - short ground_idle_preference; - int random_flight_timer_frames; - int chase_yaw_flip_timer_frames; - short alert_timer_frames; - short walk_range_radius; - char *walk_range_anchor; - int ground_navigation_path_index; - int flight_path_index; - int flight_waypoint_index; - void *p228; - int target_clip_volume_index; - unsigned char x230[1]; + char pad0[0x20]; + float health; + short max_health; + short damage_cooldown_frames; + unsigned char hit_response_class; + unsigned char b29; + char pad2A[0xE]; + int alert_refresh_requested; + char pad3C[4]; + RsVec velocity; + char pad50[8]; + unsigned char b58; + char pad59; + unsigned char b5A; + char pad5B[0x6D]; + short hC8; + char padCA[6]; + void *pD0; + char padD4[0x3C]; + struct HitColorFlash hit_flash; + struct KnockbackMotion knockback; + struct GroundMoveControl move; + RsVec home_position; + RsVec flight_destination; + float yaw_turn_step; + float chase_yaw_offset_radians; + float chase_yaw_offset_degrees; + float target_engagement_radius; + float default_target_engagement_radius; + float walking_speed; + short h208; + short ground_idle_preference; + int random_flight_timer_frames; + int chase_yaw_flip_timer_frames; + short alert_timer_frames; + short walk_range_radius; + char *walk_range_anchor; + int ground_navigation_path_index; + int flight_path_index; + int flight_waypoint_index; + void *p228; + int target_clip_volume_index; + unsigned char big_head_manipulator[1]; } RsVars; typedef struct { @@ -335,32 +314,32 @@ typedef struct { unsigned char state; unsigned char command_recipient_list_index; char pad22[2]; - char *w24; + char *pclass; char pad28[9]; - unsigned char b31; + unsigned char visible; char pad32[2]; - unsigned short h34; + unsigned short flags; char pad36[0xA]; RsVec rot; char pad50[2]; - unsigned char b52; + unsigned char seq; unsigned char animation_index; char pad54[4]; float animation_playback_speed; char pad5C[0x14]; - unsigned char b70; + unsigned char anim_flags; char pad71[7]; RsVars *vars; char pad7C[3]; - unsigned char b7F; + unsigned char shadow_range; char pad80[0x14]; - int w94; + int collision; char pad98[0xC]; - unsigned char bA4; + unsigned char hit_slot; char padA5; - unsigned short hA6; + unsigned short oclass; char padA8[0x14]; - unsigned char bBC; + unsigned char command; } RsMoby; typedef struct RsOther { @@ -370,7 +349,7 @@ typedef struct RsOther { char pad21[7]; struct RsOther *next; char pad2C[0x7A]; - short hA6; + short oclass; } RsOther; typedef struct { @@ -485,20 +464,20 @@ void robosquawker_update(RsMoby *robosquawker_moby) { RsTargetMoby *tm; robosquawker_vars = robosquawker_moby->vars; - FUN_L00_00263ac8(2.5f, (int)robosquawker_moby, 0, robosquawker_vars->x230); - if (robosquawker_moby->b31 != 0) { + FUN_L00_00263ac8(2.5f, (int)robosquawker_moby, 0, robosquawker_vars->big_head_manipulator); + if (robosquawker_moby->visible != 0) { if (fast_vec_dist(&robosquawker_moby->pos, D_L13_001670C0) < 28.0f) { FUN_L00_0025a120(robosquawker_moby); - robosquawker_moby->b7F = 0x16; + robosquawker_moby->shadow_range = 0x16; } } if (D_L13_0015F5C4 == 2) { - robosquawker_moby->w94 = 0; - robosquawker_moby->h34 |= 0x41; + robosquawker_moby->collision = 0; + robosquawker_moby->flags |= 0x41; return; } - robosquawker_moby->w94 = *(int *)(robosquawker_moby->w24 + 0x10); - robosquawker_moby->h34 &= 0xFFBE; + robosquawker_moby->collision = *(int *)(robosquawker_moby->pclass + 0x10); + robosquawker_moby->flags &= 0xFFBE; select_robosquawker_target((char *)robosquawker_moby, (char *)&selected_target_record, robosquawker_vars->target_engagement_radius + 4.0f); @@ -533,7 +512,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { fast_dec_timer_s16(&robosquawker_vars->damage_cooldown_frames); if (robosquawker_vars->damage_cooldown_frames < scale_game_frames(0x2D) && hit != 0 && robosquawker_moby->state != ROBOSQUAWKER_STATE_DEATH_KNOCKBACK) { - if (hit->src->hA6 >= 0xB0 && hit->src->hA6 <= 0xB1 && + if (hit->src->oclass >= 0xB0 && hit->src->oclass <= 0xB1 && robosquawker_vars->damage_cooldown_frames != 0) { hit->damage_amount = 0.0f; } @@ -544,34 +523,34 @@ void robosquawker_update(RsMoby *robosquawker_moby) { knockback_yaw = fast_arc_tan(robosquawker_moby->pos.f[0] - selected_target_record.pos.f[0], robosquawker_moby->pos.f[1] - selected_target_record.pos.f[1]); - robosquawker_vars->motion_bounce_restitution = 0.5f; - robosquawker_vars->motion_collision_radius_fixed_point = 0x202; + robosquawker_vars->knockback.collision_z_offset = 0.5f; + robosquawker_vars->knockback.collision_radius_1024ths = 0x202; robosquawker_vars->health -= hit->damage_amount; - robosquawker_vars->motion_gravity_step = 0.0055f; - robosquawker_vars->motion_horizontal_speed_change_limit = 0.0011f; - robosquawker_vars->motion_horizontal_launch_step = + robosquawker_vars->knockback.gravity = 0.0055f; + robosquawker_vars->knockback.speed_approach_step = 0.0011f; + robosquawker_vars->knockback.speed = robosquawker_damage_knockback_horizontal_speed_gp * frame_time; - robosquawker_vars->motion_vertical_launch_step = + robosquawker_vars->knockback.vertical_speed = robosquawker_damage_knockback_vertical_speed_gp * frame_time; - robosquawker_vars->motion_behavior_flags = 9; - robosquawker_vars->b15D = 0; + robosquawker_vars->knockback.flags = 9; + robosquawker_vars->knockback.unk3D = 0; if (robosquawker_vars->health <= 0.0f) { - robosquawker_moby->h34 &= 0xEFFF; - robosquawker_vars->motion_horizontal_launch_step = frame_time * 10.0f; - robosquawker_vars->motion_vertical_launch_step = frame_time * 5.5f; + robosquawker_moby->flags &= 0xEFFF; + robosquawker_vars->knockback.speed = frame_time * 10.0f; + robosquawker_vars->knockback.vertical_speed = frame_time * 5.5f; *(u128 *)&va = *(u128 *)&hit->pos; trooper_knockback_arc(&va, &knockback_yaw, - &robosquawker_vars->motion_horizontal_launch_step, - &robosquawker_vars->motion_vertical_launch_step); + &robosquawker_vars->knockback.speed, + &robosquawker_vars->knockback.vertical_speed); trooper_start_knockback(robosquawker_moby, - robosquawker_vars->x120, + &robosquawker_vars->knockback, knockback_yaw, (rand() & 1) + 9, 1, 0); - robosquawker_vars->motion_ascent_end_animation_frame = 11.0f; - robosquawker_vars->motion_descent_end_animation_frame = 18.0f; + robosquawker_vars->knockback.apex_animation_frame = 11.0f; + robosquawker_vars->knockback.landing_animation_frame = 18.0f; robosquawker_moby->state = ROBOSQUAWKER_STATE_DEATH_KNOCKBACK; release_robosquawker_particle((Level13VendorMoby *)robosquawker_vars); robosquawker_vars->hit_flash.flash_red = 0x78; @@ -581,16 +560,16 @@ void robosquawker_update(RsMoby *robosquawker_moby) { *(u128 *)&va = *(u128 *)&hit->pos; trooper_knockback_arc(&va, &knockback_yaw, - &robosquawker_vars->motion_horizontal_launch_step, - &robosquawker_vars->motion_vertical_launch_step); + &robosquawker_vars->knockback.speed, + &robosquawker_vars->knockback.vertical_speed); trooper_start_knockback(robosquawker_moby, - robosquawker_vars->x120, + &robosquawker_vars->knockback, knockback_yaw, (rand() & 1) + 9, 1, 0); - robosquawker_vars->motion_ascent_end_animation_frame = 5.0f; - robosquawker_vars->motion_descent_end_animation_frame = 10.0f; + robosquawker_vars->knockback.apex_animation_frame = 5.0f; + robosquawker_vars->knockback.landing_animation_frame = 10.0f; robosquawker_moby->state = ROBOSQUAWKER_STATE_DAMAGE_KNOCKBACK; release_robosquawker_particle((Level13VendorMoby *)robosquawker_vars); robosquawker_vars->hit_flash.flash_red = 0xFA; @@ -599,7 +578,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { } } } - robosquawker_moby->bA4 = 0xFF; + robosquawker_moby->hit_slot = 0xFF; switch (robosquawker_moby->state) { case ROBOSQUAWKER_STATE_INITIALIZE: qcopy(&robosquawker_vars->home_position, &robosquawker_moby->pos); @@ -623,15 +602,14 @@ void robosquawker_update(RsMoby *robosquawker_moby) { robosquawker_vars->max_health = 1; robosquawker_vars->b58 = 8; robosquawker_vars->b5A = 4; - FUN_L01_0026d930((char *)&robosquawker_vars->w180); - robosquawker_vars->w180 = 0x38D; - robosquawker_vars->ground_max_rise_height = 2.0f; - robosquawker_vars->ground_max_drop_height = 2.0f; - robosquawker_vars->ground_movement_step_length = - robosquawker_vars->walking_speed * frame_time; - robosquawker_vars->ground_movement_flags |= 0x30; + FUN_L01_0026d930((char *)&robosquawker_vars->move); + robosquawker_vars->move.collision_radius_1024ths = 0x38D; + robosquawker_vars->move.max_climb = 2.0f; + robosquawker_vars->move.max_drop = 2.0f; + robosquawker_vars->move.max_speed = robosquawker_vars->walking_speed * frame_time; + robosquawker_vars->move.movement_option_flags |= 0x30; if (rand() & 1) { - robosquawker_moby->h34 |= 0x8000; + robosquawker_moby->flags |= 0x8000; } robosquawker_vars->pD0 = &D_L13_001613A0; if (robosquawker_vars->flight_path_index != -1) { @@ -654,7 +632,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { } robosquawker_moby->state = ROBOSQUAWKER_STATE_LAND; release_robosquawker_particle((Level13VendorMoby *)robosquawker_vars); - } else if (d > 1.0f && robosquawker_moby->bBC == 1 && random_integer_below(4) == 0) { + } else if (d > 1.0f && robosquawker_moby->command == 1 && random_integer_below(4) == 0) { if (random_integer_below(0x100) & 1) { robosquawker_vars->chase_yaw_offset_degrees = -robosquawker_vars->chase_yaw_offset_degrees; @@ -668,8 +646,8 @@ void robosquawker_update(RsMoby *robosquawker_moby) { } release_robosquawker_particle((Level13VendorMoby *)robosquawker_vars); robosquawker_moby->state = ROBOSQUAWKER_STATE_LAND; - clear_u64_value(&robosquawker_vars->v40); - robosquawker_moby->bBC = 0; + clear_u64_value(&robosquawker_vars->velocity); + robosquawker_moby->command = 0; } else if (robosquawker_vars->flight_path_index != -1) { char *path; @@ -721,20 +699,20 @@ void robosquawker_update(RsMoby *robosquawker_moby) { robosquawker_vars->flight_destination.f[1] - robosquawker_moby->pos.f[1]); FUN_L00_00258278( (char *)robosquawker_moby, &robosquawker_vars->yaw_turn_step, a, 0.03f, 0.6f, 0.09f); - flight_step_length = fast_vec_length(&robosquawker_vars->v40); + flight_step_length = fast_vec_length(&robosquawker_vars->velocity); robosquawker_moby->animation_playback_speed = flight_step_length * 20.0f + 1.0f; - fast_vec_sub(&robosquawker_vars->v40, + fast_vec_sub(&robosquawker_vars->velocity, &robosquawker_vars->flight_destination, &robosquawker_moby->pos); - if (fast_vec_length(&robosquawker_vars->v40) > 1.0f) { + if (fast_vec_length(&robosquawker_vars->velocity) > 1.0f) { approach_value(&flight_step_length, frame_time * 4.0f, frame_time_sq * 6.0f); } else { approach_value(&flight_step_length, frame_time, frame_time_sq * 8.0f); } - FUN_L00_0025f730(&robosquawker_vars->v40, flight_step_length); - fast_vec_add(&va, &robosquawker_vars->v40, &robosquawker_moby->pos); + FUN_L00_0025f730(&robosquawker_vars->velocity, flight_step_length); + fast_vec_add(&va, &robosquawker_vars->velocity, &robosquawker_moby->pos); if (coll_sphere(1.2f, &va, 0, robosquawker_moby) != 0) { - clear_u64_value(&robosquawker_vars->v40); + clear_u64_value(&robosquawker_vars->velocity); if (robosquawker_moby->animation_index != 0) { blend_moby_animation(robosquawker_moby, 0, 0, scale_game_frames(3)); } @@ -763,13 +741,13 @@ void robosquawker_update(RsMoby *robosquawker_moby) { robosquawker_vars->flight_destination.f[1] - robosquawker_moby->pos.f[1]); FUN_L00_00258278( (char *)robosquawker_moby, &robosquawker_vars->yaw_turn_step, a, 0.018f, 0.8f, 0.09f); - fast_vec_sub(&robosquawker_vars->v40, + fast_vec_sub(&robosquawker_vars->velocity, &robosquawker_vars->flight_destination, &robosquawker_moby->pos); - FUN_L00_0025f730(&robosquawker_vars->v40, frame_time * 4.0f); - fast_vec_add(&va, &robosquawker_vars->v40, &robosquawker_moby->pos); + FUN_L00_0025f730(&robosquawker_vars->velocity, frame_time * 4.0f); + fast_vec_add(&va, &robosquawker_vars->velocity, &robosquawker_moby->pos); robosquawker_moby->animation_playback_speed = - fast_vec_length(&robosquawker_vars->v40) * 20.0f + 1.0f; + fast_vec_length(&robosquawker_vars->velocity) * 20.0f + 1.0f; if (coll_sphere(1.2f, &va, 0, robosquawker_moby) != 0) { int i; @@ -799,7 +777,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { qcopy(&robosquawker_moby->pos, &va); } d = fast_vec_dist(&robosquawker_moby->pos, &robosquawker_vars->flight_destination); - if (d < fast_vec_length(&robosquawker_vars->v40)) { + if (d < fast_vec_length(&robosquawker_vars->velocity)) { float g; robosquawker_vars->flight_waypoint_index += 1; @@ -819,10 +797,11 @@ void robosquawker_update(RsMoby *robosquawker_moby) { if (robosquawker_moby->animation_index != 0) { blend_moby_animation(robosquawker_moby, 0, 0, scale_game_frames(3)); } - qzero(&robosquawker_vars->v40); + qzero(&robosquawker_vars->velocity); robosquawker_moby->state = ROBOSQUAWKER_STATE_LAND; release_robosquawker_particle((Level13VendorMoby *)robosquawker_vars); - } else if (g > 1.0f && robosquawker_moby->bBC == 1 && random_integer_below(4) == 0) { + } else if (g > 1.0f && robosquawker_moby->command == 1 && + random_integer_below(4) == 0) { if (random_integer_below(0x100) & 1) { robosquawker_vars->chase_yaw_offset_degrees = -robosquawker_vars->chase_yaw_offset_degrees; @@ -835,10 +814,10 @@ void robosquawker_update(RsMoby *robosquawker_moby) { blend_moby_animation(robosquawker_moby, 0, 0, scale_game_frames(3)); } release_robosquawker_particle((Level13VendorMoby *)robosquawker_vars); - qzero(&robosquawker_vars->v40); + qzero(&robosquawker_vars->velocity); robosquawker_moby->state = ROBOSQUAWKER_STATE_LAND; - clear_u64_value(&robosquawker_vars->v40); - robosquawker_moby->bBC = 0; + clear_u64_value(&robosquawker_vars->velocity); + robosquawker_moby->command = 0; } } update_robosquawker_particle((unsigned char *)robosquawker_moby, (char *)robosquawker_vars); @@ -848,8 +827,9 @@ void robosquawker_update(RsMoby *robosquawker_moby) { float g; g = probe_ground_height(&robosquawker_moby->pos, 0x120, 0.5f); - approach_value(&robosquawker_vars->v40.f[2], -(frame_time * 8.0f), frame_time_sq * 10.8f); - FUN_L00_00258830(robosquawker_moby, &robosquawker_vars->v40, 0.6f, 0.5f, 0.0f, 0); + approach_value( + &robosquawker_vars->velocity.f[2], -(frame_time * 8.0f), frame_time_sq * 10.8f); + FUN_L00_00258830(robosquawker_moby, &robosquawker_vars->velocity, 0.6f, 0.5f, 0.0f, 0); if (robosquawker_moby->animation_index != 2 && robosquawker_moby->pos.f[2] - g <= frame_time * 8.0f * FUN_L04_001f1978(45.0f) && robosquawker_moby->animation_index != 2) { @@ -866,7 +846,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { robosquawker_vars->chase_yaw_flip_timer_frames = scale_game_frames((int)random_float_between(30.0f, 90.0f)); robosquawker_moby->state = ROBOSQUAWKER_STATE_CHASE_TARGET; - clear_u64_value(&robosquawker_vars->v40); + clear_u64_value(&robosquawker_vars->velocity); if (robosquawker_moby->animation_index != 5) { blend_moby_animation(robosquawker_moby, 5, 0, scale_game_frames(3)); } @@ -878,11 +858,12 @@ void robosquawker_update(RsMoby *robosquawker_moby) { g = probe_ground_height(&robosquawker_moby->pos, 0x120, 0.5f); if (robosquawker_moby->pos.f[2] - g < 3.0f) { - approach_value(&robosquawker_vars->v40.f[2], frame_time * 8.0f, frame_time_sq * 10.8f); + approach_value( + &robosquawker_vars->velocity.f[2], frame_time * 8.0f, frame_time_sq * 10.8f); } else { - approach_value(&robosquawker_vars->v40.f[2], frame_time, frame_time_sq * 10.8f); + approach_value(&robosquawker_vars->velocity.f[2], frame_time, frame_time_sq * 10.8f); } - FUN_L00_00258830(robosquawker_moby, &robosquawker_vars->v40, 0.6f, 0.5f, 0.0f, 0); + FUN_L00_00258830(robosquawker_moby, &robosquawker_vars->velocity, 0.6f, 0.5f, 0.0f, 0); robosquawker_moby->animation_playback_speed = 6.0f - (robosquawker_moby->pos.f[2] - g) / 6.0f * 5.0f; if (g + 6.0f <= robosquawker_moby->pos.f[2]) { @@ -891,7 +872,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { blend_moby_animation(robosquawker_moby, 0, 0, scale_game_frames(3)); } robosquawker_moby->state = ROBOSQUAWKER_STATE_FLIGHT_IDLE; - clear_u64_value(&robosquawker_vars->v40); + clear_u64_value(&robosquawker_vars->velocity); } update_robosquawker_particle((unsigned char *)robosquawker_moby, (char *)robosquawker_vars); break; @@ -905,7 +886,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { if (robosquawker_moby->animation_index != 4) { blend_moby_animation(robosquawker_moby, 4, 0, scale_game_frames(3)); } - } else if (robosquawker_moby->bBC == 1 && random_integer_below(0x13) == 0) { + } else if (robosquawker_moby->command == 1 && random_integer_below(0x13) == 0) { if (random_integer_below(0x100) & 1) { robosquawker_vars->chase_yaw_offset_degrees = -robosquawker_vars->chase_yaw_offset_degrees; @@ -918,10 +899,10 @@ void robosquawker_update(RsMoby *robosquawker_moby) { if (robosquawker_moby->animation_index != 5) { blend_moby_animation(robosquawker_moby, 5, 0, scale_game_frames(3)); } - robosquawker_moby->bBC = 0; + robosquawker_moby->command = 0; } else if (fast_vec_length(&va) > robosquawker_vars->target_engagement_radius + 6.0f && robosquawker_vars->ground_idle_preference == 0) { - qzero(&robosquawker_vars->v40); + qzero(&robosquawker_vars->velocity); robosquawker_moby->state = ROBOSQUAWKER_STATE_TAKEOFF; if (robosquawker_moby->animation_index != 0) { blend_moby_animation(robosquawker_moby, 0, 0, scale_game_frames(3)); @@ -952,33 +933,33 @@ void robosquawker_update(RsMoby *robosquawker_moby) { if ((fast_vec_length(&va) < robosquawker_vars->target_engagement_radius && absolute_float(robosquawker_vars->home_position.f[2] - selected_target_record.pos.f[2]) < 8.0f) || - robosquawker_moby->bBC == 2) { + robosquawker_moby->command == 2) { if (robosquawker_moby->command_recipient_list_index != 0xFF) { FUN_L01_0026e090(robosquawker_moby->command_recipient_list_index, 2); } if (robosquawker_moby->animation_index != (rand() & 1) + 9) { blend_moby_animation(robosquawker_moby, (rand() & 1) + 9, 0, scale_game_frames(3)); } - robosquawker_vars->motion_horizontal_speed_change_limit = 0.0f; - robosquawker_vars->motion_gravity_step = robosquawker_home_hop_gravity_gp; - robosquawker_vars->motion_horizontal_launch_step = + robosquawker_vars->knockback.speed_approach_step = 0.0f; + robosquawker_vars->knockback.gravity = robosquawker_home_hop_gravity_gp; + robosquawker_vars->knockback.speed = robosquawker_home_hop_horizontal_speed_gp * frame_time; - robosquawker_vars->motion_vertical_launch_step = + robosquawker_vars->knockback.vertical_speed = FUN_L00_0025abf0(&robosquawker_moby->pos, &robosquawker_vars->home_position, &home_hop_travel_duration, robosquawker_home_hop_horizontal_speed_gp * frame_time, -robosquawker_home_hop_gravity_gp); - robosquawker_vars->motion_behavior_flags = 0xD; - robosquawker_vars->b15D = 0; + robosquawker_vars->knockback.flags = 0xD; + robosquawker_vars->knockback.unk3D = 0; trooper_start_knockback(robosquawker_moby, - robosquawker_vars->x120, + &robosquawker_vars->knockback, robosquawker_moby->rot.f[2], (rand() & 1) + 9, 1, 0); - robosquawker_vars->motion_ascent_end_animation_frame = 5.0f; - robosquawker_vars->motion_descent_end_animation_frame = 10.0f; + robosquawker_vars->knockback.apex_animation_frame = 5.0f; + robosquawker_vars->knockback.landing_animation_frame = 10.0f; update_robosquawker_particle((unsigned char *)robosquawker_moby, (char *)robosquawker_vars); robosquawker_moby->state = ROBOSQUAWKER_STATE_HOME_HOP; @@ -986,9 +967,9 @@ void robosquawker_update(RsMoby *robosquawker_moby) { break; } case ROBOSQUAWKER_STATE_HOME_HOP: - if (step_moby_motion(robosquawker_moby, robosquawker_vars->x120) & 1) { + if (step_moby_motion(robosquawker_moby, &robosquawker_vars->knockback) & 1) { release_robosquawker_particle((Level13VendorMoby *)robosquawker_vars); - qzero(robosquawker_vars->x120); + qzero(&robosquawker_vars->knockback); robosquawker_moby->state = ROBOSQUAWKER_STATE_CHASE_TARGET; if (random_integer_below(0x100) & 1) { robosquawker_vars->chase_yaw_offset_degrees = @@ -1034,8 +1015,8 @@ void robosquawker_update(RsMoby *robosquawker_moby) { if (robosquawker_moby->animation_index != 5) { blend_moby_animation(robosquawker_moby, 5, 0, scale_game_frames(3)); } - robosquawker_moby->bBC = 0; - } else if (robosquawker_moby->bBC == 1 && random_integer_below(0x13) == 0) { + robosquawker_moby->command = 0; + } else if (robosquawker_moby->command == 1 && random_integer_below(0x13) == 0) { if (random_integer_below(0x100) & 1) { robosquawker_vars->chase_yaw_offset_degrees = -robosquawker_vars->chase_yaw_offset_degrees; @@ -1048,9 +1029,9 @@ void robosquawker_update(RsMoby *robosquawker_moby) { if (robosquawker_moby->animation_index != 5) { blend_moby_animation(robosquawker_moby, 5, 0, scale_game_frames(3)); } - robosquawker_moby->bBC = 0; + robosquawker_moby->command = 0; } - if (robosquawker_moby->animation_index == 4 && (robosquawker_moby->b70 & 2)) { + if (robosquawker_moby->animation_index == 4 && (robosquawker_moby->anim_flags & 2)) { blend_moby_animation(robosquawker_moby, 3, 0, scale_game_frames(3)); } update_robosquawker_ground_height((char *)robosquawker_moby, (char *)robosquawker_vars); @@ -1082,7 +1063,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { va.f[1] = fast_sin(robosquawker_moby->rot.f[2]) * 2.0f; va.f[2] = 0.0f; res = move_moby_with_ground_and_collision_checks( - robosquawker_moby, &robosquawker_vars->w180, &va, &vb, 1.0f); + robosquawker_moby, &robosquawker_vars->move.collision_radius_1024ths, &va, &vb, 1.0f); if (fast_dec_timer(&robosquawker_vars->chase_yaw_flip_timer_frames) != 0) { robosquawker_vars->chase_yaw_flip_timer_frames = scale_game_frames((int)random_float_between(30.0f, 90.0f)); @@ -1092,7 +1073,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { fast_vec_sub(&vc, &selected_target_record, &robosquawker_vars->home_position); d = vector_distance_xy(&robosquawker_moby->pos, &selected_target_record); if ((d < 1.5f || - (selected_target_record.moby != 0 && selected_target_record.moby->hA6 == 0x10E && + (selected_target_record.moby != 0 && selected_target_record.moby->oclass == 0x10E && selected_target_record.moby->state != 0xFE && selected_target_record.moby->state != 0xFD && d < 2.3f)) && !(res & 2)) { @@ -1111,11 +1092,11 @@ void robosquawker_update(RsMoby *robosquawker_moby) { if (robosquawker_moby->command_recipient_list_index != 0xFF) { FUN_L01_0026e090(robosquawker_moby->command_recipient_list_index, 1); } - } else if (robosquawker_moby->bBC != 1) { + } else if (robosquawker_moby->command != 1) { robosquawker_moby->state = ROBOSQUAWKER_STATE_RETURN_HOME; } } - robosquawker_moby->bBC = 0; + robosquawker_moby->command = 0; update_robosquawker_ground_height((char *)robosquawker_moby, (char *)robosquawker_vars); break; } @@ -1132,7 +1113,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { selected_target_record.pos.f[1] - robosquawker_moby->pos.f[1]); FUN_L00_00258278( (char *)robosquawker_moby, &robosquawker_vars->yaw_turn_step, a, 0.05f, 0.3f, 0.2f); - same = robosquawker_moby->b52 == robosquawker_moby->animation_index; + same = robosquawker_moby->seq == robosquawker_moby->animation_index; hh = compute_interpolated_record_value(robosquawker_moby); dz = absolute_float(robosquawker_moby->pos.f[2] - selected_target_record.pos.f[2]); d = vector_distance_xy(&robosquawker_moby->pos, &selected_target_record); @@ -1142,7 +1123,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { robosquawker_moby->rot.f[2]); if (same && absolute_float(hh - 13.0f) < 0.2f && dz < 1.5f && (d < 2.0f || - (selected_target_record.moby != 0 && selected_target_record.moby->hA6 == 0x10E && + (selected_target_record.moby != 0 && selected_target_record.moby->oclass == 0x10E && selected_target_record.moby->state != 0xFE && selected_target_record.moby->state != 0xFD && d < 2.6f)) && da < 0.2617994f) { @@ -1155,7 +1136,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { spawn_nearby_effect(tm, (int)robosquawker_moby, 1, &vb, &va, 1.0f); } } - if ((robosquawker_moby->b70 & 2) && + if ((robosquawker_moby->anim_flags & 2) && vector_distance_xy(&robosquawker_moby->pos, &selected_target_record) > 1.5f) { robosquawker_moby->state = ROBOSQUAWKER_STATE_CHASE_TARGET; if (robosquawker_moby->animation_index != 5) { @@ -1163,10 +1144,10 @@ void robosquawker_update(RsMoby *robosquawker_moby) { } } g = probe_ground_height(&robosquawker_moby->pos, 0x120, 0.5f); - robosquawker_vars->ground_vertical_step -= frame_time_sq * 9.8f; - robosquawker_moby->pos.f[2] += robosquawker_vars->ground_vertical_step; + robosquawker_vars->move.vertical_velocity -= frame_time_sq * 9.8f; + robosquawker_moby->pos.f[2] += robosquawker_vars->move.vertical_velocity; if (robosquawker_moby->pos.f[2] < g) { - robosquawker_vars->ground_vertical_step = 0.0f; + robosquawker_vars->move.vertical_velocity = 0.0f; robosquawker_moby->pos.f[2] = g; } update_robosquawker_ground_height((char *)robosquawker_moby, (char *)robosquawker_vars); @@ -1193,7 +1174,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { va.f[1] = fast_sin(robosquawker_moby->rot.f[2]) * 2.0f; va.f[2] = 0.0f; res = move_moby_with_ground_and_collision_checks( - robosquawker_moby, &robosquawker_vars->w180, &va, &vb, 1.0f); + robosquawker_moby, &robosquawker_vars->move.collision_radius_1024ths, &va, &vb, 1.0f); if (vector_distance_xy(&robosquawker_moby->pos, &robosquawker_vars->home_position) < 2.0f) { robosquawker_moby->state = ROBOSQUAWKER_STATE_GROUND_IDLE; if (robosquawker_moby->animation_index != 3) { @@ -1209,7 +1190,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { if (robosquawker_moby->animation_index != 5) { blend_moby_animation(robosquawker_moby, 5, 0, scale_game_frames(3)); } - } else if (robosquawker_moby->bBC == 1) { + } else if (robosquawker_moby->command == 1) { robosquawker_moby->state = ROBOSQUAWKER_STATE_CHASE_TARGET; if (robosquawker_moby->animation_index != 5) { blend_moby_animation(robosquawker_moby, 5, 0, scale_game_frames(3)); @@ -1223,12 +1204,12 @@ void robosquawker_update(RsMoby *robosquawker_moby) { } } update_robosquawker_ground_height((char *)robosquawker_moby, (char *)robosquawker_vars); - robosquawker_moby->bBC = 0; + robosquawker_moby->command = 0; break; } case ROBOSQUAWKER_STATE_DAMAGE_KNOCKBACK: - if (step_moby_motion(robosquawker_moby, robosquawker_vars->x120) & 1) { - qzero(robosquawker_vars->x120); + if (step_moby_motion(robosquawker_moby, &robosquawker_vars->knockback) & 1) { + qzero(&robosquawker_vars->knockback); robosquawker_moby->state = ROBOSQUAWKER_STATE_CHASE_TARGET; if (robosquawker_moby->animation_index != 5) { blend_moby_animation(robosquawker_moby, 5, 0, scale_game_frames(3)); @@ -1242,7 +1223,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { break; case ROBOSQUAWKER_STATE_RECOVER_TO_FLIGHT_IDLE: release_robosquawker_particle((Level13VendorMoby *)robosquawker_vars); - if (FUN_L00_002dc9f0(robosquawker_moby, robosquawker_vars->x120) != 0) { + if (FUN_L00_002dc9f0(robosquawker_moby, &robosquawker_vars->knockback) != 0) { robosquawker_moby->state = ROBOSQUAWKER_STATE_FLIGHT_IDLE; if (robosquawker_moby->animation_index != 0) { blend_moby_animation(robosquawker_moby, 0, 0, 0); @@ -1253,8 +1234,8 @@ void robosquawker_update(RsMoby *robosquawker_moby) { case ROBOSQUAWKER_STATE_DEATH_KNOCKBACK: { int slot_reuse_delay_frames; - robosquawker_moby->h34 &= 0xEFFF; - if (step_moby_motion(robosquawker_moby, robosquawker_vars->x120) & 0x140) { + robosquawker_moby->flags &= 0xEFFF; + if (step_moby_motion(robosquawker_moby, &robosquawker_vars->knockback) & 0x140) { clear_u64_value(&va); slot_reuse_delay_frames = (int)((float)scale_game_frames(1) * 60.0f); if (reserve_expired_frame_slot(D_L13_001613B0, 3, slot_reuse_delay_frames) >= 0) { @@ -1292,7 +1273,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { va.f[1] = fast_sin(robosquawker_moby->rot.f[2]) * 2.0f; va.f[2] = 0.0f; res = move_moby_with_ground_and_collision_checks( - robosquawker_moby, &robosquawker_vars->w180, &va, &vb, 1.0f); + robosquawker_moby, &robosquawker_vars->move.collision_radius_1024ths, &va, &vb, 1.0f); fast_vec_sub(&vc, &selected_target_record, &robosquawker_vars->home_position); if (vector_distance_xy(&robosquawker_moby->pos, &selected_target_record) < 1.5f && r <= 1.0f) { @@ -1306,7 +1287,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { blend_moby_animation(robosquawker_moby, 5, 0, scale_game_frames(3)); } } else { - if (robosquawker_moby->b70 & 2) { + if (robosquawker_moby->anim_flags & 2) { int anim; anim = 4; @@ -1317,21 +1298,21 @@ void robosquawker_update(RsMoby *robosquawker_moby) { blend_moby_animation(robosquawker_moby, anim, 0, scale_game_frames(3)); } if (random_integer_below(0x63) == 0) { - qzero(&robosquawker_vars->v40); + qzero(&robosquawker_vars->velocity); robosquawker_moby->state = ROBOSQUAWKER_STATE_TAKEOFF; if (robosquawker_moby->animation_index != 0) { blend_moby_animation(robosquawker_moby, 0, 0, scale_game_frames(3)); } } } - robosquawker_moby->bBC = 0; + robosquawker_moby->command = 0; break; } case ROBOSQUAWKER_STATE_WALK_FORWARD_AVOID_MOBYS: { RsOther *candidate_moby; float g; - if (robosquawker_moby->b52 != 5 && robosquawker_moby->animation_index != 5) { + if (robosquawker_moby->seq != 5 && robosquawker_moby->animation_index != 5) { blend_moby_animation(robosquawker_moby, 5, 0, scale_game_frames(3)); } va.f[0] = @@ -1348,7 +1329,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { if (candidate_moby->state < 0) { continue; } - if (candidate_moby->hA6 != 0 && candidate_moby->hA6 != 0x3F) { + if (candidate_moby->oclass != 0 && candidate_moby->oclass != 0x3F) { continue; } if (vector_distance_xy(&vb, &candidate_moby->pos) < 2.0f) { @@ -1373,10 +1354,10 @@ void robosquawker_update(RsMoby *robosquawker_moby) { } qcopy(&robosquawker_moby->pos, &vb); g = probe_ground_height(&robosquawker_moby->pos, 0x120, 0.5f); - robosquawker_vars->ground_vertical_step -= frame_time_sq * 9.8f; - robosquawker_moby->pos.f[2] += robosquawker_vars->ground_vertical_step; + robosquawker_vars->move.vertical_velocity -= frame_time_sq * 9.8f; + robosquawker_moby->pos.f[2] += robosquawker_vars->move.vertical_velocity; if (robosquawker_moby->pos.f[2] < g) { - robosquawker_vars->ground_vertical_step = 0.0f; + robosquawker_vars->move.vertical_velocity = 0.0f; robosquawker_moby->pos.f[2] = g; } if (robosquawker_vars->walk_range_anchor == 0 || @@ -1388,7 +1369,7 @@ void robosquawker_update(RsMoby *robosquawker_moby) { blend_moby_animation(robosquawker_moby, 5, 0, scale_game_frames(3)); } } - robosquawker_moby->bBC = 0; + robosquawker_moby->command = 0; break; } } From 9afaf42323b6024b85ef174d7ea2856aa5ec3b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:14:27 +0000 Subject: [PATCH 102/213] decomp: use the shared knockback and ground move layouts in the l10 toxic crab, name its target and climb fields --- src/overlays/l10/mobys/darter.c | 15 +- src/overlays/l10/mobys/toxic_crab.c | 292 +++++++++++++--------------- 2 files changed, 144 insertions(+), 163 deletions(-) diff --git a/src/overlays/l10/mobys/darter.c b/src/overlays/l10/mobys/darter.c index 458aa6447a..8781cce35a 100644 --- a/src/overlays/l10/mobys/darter.c +++ b/src/overlays/l10/mobys/darter.c @@ -108,7 +108,7 @@ typedef struct Vars_2e01a8 { int spawn_kind; char p178[0x18]; float side_angle; - int f194; + int climb_cuboid; /* l10_cuboids row whose z it climbs to */ int wait; float bob_angle; float height_offset; @@ -193,7 +193,7 @@ void darter_update(Moby *moby) { vector_and_collision_scratch[1] = fast_sin(random_angle_radians()) * 10.0f; moby->state = DARTER_STATE_CUBOID_PATROL; vector_and_collision_scratch[2] = 0.0f; - moby->pos.z = l10_cuboids[darter_vars->f194].pos.z; + moby->pos.z = l10_cuboids[darter_vars->climb_cuboid].pos.z; add_vectors(&vector_and_collision_scratch[4], &moby->pos, vector_and_collision_scratch); darter_vars->height_offset = random_float_between(0.0f, l10_darter_max_height_offset); darter_vars->height_timer = truncate_float_to_s32( @@ -454,7 +454,8 @@ void darter_update(Moby *moby) { scale_time(l10_darter_height_change_interval_seconds * 60.0f) * random_float_between(0.75f, 1.25f)); } - climb = l10_cuboids[darter_vars->f194].pos.z - moby->pos.z - darter_vars->height_offset; + climb = + l10_cuboids[darter_vars->climb_cuboid].pos.z - moby->pos.z - darter_vars->height_offset; if (frame_time + frame_time < climb) { climb = frame_time + frame_time; } else if (climb < frame_time * -2.0f) { @@ -489,7 +490,7 @@ void darter_update(Moby *moby) { darter_vars->velocity.x = fast_cos(moby->rot.z) * (frame_time * 4.0f); darter_vars->velocity.y = fast_sin(moby->rot.z) * (frame_time * 4.0f); darter_vars->velocity.z = 0.0f; - climb = l10_cuboids[darter_vars->f194].pos.z - moby->pos.z; + climb = l10_cuboids[darter_vars->climb_cuboid].pos.z - moby->pos.z; if (frame_time * 4.0f < climb) { climb = frame_time * 4.0f; } else if (climb < frame_time * -4.0f) { @@ -498,7 +499,7 @@ void darter_update(Moby *moby) { darter_vars->velocity.z = climb; func_L00_00259B08_2E0630(moby, &darter_vars->velocity, 0.5f, 0x200, 0.0f, 0); if (dist < l10_darter_attack_distance && - absolute_float(l10_cuboids[darter_vars->f194].pos.z - moby->pos.z) < 1.0f) { + absolute_float(l10_cuboids[darter_vars->climb_cuboid].pos.z - moby->pos.z) < 1.0f) { allocate_voice_for_target_entry(0, 0, moby); moby->state = DARTER_STATE_CUBOID_CHARGE_ATTACK; if (moby->prev_seq != 2) @@ -529,7 +530,7 @@ void darter_update(Moby *moby) { darter_vars->velocity.x = fast_cos(moby->rot.z) * (frame_time * 6.0f); darter_vars->velocity.y = fast_sin(moby->rot.z) * (frame_time * 6.0f); darter_vars->velocity.z = 0.0f; - climb = l10_cuboids[darter_vars->f194].pos.z - moby->pos.z; + climb = l10_cuboids[darter_vars->climb_cuboid].pos.z - moby->pos.z; if (frame_time * 3.0f < climb) { climb = frame_time * 3.0f; } else if (climb < frame_time * -3.0f) { @@ -575,7 +576,7 @@ void darter_update(Moby *moby) { darter_vars->velocity.x = fast_cos(moby->rot.z) * (frame_time * 4.0f); darter_vars->velocity.y = fast_sin(moby->rot.z) * (frame_time * 4.0f); darter_vars->velocity.z = 0.0f; - climb = l10_cuboids[darter_vars->f194].pos.z - moby->pos.z; + climb = l10_cuboids[darter_vars->climb_cuboid].pos.z - moby->pos.z; if (frame_time * 3.0f < climb) { climb = frame_time * 3.0f; } else if (climb < frame_time * -3.0f) { diff --git a/src/overlays/l10/mobys/toxic_crab.c b/src/overlays/l10/mobys/toxic_crab.c index a399a78d3f..408a4114f3 100644 --- a/src/overlays/l10/mobys/toxic_crab.c +++ b/src/overlays/l10/mobys/toxic_crab.c @@ -1,6 +1,7 @@ /* Level 10 moby class toxic_crab: sight, targeting, group approach, particles and hit reactions. */ #include "types.h" #include "rnc/overlay/shared/mobys/knockback_motion.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" #include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/mobys/moby_state.h" #include "rnc/game/item_state.h" @@ -91,66 +92,47 @@ typedef struct { } Hit2E30F8; typedef struct Crab2E30F8 { - char p000[0x20]; - float health; - short max_health; - char p26[2]; - unsigned char hit_response_class; - unsigned char b29; - char p2A[6]; - float f30; - char p34[0x24]; - unsigned char b58; - char p59; - unsigned char b5A; - char p5B[5]; - struct HitColorFlash hit_flash; - float knockback_motion_xy[2]; - float vertical_motion_step; - char p7C[4]; - float f80; - char p84[0xC]; - int knockback_probe_radius_fixed; - int i94; - float f98; - char p9C[0x11]; - unsigned char bAD; - char pAE[0x12]; - float fC0; - float fC4; - char pC8[8]; - int movement_size_scale_fixed; - float movement_size_scale; - float maximum_ground_drop; - float maximum_ground_rise; - char pE0[0x14]; - float horizontal_movement_step_limit; - char pF8[0x28]; - float tracked_position_x; - float tracked_position_y; - char p128[0x38]; - char *tgt; - int tracked_target_selection_status; - char p168[8]; - float home_position_and_heading[4]; - char p180[0x10]; - float heading_turn_step; - float pursuit_entry_angle_sample_radians; - float pursuit_entry_angle_bound_degrees; - char p19C[4]; - float f1A0; - float movement_speed; - int behavior_timer_frames; - char p1AC[8]; - int activation_override_enabled; - int pursuit_delay_upper_bound_frames; - int activation_dependency_moby_index; - float pursuit_progress_sample_position[4]; - char p1D0[8]; - int pursuit_movement_blocked; - int remove_in_clank_mode; - char p1E0[0xD0]; - unsigned char q2B0[4]; + char p000[0x20]; + float health; + short max_health; + char p26[2]; + unsigned char hit_response_class; + unsigned char b29; + char p2A[6]; + float f30; + char p34[0x24]; + unsigned char b58; + char p59; + unsigned char b5A; + char p5B[5]; + struct HitColorFlash hit_flash; + struct KnockbackMotion knockback; + struct GroundMoveControl move; + float tracked_position_x; + float tracked_position_y; + char p128[0x38]; + char *tgt; + int tracked_target_selection_status; + char p168[8]; + float home_position_and_heading[4]; + char p180[0x10]; + float heading_turn_step; + float pursuit_entry_angle_sample_radians; + float pursuit_entry_angle_bound_degrees; + char p19C[4]; + float target_range; + float movement_speed; + int behavior_timer_frames; + char p1AC[8]; + int activation_override_enabled; + int pursuit_delay_upper_bound_frames; + int activation_dependency_moby_index; + float pursuit_progress_sample_position[4]; + char p1D0[8]; + int pursuit_movement_blocked; + int remove_in_clank_mode; + char p1E0[0xD0]; + unsigned char big_head_manipulator[4]; } Crab2E30F8; typedef struct Moby2E30F8 { @@ -159,11 +141,11 @@ typedef struct Moby2E30F8 { unsigned char state; unsigned char group_index; char p22[2]; - char *p24; + char *pclass; char p28[4]; float scaled_class_size; char p30; - unsigned char b31; + unsigned char visible; char p32[2]; unsigned short moby_flags; char p36[0x12]; @@ -171,13 +153,13 @@ typedef struct Moby2E30F8 { char p4C[7]; unsigned char anim; char p54[4]; - float f58; + float anim_speed; char p5C[0x14]; - unsigned char b70; + unsigned char anim_flags; char p71[7]; Crab2E30F8 *data; char p7C[3]; - unsigned char b7F; + unsigned char shadow_range; char p80[0x26]; unsigned short cls; char pA8[8]; @@ -248,8 +230,8 @@ void toxic_crab_update(Moby2E30F8 *m) { update_toxic_crab_hit_reactions_and_targeting(m); target_moby = crab_data->tgt; - m->scaled_class_size = *(float *)(m->p24 + 0x24) * l10_toxic_crab_size_scale; - FUN_L00_00263ac8(2.5f, (int)m, 2, crab_data->q2B0); + m->scaled_class_size = *(float *)(m->pclass + 0x24) * l10_toxic_crab_size_scale; + FUN_L00_00263ac8(2.5f, (int)m, 2, crab_data->big_head_manipulator); *(OvlQuad *)from = *(OvlQuad *)m->pos; from[2] += 1.0f; *(OvlQuad *)to = *(OvlQuad *)&MOBY(target_moby)->pos; @@ -282,20 +264,20 @@ void toxic_crab_update(Moby2E30F8 *m) { m->moby_flags |= 0x5000; qcopy(crab_data->home_position_and_heading, m->pos); crab_data->home_position_and_heading[3] = m->heading_radians; - FUN_L01_0026d930((char *)&crab_data->movement_size_scale_fixed); + FUN_L01_0026d930((char *)&crab_data->move); { float k = l10_toxic_crab_size_scale * 1024.0f; float initial_movement_step; float initial_movement_size_scale; int r; - crab_data->maximum_ground_rise = 0.5f; - crab_data->maximum_ground_drop = 2.0f; + crab_data->move.max_climb = 0.5f; + crab_data->move.max_drop = 2.0f; r = truncate_float_to_s32(k); initial_movement_step = crab_data->movement_speed * frame_time; initial_movement_size_scale = l10_toxic_crab_size_scale; - crab_data->movement_size_scale_fixed = r; - crab_data->movement_size_scale = initial_movement_size_scale; - crab_data->horizontal_movement_step_limit = initial_movement_step; + crab_data->move.collision_radius_1024ths = r; + crab_data->move.step_height = initial_movement_size_scale; + crab_data->move.max_speed = initial_movement_step; } { int k = crab_data->activation_dependency_moby_index; @@ -316,7 +298,7 @@ void toxic_crab_update(Moby2E30F8 *m) { if (m->anim != 0) { blend_moby_animation(m, 0, 0, 0); } - crab_data->f1A0 = *(float *)&D_L10_00161E40_gp; + crab_data->target_range = *(float *)&D_L10_00161E40_gp; break; case TOXIC_CRAB_STATE_WAIT_FOR_ACTIVATION: FUN_L00_00258278((char *)m, @@ -367,13 +349,13 @@ void toxic_crab_update(Moby2E30F8 *m) { } } } - } else if (m->b70 & 2) { + } else if (m->anim_flags & 2) { if (vector_distance_xy(m->pos, &hero.motion.pos) < *(float *)&D_L10_00161E40_gp) { float x; m->state = TOXIC_CRAB_STATE_PURSUE_TARGET; crab_data->pursuit_movement_blocked = 0; qcopy(crab_data->pursuit_progress_sample_position, m->pos); - crab_data->horizontal_movement_step_limit = 0.0f; + crab_data->move.max_speed = 0.0f; x = crab_data->pursuit_entry_angle_bound_degrees * DEG_TO_RAD; crab_data->pursuit_entry_angle_sample_radians = random_float_between(x, -x); if (m->anim != 3) { @@ -405,7 +387,7 @@ void toxic_crab_update(Moby2E30F8 *m) { m->state = TOXIC_CRAB_STATE_PURSUE_TARGET; crab_data->pursuit_movement_blocked = 0; qcopy(crab_data->pursuit_progress_sample_position, m->pos); - crab_data->horizontal_movement_step_limit = 0.0f; + crab_data->move.max_speed = 0.0f; x = crab_data->pursuit_entry_angle_bound_degrees * DEG_TO_RAD; crab_data->pursuit_entry_angle_sample_radians = random_float_between(x, -x); if (m->anim != 3) { @@ -426,11 +408,11 @@ void toxic_crab_update(Moby2E30F8 *m) { target_distance = fast_vec_dist(m->pos, target_moby + 0x10); if (target_distance > (MOBY(target_moby)->oclass == 0x359 ? 2.0f : 3.57f)) { - approach_value(&crab_data->horizontal_movement_step_limit, + approach_value(&crab_data->move.max_speed, crab_data->movement_speed * frame_time, frame_time_sq * 8.0f); } else { - approach_value(&crab_data->horizontal_movement_step_limit, + approach_value(&crab_data->move.max_speed, crab_data->movement_speed * frame_time * 0.3f, frame_time_sq * 20.0f); } @@ -438,19 +420,17 @@ void toxic_crab_update(Moby2E30F8 *m) { if (see && absolute_float(target_distance - (MOBY(target_moby)->oclass == 0x359 ? 2.0f : 3.57f)) < 0.35f) { - approach_value( - &crab_data->horizontal_movement_step_limit, 0.0f, frame_time_sq * 30.0f); + approach_value(&crab_data->move.max_speed, 0.0f, frame_time_sq * 30.0f); } else if (crab_data->pursuit_movement_blocked != 0) { - approach_value( - &crab_data->horizontal_movement_step_limit, 0.0f, frame_time_sq * 10.0f); + approach_value(&crab_data->move.max_speed, 0.0f, frame_time_sq * 10.0f); } ang = fast_arc_tan(MOBY(target_moby)->pos.x - m->pos[0], MOBY(target_moby)->pos.y - m->pos[1]); diff = fast_difference_between_rotations(ang, m->heading_radians); if (0.87266463f < diff) { float lim = crab_data->movement_speed * frame_time * 0.25f; - if (lim < crab_data->horizontal_movement_step_limit) { - crab_data->horizontal_movement_step_limit = lim; + if (lim < crab_data->move.max_speed) { + crab_data->move.max_speed = lim; } } if (toxic_crab_pursuit_heading_threshold_degrees_gp * DEG_TO_RAD < diff || @@ -496,20 +476,18 @@ void toxic_crab_update(Moby2E30F8 *m) { } } } - r = move_moby_with_ground_and_collision_checks( - m, &crab_data->movement_size_scale_fixed, dir, out, 1.0f); + r = move_moby_with_ground_and_collision_checks(m, &crab_data->move, dir, out, 1.0f); m->heading_radians = rot; if (r & 3) { if (vector_distance_xy(m->pos, pre_movement_position) < - crab_data->horizontal_movement_step_limit * 0.25f) { + crab_data->move.max_speed * 0.25f) { crab_data->pursuit_movement_blocked = 1; } else { crab_data->pursuit_movement_blocked = 0; } if (D_L10_0015F5CC % 7 == 0 && crab_data->behavior_timer_frames == 0) { if (vector_distance_xy(crab_data->pursuit_progress_sample_position, - m->pos) < - crab_data->horizontal_movement_step_limit && + m->pos) < crab_data->move.max_speed && diff <= toxic_crab_pursuit_heading_threshold_degrees_gp * DEG_TO_RAD) { m->state = TOXIC_CRAB_STATE_PAUSE_PURSUIT; crab_data->behavior_timer_frames = scale_game_frames(0x3C); @@ -526,8 +504,8 @@ void toxic_crab_update(Moby2E30F8 *m) { } if (m->state == TOXIC_CRAB_STATE_PURSUE_TARGET && fast_dec_timer(&crab_data->behavior_timer_frames) && - 0.0f < crab_data->horizontal_movement_step_limit && - crab_data->pursuit_movement_blocked == 0 && m->anim == 1) { + 0.0f < crab_data->move.max_speed && crab_data->pursuit_movement_blocked == 0 && + m->anim == 1) { blend_moby_animation(m, 3, 0, scale_game_frames(7)); } } else { @@ -541,7 +519,7 @@ void toxic_crab_update(Moby2E30F8 *m) { } } } - m->f58 = 1.2f; + m->anim_speed = 1.2f; { float home = fast_vec_dist(m->pos, crab_data->home_position_and_heading); if ((hero.vehicle_mode == HERO_VEHICLE_MODE_CLANK ? 1.0f : 30.0f) < home || @@ -573,8 +551,8 @@ void toxic_crab_update(Moby2E30F8 *m) { m->heading_radians); if (0.87266463f < diff) { float lim = crab_data->movement_speed * frame_time * 0.25f; - if (lim < crab_data->horizontal_movement_step_limit) { - crab_data->horizontal_movement_step_limit = lim; + if (lim < crab_data->move.max_speed) { + crab_data->move.max_speed = lim; } } if (fast_dec_timer(&crab_data->behavior_timer_frames) || @@ -598,7 +576,7 @@ void toxic_crab_update(Moby2E30F8 *m) { m->state = TOXIC_CRAB_STATE_PURSUE_TARGET; crab_data->pursuit_movement_blocked = 0; qcopy(crab_data->pursuit_progress_sample_position, m->pos); - crab_data->horizontal_movement_step_limit = 0.0f; + crab_data->move.max_speed = 0.0f; crab_data->behavior_timer_frames = scale_game_frames(0xF); } } @@ -662,7 +640,7 @@ void toxic_crab_update(Moby2E30F8 *m) { collect_mobies_in_sphere(v, 0.75f, 0, m, &hit); collision_line(pos, v, 9, m, &hit); } - } else if (m->anim >= 6 && m->anim <= 7 && (m->b70 & 2)) { + } else if (m->anim >= 6 && m->anim <= 7 && (m->anim_flags & 2)) { float home = fast_vec_dist(m->pos, crab_data->home_position_and_heading); if ((((unsigned char *)&D_0013E533)[0x2EC1] == 1 ? 1.0f : 30.0f) < home || crab_data->tracked_target_selection_status == @@ -673,7 +651,7 @@ void toxic_crab_update(Moby2E30F8 *m) { m->state = TOXIC_CRAB_STATE_PURSUE_TARGET; crab_data->pursuit_movement_blocked = 0; qcopy(crab_data->pursuit_progress_sample_position, m->pos); - crab_data->horizontal_movement_step_limit = 0.0f; + crab_data->move.max_speed = 0.0f; if (m->anim != 3) { blend_moby_animation(m, 3, 0, scale_game_frames(7)); } @@ -688,7 +666,7 @@ void toxic_crab_update(Moby2E30F8 *m) { float rot; float ang; - approach_value(&crab_data->horizontal_movement_step_limit, + approach_value(&crab_data->move.max_speed, crab_data->movement_speed * 3.0f * frame_time, frame_time_sq * 20.0f); ang = fast_arc_tan(MOBY(target_moby)->pos.x - m->pos[0], @@ -707,8 +685,7 @@ void toxic_crab_update(Moby2E30F8 *m) { dir[0] = fast_cos(m->heading_radians) * 2.0f; dir[1] = fast_sin(m->heading_radians) * 2.0f; dir[2] = 0.0f; - move_moby_with_ground_and_collision_checks( - m, &crab_data->movement_size_scale_fixed, dir, out, 1.0f); + move_moby_with_ground_and_collision_checks(m, &crab_data->move, dir, out, 1.0f); m->heading_radians = rot; if (see) { if (fast_dec_timer(&crab_data->behavior_timer_frames) || @@ -716,7 +693,7 @@ void toxic_crab_update(Moby2E30F8 *m) { fast_vec_dist(m->pos, target_moby + 0x10)) { int anim; m->state = TOXIC_CRAB_STATE_MELEE_ATTACK; - crab_data->horizontal_movement_step_limit = frame_time * 5.0f; + crab_data->move.max_speed = frame_time * 5.0f; anim = 7; if (random_integer_below(100) & 1) { anim = 6; @@ -733,7 +710,7 @@ void toxic_crab_update(Moby2E30F8 *m) { float out[4]; float ang; - approach_value(&crab_data->horizontal_movement_step_limit, + approach_value(&crab_data->move.max_speed, crab_data->movement_speed * frame_time, frame_time_sq * 5.0f); ang = fast_arc_tan(crab_data->home_position_and_heading[0] - m->pos[0], @@ -746,15 +723,14 @@ void toxic_crab_update(Moby2E30F8 *m) { &crab_data->heading_turn_step); if (0.87266463f < fast_difference_between_rotations(ang, m->heading_radians)) { float lim = crab_data->movement_speed * frame_time * 0.25f; - if (lim < crab_data->horizontal_movement_step_limit) { - crab_data->horizontal_movement_step_limit = lim; + if (lim < crab_data->move.max_speed) { + crab_data->move.max_speed = lim; } } dir[0] = fast_cos(m->heading_radians) * 2.0f; dir[1] = fast_sin(m->heading_radians) * 2.0f; dir[2] = 0.0f; - move_moby_with_ground_and_collision_checks( - m, &crab_data->movement_size_scale_fixed, dir, out, 1.0f); + move_moby_with_ground_and_collision_checks(m, &crab_data->move, dir, out, 1.0f); if (fast_vec_dist(m->pos, crab_data->home_position_and_heading) < 1.0f) { m->state = TOXIC_CRAB_STATE_FACE_TRACKED_POSITION; if (m->anim != 1) { @@ -765,7 +741,7 @@ void toxic_crab_update(Moby2E30F8 *m) { m->state = TOXIC_CRAB_STATE_PURSUE_TARGET; crab_data->pursuit_movement_blocked = 0; qcopy(crab_data->pursuit_progress_sample_position, m->pos); - crab_data->horizontal_movement_step_limit = 0.0f; + crab_data->move.max_speed = 0.0f; if (m->anim != 3) { blend_moby_animation(m, 3, 0, scale_game_frames(7)); } @@ -774,10 +750,10 @@ void toxic_crab_update(Moby2E30F8 *m) { break; } case TOXIC_CRAB_STATE_HIT_KNOCKBACK: - if (step_moby_motion(m, crab_data->knockback_motion_xy) & 0x41) { + if (step_moby_motion(m, crab_data->knockback.velocity) & 0x41) { int anim; m->state = TOXIC_CRAB_STATE_MELEE_ATTACK; - crab_data->horizontal_movement_step_limit = frame_time * 5.0f; + crab_data->move.max_speed = frame_time * 5.0f; anim = 7; if (random_integer_below(100) & 1) { anim = 6; @@ -788,7 +764,7 @@ void toxic_crab_update(Moby2E30F8 *m) { blend_moby_animation(m, 0xE, 0, scale_game_frames(6)); } m->state = TOXIC_CRAB_STATE_FALL_TO_DEATH; - crab_data->vertical_motion_step = crab_data->vertical_motion_step / 3.0f; + crab_data->knockback.velocity[2] = crab_data->knockback.velocity[2] / 3.0f; } break; case TOXIC_CRAB_STATE_FALL_TO_DEATH: { @@ -796,8 +772,9 @@ void toxic_crab_update(Moby2E30F8 *m) { float fall_motion_scratch[4]; int r; - crab_data->vertical_motion_step = crab_data->vertical_motion_step - crab_data->f80; - add_vectors(fall_motion_scratch, m->pos, crab_data->knockback_motion_xy); + crab_data->knockback.velocity[2] = + crab_data->knockback.velocity[2] - crab_data->knockback.gravity; + add_vectors(fall_motion_scratch, m->pos, crab_data->knockback.velocity); if (m->pos[2] < probe_ground_height(m->pos, 0, 0.5f)) { int knockback_collision_radius_fixed; float x; @@ -811,16 +788,16 @@ void toxic_crab_update(Moby2E30F8 *m) { m->state = TOXIC_CRAB_STATE_DEATH_EFFECTS; knockback_collision_radius_fixed = truncate_float_to_s32(768.0f); x = toxic_crab_death_knockback_gravity_gp * frame_time_sq; - crab_data->bAD = 0; - crab_data->knockback_probe_radius_fixed = knockback_collision_radius_fixed; - crab_data->f98 = 0.75f; - crab_data->i94 = 9; - crab_data->f80 = x; - trooper_set_knockback(crab_data->knockback_motion_xy, 2.0f, 1.5f); - crab_data->fC0 = 7.0f; - crab_data->fC4 = 13.0f; + crab_data->knockback.unk3D = 0; + crab_data->knockback.collision_radius_1024ths = knockback_collision_radius_fixed; + crab_data->knockback.collision_z_offset = 0.75f; + crab_data->knockback.flags = 9; + crab_data->knockback.gravity = x; + trooper_set_knockback(crab_data->knockback.velocity, 2.0f, 1.5f); + crab_data->knockback.apex_animation_frame = 7.0f; + crab_data->knockback.landing_animation_frame = 13.0f; func_L00_0025D5B0_b(m, - crab_data->knockback_motion_xy, + crab_data->knockback.velocity, 0xD, 1, 0, @@ -869,11 +846,12 @@ void toxic_crab_update(Moby2E30F8 *m) { m->state == TOXIC_CRAB_STATE_RETURN_HOME) { float ground_height = probe_ground_height(m->pos, 0, 0.5f); if (ground_height < m->pos[2]) { - crab_data->vertical_motion_step = crab_data->vertical_motion_step - crab_data->f80; - if (crab_data->vertical_motion_step < frame_time * -7.0f) { - crab_data->vertical_motion_step = frame_time * -7.0f; + crab_data->knockback.velocity[2] = + crab_data->knockback.velocity[2] - crab_data->knockback.gravity; + if (crab_data->knockback.velocity[2] < frame_time * -7.0f) { + crab_data->knockback.velocity[2] = frame_time * -7.0f; } - m->pos[2] = m->pos[2] + crab_data->vertical_motion_step; + m->pos[2] = m->pos[2] + crab_data->knockback.velocity[2]; if (m->pos[2] < ground_height) { m->pos[2] = ground_height; } @@ -885,10 +863,10 @@ void toxic_crab_update(Moby2E30F8 *m) { } } } - if (m->b31 != 0) { + if (m->visible != 0) { if (fast_vec_dist(m->pos, D_L10_00167240) < 18.0f) { FUN_L00_0025a120(m); - m->b7F = 0xE; + m->shadow_range = 0xE; } } } @@ -1015,7 +993,7 @@ typedef struct D_2E52B0 { char p0[0x10]; struct Moby *f10; char p14[0xC]; - float f20; + float health; char p24[2]; short hit_reaction_suppression_timer_frames; char p28[0x10]; @@ -1024,14 +1002,14 @@ typedef struct D_2E52B0 { struct HitColorFlash hit_flash; struct KnockbackMotion knockback; char pad_60[0x50]; - AlignedVec4f a120; + AlignedVec4f tracked_position; char p130[0x30]; struct Moby *selected_target_moby; int target_selection_status; char p168[8]; - AlignedVec4f a170; + AlignedVec4f home_position_and_heading; char p180[0x20]; - float f1A0; + float target_range; char p1A4[8]; int target_range_boost_timer_frames; int target_path_index; @@ -1042,9 +1020,9 @@ typedef struct D_2E52B0 { typedef struct Hit_2E52B0 { char p0[0x10]; AlignedVec4f pos; - Moby *f20; + Moby *source_moby; char p24[4]; - unsigned char b28; + unsigned char hit_type; char p29; unsigned short hit_source_class; } Hit_2E52B0; @@ -1107,19 +1085,19 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { B = 0.0f; hit_record = find_moby_hit(moby, 0xB30000, 0); hit_response_code = - resolve_moby_hit_response(moby, hit_record, &moby_data->f20, 0, &A, &B, 0, 4); + resolve_moby_hit_response(moby, hit_record, &moby_data->health, 0, &A, &B, 0, 4); fast_dec_timer_s16(&moby_data->hit_reaction_suppression_timer_frames); if ((unsigned int)A >= 2 && moby->state != TOXIC_CRAB_STATE_DEATH_EFFECTS && moby->state != TOXIC_CRAB_STATE_FALL_TO_DEATH) { - if (current_level_index == LEVEL_ORXON && hit_record != 0 && hit_record->f20 != 0 && - hit_record->f20->oclass == 0x31A) { + if (current_level_index == LEVEL_ORXON && hit_record != 0 && hit_record->source_moby != 0 && + hit_record->source_moby->oclass == 0x31A) { if (moby_data->target_range_boost_timer_frames != 0 && item_unlocked[0x11] == 0) { item_unlocked[0x11] = 1; allocate_voice_for_bank_entry(1, 0, 0); queue_dialogue_message(0x53D6, -1); } } - if (moby_data->hit_reaction_suppression_timer_frames != 0 && hit_record->b28 == 0) { + if (moby_data->hit_reaction_suppression_timer_frames != 0 && hit_record->hit_type == 0) { hit_response_code = 11; if (B < 3.0f) B = 0.0f; @@ -1136,7 +1114,7 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { } if ((unsigned int)(moby->prev_seq - 6) < 2) { if (((Hero *)(((char *)&hero)))->vehicle_mode == 1 && - hit_record->f20 == ((Hero *)(((char *)&hero)))->moby) { + hit_record->source_moby == ((Hero *)(((char *)&hero)))->moby) { B = 0.0f; hit_response_code = 11; } @@ -1150,11 +1128,11 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { hit_response_code = 11; B = 0.0f; } - } else if ((hit_moby = hit_record->f20) != 0 && hit_moby->oclass != 0x359) { + } else if ((hit_moby = hit_record->source_moby) != 0 && hit_moby->oclass != 0x359) { *(u128_2E52B0 *)&vA = *(u128_2E52B0 *)((AlignedVec4f *)&hit_moby->pos); *(u128_2E52B0 *)&vB = *(u128_2E52B0 *)((AlignedVec4f *)&moby->pos); vB.z += 1.0f; - if (hit_record->f20->oclass == 0xBA || hit_record->f20->oclass == 0) + if (hit_record->source_moby->oclass == 0xBA || hit_record->source_moby->oclass == 0) vA.z += 0.25f; if (collision_line(&vA, &vB, 0x12, moby, 0) != 0) { fast_vec_sub(&hit_to_moby_offset, &vB, &vA); @@ -1167,8 +1145,8 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { } } } - moby_data->f20 -= B; - if (moby_data->f20 <= 0.0f) + moby_data->health -= B; + if (moby_data->health <= 0.0f) hit_response_code = 1; func_L10_002E14F8_2E52B0(moby); moby_data->knockback.collision_radius_1024ths = truncate_float_to_s32(768.0f); @@ -1236,33 +1214,35 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { return; } if (moby_data->target_range_boost_timer_frames != 0) { - moby_data->f1A0 = D_L10_00161E40_gp + 6.0f; + moby_data->target_range = D_L10_00161E40_gp + 6.0f; } else if (moby->state == TOXIC_CRAB_STATE_WAIT_FOR_ACTIVATION) { if (moby == ((Moby *)((Hero *)(((char *)&hero)))->wall_moby) || moby == ((Moby *)((Hero *)(((char *)&hero)))->coll_hit_moby)) { - moby_data->f1A0 = 6.0f; + moby_data->target_range = 6.0f; } else { - moby_data->f1A0 = 0.0f; + moby_data->target_range = 0.0f; } if (((Hero *)(((char *)&hero)))->vehicle_mode == 1) func_L10_002E14F8_2E52B0(moby); } else { - moby_data->f1A0 = D_L10_00161E40_gp; + moby_data->target_range = D_L10_00161E40_gp; } if (moby_data->target_range_boost_timer_frames != 0) { - func_L00_00260D30_2E52B0(moby, &moby_data->a120, moby_data->f1A0); - if (moby_data->f1A0 < vector_distance_xy(&moby_data->a170, &moby_data->a120) || - 3.0f < absolute_float(moby->pos.z - moby_data->a120.z)) { + func_L00_00260D30_2E52B0(moby, &moby_data->tracked_position, moby_data->target_range); + if (moby_data->target_range < vector_distance_xy(&moby_data->home_position_and_heading, + &moby_data->tracked_position) || + 3.0f < absolute_float(moby->pos.z - moby_data->tracked_position.z)) { moby_data->target_selection_status = TOXIC_CRAB_TARGET_SELECTION_UNAVAILABLE; } - } else if (moby_data->f1A0 < vector_distance_xy(&moby_data->a170, &moby_data->a120) || - 3.0f < absolute_float(moby->pos.z - moby_data->a120.z)) { - func_L00_00260D30_2E52B0(moby, &moby_data->a120, moby_data->f1A0); + } else if (moby_data->target_range < vector_distance_xy(&moby_data->home_position_and_heading, + &moby_data->tracked_position) || + 3.0f < absolute_float(moby->pos.z - moby_data->tracked_position.z)) { + func_L00_00260D30_2E52B0(moby, &moby_data->tracked_position, moby_data->target_range); moby_data->target_selection_status = TOXIC_CRAB_TARGET_SELECTION_UNAVAILABLE; } else { - activate_effect_l08(moby_data->f1A0, + activate_effect_l08(moby_data->target_range, moby, - &moby_data->a120, + &moby_data->tracked_position, 0, 0, l10_paths[moby_data->target_path_index]->points, @@ -1272,7 +1252,7 @@ void update_toxic_crab_hit_reactions_and_targeting(void *mv) { moby_data->target_selection_status == TOXIC_CRAB_TARGET_SELECTION_UNAVAILABLE) { moby_data->target_loss_frames++; if (scale_game_frames(300) < moby_data->target_loss_frames) { - if (1.0f < fast_vec_dist(&moby->pos, &moby_data->a170)) { + if (1.0f < fast_vec_dist(&moby->pos, &moby_data->home_position_and_heading)) { moby->state = TOXIC_CRAB_STATE_RETURN_HOME; if (moby->prev_seq != 4) blend_moby_animation(moby, 4, 0, scale_game_frames(12)); From ec3de9de35e6a660f313e916520787111ef9483e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:22:51 +0000 Subject: [PATCH 103/213] decomp: name the hero swim entry frames and the hero motion moby view fields --- include/rnc/hero/hero.h | 2 +- src/check/hero_layout_check.c | 2 +- src/overlays/l01/hero/hero_set_state.c | 4 +- .../update_hero_motion_for_current_state.c | 2 +- src/overlays/l03/hero/hero_set_state.c | 4 +- .../update_hero_motion_for_current_state.c | 2 +- src/overlays/l05/hero/hero_set_state.c | 4 +- .../l05/hero/update_hero_motion_by_state.c | 2 +- src/overlays/l08/hero/hero_set_state.c | 4 +- .../update_hero_motion_for_current_state.c | 2 +- src/overlays/l11/hero/hero_set_state.c | 4 +- .../l11/hero/update_hero_motion_by_state.c | 2 +- src/overlays/l12/hero/hero_set_state.c | 4 +- .../update_hero_motion_for_current_state.c | 2 +- src/overlays/l15/hero/hero_set_state.c | 4 +- .../update_hero_motion_for_current_state.c | 2 +- src/overlays/l16/hero/hero_set_state.c | 4 +- .../update_hero_motion_for_current_state.c | 2 +- src/overlays/l17/hero/hero_set_state.c | 4 +- .../update_hero_motion_for_current_state.c | 2 +- src/overlays/l18/hero/hero_set_state.c | 4 +- .../update_hero_motion_for_current_state.c | 2 +- src/overlays/shared/hero/hero_set_state.c | 4 +- .../shared/hero/hero_update_movement.c | 222 +++++++++--------- 24 files changed, 142 insertions(+), 148 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index 946aac0e29..9b705ab4b8 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -540,7 +540,7 @@ struct Hero { u8 race_ammo; /* 0x8CE */ u8 shot_cooldown; /* 0x8CF */ Vec4 unk8D0; /* 0x8D0 */ - s32 unk8E0; /* 0x8E0 */ + s32 swim_entry_frames; /* 0x8E0: frames in the swim entry splash step */ f32 swim_lean_vel; /* 0x8E4 */ f32 swim_roll_velocity; /* 0x8E8 */ f32 swim_yaw_rate; /* 0x8EC */ diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index 3118a30e38..61c934199e 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -301,7 +301,7 @@ HERO_OFFSET_CHECK(hoverboard_airborne, 0x8BC); HERO_OFFSET_CHECK(board_respawn_delay, 0x8BE); HERO_OFFSET_CHECK(boost_pad_timer, 0x8C4); HERO_OFFSET_CHECK(race_ammo, 0x8CE); -HERO_OFFSET_CHECK(unk8E0, 0x8E0); +HERO_OFFSET_CHECK(swim_entry_frames, 0x8E0); HERO_OFFSET_CHECK(swim_lean_vel, 0x8E4); HERO_OFFSET_CHECK(swim_roll_velocity, 0x8E8); HERO_OFFSET_CHECK(swim_yaw_rate, 0x8EC); diff --git a/src/overlays/l01/hero/hero_set_state.c b/src/overlays/l01/hero/hero_set_state.c index 6d7d832348..485f1f1f09 100644 --- a/src/overlays/l01/hero/hero_set_state.c +++ b/src/overlays/l01/hero/hero_set_state.c @@ -242,7 +242,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *q = &hero; int n; q->rand_timer.range = 0x68; - q->unk8E0 = 0; + q->swim_entry_frames = 0; n = scale_game_frames(0xC); if (animation_setup_mode) set_hero_animation(0x3B, 0, (float)n); @@ -260,7 +260,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } - p->unk8E0 = 0; + p->swim_entry_frames = 0; p->rand_timer.range = 0x68; n = scale_game_frames(0xB); if (p->state.prev == 0x33) diff --git a/src/overlays/l01/hero/update_hero_motion_for_current_state.c b/src/overlays/l01/hero/update_hero_motion_for_current_state.c index 920d71af58..db8076ca53 100644 --- a/src/overlays/l01/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l01/hero/update_hero_motion_for_current_state.c @@ -720,7 +720,7 @@ void update_hero_motion_for_current_state(void) { } hero.splash_effect_timer = scale_game_frames(0x46); } - if (++hero.unk8E0 > scale_game_frames(0x28)) { + if (++hero.swim_entry_frames > scale_game_frames(0x28)) { hero.state.step = 0; } } diff --git a/src/overlays/l03/hero/hero_set_state.c b/src/overlays/l03/hero/hero_set_state.c index b64d8796c4..a43851a7d4 100644 --- a/src/overlays/l03/hero/hero_set_state.c +++ b/src/overlays/l03/hero/hero_set_state.c @@ -242,7 +242,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *q = &hero; int n; q->rand_timer.range = 0x68; - q->unk8E0 = 0; + q->swim_entry_frames = 0; n = scale_game_frames(0xC); if (entry_animation_mode) set_hero_animation(0x3B, 0, (float)n); @@ -260,7 +260,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } - p->unk8E0 = 0; + p->swim_entry_frames = 0; p->rand_timer.range = 0x68; n = scale_game_frames(0xB); if (p->state.prev == 0x33) diff --git a/src/overlays/l03/hero/update_hero_motion_for_current_state.c b/src/overlays/l03/hero/update_hero_motion_for_current_state.c index 5bed80068c..6ba3ecf1ea 100644 --- a/src/overlays/l03/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l03/hero/update_hero_motion_for_current_state.c @@ -500,7 +500,7 @@ void update_hero_motion_for_current_state(void) { } hero.splash_effect_timer = scale_game_frames(70); } - if (++hero.unk8E0 > scale_game_frames(40)) { + if (++hero.swim_entry_frames > scale_game_frames(40)) { hero.state.step = 0; } } diff --git a/src/overlays/l05/hero/hero_set_state.c b/src/overlays/l05/hero/hero_set_state.c index f795f53f65..d0a48cf868 100644 --- a/src/overlays/l05/hero/hero_set_state.c +++ b/src/overlays/l05/hero/hero_set_state.c @@ -255,7 +255,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *q = &hero; int n; q->rand_timer.range = 0x68; - q->unk8E0 = 0; + q->swim_entry_frames = 0; n = scale_game_frames(0xC); if (animation_request_mode) set_hero_animation(0x3B, 0, (float)n); @@ -273,7 +273,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } - p->unk8E0 = 0; + p->swim_entry_frames = 0; p->rand_timer.range = 0x68; n = scale_game_frames(0xB); if (p->state.prev == 0x33) diff --git a/src/overlays/l05/hero/update_hero_motion_by_state.c b/src/overlays/l05/hero/update_hero_motion_by_state.c index a3d0f5e96f..27beeddb0d 100644 --- a/src/overlays/l05/hero/update_hero_motion_by_state.c +++ b/src/overlays/l05/hero/update_hero_motion_by_state.c @@ -457,7 +457,7 @@ void update_hero_motion_by_state(void) { } hero.splash_effect_timer = scale_game_frames(70); } - if (++hero.unk8E0 > scale_game_frames(40)) { + if (++hero.swim_entry_frames > scale_game_frames(40)) { hero.state.step = 0; } } diff --git a/src/overlays/l08/hero/hero_set_state.c b/src/overlays/l08/hero/hero_set_state.c index 2278769797..af363b50c0 100644 --- a/src/overlays/l08/hero/hero_set_state.c +++ b/src/overlays/l08/hero/hero_set_state.c @@ -243,7 +243,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *q = &hero; int n; q->rand_timer.range = 0x68; - q->unk8E0 = 0; + q->swim_entry_frames = 0; n = scale_game_frames(0xC); if (animation_request_mode) set_hero_animation(0x3B, 0, (float)n); @@ -261,7 +261,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } - p->unk8E0 = 0; + p->swim_entry_frames = 0; p->rand_timer.range = 0x68; n = scale_game_frames(0xB); if (p->state.prev == 0x33) diff --git a/src/overlays/l08/hero/update_hero_motion_for_current_state.c b/src/overlays/l08/hero/update_hero_motion_for_current_state.c index a8d219b6e1..5a7d041187 100644 --- a/src/overlays/l08/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l08/hero/update_hero_motion_for_current_state.c @@ -568,7 +568,7 @@ void update_hero_motion_for_current_state(void) { } hero.splash_effect_timer = scale_game_frames(70); } - if (++hero.unk8E0 > scale_game_frames(40)) { + if (++hero.swim_entry_frames > scale_game_frames(40)) { hero.state.step = 0; } } diff --git a/src/overlays/l11/hero/hero_set_state.c b/src/overlays/l11/hero/hero_set_state.c index d2eba5b360..b24a2920d9 100644 --- a/src/overlays/l11/hero/hero_set_state.c +++ b/src/overlays/l11/hero/hero_set_state.c @@ -239,7 +239,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *q = &hero; int n; q->rand_timer.range = 0x68; - q->unk8E0 = 0; + q->swim_entry_frames = 0; n = scale_game_frames(0xC); if (animation_update_mode) set_hero_animation(0x3B, 0, (float)n); @@ -257,7 +257,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } - p->unk8E0 = 0; + p->swim_entry_frames = 0; p->rand_timer.range = 0x68; n = scale_game_frames(0xB); if (p->state.prev == 0x33) diff --git a/src/overlays/l11/hero/update_hero_motion_by_state.c b/src/overlays/l11/hero/update_hero_motion_by_state.c index b42540d5e6..6f655dbfc9 100644 --- a/src/overlays/l11/hero/update_hero_motion_by_state.c +++ b/src/overlays/l11/hero/update_hero_motion_by_state.c @@ -551,7 +551,7 @@ void update_hero_motion_by_state(void) { } hero.splash_effect_timer = scale_game_frames(70); } - if (++hero.unk8E0 > scale_game_frames(40)) { + if (++hero.swim_entry_frames > scale_game_frames(40)) { hero.state.step = 0; } } diff --git a/src/overlays/l12/hero/hero_set_state.c b/src/overlays/l12/hero/hero_set_state.c index 6435867d08..064cbfb0b2 100644 --- a/src/overlays/l12/hero/hero_set_state.c +++ b/src/overlays/l12/hero/hero_set_state.c @@ -245,7 +245,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *q = &hero; int n; q->rand_timer.range = 0x68; - q->unk8E0 = 0; + q->swim_entry_frames = 0; n = scale_game_frames(0xC); if (entry_animation_mode) set_hero_animation(0x3B, 0, (float)n); @@ -263,7 +263,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } - p->unk8E0 = 0; + p->swim_entry_frames = 0; p->rand_timer.range = 0x68; n = scale_game_frames(0xB); if (p->state.prev == 0x33) diff --git a/src/overlays/l12/hero/update_hero_motion_for_current_state.c b/src/overlays/l12/hero/update_hero_motion_for_current_state.c index 0081d49648..26c9c02ecb 100644 --- a/src/overlays/l12/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l12/hero/update_hero_motion_for_current_state.c @@ -848,7 +848,7 @@ void update_hero_motion_for_current_state(void) { } hero.splash_effect_timer = scale_game_frames(70); } - if (++hero.unk8E0 > scale_game_frames(40)) { + if (++hero.swim_entry_frames > scale_game_frames(40)) { hero.state.step = 0; } } diff --git a/src/overlays/l15/hero/hero_set_state.c b/src/overlays/l15/hero/hero_set_state.c index 26f78960f4..d62224cc64 100644 --- a/src/overlays/l15/hero/hero_set_state.c +++ b/src/overlays/l15/hero/hero_set_state.c @@ -213,7 +213,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *q = &hero; int n; q->rand_timer.range = 0x68; - q->unk8E0 = 0; + q->swim_entry_frames = 0; n = scale_game_frames(0xC); if (entry_animation_mode) set_hero_animation(0x3B, 0, (float)n); @@ -231,7 +231,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } - p->unk8E0 = 0; + p->swim_entry_frames = 0; p->rand_timer.range = 0x68; n = scale_game_frames(0xB); if (p->state.prev == 0x33) diff --git a/src/overlays/l15/hero/update_hero_motion_for_current_state.c b/src/overlays/l15/hero/update_hero_motion_for_current_state.c index 15de741597..5d72d32205 100644 --- a/src/overlays/l15/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l15/hero/update_hero_motion_for_current_state.c @@ -735,7 +735,7 @@ void update_hero_motion_for_current_state(void) { } hero.splash_effect_timer = scale_game_frames(70); } - if (++hero.unk8E0 > scale_game_frames(40)) { + if (++hero.swim_entry_frames > scale_game_frames(40)) { hero.state.step = 0; } } diff --git a/src/overlays/l16/hero/hero_set_state.c b/src/overlays/l16/hero/hero_set_state.c index 87d3060eed..371be26575 100644 --- a/src/overlays/l16/hero/hero_set_state.c +++ b/src/overlays/l16/hero/hero_set_state.c @@ -257,7 +257,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *q = &hero; int n; q->rand_timer.range = 0x68; - q->unk8E0 = 0; + q->swim_entry_frames = 0; n = scale_game_frames(0xC); if (animation_update_mode) set_hero_animation(0x3B, 0, (float)n); @@ -275,7 +275,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } - p->unk8E0 = 0; + p->swim_entry_frames = 0; p->rand_timer.range = 0x68; n = scale_game_frames(0xB); if (p->state.prev == 0x33) diff --git a/src/overlays/l16/hero/update_hero_motion_for_current_state.c b/src/overlays/l16/hero/update_hero_motion_for_current_state.c index df2adf3cc7..e78177867d 100644 --- a/src/overlays/l16/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l16/hero/update_hero_motion_for_current_state.c @@ -457,7 +457,7 @@ void update_hero_motion_for_current_state(void) { } hero.splash_effect_timer = scale_game_frames(70); } - if (++hero.unk8E0 > scale_game_frames(40)) { + if (++hero.swim_entry_frames > scale_game_frames(40)) { hero.state.step = 0; } } diff --git a/src/overlays/l17/hero/hero_set_state.c b/src/overlays/l17/hero/hero_set_state.c index 90f7219851..934655f3e8 100644 --- a/src/overlays/l17/hero/hero_set_state.c +++ b/src/overlays/l17/hero/hero_set_state.c @@ -274,7 +274,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *q = &hero; int n; q->rand_timer.range = 0x68; - q->unk8E0 = 0; + q->swim_entry_frames = 0; n = scale_game_frames(0xC); if (b) set_hero_animation(0x3B, 0, (float)n); @@ -292,7 +292,7 @@ int hero_set_state(int requested_state, int b) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } - p->unk8E0 = 0; + p->swim_entry_frames = 0; p->rand_timer.range = 0x68; n = scale_game_frames(0xB); if (p->state.prev == 0x33) diff --git a/src/overlays/l17/hero/update_hero_motion_for_current_state.c b/src/overlays/l17/hero/update_hero_motion_for_current_state.c index 7d9c5ed81a..638c4c1b31 100644 --- a/src/overlays/l17/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l17/hero/update_hero_motion_for_current_state.c @@ -456,7 +456,7 @@ void update_hero_motion_for_current_state(void) { } hero.splash_effect_timer = scale_game_frames(70); } - if (++hero.unk8E0 > scale_game_frames(40)) { + if (++hero.swim_entry_frames > scale_game_frames(40)) { hero.state.step = 0; } } diff --git a/src/overlays/l18/hero/hero_set_state.c b/src/overlays/l18/hero/hero_set_state.c index ac1fd93a84..dfad58f19a 100644 --- a/src/overlays/l18/hero/hero_set_state.c +++ b/src/overlays/l18/hero/hero_set_state.c @@ -214,7 +214,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *q = &hero; int n; q->rand_timer.range = 0x68; - q->unk8E0 = 0; + q->swim_entry_frames = 0; n = scale_game_frames(0xC); if (animation_update_mode) set_hero_animation(0x3B, 0, (float)n); @@ -232,7 +232,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } - p->unk8E0 = 0; + p->swim_entry_frames = 0; p->rand_timer.range = 0x68; n = scale_game_frames(0xB); if (p->state.prev == 0x33) diff --git a/src/overlays/l18/hero/update_hero_motion_for_current_state.c b/src/overlays/l18/hero/update_hero_motion_for_current_state.c index 55478245f7..29dddfbcfa 100644 --- a/src/overlays/l18/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l18/hero/update_hero_motion_for_current_state.c @@ -408,7 +408,7 @@ void update_hero_motion_for_current_state(void) { } hero.splash_effect_timer = scale_game_frames(70); } - if (++hero.unk8E0 > scale_game_frames(40)) { + if (++hero.swim_entry_frames > scale_game_frames(40)) { hero.state.step = 0; } } diff --git a/src/overlays/shared/hero/hero_set_state.c b/src/overlays/shared/hero/hero_set_state.c index c05cc3e812..1fad895ae0 100644 --- a/src/overlays/shared/hero/hero_set_state.c +++ b/src/overlays/shared/hero/hero_set_state.c @@ -857,7 +857,7 @@ int hero_set_state(int requested_state, int b) { struct Hero *q = &hero; int n; q->rand_timer.range = 0x68; - q->unk8E0 = 0; + q->swim_entry_frames = 0; n = scale_game_frames(0xC); if (b) set_hero_animation(0x3B, 0, (float)n); @@ -875,7 +875,7 @@ int hero_set_state(int requested_state, int b) { allocate_hero_voice_for_entry(3, 0); p->state.step = 1; } - p->unk8E0 = 0; + p->swim_entry_frames = 0; p->rand_timer.range = 0x68; n = scale_game_frames(0xB); if (p->state.prev == 0x33) diff --git a/src/overlays/shared/hero/hero_update_movement.c b/src/overlays/shared/hero/hero_update_movement.c index eeb23bd37c..5601900622 100644 --- a/src/overlays/shared/hero/hero_update_movement.c +++ b/src/overlays/shared/hero/hero_update_movement.c @@ -27,49 +27,49 @@ struct MobyView { u8 pad0[0xC]; - f32 fC; + f32 radius; union { - Vec4 v10; - f32 f10; + Vec4 v; + f32 x; struct { u8 pad[0x4]; f32 v; - } f14; + } y; struct { u8 pad[0x8]; f32 v; - } f18; - } u10; + } z; + } pos; u8 pad20[0x3]; - u8 b23; + u8 alpha; u8 pad24[0xC]; - u8 b30; - u8 b31; - s16 h32; + u8 update_dist; + u8 visible; + s16 draw_dist; union { - s32 i34; - u16 uh34; - } u34; + s32 i; + u16 u; + } flags; u8 pad38[0x8]; union { - Vec4 v40; + Vec4 v; struct { u8 pad[0x8]; f32 v; - } f48; - } u40; + } z; + } rot; u8 pad50[0x1]; - u8 b51; - u8 b52; - u8 b53; + u8 prev_frame; + u8 seq; + u8 prev_seq; u8 pad54[0x1C]; - u8 b70; + u8 anim_flags; u8 pad71[0x7]; - struct MobyView *pm78; + struct MobyView *pvars; u8 pad7C[0x2A]; - s16 hA6; + s16 oclass; u8 padA8[0x18]; - Vec4 vC0; + Vec4 rot_row0; }; /* second name for hero: gcc reloads the base through it (exactness) */ @@ -106,13 +106,6 @@ extern void update_hero_water_height_and_bobbing(void) __asm__("FUN_L00_00227d40 #define PD controller_state extern struct HeroEase hero_eases[] __asm__("D_L00_0017A680"); -struct VoiceSlot { - u8 pad0[0x74]; - u8 b74; - u8 pad75[0x13]; - struct MobyView *pm88; -}; - extern s32 D_L00_001612D0; extern s32 D_L00_001612D8; extern s32 D_L00_0015F5CC; @@ -233,7 +226,7 @@ void hero_update_movement(void) { struct MobyView *moby = (struct MobyView *)hero.moby; s32 state_step_before_update = hero.state.step; - s32 anim = moby->b53; + s32 anim = moby->prev_seq; f32 speed; Vec4 movement_and_hit_descriptor_scratch; Vec4 v10; @@ -300,8 +293,8 @@ void hero_update_movement(void) { } } if (hero.state.current == HERO_STATE_CROUCH || hero.state.current == 0x17) { - if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->b53 == 0xE || - ((struct MobyView *)hero.moby)->b53 == 0xF) { + if (hero.stick_magnitude > 0.2f || ((struct MobyView *)hero.moby)->prev_seq == 0xE || + ((struct MobyView *)hero.moby)->prev_seq == 0xF) { if (hero.state.current == HERO_STATE_CROUCH) { turn_to( 0, frame_scale_sq * 0.002f, frame_scale_sq * 0.07f, frame_time * 6.981317f); @@ -311,7 +304,7 @@ void hero_update_movement(void) { if (absolute_float(hero.motion.yaw_rate) > frame_time * 0.34906584f) { s32 neg = hero.motion.yaw_rate < 0.0f; s32 anim = neg + 0xE; - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(5)); } hero.anim_speed = @@ -327,7 +320,7 @@ void hero_update_movement(void) { if (hero.state.current == 0x17) { anim = hero_idle_sequence(0); } - if (((struct MobyView *)hero.moby)->b53 != anim) { + if (((struct MobyView *)hero.moby)->prev_seq != anim) { set_hero_animation(anim, 0, scale_game_frames(7)); } } @@ -341,15 +334,15 @@ void hero_update_movement(void) { } speed = frame_time_sq * 12.0f * s; hero.unk2290 = speed; - if (((struct MobyView *)hero.moby)->b52 == ((struct MobyView *)hero.moby)->b53 && - ((struct MobyView *)hero.moby)->b52 != 0x14) { + if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && + ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; - if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->b51 < 5.5f) { + if (scale_game_frames(5) < r && ((struct MobyView *)hero.moby)->prev_frame < 5.5f) { adjust_hero_animation_speed_for_target_frame(13.0f, r, 0.5f, -1.0f); if (hero.anim_speed > 1.1f) { hero.anim_speed = 1.1f; } - } else if (((struct MobyView *)hero.moby)->b51 > 6.5f) { + } else if (((struct MobyView *)hero.moby)->prev_frame > 6.5f) { hero.anim_speed = 1.0f; } } @@ -401,28 +394,28 @@ void hero_update_movement(void) { if (m == NULL) { goto drop; } - qcopy(&m->u10.v10, &hero.motion.pos); - qcopy(&m->u40.v40, &hero.motion.rot); - m->h32 = h40; - ((struct MobyView *)hero.sink_effect_moby)->b31 = 1; - ((struct MobyView *)hero.sink_effect_moby)->b30 = 0; - ((struct MobyView *)hero.sink_effect_moby)->b23 = 0; - ((struct MobyView *)hero.sink_effect_moby)->u34.uh34 |= 0x800; + qcopy(&m->pos.v, &hero.motion.pos); + qcopy(&m->rot.v, &hero.motion.rot); + m->draw_dist = h40; + ((struct MobyView *)hero.sink_effect_moby)->visible = 1; + ((struct MobyView *)hero.sink_effect_moby)->update_dist = 0; + ((struct MobyView *)hero.sink_effect_moby)->alpha = 0; + ((struct MobyView *)hero.sink_effect_moby)->flags.u |= 0x800; update_entity((struct MobyView *)hero.sink_effect_moby); allocate_voice_for_target_entry(0, 0, (struct MobyView *)hero.sink_effect_moby); } if ((struct MobyView *)hero.sink_effect_moby != NULL) { struct MobyView *m; struct MobyView *o; - ((struct MobyView *)hero.sink_effect_moby)->b23 += + ((struct MobyView *)hero.sink_effect_moby)->alpha += truncate_float_to_s32(frame_scale * 5.0f); - if (((struct MobyView *)hero.sink_effect_moby)->b23 > 0x80) { - ((struct MobyView *)hero.sink_effect_moby)->b23 = 0x80; + if (((struct MobyView *)hero.sink_effect_moby)->alpha > 0x80) { + ((struct MobyView *)hero.sink_effect_moby)->alpha = 0x80; } m = (struct MobyView *)hero.sink_effect_moby; o = (struct MobyView *)hero.moby; - qcopy(&m->u10.v10, &o->u10.v10); - qcopy(&m->u40.v40, &o->u40.v40); + qcopy(&m->pos.v, &o->pos.v); + qcopy(&m->rot.v, &o->rot.v); update_entity(m); } drop: @@ -443,8 +436,8 @@ void hero_update_movement(void) { } else { s32 idx = hero.pack_swim_voice; if (idx != -1) { - struct VoiceSlot *e = (struct VoiceSlot *)(((u8 *)&voice_pool) + idx * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = (VoicePoolWindow *)(((u8 *)&voice_pool) + idx * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(idx); } } @@ -479,7 +472,7 @@ void hero_update_movement(void) { } hero.splash_effect_timer = scale_game_frames(70); } - if (++hero.unk8E0 > scale_game_frames(40)) { + if (++hero.swim_entry_frames > scale_game_frames(40)) { hero.state.step = 0; } } @@ -635,7 +628,7 @@ void hero_update_movement(void) { spatial_and_hit_descriptor_scratch.f[0] = 0.4f; transform_vector_by_basis(&spatial_and_hit_descriptor_scratch, &spatial_and_hit_descriptor_scratch, - &((struct MobyView *)pl->moby)->vC0); + &((struct MobyView *)pl->moby)->rot_row0); fast_vec_add(&movement_and_hit_descriptor_scratch, &movement_and_hit_descriptor_scratch, &spatial_and_hit_descriptor_scratch); @@ -657,7 +650,7 @@ void hero_update_movement(void) { } if (hero.state.current == 0x35 && fast_dec_timer_s16(&hero.pack_particle_timer) != 0) { struct MobyView *gm = (struct MobyView *)hero.items[3].moby; - if (gm != NULL && gm->hA6 == 0x261) { + if (gm != NULL && gm->oclass == 0x261) { s32 i; for (i = 0; i < 4; i++) { moby_point_position(gm, i % 2, &movement_and_hit_descriptor_scratch); @@ -665,7 +658,7 @@ void hero_update_movement(void) { spatial_and_hit_descriptor_scratch.f[0] = -0.15f; transform_vector_by_basis(&spatial_and_hit_descriptor_scratch, &spatial_and_hit_descriptor_scratch, - &((struct MobyView *)hero.moby)->vC0); + &((struct MobyView *)hero.moby)->rot_row0); fast_vec_add(&movement_and_hit_descriptor_scratch, &movement_and_hit_descriptor_scratch, &spatial_and_hit_descriptor_scratch); @@ -775,7 +768,7 @@ void hero_update_movement(void) { spatial_and_hit_descriptor_scratch.f[0] = 0.4f; transform_vector_by_basis(&spatial_and_hit_descriptor_scratch, &spatial_and_hit_descriptor_scratch, - &((struct MobyView *)hero.moby)->vC0); + &((struct MobyView *)hero.moby)->rot_row0); fast_vec_add(&movement_and_hit_descriptor_scratch, &movement_and_hit_descriptor_scratch, &spatial_and_hit_descriptor_scratch); @@ -856,17 +849,17 @@ void hero_update_movement(void) { case 0x39: case HERO_STATE_ANIMATION_WAIT_TO_IDLE: if ((struct MobyView *)hero.ground_moby != NULL && - ((struct MobyView *)hero.ground_moby)->hA6 == 0x155) { + ((struct MobyView *)hero.ground_moby)->oclass == 0x155) { f32 d; f32 ground_moby_yaw_step_limit; clear_u64_value(&movement_and_hit_descriptor_scratch); fast_vec_add(&movement_and_hit_descriptor_scratch, &movement_and_hit_descriptor_scratch, - &((struct MobyView *)hero.ground_moby)->u10.v10); + &((struct MobyView *)hero.ground_moby)->pos.v); fast_vec_sub( &hero.motion.velocity, &movement_and_hit_descriptor_scratch, &hero.motion.pos); FUN_L00_0025f730(&hero.motion.velocity, frame_time * 2.0f); - d = fast_subtract_rotations(((struct MobyView *)hero.ground_moby)->u40.f48.v, + d = fast_subtract_rotations(((struct MobyView *)hero.ground_moby)->rot.z.v, hero.motion.rot.f[2]); ground_moby_yaw_step_limit = frame_time * 9.424778f; if (d > ground_moby_yaw_step_limit) { @@ -898,10 +891,10 @@ void hero_update_movement(void) { add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 54.0f); } - if (anim != -1 && ((struct MobyView *)hero.moby)->b52 != 0x36) { + if (anim != -1 && ((struct MobyView *)hero.moby)->seq != 0x36) { set_hero_animation(anim, 0, frames); - } else if ((((struct MobyView *)hero.moby)->b70 & 2) && - ((struct MobyView *)hero.moby)->b52 == 0x36) { + } else if ((((struct MobyView *)hero.moby)->anim_flags & 2) && + ((struct MobyView *)hero.moby)->seq == 0x36) { s32 an = hero_idle_sequence(0); set_hero_animation(an, 0, scale_game_frames(5)); } @@ -924,8 +917,8 @@ void hero_update_movement(void) { } if ((struct MobyView *)hero.grapple_target != NULL) { hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.15f, frame_time * 6.2831855f); } break; @@ -933,7 +926,7 @@ void hero_update_movement(void) { f32 hit; f32 hit2; qcopy(&movement_and_hit_descriptor_scratch, - &((struct MobyView *)hero.grapple_target)->u10.v10); + &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &movement_and_hit_descriptor_scratch); hero.target_arrival_frames = scale_game_frames(60); @@ -943,8 +936,8 @@ void hero_update_movement(void) { if (hero.state.step == 0) { approach_value(&hero.grapple_pull_speed, frame_time * 27.0f, frame_time_sq * 80.0f); hero.motion.move_yaw = - fast_arc_tan(((struct MobyView *)hero.grapple_target)->u10.f10 - moby->u10.f10, - ((struct MobyView *)hero.grapple_target)->u10.f14.v - moby->u10.f14.v); + fast_arc_tan(((struct MobyView *)hero.grapple_target)->pos.x - moby->pos.x, + ((struct MobyView *)hero.grapple_target)->pos.y.v - moby->pos.y.v); turn_to(0, frame_scale_sq * 0.03f, frame_scale_sq * 0.15f, frame_time * 7.330383f); } else if (hero.state.step == 1) { approach_value(&hero.grapple_pull_speed, 0.0f, frame_time_sq * 42.0f); @@ -980,7 +973,7 @@ void hero_update_movement(void) { &spatial_and_hit_descriptor_scratch, &hero.motion.pos); fast_vec_sub(&v10, - &((struct MobyView *)hero.grapple_target)->u10.v10, + &((struct MobyView *)hero.grapple_target)->pos.v, &spatial_and_hit_descriptor_scratch); fast_vec_normalize(&hero.motion.velocity, &v10, hero.grapple_pull_speed); if (scale_game_frames(30) > hero.target_arrival_frames) { @@ -995,7 +988,7 @@ void hero_update_movement(void) { fast_vec_scale(&hero.motion.velocity, &hero.motion.velocity, 0.9f); hero.motion.velocity.f[2] -= frame_time_sq * 15.0f; qcopy(&movement_and_hit_descriptor_scratch, - &((struct MobyView *)hero.grapple_target)->u10.v10); + &((struct MobyView *)hero.grapple_target)->pos.v); hero.grapple_target_dist = fast_vec_dist(&hero.motion.pos, &movement_and_hit_descriptor_scratch); fast_vec_add(&v10, &hero.motion.pos, &hero.motion.velocity); @@ -1010,15 +1003,15 @@ void hero_update_movement(void) { case HERO_STATE_GRAPPLE_SWING_ENTRY: { f32 vz; s32 above; - if ((hero.anim_flags & 2) && moby->b53 == 0x34) { + if ((hero.anim_flags & 2) && moby->prev_seq == 0x34) { set_hero_animation(0x35, 10, scale_game_frames(12)); hero.anim_speed = 0.3f; } vz = hero.motion.velocity.f[2]; if ((struct MobyView *)hero.swing_target_moby != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78 != NULL && - ((struct MobyView *)hero.swing_target_moby)->pm78->u34.i34 != 0) { - f32 a = ((struct MobyView *)hero.swing_target_moby)->u40.f48.v; + ((struct MobyView *)hero.swing_target_moby)->pvars != NULL && + ((struct MobyView *)hero.swing_target_moby)->pvars->flags.i != 0) { + f32 a = ((struct MobyView *)hero.swing_target_moby)->rot.z.v; if (fast_difference_between_rotations(a, hero.motion.rot.f[2]) > 90.0f) { a = fast_add_rotations(a, 3.1415927f); } @@ -1033,7 +1026,7 @@ void hero_update_movement(void) { hero.motion.move_yaw = hero.swing_yaw; turn_to(0, frame_scale_sq * 0.02f, frame_scale_sq * 0.3f, frame_time * 4.712389f); fast_vec_sub(&movement_and_hit_descriptor_scratch, - &((struct MobyView *)hero.swing_target_moby)->u10.v10, + &((struct MobyView *)hero.swing_target_moby)->pos.v, &hero.motion.pos); fast_vec_normalize( &movement_and_hit_descriptor_scratch, &movement_and_hit_descriptor_scratch, 1.0f); @@ -1069,7 +1062,7 @@ void hero_update_movement(void) { frame_scale_sq * 0.2f, frame_time * 9.599311f); above = 1; - if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->u10.f18.v)) { + if (!(hero.motion.pos.f[2] < ((struct MobyView *)hero.swing_target_moby)->pos.z.v)) { above = 0; } if (hero.swing_hooked != 0) { @@ -1092,7 +1085,7 @@ void hero_update_movement(void) { if (hero.swing_hooked != 0) { f32 s; if (vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10) < + &((struct MobyView *)hero.swing_target_moby)->pos.v) < hero.swing_rope_target_length * 1.57f || hero.ground_distance > 1.5f) { add_hero_gravity_offset( @@ -1100,7 +1093,7 @@ void hero_update_movement(void) { if (hero.swing_entry_push != 0 && gravity_z(&hero.motion.velocity) > 0.0f) { fast_vec_sub(&movement_vector_scratch, &hero.motion.pos, - &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &((struct MobyView *)hero.swing_target_moby)->pos.v); add_hero_gravity_offset( &hero.motion.velocity, &hero.motion.velocity, frame_time_sq * 57.0f); } @@ -1113,10 +1106,10 @@ void hero_update_movement(void) { { struct MobyView *r; if ((struct MobyView *)hero.swing_target_moby != NULL && - (r = ((struct MobyView *)hero.swing_target_moby)->pm78) != NULL) { + (r = ((struct MobyView *)hero.swing_target_moby)->pvars) != NULL) { f32 len = fast_vec_length(&hero.motion.velocity); - if (r->fC < len) { - approach_value(&len, r->fC, frame_time_sq * 15.0f); + if (r->radius < len) { + approach_value(&len, r->radius, frame_time_sq * 15.0f); fast_vec_normalize(&hero.motion.velocity, &hero.motion.velocity, len); } } @@ -1132,10 +1125,10 @@ void hero_update_movement(void) { fast_vec_add(&movement_vector_scratch, &vD0, &hero.motion.velocity); fast_vec_sub(&vC0, &movement_vector_scratch, - &((struct MobyView *)hero.swing_target_moby)->u10.v10); + &((struct MobyView *)hero.swing_target_moby)->pos.v); fast_vec_normalize(&vC0, &vC0, hero.swing_rope_length); fast_vec_add(&movement_vector_scratch, - &((struct MobyView *)hero.swing_target_moby)->u10.v10, + &((struct MobyView *)hero.swing_target_moby)->pos.v, &vC0); fast_vec_sub(&hero.motion.velocity, &movement_vector_scratch, &vD0); old = hero.swing_rope_length; @@ -1181,20 +1174,20 @@ void hero_update_movement(void) { up = forward_component(&movement_vector_scratch) > 0.0f; } if (up) { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 6, scale_game_frames(17)); hero.swing_anim_dir = 1; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(42.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } } else { - if (moby->b53 != 0x35) { + if (moby->prev_seq != 0x35) { set_hero_animation(0x35, 0x15, scale_game_frames(9)); hero.swing_anim_dir = 2; - } else if (((struct MobyView *)hero.moby)->b52 == - ((struct MobyView *)hero.moby)->b53) { + } else if (((struct MobyView *)hero.moby)->seq == + ((struct MobyView *)hero.moby)->prev_seq) { adjust_hero_animation_speed_for_target_frame(12.0f, t, 0.5f, -1.0f); hero.swing_anim_dir = 0; } @@ -1262,7 +1255,7 @@ void hero_update_movement(void) { if (hero.on_ice_ground != 0) { if ((struct MobyView *)hero.melee_target != NULL) { f32 d = vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.melee_target)->u10.v10); + &((struct MobyView *)hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1277,7 +1270,7 @@ void hero_update_movement(void) { } else { if ((struct MobyView *)hero.melee_target != NULL) { f32 d = vector_distance_xy(&hero.motion.pos, - &((struct MobyView *)hero.melee_target)->u10.v10); + &((struct MobyView *)hero.melee_target)->pos.v); if (d > 2.0f && d < 5.0f) { hero.target_speed = frame_time * 4.5f; } @@ -1429,7 +1422,7 @@ void hero_update_movement(void) { hero.target_speed = 0.0f; if ((struct MobyView *)hero.melee_target != NULL && scale_game_frames(4) > hero.state_timer) { - f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->u10.v10, + f32 d = vector_distance_xy(&((struct MobyView *)hero.melee_target)->pos.v, &hero.motion.pos) - 0.5f; f32 off; @@ -1594,7 +1587,7 @@ void hero_update_movement(void) { movement_and_hit_descriptor_scratch.f[3] = 5627.925f; ((u8 *)&v10)[8] = 0; a = hero.motion.rot.f[2]; - ((s16 *)&v10)[5] = o->hA6; + ((s16 *)&v10)[5] = o->oclass; matrix_vector_scratch[0].f[0] = fast_cos(a) * 0.8f; matrix_vector_scratch[0].f[1] = fast_sin(a) * 0.8f; matrix_vector_scratch[0].f[2] = 0.55f; @@ -1817,7 +1810,7 @@ void hero_update_movement(void) { set_second_hero_easing_parameters(0.04f, 0.2f); set_third_hero_easing_parameters(0.04f, 0.2f); set_fourth_hero_easing_parameters(0.02f, 0.2f); - if (moby->b53 == 0x37) { + if (moby->prev_seq == 0x37) { a = hero.motion.yaw_error; if (a > 1.4f) { a = 1.4f; @@ -1830,7 +1823,7 @@ void hero_update_movement(void) { hero_eases[3].rot_target.f[2] = a * 0.4f; hero_eases[3].rot_target.f[1] = absolute_float(a) * -0.09f; hero_eases[3].rot_target.f[0] = absolute_float(a) * 0.08f; - } else if (moby->b53 == 0x6D) { + } else if (moby->prev_seq == 0x6D) { f32 yaw_angle = fast_add_rotations( fast_subtract_rotations( fast_arc_tan(hero.motion.displacement.f[0], hero.motion.displacement.f[1]), @@ -1943,9 +1936,9 @@ void hero_update_movement(void) { release_voice_slot_cf(0, (struct MobyView *)hero.moby, 0); } else { if (hero.grind_voice != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.grind_voice * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.grind_voice); } } @@ -2090,14 +2083,14 @@ void hero_update_movement(void) { f32 a; f32 k; fast_vec_sub(&spatial_and_hit_descriptor_scratch, - &((struct MobyView *)hero.grind_look_moby)->u10.v10, + &((struct MobyView *)hero.grind_look_moby)->pos.v, &hero.motion.pos); transform_vector_by_basis(&spatial_and_hit_descriptor_scratch, &spatial_and_hit_descriptor_scratch, (Vec4 *)hero.inv_rot_matrix); a = fast_arc_tan(spatial_and_hit_descriptor_scratch.f[0], spatial_and_hit_descriptor_scratch.f[1]); - if (((struct MobyView *)hero.moby)->b52 == 0x31) { + if (((struct MobyView *)hero.moby)->seq == 0x31) { a = fast_subtract_rotations(a, 1.5707964f); hero_eases[3].rot_target.f[2] = a * 0.3f; hero_eases[2].rot_target.f[2] = a * 0.2f; @@ -2106,19 +2099,19 @@ void hero_update_movement(void) { hero_eases[3].rot_target.f[2] = a * 0.3f; hero_eases[2].rot_target.f[2] = a * 0.5f; } - } else if (((struct MobyView *)hero.moby)->b53 == 0x31) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x31) { hero_eases[3].rot_target.f[2] = fast_add_rotations(-0.82030475f, hero.rail_lean); hero_eases[1].rot_target.f[2] = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); hero_eases[2].rot_target.f[2] = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); - } else if (((struct MobyView *)hero.moby)->b53 == 0x4B) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x4B) { hero_eases[3].rot_target.f[2] = fast_add_rotations(0.13962634f, hero.rail_lean); hero_eases[1].rot_target.f[2] = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); hero_eases[2].rot_target.f[2] = fast_add_rotations(-0.06981317f, hero.rail_lean * 0.5f); - } else if (((struct MobyView *)hero.moby)->b53 == 0x4A) { + } else if (((struct MobyView *)hero.moby)->prev_seq == 0x4A) { hero_eases[3].rot_target.f[2] = fast_add_rotations(-0.82030475f, hero.rail_lean); hero_eases[1].rot_target.f[2] = fast_add_rotations(0.7330383f, hero.rail_lean / 1.7f); @@ -2348,7 +2341,7 @@ void hero_update_movement(void) { s32 idx; s32 n; compute_hero_fixed_offset_world_position(&movement_and_hit_descriptor_scratch); - if (((struct MobyView *)hero.moby)->b53 == 0x66) { + if (((struct MobyView *)hero.moby)->prev_seq == 0x66) { release_voice_slot_cf(0, (struct MobyView *)hero.moby, 0); if (D_L00_0015F5CC & 1) { f32 a; @@ -2634,9 +2627,9 @@ void hero_update_movement(void) { f32 sp; if (hero_slot_item_id(3) == 2) { if (hero.voice_slot4 != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.voice_slot4 * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.voice_slot4); } } @@ -2644,9 +2637,9 @@ void hero_update_movement(void) { release_voice_slot_cf(3, (struct MobyView *)hero.moby, 2); } else { if (hero.loop_voice_slot != -1) { - struct VoiceSlot *e = - (struct VoiceSlot *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); - if (e->pm88 == (struct MobyView *)hero.moby && e->b74 != 0) { + VoicePoolWindow *e = + (VoicePoolWindow *)(((u8 *)&voice_pool) + hero.loop_voice_slot * 0x70); + if (e->voice.owner == (VoiceMoby *)hero.moby && e->voice.state != 0) { release_voice_slot(hero.loop_voice_slot); } } @@ -3235,7 +3228,8 @@ void hero_update_movement(void) { v10.f[3] = 5627.925f; ((u8 *)&spatial_and_hit_descriptor_scratch)[8] = 7; ((u8 *)&spatial_and_hit_descriptor_scratch)[9] = 1; - ((s16 *)&spatial_and_hit_descriptor_scratch)[5] = ((struct MobyView *)hero.moby)->hA6; + ((s16 *)&spatial_and_hit_descriptor_scratch)[5] = + ((struct MobyView *)hero.moby)->oclass; switch (hero.attack_record) { case HERO_ATTACK_RECORD_POINT_3_STRIKE: if (hero.anim_frame > 7.0f && hero.anim_frame < 14.0f) { @@ -3335,7 +3329,7 @@ void hero_update_movement(void) { } else if (hero.anim_changing == 0 && hero.anim_frame <= 22.0f) { fast_vec_normalize(&movement_and_hit_descriptor_scratch, &hero, 3.0f); movement_and_hit_descriptor_scratch.f[2] += 5.0f; - add_vectors(&v10, &movement_and_hit_descriptor_scratch, &moby->u10.v10); + add_vectors(&v10, &movement_and_hit_descriptor_scratch, &moby->pos.v); set_giant_clank_charged_blast_position(moby, &movement_and_hit_descriptor_scratch); hero.anim_speed = 0.5f; } @@ -3595,7 +3589,7 @@ void hero_update_movement(void) { if (state_step_before_update != hero.state.step) { hero.step_frames = 0; } - if (anim != moby->b53) { + if (anim != moby->prev_seq) { hero.anim_seq_frames = 0; } } From 1671219cf79dee0d9dac1acf142908276ee183b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 15:56:55 +0000 Subject: [PATCH 104/213] decomp: define the wrench swing trail meshes in C --- config/us/levels/data.tsv | 247 + src/overlays/shared/weapons/wrench.c | 12999 ++++++++++++++++++++++++- 2 files changed, 13238 insertions(+), 8 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 299d5938b7..901b818b8c 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -4092,6 +4092,19 @@ D_L00_001D7360 144 D_L00_001D73F0 72 D_L00_001D7438 40 D_L00_001D7460 64 +D_L00_001D74E0 992 +D_L00_001D78C0 480 +D_L00_001D7AA0 496 +D_L00_001D7C90 1056 +D_L00_001D80B0 512 +D_L00_001D82B0 528 +D_L00_001D84C0 1056 +D_L00_001D88E0 512 +D_L00_001D8AE0 528 +D_L00_001D8CF0 720 +D_L00_001D8FC0 448 +D_L00_001D9180 360 +D_L00_001D92E8 384 D_L00_001D9470 3136 D_L00_001DA0B0 1568 D_L00_001DA6D0 784 @@ -5095,6 +5108,19 @@ D_L01_001D77E0 144 D_L01_001D7870 72 D_L01_001D78B8 40 D_L01_001D78E0 64 +D_L01_001D7960 992 +D_L01_001D7D40 480 +D_L01_001D7F20 496 +D_L01_001D8110 1056 +D_L01_001D8530 512 +D_L01_001D8730 528 +D_L01_001D8940 1056 +D_L01_001D8D60 512 +D_L01_001D8F60 528 +D_L01_001D9170 720 +D_L01_001D9440 448 +D_L01_001D9600 360 +D_L01_001D9768 384 D_L01_001D98F0 3136 D_L01_001DA530 1568 D_L01_001DAB50 784 @@ -6282,6 +6308,19 @@ D_L02_001CBDE0 144 D_L02_001CBE70 72 D_L02_001CBEB8 40 D_L02_001CBEE0 64 +D_L02_001CBF60 992 +D_L02_001CC340 480 +D_L02_001CC520 496 +D_L02_001CC710 1056 +D_L02_001CCB30 512 +D_L02_001CCD30 528 +D_L02_001CCF40 1056 +D_L02_001CD360 512 +D_L02_001CD560 528 +D_L02_001CD770 720 +D_L02_001CDA40 448 +D_L02_001CDC00 360 +D_L02_001CDD68 384 D_L02_001CDEF0 3136 D_L02_001CEB30 1568 D_L02_001CF150 784 @@ -7302,6 +7341,19 @@ D_L03_001CB8E0 144 D_L03_001CB970 72 D_L03_001CB9B8 40 D_L03_001CB9E0 64 +D_L03_001CBA60 992 +D_L03_001CBE40 480 +D_L03_001CC020 496 +D_L03_001CC210 1056 +D_L03_001CC630 512 +D_L03_001CC830 528 +D_L03_001CCA40 1056 +D_L03_001CCE60 512 +D_L03_001CD060 528 +D_L03_001CD270 720 +D_L03_001CD540 448 +D_L03_001CD700 360 +D_L03_001CD868 384 D_L03_001CD9F0 3136 D_L03_001CE630 1568 D_L03_001CEC50 784 @@ -8375,6 +8427,19 @@ D_L04_001CB960 144 D_L04_001CB9F0 72 D_L04_001CBA38 40 D_L04_001CBA60 64 +D_L04_001CBAE0 992 +D_L04_001CBEC0 480 +D_L04_001CC0A0 496 +D_L04_001CC290 1056 +D_L04_001CC6B0 512 +D_L04_001CC8B0 528 +D_L04_001CCAC0 1056 +D_L04_001CCEE0 512 +D_L04_001CD0E0 528 +D_L04_001CD2F0 720 +D_L04_001CD5C0 448 +D_L04_001CD780 360 +D_L04_001CD8E8 384 D_L04_001CDA70 3136 D_L04_001CE6B0 1568 D_L04_001CECD0 784 @@ -9520,6 +9585,19 @@ D_L05_001CBC60 144 D_L05_001CBCF0 72 D_L05_001CBD38 40 D_L05_001CBD60 64 +D_L05_001CBDE0 992 +D_L05_001CC1C0 480 +D_L05_001CC3A0 496 +D_L05_001CC590 1056 +D_L05_001CC9B0 512 +D_L05_001CCBB0 528 +D_L05_001CCDC0 1056 +D_L05_001CD1E0 512 +D_L05_001CD3E0 528 +D_L05_001CD5F0 720 +D_L05_001CD8C0 448 +D_L05_001CDA80 360 +D_L05_001CDBE8 384 D_L05_001CDD70 32 D_L05_001CDD90 3136 D_L05_001CE9D0 1568 @@ -10709,6 +10787,19 @@ D_L06_001CBF60 144 D_L06_001CBFF0 72 D_L06_001CC038 40 D_L06_001CC060 64 +D_L06_001CC0E0 992 +D_L06_001CC4C0 480 +D_L06_001CC6A0 496 +D_L06_001CC890 1056 +D_L06_001CCCB0 512 +D_L06_001CCEB0 528 +D_L06_001CD0C0 1056 +D_L06_001CD4E0 512 +D_L06_001CD6E0 528 +D_L06_001CD8F0 720 +D_L06_001CDBC0 448 +D_L06_001CDD80 360 +D_L06_001CDEE8 384 D_L06_001CE070 3136 D_L06_001CECB0 1568 D_L06_001CF2D0 784 @@ -11809,6 +11900,19 @@ D_L07_001CB860 144 D_L07_001CB8F0 72 D_L07_001CB938 40 D_L07_001CB960 64 +D_L07_001CB9E0 992 +D_L07_001CBDC0 480 +D_L07_001CBFA0 496 +D_L07_001CC190 1056 +D_L07_001CC5B0 512 +D_L07_001CC7B0 528 +D_L07_001CC9C0 1056 +D_L07_001CCDE0 512 +D_L07_001CCFE0 528 +D_L07_001CD1F0 720 +D_L07_001CD4C0 448 +D_L07_001CD680 360 +D_L07_001CD7E8 384 D_L07_001CD970 3136 D_L07_001CE5B0 1568 D_L07_001CEBD0 784 @@ -13012,6 +13116,19 @@ D_L08_001CBFE0 144 D_L08_001CC070 72 D_L08_001CC0B8 40 D_L08_001CC0E0 64 +D_L08_001CC160 992 +D_L08_001CC540 480 +D_L08_001CC720 496 +D_L08_001CC910 1056 +D_L08_001CCD30 512 +D_L08_001CCF30 528 +D_L08_001CD140 1056 +D_L08_001CD560 512 +D_L08_001CD760 528 +D_L08_001CD970 720 +D_L08_001CDC40 448 +D_L08_001CDE00 360 +D_L08_001CDF68 384 D_L08_001CE0F0 3136 D_L08_001CED30 1568 D_L08_001CF350 784 @@ -14266,6 +14383,19 @@ D_L09_001CB960 144 D_L09_001CB9F0 72 D_L09_001CBA38 40 D_L09_001CBA60 64 +D_L09_001CBAE0 992 +D_L09_001CBEC0 480 +D_L09_001CC0A0 496 +D_L09_001CC290 1056 +D_L09_001CC6B0 512 +D_L09_001CC8B0 528 +D_L09_001CCAC0 1056 +D_L09_001CCEE0 512 +D_L09_001CD0E0 528 +D_L09_001CD2F0 720 +D_L09_001CD5C0 448 +D_L09_001CD780 360 +D_L09_001CD8E8 384 D_L09_001CDA70 3136 D_L09_001CE6B0 1568 D_L09_001CECD0 784 @@ -15609,6 +15739,19 @@ D_L10_001CBC60 144 D_L10_001CBCF0 72 D_L10_001CBD38 40 D_L10_001CBD60 64 +D_L10_001CBDE0 992 +D_L10_001CC1C0 480 +D_L10_001CC3A0 496 +D_L10_001CC590 1056 +D_L10_001CC9B0 512 +D_L10_001CCBB0 528 +D_L10_001CCDC0 1056 +D_L10_001CD1E0 512 +D_L10_001CD3E0 528 +D_L10_001CD5F0 720 +D_L10_001CD8C0 448 +D_L10_001CDA80 360 +D_L10_001CDBE8 384 D_L10_001CDD70 3136 D_L10_001CE9B0 1568 D_L10_001CEFD0 784 @@ -16785,6 +16928,19 @@ D_L11_001CC1E0 144 D_L11_001CC270 72 D_L11_001CC2B8 40 D_L11_001CC2E0 64 +D_L11_001CC360 992 +D_L11_001CC740 480 +D_L11_001CC920 496 +D_L11_001CCB10 1056 +D_L11_001CCF30 512 +D_L11_001CD130 528 +D_L11_001CD340 1056 +D_L11_001CD760 512 +D_L11_001CD960 528 +D_L11_001CDB70 720 +D_L11_001CDE40 448 +D_L11_001CE000 360 +D_L11_001CE168 384 D_L11_001CE2F0 3136 D_L11_001CEF30 1568 D_L11_001CF550 784 @@ -17986,6 +18142,19 @@ D_L12_001CBC60 144 D_L12_001CBCF0 72 D_L12_001CBD38 40 D_L12_001CBD60 64 +D_L12_001DEA00 992 +D_L12_001DEDE0 480 +D_L12_001DEFC0 496 +D_L12_001DF1B0 1056 +D_L12_001DF5D0 512 +D_L12_001DF7D0 528 +D_L12_001DF9E0 1056 +D_L12_001DFE00 512 +D_L12_001E0000 528 +D_L12_001E0210 720 +D_L12_001E04E0 448 +D_L12_001E06A0 360 +D_L12_001E0808 384 D_L12_001E0990 3136 D_L12_001E15D0 1568 D_L12_001E1BF0 784 @@ -19093,6 +19262,19 @@ D_L13_001CBAE0 144 D_L13_001CBB70 72 D_L13_001CBBB8 40 D_L13_001CBBE0 64 +D_L13_001CC270 992 +D_L13_001CC650 480 +D_L13_001CC830 496 +D_L13_001CCA20 1056 +D_L13_001CCE40 512 +D_L13_001CD040 528 +D_L13_001CD250 1056 +D_L13_001CD670 512 +D_L13_001CD870 528 +D_L13_001CDA80 720 +D_L13_001CDD50 448 +D_L13_001CDF10 360 +D_L13_001CE078 384 D_L13_001CE200 3136 D_L13_001CEE40 1568 D_L13_001CF460 784 @@ -20286,6 +20468,19 @@ D_L14_001D8890 64 D_L14_001D8890 64 D_L14_001D8890 64 D_L14_001D88D0 80 +D_L14_001D8920 992 +D_L14_001D8D00 480 +D_L14_001D8EE0 496 +D_L14_001D90D0 1056 +D_L14_001D94F0 512 +D_L14_001D96F0 528 +D_L14_001D9900 1056 +D_L14_001D9D20 512 +D_L14_001D9F20 528 +D_L14_001DA130 720 +D_L14_001DA400 448 +D_L14_001DA5C0 360 +D_L14_001DA728 384 D_L14_001DA8B0 3136 D_L14_001DB4F0 1568 D_L14_001DBB10 784 @@ -21454,6 +21649,19 @@ D_L15_001CBE70 72 D_L15_001CBEB8 40 D_L15_001CBEE0 64 D_L15_001CBFA0 64 +D_L15_001CC180 992 +D_L15_001CC560 480 +D_L15_001CC740 496 +D_L15_001CC930 1056 +D_L15_001CCD50 512 +D_L15_001CCF50 528 +D_L15_001CD160 1056 +D_L15_001CD580 512 +D_L15_001CD780 528 +D_L15_001CD990 720 +D_L15_001CDC60 448 +D_L15_001CDE20 360 +D_L15_001CDF88 384 D_L15_001CE110 256 D_L15_001CE110 256 D_L15_001CE110 256 @@ -22563,6 +22771,19 @@ D_L16_001CBC60 144 D_L16_001CBCF0 72 D_L16_001CBD38 40 D_L16_001CBD60 64 +D_L16_001CBDE0 992 +D_L16_001CC1C0 480 +D_L16_001CC3A0 496 +D_L16_001CC590 1056 +D_L16_001CC9B0 512 +D_L16_001CCBB0 528 +D_L16_001CCDC0 1056 +D_L16_001CD1E0 512 +D_L16_001CD3E0 528 +D_L16_001CD5F0 720 +D_L16_001CD8C0 448 +D_L16_001CDA80 360 +D_L16_001CDBE8 384 D_L16_001CDD70 3136 D_L16_001CE9B0 1568 D_L16_001CEFD0 784 @@ -23875,6 +24096,19 @@ D_L17_001CC0E0 144 D_L17_001CC170 72 D_L17_001CC1B8 40 D_L17_001CC1E0 64 +D_L17_001CC400 992 +D_L17_001CC7E0 480 +D_L17_001CC9C0 496 +D_L17_001CCBB0 1056 +D_L17_001CCFD0 512 +D_L17_001CD1D0 528 +D_L17_001CD3E0 1056 +D_L17_001CD800 512 +D_L17_001CDA00 528 +D_L17_001CDC10 720 +D_L17_001CDEE0 448 +D_L17_001CE0A0 360 +D_L17_001CE208 384 D_L17_001CE390 256 D_L17_001CE490 32 D_L17_001CE570 64 @@ -25055,6 +25289,19 @@ D_L18_001CC1E0 144 D_L18_001CC270 72 D_L18_001CC2B8 40 D_L18_001CC2E0 64 +D_L18_001CC360 992 +D_L18_001CC740 480 +D_L18_001CC920 496 +D_L18_001CCB10 1056 +D_L18_001CCF30 512 +D_L18_001CD130 528 +D_L18_001CD340 1056 +D_L18_001CD760 512 +D_L18_001CD960 528 +D_L18_001CDB70 720 +D_L18_001CDE40 448 +D_L18_001CE000 360 +D_L18_001CE168 384 D_L18_001CE2F0 3136 D_L18_001CEF30 1568 D_L18_001CF550 784 diff --git a/src/overlays/shared/weapons/wrench.c b/src/overlays/shared/weapons/wrench.c index cbc1c4b272..a0a54a7c00 100644 --- a/src/overlays/shared/weapons/wrench.c +++ b/src/overlays/shared/weapons/wrench.c @@ -27,18 +27,19 @@ #include "rnc/overlay/shared/world/collision.h" #include "rnc/input/pad_globals.h" #include "rnc/overlay/shared/pickups/bolt.h" +#include "rnc/math/vector.h" typedef int q_2a7780 __attribute__((mode(TI))); typedef struct { - s16 sel[4]; - u32 col[4][4]; - f32 progress_per_frame; - q_2a7780 *verts; + s16 sel[4]; + u32 col[4][4]; + f32 progress_per_frame; + Vec4f *verts; s16 (*idx)[4][2]; - f32 *uv; - s16 n; - f32 uv_v_progress_scale; + f32 (*uv)[2]; + s16 n; + f32 uv_v_progress_scale; } E_2a7780; typedef struct { @@ -222,7 +223,7 @@ extern int game_frame __asm__("D_L00_0015F5CC"); extern int get_effect_texture(int) __asm__("FUN_001f44b8"); extern void FUN_001f7d30_2a7780(void *, void *, int) __asm__("FUN_001f7d30"); -extern E_2a7780 effects[] __asm__("D_L00_001D92E8"); +extern E_2a7780 effects[4] __asm__("D_L00_001D92E8"); extern int last_frame __asm__("D_L00_001613C0"); f32 uv_scale __asm__("D_L00_001613BC") = 1.1f; @@ -1091,3 +1092,12985 @@ int D_L18_00161434 = 0; f32 D_L18_00161430 = 1.1f; int last_frame __asm__("D_L00_001613C0") = 0; + +/* The wrench swing trails, one per swing (hero animations 0x17, 0x18 and 0x19, + then 0x2B): a strip of quads over a vertex mesh, each corner a vertex and a + texture coordinate index. The quads named in sel get the corner colours of + the same row (alpha in the top byte); every other quad is 0x50808080. The + same in every level. */ +Vec4f wrench_trail_0_vertices[62] __asm__("D_L00_001D74E0") = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 wrench_trail_0_quads[30][4][2] __asm__("D_L00_001D78C0") = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 wrench_trail_0_uvs[62][2] __asm__("D_L00_001D7AA0") = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f wrench_trail_1_vertices[66] __asm__("D_L00_001D7C90") = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 wrench_trail_1_quads[32][4][2] __asm__("D_L00_001D80B0") = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 wrench_trail_1_uvs[66][2] __asm__("D_L00_001D82B0") = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f wrench_trail_2_vertices[66] __asm__("D_L00_001D84C0") = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 wrench_trail_2_quads[32][4][2] __asm__("D_L00_001D88E0") = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 wrench_trail_2_uvs[66][2] __asm__("D_L00_001D8AE0") = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f wrench_trail_3_vertices[45] __asm__("D_L00_001D8CF0") = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 wrench_trail_3_quads[28][4][2] __asm__("D_L00_001D8FC0") = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 wrench_trail_3_uvs[45][2] __asm__("D_L00_001D9180") = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 effects[4] __asm__("D_L00_001D92E8") = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + wrench_trail_0_vertices, wrench_trail_0_quads, + wrench_trail_0_uvs, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + wrench_trail_1_vertices, wrench_trail_1_quads, + wrench_trail_1_uvs, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + wrench_trail_2_vertices, wrench_trail_2_quads, + wrench_trail_2_uvs, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + wrench_trail_3_vertices, wrench_trail_3_quads, + wrench_trail_3_uvs, 28, + 0.035714287f, }, +}; + +Vec4f D_L01_001D7960[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L01_001D7D40[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L01_001D7F20[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L01_001D8110[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L01_001D8530[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L01_001D8730[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L01_001D8940[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L01_001D8D60[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L01_001D8F60[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L01_001D9170[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L01_001D9440[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L01_001D9600[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L01_001D9768[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L01_001D7960, D_L01_001D7D40, + D_L01_001D7F20, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L01_001D8110, D_L01_001D8530, + D_L01_001D8730, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L01_001D8940, D_L01_001D8D60, + D_L01_001D8F60, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L01_001D9170, D_L01_001D9440, + D_L01_001D9600, 28, + 0.035714287f, }, +}; + +Vec4f D_L02_001CBF60[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L02_001CC340[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L02_001CC520[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L02_001CC710[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L02_001CCB30[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L02_001CCD30[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L02_001CCF40[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L02_001CD360[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L02_001CD560[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L02_001CD770[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L02_001CDA40[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L02_001CDC00[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L02_001CDD68[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L02_001CBF60, D_L02_001CC340, + D_L02_001CC520, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L02_001CC710, D_L02_001CCB30, + D_L02_001CCD30, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L02_001CCF40, D_L02_001CD360, + D_L02_001CD560, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L02_001CD770, D_L02_001CDA40, + D_L02_001CDC00, 28, + 0.035714287f, }, +}; + +Vec4f D_L03_001CBA60[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L03_001CBE40[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L03_001CC020[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L03_001CC210[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L03_001CC630[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L03_001CC830[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L03_001CCA40[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L03_001CCE60[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L03_001CD060[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L03_001CD270[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L03_001CD540[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L03_001CD700[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L03_001CD868[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L03_001CBA60, D_L03_001CBE40, + D_L03_001CC020, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L03_001CC210, D_L03_001CC630, + D_L03_001CC830, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L03_001CCA40, D_L03_001CCE60, + D_L03_001CD060, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L03_001CD270, D_L03_001CD540, + D_L03_001CD700, 28, + 0.035714287f, }, +}; + +Vec4f D_L04_001CBAE0[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L04_001CBEC0[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L04_001CC0A0[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L04_001CC290[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L04_001CC6B0[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L04_001CC8B0[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L04_001CCAC0[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L04_001CCEE0[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L04_001CD0E0[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L04_001CD2F0[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L04_001CD5C0[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L04_001CD780[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L04_001CD8E8[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L04_001CBAE0, D_L04_001CBEC0, + D_L04_001CC0A0, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L04_001CC290, D_L04_001CC6B0, + D_L04_001CC8B0, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L04_001CCAC0, D_L04_001CCEE0, + D_L04_001CD0E0, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L04_001CD2F0, D_L04_001CD5C0, + D_L04_001CD780, 28, + 0.035714287f, }, +}; + +Vec4f D_L05_001CBDE0[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L05_001CC1C0[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L05_001CC3A0[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L05_001CC590[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L05_001CC9B0[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L05_001CCBB0[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L05_001CCDC0[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L05_001CD1E0[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L05_001CD3E0[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L05_001CD5F0[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L05_001CD8C0[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L05_001CDA80[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L05_001CDBE8[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L05_001CBDE0, D_L05_001CC1C0, + D_L05_001CC3A0, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L05_001CC590, D_L05_001CC9B0, + D_L05_001CCBB0, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L05_001CCDC0, D_L05_001CD1E0, + D_L05_001CD3E0, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L05_001CD5F0, D_L05_001CD8C0, + D_L05_001CDA80, 28, + 0.035714287f, }, +}; + +Vec4f D_L06_001CC0E0[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L06_001CC4C0[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L06_001CC6A0[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L06_001CC890[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L06_001CCCB0[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L06_001CCEB0[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L06_001CD0C0[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L06_001CD4E0[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L06_001CD6E0[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L06_001CD8F0[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L06_001CDBC0[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L06_001CDD80[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L06_001CDEE8[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L06_001CC0E0, D_L06_001CC4C0, + D_L06_001CC6A0, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L06_001CC890, D_L06_001CCCB0, + D_L06_001CCEB0, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L06_001CD0C0, D_L06_001CD4E0, + D_L06_001CD6E0, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L06_001CD8F0, D_L06_001CDBC0, + D_L06_001CDD80, 28, + 0.035714287f, }, +}; + +Vec4f D_L07_001CB9E0[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L07_001CBDC0[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L07_001CBFA0[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L07_001CC190[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L07_001CC5B0[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L07_001CC7B0[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L07_001CC9C0[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L07_001CCDE0[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L07_001CCFE0[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L07_001CD1F0[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L07_001CD4C0[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L07_001CD680[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L07_001CD7E8[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L07_001CB9E0, D_L07_001CBDC0, + D_L07_001CBFA0, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L07_001CC190, D_L07_001CC5B0, + D_L07_001CC7B0, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L07_001CC9C0, D_L07_001CCDE0, + D_L07_001CCFE0, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L07_001CD1F0, D_L07_001CD4C0, + D_L07_001CD680, 28, + 0.035714287f, }, +}; + +Vec4f D_L08_001CC160[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L08_001CC540[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L08_001CC720[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L08_001CC910[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L08_001CCD30[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L08_001CCF30[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L08_001CD140[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L08_001CD560[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L08_001CD760[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L08_001CD970[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L08_001CDC40[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L08_001CDE00[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L08_001CDF68[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L08_001CC160, D_L08_001CC540, + D_L08_001CC720, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L08_001CC910, D_L08_001CCD30, + D_L08_001CCF30, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L08_001CD140, D_L08_001CD560, + D_L08_001CD760, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L08_001CD970, D_L08_001CDC40, + D_L08_001CDE00, 28, + 0.035714287f, }, +}; + +Vec4f D_L09_001CBAE0[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L09_001CBEC0[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L09_001CC0A0[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L09_001CC290[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L09_001CC6B0[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L09_001CC8B0[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L09_001CCAC0[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L09_001CCEE0[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L09_001CD0E0[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L09_001CD2F0[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L09_001CD5C0[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L09_001CD780[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L09_001CD8E8[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L09_001CBAE0, D_L09_001CBEC0, + D_L09_001CC0A0, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L09_001CC290, D_L09_001CC6B0, + D_L09_001CC8B0, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L09_001CCAC0, D_L09_001CCEE0, + D_L09_001CD0E0, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L09_001CD2F0, D_L09_001CD5C0, + D_L09_001CD780, 28, + 0.035714287f, }, +}; + +Vec4f D_L10_001CBDE0[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L10_001CC1C0[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L10_001CC3A0[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L10_001CC590[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L10_001CC9B0[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L10_001CCBB0[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L10_001CCDC0[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L10_001CD1E0[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L10_001CD3E0[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L10_001CD5F0[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L10_001CD8C0[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L10_001CDA80[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L10_001CDBE8[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L10_001CBDE0, D_L10_001CC1C0, + D_L10_001CC3A0, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L10_001CC590, D_L10_001CC9B0, + D_L10_001CCBB0, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L10_001CCDC0, D_L10_001CD1E0, + D_L10_001CD3E0, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L10_001CD5F0, D_L10_001CD8C0, + D_L10_001CDA80, 28, + 0.035714287f, }, +}; + +Vec4f D_L11_001CC360[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L11_001CC740[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L11_001CC920[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L11_001CCB10[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L11_001CCF30[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L11_001CD130[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L11_001CD340[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L11_001CD760[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L11_001CD960[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L11_001CDB70[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L11_001CDE40[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L11_001CE000[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L11_001CE168[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L11_001CC360, D_L11_001CC740, + D_L11_001CC920, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L11_001CCB10, D_L11_001CCF30, + D_L11_001CD130, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L11_001CD340, D_L11_001CD760, + D_L11_001CD960, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L11_001CDB70, D_L11_001CDE40, + D_L11_001CE000, 28, + 0.035714287f, }, +}; + +Vec4f D_L12_001DEA00[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L12_001DEDE0[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L12_001DEFC0[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L12_001DF1B0[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L12_001DF5D0[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L12_001DF7D0[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L12_001DF9E0[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L12_001DFE00[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L12_001E0000[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L12_001E0210[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L12_001E04E0[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L12_001E06A0[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L12_001E0808[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L12_001DEA00, D_L12_001DEDE0, + D_L12_001DEFC0, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L12_001DF1B0, D_L12_001DF5D0, + D_L12_001DF7D0, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L12_001DF9E0, D_L12_001DFE00, + D_L12_001E0000, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L12_001E0210, D_L12_001E04E0, + D_L12_001E06A0, 28, + 0.035714287f, }, +}; + +Vec4f D_L13_001CC270[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L13_001CC650[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L13_001CC830[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L13_001CCA20[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L13_001CCE40[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L13_001CD040[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L13_001CD250[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L13_001CD670[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L13_001CD870[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L13_001CDA80[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L13_001CDD50[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L13_001CDF10[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L13_001CE078[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L13_001CC270, D_L13_001CC650, + D_L13_001CC830, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L13_001CCA20, D_L13_001CCE40, + D_L13_001CD040, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L13_001CD250, D_L13_001CD670, + D_L13_001CD870, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L13_001CDA80, D_L13_001CDD50, + D_L13_001CDF10, 28, + 0.035714287f, }, +}; + +Vec4f D_L14_001D8920[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L14_001D8D00[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L14_001D8EE0[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L14_001D90D0[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L14_001D94F0[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L14_001D96F0[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L14_001D9900[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L14_001D9D20[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L14_001D9F20[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L14_001DA130[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L14_001DA400[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L14_001DA5C0[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L14_001DA728[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L14_001D8920, D_L14_001D8D00, + D_L14_001D8EE0, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L14_001D90D0, D_L14_001D94F0, + D_L14_001D96F0, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L14_001D9900, D_L14_001D9D20, + D_L14_001D9F20, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L14_001DA130, D_L14_001DA400, + D_L14_001DA5C0, 28, + 0.035714287f, }, +}; + +Vec4f D_L15_001CC180[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L15_001CC560[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L15_001CC740[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L15_001CC930[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L15_001CCD50[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L15_001CCF50[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L15_001CD160[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L15_001CD580[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L15_001CD780[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L15_001CD990[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L15_001CDC60[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L15_001CDE20[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L15_001CDF88[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L15_001CC180, D_L15_001CC560, + D_L15_001CC740, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L15_001CC930, D_L15_001CCD50, + D_L15_001CCF50, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L15_001CD160, D_L15_001CD580, + D_L15_001CD780, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L15_001CD990, D_L15_001CDC60, + D_L15_001CDE20, 28, + 0.035714287f, }, +}; + +Vec4f D_L16_001CBDE0[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L16_001CC1C0[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L16_001CC3A0[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L16_001CC590[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L16_001CC9B0[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L16_001CCBB0[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L16_001CCDC0[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L16_001CD1E0[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L16_001CD3E0[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L16_001CD5F0[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L16_001CD8C0[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L16_001CDA80[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L16_001CDBE8[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L16_001CBDE0, D_L16_001CC1C0, + D_L16_001CC3A0, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L16_001CC590, D_L16_001CC9B0, + D_L16_001CCBB0, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L16_001CCDC0, D_L16_001CD1E0, + D_L16_001CD3E0, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L16_001CD5F0, D_L16_001CD8C0, + D_L16_001CDA80, 28, + 0.035714287f, }, +}; + +Vec4f D_L17_001CC400[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L17_001CC7E0[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L17_001CC9C0[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L17_001CCBB0[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L17_001CCFD0[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L17_001CD1D0[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L17_001CD3E0[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L17_001CD800[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L17_001CDA00[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L17_001CDC10[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L17_001CDEE0[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L17_001CE0A0[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L17_001CE208[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L17_001CC400, D_L17_001CC7E0, + D_L17_001CC9C0, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L17_001CCBB0, D_L17_001CCFD0, + D_L17_001CD1D0, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L17_001CD3E0, D_L17_001CD800, + D_L17_001CDA00, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L17_001CDC10, D_L17_001CDEE0, + D_L17_001CE0A0, 28, + 0.035714287f, }, +}; + +Vec4f D_L18_001CC360[62] = { + {-0.158969f, 0.766333f, 0.515467f, 1.0f}, + {-0.535326f, 1.548165f, 0.666974f, 1.0f}, + { 0.700605f, -0.369658f, 0.440785f, 1.0f}, + { 1.571724f, -0.933529f, 0.626098f, 1.0f}, + { 2.676804f, -0.158746f, 0.55355f, 1.0f}, + { 0.92029f, 0.095262f, 0.36903f, 1.0f}, + {-0.363539f, -0.565161f, 0.637963f, 1.0f}, + {-0.511442f, -1.22869f, 0.779088f, 1.0f}, + {-0.080716f, -1.274794f, 0.743676f, 1.0f}, + {-0.095528f, -0.634265f, 0.598206f, 1.0f}, + {-0.657101f, -0.467931f, 0.688253f, 1.0f}, + {-0.863861f, -1.071314f, 0.814697f, 1.0f}, + { 0.190388f, -0.636114f, 0.551665f, 1.0f}, + { 0.349125f, -1.241935f, 0.711498f, 1.0f}, + { 0.876697f, -1.152379f, 0.674035f, 1.0f}, + { 0.482771f, -0.554814f, 0.496656f, 1.0f}, + { 0.818092f, 0.557323f, 0.385841f, 1.0f}, + { 2.180609f, 1.075228f, 0.571934f, 1.0f}, + { 1.541385f, 1.429886f, 0.588003f, 1.0f}, + { 0.632011f, 0.736758f, 0.42554f, 1.0f}, + { 2.590536f, 0.582543f, 0.556758f, 1.0f}, + { 0.924048f, 0.324537f, 0.363219f, 1.0f}, + { 0.407082f, 0.838898f, 0.463986f, 1.0f}, + { 0.803257f, 1.674533f, 0.585974f, 1.0f}, + { 0.134936f, 1.763902f, 0.595661f, 1.0f}, + { 0.136946f, 0.861426f, 0.482278f, 1.0f}, + {-0.898482f, -0.383772f, 0.751267f, 1.0f}, + {-1.053614f, -0.837048f, 0.836293f, 1.0f}, + { 2.211953f, -0.67603f, 0.585066f, 1.0f}, + { 0.841273f, -0.148285f, 0.398195f, 1.0f}, + {-0.990737f, 1.157639f, 0.707675f, 1.0f}, + {-0.383142f, 0.572601f, 0.541336f, 1.0f}, + {-0.012253f, 0.825942f, 0.494706f, 1.0f}, + {-0.205779f, 1.690341f, 0.627789f, 1.0f}, + { 0.278978f, 0.861724f, 0.476485f, 1.0f}, + { 0.454872f, 1.741508f, 0.592235f, 1.0f}, + { 1.143193f, 1.573135f, 0.591222f, 1.0f}, + { 0.521945f, 0.795114f, 0.448607f, 1.0f}, + { 1.814445f, 1.301302f, 0.5823f, 1.0f}, + { 0.73728f, 0.649726f, 0.40172f, 1.0f}, + { 2.391429f, 0.867409f, 0.566071f, 1.0f}, + { 0.885244f, 0.439156f, 0.372268f, 1.0f}, + { 2.675138f, 0.225337f, 0.557413f, 1.0f}, + { 0.930694f, 0.194093f, 0.366706f, 1.0f}, + { 2.478527f, -0.48457f, 0.56954f, 1.0f}, + { 0.889491f, -0.014947f, 0.380696f, 1.0f}, + { 1.87834f, -0.821818f, 0.60673f, 1.0f}, + { 0.780618f, -0.274235f, 0.418461f, 1.0f}, + { 1.221567f, -1.054608f, 0.65289f, 1.0f}, + { 0.600468f, -0.472461f, 0.468235f, 1.0f}, + { 0.585988f, -1.210536f, 0.696513f, 1.0f}, + { 0.331813f, -0.610642f, 0.530358f, 1.0f}, + { 0.11816f, -1.26165f, 0.728006f, 1.0f}, + { 0.038839f, -0.645209f, 0.57959f, 1.0f}, + {-0.292655f, -1.2641f, 0.760001f, 1.0f}, + {-0.236269f, -0.606305f, 0.618815f, 1.0f}, + { -0.69613f, -1.158025f, 0.79756f, 1.0f}, + {-0.510697f, -0.518867f, 0.66087f, 1.0f}, + {-0.977713f, -0.930754f, 0.828658f, 1.0f}, + {-0.782076f, -0.4238f, 0.715791f, 1.0f}, + {-1.267618f, -0.514469f, 0.849736f, 1.0f}, + {-1.182784f, -0.240839f, 0.797481f, 1.0f}, +}; + +s16 D_L18_001CC740[30][4][2] = { + { {58, 2}, {59, 3}, {27, 5}, {26, 4}}, + { {57, 6}, {10, 7}, {56, 9}, {11, 8}}, + {{55, 10}, {6, 11}, {54, 13}, {7, 12}}, + {{53, 14}, {9, 15}, {52, 17}, {8, 16}}, + {{51, 18}, {12, 19}, {50, 21}, {13, 20}}, + {{49, 22}, {15, 23}, {48, 25}, {14, 24}}, + {{47, 26}, {2, 27}, {46, 29}, {3, 28}}, + {{44, 30}, {45, 31}, {28, 33}, {29, 32}}, + {{43, 34}, {5, 35}, {42, 37}, {4, 36}}, + {{41, 38}, {21, 39}, {40, 41}, {20, 40}}, + {{39, 42}, {16, 43}, {38, 45}, {17, 44}}, + {{37, 46}, {19, 47}, {36, 49}, {18, 48}}, + {{25, 50}, {34, 51}, {24, 53}, {35, 52}}, + { {0, 54}, {32, 55}, {1, 57}, {33, 56}}, + {{31, 58}, {0, 54}, {30, 59}, {1, 57}}, + {{32, 55}, {25, 50}, {33, 56}, {24, 53}}, + {{34, 51}, {22, 60}, {35, 52}, {23, 61}}, + {{22, 60}, {37, 46}, {23, 61}, {36, 49}}, + {{19, 47}, {39, 42}, {18, 48}, {38, 45}}, + {{16, 43}, {41, 38}, {17, 44}, {40, 41}}, + {{21, 39}, {43, 34}, {20, 40}, {42, 37}}, + { {4, 36}, {5, 35}, {44, 30}, {45, 31}}, + {{29, 32}, {47, 26}, {28, 33}, {46, 29}}, + { {2, 27}, {49, 22}, {3, 28}, {48, 25}}, + {{15, 23}, {51, 18}, {14, 24}, {50, 21}}, + {{12, 19}, {53, 14}, {13, 20}, {52, 17}}, + { {9, 15}, {55, 10}, {8, 16}, {54, 13}}, + { {6, 11}, {57, 6}, {7, 12}, {56, 9}}, + { {11, 8}, {10, 7}, {58, 2}, {59, 3}}, + { {27, 5}, {26, 4}, {60, 0}, {61, 1}}, +}; + +f32 D_L18_001CC920[62][2] = { + {0.370718f, 0.000952f}, + {0.629927f, 0.003414f}, + {0.263638f, 0.084262f}, + {0.755983f, 0.088199f}, + {0.704307f, 0.065704f}, + {0.296337f, 0.065607f}, + {0.800677f, 0.142889f}, + {0.800678f, 0.112419f}, + {0.199967f, 0.112246f}, + {0.199967f, 0.142645f}, + {0.788941f, 0.202045f}, + {0.800677f, 0.173595f}, + {0.199967f, 0.173301f}, + {0.211704f, 0.20284f}, + {0.788941f, 0.256197f}, + {0.788941f, 0.230588f}, + {0.211704f, 0.230516f}, + {0.211704f, 0.257176f}, + {0.792092f, 0.309988f}, + {0.795642f, 0.284413f}, + {0.205003f, 0.283698f}, + {0.208552f, 0.310217f}, + {0.836473f, 0.358507f}, + {0.809044f, 0.337266f}, + { 0.1916f, 0.337519f}, + {0.164172f, 0.358545f}, + {0.903369f, 0.401762f}, + {0.874919f, 0.380765f}, + {0.125725f, 0.381694f}, + {0.097275f, 0.401677f}, + {0.024723f, 0.459178f}, + {0.975921f, 0.457914f}, + {0.943656f, 0.428417f}, + {0.056988f, 0.427652f}, + {0.977446f, 0.511513f}, + {0.989974f, 0.481298f}, + { 0.01067f, 0.481745f}, + {0.023198f, 0.512564f}, + {0.959181f, 0.573606f}, + {0.969771f, 0.542241f}, + {0.030873f, 0.542661f}, + {0.041463f, 0.575677f}, + {0.924188f, 0.646215f}, + {0.959349f, 0.609083f}, + {0.041295f, 0.609825f}, + {0.076456f, 0.645019f}, + {0.882354f, 0.725347f}, + {0.898078f, 0.679456f}, + {0.102566f, 0.679551f}, + { 0.11829f, 0.724708f}, + {0.868401f, 0.846528f}, + {0.868401f, 0.804954f}, + {0.132243f, 0.805705f}, + {0.132244f, 0.846888f}, + {0.868401f, 0.933466f}, + {0.868401f, 0.890466f}, + {0.132244f, 0.890712f}, + {0.132243f, 0.933029f}, + {0.868401f, 0.998266f}, + {0.132243f, 0.999633f}, + {0.872972f, 0.763892f}, + {0.127672f, 0.76141f}, +}; + +Vec4f D_L18_001CCB10[66] = { + { 0.675591f, -0.186971f, 0.530495f, 1.0f}, + { 2.470043f, -0.091801f, 0.481771f, 1.0f}, + {-0.071275f, 0.429629f, 0.419544f, 1.0f}, + {-0.732007f, 0.801799f, 0.370911f, 1.0f}, + { -0.42768f, -0.491383f, 0.593446f, 1.0f}, + {-0.511262f, -0.982125f, 0.670534f, 1.0f}, + { 0.228721f, -0.59527f, 0.541321f, 1.0f}, + { 1.16676f, -1.49734f, 0.46615f, 1.0f}, + { 0.500168f, 0.345812f, 0.470349f, 1.0f}, + { 1.116124f, 1.591994f, 0.493548f, 1.0f}, + { 0.05764f, 1.402069f, 0.447126f, 1.0f}, + { 0.235176f, 0.446869f, 0.441256f, 1.0f}, + {-0.118332f, -0.563594f, 0.525895f, 1.0f}, + { 0.150484f, -1.419714f, 0.55165f, 1.0f}, + { 0.54459f, -0.451874f, 0.548874f, 1.0f}, + { 2.095348f, -1.039424f, 0.476129f, 1.0f}, + { 0.668918f, 0.112648f, 0.502548f, 1.0f}, + { 2.119552f, 1.075367f, 0.488945f, 1.0f}, + {-0.359767f, 1.116576f, 0.409248f, 1.0f}, + { 0.09208f, 0.449425f, 0.43151f, 1.0f}, + { 0.575906f, 1.590641f, 0.478094f, 1.0f}, + { 0.376186f, 0.414522f, 0.455055f, 1.0f}, + { 1.652843f, 1.423019f, 0.494977f, 1.0f}, + { 0.604128f, 0.239432f, 0.48818f, 1.0f}, + { 2.428732f, 0.500319f, 0.486275f, 1.0f}, + { 0.691258f, -0.033277f, 0.516963f, 1.0f}, + { 2.337874f, -0.642467f, 0.48266f, 1.0f}, + { 0.629193f, -0.316052f, 0.541905f, 1.0f}, + { 1.666827f, -1.335615f, 0.470131f, 1.0f}, + { 0.414926f, -0.550738f, 0.549827f, 1.0f}, + { 0.618717f, -1.543135f, 0.486798f, 1.0f}, + { 0.032019f, -0.586928f, 0.529838f, 1.0f}, + {-0.225121f, -1.219353f, 0.613742f, 1.0f}, + {-0.265923f, -0.531666f, 0.528319f, 1.0f}, + { 2.30864f, 0.807712f, 0.48556f, 1.0f}, + { 0.682833f, 0.041953f, 0.509827f, 1.0f}, + { 1.905611f, 1.266886f, 0.492752f, 1.0f}, + { 0.63917f, 0.172303f, 0.497985f, 1.0f}, + { 1.377669f, 1.517915f, 0.495531f, 1.0f}, + { 0.558201f, 0.297822f, 0.477816f, 1.0f}, + { 0.857687f, 1.61746f, 0.493548f, 1.0f}, + { 0.450575f, 0.373296f, 0.466309f, 1.0f}, + { 0.289428f, 1.510359f, 0.464044f, 1.0f}, + { 0.305809f, 0.432981f, 0.449065f, 1.0f}, + {-0.554503f, 0.956317f, 0.389909f, 1.0f}, + { 0.017599f, 0.443538f, 0.425889f, 1.0f}, + { -0.15788f, 1.261332f, 0.428547f, 1.0f}, + { 0.162722f, 0.451856f, 0.436835f, 1.0f}, + { 2.479677f, 0.164322f, 0.482962f, 1.0f}, + { 0.684412f, -0.108377f, 0.525495f, 1.0f}, + { 2.421036f, -0.395585f, 0.481659f, 1.0f}, + { 0.654139f, -0.251646f, 0.537203f, 1.0f}, + { 2.21582f, -0.862336f, 0.479458f, 1.0f}, + { 0.590183f, -0.388604f, 0.54527f, 1.0f}, + { 1.885279f, -1.201457f, 0.473021f, 1.0f}, + { 0.485696f, -0.506084f, 0.550374f, 1.0f}, + { 1.412263f, -1.439968f, 0.466827f, 1.0f}, + { 0.3304f, -0.579868f, 0.546382f, 1.0f}, + { 0.896176f, -1.539617f, 0.47185f, 1.0f}, + { 0.129655f, -0.594509f, 0.535883f, 1.0f}, + { 0.361573f, -1.500612f, 0.516746f, 1.0f}, + {-0.049704f, -0.575474f, 0.528067f, 1.0f}, + { -0.0608f, -1.316948f, 0.583734f, 1.0f}, + {-0.186422f, -0.549125f, 0.52633f, 1.0f}, + {-0.346328f, -0.512724f, 0.54118f, 1.0f}, + {-0.388874f, -1.091096f, 0.647706f, 1.0f}, +}; + +s16 D_L18_001CCF30[32][4][2] = { + { {8, 0}, {9, 1}, {41, 3}, {40, 2}}, + { {52, 4}, {53, 5}, {15, 7}, {14, 6}}, + { {60, 8}, {61, 9}, {13, 11}, {12, 10}}, + {{16, 12}, {17, 13}, {37, 15}, {36, 14}}, + {{11, 16}, {10, 17}, {47, 19}, {46, 18}}, + {{32, 20}, {33, 21}, {65, 23}, {64, 22}}, + {{56, 24}, {57, 25}, {7, 27}, {6, 26}}, + { {0, 28}, {1, 29}, {49, 31}, {48, 30}}, + {{19, 32}, {18, 33}, {45, 35}, {44, 34}}, + {{21, 36}, {20, 37}, {43, 39}, {42, 38}}, + {{23, 40}, {22, 41}, {39, 43}, {38, 42}}, + {{25, 44}, {24, 45}, {35, 47}, {34, 46}}, + {{50, 48}, {51, 49}, {26, 51}, {27, 50}}, + {{54, 52}, {55, 53}, {28, 55}, {29, 54}}, + {{58, 56}, {59, 57}, {30, 59}, {31, 58}}, + {{62, 60}, {63, 61}, {32, 20}, {33, 21}}, + {{35, 47}, {34, 46}, {16, 12}, {17, 13}}, + {{37, 15}, {36, 14}, {23, 40}, {22, 41}}, + {{39, 43}, {38, 42}, {8, 0}, {9, 1}}, + { {41, 3}, {40, 2}, {21, 36}, {20, 37}}, + {{43, 39}, {42, 38}, {11, 16}, {10, 17}}, + {{45, 35}, {44, 34}, {2, 63}, {3, 62}}, + {{47, 19}, {46, 18}, {19, 32}, {18, 33}}, + {{49, 31}, {48, 30}, {25, 44}, {24, 45}}, + { {1, 29}, {0, 28}, {50, 48}, {51, 49}}, + {{26, 51}, {27, 50}, {52, 4}, {53, 5}}, + { {15, 7}, {14, 6}, {54, 52}, {55, 53}}, + {{28, 55}, {29, 54}, {56, 24}, {57, 25}}, + { {7, 27}, {6, 26}, {58, 56}, {59, 57}}, + {{30, 59}, {31, 58}, {60, 8}, {61, 9}}, + {{13, 11}, {12, 10}, {62, 60}, {63, 61}}, + {{65, 23}, {64, 22}, {5, 65}, {4, 64}}, +}; + +f32 D_L18_001CD130[66][2] = { + {0.872182f, 0.253754f}, + {0.129693f, 0.253754f}, + {0.138556f, 0.223113f}, + {0.863318f, 0.223113f}, + {0.051851f, 0.590805f}, + {0.950023f, 0.590805f}, + {0.954993f, 0.621446f}, + {0.046882f, 0.621446f}, + {0.010345f, 0.835934f}, + {0.991529f, 0.835934f}, + {0.982513f, 0.866575f}, + {0.019362f, 0.866575f}, + {0.915702f, 0.376318f}, + {0.086172f, 0.376318f}, + {0.094823f, 0.345677f}, + {0.907052f, 0.345677f}, + {0.811362f, 0.13119f}, + {0.190513f, 0.13119f}, + {0.212722f, 0.100549f}, + {0.789153f, 0.100549f}, + {0.062108f, 0.927857f}, + {0.939767f, 0.927857f}, + {0.896799f, 0.958498f}, + {0.105075f, 0.958498f}, + {0.043839f, 0.71337f}, + {0.958035f, 0.71337f}, + {0.964668f, 0.744011f}, + {0.037206f, 0.744011f}, + {0.939834f, 0.498882f}, + {0.062041f, 0.498882f}, + {0.064118f, 0.468241f}, + {0.937757f, 0.468241f}, + {0.770774f, 0.069908f}, + {0.231101f, 0.069908f}, + {0.250885f, 0.039266f}, + { 0.75099f, 0.039266f}, + {0.848919f, 0.192472f}, + {0.152956f, 0.192472f}, + {0.169695f, 0.161831f}, + { 0.83218f, 0.161831f}, + {0.896549f, 0.315036f}, + {0.105326f, 0.315036f}, + {0.118598f, 0.284395f}, + {0.883277f, 0.284395f}, + {0.930682f, 0.4376f}, + {0.071193f, 0.4376f}, + { 0.07619f, 0.406959f}, + {0.925684f, 0.406959f}, + {0.056845f, 0.529523f}, + { 0.94503f, 0.529523f}, + {0.946249f, 0.560164f}, + {0.055626f, 0.560164f}, + {0.047584f, 0.652088f}, + { 0.95429f, 0.652088f}, + { 0.95518f, 0.682729f}, + {0.046695f, 0.682729f}, + {0.022093f, 0.774652f}, + {0.979781f, 0.774652f}, + {0.987805f, 0.805293f}, + {0.014069f, 0.805293f}, + { 0.03147f, 0.897216f}, + {0.970404f, 0.897216f}, + {0.270779f, 0.008625f}, + {0.731096f, 0.008625f}, + {0.854374f, 0.989139f}, + {0.147501f, 0.989139f}, +}; + +Vec4f D_L18_001CD340[66] = { + { -0.02314f, -0.4663f, 0.512018f, 1.0f}, + {-0.115362f, -0.462084f, 0.510849f, 1.0f}, + {-0.078318f, -1.429786f, 0.591074f, 1.0f}, + { 0.104954f, -1.473209f, 0.592229f, 1.0f}, + { 0.656998f, 0.134343f, 0.594547f, 1.0f}, + { 0.649358f, 0.075636f, 0.5884f, 1.0f}, + { 2.060445f, 0.551002f, 0.688055f, 1.0f}, + { 1.887636f, 0.730237f, 0.68526f, 1.0f}, + { 0.377736f, 0.41752f, 0.601016f, 1.0f}, + { 0.444458f, 0.399906f, 0.604149f, 1.0f}, + { 0.272361f, 1.225101f, 0.635613f, 1.0f}, + { 0.061561f, 1.168113f, 0.626878f, 1.0f}, + { 0.061523f, 0.426583f, 0.580691f, 1.0f}, + { 0.144195f, 0.433824f, 0.58662f, 1.0f}, + {-0.470262f, 0.821621f, 0.600589f, 1.0f}, + {-0.613859f, 0.666486f, 0.591995f, 1.0f}, + {-0.103508f, 0.393068f, 0.567906f, 1.0f}, + {-0.021316f, 0.413033f, 0.574422f, 1.0f}, + {-0.743267f, 0.500108f, 0.583473f, 1.0f}, + {-0.860666f, 0.326396f, 0.574966f, 1.0f}, + {-0.184451f, 0.366348f, 0.561207f, 1.0f}, + {-0.968259f, 0.148583f, 0.566395f, 1.0f}, + { 0.225574f, 0.43473f, 0.592089f, 1.0f}, + { 0.304075f, 0.429261f, 0.596944f, 1.0f}, + {-0.133238f, 1.078255f, 0.618067f, 1.0f}, + {-0.310481f, 0.960766f, 0.609284f, 1.0f}, + { 0.591686f, 0.317376f, 0.607194f, 1.0f}, + { 0.62255f, 0.279976f, 0.605936f, 1.0f}, + { 1.213848f, 1.112944f, 0.667916f, 1.0f}, + { 0.971834f, 1.186495f, 0.660433f, 1.0f}, + { 0.502578f, 0.377099f, 0.606241f, 1.0f}, + { 0.551607f, 0.349604f, 0.607265f, 1.0f}, + { 0.731406f, 1.231706f, 0.652479f, 1.0f}, + { 0.49664f, 1.246016f, 0.64417f, 1.0f}, + { 0.643658f, 0.23691f, 0.603383f, 1.0f}, + { 0.655109f, 0.188262f, 0.599567f, 1.0f}, + { 1.680632f, 0.884232f, 0.680663f, 1.0f}, + { 1.452625f, 1.012011f, 0.674753f, 1.0f}, + { 0.429255f, -0.303994f, 0.539299f, 1.0f}, + { 0.389656f, -0.339966f, 0.534115f, 1.0f}, + { 1.533209f, -0.996015f, 0.637258f, 1.0f}, + { 1.712217f, -0.83792f, 0.646714f, 1.0f}, + { 0.575755f, -0.111775f, 0.565693f, 1.0f}, + { 0.541316f, -0.167659f, 0.558278f, 1.0f}, + { 2.132017f, -0.2926f, 0.67318f, 1.0f}, + { 2.209617f, -0.085401f, 0.680397f, 1.0f}, + { 0.632366f, 0.013146f, 0.581271f, 1.0f}, + { 0.606992f, -0.050671f, 0.573505f, 1.0f}, + { 2.2326f, 0.132092f, 0.685815f, 1.0f}, + { 2.18196f, 0.349073f, 0.68844f, 1.0f}, + { 0.505115f, -0.218051f, 0.551399f, 1.0f}, + { 0.467708f, -0.263386f, 0.54507f, 1.0f}, + { 1.874695f, -0.668254f, 0.655991f, 1.0f}, + { 2.016792f, -0.486725f, 0.664902f, 1.0f}, + { 0.254403f, -0.423201f, 0.521625f, 1.0f}, + { 0.197811f, -0.442971f, 0.518339f, 1.0f}, + { 0.71764f, -1.453792f, 0.603509f, 1.0f}, + { 0.929607f, -1.376898f, 0.610516f, 1.0f}, + { 0.348308f, -0.371538f, 0.529495f, 1.0f}, + { 0.303909f, -0.399196f, 0.525355f, 1.0f}, + { 1.138263f, -1.270351f, 0.618769f, 1.0f}, + { 1.340791f, -1.141264f, 0.627841f, 1.0f}, + { 0.133071f, -0.457248f, 0.515617f, 1.0f}, + { 0.0595f, -0.465061f, 0.513529f, 1.0f}, + { 0.300312f, -1.500015f, 0.594356f, 1.0f}, + { 0.506165f, -1.495425f, 0.598065f, 1.0f}, +}; + +s16 D_L18_001CD760[32][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {4, 4}, {5, 5}, {7, 7}, {6, 6}}, + { {8, 8}, {9, 9}, {11, 11}, {10, 10}}, + {{12, 12}, {13, 13}, {15, 15}, {14, 14}}, + {{16, 16}, {17, 17}, {19, 19}, {18, 18}}, + {{20, 20}, {16, 16}, {21, 21}, {19, 19}}, + {{17, 17}, {12, 12}, {18, 18}, {15, 15}}, + {{22, 22}, {23, 23}, {25, 25}, {24, 24}}, + {{13, 13}, {22, 22}, {14, 14}, {25, 25}}, + {{23, 23}, {8, 8}, {24, 24}, {11, 11}}, + {{26, 26}, {27, 27}, {29, 29}, {28, 28}}, + {{30, 30}, {31, 31}, {33, 33}, {32, 32}}, + { {9, 9}, {30, 30}, {10, 10}, {33, 33}}, + {{31, 31}, {26, 26}, {32, 32}, {29, 29}}, + {{34, 34}, {35, 35}, {37, 37}, {36, 36}}, + {{27, 27}, {34, 34}, {28, 28}, {37, 37}}, + {{35, 35}, {4, 4}, {36, 36}, {7, 7}}, + {{38, 38}, {39, 39}, {41, 41}, {40, 40}}, + {{42, 42}, {43, 43}, {45, 45}, {44, 44}}, + {{46, 46}, {47, 47}, {49, 49}, {48, 48}}, + { {5, 5}, {46, 46}, {6, 6}, {49, 49}}, + {{47, 47}, {42, 42}, {48, 48}, {45, 45}}, + {{50, 50}, {51, 51}, {53, 53}, {52, 52}}, + {{43, 43}, {50, 50}, {44, 44}, {53, 53}}, + {{51, 51}, {38, 38}, {52, 52}, {41, 41}}, + {{54, 54}, {55, 55}, {57, 57}, {56, 56}}, + {{58, 58}, {59, 59}, {61, 61}, {60, 60}}, + {{39, 39}, {58, 58}, {40, 40}, {61, 61}}, + {{59, 59}, {54, 54}, {60, 60}, {57, 57}}, + {{62, 62}, {63, 63}, {65, 65}, {64, 64}}, + {{55, 55}, {62, 62}, {56, 56}, {65, 65}}, + {{63, 63}, {0, 0}, {64, 64}, {3, 3}}, +}; + +f32 D_L18_001CD960[66][2] = { + {0.966802f, 0.935504f}, + {0.958515f, 0.987617f}, + {0.041485f, 0.987617f}, + {0.033198f, 0.935504f}, + {0.911093f, 0.422449f}, + {0.934656f, 0.451744f}, + {0.065344f, 0.451744f}, + {0.088907f, 0.422449f}, + {0.778659f, 0.20774f}, + {0.796243f, 0.235419f}, + {0.203756f, 0.235419f}, + {0.221341f, 0.20774f}, + {0.686916f, 0.095609f}, + {0.709874f, 0.123422f}, + {0.290125f, 0.123422f}, + {0.313084f, 0.095609f}, + {0.640391f, 0.040285f}, + {0.664128f, 0.067949f}, + {0.335872f, 0.067949f}, + {0.359609f, 0.040285f}, + {0.616662f, 0.012383f}, + {0.383338f, 0.012383f}, + {0.733853f, 0.151455f}, + {0.757401f, 0.179633f}, + {0.242599f, 0.179633f}, + {0.266147f, 0.151455f}, + {0.834989f, 0.314397f}, + {0.850963f, 0.340403f}, + {0.149037f, 0.340403f}, + {0.165011f, 0.314397f}, + {0.810036f, 0.262334f}, + {0.821383f, 0.288524f}, + {0.178617f, 0.288524f}, + {0.189964f, 0.262334f}, + {0.870611f, 0.366932f}, + { 0.88969f, 0.394225f}, + {0.110309f, 0.394225f}, + {0.129389f, 0.366932f}, + {0.991883f, 0.650429f}, + {0.992358f, 0.676791f}, + {0.007642f, 0.676791f}, + {0.008117f, 0.650429f}, + {0.980779f, 0.542818f}, + { 0.98657f, 0.571188f}, + {0.013429f, 0.571188f}, + {0.019221f, 0.542818f}, + {0.953648f, 0.482087f}, + {0.969848f, 0.512881f}, + {0.030152f, 0.512881f}, + {0.046352f, 0.482087f}, + {0.986873f, 0.598215f}, + {0.989711f, 0.624441f}, + {0.010289f, 0.624441f}, + {0.013127f, 0.598215f}, + {0.988971f, 0.76539f}, + {0.986935f, 0.801538f}, + {0.013065f, 0.801538f}, + {0.011029f, 0.76539f}, + { 0.99291f, 0.704145f}, + {0.989196f, 0.733275f}, + {0.010804f, 0.733275f}, + { 0.00709f, 0.704145f}, + { 0.98335f, 0.842042f}, + {0.978189f, 0.886849f}, + {0.021811f, 0.886849f}, + { 0.01665f, 0.842042f}, +}; + +Vec4f D_L18_001CDB70[45] = { + {-0.459973f, 0.227458f, 1.819319f, 1.0f}, + {-0.182317f, 0.251282f, 1.871568f, 1.0f}, + {-0.265347f, 0.368065f, 2.334517f, 1.0f}, + { -0.68151f, 0.365056f, 2.239645f, 1.0f}, + { 0.105082f, 0.267508f, 1.867097f, 1.0f}, + { 0.150164f, 0.36101f, 2.339419f, 1.0f}, + { 0.387126f, 0.262565f, 1.795795f, 1.0f}, + { 0.548924f, 0.34409f, 2.243321f, 1.0f}, + { 0.643735f, 0.242287f, 1.6582f, 1.0f}, + { 0.915554f, 0.31093f, 2.042472f, 1.0f}, + { 0.863248f, 0.209907f, 1.490461f, 1.0f}, + { 1.221045f, 0.263193f, 1.788902f, 1.0f}, + {-1.039766f, 0.355488f, 2.094818f, 1.0f}, + {-0.704652f, 0.192231f, 1.73013f, 1.0f}, + {-1.344829f, 0.340046f, 1.865848f, 1.0f}, + { -0.91737f, 0.151822f, 1.588206f, 1.0f}, + {-1.618875f, 0.323316f, 1.522903f, 1.0f}, + {-1.100763f, 0.114518f, 1.377986f, 1.0f}, + {-1.736925f, 0.307376f, 1.119209f, 1.0f}, + {-1.159788f, 0.106548f, 1.176139f, 1.0f}, + {-1.702616f, 0.290208f, 0.683498f, 1.0f}, + {-1.142633f, 0.097964f, 0.958283f, 1.0f}, + { 1.061644f, 0.168923f, 1.299622f, 1.0f}, + { 1.478246f, 0.210641f, 1.510606f, 1.0f}, + { 1.30119f, 0.100986f, 0.9984f, 1.0f}, + { 1.776396f, 0.145625f, 1.155547f, 1.0f}, + { 1.46922f, 0.036086f, 0.668485f, 1.0f}, + { 2.049365f, 0.074238f, 0.787966f, 1.0f}, + { 1.584994f, -0.026298f, 0.33846f, 1.0f}, + { 2.300535f, 0.00521f, 0.449818f, 1.0f}, + {-0.477357f, -0.036402f, 1.315129f, 1.0f}, + {-0.547506f, -0.09428f, 1.258097f, 1.0f}, + {-0.369538f, 0.028974f, 1.365441f, 1.0f}, + {-0.238436f, 0.089861f, 1.398993f, 1.0f}, + {-0.099287f, 0.134499f, 1.408619f, 1.0f}, + { 0.06f, 0.174005f, 1.394775f, 1.0f}, + { 0.225327f, 0.181041f, 1.348269f, 1.0f}, + { 0.371917f, 0.173644f, 1.273929f, 1.0f}, + { 0.505452f, 0.156622f, 1.192021f, 1.0f}, + { 0.645042f, 0.127205f, 1.088639f, 1.0f}, + { 0.825983f, 0.056347f, 0.841254f, 1.0f}, + { 0.889074f, -0.002065f, 0.549003f, 1.0f}, + { 0.869452f, -0.057806f, 0.227103f, 1.0f}, + {-0.694226f, -0.06698f, 1.175033f, 1.0f}, + {-0.584075f, -0.119592f, 1.230072f, 1.0f}, +}; + +s16 D_L18_001CDE40[28][4][2] = { + { {0, 0}, {1, 1}, {3, 3}, {2, 2}}, + { {1, 1}, {4, 4}, {2, 2}, {5, 5}}, + { {4, 4}, {6, 6}, {5, 5}, {7, 7}}, + { {6, 6}, {8, 8}, {7, 7}, {9, 9}}, + { {8, 8}, {10, 10}, {9, 9}, {11, 11}}, + { {0, 0}, {3, 3}, {13, 13}, {12, 12}}, + {{13, 13}, {12, 12}, {15, 15}, {14, 14}}, + {{15, 15}, {14, 14}, {17, 17}, {16, 16}}, + {{17, 17}, {16, 16}, {19, 19}, {18, 18}}, + {{19, 19}, {18, 18}, {21, 21}, {20, 20}}, + {{11, 11}, {10, 10}, {23, 23}, {22, 22}}, + {{23, 23}, {22, 22}, {25, 25}, {24, 24}}, + {{25, 25}, {24, 24}, {27, 27}, {26, 26}}, + {{27, 27}, {26, 26}, {29, 29}, {28, 28}}, + {{30, 30}, {15, 15}, {31, 31}, {17, 17}}, + {{32, 32}, {13, 13}, {30, 30}, {15, 15}}, + {{33, 33}, {0, 0}, {32, 32}, {13, 13}}, + {{33, 33}, {34, 34}, {0, 0}, {1, 1}}, + {{34, 34}, {35, 35}, {1, 1}, {4, 4}}, + {{35, 35}, {36, 36}, {4, 4}, {6, 6}}, + {{36, 36}, {37, 37}, {6, 6}, {8, 8}}, + {{37, 37}, {38, 38}, {8, 8}, {10, 10}}, + {{22, 22}, {10, 10}, {39, 39}, {38, 38}}, + {{24, 24}, {22, 22}, {40, 40}, {39, 39}}, + {{26, 26}, {24, 24}, {41, 41}, {40, 40}}, + {{28, 28}, {26, 26}, {42, 42}, {41, 41}}, + {{19, 19}, {21, 21}, {44, 44}, {43, 43}}, + {{17, 17}, {19, 19}, {31, 31}, {44, 44}}, +}; + +f32 D_L18_001CE000[45][2] = { + { 0.5f, 0.357984f}, + { 0.5f, 0.429073f}, + { 1.000917f, 0.429073f}, + { 1.000917f, 0.357984f}, + { 0.5f, 0.500162f}, + { 1.000917f, 0.500161f}, + { 0.5f, 0.571251f}, + { 1.000917f, 0.571251f}, + { 0.5f, 0.643103f}, + { 1.000917f, 0.642339f}, + { 0.5f, 0.713429f}, + { 1.000917f, 0.713429f}, + { 1.000917f, 0.286895f}, + { 0.5f, 0.286895f}, + { 1.000917f, 0.215806f}, + { 0.5f, 0.215806f}, + { 1.000917f, 0.144717f}, + { 0.5f, 0.144717f}, + { 1.000917f, 0.073628f}, + { 0.500001f, 0.095818f}, + { 1.000917f, 0.002538f}, + { 0.499998f, 0.045207f}, + { 0.5f, 0.784518f}, + { 1.000917f, 0.784518f}, + { 0.5f, 0.855607f}, + { 1.000917f, 0.855607f}, + { 0.5f, 0.926696f}, + { 1.050987f, 0.926696f}, + { 0.5f, 0.997785f}, + { 1.120456f, 0.997785f}, + {-0.000918f, 0.215806f}, + {-0.000918f, 0.144716f}, + {-0.000918f, 0.286895f}, + {-0.000918f, 0.357984f}, + {-0.000918f, 0.429073f}, + {-0.000918f, 0.500162f}, + {-0.000918f, 0.571251f}, + {-0.000918f, 0.643866f}, + {-0.000918f, 0.713429f}, + {-0.000918f, 0.784518f}, + {-0.000918f, 0.855607f}, + {-0.050987f, 0.926696f}, + {-0.120455f, 0.997785f}, + { 0.100877f, 0.108557f}, + { 0.011887f, 0.130572f}, +}; + +E_2a7780 D_L18_001CE168[4] = { + { + {29, 0, 13, 14}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0, 0x28808080, 0, 0x28808080}, + }, 2.3076923f, + D_L18_001CC360, D_L18_001CC740, + D_L18_001CC920, 30, + 0.033333335f, }, + { + {21, 8, 31, 5}, + { + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + {0x28808080, 0x28808080, 0, 0}, + {0x50808080, 0x50808080, 0x28808080, 0x28808080}, + }, 2.6666667f, + D_L18_001CCB10, D_L18_001CCF30, + D_L18_001CD130, 32, + 0.03125f, }, + { + {5, 4, 0, 31}, + { + {0, 0x28808080, 0, 0x28808080}, + {0x28808080, 0x50808080, 0x28808080, 0x50808080}, + {0x28808080, 0, 0x28808080, 0}, + {0x50808080, 0x28808080, 0x50808080, 0x28808080}, + }, 4.0f, + D_L18_001CD340, D_L18_001CD760, + D_L18_001CD960, 32, + 0.03125f, }, + { + {9, 26, 13, 25}, + { + {0x50808080, 0x50808080, 0, 0}, + {0x50808080, 0, 0x50808080, 0}, + {0x50808080, 0x50808080, 0, 0}, + {0, 0x50808080, 0, 0x50808080}, + }, 5.090909f, + D_L18_001CDB70, D_L18_001CDE40, + D_L18_001CE000, 28, + 0.035714287f, }, +}; From e21fd0c3f4ff6458bdeb6611a850c22908870e7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:06:57 +0000 Subject: [PATCH 105/213] decomp: define the vendor item pose and part tables in C --- config/us/levels/data.tsv | 56 +- .../cutscenes/update_cutscene_playback.c | 18 - src/overlays/shared/vendor/vendor_menu.c | 1537 +++++++++++++++++ 3 files changed, 1575 insertions(+), 36 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 901b818b8c..7dffcd5836 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -4071,6 +4071,8 @@ D_L00_001B9DDC 4 D_L00_001BA620 3075 D_L00_001BB280 3075 D_L00_001C2108 740 +D_L00_001C8900 1776 +D_L00_001C8FF0 2368 D_L00_001C9930 1776 D_L00_001CA020 148 D_L00_001CA380 144 @@ -5076,8 +5078,9 @@ D_L01_001C5C80 4 D_L01_001C5F80 1 D_L01_001C7380 1 D_L01_001C7B80 1 -D_L01_001C8D80 4 +D_L01_001C8D80 1776 D_L01_001C8DA0 4 +D_L01_001C9470 2368 D_L01_001C9DB0 1776 D_L01_001CA4A0 148 D_L01_001CA800 144 @@ -6287,8 +6290,9 @@ D_L02_001C5E00 4 D_L02_001C6100 1 D_L02_001C7500 1 D_L02_001C7D00 1 -D_L02_001C8F00 4 +D_L02_001C8F00 1776 D_L02_001C8F20 4 +D_L02_001C95F0 2368 D_L02_001C9F30 1776 D_L02_001CA620 148 D_L02_001CA980 144 @@ -7317,8 +7321,9 @@ D_L03_001C5900 4 D_L03_001C5C00 1 D_L03_001C7000 1 D_L03_001C7800 1 -D_L03_001C8A00 4 +D_L03_001C8A00 1776 D_L03_001C8A20 4 +D_L03_001C90F0 2368 D_L03_001C9A30 1776 D_L03_001CA120 148 D_L03_001CA480 144 @@ -8407,8 +8412,9 @@ D_L04_001C5980 4 D_L04_001C5C80 1 D_L04_001C7080 1 D_L04_001C7880 1 -D_L04_001C8A80 4 +D_L04_001C8A80 1776 D_L04_001C8AA0 4 +D_L04_001C9170 2368 D_L04_001C9AB0 1776 D_L04_001CA1A0 148 D_L04_001CA500 144 @@ -9553,8 +9559,9 @@ D_L05_001C5C80 4 D_L05_001C5F80 1 D_L05_001C7380 1 D_L05_001C7B80 1 -D_L05_001C8D80 4 +D_L05_001C8D80 1776 D_L05_001C8DA0 4 +D_L05_001C9470 2368 D_L05_001C9DB0 1776 D_L05_001CA4A0 148 D_L05_001CA800 144 @@ -10766,8 +10773,9 @@ D_L06_001C4C38 4 D_L06_001C6280 1 D_L06_001C7680 1 D_L06_001C7E80 1 -D_L06_001C9080 4 +D_L06_001C9080 1776 D_L06_001C90A0 4 +D_L06_001C9770 2368 D_L06_001CA0B0 1776 D_L06_001CA7A0 148 D_L06_001CAB00 144 @@ -11867,8 +11875,9 @@ D_L07_001C4538 4 D_L07_001C5B80 1 D_L07_001C6F80 1 D_L07_001C7780 1 -D_L07_001C8980 4 +D_L07_001C8980 1776 D_L07_001C89A0 4 +D_L07_001C9070 2368 D_L07_001C99B0 1776 D_L07_001CA0A0 148 D_L07_001CA400 144 @@ -13092,8 +13101,9 @@ D_L08_001C6000 4 D_L08_001C6300 1 D_L08_001C7700 1 D_L08_001C7F00 1 -D_L08_001C9100 4 +D_L08_001C9100 1776 D_L08_001C9120 4 +D_L08_001C97F0 2368 D_L08_001CA130 1776 D_L08_001CA820 148 D_L08_001CAB80 144 @@ -14359,8 +14369,9 @@ D_L09_001C5980 4 D_L09_001C5C80 1 D_L09_001C7080 1 D_L09_001C7880 1 -D_L09_001C8A80 4 +D_L09_001C8A80 1776 D_L09_001C8AA0 4 +D_L09_001C9170 2368 D_L09_001C9AB0 1776 D_L09_001CA1A0 148 D_L09_001CA500 144 @@ -15718,8 +15729,9 @@ D_L10_001C5C80 4 D_L10_001C5F80 1 D_L10_001C7380 1 D_L10_001C7B80 1 -D_L10_001C8D80 4 +D_L10_001C8D80 1776 D_L10_001C8DA0 4 +D_L10_001C9470 2368 D_L10_001C9DB0 1776 D_L10_001CA4A0 148 D_L10_001CA800 144 @@ -16903,8 +16915,9 @@ D_L11_001C6200 4 D_L11_001C6500 1 D_L11_001C7900 1 D_L11_001C8100 1 -D_L11_001C9300 4 +D_L11_001C9300 1776 D_L11_001C9320 4 +D_L11_001C99F0 2368 D_L11_001CA330 1776 D_L11_001CAA20 148 D_L11_001CAD80 144 @@ -18118,8 +18131,9 @@ D_L12_001C5C80 4 D_L12_001C5F80 1 D_L12_001C7380 1 D_L12_001C7B80 1 -D_L12_001C8D80 4 +D_L12_001C8D80 1776 D_L12_001C8DA0 4 +D_L12_001C9470 2368 D_L12_001C9DB0 1776 D_L12_001CA4A0 148 D_L12_001CA800 144 @@ -19233,8 +19247,9 @@ D_L13_001C5B00 4 D_L13_001C5E00 1 D_L13_001C7200 1 D_L13_001C7A00 1 -D_L13_001C8C00 4 +D_L13_001C8C00 1776 D_L13_001C8C20 4 +D_L13_001C92F0 2368 D_L13_001C9C30 1776 D_L13_001CA320 148 D_L13_001CA680 144 @@ -20421,8 +20436,9 @@ D_L14_001C5F00 4 D_L14_001C6200 1 D_L14_001C7600 1 D_L14_001C7E00 1 -D_L14_001C9000 4 +D_L14_001C9000 1776 D_L14_001C9020 4 +D_L14_001C96F0 2368 D_L14_001CA030 1776 D_L14_001CA720 148 D_L14_001CAA80 144 @@ -21627,8 +21643,9 @@ D_L15_001C5E00 4 D_L15_001C6100 1 D_L15_001C7500 1 D_L15_001C7D00 1 -D_L15_001C8F00 4 +D_L15_001C8F00 1776 D_L15_001C8F20 4 +D_L15_001C95F0 2368 D_L15_001C9F30 1776 D_L15_001CA620 148 D_L15_001CA980 144 @@ -22750,8 +22767,9 @@ D_L16_001C5C80 4 D_L16_001C5F80 1 D_L16_001C7380 1 D_L16_001C7B80 1 -D_L16_001C8D80 4 +D_L16_001C8D80 1776 D_L16_001C8DA0 4 +D_L16_001C9470 2368 D_L16_001C9DB0 1776 D_L16_001CA4A0 148 D_L16_001CA800 144 @@ -24075,8 +24093,9 @@ D_L17_001C6100 4 D_L17_001C6400 1 D_L17_001C7800 1 D_L17_001C8000 1 -D_L17_001C9200 4 +D_L17_001C9200 1776 D_L17_001C9220 4 +D_L17_001C98F0 2368 D_L17_001CA230 1776 D_L17_001CA920 148 D_L17_001CAC80 144 @@ -25268,8 +25287,9 @@ D_L18_001C4AB0 24 D_L18_001C4EB8 4 D_L18_001C7900 1 D_L18_001C8100 1 -D_L18_001C9300 4 +D_L18_001C9300 1776 D_L18_001C9320 4 +D_L18_001C99F0 2368 D_L18_001CA330 1776 D_L18_001CAA20 148 D_L18_001CAD80 144 diff --git a/src/overlays/shared/cutscenes/update_cutscene_playback.c b/src/overlays/shared/cutscenes/update_cutscene_playback.c index 55537cb3c3..ef3c6b7787 100644 --- a/src/overlays/shared/cutscenes/update_cutscene_playback.c +++ b/src/overlays/shared/cutscenes/update_cutscene_playback.c @@ -1484,7 +1484,6 @@ int D_L01_00161194 = 0; int D_L01_001622B8 __attribute__((section(".bss"))); float D_L01_001C8DA0 NOT_SDA = 0; -float D_L01_001C8D80 NOT_SDA = 0; int D_L01_00161090 = 0; Vec4 D_L01_00166400[3] __attribute__((section(".bss"))); @@ -1560,7 +1559,6 @@ int D_L02_00161194 = 0; int D_L02_00162438 __attribute__((section(".bss"))); float D_L02_001C8F20 NOT_SDA = 0; -float D_L02_001C8F00 NOT_SDA = 0; int D_L02_00161090 = 0; Vec4 D_L02_00166580[3] __attribute__((section(".bss"))); @@ -1637,7 +1635,6 @@ int D_L03_00161194 = 0; int D_L03_00161F38 __attribute__((section(".bss"))); float D_L03_001C8A20 NOT_SDA = 0; -float D_L03_001C8A00 NOT_SDA = 0; int D_L03_00161090 = 0; Vec4 D_L03_00166080[3] __attribute__((section(".bss"))); @@ -1717,7 +1714,6 @@ int D_L04_00161194 = 0; int D_L04_00161FB8 __attribute__((section(".bss"))); float D_L04_001C8AA0 NOT_SDA = 0; -float D_L04_001C8A80 NOT_SDA = 0; int D_L04_00161090 = 0; Vec4 D_L04_00166100[3] __attribute__((section(".bss"))); @@ -1792,7 +1788,6 @@ int D_L05_00161194 = 0; int D_L05_00162238 __attribute__((section(".bss"))); float D_L05_001C8DA0 NOT_SDA = 0; -float D_L05_001C8D80 NOT_SDA = 0; int D_L05_00161090 = 0; Vec4 D_L05_00166380[3] __attribute__((section(".bss"))); @@ -1866,7 +1861,6 @@ int D_L06_00161194 = 0; int D_L06_001625B8 __attribute__((section(".bss"))); float D_L06_001C90A0 NOT_SDA = 0; -float D_L06_001C9080 NOT_SDA = 0; int D_L06_00161090 = 0; Vec4 D_L06_00166700[3] __attribute__((section(".bss"))); @@ -1940,7 +1934,6 @@ int D_L07_00161194 = 0; int D_L07_00161EB8 __attribute__((section(".bss"))); float D_L07_001C89A0 NOT_SDA = 0; -float D_L07_001C8980 NOT_SDA = 0; int D_L07_00161090 = 0; Vec4 D_L07_00166000[3] __attribute__((section(".bss"))); @@ -2012,7 +2005,6 @@ int D_L08_00161194 = 0; int D_L08_00162638 __attribute__((section(".bss"))); float D_L08_001C9120 NOT_SDA = 0; -float D_L08_001C9100 NOT_SDA = 0; int D_L08_00161090 = 0; Vec4 D_L08_00166780[3] __attribute__((section(".bss"))); @@ -2094,7 +2086,6 @@ int D_L09_00161194 = 0; int D_L09_00161FB8 __attribute__((section(".bss"))); float D_L09_001C8AA0 NOT_SDA = 0; -float D_L09_001C8A80 NOT_SDA = 0; int D_L09_00161090 = 0; Vec4 D_L09_00166100[3] __attribute__((section(".bss"))); @@ -2172,7 +2163,6 @@ int D_L10_00161194 = 0; int D_L10_001622B8 __attribute__((section(".bss"))); float D_L10_001C8DA0 NOT_SDA = 0; -float D_L10_001C8D80 NOT_SDA = 0; int D_L10_00161090 = 0; Vec4 D_L10_00166400[3] __attribute__((section(".bss"))); @@ -2250,7 +2240,6 @@ int D_L11_00161194 = 0; int D_L11_00162838 __attribute__((section(".bss"))); float D_L11_001C9320 NOT_SDA = 0; -float D_L11_001C9300 NOT_SDA = 0; int D_L11_00161090 = 0; Vec4 D_L11_001669C0[3] __attribute__((section(".bss"))); @@ -2327,7 +2316,6 @@ int D_L12_00161194 = 0; int D_L12_001622B8 __attribute__((section(".bss"))); float D_L12_001C8DA0 NOT_SDA = 0; -float D_L12_001C8D80 NOT_SDA = 0; int D_L12_00161090 = 0; Vec4 D_L12_00166400[3] __attribute__((section(".bss"))); @@ -2405,7 +2393,6 @@ int D_L13_00161194 = 0; int D_L13_00162138 __attribute__((section(".bss"))); float D_L13_001C8C20 NOT_SDA = 0; -float D_L13_001C8C00 NOT_SDA = 0; int D_L13_00161090 = 0; Vec4 D_L13_00166280[3] __attribute__((section(".bss"))); @@ -2483,7 +2470,6 @@ int D_L14_00161194 = 0; int D_L14_00162538 __attribute__((section(".bss"))); float D_L14_001C9020 NOT_SDA = 0; -float D_L14_001C9000 NOT_SDA = 0; int D_L14_00161090 = 0; Vec4 D_L14_00166680[3] __attribute__((section(".bss"))); @@ -2560,7 +2546,6 @@ int D_L15_00161194 = 0; int D_L15_00162438 __attribute__((section(".bss"))); float D_L15_001C8F20 NOT_SDA = 0; -float D_L15_001C8F00 NOT_SDA = 0; int D_L15_00161090 = 0; Vec4 D_L15_00166580[3] __attribute__((section(".bss"))); @@ -2639,7 +2624,6 @@ int D_L16_00161194 = 0; int D_L16_00162238 __attribute__((section(".bss"))); float D_L16_001C8DA0 NOT_SDA = 0; -float D_L16_001C8D80 NOT_SDA = 0; int D_L16_00161090 = 0; Vec4 D_L16_001663C0[3] __attribute__((section(".bss"))); @@ -2716,7 +2700,6 @@ int D_L17_00161194 = 0; int D_L17_00162738 __attribute__((section(".bss"))); float D_L17_001C9220 NOT_SDA = 0; -float D_L17_001C9200 NOT_SDA = 0; int D_L17_00161090 = 0; Vec4 D_L17_00166880[3] __attribute__((section(".bss"))); @@ -2790,7 +2773,6 @@ int D_L18_00161194 = 0; int D_L18_00162838 __attribute__((section(".bss"))); float D_L18_001C9320 NOT_SDA = 0; -float D_L18_001C9300 NOT_SDA = 0; int D_L18_00161090 = 0; Vec4 D_L18_00166980[3] __attribute__((section(".bss"))); diff --git a/src/overlays/shared/vendor/vendor_menu.c b/src/overlays/shared/vendor/vendor_menu.c index 1a49460b00..0d4bc9cbc9 100644 --- a/src/overlays/shared/vendor/vendor_menu.c +++ b/src/overlays/shared/vendor/vendor_menu.c @@ -3753,3 +3753,1540 @@ VendorSound D_L18_001C2B08[37] = { {0}, {0}, }; + +/* How the vendor shows the selected item, by item: the item moby's rotation + and its offset from the vendor (offset[3] is the extra height of a weapon, + added again with the discount), then the part moby shown with it. */ +typedef struct { + f32 unused[4]; + f32 rotation[4]; + f32 offset[4]; +} VendorItemPose; + +typedef struct { + f32 unused[4]; + f32 rotation[4]; /* x and y are read */ + f32 offset[4]; /* added to the item moby's position */ + s32 class_id; /* the part's moby class, 0 for none */ + s32 pad34[3]; +} VendorItemPart; + +VendorItemPose vendor_item_poses[37] __asm__("D_L00_001C8900") = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart vendor_item_parts[37] __asm__("D_L00_001C8FF0") = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L01_001C8D80[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L01_001C9470[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L02_001C8F00[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L02_001C95F0[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L03_001C8A00[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L03_001C90F0[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L04_001C8A80[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L04_001C9170[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L05_001C8D80[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L05_001C9470[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L06_001C9080[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L06_001C9770[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L07_001C8980[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L07_001C9070[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L08_001C9100[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L08_001C97F0[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L09_001C8A80[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L09_001C9170[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L10_001C8D80[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L10_001C9470[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L11_001C9300[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L11_001C99F0[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L12_001C8D80[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L12_001C9470[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L13_001C8C00[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L13_001C92F0[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L14_001C9000[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L14_001C96F0[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L15_001C8F00[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L15_001C95F0[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L16_001C8D80[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L16_001C9470[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L17_001C9200[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L17_001C98F0[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPose D_L18_001C9300[37] = { + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.5f, -0.05f, -0.02f, 0.06f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.5f, -1.7f, -0.26f, 0.12f}}, + {{0}}, + {{0}, {0.0f, -1.57f, 0.0f, 0.0f}, {-0.9f, -0.0f, -0.12f, 0.09f}}, + {{0}, {0.0f, -1.57f, -2.9f, 0.0f}, {-3.0f, -1.75f, -0.19f, 0.11f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-2.4f, -1.4f, -0.25f, 0.12f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.4f, -2.15f, -0.15f, 0.12f}}, + {{0}, {0.0f, 0.0f, 2.8f, 0.0f}, {0.3f, -0.1f, -0.02f, 0.05f}}, + {{0}, {0.0f, 0.0f, 0.0f, 0.0f}, {-1.0f, -0.2f, -0.1f, 0.09f}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-3.0f, -1.9f, -0.13f, 0.11f}}, + {{0}, {0.0f, 0.0f, 3.0f, 0.0f}, {0.3f, -0.15f, -0.025f, 0.06f}}, + {{0}}, + {{0}}, + {{0}, {0.0f, -1.57f, -3.0f, 0.0f}, {-4.1f, -2.2f, -0.35f, 0.12f}}, + {{0}, {0.0f, 0.0f, 0.1f, 0.0f}, {1.0f, 0.35f, -0.06f, 0.05f}}, + {{0}, {0.0f, 0.0f, 2.9f, 0.0f}, {0.3f, -0.1f, -0.04f, 0.05f}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; + +VendorItemPart D_L18_001C99F0[37] = { + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe2}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xcc}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xde}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x3ee}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xd6}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xe1}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.3f, 0.0f, -0.2f, 0.0f}, 0xd5}, + {{0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0xdf}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x59e}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a7}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x5a9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0.0f, 0.4f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -0.2f, 0.0f}, 0x1c9}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, + {{0}}, +}; From c4549637c297697562c6e74c3ef65cd6cf4d0a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:14:24 +0000 Subject: [PATCH 106/213] decomp: define the item preview placements in C --- config/us/levels/exe_data.tsv | 19 +++++++++ configure.py | 1 + .../update_item_preview_binding.c | 39 +++++++++++++++++++ 3 files changed, 59 insertions(+) diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index 796cbacf74..0804b2ce10 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -137,6 +137,7 @@ 00 001C28F0 64 00 001C2F00 48 00 001C44B8 80 +00 001C4508 1152 00 001C4988 76 00 001C5800 768 00 001CA0B8 96 @@ -320,6 +321,7 @@ 01 001C2D70 64 01 001C3380 48 01 001C4938 80 +01 001C4988 1152 01 001C4E08 76 01 001C5C80 768 01 001CA538 96 @@ -503,6 +505,7 @@ 02 001C2EF0 64 02 001C3500 48 02 001C4AB8 80 +02 001C4B08 1152 02 001C4F88 76 02 001C5E00 768 02 001CA6B8 96 @@ -686,6 +689,7 @@ 03 001C29F0 64 03 001C3000 48 03 001C45B8 80 +03 001C4608 1152 03 001C4A88 76 03 001C5900 768 03 001CA1B8 96 @@ -869,6 +873,7 @@ 04 001C2A70 64 04 001C3080 48 04 001C4638 80 +04 001C4688 1152 04 001C4B08 76 04 001C5980 768 04 001CA238 96 @@ -1052,6 +1057,7 @@ 05 001C2D70 64 05 001C3380 48 05 001C4938 80 +05 001C4988 1152 05 001C4E08 76 05 001C5C80 768 05 001CA538 96 @@ -1235,6 +1241,7 @@ 06 001C3070 64 06 001C3680 48 06 001C4C38 80 +06 001C4C88 1152 06 001C5108 76 06 001C5F80 768 06 001CA838 96 @@ -1418,6 +1425,7 @@ 07 001C2970 64 07 001C2F80 48 07 001C4538 80 +07 001C4588 1152 07 001C4A08 76 07 001C5880 768 07 001CA138 96 @@ -1601,6 +1609,7 @@ 08 001C30F0 64 08 001C3700 48 08 001C4CB8 80 +08 001C4D08 1152 08 001C5188 76 08 001C6000 768 08 001CA8B8 96 @@ -1784,6 +1793,7 @@ 09 001C2A70 64 09 001C3080 48 09 001C4638 80 +09 001C4688 1152 09 001C4B08 76 09 001C5980 768 09 001CA238 96 @@ -1967,6 +1977,7 @@ 10 001C2D70 64 10 001C3380 48 10 001C4938 80 +10 001C4988 1152 10 001C4E08 76 10 001C5C80 768 10 001CA538 96 @@ -2150,6 +2161,7 @@ 11 001C32F0 64 11 001C3900 48 11 001C4EB8 80 +11 001C4F08 1152 11 001C5388 76 11 001C6200 768 11 001CAAB8 96 @@ -2333,6 +2345,7 @@ 12 001C2D70 64 12 001C3380 48 12 001C4938 80 +12 001C4988 1152 12 001C4E08 76 12 001C5C80 768 12 001CA538 96 @@ -2516,6 +2529,7 @@ 13 001C2BF0 64 13 001C3200 48 13 001C47B8 80 +13 001C4808 1152 13 001C4C88 76 13 001C5B00 768 13 001CA3B8 96 @@ -2699,6 +2713,7 @@ 14 001C2FF0 64 14 001C3600 48 14 001C4BB8 80 +14 001C4C08 1152 14 001C5088 76 14 001C5F00 768 14 001CA7B8 96 @@ -2882,6 +2897,7 @@ 15 001C2EF0 64 15 001C3500 48 15 001C4AB8 80 +15 001C4B08 1152 15 001C4F88 76 15 001C5E00 768 15 001CA6B8 96 @@ -3065,6 +3081,7 @@ 16 001C2D70 64 16 001C3380 48 16 001C4938 80 +16 001C4988 1152 16 001C4E08 76 16 001C5C80 768 16 001CA538 96 @@ -3248,6 +3265,7 @@ 17 001C31F0 64 17 001C3800 48 17 001C4DB8 80 +17 001C4E08 1152 17 001C5288 76 17 001C6100 768 17 001CA9B8 96 @@ -3431,6 +3449,7 @@ 18 001C32F0 64 18 001C3900 48 18 001C4EB8 80 +18 001C4F08 1152 18 001C5388 76 18 001C6200 768 18 001CAAB8 96 diff --git a/configure.py b/configure.py index 71e0c2a726..07427a1c5c 100755 --- a/configure.py +++ b/configure.py @@ -1186,6 +1186,7 @@ "rendering/texture/initialize_alpha_lookup_table": (0x18E740, 0x8F6C0, 1024), "mobys/resolve_moby_hit_response": (0x1CC080, 0xCD000, 200), "ui/map/copy_level_object_positions": (0x1E03B8, 0xE1338, 80), + "ui/menus/item_preview/update_item_preview_binding": (0x1E0408, 0xE1388, 1152), "rendering/debug/print_debug_text_centered": (0x189DC0, 0x8AD40, 384), "rendering/effects/draw_light_quads": (0x18CAA0, 0x8DA20, 64), "runtime/callbacks/add_draw_callback": (0x18DB40, 0x8EAC0, 512), diff --git a/src/ui/menus/item_preview/update_item_preview_binding.c b/src/ui/menus/item_preview/update_item_preview_binding.c index f6ae17588a..f348456fe0 100644 --- a/src/ui/menus/item_preview/update_item_preview_binding.c +++ b/src/ui/menus/item_preview/update_item_preview_binding.c @@ -213,3 +213,42 @@ s32 update_item_preview_binding(struct ItemPreviewBinding *preview) { } return 0; } + +struct ItemPreviewPlacement preview_placements[36] = { + {6.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {3.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0.2f, 0.0f}, + {3.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0.2f, 0.0f}, + {3.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0.2f, 0.0f}, + {3.0f, 5.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0.2f, 0.0f}, + {2.0f, 3.0f, 0.0f, -0.2f, 0.0f, 0.0f, 0.0f, 0.0f}, + {2.0f, 3.0f, 0.0f, -0.2f, 0.0f, 0.0f, 0.0f, 0.0f}, + {2.0f, 3.0f, 0.0f, -0.2f, 0.0f, 0.0f, 0.0f, 0.0f}, + {6.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {4.0f, 4.0f, 0.0f, 0.0f, 0.0f, -1.5707964f, 0.0f, 0.5f}, + {2.5f, 2.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f}, + {5.0f, 5.0f, 0.0f, -0.2f, 0.0f, -1.5707964f, 0.0f, 0.4f}, + {2.0f, 3.0f, 0.0f, -0.1f, 0.0f, 0.0f, 0.0f, 0.1f}, + {4.0f, 4.0f, 0.0f, -0.05f, 0.0f, -1.5707964f, 0.0f, 0.45f}, + {6.0f, 6.0f, 0.0f, -0.15f, 0.0f, -1.5707964f, 0.0f, 0.3f}, + {5.0f, 5.0f, 0.0f, -0.18f, 0.0f, -1.5707964f, 0.0f, 0.3f}, + {6.0f, 6.0f, 0.0f, -0.1f, 0.0f, -1.5707964f, 0.0f, 0.5f}, + {2.5f, 2.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f}, + {3.0f, 3.0f, 0.0f, -0.05f, 0.0f, 0.0f, 0.0f, 0.3f}, + {5.0f, 5.0f, 0.0f, -0.1f, 0.0f, -1.5707964f, 0.0f, 0.3f}, + {2.5f, 2.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f}, + {4.0f, 4.0f, 0.0f, -0.1f, 0.0f, -1.5707964f, 0.0f, 0.3f}, + {4.5f, 6.0f, 0.0f, 0.0f, 0.0f, -1.5707964f, 0.0f, 0.75f}, + {7.0f, 7.0f, 0.0f, -0.3f, 0.0f, -1.5707964f, 0.0f, 0.3f}, + {2.0f, 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {2.5f, 2.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f}, + {3.0f, 6.0f, 0.0f, -0.52f, -1.5707964f, 0.0f, 0.0f, 0.0f}, + {2.0f, 5.0f, 0.0f, 0.45f, 1.5707964f, 0.0f, 0.2f, 0.0f}, + {2.0f, 3.0f, 0.0f, 0.2f, 0.0f, 0.5f, 0.0f, 0.0f}, + {2.0f, 3.0f, 0.0f, 0.2f, 0.0f, 0.5f, 0.0f, 0.0f}, + {6.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {2.5f, 5.0f, 0.0f, -0.25f, 0.0f, -1.5707964f, 0.0f, 0.18f}, + {1.2f, 2.4f, 0.0f, -0.1f, 0.0f, -1.5707964f, -0.05f, 0.15f}, + {6.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {6.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, + {6.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, +}; From 1abc516e839f2a738a2e7c315084ad5e61b3ff26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:19:41 +0000 Subject: [PATCH 107/213] decomp: define the shrub class slot table in C --- config/us/levels/exe_data.tsv | 38 +++++++++---------- configure.py | 2 +- .../shrubs/register_shrub_render_class.c | 2 + 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index 0804b2ce10..9299e5cb3b 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -120,7 +120,7 @@ 00 001BA1E0 212 00 001BA2B8 256 00 001BBF50 224 -00 001BC030 384 +00 001BC030 1408 00 001BD8B0 224 00 001BD990 384 00 001BDB10 56 @@ -304,7 +304,7 @@ 01 001BA660 212 01 001BA738 256 01 001BC3D0 224 -01 001BC4B0 384 +01 001BC4B0 1408 01 001BDD30 224 01 001BDE10 384 01 001BDF90 56 @@ -488,7 +488,7 @@ 02 001BA7E0 212 02 001BA8B8 256 02 001BC550 224 -02 001BC630 384 +02 001BC630 1408 02 001BDEB0 224 02 001BDF90 384 02 001BE110 56 @@ -672,7 +672,7 @@ 03 001BA2E0 212 03 001BA3B8 256 03 001BC050 224 -03 001BC130 384 +03 001BC130 1408 03 001BD9B0 224 03 001BDA90 384 03 001BDC10 56 @@ -856,7 +856,7 @@ 04 001BA360 212 04 001BA438 256 04 001BC0D0 224 -04 001BC1B0 384 +04 001BC1B0 1408 04 001BDA30 224 04 001BDB10 384 04 001BDC90 56 @@ -1040,7 +1040,7 @@ 05 001BA660 212 05 001BA738 256 05 001BC3D0 224 -05 001BC4B0 384 +05 001BC4B0 1408 05 001BDD30 224 05 001BDE10 384 05 001BDF90 56 @@ -1224,7 +1224,7 @@ 06 001BA960 212 06 001BAA38 256 06 001BC6D0 224 -06 001BC7B0 384 +06 001BC7B0 1408 06 001BE030 224 06 001BE110 384 06 001BE290 56 @@ -1408,7 +1408,7 @@ 07 001BA260 212 07 001BA338 256 07 001BBFD0 224 -07 001BC0B0 384 +07 001BC0B0 1408 07 001BD930 224 07 001BDA10 384 07 001BDB90 56 @@ -1592,7 +1592,7 @@ 08 001BA9E0 212 08 001BAAB8 256 08 001BC750 224 -08 001BC830 384 +08 001BC830 1408 08 001BE0B0 224 08 001BE190 384 08 001BE310 56 @@ -1776,7 +1776,7 @@ 09 001BA360 212 09 001BA438 256 09 001BC0D0 224 -09 001BC1B0 384 +09 001BC1B0 1408 09 001BDA30 224 09 001BDB10 384 09 001BDC90 56 @@ -1960,7 +1960,7 @@ 10 001BA660 212 10 001BA738 256 10 001BC3D0 224 -10 001BC4B0 384 +10 001BC4B0 1408 10 001BDD30 224 10 001BDE10 384 10 001BDF90 56 @@ -2144,7 +2144,7 @@ 11 001BABE0 212 11 001BACB8 256 11 001BC950 224 -11 001BCA30 384 +11 001BCA30 1408 11 001BE2B0 224 11 001BE390 384 11 001BE510 56 @@ -2328,7 +2328,7 @@ 12 001BA660 212 12 001BA738 256 12 001BC3D0 224 -12 001BC4B0 384 +12 001BC4B0 1408 12 001BDD30 224 12 001BDE10 384 12 001BDF90 56 @@ -2512,7 +2512,7 @@ 13 001BA4E0 212 13 001BA5B8 256 13 001BC250 224 -13 001BC330 384 +13 001BC330 1408 13 001BDBB0 224 13 001BDC90 384 13 001BDE10 56 @@ -2696,7 +2696,7 @@ 14 001BA8E0 212 14 001BA9B8 256 14 001BC650 224 -14 001BC730 384 +14 001BC730 1408 14 001BDFB0 224 14 001BE090 384 14 001BE210 56 @@ -2880,7 +2880,7 @@ 15 001BA7E0 212 15 001BA8B8 256 15 001BC550 224 -15 001BC630 384 +15 001BC630 1408 15 001BDEB0 224 15 001BDF90 384 15 001BE110 56 @@ -3064,7 +3064,7 @@ 16 001BA660 212 16 001BA738 256 16 001BC3D0 224 -16 001BC4B0 384 +16 001BC4B0 1408 16 001BDD30 224 16 001BDE10 384 16 001BDF90 56 @@ -3248,7 +3248,7 @@ 17 001BAAE0 212 17 001BABB8 256 17 001BC850 224 -17 001BC930 384 +17 001BC930 1408 17 001BE1B0 224 17 001BE290 384 17 001BE410 56 @@ -3432,7 +3432,7 @@ 18 001BABE0 212 18 001BACB8 256 18 001BC950 224 -18 001BCA30 384 +18 001BCA30 1408 18 001BE2B0 224 18 001BE390 384 18 001BE510 56 diff --git a/configure.py b/configure.py index 07427a1c5c..0de3481307 100755 --- a/configure.py +++ b/configure.py @@ -1170,7 +1170,7 @@ "rendering/effects/render_level_effects_and_screen_sprites": (0x1CE2C0, 0xCF240, 56), "weapons/load_hand_gadget": (0x1D52E8, 0xD6268, 1776), "ui/menus/item_preview/update_preview_animation_and_attachments": (0x1D6080, 0xD7000, 56), - "rendering/shrubs/register_shrub_render_class": (0x1D7F30, 0xD8EB0, 384), + "rendering/shrubs/register_shrub_render_class": (0x1D7F30, 0xD8EB0, 1408), "rendering/effects/build_variant_effect_quads": (0x1D9890, 0xDA810, 384), "rendering/effects/build_resident_indexed_texture_warp_meshes": (0x1D9A10, 0xDA990, 56), "rendering/effects/draw_light_flare": (0x1D97B0, 0xDA730, 224), diff --git a/src/rendering/shrubs/register_shrub_render_class.c b/src/rendering/shrubs/register_shrub_render_class.c index acddce9976..0fd6fde9ee 100644 --- a/src/rendering/shrubs/register_shrub_render_class.c +++ b/src/rendering/shrubs/register_shrub_render_class.c @@ -231,3 +231,5 @@ extern __typeof__(register_shrub_render_class) func_00203B08 __attribute__((alia ShrubRenderClass *shrub_render_classes[64] = {0}; s16 shrub_render_class_ids[64] = {0}; + +u8 shrub_render_class_slot_by_id[0x400] = {0}; From 5aa185e51ca2c6127dfcc87fe4ee71fa5c381183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:29:09 +0000 Subject: [PATCH 108/213] decomp: name the hero scale pulse, fidget prop, ledge gravity, grind recovery and pad pressure mode fields --- include/rnc/hero/hero.h | 54 +++++++++---------- include/rnc/input/pad_state.h | 8 +-- src/check/hero_layout_check.c | 10 ++-- src/check/pad_state_layout_check.c | 2 +- src/input/poll_pad_device_state.c | 4 +- src/overlays/l01/hero/hero_set_state.c | 14 ++--- .../update_hero_motion_for_current_state.c | 4 +- .../l01/hero/update_hero_state_machine.c | 6 +-- src/overlays/l02/hero/hero_set_state.c | 18 +++---- src/overlays/l03/hero/hero_set_state.c | 12 ++--- .../update_hero_motion_for_current_state.c | 4 +- .../l03/hero/update_hero_state_machine.c | 6 +-- src/overlays/l05/hero/hero_set_state.c | 12 ++--- .../l05/hero/update_hero_motion_by_state.c | 6 +-- .../l05/hero/update_hero_state_machine.c | 6 +-- src/overlays/l06/hero/hero_set_state.c | 16 +++--- .../update_hero_motion_for_current_state.c | 2 +- .../l06/hero/update_hero_state_machine.c | 6 +-- src/overlays/l08/hero/hero_set_state.c | 12 ++--- .../update_hero_motion_for_current_state.c | 6 +-- .../l08/hero/update_hero_state_transitions.c | 6 +-- src/overlays/l11/hero/hero_set_state.c | 12 ++--- .../l11/hero/update_hero_motion_by_state.c | 4 +- .../l11/hero/update_hero_state_transitions.c | 6 +-- src/overlays/l12/hero/hero_set_state.c | 12 ++--- .../update_hero_motion_for_current_state.c | 4 +- .../l12/hero/update_hero_state_transitions.c | 6 +-- src/overlays/l14/hero/hero_set_state.c | 12 ++--- .../l14/hero/process_hero_state_transitions.c | 6 +-- .../l14/hero/update_hero_motion_by_state.c | 2 +- src/overlays/l15/hero/hero_set_state.c | 12 ++--- .../update_hero_motion_for_current_state.c | 4 +- .../l15/hero/update_hero_state_machine.c | 6 +-- src/overlays/l16/hero/hero_set_state.c | 12 ++--- .../update_hero_motion_for_current_state.c | 6 +-- .../l16/hero/update_hero_state_transitions.c | 6 +-- src/overlays/l17/hero/hero_set_state.c | 16 +++--- .../update_hero_motion_for_current_state.c | 6 +-- .../l17/hero/update_hero_state_transitions.c | 6 +-- src/overlays/l18/hero/hero_set_state.c | 12 ++--- .../l18/hero/process_hero_state_transitions.c | 6 +-- .../update_hero_motion_for_current_state.c | 6 +-- src/overlays/shared/hero/hero_frame_update.c | 4 +- src/overlays/shared/hero/hero_idle_sequence.c | 8 +-- src/overlays/shared/hero/hero_set_state.c | 22 ++++---- src/overlays/shared/hero/hero_switch_item.c | 2 +- .../shared/hero/hero_update_movement.c | 6 +-- .../shared/hero/hero_update_transitions.c | 6 +-- .../hero/process_hero_item_action_input.c | 2 +- .../hero/process_hero_primary_item_input.c | 2 +- ...ate_hero_vehicle_attachments_and_effects.c | 2 +- 51 files changed, 215 insertions(+), 215 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index 9b705ab4b8..f6e41867f6 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -386,8 +386,8 @@ struct Hero { f32 ledge_top_z; /* 0x4E0: ledge height (FUN_L00_0020bed0) */ f32 ledge_normal_yaw; /* 0x4E4 */ s32 ledge_found; /* 0x4E8 */ - f32 unk4EC; /* 0x4EC */ - f32 smoothed_air_z; /* 0x4F0 */ + f32 ledge_gravity; /* 0x4EC: gravity on ledge-hang entry: jump_gravity after a jump, else 24 * frame_time_sq */ + f32 smoothed_air_z; /* 0x4F0 */ u32 ledge_flags; /* 0x4F4: ledge flags, bit 0: no headroom above the ledge (FUN_L00_0020bed0) */ s32 ledge_moby; /* 0x4F8: first argument of FUN_L00_00233f80 (FUN_L01_00233de0) */ u8 pad_4FC[0x4]; @@ -419,25 +419,25 @@ struct Hero { union { f32 f; s32 i; - } grind_speed_boost; /* 0x5AC: float approached toward a speed, zeroed as an int */ - f32 grind_base_speed; /* 0x5B0 */ - s32 rail_swing_target; /* 0x5B4 */ - s32 rail_jump_armed; /* 0x5B8 */ - s16 rail_jump_trigger; /* 0x5BC */ - s16 grind_hit; /* 0x5BE */ - s32 rail_jump_queued; /* 0x5C0 */ - s32 rail_gap_jump; /* 0x5C4 */ - f32 rail_jump_gravity; /* 0x5C8 */ - f32 unk5CC; /* 0x5CC */ - f32 rail_lean; /* 0x5D0 */ - f32 grind_lean_vel; /* 0x5D4 */ - struct Moby *grind_look_moby; /* 0x5D8 */ - f32 rail_snap_dist; /* 0x5DC */ - Vec4 grab_rail_point; /* 0x5E0 */ - s32 *follow_path_spline; /* 0x5F0 */ - s32 follow_path_segment; /* 0x5F4 */ - f32 rail_candidate_frac; /* 0x5F8 */ - s32 grab_rail_found; /* 0x5FC */ + } grind_speed_boost; /* 0x5AC: float approached toward a speed, zeroed as an int */ + f32 grind_base_speed; /* 0x5B0 */ + s32 rail_swing_target; /* 0x5B4 */ + s32 rail_jump_armed; /* 0x5B8 */ + s16 rail_jump_trigger; /* 0x5BC */ + s16 grind_hit; /* 0x5BE */ + s32 rail_jump_queued; /* 0x5C0 */ + s32 rail_gap_jump; /* 0x5C4 */ + f32 rail_jump_gravity; /* 0x5C8 */ + f32 grind_recovery_speed; /* 0x5CC: rail speed in HERO_STATE_GRIND_COLLISION_RECOVERY (2.5 * frame_time) */ + f32 rail_lean; /* 0x5D0 */ + f32 grind_lean_vel; /* 0x5D4 */ + struct Moby *grind_look_moby; /* 0x5D8 */ + f32 rail_snap_dist; /* 0x5DC */ + Vec4 grab_rail_point; /* 0x5E0 */ + s32 *follow_path_spline; /* 0x5F0 */ + s32 follow_path_segment; /* 0x5F4 */ + f32 rail_candidate_frac; /* 0x5F8 */ + s32 grab_rail_found; /* 0x5FC */ s32 follow_path_end_frames; /* 0x600 */ f32 follow_path_speed; /* 0x604 */ u8 pad_608[0x4]; @@ -622,7 +622,7 @@ struct Hero { f32 slam_descending; /* 0xA70 */ f32 aim_yaw; /* 0xA74: gadget aim yaw (FUN_L00_00217658) */ f32 aim_pitch; /* 0xA78: gadget aim pitch */ - s32 unkA7C; /* 0xA7C */ + s32 crouch_swing_toggle; /* 0xA7C: flipped 0/1 on every HERO_STATE_CROUCH_SWING entry */ s32 last_landed_moby; /* 0xA80 */ u8 *replacement_moby; /* 0xA84 */ u8 *base_moby; /* 0xA88 */ @@ -705,8 +705,8 @@ struct Hero { s16 ship_hud_handle; /* 0x160C */ u8 unk160E; /* 0x160E */ u8 ship_flags; /* 0x160F: 2 = being steered back from the edge or height limit of the space arena (FUN_L11_00313f60) */ - u8 pad_1610[0x4]; - s32 unk1614; /* 0x1614 */ + u8 pad_1610[0x4]; + s32 fidget_prop_moby; /* 0x1614: moby animated with HERO_STATE_FIDGET_ALT, removed when it ends */ u8 pad_1618[0x8]; void *unk1620; /* 0x1620 */ void *unk1624; /* 0x1624 */ @@ -843,9 +843,9 @@ struct Hero { s16 quick_swap_tap_window; /* 0x22D6: countdown; nonzero with quick_swap_tap_timer switches pending_item[0] */ s16 pack_disabled; /* 0x22D8 */ s16 path_constrain_pending; /* 0x22DA */ - s16 unk22DC; /* 0x22DC */ - s16 vehicle_toggle_timer; /* 0x22DE */ - s16 glow_pulse_level; /* 0x22E0 */ + s16 scale_pulse_step; /* 0x22DC: index into the hero/item scale table (D_L00_001797D8), 1 starts it, 0 when the -1 end is reached */ + s16 vehicle_toggle_timer; /* 0x22DE */ + s16 glow_pulse_level; /* 0x22E0 */ u8 pad_22E2[0x6]; f32 item4_glow_phase; /* 0x22E8: phase for the items[4].moby colour */ f32 item4_alt_glow_phase; /* 0x22EC: phase for the items[4].moby2 colour */ diff --git a/include/rnc/input/pad_state.h b/include/rnc/input/pad_state.h index cb267c1cd9..16765856c8 100644 --- a/include/rnc/input/pad_state.h +++ b/include/rnc/input/pad_state.h @@ -58,10 +58,10 @@ struct PadState { u32 pressed_unmasked; /* 0x1C4: menu handlers test 0xD00 (accept) and 0x10 each frame */ u32 released_unmasked; /* 0x1C8 */ s32 mode; /* 0x1CC: 1 masks off 0x5030 and the left stick, 2 keeps only 0x900; reset to 0 */ - s32 no_buttons; /* 0x1D0: held == 0 */ - s32 no_direction; /* 0x1D4: (held & 0xF000) == 0 */ - s32 stick_moved; /* 0x1D8: analog[2] or analog[3] nonzero */ - s32 unk1DC; /* 0x1DC: 0x79 if the button profile is all ones, else 0; l01 picks pressure input on 0x79 */ + s32 no_buttons; /* 0x1D0: held == 0 */ + s32 no_direction; /* 0x1D4: (held & 0xF000) == 0 */ + s32 stick_moved; /* 0x1D8: analog[2] or analog[3] nonzero */ + s32 pressure_mode_id; /* 0x1DC: 0x79 (DualShock 2 pressure mode) if the button profile is all ones, else 0; l01 picks pressure input on 0x79 */ u32 pressed_history[30]; /* 0x1E0: ring indexed by hist_idx, searched by pad_pressed_within */ f32 angle_history[30]; /* 0x258: left-stick direction history */ f32 float_history[30]; /* 0x2D0: ring indexed by hist_idx, read by read_pad_float_history */ diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index 61c934199e..b27ff38ba6 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -225,7 +225,7 @@ HERO_OFFSET_CHECK(rise_fall_land_frames, 0x4C4); HERO_OFFSET_CHECK(ledge_hang_pos, 0x4D0); HERO_OFFSET_CHECK(ledge_normal_yaw, 0x4E4); HERO_OFFSET_CHECK(ledge_found, 0x4E8); -HERO_OFFSET_CHECK(unk4EC, 0x4EC); +HERO_OFFSET_CHECK(ledge_gravity, 0x4EC); HERO_OFFSET_CHECK(smoothed_air_z, 0x4F0); HERO_OFFSET_CHECK(rail_point, 0x500); HERO_OFFSET_CHECK(prev_rail_point, 0x540); @@ -257,7 +257,7 @@ HERO_OFFSET_CHECK(grind_hit, 0x5BE); HERO_OFFSET_CHECK(rail_jump_queued, 0x5C0); HERO_OFFSET_CHECK(rail_gap_jump, 0x5C4); HERO_OFFSET_CHECK(rail_jump_gravity, 0x5C8); -HERO_OFFSET_CHECK(unk5CC, 0x5CC); +HERO_OFFSET_CHECK(grind_recovery_speed, 0x5CC); HERO_OFFSET_CHECK(grind_look_moby, 0x5D8); HERO_OFFSET_CHECK(grab_rail_point, 0x5E0); HERO_OFFSET_CHECK(follow_path_spline, 0x5F0); @@ -366,7 +366,7 @@ HERO_OFFSET_CHECK(melee_hit, 0xA64); HERO_OFFSET_CHECK(pushback_yaw, 0xA68); HERO_OFFSET_CHECK(speed_scale, 0xA6C); HERO_OFFSET_CHECK(slam_descending, 0xA70); -HERO_OFFSET_CHECK(unkA7C, 0xA7C); +HERO_OFFSET_CHECK(crouch_swing_toggle, 0xA7C); HERO_OFFSET_CHECK(replacement_moby, 0xA84); HERO_OFFSET_CHECK(base_moby, 0xA88); HERO_OFFSET_CHECK(vehicle_mode3_moby, 0xA8C); @@ -411,7 +411,7 @@ HERO_OFFSET_CHECK(selector_11, 0x12EB); HERO_OFFSET_CHECK(selector_13, 0x12EC); HERO_OFFSET_CHECK(ground_sound_class, 0x12ED); HERO_OFFSET_CHECK(grind_jump_block, 0x12EE); -HERO_OFFSET_CHECK(unk1614, 0x1614); +HERO_OFFSET_CHECK(fidget_prop_moby, 0x1614); HERO_OFFSET_CHECK(unk1620, 0x1620); HERO_OFFSET_CHECK(unk1624, 0x1624); HERO_OFFSET_CHECK(vehicle_hp, 0x1630); @@ -513,7 +513,7 @@ HERO_OFFSET_CHECK(quick_swap_tap_timer, 0x22D4); HERO_OFFSET_CHECK(quick_swap_tap_window, 0x22D6); HERO_OFFSET_CHECK(pack_disabled, 0x22D8); HERO_OFFSET_CHECK(path_constrain_pending, 0x22DA); -HERO_OFFSET_CHECK(unk22DC, 0x22DC); +HERO_OFFSET_CHECK(scale_pulse_step, 0x22DC); HERO_OFFSET_CHECK(vehicle_toggle_timer, 0x22DE); HERO_OFFSET_CHECK(glow_pulse_level, 0x22E0); HERO_OFFSET_CHECK(item4_glow_phase, 0x22E8); diff --git a/src/check/pad_state_layout_check.c b/src/check/pad_state_layout_check.c index 55b5d73478..bcc1a6c193 100644 --- a/src/check/pad_state_layout_check.c +++ b/src/check/pad_state_layout_check.c @@ -30,7 +30,7 @@ OFFSET_CHECK(mode, struct PadState, mode, 0x1CC); OFFSET_CHECK(no_buttons, struct PadState, no_buttons, 0x1D0); OFFSET_CHECK(no_direction, struct PadState, no_direction, 0x1D4); OFFSET_CHECK(stick_moved, struct PadState, stick_moved, 0x1D8); -OFFSET_CHECK(unk1DC, struct PadState, unk1DC, 0x1DC); +OFFSET_CHECK(pressure_mode_id, struct PadState, pressure_mode_id, 0x1DC); OFFSET_CHECK(pressed_history, struct PadState, pressed_history, 0x1E0); OFFSET_CHECK(angle_history, struct PadState, angle_history, 0x258); OFFSET_CHECK(float_history, struct PadState, float_history, 0x2D0); diff --git a/src/input/poll_pad_device_state.c b/src/input/poll_pad_device_state.c index 6fb1fd959d..eabdc40b5d 100644 --- a/src/input/poll_pad_device_state.c +++ b/src/input/poll_pad_device_state.c @@ -33,9 +33,9 @@ void poll_pad_device_state(struct PadState *pad_state) { case PAD_PROFILE_INITIALIZATION: { byte_count = scePad2GetButtonProfile(pad_state->socket, pad_response_buffer); if (*(u32 *)pad_response_buffer == 0xFFFFFFFF) { - pad_state->unk1DC = 0x79; + pad_state->pressure_mode_id = 0x79; } else { - pad_state->unk1DC = 0; + pad_state->pressure_mode_id = 0; } if (byte_count < 5) { for (i = 0; i < byte_count; i++) { diff --git a/src/overlays/l01/hero/hero_set_state.c b/src/overlays/l01/hero/hero_set_state.c index 485f1f1f09..b023b26f24 100644 --- a/src/overlays/l01/hero/hero_set_state.c +++ b/src/overlays/l01/hero/hero_set_state.c @@ -184,8 +184,8 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { set_hero_animation(get_hero_idle_animation_index(0), 0, (float)t); { struct Hero *p = &hero; - if (*(void **)&p->unk1614 != 0) { - blend_moby_animation(*(void **)&p->unk1614, 0, 0, t); + if (*(void **)&p->fidget_prop_moby != 0) { + blend_moby_animation(*(void **)&p->fidget_prop_moby, 0, 0, t); } } break; @@ -680,10 +680,10 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1232,7 +1232,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (animation_setup_mode) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -1469,7 +1469,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; @@ -1732,7 +1732,7 @@ int handle_hero_gadget_button(void) { hero.items[0].moby->oclass == 0x1e3 && hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x18, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } break; case ITEM_REMOTE_VENDOR: diff --git a/src/overlays/l01/hero/update_hero_motion_for_current_state.c b/src/overlays/l01/hero/update_hero_motion_for_current_state.c index db8076ca53..8787703c50 100644 --- a/src/overlays/l01/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l01/hero/update_hero_motion_for_current_state.c @@ -743,7 +743,7 @@ void update_hero_motion_for_current_state(void) { if (t < 0.2f) { t = 0.2f; } - if (controller_state.unk1DC != 0x79) { + if (controller_state.pressure_mode_id != 0x79) { hero.cw_turn_frames = 0; hero.swim_square_hold_frames++; t = hero.swim_square_hold_frames * 0.5f / scale_game_frames(0x14) + 0.5f; @@ -765,7 +765,7 @@ void update_hero_motion_for_current_state(void) { if (t < 0.2f) { t = 0.2f; } - if (controller_state.unk1DC != 0x79) { + if (controller_state.pressure_mode_id != 0x79) { hero.swim_square_hold_frames = 0; hero.cw_turn_frames++; t = hero.cw_turn_frames * 0.5f / scale_game_frames(0x14) + 0.5f; diff --git a/src/overlays/l01/hero/update_hero_state_machine.c b/src/overlays/l01/hero/update_hero_state_machine.c index ffa1478ba7..4999f57c61 100644 --- a/src/overlays/l01/hero/update_hero_state_machine.c +++ b/src/overlays/l01/hero/update_hero_state_machine.c @@ -1846,7 +1846,7 @@ void update_hero_state_machine(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -1912,7 +1912,7 @@ void update_hero_state_machine(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2000,7 +2000,7 @@ void update_hero_state_machine(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l02/hero/hero_set_state.c b/src/overlays/l02/hero/hero_set_state.c index 5379b07a0d..739664a982 100644 --- a/src/overlays/l02/hero/hero_set_state.c +++ b/src/overlays/l02/hero/hero_set_state.c @@ -185,8 +185,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { set_hero_animation(get_hero_idle_animation_index(0), 0, (float)t); { struct Hero *p = &hero; - if (*(void **)&p->unk1614 != 0) { - blend_moby_animation(*(void **)&p->unk1614, 0, 0, t); + if (*(void **)&p->fidget_prop_moby != 0) { + blend_moby_animation(*(void **)&p->fidget_prop_moby, 0, 0, t); } } break; @@ -573,10 +573,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1116,7 +1116,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (entry_animation_mode) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -1416,7 +1416,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; @@ -3521,7 +3521,7 @@ void update_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -3587,7 +3587,7 @@ void update_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -3675,7 +3675,7 @@ void update_hero_state_transitions(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l03/hero/hero_set_state.c b/src/overlays/l03/hero/hero_set_state.c index a43851a7d4..c98d109ded 100644 --- a/src/overlays/l03/hero/hero_set_state.c +++ b/src/overlays/l03/hero/hero_set_state.c @@ -184,8 +184,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { set_hero_animation(get_hero_idle_animation_index(0), 0, (float)t); { struct Hero *p = &hero; - if (*(void **)&p->unk1614 != 0) { - blend_moby_animation(*(void **)&p->unk1614, 0, 0, t); + if (*(void **)&p->fidget_prop_moby != 0) { + blend_moby_animation(*(void **)&p->fidget_prop_moby, 0, 0, t); } } break; @@ -828,10 +828,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1379,7 +1379,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (entry_animation_mode) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -1616,7 +1616,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; diff --git a/src/overlays/l03/hero/update_hero_motion_for_current_state.c b/src/overlays/l03/hero/update_hero_motion_for_current_state.c index 6ba3ecf1ea..6cb621de52 100644 --- a/src/overlays/l03/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l03/hero/update_hero_motion_for_current_state.c @@ -531,7 +531,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.cw_turn_frames = 0; hero.swim_square_hold_frames++; s = hero.swim_square_hold_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -551,7 +551,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.swim_square_hold_frames = 0; hero.cw_turn_frames++; s = hero.cw_turn_frames * 0.5f / scale_game_frames(20) + 0.5f; diff --git a/src/overlays/l03/hero/update_hero_state_machine.c b/src/overlays/l03/hero/update_hero_state_machine.c index da3cf8b852..d9931ec4c1 100644 --- a/src/overlays/l03/hero/update_hero_state_machine.c +++ b/src/overlays/l03/hero/update_hero_state_machine.c @@ -1946,7 +1946,7 @@ void update_hero_state_machine(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2012,7 +2012,7 @@ void update_hero_state_machine(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2100,7 +2100,7 @@ void update_hero_state_machine(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l05/hero/hero_set_state.c b/src/overlays/l05/hero/hero_set_state.c index d0a48cf868..749e77ebb8 100644 --- a/src/overlays/l05/hero/hero_set_state.c +++ b/src/overlays/l05/hero/hero_set_state.c @@ -197,8 +197,8 @@ int hero_set_state(int requested_state, int animation_request_mode) { set_hero_animation(get_hero_idle_animation_index(0), 0, (float)t); { struct Hero *p = &hero; - if (*(void **)&p->unk1614 != 0) { - blend_moby_animation(*(void **)&p->unk1614, 0, 0, t); + if (*(void **)&p->fidget_prop_moby != 0) { + blend_moby_animation(*(void **)&p->fidget_prop_moby, 0, 0, t); } } break; @@ -997,10 +997,10 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1609,7 +1609,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (animation_request_mode) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -1909,7 +1909,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; diff --git a/src/overlays/l05/hero/update_hero_motion_by_state.c b/src/overlays/l05/hero/update_hero_motion_by_state.c index 27beeddb0d..58c38ba0aa 100644 --- a/src/overlays/l05/hero/update_hero_motion_by_state.c +++ b/src/overlays/l05/hero/update_hero_motion_by_state.c @@ -488,7 +488,7 @@ void update_hero_motion_by_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.cw_turn_frames = 0; hero.swim_square_hold_frames++; s = hero.swim_square_hold_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -508,7 +508,7 @@ void update_hero_motion_by_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.swim_square_hold_frames = 0; hero.cw_turn_frames++; s = hero.cw_turn_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -2195,7 +2195,7 @@ void update_hero_motion_by_state(void) { } r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { - r = hero.unk5CC * (f32)hero.grind_direction; + r = hero.grind_recovery_speed * (f32)hero.grind_direction; } sample_path((void *)hero.rail_spline, &vector_and_hit_scratch, diff --git a/src/overlays/l05/hero/update_hero_state_machine.c b/src/overlays/l05/hero/update_hero_state_machine.c index 90651efb0b..198c98acb6 100644 --- a/src/overlays/l05/hero/update_hero_state_machine.c +++ b/src/overlays/l05/hero/update_hero_state_machine.c @@ -2206,7 +2206,7 @@ void update_hero_state_machine(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } apply_hero_item_slot_selection(0); break; @@ -2272,7 +2272,7 @@ void update_hero_state_machine(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } apply_hero_item_slot_selection(0); break; @@ -2360,7 +2360,7 @@ void update_hero_state_machine(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l06/hero/hero_set_state.c b/src/overlays/l06/hero/hero_set_state.c index f2aecac6df..e210ab602b 100644 --- a/src/overlays/l06/hero/hero_set_state.c +++ b/src/overlays/l06/hero/hero_set_state.c @@ -187,8 +187,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { set_hero_animation(get_hero_help_value(0), 0, (float)t); { struct Hero *p = &hero; - if (*(void **)&p->unk1614 != 0) { - blend_moby_animation(*(void **)&p->unk1614, 0, 0, t); + if (*(void **)&p->fidget_prop_moby != 0) { + blend_moby_animation(*(void **)&p->fidget_prop_moby, 0, 0, t); } } break; @@ -613,10 +613,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1257,7 +1257,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (entry_animation_mode) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -1589,10 +1589,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 12.0f; + p->ledge_gravity = frame_time_sq * 12.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } if (entry_animation_mode) @@ -1711,7 +1711,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; diff --git a/src/overlays/l06/hero/update_hero_motion_for_current_state.c b/src/overlays/l06/hero/update_hero_motion_for_current_state.c index 843ce88f7f..15563dd4e7 100644 --- a/src/overlays/l06/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l06/hero/update_hero_motion_for_current_state.c @@ -2074,7 +2074,7 @@ void update_hero_motion_for_current_state(void) { } r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { - r = hero.unk5CC * (f32)hero.grind_direction; + r = hero.grind_recovery_speed * (f32)hero.grind_direction; } sample_path((void *)hero.rail_spline, &vector_or_hit_descriptor_scratch, diff --git a/src/overlays/l06/hero/update_hero_state_machine.c b/src/overlays/l06/hero/update_hero_state_machine.c index 6a0974846d..30416dc2b1 100644 --- a/src/overlays/l06/hero/update_hero_state_machine.c +++ b/src/overlays/l06/hero/update_hero_state_machine.c @@ -2569,7 +2569,7 @@ void update_hero_state_machine(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2635,7 +2635,7 @@ void update_hero_state_machine(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2723,7 +2723,7 @@ void update_hero_state_machine(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l08/hero/hero_set_state.c b/src/overlays/l08/hero/hero_set_state.c index af363b50c0..d5b632a0cf 100644 --- a/src/overlays/l08/hero/hero_set_state.c +++ b/src/overlays/l08/hero/hero_set_state.c @@ -185,8 +185,8 @@ int hero_set_state(int requested_state, int animation_request_mode) { set_hero_animation(get_hero_idle_animation_index(0), 0, (float)t); { struct Hero *p = &hero; - if (*(void **)&p->unk1614 != 0) { - blend_moby_animation(*(void **)&p->unk1614, 0, 0, t); + if (*(void **)&p->fidget_prop_moby != 0) { + blend_moby_animation(*(void **)&p->fidget_prop_moby, 0, 0, t); } } break; @@ -870,10 +870,10 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1475,7 +1475,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (animation_request_mode) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -1759,7 +1759,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; diff --git a/src/overlays/l08/hero/update_hero_motion_for_current_state.c b/src/overlays/l08/hero/update_hero_motion_for_current_state.c index 5a7d041187..c787a66ea6 100644 --- a/src/overlays/l08/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l08/hero/update_hero_motion_for_current_state.c @@ -599,7 +599,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.cw_turn_frames = 0; hero.swim_square_hold_frames++; s = hero.swim_square_hold_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -619,7 +619,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.swim_square_hold_frames = 0; hero.cw_turn_frames++; s = hero.cw_turn_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -1964,7 +1964,7 @@ void update_hero_motion_for_current_state(void) { } r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { - r = hero.unk5CC * (f32)hero.grind_direction; + r = hero.grind_recovery_speed * (f32)hero.grind_direction; } sample_path((void *)hero.rail_spline, &vector_and_attack_descriptor_scratch, diff --git a/src/overlays/l08/hero/update_hero_state_transitions.c b/src/overlays/l08/hero/update_hero_state_transitions.c index 59e4414657..aedde760fb 100644 --- a/src/overlays/l08/hero/update_hero_state_transitions.c +++ b/src/overlays/l08/hero/update_hero_state_transitions.c @@ -2374,7 +2374,7 @@ void update_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2440,7 +2440,7 @@ void update_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2528,7 +2528,7 @@ void update_hero_state_transitions(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l11/hero/hero_set_state.c b/src/overlays/l11/hero/hero_set_state.c index b24a2920d9..130b2a75f8 100644 --- a/src/overlays/l11/hero/hero_set_state.c +++ b/src/overlays/l11/hero/hero_set_state.c @@ -181,8 +181,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { set_hero_animation(get_hero_idle_animation_index(0), 0, (float)t); { struct Hero *p = &hero; - if (*(void **)&p->unk1614 != 0) { - blend_moby_animation(*(void **)&p->unk1614, 0, 0, t); + if (*(void **)&p->fidget_prop_moby != 0) { + blend_moby_animation(*(void **)&p->fidget_prop_moby, 0, 0, t); } } break; @@ -807,10 +807,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1358,7 +1358,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (animation_update_mode) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -1595,7 +1595,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; diff --git a/src/overlays/l11/hero/update_hero_motion_by_state.c b/src/overlays/l11/hero/update_hero_motion_by_state.c index 6f655dbfc9..04e86a612c 100644 --- a/src/overlays/l11/hero/update_hero_motion_by_state.c +++ b/src/overlays/l11/hero/update_hero_motion_by_state.c @@ -582,7 +582,7 @@ void update_hero_motion_by_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.cw_turn_frames = 0; hero.swim_square_hold_frames++; s = hero.swim_square_hold_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -602,7 +602,7 @@ void update_hero_motion_by_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.swim_square_hold_frames = 0; hero.cw_turn_frames++; s = hero.cw_turn_frames * 0.5f / scale_game_frames(20) + 0.5f; diff --git a/src/overlays/l11/hero/update_hero_state_transitions.c b/src/overlays/l11/hero/update_hero_state_transitions.c index 3963d130d0..11fa5b663e 100644 --- a/src/overlays/l11/hero/update_hero_state_transitions.c +++ b/src/overlays/l11/hero/update_hero_state_transitions.c @@ -1896,7 +1896,7 @@ void update_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -1962,7 +1962,7 @@ void update_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2050,7 +2050,7 @@ void update_hero_state_transitions(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l12/hero/hero_set_state.c b/src/overlays/l12/hero/hero_set_state.c index 064cbfb0b2..1762f4bda7 100644 --- a/src/overlays/l12/hero/hero_set_state.c +++ b/src/overlays/l12/hero/hero_set_state.c @@ -187,8 +187,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)t); { struct Hero *p = &hero; - if (*(void **)&p->unk1614 != 0) { - blend_moby_animation(*(void **)&p->unk1614, 0, 0, t); + if (*(void **)&p->fidget_prop_moby != 0) { + blend_moby_animation(*(void **)&p->fidget_prop_moby, 0, 0, t); } } break; @@ -841,10 +841,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1392,7 +1392,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (entry_animation_mode) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -1656,7 +1656,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; diff --git a/src/overlays/l12/hero/update_hero_motion_for_current_state.c b/src/overlays/l12/hero/update_hero_motion_for_current_state.c index 26c9c02ecb..1f10b353eb 100644 --- a/src/overlays/l12/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l12/hero/update_hero_motion_for_current_state.c @@ -879,7 +879,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.cw_turn_frames = 0; hero.swim_square_hold_frames++; s = hero.swim_square_hold_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -899,7 +899,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.swim_square_hold_frames = 0; hero.cw_turn_frames++; s = hero.cw_turn_frames * 0.5f / scale_game_frames(20) + 0.5f; diff --git a/src/overlays/l12/hero/update_hero_state_transitions.c b/src/overlays/l12/hero/update_hero_state_transitions.c index 54dfb7b3b7..ed3316d162 100644 --- a/src/overlays/l12/hero/update_hero_state_transitions.c +++ b/src/overlays/l12/hero/update_hero_state_transitions.c @@ -2008,7 +2008,7 @@ void update_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2074,7 +2074,7 @@ void update_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2162,7 +2162,7 @@ void update_hero_state_transitions(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l14/hero/hero_set_state.c b/src/overlays/l14/hero/hero_set_state.c index 94d6dcc0ad..823cce6239 100644 --- a/src/overlays/l14/hero/hero_set_state.c +++ b/src/overlays/l14/hero/hero_set_state.c @@ -186,8 +186,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { set_hero_animation(hero_get_gadget_anim_id(0), 0, (float)t); { struct Hero *p = &hero; - if (*(void **)&p->unk1614 != 0) { - blend_moby_animation(*(void **)&p->unk1614, 0, 0, t); + if (*(void **)&p->fidget_prop_moby != 0) { + blend_moby_animation(*(void **)&p->fidget_prop_moby, 0, 0, t); } } break; @@ -643,10 +643,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1217,7 +1217,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (animation_update_mode) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -1501,7 +1501,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; diff --git a/src/overlays/l14/hero/process_hero_state_transitions.c b/src/overlays/l14/hero/process_hero_state_transitions.c index 29308a07bd..ecc39745b8 100644 --- a/src/overlays/l14/hero/process_hero_state_transitions.c +++ b/src/overlays/l14/hero/process_hero_state_transitions.c @@ -2222,7 +2222,7 @@ void process_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2288,7 +2288,7 @@ void process_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2376,7 +2376,7 @@ void process_hero_state_transitions(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l14/hero/update_hero_motion_by_state.c b/src/overlays/l14/hero/update_hero_motion_by_state.c index 30fc100099..9e8a1b2c99 100644 --- a/src/overlays/l14/hero/update_hero_motion_by_state.c +++ b/src/overlays/l14/hero/update_hero_motion_by_state.c @@ -1683,7 +1683,7 @@ void update_hero_motion_by_state(void) { } r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { - r = hero.unk5CC * (f32)hero.grind_direction; + r = hero.grind_recovery_speed * (f32)hero.grind_direction; } sample_path((void *)hero.rail_spline, &vector_and_descriptor_scratch, diff --git a/src/overlays/l15/hero/hero_set_state.c b/src/overlays/l15/hero/hero_set_state.c index d62224cc64..52a452a988 100644 --- a/src/overlays/l15/hero/hero_set_state.c +++ b/src/overlays/l15/hero/hero_set_state.c @@ -182,8 +182,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { set_hero_animation(get_hero_help_value(0), 0, (float)t); { struct Hero *p = &hero; - if (*(void **)&p->unk1614 != 0) { - blend_moby_animation(*(void **)&p->unk1614, 0, 0, t); + if (*(void **)&p->fidget_prop_moby != 0) { + blend_moby_animation(*(void **)&p->fidget_prop_moby, 0, 0, t); } } break; @@ -771,10 +771,10 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1363,7 +1363,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (entry_animation_mode) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -1731,7 +1731,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; diff --git a/src/overlays/l15/hero/update_hero_motion_for_current_state.c b/src/overlays/l15/hero/update_hero_motion_for_current_state.c index 5d72d32205..6ec0db2da4 100644 --- a/src/overlays/l15/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l15/hero/update_hero_motion_for_current_state.c @@ -766,7 +766,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.cw_turn_frames = 0; hero.swim_square_hold_frames++; s = hero.swim_square_hold_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -786,7 +786,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.swim_square_hold_frames = 0; hero.cw_turn_frames++; s = hero.cw_turn_frames * 0.5f / scale_game_frames(20) + 0.5f; diff --git a/src/overlays/l15/hero/update_hero_state_machine.c b/src/overlays/l15/hero/update_hero_state_machine.c index e493fced51..127cf0fb45 100644 --- a/src/overlays/l15/hero/update_hero_state_machine.c +++ b/src/overlays/l15/hero/update_hero_state_machine.c @@ -2192,7 +2192,7 @@ void update_hero_state_machine(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2258,7 +2258,7 @@ void update_hero_state_machine(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2346,7 +2346,7 @@ void update_hero_state_machine(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l16/hero/hero_set_state.c b/src/overlays/l16/hero/hero_set_state.c index 371be26575..475d11dfde 100644 --- a/src/overlays/l16/hero/hero_set_state.c +++ b/src/overlays/l16/hero/hero_set_state.c @@ -199,8 +199,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { set_hero_animation(get_hero_idle_animation_index(0), 0, (float)t); { struct Hero *p = &hero; - if (*(void **)&p->unk1614 != 0) { - blend_moby_animation(*(void **)&p->unk1614, 0, 0, t); + if (*(void **)&p->fidget_prop_moby != 0) { + blend_moby_animation(*(void **)&p->fidget_prop_moby, 0, 0, t); } } break; @@ -1053,10 +1053,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1659,7 +1659,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (animation_update_mode) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -1943,7 +1943,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; diff --git a/src/overlays/l16/hero/update_hero_motion_for_current_state.c b/src/overlays/l16/hero/update_hero_motion_for_current_state.c index e78177867d..cd9f80a9ce 100644 --- a/src/overlays/l16/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l16/hero/update_hero_motion_for_current_state.c @@ -488,7 +488,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.cw_turn_frames = 0; hero.swim_square_hold_frames++; s = hero.swim_square_hold_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -508,7 +508,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.swim_square_hold_frames = 0; hero.cw_turn_frames++; s = hero.cw_turn_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -2288,7 +2288,7 @@ void update_hero_motion_for_current_state(void) { } r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { - r = hero.unk5CC * (f32)hero.grind_direction; + r = hero.grind_recovery_speed * (f32)hero.grind_direction; } sample_path((void *)hero.rail_spline, &primary_vector_scratch, diff --git a/src/overlays/l16/hero/update_hero_state_transitions.c b/src/overlays/l16/hero/update_hero_state_transitions.c index 3a047018dc..52fb3589f6 100644 --- a/src/overlays/l16/hero/update_hero_state_transitions.c +++ b/src/overlays/l16/hero/update_hero_state_transitions.c @@ -2578,7 +2578,7 @@ void update_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } apply_hero_item_slot_selection(0); break; @@ -2644,7 +2644,7 @@ void update_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } apply_hero_item_slot_selection(0); break; @@ -2732,7 +2732,7 @@ void update_hero_state_transitions(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l17/hero/hero_set_state.c b/src/overlays/l17/hero/hero_set_state.c index 934655f3e8..0168aa8643 100644 --- a/src/overlays/l17/hero/hero_set_state.c +++ b/src/overlays/l17/hero/hero_set_state.c @@ -216,8 +216,8 @@ int hero_set_state(int requested_state, int b) { set_hero_animation(select_hero_help_value(0), 0, (float)t); { struct Hero *p = &hero; - if (((void *)p->unk1614) != 0) { - blend_moby_animation(((void *)p->unk1614), 0, 0, t); + if (((void *)p->fidget_prop_moby) != 0) { + blend_moby_animation(((void *)p->fidget_prop_moby), 0, 0, t); } } break; @@ -968,10 +968,10 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1667,7 +1667,7 @@ int hero_set_state(int requested_state, int b) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (b) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -2062,10 +2062,10 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 12.0f; + p->ledge_gravity = frame_time_sq * 12.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } if (b) @@ -2184,7 +2184,7 @@ int hero_set_state(int requested_state, int b) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; diff --git a/src/overlays/l17/hero/update_hero_motion_for_current_state.c b/src/overlays/l17/hero/update_hero_motion_for_current_state.c index 638c4c1b31..0648ff7f6e 100644 --- a/src/overlays/l17/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l17/hero/update_hero_motion_for_current_state.c @@ -487,7 +487,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.cw_turn_frames = 0; hero.swim_square_hold_frames++; s = hero.swim_square_hold_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -507,7 +507,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.swim_square_hold_frames = 0; hero.cw_turn_frames++; s = hero.cw_turn_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -1930,7 +1930,7 @@ void update_hero_motion_for_current_state(void) { } r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { - r = hero.unk5CC * (f32)hero.grind_direction; + r = hero.grind_recovery_speed * (f32)hero.grind_direction; } sample_path((void *)hero.rail_spline, &scratch_vector, diff --git a/src/overlays/l17/hero/update_hero_state_transitions.c b/src/overlays/l17/hero/update_hero_state_transitions.c index 9b2fd30ea4..0b97cc853f 100644 --- a/src/overlays/l17/hero/update_hero_state_transitions.c +++ b/src/overlays/l17/hero/update_hero_state_transitions.c @@ -2951,7 +2951,7 @@ void update_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -3017,7 +3017,7 @@ void update_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -3105,7 +3105,7 @@ void update_hero_state_transitions(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l18/hero/hero_set_state.c b/src/overlays/l18/hero/hero_set_state.c index dfad58f19a..3bb8e17dec 100644 --- a/src/overlays/l18/hero/hero_set_state.c +++ b/src/overlays/l18/hero/hero_set_state.c @@ -183,8 +183,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { set_hero_animation(get_hero_help_value(0), 0, (float)t); { struct Hero *p = &hero; - if (*(void **)&p->unk1614 != 0) { - blend_moby_animation(*(void **)&p->unk1614, 0, 0, t); + if (*(void **)&p->fidget_prop_moby != 0) { + blend_moby_animation(*(void **)&p->fidget_prop_moby, 0, 0, t); } } break; @@ -869,10 +869,10 @@ int hero_set_state(int requested_state, int animation_update_mode) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -1517,7 +1517,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (animation_update_mode) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -1932,7 +1932,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; diff --git a/src/overlays/l18/hero/process_hero_state_transitions.c b/src/overlays/l18/hero/process_hero_state_transitions.c index d80f073226..806beed52d 100644 --- a/src/overlays/l18/hero/process_hero_state_transitions.c +++ b/src/overlays/l18/hero/process_hero_state_transitions.c @@ -2661,7 +2661,7 @@ void process_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2727,7 +2727,7 @@ void process_hero_state_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -2815,7 +2815,7 @@ void process_hero_state_transitions(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/l18/hero/update_hero_motion_for_current_state.c b/src/overlays/l18/hero/update_hero_motion_for_current_state.c index 29dddfbcfa..2d8d0c38e8 100644 --- a/src/overlays/l18/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l18/hero/update_hero_motion_for_current_state.c @@ -439,7 +439,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.cw_turn_frames = 0; hero.swim_square_hold_frames++; s = hero.swim_square_hold_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -459,7 +459,7 @@ void update_hero_motion_for_current_state(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.swim_square_hold_frames = 0; hero.cw_turn_frames++; s = hero.cw_turn_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -1872,7 +1872,7 @@ void update_hero_motion_for_current_state(void) { } r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { - r = hero.unk5CC * (f32)hero.grind_direction; + r = hero.grind_recovery_speed * (f32)hero.grind_direction; } sample_path((void *)hero.rail_spline, &general_vector_or_hit_descriptor_scratch, diff --git a/src/overlays/shared/hero/hero_frame_update.c b/src/overlays/shared/hero/hero_frame_update.c index 2a80ca7925..185ef23091 100644 --- a/src/overlays/shared/hero/hero_frame_update.c +++ b/src/overlays/shared/hero/hero_frame_update.c @@ -197,7 +197,7 @@ void hero_frame_update(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } } else { hero.pending_item[0] = 0; @@ -205,7 +205,7 @@ void hero_frame_update(void) { hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } } } diff --git a/src/overlays/shared/hero/hero_idle_sequence.c b/src/overlays/shared/hero/hero_idle_sequence.c index fe2728e8bc..45320ac6d1 100644 --- a/src/overlays/shared/hero/hero_idle_sequence.c +++ b/src/overlays/shared/hero/hero_idle_sequence.c @@ -1006,7 +1006,7 @@ void update_hero_in_vehicle_mode(void) { *(u8 *)(D_0013F350_002062b0 - 0x1e74) && g->vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); g->vehicle_toggle_timer = 0x12; - g->unk22DC = 1; + g->scale_pulse_step = 1; } } } @@ -1539,10 +1539,10 @@ void apply_hero_and_item_scale_sequence(void) { float sequence_scale, item_scale; int i, j; unsigned char *item_moby; - if (G->unk22DC) { - sequence_scale = D_L00_001797D8[++G->unk22DC]; + if (G->scale_pulse_step) { + sequence_scale = D_L00_001797D8[++G->scale_pulse_step]; if (sequence_scale == -1.0f) { - G->unk22DC = 0; + G->scale_pulse_step = 0; return; } fast_vec_scale( diff --git a/src/overlays/shared/hero/hero_set_state.c b/src/overlays/shared/hero/hero_set_state.c index 1fad895ae0..fbe6df1852 100644 --- a/src/overlays/shared/hero/hero_set_state.c +++ b/src/overlays/shared/hero/hero_set_state.c @@ -799,8 +799,8 @@ int hero_set_state(int requested_state, int b) { set_hero_animation(hero_idle_sequence(0), 0, (float)t); { struct Hero *p = &hero; - if (((void *)p->unk1614) != 0) { - blend_moby_animation(((void *)p->unk1614), 0, 0, t); + if (((void *)p->fidget_prop_moby) != 0) { + blend_moby_animation(((void *)p->fidget_prop_moby), 0, 0, t); } } break; @@ -1559,10 +1559,10 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 24.0f; + p->ledge_gravity = frame_time_sq * 24.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } p->item_select_blocked = 1; @@ -2279,7 +2279,7 @@ int hero_set_state(int requested_state, int b) { q->attack_record = 3; q->saved_item[0] = 0; update_hero_target_heading(14.0f, 0.5235988f, -1.0f); - q->unkA7C = q->unkA7C == 0; + q->crouch_swing_toggle = q->crouch_swing_toggle == 0; if (b) { int n = scale_game_frames(0xA); if (q->moby->prev_seq == 0x1A) @@ -2673,10 +2673,10 @@ int hero_set_state(int requested_state, int b) { struct Hero *p = &hero; p->state.control_mode = HERO_MODE_LEDGE; p->camera_mode = 0xD; - p->unk4EC = frame_time_sq * 12.0f; + p->ledge_gravity = frame_time_sq * 12.0f; p->smoothed_air_z = p->motion.pos.f[2]; if (p->state.prev_control_mode == HERO_MODE_JUMP) { - p->unk4EC = p->jump_gravity; + p->ledge_gravity = p->jump_gravity; p->smoothed_air_z = p->smoothed_ground_z; } if (b) @@ -2888,7 +2888,7 @@ int hero_set_state(int requested_state, int b) { if (p->rail_off_frames == 0) hero_change_health(1); p->invulnerable_frames = scale_game_frames(0x4D); - p->unk5CC = frame_time * 2.5f; + p->grind_recovery_speed = frame_time * 2.5f; if (frame_time * 2.5f < p->grind_base_speed) p->grind_base_speed = frame_time * 2.5f; p->grind_speed_boost.i = 0; @@ -3850,7 +3850,7 @@ void update_hero_animation_for_movement_speed(void) { when set. */ /* Ported from rac1-decomp (src/overlays/shared/help_00221A98.c: func_L00_00229778), where it is exact; names translated to the US level program. */ -/* Removes the moby at &hero.unk1614 and clears flags 0x41 on those at 0x1180/0x1184. */ +/* Removes the moby at &hero.fidget_prop_moby and clears flags 0x41 on those at 0x1180/0x1184. */ void remove_hero_cached_moby_and_clear_slot_three_moby_flags(void) __asm__("FUN_L00_00228fa8"); void remove_hero_cached_moby_and_clear_slot_three_moby_flags(void) { @@ -3859,10 +3859,10 @@ void remove_hero_cached_moby_and_clear_slot_three_moby_flags(void) { void *item_moby; void *secondary_item_moby; - moby_to_remove = ((void *)hero_state->unk1614); + moby_to_remove = ((void *)hero_state->fidget_prop_moby); if (moby_to_remove != 0) { mark_moby_for_removal(moby_to_remove); - hero_state->unk1614 = 0; + hero_state->fidget_prop_moby = 0; } item_moby = ((void *)hero_state->items[3].moby); if (item_moby != 0) { diff --git a/src/overlays/shared/hero/hero_switch_item.c b/src/overlays/shared/hero/hero_switch_item.c index 1c68f0cd44..1699a2b17d 100644 --- a/src/overlays/shared/hero/hero_switch_item.c +++ b/src/overlays/shared/hero/hero_switch_item.c @@ -2137,7 +2137,7 @@ void hero_switch_item(int i) { if (g->vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x18, 0); g->vehicle_toggle_timer = 0x12; - g->unk22DC = 1; + g->scale_pulse_step = 1; } changed = 1; g->selected_item[i] = *s; diff --git a/src/overlays/shared/hero/hero_update_movement.c b/src/overlays/shared/hero/hero_update_movement.c index 5601900622..6865bbe483 100644 --- a/src/overlays/shared/hero/hero_update_movement.c +++ b/src/overlays/shared/hero/hero_update_movement.c @@ -503,7 +503,7 @@ void hero_update_movement(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.cw_turn_frames = 0; hero.swim_square_hold_frames++; s = hero.swim_square_hold_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -523,7 +523,7 @@ void hero_update_movement(void) { if (s < 0.2f) { s = 0.2f; } - if (PD.unk1DC != 0x79) { + if (PD.pressure_mode_id != 0x79) { hero.swim_square_hold_frames = 0; hero.cw_turn_frames++; s = hero.cw_turn_frames * 0.5f / scale_game_frames(20) + 0.5f; @@ -2009,7 +2009,7 @@ void hero_update_movement(void) { } r = hero.grind_speed * (f32)hero.grind_direction; if (hero.state.current == 0x42) { - r = hero.unk5CC * (f32)hero.grind_direction; + r = hero.grind_recovery_speed * (f32)hero.grind_direction; } sample_path((void *)hero.rail_spline, &movement_and_hit_descriptor_scratch, diff --git a/src/overlays/shared/hero/hero_update_transitions.c b/src/overlays/shared/hero/hero_update_transitions.c index ae2794fc99..38b8c27de6 100644 --- a/src/overlays/shared/hero/hero_update_transitions.c +++ b/src/overlays/shared/hero/hero_update_transitions.c @@ -3205,7 +3205,7 @@ void hero_update_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -3271,7 +3271,7 @@ void hero_update_transitions(void) { if (hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } hero_switch_item(0); break; @@ -3359,7 +3359,7 @@ void hero_update_transitions(void) { release_and_clear_hero_voice_slots(); } if ((hero.state.prev == 0x40 && hero.state.current != HERO_STATE_FIDGET_ALT) || - (hero.state.prev == 0x41 && hero.unk1614 != 0)) { + (hero.state.prev == 0x41 && hero.fidget_prop_moby != 0)) { remove_hero_cached_moby_and_clear_slot_three_moby_flags(); } if (prevState != hero.state.step) { diff --git a/src/overlays/shared/hero/process_hero_item_action_input.c b/src/overlays/shared/hero/process_hero_item_action_input.c index 5c16ecf04f..2cf8e52a7a 100644 --- a/src/overlays/shared/hero/process_hero_item_action_input.c +++ b/src/overlays/shared/hero/process_hero_item_action_input.c @@ -544,7 +544,7 @@ s32 process_hero_item_action_input(void) { hero.vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x18, 0); hero.vehicle_toggle_timer = 0x12; - hero.unk22DC = 1; + hero.scale_pulse_step = 1; } } break; diff --git a/src/overlays/shared/hero/process_hero_primary_item_input.c b/src/overlays/shared/hero/process_hero_primary_item_input.c index d51c21b355..56a121138e 100644 --- a/src/overlays/shared/hero/process_hero_primary_item_input.c +++ b/src/overlays/shared/hero/process_hero_primary_item_input.c @@ -910,7 +910,7 @@ int process_hero_primary_item_input(void) { } allocate_hero_voice_for_entry(0x18, 0); (*(Hero *)((char *)&hero)).vehicle_toggle_timer = 0x12; - (*(Hero *)((char *)&hero)).unk22DC = 1; + (*(Hero *)((char *)&hero)).scale_pulse_step = 1; break; case ITEM_AMMO_MENU_DEVICE: if ((*(Hero *)((char *)&hero)).state.control_mode < 3U || diff --git a/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c b/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c index 1e159d377b..96a043a052 100644 --- a/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c +++ b/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c @@ -352,7 +352,7 @@ void update_hero_vehicle_attachments_and_effects(void) { *(u8 *)(D_0013F350_lui - 0x1e74) && g->vehicle_toggle_timer == 0) { allocate_hero_voice_for_entry(0x19, 0); g->vehicle_toggle_timer = 0x12; - g->unk22DC = 1; + g->scale_pulse_step = 1; } } } From 2115b91dca49ce6c527c5ffc133d40dc70842525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:33:34 +0000 Subject: [PATCH 109/213] decomp: name the hero push impulse, stop deceleration, ramp launch forward and attachment pulse timer fields --- include/rnc/hero/hero.h | 51 ++++++++++--------- src/check/hero_layout_check.c | 8 +-- .../update_hero_motion_for_current_state.c | 4 +- .../l02/hero/update_hero_state_motion.c | 4 +- .../update_hero_motion_for_current_state.c | 4 +- .../l05/hero/update_hero_motion_by_state.c | 4 +- .../update_hero_motion_for_current_state.c | 4 +- .../l06/hero/update_hero_state_machine.c | 8 +-- .../update_hero_motion_for_current_state.c | 4 +- .../l11/hero/update_hero_motion_by_state.c | 4 +- .../update_hero_motion_for_current_state.c | 4 +- .../l14/hero/update_hero_motion_by_state.c | 4 +- .../update_hero_motion_for_current_state.c | 4 +- src/overlays/l16/hero/hero_set_state.c | 2 +- .../update_hero_motion_for_current_state.c | 10 ++-- .../update_hero_motion_for_current_state.c | 4 +- .../l17/hero/update_hero_state_transitions.c | 8 +-- .../update_hero_motion_for_current_state.c | 4 +- src/overlays/shared/hero/hero_idle_sequence.c | 6 +-- .../shared/hero/hero_move_state_velocity.c | 4 +- .../shared/hero/hero_update_movement.c | 4 +- .../shared/hero/hero_update_transitions.c | 7 +-- ...ate_hero_vehicle_attachments_and_effects.c | 6 +-- 23 files changed, 84 insertions(+), 78 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index f6e41867f6..254c407250 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -480,10 +480,11 @@ struct Hero { u8 pad_710[0x10]; Vec4 smoothed_steer_stick; /* 0x720 */ u8 pad_730[0x10]; - Vec4 unk740; /* 0x740 */ - Vec4 landing_displacement; /* 0x750 */ - Vec4 board_ground_pos; /* 0x760 */ - Vec4 unk770; /* 0x770 */ + Vec4 unk740; /* 0x740 */ + Vec4 landing_displacement; /* 0x750 */ + Vec4 board_ground_pos; /* 0x760 */ + Vec4 + ramp_launch_forward; /* 0x770: hero forward axis at a ramp launch, kept flat to the ground normal */ Vec4 tilt_up_dir; /* 0x780 */ Vec4 ground_move_dir; /* 0x790 */ s16 racer_laps[8]; /* 0x7A0 */ @@ -562,9 +563,9 @@ struct Hero { u8 pad_918[0x8]; Vec4 move_impulse; /* 0x920: one-frame displacement; the hero update adds it to motion.pos and clears it (some states; zero while running) */ - f32 unk930; /* 0x930 */ - f32 unk934; /* 0x934 */ - f32 unk938; /* 0x938 */ + f32 push_length; /* 0x930: length of the move_impulse that build_scaled_hero_move_impulse builds; > 0 enables it */ + f32 push_pitch; /* 0x934: second angle of that offset (build_spherical_offset) */ + f32 push_yaw; /* 0x938: first angle (yaw) of that offset */ u8 pad_93C[0x4]; f32 fall_state_gravity; /* 0x940 */ f32 stickless_decel; /* 0x944 */ @@ -812,23 +813,23 @@ struct Hero { s32 board_boost_voice; /* 0x2234 */ struct Moby *sound_slot_moby [8]; /* 0x2238: per sound slot (grind_voice + i * 4): moby the sound plays on, 0 = hero.moby */ - u8 pad_2258[0x18]; - s32 fidget_index; /* 0x2270 */ - s32 look_target; /* 0x2274 */ - void *anim_link_moby; /* 0x2278 */ - s32 anim_link_table; /* 0x227C */ - struct Moby *damage_source_moby; /* 0x2280 */ - s32 camera_mode; /* 0x2284 */ - f32 reach_distance; /* 0x2288 */ - f32 reach_height; /* 0x228C */ - f32 unk2290; /* 0x2290 */ - s32 item_hold_anim; /* 0x2294 */ - s32 item_anim_item_id; /* 0x2298 */ - f32 stick_magnitude; /* 0x229C */ - s32 underwater_air; /* 0x22A0 */ - f32 water_depth; /* 0x22A4 */ - struct HeroHealth health; /* 0x22A8 */ - s32 wall_jumped; /* 0x22B4 */ + u8 pad_2258[0x18]; + s32 fidget_index; /* 0x2270 */ + s32 look_target; /* 0x2274 */ + void *anim_link_moby; /* 0x2278 */ + s32 anim_link_table; /* 0x227C */ + struct Moby *damage_source_moby; /* 0x2280 */ + s32 camera_mode; /* 0x2284 */ + f32 reach_distance; /* 0x2288 */ + f32 reach_height; /* 0x228C */ + f32 stop_decel; /* 0x2290: 12 * frame_time_sq scaled by slope, set in HERO_STATE_STOP */ + s32 item_hold_anim; /* 0x2294 */ + s32 item_anim_item_id; /* 0x2298 */ + f32 stick_magnitude; /* 0x229C */ + s32 underwater_air; /* 0x22A0 */ + f32 water_depth; /* 0x22A4 */ + struct HeroHealth health; /* 0x22A8 */ + s32 wall_jumped; /* 0x22B4 */ f32 current_path_dist; /* 0x22B8: distance to the nearest carrying path this frame (water_current_update keeps the minimum) */ u8 pad_22BC[0x8]; s32 slot3_anim_timer; /* 0x22C4 */ @@ -852,7 +853,7 @@ struct Hero { f32 item5_glow_phase; /* 0x22F0: phase for the items[5].moby colour */ s32 color_fade_active; /* 0x22F4 */ s32 tint_color; /* 0x22F8 */ - s16 unk22FC; /* 0x22FC */ + s16 attachment_pulse_timer; /* 0x22FC: 57 frames after an attachment pulse; speeds the glow and tints it by 0x22FE */ }; /* Offsets are checked in src/check/hero_layout_check.c (make check). */ diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index b27ff38ba6..5966568042 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -320,7 +320,7 @@ HERO_OFFSET_CHECK(jump_button_frames, 0x90E); HERO_OFFSET_CHECK(swim_cross_tap_count, 0x910); HERO_OFFSET_CHECK(last_cross_press_frame, 0x914); HERO_OFFSET_CHECK(move_impulse, 0x920); -HERO_OFFSET_CHECK(unk930, 0x930); +HERO_OFFSET_CHECK(push_length, 0x930); HERO_OFFSET_CHECK(fall_state_gravity, 0x940); HERO_OFFSET_CHECK(stickless_decel, 0x944); HERO_OFFSET_CHECK(fatal_fall_roll_rate, 0x948); @@ -490,7 +490,7 @@ HERO_OFFSET_CHECK(damage_source_moby, 0x2280); HERO_OFFSET_CHECK(camera_mode, 0x2284); HERO_OFFSET_CHECK(reach_distance, 0x2288); HERO_OFFSET_CHECK(reach_height, 0x228C); -HERO_OFFSET_CHECK(unk2290, 0x2290); +HERO_OFFSET_CHECK(stop_decel, 0x2290); HERO_OFFSET_CHECK(item_hold_anim, 0x2294); HERO_OFFSET_CHECK(item_anim_item_id, 0x2298); HERO_OFFSET_CHECK(stick_magnitude, 0x229C); @@ -521,7 +521,7 @@ HERO_OFFSET_CHECK(item4_alt_glow_phase, 0x22EC); HERO_OFFSET_CHECK(item5_glow_phase, 0x22F0); HERO_OFFSET_CHECK(color_fade_active, 0x22F4); HERO_OFFSET_CHECK(tint_color, 0x22F8); -HERO_OFFSET_CHECK(unk22FC, 0x22FC); +HERO_OFFSET_CHECK(attachment_pulse_timer, 0x22FC); HERO_OFFSET_CHECK(joint9_world_pos, 0x510); HERO_OFFSET_CHECK(joint14_world_pos, 0x520); HERO_OFFSET_CHECK(root_joint_pos, 0x530); @@ -543,7 +543,7 @@ HERO_OFFSET_CHECK(smoothed_steer_stick, 0x720); HERO_OFFSET_CHECK(unk740, 0x740); HERO_OFFSET_CHECK(landing_displacement, 0x750); HERO_OFFSET_CHECK(board_ground_pos, 0x760); -HERO_OFFSET_CHECK(unk770, 0x770); +HERO_OFFSET_CHECK(ramp_launch_forward, 0x770); HERO_OFFSET_CHECK(tilt_up_dir, 0x780); HERO_OFFSET_CHECK(ground_move_dir, 0x790); HERO_OFFSET_CHECK(board_vertical_speed, 0x854); diff --git a/src/overlays/l01/hero/update_hero_motion_for_current_state.c b/src/overlays/l01/hero/update_hero_motion_for_current_state.c index 8787703c50..b179ed30fe 100644 --- a/src/overlays/l01/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l01/hero/update_hero_motion_for_current_state.c @@ -566,7 +566,7 @@ void update_hero_motion_for_current_state(void) { t = 1.0f; } speed = frame_time_sq * 12.0f * t; - hero.unk2290 = speed; + hero.stop_decel = speed; if (hero.moby->seq == hero.moby->prev_seq && hero.moby->seq != 0x14) { float r; @@ -1622,7 +1622,7 @@ void update_hero_motion_for_current_state(void) { } } hero_speed_from_table(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { build_scaled_hero_move_impulse(0.7f, 0.0f); *(OvlQuad *)vector_and_hit_scratch[0] = *(OvlQuad *)hero.move_impulse.f; hero.target_speed = hero.target_speed + forward_component(vector_and_hit_scratch[0]); diff --git a/src/overlays/l02/hero/update_hero_state_motion.c b/src/overlays/l02/hero/update_hero_state_motion.c index 2f04b0d1f3..8bcafd7ba8 100644 --- a/src/overlays/l02/hero/update_hero_state_motion.c +++ b/src/overlays/l02/hero/update_hero_state_motion.c @@ -889,7 +889,7 @@ void update_hero_state_motion(void) { t = 1.0f; } speed = frame_time_sq * 12.0f * t; - hero.unk2290 = speed; + hero.stop_decel = speed; if (hero.moby->seq == hero.moby->prev_seq && hero.moby->seq != 0x14) { float r; @@ -1821,7 +1821,7 @@ void update_hero_state_motion(void) { } } update_hero_stick_target_magnitude(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { build_scaled_hero_move_impulse(0.7f, 0.0f); *(OvlQuad *)motion_geometry_scratch[0] = *(OvlQuad *)hero.move_impulse.f; hero.target_speed = hero.target_speed + forward_component(motion_geometry_scratch[0]); diff --git a/src/overlays/l03/hero/update_hero_motion_for_current_state.c b/src/overlays/l03/hero/update_hero_motion_for_current_state.c index 6cb621de52..81f614a5b9 100644 --- a/src/overlays/l03/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l03/hero/update_hero_motion_for_current_state.c @@ -368,7 +368,7 @@ void update_hero_motion_for_current_state(void) { s = 1.0f; } speed = frame_time_sq * 12.0f * s; - hero.unk2290 = speed; + hero.stop_decel = speed; if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq && MV(hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; if (scale_game_frames(5) < r && MV(hero.moby)->prev_frame < 5.5f) { @@ -1620,7 +1620,7 @@ void update_hero_motion_for_current_state(void) { hero.sharp_turn = 0; } hero_speed_from_table(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { Vec4 *move_impulse_ptr = &hero.move_impulse; build_scaled_hero_move_impulse(0.7f, 0.0f); spatial_scratch_or_hit_descriptor.q = hero.move_impulse.q; diff --git a/src/overlays/l05/hero/update_hero_motion_by_state.c b/src/overlays/l05/hero/update_hero_motion_by_state.c index 58c38ba0aa..13f223c588 100644 --- a/src/overlays/l05/hero/update_hero_motion_by_state.c +++ b/src/overlays/l05/hero/update_hero_motion_by_state.c @@ -322,7 +322,7 @@ void update_hero_motion_by_state(void) { s = 1.0f; } speed = frame_time_sq * 12.0f * s; - hero.unk2290 = speed; + hero.stop_decel = speed; if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; @@ -1903,7 +1903,7 @@ void update_hero_motion_by_state(void) { hero.sharp_turn = 0; } hero_speed_from_table(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { Vec4 *move_impulse = &hero.move_impulse; build_scaled_hero_move_impulse(0.7f, 0.0f); vector_and_hit_scratch.q = hero.move_impulse.q; diff --git a/src/overlays/l06/hero/update_hero_motion_for_current_state.c b/src/overlays/l06/hero/update_hero_motion_for_current_state.c index 15563dd4e7..4cc94ec78f 100644 --- a/src/overlays/l06/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l06/hero/update_hero_motion_for_current_state.c @@ -1070,7 +1070,7 @@ void update_hero_motion_for_current_state(void) { s = 1.0f; } speed = frame_time_sq * 12.0f * s; - hero.unk2290 = speed; + hero.stop_decel = speed; if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; @@ -1913,7 +1913,7 @@ void update_hero_motion_for_current_state(void) { hero.sharp_turn = 0; } quantize_hero_input_target_speed(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { Vec4 *move_impulse_ptr = &hero.move_impulse; build_scaled_hero_move_impulse(0.7f, 0.0f); vector_or_hit_descriptor_scratch.q = hero.move_impulse.q; diff --git a/src/overlays/l06/hero/update_hero_state_machine.c b/src/overlays/l06/hero/update_hero_state_machine.c index 30416dc2b1..a77bf0c3e3 100644 --- a/src/overlays/l06/hero/update_hero_state_machine.c +++ b/src/overlays/l06/hero/update_hero_state_machine.c @@ -2124,11 +2124,12 @@ void update_hero_state_machine(void) { } break; case HERO_STATE_VEHICLE_MODE_1_IDLE: - if (hero.unk22FC > scale_game_frames(0x39) - scale_game_frames(0xF)) { + if (hero.attachment_pulse_timer > + scale_game_frames(0x39) - scale_game_frames(0xF)) { set_hero_animation(0x12, 0, scale_game_frames(0xA)); break; } - if (hero.unk22FC == 0 && (hero.anim_flags & 2)) { + if (hero.attachment_pulse_timer == 0 && (hero.anim_flags & 2)) { if (((unsigned char *)hero.moby)[0x53] != 0) { set_hero_animation(0, 0, scale_game_frames(0xC)); } else if (random_float_between(0.0f, 1.0f) < 0.5f) { @@ -2160,7 +2161,8 @@ void update_hero_state_machine(void) { hero_set_state(0x44, 1); break; } - if (hero.unk22FC == 0 && ((unsigned char *)hero.moby)[0x53] == 0x12) { + if (hero.attachment_pulse_timer == 0 && + ((unsigned char *)hero.moby)[0x53] == 0x12) { set_hero_animation(0, 0, scale_game_frames(0xC)); } break; diff --git a/src/overlays/l08/hero/update_hero_motion_for_current_state.c b/src/overlays/l08/hero/update_hero_motion_for_current_state.c index c787a66ea6..0a1f2f754f 100644 --- a/src/overlays/l08/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l08/hero/update_hero_motion_for_current_state.c @@ -438,7 +438,7 @@ void update_hero_motion_for_current_state(void) { s = 1.0f; } speed = frame_time_sq * 12.0f * s; - hero.unk2290 = speed; + hero.stop_decel = speed; if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq && MV(hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; if (scale_game_frames(5) < r && MV(hero.moby)->prev_frame < 5.5f) { @@ -1734,7 +1734,7 @@ void update_hero_motion_for_current_state(void) { hero.sharp_turn = 0; } update_hero_target_speed_from_stick(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { Vec4 *move_impulse_ptr = &hero.move_impulse; build_scaled_hero_move_impulse(0.7f, 0.0f); vector_and_attack_descriptor_scratch.q = hero.move_impulse.q; diff --git a/src/overlays/l11/hero/update_hero_motion_by_state.c b/src/overlays/l11/hero/update_hero_motion_by_state.c index 04e86a612c..3393b7a5ea 100644 --- a/src/overlays/l11/hero/update_hero_motion_by_state.c +++ b/src/overlays/l11/hero/update_hero_motion_by_state.c @@ -420,7 +420,7 @@ void update_hero_motion_by_state(void) { s = 1.0f; } speed = frame_time_sq * 12.0f * s; - hero.unk2290 = speed; + hero.stop_decel = speed; if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq && MV(hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; if (scale_game_frames(5) < r && MV(hero.moby)->prev_frame < 5.5f) { @@ -1688,7 +1688,7 @@ void update_hero_motion_by_state(void) { hero.sharp_turn = 0; } hero_speed_from_table(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { Vec4 *move_impulse_ptr = &hero.move_impulse; build_scaled_hero_move_impulse(0.7f, 0.0f); vector_and_hit_descriptor_head_scratch.q = hero.move_impulse.q; diff --git a/src/overlays/l12/hero/update_hero_motion_for_current_state.c b/src/overlays/l12/hero/update_hero_motion_for_current_state.c index 1f10b353eb..17378c75eb 100644 --- a/src/overlays/l12/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l12/hero/update_hero_motion_for_current_state.c @@ -713,7 +713,7 @@ void update_hero_motion_for_current_state(void) { s = 1.0f; } speed = frame_time_sq * 12.0f * s; - hero.unk2290 = speed; + hero.stop_decel = speed; if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq && MV(hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; if (scale_game_frames(5) < r && MV(hero.moby)->prev_frame < 5.5f) { @@ -2083,7 +2083,7 @@ void update_hero_motion_for_current_state(void) { hero.sharp_turn = 0; } update_hero_target_speed_from_stick(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { Vec4 *move_impulse_ptr = &hero.move_impulse; build_scaled_hero_move_impulse(0.7f, 0.0f); geometry_and_hit_descriptor_scratch.q = hero.move_impulse.q; diff --git a/src/overlays/l14/hero/update_hero_motion_by_state.c b/src/overlays/l14/hero/update_hero_motion_by_state.c index 9e8a1b2c99..6b0ece68eb 100644 --- a/src/overlays/l14/hero/update_hero_motion_by_state.c +++ b/src/overlays/l14/hero/update_hero_motion_by_state.c @@ -579,7 +579,7 @@ void update_hero_motion_by_state(void) { s = 1.0f; } speed = frame_time_sq * 12.0f * s; - hero.unk2290 = speed; + hero.stop_decel = speed; if (MV(hero.moby)->seq == MV(hero.moby)->prev_seq && MV(hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; if (scale_game_frames(5) < r && MV(hero.moby)->prev_frame < 5.5f) { @@ -1474,7 +1474,7 @@ void update_hero_motion_by_state(void) { hero.sharp_turn = 0; } update_hero_stick_target_magnitude(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { Vec4 *move_impulse_ptr = &hero.move_impulse; build_scaled_hero_move_impulse(0.7f, 0.0f); vector_and_descriptor_scratch.q = hero.move_impulse.q; diff --git a/src/overlays/l15/hero/update_hero_motion_for_current_state.c b/src/overlays/l15/hero/update_hero_motion_for_current_state.c index 6ec0db2da4..7b504c9cb9 100644 --- a/src/overlays/l15/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l15/hero/update_hero_motion_for_current_state.c @@ -644,7 +644,7 @@ void update_hero_motion_for_current_state(void) { s = 1.0f; } speed = frame_time_sq * 12.0f * s; - hero.unk2290 = speed; + hero.stop_decel = speed; if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; @@ -1867,7 +1867,7 @@ void update_hero_motion_for_current_state(void) { hero.sharp_turn = 0; } hero_speed_from_table(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { Vec4 *move_impulse_ptr = &hero.move_impulse; build_scaled_hero_move_impulse(0.7f, 0.0f); spatial_or_hit_descriptor_work.q = hero.move_impulse.q; diff --git a/src/overlays/l16/hero/hero_set_state.c b/src/overlays/l16/hero/hero_set_state.c index 475d11dfde..649990b604 100644 --- a/src/overlays/l16/hero/hero_set_state.c +++ b/src/overlays/l16/hero/hero_set_state.c @@ -478,7 +478,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { p->state.control_mode = 0x15; p->camera_mode = 8; p->item_select_blocked = 1; - qcopy(&p->unk770, p->rot_matrix); + qcopy(&p->ramp_launch_forward, p->rot_matrix); p->board_gravity = frame_time_sq * 18.0f; if (animation_update_mode) set_hero_animation(0x52, 0, (float)scale_game_frames(5)); diff --git a/src/overlays/l16/hero/update_hero_motion_for_current_state.c b/src/overlays/l16/hero/update_hero_motion_for_current_state.c index cd9f80a9ce..bb44d5859f 100644 --- a/src/overlays/l16/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l16/hero/update_hero_motion_for_current_state.c @@ -325,7 +325,7 @@ void update_hero_motion_for_current_state(void) { s = 1.0f; } speed = frame_time_sq * 12.0f * s; - hero.unk2290 = speed; + hero.stop_decel = speed; if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; @@ -836,10 +836,10 @@ void update_hero_motion_for_current_state(void) { if (d < -0.5f) { b = 1; } - d = fast_vec_dot(&hero.ground_normal, &hero.unk770); + d = fast_vec_dot(&hero.ground_normal, &hero.ramp_launch_forward); fast_vec_normalize(&v10, &hero.ground_normal, d); - fast_vec_sub(&hero.unk770, &hero.unk770, &v10); - fast_vec_normalize(&hero.unk770, &hero.unk770, 1.0f); + fast_vec_sub(&hero.ramp_launch_forward, &hero.ramp_launch_forward, &v10); + fast_vec_normalize(&hero.ramp_launch_forward, &hero.ramp_launch_forward, 1.0f); if (hero.air_frames.s == 0) { if (hero.vert_ramp_launch != 0) { hero.landing_turn_delay = scale_game_frames(15); @@ -2059,7 +2059,7 @@ void update_hero_motion_for_current_state(void) { hero.sharp_turn = 0; } update_hero_target_speed_from_stick(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { Vec4 *move_impulse_ptr = &hero.move_impulse; build_scaled_hero_move_impulse(0.7f, 0.0f); primary_vector_scratch.q = hero.move_impulse.q; diff --git a/src/overlays/l17/hero/update_hero_motion_for_current_state.c b/src/overlays/l17/hero/update_hero_motion_for_current_state.c index 0648ff7f6e..b21c8b8111 100644 --- a/src/overlays/l17/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l17/hero/update_hero_motion_for_current_state.c @@ -317,7 +317,7 @@ void update_hero_motion_for_current_state(void) { s = 1.0f; } speed = frame_time_sq * 12.0f * s; - hero.unk2290 = speed; + hero.stop_decel = speed; if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; @@ -1656,7 +1656,7 @@ void update_hero_motion_for_current_state(void) { hero.sharp_turn = 0; } update_hero_target_speed_from_stick(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { Vec4 *move_impulse = &hero.move_impulse; build_scaled_hero_move_impulse(0.7f, 0.0f); scratch_vector.q = hero.move_impulse.q; diff --git a/src/overlays/l17/hero/update_hero_state_transitions.c b/src/overlays/l17/hero/update_hero_state_transitions.c index 0b97cc853f..b80c049d05 100644 --- a/src/overlays/l17/hero/update_hero_state_transitions.c +++ b/src/overlays/l17/hero/update_hero_state_transitions.c @@ -2506,11 +2506,12 @@ void update_hero_state_transitions(void) { } break; case HERO_STATE_VEHICLE_MODE_1_IDLE: - if (hero.unk22FC > scale_game_frames(0x39) - scale_game_frames(0xF)) { + if (hero.attachment_pulse_timer > + scale_game_frames(0x39) - scale_game_frames(0xF)) { set_hero_animation(0x12, 0, scale_game_frames(0xA)); break; } - if (hero.unk22FC == 0 && (hero.anim_flags & 2)) { + if (hero.attachment_pulse_timer == 0 && (hero.anim_flags & 2)) { if (((unsigned char *)hero.moby)[0x53] != 0) { set_hero_animation(0, 0, scale_game_frames(0xC)); } else if (random_float_between(0.0f, 1.0f) < 0.5f) { @@ -2542,7 +2543,8 @@ void update_hero_state_transitions(void) { hero_set_state(0x44, 1); break; } - if (hero.unk22FC == 0 && ((unsigned char *)hero.moby)[0x53] == 0x12) { + if (hero.attachment_pulse_timer == 0 && + ((unsigned char *)hero.moby)[0x53] == 0x12) { set_hero_animation(0, 0, scale_game_frames(0xC)); } break; diff --git a/src/overlays/l18/hero/update_hero_motion_for_current_state.c b/src/overlays/l18/hero/update_hero_motion_for_current_state.c index 2d8d0c38e8..0799a31a7b 100644 --- a/src/overlays/l18/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l18/hero/update_hero_motion_for_current_state.c @@ -318,7 +318,7 @@ void update_hero_motion_for_current_state(void) { s = 1.0f; } speed = frame_time_sq * 12.0f * s; - hero.unk2290 = speed; + hero.stop_decel = speed; if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; @@ -1641,7 +1641,7 @@ void update_hero_motion_for_current_state(void) { hero.sharp_turn = 0; } update_hero_target_speed_from_stick(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { Vec4 *move_impulse_ptr = &hero.move_impulse; build_scaled_hero_move_impulse(0.7f, 0.0f); general_vector_or_hit_descriptor_scratch.q = hero.move_impulse.q; diff --git a/src/overlays/shared/hero/hero_idle_sequence.c b/src/overlays/shared/hero/hero_idle_sequence.c index 45320ac6d1..af25d4f31f 100644 --- a/src/overlays/shared/hero/hero_idle_sequence.c +++ b/src/overlays/shared/hero/hero_idle_sequence.c @@ -823,7 +823,7 @@ void update_hero_in_vehicle_mode(void) { scale = 1.7f; if (D_0015EDB3_macro) scale = 3.1f; - if (g->unk22FC) + if (g->attachment_pulse_timer) scale *= 1.4f; FUN_L00_0025b868(*(f32 *)(*(char **)(((char *)g->unk1624) + 0x24) + 0x24) * scale, @@ -840,7 +840,7 @@ void update_hero_in_vehicle_mode(void) { struct Hero *g = &hero; g->glow_phase = FUN_L00_002000e8(g->glow_phase, frame_time_macro * 2.9670596f); } - if (FUN_L00_001fef98(&g->unk22FC) == 0) { + if (FUN_L00_001fef98(&g->attachment_pulse_timer) == 0) { struct Hero *g = &hero; g->glow_phase = FUN_L00_002000e8(g->glow_phase, frame_time_macro * 12.217304f); switch (*(s16 *)((char *)g + 0x22fe)) { @@ -915,7 +915,7 @@ void update_hero_in_vehicle_mode(void) { if (*(char **)((char *)g + 0x22c0)) { FUN_L00_0028dbe8(*(char **)((char *)g + 0x22c0) + 0x10, 0, ((char *)g->moby)); *(s16 *)((char *)g + 0x22fe) = *(u16 *)((char *)g + 0x22c0); - g->unk22FC = FUN_L00_001fef20(0x39); + g->attachment_pulse_timer = FUN_L00_001fef20(0x39); } *(u32 *)((char *)g + 0x22c0) = 0; } diff --git a/src/overlays/shared/hero/hero_move_state_velocity.c b/src/overlays/shared/hero/hero_move_state_velocity.c index 03c930c35e..9abb3e44f2 100644 --- a/src/overlays/shared/hero/hero_move_state_velocity.c +++ b/src/overlays/shared/hero/hero_move_state_velocity.c @@ -772,7 +772,7 @@ void update_hero_planar_movement_velocity(void) { target_velocity.f[1] = target_speed_y * turn_factor_or_speed_scale_or_opposition_or_slope_speed; qcopy(&target_velocity_before_impulse, &target_velocity); zero_or_planar_step_limit_or_slope_heading = target_velocity.f[2]; - if (zero_or_planar_step_limit_or_slope_heading < hero.unk930) { + if (zero_or_planar_step_limit_or_slope_heading < hero.push_length) { build_scaled_hero_move_impulse(0.7f, frame_duration * zero_or_planar_step_limit_or_slope_heading); qcopy(&saved_move_impulse, &hero.move_impulse); @@ -813,7 +813,7 @@ void update_hero_planar_movement_velocity(void) { if (frame_time * 5.9f < hero.motion.speed_xy) { zero_or_planar_step_limit_or_slope_heading = frame_time_sq * 13.0f; } - impulse_gate_or_target_length = hero.unk930; + impulse_gate_or_target_length = hero.push_length; zero_or_slope_step_limit = 0.0f; if (zero_or_slope_step_limit < impulse_gate_or_target_length) { turn_factor_or_speed_scale_or_opposition_or_slope_speed = diff --git a/src/overlays/shared/hero/hero_update_movement.c b/src/overlays/shared/hero/hero_update_movement.c index 6865bbe483..707552f901 100644 --- a/src/overlays/shared/hero/hero_update_movement.c +++ b/src/overlays/shared/hero/hero_update_movement.c @@ -333,7 +333,7 @@ void hero_update_movement(void) { s = 1.0f; } speed = frame_time_sq * 12.0f * s; - hero.unk2290 = speed; + hero.stop_decel = speed; if (((struct MobyView *)hero.moby)->seq == ((struct MobyView *)hero.moby)->prev_seq && ((struct MobyView *)hero.moby)->seq != 0x14) { f32 r = hero.motion.flat_speed / speed; @@ -1732,7 +1732,7 @@ void hero_update_movement(void) { hero.sharp_turn = 0; } update_hero_target_speed_from_stick(); - if (hero.unk930 > 0.0f) { + if (hero.push_length > 0.0f) { Vec4 *move_impulse_ptr = &hero.move_impulse; build_scaled_hero_move_impulse(0.7f, 0.0f); movement_and_hit_descriptor_scratch.q = hero.move_impulse.q; diff --git a/src/overlays/shared/hero/hero_update_transitions.c b/src/overlays/shared/hero/hero_update_transitions.c index 38b8c27de6..070327576c 100644 --- a/src/overlays/shared/hero/hero_update_transitions.c +++ b/src/overlays/shared/hero/hero_update_transitions.c @@ -2501,11 +2501,12 @@ void hero_update_transitions(void) { } break; case HERO_STATE_VEHICLE_MODE_1_IDLE: - if (hero.unk22FC > scale_game_frames(0x39) - scale_game_frames(0xF)) { + if (hero.attachment_pulse_timer > + scale_game_frames(0x39) - scale_game_frames(0xF)) { set_hero_animation(0x12, 0, scale_game_frames(0xA)); break; } - if (hero.unk22FC == 0 && (hero.anim_flags & 2)) { + if (hero.attachment_pulse_timer == 0 && (hero.anim_flags & 2)) { if (hero.moby->prev_seq != 0) { set_hero_animation(0, 0, scale_game_frames(0xC)); } else if (random_float_between(0.0f, 1.0f) < 0.5f) { @@ -2537,7 +2538,7 @@ void hero_update_transitions(void) { hero_set_state(0x44, 1); break; } - if (hero.unk22FC == 0 && hero.moby->prev_seq == 0x12) { + if (hero.attachment_pulse_timer == 0 && hero.moby->prev_seq == 0x12) { set_hero_animation(0, 0, scale_game_frames(0xC)); } break; diff --git a/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c b/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c index 96a043a052..89956b7514 100644 --- a/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c +++ b/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c @@ -184,7 +184,7 @@ void update_hero_vehicle_attachments_and_effects(void) { scale = 1.7f; if (D_0015EDB3_macro) scale = 3.1f; - if (g->unk22FC) + if (g->attachment_pulse_timer) scale *= 1.4f; approach_value(*(f32 *)(*(char **)(((char *)g->unk1624) + 0x24) + 0x24) * scale, 0.02f, @@ -200,7 +200,7 @@ void update_hero_vehicle_attachments_and_effects(void) { struct Hero *g = &hero; g->glow_phase = fast_add_rotations(g->glow_phase, frame_time_macro * 2.9670596f); } - if (fast_dec_timer_s16(&g->unk22FC) == 0) { + if (fast_dec_timer_s16(&g->attachment_pulse_timer) == 0) { struct Hero *g = &hero; g->glow_phase = fast_add_rotations(g->glow_phase, frame_time_macro * 12.217304f); switch (*(s16 *)((char *)g + 0x22fe)) { @@ -275,7 +275,7 @@ void update_hero_vehicle_attachments_and_effects(void) { *(char **)((char *)g + 0x22c0) + 0x10, 0, ((char *)g->moby)); /* Retail copies the low halfword of this pending pointer. */ *(s16 *)((char *)g + 0x22fe) = *(u16 *)((char *)g + 0x22c0); - g->unk22FC = scale_game_frames(0x39); + g->attachment_pulse_timer = scale_game_frames(0x39); } *(u32 *)((char *)g + 0x22c0) = 0; } From e40a36fd4609b9cd37fa8b80e7ffad545fbe1a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:34:55 +0000 Subject: [PATCH 110/213] decomp: name the attack record chain fields, the idle fidget animation and the hero speed step threshold --- include/rnc/overlay/shared/hero/hero_tables.h | 12 ++++++------ src/overlays/l01/hero/hero_set_state.c | 6 +++--- src/overlays/l01/hero/update_hero_state_machine.c | 2 +- src/overlays/l02/hero/hero_set_state.c | 8 ++++---- src/overlays/l03/hero/hero_set_state.c | 6 +++--- src/overlays/l03/hero/update_hero_state_machine.c | 2 +- src/overlays/l05/hero/hero_set_state.c | 6 +++--- src/overlays/l05/hero/update_hero_state_machine.c | 2 +- src/overlays/l06/hero/hero_set_state.c | 8 ++++---- src/overlays/l06/hero/update_hero_state_machine.c | 2 +- src/overlays/l08/hero/hero_set_state.c | 6 +++--- .../l08/hero/update_hero_state_transitions.c | 2 +- src/overlays/l11/hero/hero_set_state.c | 6 +++--- .../l11/hero/update_hero_state_transitions.c | 2 +- src/overlays/l12/hero/hero_set_state.c | 6 +++--- .../l12/hero/update_hero_state_transitions.c | 2 +- src/overlays/l14/hero/hero_set_state.c | 6 +++--- .../l14/hero/process_hero_state_transitions.c | 2 +- src/overlays/l15/hero/hero_set_state.c | 6 +++--- src/overlays/l15/hero/update_hero_state_machine.c | 2 +- src/overlays/l16/hero/hero_set_state.c | 6 +++--- .../l16/hero/update_hero_state_transitions.c | 2 +- src/overlays/l17/hero/hero_set_state.c | 8 ++++---- .../l17/hero/update_hero_state_transitions.c | 2 +- src/overlays/l18/hero/hero_set_state.c | 6 +++--- .../l18/hero/process_hero_state_transitions.c | 2 +- src/overlays/shared/hero/hero_set_state.c | 8 ++++---- src/overlays/shared/hero/hero_switch_item.c | 2 +- src/overlays/shared/hero/hero_update_transitions.c | 14 +++++++------- 29 files changed, 72 insertions(+), 72 deletions(-) diff --git a/include/rnc/overlay/shared/hero/hero_tables.h b/include/rnc/overlay/shared/hero/hero_tables.h index 306c2d2ec1..3918758f38 100644 --- a/include/rnc/overlay/shared/hero/hero_tables.h +++ b/include/rnc/overlay/shared/hero/hero_tables.h @@ -20,12 +20,12 @@ enum HeroComboKind { * 0x70-byte idle fidget entry of idle_fidgets, picked by * pick_idle_fidget(&index) with weight 1 / (interval * 60). The hero stores * the index, sets duration_frames from duration and then either enters hero - * state 0x40 or calls set_hero_animation(unk48, 0, ...). + * state 0x40 or calls set_hero_animation(anim, 0, ...). */ typedef struct HeroTableEntry70 { u8 pad_0[0x44]; s32 use_state_40; /* nonzero: hero_set_state(0x40, 1) instead of set_hero_animation */ - s32 unk48; /* first argument of set_hero_animation */ + s32 anim; /* animation id passed to set_hero_animation */ u8 pad_4C[0x4]; s32 item_id; /* only while hero_slot_item_id(0) returns it; -1: any */ u8 pad_54[0x4]; @@ -55,9 +55,9 @@ typedef struct HeroAnimRow { * f18 and f1C..f20 are compared with it). */ typedef struct HeroTableRow2C { - s32 unk0; - s32 kind; /* HeroComboKind; 1 also adds a turn-direction test */ - s32 unk8; + s32 combo_ends; /* 0: the next swing may chain while anim_frame < chain_before_frame; 1: finishing recovery animation */ + s32 kind; /* HeroComboKind; 1 also adds a turn-direction test */ + s32 chain_before_frame; /* frame before which a wrench press chains to the next attack record */ s32 fC; s32 f10; /* frame from which a follow-up move may start */ s32 f14; @@ -76,7 +76,7 @@ typedef struct HeroSpeedStep { f32 lower; f32 upper; f32 target_speed; - f32 unkC; /* compared with hero.target_speed */ + f32 step_up_speed; /* target_speed above it moves on to the next step */ } HeroSpeedStep; extern HeroSpeedStep hero_speed_steps[] __asm__("D_L00_0017BDB8"); diff --git a/src/overlays/l01/hero/hero_set_state.c b/src/overlays/l01/hero/hero_set_state.c index b023b26f24..1a892943cb 100644 --- a/src/overlays/l01/hero/hero_set_state.c +++ b/src/overlays/l01/hero/hero_set_state.c @@ -1271,8 +1271,8 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { e = &D_L01_0017C0A8[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1335,7 +1335,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { HeroTableRow2C *e = &D_L01_0017C0A8[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/l01/hero/update_hero_state_machine.c b/src/overlays/l01/hero/update_hero_state_machine.c index 4999f57c61..02e90015a5 100644 --- a/src/overlays/l01/hero/update_hero_state_machine.c +++ b/src/overlays/l01/hero/update_hero_state_machine.c @@ -296,7 +296,7 @@ void update_hero_state_machine(void) { if (rec->use_state_40 != 0) { l01_hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/l02/hero/hero_set_state.c b/src/overlays/l02/hero/hero_set_state.c index 739664a982..13a0e63d43 100644 --- a/src/overlays/l02/hero/hero_set_state.c +++ b/src/overlays/l02/hero/hero_set_state.c @@ -1155,8 +1155,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { e = &D_L02_0017C228[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1246,7 +1246,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { HeroTableRow2C *e = &D_L02_0017C228[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); @@ -2010,7 +2010,7 @@ void update_hero_state_transitions(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/l03/hero/hero_set_state.c b/src/overlays/l03/hero/hero_set_state.c index c98d109ded..0d17201790 100644 --- a/src/overlays/l03/hero/hero_set_state.c +++ b/src/overlays/l03/hero/hero_set_state.c @@ -1418,8 +1418,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { e = &D_L03_0017BD28[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1482,7 +1482,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { HeroTableRow2C *e = &D_L03_0017BD28[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/l03/hero/update_hero_state_machine.c b/src/overlays/l03/hero/update_hero_state_machine.c index d9931ec4c1..81af9a7b4a 100644 --- a/src/overlays/l03/hero/update_hero_state_machine.c +++ b/src/overlays/l03/hero/update_hero_state_machine.c @@ -299,7 +299,7 @@ void update_hero_state_machine(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/l05/hero/hero_set_state.c b/src/overlays/l05/hero/hero_set_state.c index 749e77ebb8..95b8a0ba70 100644 --- a/src/overlays/l05/hero/hero_set_state.c +++ b/src/overlays/l05/hero/hero_set_state.c @@ -1648,8 +1648,8 @@ int hero_set_state(int requested_state, int animation_request_mode) { e = &D_L05_0017C088[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1712,7 +1712,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { HeroTableRow2C *e = &D_L05_0017C088[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/l05/hero/update_hero_state_machine.c b/src/overlays/l05/hero/update_hero_state_machine.c index 198c98acb6..962d6d53e0 100644 --- a/src/overlays/l05/hero/update_hero_state_machine.c +++ b/src/overlays/l05/hero/update_hero_state_machine.c @@ -306,7 +306,7 @@ void update_hero_state_machine(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/l06/hero/hero_set_state.c b/src/overlays/l06/hero/hero_set_state.c index e210ab602b..3a132a4faa 100644 --- a/src/overlays/l06/hero/hero_set_state.c +++ b/src/overlays/l06/hero/hero_set_state.c @@ -1296,8 +1296,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { e = &D_L06_0017C3A8[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1341,7 +1341,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if ((q->state.prev_control_mode == HERO_MODE_ATTACK || (q->state.prev2_control_mode == HERO_MODE_ATTACK && (unsigned int)(q->moby->prev_seq - 0xF) < 2)) && - e->unk0 == 0 && q->anim_frame < (float)e->unk8) { + e->combo_ends == 0 && q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 2; } { @@ -1406,7 +1406,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { HeroTableRow2C *e = &D_L06_0017C3A8[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/l06/hero/update_hero_state_machine.c b/src/overlays/l06/hero/update_hero_state_machine.c index a77bf0c3e3..988e855e8c 100644 --- a/src/overlays/l06/hero/update_hero_state_machine.c +++ b/src/overlays/l06/hero/update_hero_state_machine.c @@ -324,7 +324,7 @@ void update_hero_state_machine(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/l08/hero/hero_set_state.c b/src/overlays/l08/hero/hero_set_state.c index d5b632a0cf..bb08b73c8c 100644 --- a/src/overlays/l08/hero/hero_set_state.c +++ b/src/overlays/l08/hero/hero_set_state.c @@ -1514,8 +1514,8 @@ int hero_set_state(int requested_state, int animation_request_mode) { e = &D_L08_0017C428[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1625,7 +1625,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { HeroTableRow2C *e = &D_L08_0017C428[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/l08/hero/update_hero_state_transitions.c b/src/overlays/l08/hero/update_hero_state_transitions.c index aedde760fb..5fdd0ee463 100644 --- a/src/overlays/l08/hero/update_hero_state_transitions.c +++ b/src/overlays/l08/hero/update_hero_state_transitions.c @@ -321,7 +321,7 @@ void update_hero_state_transitions(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/l11/hero/hero_set_state.c b/src/overlays/l11/hero/hero_set_state.c index 130b2a75f8..6f67260238 100644 --- a/src/overlays/l11/hero/hero_set_state.c +++ b/src/overlays/l11/hero/hero_set_state.c @@ -1397,8 +1397,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { e = &D_L11_0017C628[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1461,7 +1461,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { HeroTableRow2C *e = &D_L11_0017C628[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/l11/hero/update_hero_state_transitions.c b/src/overlays/l11/hero/update_hero_state_transitions.c index 11fa5b663e..e36638fd34 100644 --- a/src/overlays/l11/hero/update_hero_state_transitions.c +++ b/src/overlays/l11/hero/update_hero_state_transitions.c @@ -288,7 +288,7 @@ void update_hero_state_transitions(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/l12/hero/hero_set_state.c b/src/overlays/l12/hero/hero_set_state.c index 1762f4bda7..d77b6748ec 100644 --- a/src/overlays/l12/hero/hero_set_state.c +++ b/src/overlays/l12/hero/hero_set_state.c @@ -1431,8 +1431,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { e = &D_L12_0017C0A8[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1522,7 +1522,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { HeroTableRow2C *e = &D_L12_0017C0A8[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/l12/hero/update_hero_state_transitions.c b/src/overlays/l12/hero/update_hero_state_transitions.c index ed3316d162..aaafec8972 100644 --- a/src/overlays/l12/hero/update_hero_state_transitions.c +++ b/src/overlays/l12/hero/update_hero_state_transitions.c @@ -289,7 +289,7 @@ void update_hero_state_transitions(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/l14/hero/hero_set_state.c b/src/overlays/l14/hero/hero_set_state.c index 823cce6239..464fb01c9d 100644 --- a/src/overlays/l14/hero/hero_set_state.c +++ b/src/overlays/l14/hero/hero_set_state.c @@ -1256,8 +1256,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { e = &D_L14_0017C328[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1367,7 +1367,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { HeroTableRow2C *e = &D_L14_0017C328[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/l14/hero/process_hero_state_transitions.c b/src/overlays/l14/hero/process_hero_state_transitions.c index ecc39745b8..91214f828a 100644 --- a/src/overlays/l14/hero/process_hero_state_transitions.c +++ b/src/overlays/l14/hero/process_hero_state_transitions.c @@ -308,7 +308,7 @@ void process_hero_state_transitions(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/l15/hero/hero_set_state.c b/src/overlays/l15/hero/hero_set_state.c index 52a452a988..727ab6c70f 100644 --- a/src/overlays/l15/hero/hero_set_state.c +++ b/src/overlays/l15/hero/hero_set_state.c @@ -1402,8 +1402,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { e = &D_L15_0017C228[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1466,7 +1466,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { HeroTableRow2C *e = &D_L15_0017C228[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/l15/hero/update_hero_state_machine.c b/src/overlays/l15/hero/update_hero_state_machine.c index 127cf0fb45..20cb12a83f 100644 --- a/src/overlays/l15/hero/update_hero_state_machine.c +++ b/src/overlays/l15/hero/update_hero_state_machine.c @@ -302,7 +302,7 @@ void update_hero_state_machine(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/l16/hero/hero_set_state.c b/src/overlays/l16/hero/hero_set_state.c index 649990b604..919349b1c3 100644 --- a/src/overlays/l16/hero/hero_set_state.c +++ b/src/overlays/l16/hero/hero_set_state.c @@ -1698,8 +1698,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { e = &D_L16_0017C088[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1809,7 +1809,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { HeroTableRow2C *e = &D_L16_0017C088[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/l16/hero/update_hero_state_transitions.c b/src/overlays/l16/hero/update_hero_state_transitions.c index 52fb3589f6..ece6df8929 100644 --- a/src/overlays/l16/hero/update_hero_state_transitions.c +++ b/src/overlays/l16/hero/update_hero_state_transitions.c @@ -326,7 +326,7 @@ void update_hero_state_transitions(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/l17/hero/hero_set_state.c b/src/overlays/l17/hero/hero_set_state.c index 0168aa8643..5d57283b2d 100644 --- a/src/overlays/l17/hero/hero_set_state.c +++ b/src/overlays/l17/hero/hero_set_state.c @@ -1706,8 +1706,8 @@ int hero_set_state(int requested_state, int b) { e = &D_L17_0017C528[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1751,7 +1751,7 @@ int hero_set_state(int requested_state, int b) { if ((q->state.prev_control_mode == HERO_MODE_ATTACK || (q->state.prev2_control_mode == HERO_MODE_ATTACK && (unsigned int)(q->moby->prev_seq - 0xF) < 2)) && - e->unk0 == 0 && q->anim_frame < (float)e->unk8) { + e->combo_ends == 0 && q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 2; } { @@ -1843,7 +1843,7 @@ int hero_set_state(int requested_state, int b) { HeroTableRow2C *e = &D_L17_0017C528[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/l17/hero/update_hero_state_transitions.c b/src/overlays/l17/hero/update_hero_state_transitions.c index b80c049d05..c036b741ab 100644 --- a/src/overlays/l17/hero/update_hero_state_transitions.c +++ b/src/overlays/l17/hero/update_hero_state_transitions.c @@ -347,7 +347,7 @@ void update_hero_state_transitions(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/l18/hero/hero_set_state.c b/src/overlays/l18/hero/hero_set_state.c index 3bb8e17dec..47c676e46f 100644 --- a/src/overlays/l18/hero/hero_set_state.c +++ b/src/overlays/l18/hero/hero_set_state.c @@ -1556,8 +1556,8 @@ int hero_set_state(int requested_state, int animation_update_mode) { e = &D_L18_0017C628[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -1667,7 +1667,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { HeroTableRow2C *e = &D_L18_0017C628[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/l18/hero/process_hero_state_transitions.c b/src/overlays/l18/hero/process_hero_state_transitions.c index 806beed52d..6a64206d3e 100644 --- a/src/overlays/l18/hero/process_hero_state_transitions.c +++ b/src/overlays/l18/hero/process_hero_state_transitions.c @@ -325,7 +325,7 @@ void process_hero_state_transitions(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { diff --git a/src/overlays/shared/hero/hero_set_state.c b/src/overlays/shared/hero/hero_set_state.c index fbe6df1852..d26f52fde4 100644 --- a/src/overlays/shared/hero/hero_set_state.c +++ b/src/overlays/shared/hero/hero_set_state.c @@ -2319,8 +2319,8 @@ int hero_set_state(int requested_state, int b) { e = &attack_records[q->attack_record]; q->saved_item[0] = 0; k = 0; - if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->unk0 == 0 && - q->anim_frame < (float)e->unk8) { + if (q->state.prev_control_mode == HERO_MODE_ATTACK && e->combo_ends == 0 && + q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 3; } { @@ -2364,7 +2364,7 @@ int hero_set_state(int requested_state, int b) { if ((q->state.prev_control_mode == HERO_MODE_ATTACK || (q->state.prev2_control_mode == HERO_MODE_ATTACK && (unsigned int)(q->moby->prev_seq - 0xF) < 2)) && - e->unk0 == 0 && q->anim_frame < (float)e->unk8) { + e->combo_ends == 0 && q->anim_frame < (float)e->chain_before_frame) { k = (e->kind + 1) % 2; } { @@ -2456,7 +2456,7 @@ int hero_set_state(int requested_state, int b) { HeroTableRow2C *e = &attack_records[p->attack_record]; int k = e->kind; int n; - if (e->unk0 == 1) + if (e->combo_ends == 1) k = 2; n = scale_game_frames(5); set_hero_animation(k + 0x27, 5, (float)n); diff --git a/src/overlays/shared/hero/hero_switch_item.c b/src/overlays/shared/hero/hero_switch_item.c index 1699a2b17d..ad2aa8c11e 100644 --- a/src/overlays/shared/hero/hero_switch_item.c +++ b/src/overlays/shared/hero/hero_switch_item.c @@ -2938,7 +2938,7 @@ void update_hero_target_speed_from_stick(void) { return; } if (0.0f < hero.target_speed) { - if (hero.target_speed < hero_speed_steps[0].unkC) + if (hero.target_speed < hero_speed_steps[0].step_up_speed) hero.target_speed = hero_speed_steps[0].target_speed * frame_time; else hero.target_speed = hero_speed_steps[1].target_speed * frame_time; diff --git a/src/overlays/shared/hero/hero_update_transitions.c b/src/overlays/shared/hero/hero_update_transitions.c index 070327576c..de4fe2ea60 100644 --- a/src/overlays/shared/hero/hero_update_transitions.c +++ b/src/overlays/shared/hero/hero_update_transitions.c @@ -347,7 +347,7 @@ void hero_update_transitions(void) { if (rec->use_state_40 != 0) { hero_set_state(HERO_STATE_FIDGET, 1); } else { - set_hero_animation(rec->unk48, 0, scale_game_frames(0xC)); + set_hero_animation(rec->anim, 0, scale_game_frames(0xC)); } } } else if (hero.anim_flags & 2) { @@ -874,7 +874,7 @@ void hero_update_transitions(void) { hero_set_state(HERO_STATE_JUMP, 1); break; } - if (hero.target_speed > hero_speed_steps[0].unkC && + if (hero.target_speed > hero_speed_steps[0].step_up_speed && fast_difference_between_rotations( hero.motion.move_yaw, hero.motion.rot.f[2]) < 1.0471976f && hero_speed_steps[1].target_speed * frame_time * 0.85f < @@ -2062,7 +2062,7 @@ void hero_update_transitions(void) { configure_hero_point_effect_emission(0.016f, 0.002f, 5, 2, 0, 1); break; } - if (hero.target_speed > hero_speed_steps[0].unkC && + if (hero.target_speed > hero_speed_steps[0].step_up_speed && fast_difference_between_rotations(hero.motion.move_yaw, hero.motion.rot.f[2]) < 1.5707964f) { if (hero.on_ice_ground != 0 || hero.wading != 0) { @@ -2078,7 +2078,7 @@ void hero_update_transitions(void) { configure_hero_point_effect_emission(0.016f, 0.002f, 5, 2, 1, 0); break; } - if (hero_speed_steps[0].unkC < hero.target_speed) { + if (hero_speed_steps[0].step_up_speed < hero.target_speed) { if (hero.on_ice_ground != 0 || hero.wading != 0) { hero_set_state(HERO_STATE_RUN, 1); break; @@ -2354,7 +2354,7 @@ void hero_update_transitions(void) { if (hero.on_slip_ground == 0 && hero.move_lock_timer == 0) { if (pad_pressed_within(0x40, scale_game_frames(8), 0)) { if (hero.air_frames.s < scale_game_frames(4)) { - if (hero.target_speed > hero_speed_steps[0].unkC && + if (hero.target_speed > hero_speed_steps[0].step_up_speed && fast_difference_between_rotations(hero.motion.move_yaw, hero.motion.rot.f[2]) < 1.0471976f && @@ -2651,7 +2651,7 @@ void hero_update_transitions(void) { if (scale_game_frames(1) < hero.rail_land_frames) { hero.camera_mode = 0; stick_target(0, 1.0f); - if (hero.target_speed > hero_speed_steps[0].unkC && + if (hero.target_speed > hero_speed_steps[0].step_up_speed && hero.stick_magnitude > 0.5f && hero.on_slip_ground == 0 && hero.move_lock_timer == 0 && fast_difference_between_rotations(hero.motion.move_yaw, @@ -3056,7 +3056,7 @@ void hero_update_transitions(void) { if (scale_game_frames(1) < hero.rail_land_frames) { hero.camera_mode = 0; stick_target(0, 1.0f); - if (hero.target_speed > hero_speed_steps[0].unkC && + if (hero.target_speed > hero_speed_steps[0].step_up_speed && hero.stick_magnitude > 0.5f && hero.move_lock_timer == 0 && fast_difference_between_rotations(hero.motion.move_yaw, hero.motion.rot.f[2]) < 1.5707964f) { From 5d66156550aad77940b22735dbbf108fa50d32bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:40:33 +0000 Subject: [PATCH 111/213] decomp: name the level camera transition kind, blend rates and orbit frames --- .../rnc/overlay/shared/camera/level_camera.h | 8 +++--- .../shared/camera/hero_aligned_camera.c | 28 +++++++++---------- src/overlays/shared/camera/orbit_camera.c | 6 ++-- src/overlays/shared/camera/scripted_camera.c | 12 ++++---- .../shared/camera/target_tracking_camera.c | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/include/rnc/overlay/shared/camera/level_camera.h b/include/rnc/overlay/shared/camera/level_camera.h index e01a28c360..5627a155a1 100644 --- a/include/rnc/overlay/shared/camera/level_camera.h +++ b/include/rnc/overlay/shared/camera/level_camera.h @@ -41,13 +41,13 @@ typedef struct LevelCamera { u8 pad264[0xc]; s16 transition_mode; /* 0x270: GameCamera.transition_mode */ u8 pad272[0x1]; - u8 unk273; /* 0x273 */ + u8 transition_requested_kind; /* 0x273: CameraTransition.requested_kind (CAMERA_TRANSITION_KIND_*) */ u8 pad274[0x14]; - f32 unk288; /* 0x288 */ + f32 transition_rotation_rate; /* 0x288: CameraBlend.configured_rotation_rate */ u8 pad28C[0x8]; - f32 unk294; /* 0x294 */ + f32 transition_position_rate; /* 0x294: CameraBlend.configured_position_rate */ u8 pad298[0x5c]; - s32 unk2F4; + s32 transition_orbit_frames; /* 0x2F4: CameraOrbit.start_count, the orbit length; start_camera_blend adds one */ u8 pad2F8[0x58]; f32 rows[12]; /* 0x350: forward, right and up; the hero's input direction is turned by them */ u8 pad380[0x10]; diff --git a/src/overlays/shared/camera/hero_aligned_camera.c b/src/overlays/shared/camera/hero_aligned_camera.c index 4094a69402..e83bd43458 100644 --- a/src/overlays/shared/camera/hero_aligned_camera.c +++ b/src/overlays/shared/camera/hero_aligned_camera.c @@ -31,7 +31,7 @@ typedef struct { u8 pad0[0x180]; char *current_follow_cam; /* 0x180: struct UpdateCam * */ u8 pad184[0x270 - 0x184]; - s16 s270; + s16 transition_mode; } G680; typedef struct { @@ -82,13 +82,13 @@ typedef struct { unsigned char pad0[0x1C0]; float v1C0[4]; unsigned char pad1D0[0x270 - 0x1D0]; - short s270; + short transition_mode; unsigned char pad272; - unsigned char b273; + unsigned char transition_requested_kind; unsigned char pad274[0x288 - 0x274]; - float f288; + float transition_rotation_rate; unsigned char pad28C[0x294 - 0x28C]; - float f294; + float transition_position_rate; } Q_2ea810; typedef struct { @@ -528,9 +528,9 @@ void initialize_hero_aligned_camera_mode(void) { else shared_camera_globals->transition_mode = 2; camera_globals = &l00_camera; - camera_globals->unk273 = 0; - camera_globals->unk294 = 0.05f; - camera_globals->unk288 = 0.05f; + camera_globals->transition_requested_kind = 0; + camera_globals->transition_position_rate = 0.05f; + camera_globals->transition_rotation_rate = 0.05f; FUN_L00_002e9ef0_v(); if (camera_globals->unk254 != 0) allocate_voice_for_target_entry(0, 0, camera_globals->unk254); @@ -550,10 +550,10 @@ void select_camera_mode_by_hero_vector_alignment(A_2ea810 *camera_object) { return; } if (Q.transition_mode == 0) { - Q.unk273 = 0; + Q.transition_requested_kind = 0; camera_object->selected_camera_mode = 2; - Q.unk294 = 0.018f; - Q.unk288 = 0.018f; + Q.transition_position_rate = 0.018f; + Q.transition_rotation_rate = 0.018f; return; } comparison_axis = Q.unk1C0; @@ -577,8 +577,8 @@ void select_camera_mode_by_hero_vector_alignment(A_2ea810 *camera_object) { } } } - Q.unk273 = 0; + Q.transition_requested_kind = 0; camera_object->selected_camera_mode = 2; - Q.unk294 = 0.018f; - Q.unk288 = 0.018f; + Q.transition_position_rate = 0.018f; + Q.transition_rotation_rate = 0.018f; } diff --git a/src/overlays/shared/camera/orbit_camera.c b/src/overlays/shared/camera/orbit_camera.c index 1ce53fa84a..02adf8d71c 100644 --- a/src/overlays/shared/camera/orbit_camera.c +++ b/src/overlays/shared/camera/orbit_camera.c @@ -337,10 +337,10 @@ void select_camera_mode_by_hero_alignment_and_distance(char *camera_object) { MOBY(hero_moby)->pos.y - camera_globals->pos.f[1]); if (fast_difference_between_rotations(camera_globals->yaw, a) < 0.5585053563117981f && fast_vec_dist(&hero_data->motion.pos, &camera_globals->pos) < 8.0f) { - *(char *)&camera_globals->unk273 = 0; + *(char *)&camera_globals->transition_requested_kind = 0; *(short *)(camera_object + 0x7E) = 2; - camera_globals->unk294 = 0.018f; - camera_globals->unk288 = 0.018f; + camera_globals->transition_position_rate = 0.018f; + camera_globals->transition_rotation_rate = 0.018f; } else { *(short *)(camera_object + 0x7E) = 4; } diff --git a/src/overlays/shared/camera/scripted_camera.c b/src/overlays/shared/camera/scripted_camera.c index 93769374f0..a89f866250 100644 --- a/src/overlays/shared/camera/scripted_camera.c +++ b/src/overlays/shared/camera/scripted_camera.c @@ -150,17 +150,17 @@ void jet_end_mount(int mode) { FUN_001f9a10_2eac18(camera_position, camera_position, camera_backward_offset); *(short *)(((char *)camera_globals->current_camera) + 0x8A) = 1; } else if (mode == 2) { - *(char *)&camera_globals->unk273 = 0; + *(char *)&camera_globals->transition_requested_kind = 0; *(short *)(current_follow_camera + 0x7E) = 2; - camera_globals->unk294 = 0.018f; - camera_globals->unk288 = 0.018f; + camera_globals->transition_position_rate = 0.018f; + camera_globals->transition_rotation_rate = 0.018f; } else if (mode == 1) { *(short *)(current_follow_camera + 0x7E) = 3; } else if (mode == 4) { - *(char *)&camera_globals->unk273 = 0; + *(char *)&camera_globals->transition_requested_kind = 0; *(short *)(current_follow_camera + 0x7E) = 5; - camera_globals->unk294 = 0.018f; - camera_globals->unk288 = 0.018f; + camera_globals->transition_position_rate = 0.018f; + camera_globals->transition_rotation_rate = 0.018f; } } diff --git a/src/overlays/shared/camera/target_tracking_camera.c b/src/overlays/shared/camera/target_tracking_camera.c index d1a16e598a..0d273a04d9 100644 --- a/src/overlays/shared/camera/target_tracking_camera.c +++ b/src/overlays/shared/camera/target_tracking_camera.c @@ -345,7 +345,7 @@ void update_target_tracking_camera(char *camera_object) { qcopy(r + 0x10, camera_object + 0x10); qcopy(r + 0x20, camera_object + 0x20); initialize_target_tracking_camera(camera_object); - g->unk2F4 = scale_game_frames(0x2D); + g->transition_orbit_frames = scale_game_frames(0x2D); } done: refresh_point_light((int)camera_object); From f0c5b4568f48fb2847da63079e8a4bd344fb64f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:40:33 +0000 Subject: [PATCH 112/213] decomp: name the collision hit surface type --- include/rnc/overlay/shared/world/collision.h | 2 +- src/overlays/l02/hero/update_hero_state_motion.c | 2 +- src/overlays/l04/mobys/butterfly_swarm.c | 2 +- .../l05/hero/apply_hero_ground_material_effects.c | 2 +- .../l06/hero/update_hero_motion_for_current_state.c | 2 +- .../l12/hero/update_hero_motion_for_current_state.c | 2 +- .../l16/hero/apply_hero_ground_material_effects.c | 2 +- src/overlays/shared/hero/hero_frame_update.c | 2 +- src/overlays/shared/hero/hero_switch_item.c | 2 +- .../shared/hero/process_hero_primary_item_input.c | 2 +- .../shared/hero/update_hero_ground_contact.c | 2 +- src/overlays/shared/weapons/decoy.c | 12 ++++++------ src/overlays/shared/weapons/doom_bot.c | 4 ++-- src/overlays/shared/weapons/glove_of_doom_bomb.c | 10 +++++----- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/include/rnc/overlay/shared/world/collision.h b/include/rnc/overlay/shared/world/collision.h index 094647e099..051df583b3 100644 --- a/include/rnc/overlay/shared/world/collision.h +++ b/include/rnc/overlay/shared/world/collision.h @@ -15,7 +15,7 @@ typedef struct { u8 pad0[0x18]; s32 moby; /* 0x18: passed to get_moby_target_info (reads moby+0x34, moby+0x78); 0 when no moby was hit */ - s32 unk1C; /* 0x1C: > 0 gates copying point and the normal into the hero (shared/hero/air_accel.c) */ + s32 surface_type; /* 0x1C: hit face type word (bits 0-4 collision type, 5-6 sound class; 0x1000 | type for a moby triangle); negative for a moby primitive hit */ union { OvlQuad q; f32 f[4]; diff --git a/src/overlays/l02/hero/update_hero_state_motion.c b/src/overlays/l02/hero/update_hero_state_motion.c index 8bcafd7ba8..90f538bbad 100644 --- a/src/overlays/l02/hero/update_hero_state_motion.c +++ b/src/overlays/l02/hero/update_hero_state_motion.c @@ -429,7 +429,7 @@ void update_hero_ground_contact(void) { hero.on_flagged_ground_moby = 1; } } - if (HH.unk1C > 0) { + if (HH.surface_type > 0) { qcopy((u8 *)&hero.ground_point, &HH.point); hero.ground_z.f = HH.point.f[2]; hero.ground_distance = fast_vec_dist((u8 *)&hero.motion.pos, (u8 *)&hero.ground_point); diff --git a/src/overlays/l04/mobys/butterfly_swarm.c b/src/overlays/l04/mobys/butterfly_swarm.c index 72bf8cf389..47b341c854 100644 --- a/src/overlays/l04/mobys/butterfly_swarm.c +++ b/src/overlays/l04/mobys/butterfly_swarm.c @@ -250,7 +250,7 @@ void steer_child_moby( ray_start.z = ray_start.z + 1.5f; ray_end.z = 0.01f; if (collision_line(&ray_start, &ray_end, 2, moby, 0) != 0) { - if (coll_hit.unk1C > 0 && coll_hit.point.f[2] > moby->pos.z) { + if (coll_hit.surface_type > 0 && coll_hit.point.f[2] > moby->pos.z) { qcopy(&surface_normal, &coll_hit.normal_x); length = fast_arc_tan(coll_hit.normal_z, vector_length_xy(&coll_hit.normal_x)); set_vector_length_xy(&surface_normal, &surface_normal, 1.0f); diff --git a/src/overlays/l05/hero/apply_hero_ground_material_effects.c b/src/overlays/l05/hero/apply_hero_ground_material_effects.c index ef0c0c8330..027ab95bba 100644 --- a/src/overlays/l05/hero/apply_hero_ground_material_effects.c +++ b/src/overlays/l05/hero/apply_hero_ground_material_effects.c @@ -274,7 +274,7 @@ void update_hero_ground_contact(void) { hero.on_flagged_ground_moby = 1; } } - if (HH.unk1C > 0) { + if (HH.surface_type > 0) { qcopy((u8 *)&hero.ground_point, &HH.point); hero.ground_z.f = HH.point.f[2]; hero.ground_distance = fast_vec_dist((u8 *)&hero.motion.pos, (u8 *)&hero.ground_point); diff --git a/src/overlays/l06/hero/update_hero_motion_for_current_state.c b/src/overlays/l06/hero/update_hero_motion_for_current_state.c index 4cc94ec78f..70cc34933a 100644 --- a/src/overlays/l06/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l06/hero/update_hero_motion_for_current_state.c @@ -503,7 +503,7 @@ void update_hero_ground_contact(void) { hero_lui.on_flagged_ground_moby = 1; } } - if (HH.unk1C > 0) { + if (HH.surface_type > 0) { qcopy((u8 *)&hero_lui + 0x2A0, &HH.point); hero_lui.ground_z.f = HH.point.f[2]; hero_lui.ground_distance = fast_vec_dist((u8 *)&hero_lui + 0x80, ((u8 *)&hero_lui + 0x2A0)); diff --git a/src/overlays/l12/hero/update_hero_motion_for_current_state.c b/src/overlays/l12/hero/update_hero_motion_for_current_state.c index 17378c75eb..48536c5b98 100644 --- a/src/overlays/l12/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l12/hero/update_hero_motion_for_current_state.c @@ -303,7 +303,7 @@ void update_hero_ground_contact_and_gravity(void) { hero.on_flagged_ground_moby = 1; } } - if (D_L12_001742C0_lui.unk1C > 0) { + if (D_L12_001742C0_lui.surface_type > 0) { qcopy((u8 *)&hero.ground_point, &D_L12_001742C0_lui.point); hero.ground_z.f = D_L12_001742C0_lui.point.f[2]; hero.ground_distance = fast_vec_dist((u8 *)&hero.motion.pos, (u8 *)&hero.ground_point); diff --git a/src/overlays/l16/hero/apply_hero_ground_material_effects.c b/src/overlays/l16/hero/apply_hero_ground_material_effects.c index 49bfebe5db..ac4270a98e 100644 --- a/src/overlays/l16/hero/apply_hero_ground_material_effects.c +++ b/src/overlays/l16/hero/apply_hero_ground_material_effects.c @@ -285,7 +285,7 @@ void update_hero_ground_contact(void) { hero.on_flagged_ground_moby = 1; } } - if (HH.unk1C > 0) { + if (HH.surface_type > 0) { qcopy((u8 *)&hero.ground_point, &HH.point); hero.ground_z.f = HH.point.f[2]; hero.ground_distance = fast_vec_dist((u8 *)&hero.motion.pos, (u8 *)&hero.ground_point); diff --git a/src/overlays/shared/hero/hero_frame_update.c b/src/overlays/shared/hero/hero_frame_update.c index 185ef23091..70226fca00 100644 --- a/src/overlays/shared/hero/hero_frame_update.c +++ b/src/overlays/shared/hero/hero_frame_update.c @@ -1229,7 +1229,7 @@ void update_hero_ground_contact_and_gravity(void) { hero.on_flagged_ground_moby = 1; } } - if (HH.unk1C > 0) { + if (HH.surface_type > 0) { qcopy((u8 *)&hero.ground_point, &HH.point); hero.ground_z.f = HH.point.f[2]; hero.ground_distance = fast_vec_dist((u8 *)&hero.motion.pos, (u8 *)&hero.ground_point); diff --git a/src/overlays/shared/hero/hero_switch_item.c b/src/overlays/shared/hero/hero_switch_item.c index ad2aa8c11e..37dcfb5bec 100644 --- a/src/overlays/shared/hero/hero_switch_item.c +++ b/src/overlays/shared/hero/hero_switch_item.c @@ -3425,7 +3425,7 @@ void update_hero_ground_contact_and_surface_slopes(void) { hero.on_flagged_ground_moby = 1; } } - if (HH.unk1C > 0) { + if (HH.surface_type > 0) { qcopy(&hero.ground_point, &HH.point); hero.ground_z.f = HH.point.f[2]; hero.ground_distance = fast_vec_dist(&hero.motion.pos, &hero.ground_point); diff --git a/src/overlays/shared/hero/process_hero_primary_item_input.c b/src/overlays/shared/hero/process_hero_primary_item_input.c index 56a121138e..3c86b56081 100644 --- a/src/overlays/shared/hero/process_hero_primary_item_input.c +++ b/src/overlays/shared/hero/process_hero_primary_item_input.c @@ -1856,7 +1856,7 @@ int hero_pick_help_mode(void) { velocity[2] = 0.0f; fast_vec_add(end, start, velocity); if (collision_line(start, end, 2, 0, 0) && D_L05_00174240.moby == 0 && - D_L05_00174240.unk1C != 0) { + D_L05_00174240.surface_type != 0) { CollisionHit *wall = &D_L05_00174240; if (1.2217305f < fast_arc_tan(wall->normal_z, vector_length_xy(&wall->normal_x))) { player->wall_face_yaw = diff --git a/src/overlays/shared/hero/update_hero_ground_contact.c b/src/overlays/shared/hero/update_hero_ground_contact.c index f8747044ec..8d5ea2c4d8 100644 --- a/src/overlays/shared/hero/update_hero_ground_contact.c +++ b/src/overlays/shared/hero/update_hero_ground_contact.c @@ -174,7 +174,7 @@ void update_hero_ground_contact(void) { hero.on_flagged_ground_moby = 1; } } - if (HH.unk1C > 0) { + if (HH.surface_type > 0) { qcopy(&hero.ground_point, &HH.point); hero.ground_z.f = HH.point.f[2]; hero.ground_distance = fast_vec_dist(&hero.motion.pos, &hero.ground_point); diff --git a/src/overlays/shared/weapons/decoy.c b/src/overlays/shared/weapons/decoy.c index a954ec8394..537211051c 100644 --- a/src/overlays/shared/weapons/decoy.c +++ b/src/overlays/shared/weapons/decoy.c @@ -410,7 +410,7 @@ s32 predict_thrown_moby_landing(ThrowVars *throw_vars, struct Moby *thrown_moby, q.f[2] = predicted_position.f[2]; if (collision_line(&q, &predicted_position, 0x10, hero.moby, 0) && (collision_hit_material() || 0.0f < predicted_velocity.f[2])) { - if (coll_hit.moby != 0 && coll_hit.unk1C <= 0) { + if (coll_hit.moby != 0 && coll_hit.surface_type <= 0) { if (((struct Moby *)coll_hit.moby != hero.moby && (struct Moby *)coll_hit.moby != throw_vars->holder) || prediction_countdown < scale_game_frames(300) - scale_game_frames(10)) { @@ -421,7 +421,7 @@ s32 predict_thrown_moby_landing(ThrowVars *throw_vars, struct Moby *thrown_moby, fast_vec_add(&ground_probe_position, &ground_probe_position, &throw_vars->landing); probe_ground_height(&ground_probe_position, 0, 0.5f); } - } else if (coll_hit.unk1C > 0) { + } else if (coll_hit.surface_type > 0) { qcopy(&throw_vars->landing, &coll_hit.point); found = 1; } @@ -436,7 +436,7 @@ s32 predict_thrown_moby_landing(ThrowVars *throw_vars, struct Moby *thrown_moby, continue; if (!collision_hit_material() && 0.0f < predicted_velocity.f[2]) continue; - if (coll_hit.moby != 0 && coll_hit.unk1C <= 0) { + if (coll_hit.moby != 0 && coll_hit.surface_type <= 0) { if (((struct Moby *)coll_hit.moby == hero.moby || (struct Moby *)coll_hit.moby == throw_vars->holder) && !(prediction_countdown < scale_game_frames(300) - scale_game_frames(10))) @@ -447,7 +447,7 @@ s32 predict_thrown_moby_landing(ThrowVars *throw_vars, struct Moby *thrown_moby, fast_vec_add(&ground_probe_position, &ground_probe_position, &throw_vars->landing); probe_ground_height(&ground_probe_position, 0, 0.5f); break; - } else if (coll_hit.unk1C > 0) { + } else if (coll_hit.surface_type > 0) { qcopy(&throw_vars->landing, &coll_hit.point); break; } @@ -660,7 +660,7 @@ void decoy_update(char *moby) { reflect_vector(&decoy_instance_vars->velocity, &decoy_instance_vars->velocity, &coll_hit.normal_x); - if (coll_hit.moby != 0 && coll_hit.unk1C <= 0) + if (coll_hit.moby != 0 && coll_hit.surface_type <= 0) FUN_001ff300_2c4380( 1.05f, &decoy_instance_vars->velocity, &decoy_instance_vars->velocity); else @@ -676,7 +676,7 @@ void decoy_update(char *moby) { FUN_001ff408_2c4380(&coll_hit.normal_x)); if (angle < 0.61086524f) { ++decoy_instance_vars->timer; - if (coll_hit.moby == 0 || coll_hit.unk1C > 0 || + if (coll_hit.moby == 0 || coll_hit.surface_type > 0 || decoy_instance_vars->timer > FUN_001fef20_2c4380(240)) { if (((u8 *)moby)[0x53] != 1) blend_moby_animation(moby, 1, 0, FUN_001fef20_2c4380(10)); diff --git a/src/overlays/shared/weapons/doom_bot.c b/src/overlays/shared/weapons/doom_bot.c index fe3c00467d..17a366cf84 100644 --- a/src/overlays/shared/weapons/doom_bot.c +++ b/src/overlays/shared/weapons/doom_bot.c @@ -265,12 +265,12 @@ void doom_bot_update(struct Moby *moby) { fast_dec_timer(&doom_bot_vars->timer); qcopy(&doom_bot_vars->previous_position, &moby->pos); if (probe_moby_raised_sphere_collision((char *)moby, 5, 0)) { - if (coll_hit.moby && coll_hit.unk1C < 0 && + if (coll_hit.moby && coll_hit.surface_type < 0 && (((struct Moby *)coll_hit.moby)->flags & 0x1000) && ((struct Moby *)coll_hit.moby)->pclass && ((struct Moby *)coll_hit.moby)->pclass->type == 5) { moby->state = DOOM_BOT_DETONATE; - } else if (!coll_hit.moby || coll_hit.unk1C < 0) { + } else if (!coll_hit.moby || coll_hit.surface_type < 0) { z = moby->pos.z; qcopy_nc(&moby->pos, coll_hit.pad30); if (absolute_float(moby->pos.z - z) > 0.6f) diff --git a/src/overlays/shared/weapons/glove_of_doom_bomb.c b/src/overlays/shared/weapons/glove_of_doom_bomb.c index 2cbb38dc67..d43b0fdfcf 100644 --- a/src/overlays/shared/weapons/glove_of_doom_bomb.c +++ b/src/overlays/shared/weapons/glove_of_doom_bomb.c @@ -124,7 +124,7 @@ s32 predict_doom_bot_spawner_landing(ThrowVars *throw_vars, struct Moby *thrown_ q.f[2] = simulated_position.f[2]; if (collision_line_2c8440(&q, &simulated_position, 0x10, hero.moby, 0) && (FUN_001f0b58_2c8440() || 0.0f < simulated_velocity.f[2])) { - if (coll_hit.moby != 0 && coll_hit.unk1C <= 0) { + if (coll_hit.moby != 0 && coll_hit.surface_type <= 0) { if (((struct Moby *)coll_hit.moby != hero.moby && (struct Moby *)coll_hit.moby != throw_vars->holder) || prediction_timer < scale_game_frames(300) - scale_game_frames(10)) { @@ -136,7 +136,7 @@ s32 predict_doom_bot_spawner_landing(ThrowVars *throw_vars, struct Moby *thrown_ &landing_probe_position, &landing_probe_position, &throw_vars->landing); probe_ground_height(&landing_probe_position, 0, 0.5f); } - } else if (coll_hit.unk1C > 0) { + } else if (coll_hit.surface_type > 0) { qcopy(&throw_vars->landing, &coll_hit.point); found = 1; } @@ -151,7 +151,7 @@ s32 predict_doom_bot_spawner_landing(ThrowVars *throw_vars, struct Moby *thrown_ continue; if (!FUN_001f0b58_2c8440() && 0.0f < simulated_velocity.f[2]) continue; - if (coll_hit.moby != 0 && coll_hit.unk1C <= 0) { + if (coll_hit.moby != 0 && coll_hit.surface_type <= 0) { if (((struct Moby *)coll_hit.moby == hero.moby || (struct Moby *)coll_hit.moby == throw_vars->holder) && !(prediction_timer < scale_game_frames(300) - scale_game_frames(10))) @@ -163,7 +163,7 @@ s32 predict_doom_bot_spawner_landing(ThrowVars *throw_vars, struct Moby *thrown_ &landing_probe_position, &landing_probe_position, &throw_vars->landing); probe_ground_height(&landing_probe_position, 0, 0.5f); break; - } else if (coll_hit.unk1C > 0) { + } else if (coll_hit.surface_type > 0) { qcopy(&throw_vars->landing, &coll_hit.point); break; } @@ -315,7 +315,7 @@ void doom_bot_spawner_update(struct Moby *thrown_moby) { settle: settled = (u16)spawner_throw_vars->timer + 1; spawner_throw_vars->timer = settled; - if (!coll_hit.moby || coll_hit.unk1C > 0 || + if (!coll_hit.moby || coll_hit.surface_type > 0 || (settled_frames = (s16)settled, scale_game_frames(240) < settled_frames)) { thrown_moby->state = THROWN_MOBY_STATE_SPAWN_SEQUENCE; spawner_throw_vars->timer = 0; From 86b7c86806026bf55c61ae50fadefabc3062d4af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:40:33 +0000 Subject: [PATCH 113/213] decomp: name the hero grapple target swing flag --- include/rnc/hero/hero.h | 10 +++++----- src/check/hero_layout_check.c | 2 +- src/overlays/shared/weapons/swingshot.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index 254c407250..3f615267fb 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -580,11 +580,11 @@ struct Hero { f32 target_arrival_frames; /* 0x96C */ f32 grapple_target_dist; /* 0x970 */ s32 grapple_pull_ending; /* 0x974 */ - s32 unk978; /* 0x978 */ - f32 tether_radius; /* 0x97C */ - f32 grapple_target_radius; /* 0x980 */ - f32 swing_max_range; /* 0x984 */ - s32 swingshot_missed; /* 0x988 */ + s32 grapple_target_swings; /* 0x978: target pvars +8; nonzero swings around it (HERO_STATE_CONSTRAIN_TO_TARGET_RADIUS), else pulls to it */ + f32 tether_radius; /* 0x97C */ + f32 grapple_target_radius; /* 0x980 */ + f32 swing_max_range; /* 0x984 */ + s32 swingshot_missed; /* 0x988 */ u8 pad_98C[0x4]; struct Moby *swing_target; /* 0x990 */ struct Moby *swing_target_moby; /* 0x994 */ diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index 5966568042..6814a40aa9 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -571,4 +571,4 @@ HERO_OFFSET_CHECK(trick_hud_handle, 0x880); HERO_OFFSET_CHECK(unk890, 0x890); HERO_OFFSET_CHECK(unk17B0, 0x17B0); HERO_OFFSET_CHECK(saved_pos_rot, 0x1D00); -HERO_OFFSET_CHECK(unk978, 0x978); +HERO_OFFSET_CHECK(grapple_target_swings, 0x978); diff --git a/src/overlays/shared/weapons/swingshot.c b/src/overlays/shared/weapons/swingshot.c index e2b2487d25..6e8a4870e1 100644 --- a/src/overlays/shared/weapons/swingshot.c +++ b/src/overlays/shared/weapons/swingshot.c @@ -334,7 +334,7 @@ void swingshot_update(Moby *m) { m->state = 6; } else { allocate_voice_for_target_entry(2, 0, m); - if (hero.unk978) + if (hero.grapple_target_swings) hero_set_state(0x26, 1); else hero_set_state(0x25, 1); @@ -659,7 +659,7 @@ child_ready:; m[0x20] = 6; } else { allocate_voice_for_target_entry(2, 0, m); - if (hero.unk978 != 0) + if (hero.grapple_target_swings != 0) hero_set_state(38, 1); else hero_set_state(37, 1); From 32fe4f65bbb52a3192ed38246c114a1ddc5c4c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:40:33 +0000 Subject: [PATCH 114/213] decomp: name the red ship spline and offset, frog, scoutbot beam and smoke vent puff fields --- src/overlays/l02/mobys/smoke_vent.c | 13 +++++---- src/overlays/l03/mobys/red_ship_1.c | 30 +++++++++---------- src/overlays/shared/enemies/frog.c | 10 +++---- src/overlays/shared/enemies/scoutbot.c | 40 +++++++++++++------------- 4 files changed, 47 insertions(+), 46 deletions(-) diff --git a/src/overlays/l02/mobys/smoke_vent.c b/src/overlays/l02/mobys/smoke_vent.c index fa8612d49e..9c04ef052c 100644 --- a/src/overlays/l02/mobys/smoke_vent.c +++ b/src/overlays/l02/mobys/smoke_vent.c @@ -121,7 +121,7 @@ typedef struct SmokeVentVars { u8 pad_1[0xBF]; s32 timer_C0; s32 timer_C4; - s32 unkC8; + s32 first_puff_interval; /* 0xC8: base frames for the first puff, toggled between 10 and 30 */ } SmokeVentVars; /* Moby class 1479 */ @@ -299,10 +299,10 @@ void smoke_vent_update(struct Moby *moby) { break; case SMOKE_VENT_STATE_ALTERNATING_PUFF_TIMING: if (fast_dec_timer(&smoke_vent_vars->timer_C4) != 0) { - if (smoke_vent_vars->unkC8 < 21) { - smoke_vent_vars->unkC8 = 30; + if (smoke_vent_vars->first_puff_interval < 21) { + smoke_vent_vars->first_puff_interval = 30; } else { - smoke_vent_vars->unkC8 = 10; + smoke_vent_vars->first_puff_interval = 10; } smoke_vent_vars->timer_C4 = truncate_float_to_s32(scale_time(random_float_between(120.0f, 180.0f))); @@ -415,8 +415,9 @@ void smoke_vent_update(struct Moby *moby) { color_b2_puff = fast_tween_color(l02_alternating_smoke_puff_second_color_tween_start, l02_alternating_smoke_puff_second_color_tween_end, random_float_between(0.0f, 1.0f)); - time_a2_puff = truncate_float_to_s32( - scale_time((f32) * &smoke_vent_vars->unkC8 * random_float_between(0.0f, 1.0f) + 1.0f)); + time_a2_puff = truncate_float_to_s32(scale_time( + (f32) * &smoke_vent_vars->first_puff_interval * random_float_between(0.0f, 1.0f) + + 1.0f)); time_b2_puff = truncate_float_to_s32( scale_time((f32)alternating_smoke_puff_second_timing_base_gp * (random_float_between(-alternating_smoke_puff_timing_variation_fraction_gp, diff --git a/src/overlays/l03/mobys/red_ship_1.c b/src/overlays/l03/mobys/red_ship_1.c index ec05a97426..e4b952296f 100644 --- a/src/overlays/l03/mobys/red_ship_1.c +++ b/src/overlays/l03/mobys/red_ship_1.c @@ -518,8 +518,8 @@ typedef struct RedShip1Vars { f32 prev_spline_position[4]; u8 pad_F0[0x10]; f32 segment_t; - f32 unk104; - f32 unk108; + f32 spline_tension; /* 0x104: compute_path_node_tangent tension */ + f32 spline_bias; /* 0x108: compute_path_node_tangent bias */ f32 speed; u8 pad_110[0x4]; f32 roll_spring_velocity; @@ -533,8 +533,8 @@ typedef struct RedShip1Vars { f32 speed_oscillation_amplitude; f32 speed_oscillation_rate_degrees; f32 speed_oscillation_phase; - f32 unk140; - f32 unk144; + f32 lateral_offset; /* 0x140: along the moby's side axis; above 500 it becomes a random +-value/1000 */ + f32 vertical_offset; /* 0x144: along the moby's up axis, same encoding */ u8 pad_148[0x2]; s16 respawn_timer; u8 pad_14C[0x4]; @@ -631,13 +631,13 @@ void red_ship_1_update(char *moby) { ((unsigned char *)moby)[0x30] = 0xFF; spline_moby_pvars->unk2B = 1; spline_moby_pvars->unk2C = 0x25; - if (spline_moby_pvars->unk140 > 500.0f) { - spline_moby_pvars->unk140 = - random_float_between(-1.0f, 1.0f) * spline_moby_pvars->unk140 / 1000.0f; + if (spline_moby_pvars->lateral_offset > 500.0f) { + spline_moby_pvars->lateral_offset = + random_float_between(-1.0f, 1.0f) * spline_moby_pvars->lateral_offset / 1000.0f; } - if (spline_moby_pvars->unk144 > 500.0f) { - spline_moby_pvars->unk144 = - random_float_between(-1.0f, 1.0f) * spline_moby_pvars->unk144 / 1000.0f; + if (spline_moby_pvars->vertical_offset > 500.0f) { + spline_moby_pvars->vertical_offset = + random_float_between(-1.0f, 1.0f) * spline_moby_pvars->vertical_offset / 1000.0f; } if (*(int *)(pm + 0x14) == -1) { MOBY(moby)->state = RED_SHIP_WAIT_FOR_PATH; @@ -673,8 +673,8 @@ void red_ship_1_update(char *moby) { compute_path_node_tangent(initial_path_tangent, (int *)pm, 0, - spline_moby_pvars->unk104, - spline_moby_pvars->unk108); + spline_moby_pvars->spline_tension, + spline_moby_pvars->spline_bias); *(OvlQuad *)&spline_moby_pvars->segment_start[0] = *(OvlQuad *)&spline_moby_pvars->segment_end[0] = *(OvlQuad *)(*(char **)(pm + 0x10) + *(int *)pm * 0x10 + 0x10); @@ -699,7 +699,7 @@ void red_ship_1_update(char *moby) { *(OvlQuad *)&spline_moby_pvars->spline_position[0] = *(OvlQuad *)&spline_moby_pvars->segment_end[0]; compute_sampled_spline_path_lengths( - pm, 0, moby, spline_moby_pvars->unk104, spline_moby_pvars->unk108); + pm, 0, moby, spline_moby_pvars->spline_tension, spline_moby_pvars->spline_bias); if (spline_moby_pvars->timer_12C > 0) { MOBY(moby)->state = RED_SHIP_WAIT_FOR_MOVEMENT_TIMER; } else { @@ -737,8 +737,8 @@ void red_ship_1_update(char *moby) { compute_path_node_tangent(path_tangent_or_moby_position, (int *)pm, 1, - spline_moby_pvars->unk104, - spline_moby_pvars->unk108); + spline_moby_pvars->spline_tension, + spline_moby_pvars->spline_bias); *(OvlQuad *)&spline_moby_pvars->segment_start[0] = *(OvlQuad *)&spline_moby_pvars->segment_end[0]; *(OvlQuad *)&spline_moby_pvars->segment_end[0] = *( diff --git a/src/overlays/shared/enemies/frog.c b/src/overlays/shared/enemies/frog.c index 552c3dda55..4354cf2fba 100644 --- a/src/overlays/shared/enemies/frog.c +++ b/src/overlays/shared/enemies/frog.c @@ -75,9 +75,9 @@ typedef struct FrogVars { f32 home_position[4]; u8 home_rotation[0x10]; u8 wander_destination[0x10]; - s16 unk240; + s16 bolt_divisor; s16 unk242; - f32 unk244; + f32 approach_stop_distance; f32 glow_animation_phase; f32 path_activation_distance_xy; u8 big_head_manipulator[0x4]; @@ -298,7 +298,7 @@ void frog_update(unsigned char *moby) { case FROG_STATE_INITIALIZE: { float wait; int spawn_count = l06_frog_frame_slot_assignment_count; - int divisor = frog_instance_vars->unk240; + int divisor = frog_instance_vars->bolt_divisor; frog_instance_vars->target_selection_frame_slot = spawn_count % 8; l06_frog_frame_slot_assignment_count = spawn_count + 1; if (divisor != 0) { @@ -316,7 +316,7 @@ void frog_update(unsigned char *moby) { frog_instance_vars->knockback.collision_z_offset = 0; frog_instance_vars->knockback.speed_approach_step = 0; frog_instance_vars->knockback.collision_radius_1024ths = 0x200; - frog_instance_vars->unk244 = wait; + frog_instance_vars->approach_stop_distance = wait; frog_instance_vars->glow_animation_phase = random_angle_radians(); frog_instance_vars->unkD0 = D_L06_00161BF0; frog_instance_vars->unk29 = 1; @@ -536,7 +536,7 @@ void frog_update(unsigned char *moby) { fast_vec_normalize(A, moby + 0xC0, frog_instance_vars->movement_speed * D_0015ED6C_gp); FUN_L06_002e9b60_c(moby, A, 1, 0.3f, 0.3f); if (path_8808(frog_instance_vars->unk1EC, &MOBY(moby)->pos, target + 0x10, D) != 0 && - fast_vec_dist(&MOBY(moby)->pos, D) < frog_instance_vars->unk244) { + fast_vec_dist(&MOBY(moby)->pos, D) < frog_instance_vars->approach_stop_distance) { near = 1; } if (frog_instance_vars->blink_countdown == 0) { diff --git a/src/overlays/shared/enemies/scoutbot.c b/src/overlays/shared/enemies/scoutbot.c index 708de11bda..2d176cc486 100644 --- a/src/overlays/shared/enemies/scoutbot.c +++ b/src/overlays/shared/enemies/scoutbot.c @@ -46,8 +46,8 @@ typedef struct ScoutbotVars { s32 target_selection_status; u8 pad1B8[0x8]; f32 home_position[4]; - f32 unk1D0[4]; - f32 unk1E0[4]; + f32 beam_bend_point_1[4]; /* beam profile point; [3] is its fraction of the beam length */ + f32 beam_bend_point_2[4]; /* second beam profile point, same layout */ u8 pad1F0[0x10]; f32 hover_height_offset; f32 vertical_bob_phase; @@ -507,15 +507,15 @@ void draw_target_beam(struct Moby *moby) { clear_u64_value(&pk.vertices[0]); pk.vertices[0].v[2] = D_L08_00161894_lui; pk.vertices[0].v[3] = 1.0f; - qcopy(&pk.vertices[1], &scoutbot_private_vars->unk1D0); - pk.vertices[1].v[0] = length * scoutbot_private_vars->unk1D0[3]; + qcopy(&pk.vertices[1], &scoutbot_private_vars->beam_bend_point_1); + pk.vertices[1].v[0] = length * scoutbot_private_vars->beam_bend_point_1[3]; pk.vertices[1].v[2] += -0.25f; pk.vertices[1].v[3] = 1.0f; clear_u64_value(&pk.vertices[2]); pk.vertices[2].v[2] = 0.0f; pk.vertices[2].v[3] = 1.0f; - qcopy(&pk.vertices[3], &scoutbot_private_vars->unk1D0); - pk.vertices[3].v[0] = length * scoutbot_private_vars->unk1D0[3]; + qcopy(&pk.vertices[3], &scoutbot_private_vars->beam_bend_point_1); + pk.vertices[3].v[0] = length * scoutbot_private_vars->beam_bend_point_1[3]; pk.vertices[3].v[2] += 0.25f; pk.vertices[3].v[3] = 1.0f; draw_geometry_quad(pk.vertices, matrix, 1); @@ -532,20 +532,20 @@ void draw_target_beam(struct Moby *moby) { } draw_geometry_quad(pk.vertices, matrix, 1); - qcopy(&pk.vertices[0], &scoutbot_private_vars->unk1D0); - pk.vertices[0].v[0] = length * scoutbot_private_vars->unk1D0[3]; + qcopy(&pk.vertices[0], &scoutbot_private_vars->beam_bend_point_1); + pk.vertices[0].v[0] = length * scoutbot_private_vars->beam_bend_point_1[3]; pk.vertices[0].v[2] += -0.25f; pk.vertices[0].v[3] = 1.0f; - qcopy(&pk.vertices[1], &scoutbot_private_vars->unk1E0); - pk.vertices[1].v[0] = length * scoutbot_private_vars->unk1E0[3]; + qcopy(&pk.vertices[1], &scoutbot_private_vars->beam_bend_point_2); + pk.vertices[1].v[0] = length * scoutbot_private_vars->beam_bend_point_2[3]; pk.vertices[1].v[2] += -0.25f; pk.vertices[1].v[3] = 1.0f; - qcopy(&pk.vertices[2], &scoutbot_private_vars->unk1D0); - pk.vertices[2].v[0] = length * scoutbot_private_vars->unk1D0[3]; + qcopy(&pk.vertices[2], &scoutbot_private_vars->beam_bend_point_1); + pk.vertices[2].v[0] = length * scoutbot_private_vars->beam_bend_point_1[3]; pk.vertices[2].v[2] += 0.25f; pk.vertices[2].v[3] = 1.0f; - qcopy(&pk.vertices[3], &scoutbot_private_vars->unk1E0); - pk.vertices[3].v[0] = length * scoutbot_private_vars->unk1E0[3]; + qcopy(&pk.vertices[3], &scoutbot_private_vars->beam_bend_point_2); + pk.vertices[3].v[0] = length * scoutbot_private_vars->beam_bend_point_2[3]; pk.vertices[3].v[2] += 0.25f; pk.vertices[3].v[3] = 1.0f; draw_geometry_quad(pk.vertices, matrix, 1); @@ -563,20 +563,20 @@ void draw_target_beam(struct Moby *moby) { } draw_geometry_quad(pk.vertices, matrix, 1); - qcopy(&pk.vertices[0], &scoutbot_private_vars->unk1E0); - pk.vertices[0].v[0] = length * scoutbot_private_vars->unk1E0[3]; + qcopy(&pk.vertices[0], &scoutbot_private_vars->beam_bend_point_2); + pk.vertices[0].v[0] = length * scoutbot_private_vars->beam_bend_point_2[3]; pk.vertices[0].v[2] += -0.25f; pk.vertices[0].v[3] = 1.0f; clear_u64_value(&pk.vertices[1]); - pk.vertices[1].v[0] = length * scoutbot_private_vars->unk1D0[3] * 3.0f; + pk.vertices[1].v[0] = length * scoutbot_private_vars->beam_bend_point_1[3] * 3.0f; pk.vertices[1].v[2] += D_L08_00161894_lui; pk.vertices[1].v[3] = 1.0f; - qcopy(&pk.vertices[2], &scoutbot_private_vars->unk1E0); - pk.vertices[2].v[0] = length * scoutbot_private_vars->unk1E0[3]; + qcopy(&pk.vertices[2], &scoutbot_private_vars->beam_bend_point_2); + pk.vertices[2].v[0] = length * scoutbot_private_vars->beam_bend_point_2[3]; pk.vertices[2].v[2] += 0.25f; pk.vertices[2].v[3] = 1.0f; clear_u64_value(&pk.vertices[3]); - pk.vertices[3].v[0] = length * scoutbot_private_vars->unk1D0[3] * 3.0f; + pk.vertices[3].v[0] = length * scoutbot_private_vars->beam_bend_point_1[3] * 3.0f; pk.vertices[3].v[2] = 0.0f; pk.vertices[3].v[3] = 1.0f; draw_geometry_quad(pk.vertices, matrix, 1); From b65533061f109553e2e6da6d90d808fbb42eb72a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:41:39 +0000 Subject: [PATCH 115/213] decomp: name the hero move and hop parameter block used by doom bots --- include/rnc/hero/hero.h | 32 +++++++++-------- src/check/hero_layout_check.c | 16 ++++----- .../shared/weapons/doom_bot_movement.c | 34 +++++++++---------- 3 files changed, 42 insertions(+), 40 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index 3f615267fb..f2bf8fb1b2 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -732,26 +732,28 @@ struct Hero { f32 stick_y; /* 0x1D24 */ u8 pad_1D28[0x68]; struct HeroEase - unk1D90; /* 0x1D90: manipulator record handed to attach_manipulator (FUN_L00_00234808) */ - u8 pad_1E40[0x70]; - s16 unk1EB0; /* 0x1EB0 */ - s16 unk1EB2; /* 0x1EB2: once flag for queueing FUN_L00_00207d40 */ - u8 pad_1EB4[0x1C]; - f32 unk1ED0; /* 0x1ED0 */ - f32 unk1ED4; /* 0x1ED4 */ - f32 unk1ED8; /* 0x1ED8 */ + unk1D90; /* 0x1D90: manipulator record handed to attach_manipulator (FUN_L00_00234808) */ + u8 pad_1E40[0x70]; + s16 unk1EB0; /* 0x1EB0 */ + s16 unk1EB2; /* 0x1EB2: once flag for queueing FUN_L00_00207d40 */ + u8 pad_1EB4[0x1C]; + /* 0x1EC0..0x1F44: the moby walk and hop parameters doom bots copy in and out + (save_state_fields_to_hero, initialize_moby_hop_trajectory) */ + f32 move_turn_velocity; /* 0x1ED0: DoomBotVars.turn_velocity */ + f32 move_speed; /* 0x1ED4: DoomBotVars.movement_speed */ + f32 unk1ED8; /* 0x1ED8 */ u8 pad_1EDC[0x8]; - f32 unk1EE4; /* 0x1EE4 */ + f32 move_turn_rate; /* 0x1EE4: DoomBotVars.turn_rate */ u8 pad_1EE8[0x20]; s32 unk1F08; /* 0x1F08 */ u8 pad_1F0C[0x4]; - Vec4 unk1F10; /* 0x1F10 */ - f32 unk1F20; /* 0x1F20 */ - f32 unk1F24; /* 0x1F24 */ - f32 unk1F28; /* 0x1F28 */ + Vec4 hop_target; /* 0x1F10: landing point */ + f32 hop_vertical_speed; /* 0x1F20: launch speed, capped at 7 * frame_time */ + f32 hop_horizontal_speed; /* 0x1F24 */ + f32 hop_heading; /* 0x1F28: atan2 toward hop_target */ u8 pad_1F2C[0x13]; - s8 unk1F3F; /* 0x1F3F */ - f32 unk1F40; /* 0x1F40 */ + s8 hop_mode; /* 0x1F3F: cleared when a hop starts */ + f32 unk1F40; /* 0x1F40 */ u8 pad_1F44[0x1C]; u8 unk1F60[0x40]; /* 0x1F60: 0x40-byte buffer cleared by FUN_L00_002b58d8 */ u8 unk1FA0[0x40]; /* 0x1FA0: 0x40-byte buffer cleared by FUN_L00_002b58d8 */ diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index 6814a40aa9..0f1b64248f 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -428,16 +428,16 @@ HERO_OFFSET_CHECK(stick_y, 0x1D24); HERO_OFFSET_CHECK(unk1D90, 0x1D90); HERO_OFFSET_CHECK(unk1EB0, 0x1EB0); HERO_OFFSET_CHECK(unk1EB2, 0x1EB2); -HERO_OFFSET_CHECK(unk1ED0, 0x1ED0); -HERO_OFFSET_CHECK(unk1ED4, 0x1ED4); +HERO_OFFSET_CHECK(move_turn_velocity, 0x1ED0); +HERO_OFFSET_CHECK(move_speed, 0x1ED4); HERO_OFFSET_CHECK(unk1ED8, 0x1ED8); -HERO_OFFSET_CHECK(unk1EE4, 0x1EE4); +HERO_OFFSET_CHECK(move_turn_rate, 0x1EE4); HERO_OFFSET_CHECK(unk1F08, 0x1F08); -HERO_OFFSET_CHECK(unk1F10, 0x1F10); -HERO_OFFSET_CHECK(unk1F20, 0x1F20); -HERO_OFFSET_CHECK(unk1F24, 0x1F24); -HERO_OFFSET_CHECK(unk1F28, 0x1F28); -HERO_OFFSET_CHECK(unk1F3F, 0x1F3F); +HERO_OFFSET_CHECK(hop_target, 0x1F10); +HERO_OFFSET_CHECK(hop_vertical_speed, 0x1F20); +HERO_OFFSET_CHECK(hop_horizontal_speed, 0x1F24); +HERO_OFFSET_CHECK(hop_heading, 0x1F28); +HERO_OFFSET_CHECK(hop_mode, 0x1F3F); HERO_OFFSET_CHECK(unk1F40, 0x1F40); HERO_OFFSET_CHECK(unk1F60, 0x1F60); HERO_OFFSET_CHECK(unk1FA0, 0x1FA0); diff --git a/src/overlays/shared/weapons/doom_bot_movement.c b/src/overlays/shared/weapons/doom_bot_movement.c index 5363738285..80b9f35aef 100644 --- a/src/overlays/shared/weapons/doom_bot_movement.c +++ b/src/overlays/shared/weapons/doom_bot_movement.c @@ -170,30 +170,30 @@ int probe_moby_raised_sphere_collision(char *moby, int b, Vx *position_override) /* Ported from rac1-decomp (src/overlays/shared/vendor_002BA7C8.c: func_L00_002BFE98), where it is exact; names translated to the US level program. */ -/* Saves the moby's position, word 0x4C and float 0x5C into ((char *)&hero) at 0x1ED0. */ +/* Saves the doom bot turn velocity, speed, words 0x48/0x4C and turn rate into the hero move parameters. */ void save_state_fields_to_hero(char *source_state) __asm__("FUN_L00_002beb90"); void save_state_fields_to_hero(char *source_state) { struct Hero *hero_state = &hero; - hero_state->unk1ED0 = *(float *)(source_state + 0x40); - hero_state->unk1ED4 = *(float *)(source_state + 0x44); + hero_state->move_turn_velocity = *(float *)(source_state + 0x40); + hero_state->move_speed = *(float *)(source_state + 0x44); hero_state->unk1ED8 = *(float *)(source_state + 0x48); hero_state->unk1F08 = *(int *)(source_state + 0x4C); - hero_state->unk1EE4 = *(float *)(source_state + 0x5C); + hero_state->move_turn_rate = *(float *)(source_state + 0x5C); } /* Ported from rac1-decomp (src/overlays/shared/vendor_002BA7C8.c: func_L00_002BFED0), where it is exact; names translated to the US level program. */ -/* Restores the moby's position, word 0x4C and float 0x5C from ((char *)&hero) at 0x1ED0. */ +/* Restores the doom bot turn velocity, speed, words 0x48/0x4C and turn rate from the hero move parameters. */ void restore_state_fields_from_hero(char *destination_state) __asm__("FUN_L00_002bebc8"); void restore_state_fields_from_hero(char *destination_state) { struct Hero *hero_state = &hero; - *(float *)(destination_state + 0x40) = hero_state->unk1ED0; - *(float *)(destination_state + 0x44) = hero_state->unk1ED4; + *(float *)(destination_state + 0x40) = hero_state->move_turn_velocity; + *(float *)(destination_state + 0x44) = hero_state->move_speed; *(float *)(destination_state + 0x48) = hero_state->unk1ED8; *(int *)(destination_state + 0x4C) = hero_state->unk1F08; - *(float *)(destination_state + 0x5C) = hero_state->unk1EE4; + *(float *)(destination_state + 0x5C) = hero_state->move_turn_rate; } /* Ported from rac1-decomp (src/overlays/shared/vendor_002BA7C8.c: func_L00_002BFF08), where it is exact; names translated to the US level program. */ @@ -203,12 +203,12 @@ void save_state_vector_and_fields_to_hero(char *source_state) __asm__("FUN_L00_0 void save_state_vector_and_fields_to_hero(char *source_state) { struct Hero *hero_state = &hero; - hero_state->unk1F20 = *(float *)(source_state + 0x50); - hero_state->unk1F24 = *(float *)(source_state + 0x54); - hero_state->unk1F28 = *(float *)(source_state + 0x58); - hero_state->unk1F3F = *(char *)(source_state + 0x68); + hero_state->hop_vertical_speed = *(float *)(source_state + 0x50); + hero_state->hop_horizontal_speed = *(float *)(source_state + 0x54); + hero_state->hop_heading = *(float *)(source_state + 0x58); + hero_state->hop_mode = *(char *)(source_state + 0x68); hero_state->unk1F40 = *(float *)(source_state + 0x44); - qcopy(&hero_state->unk1F10, source_state); + qcopy(&hero_state->hop_target, source_state); } /* Ported from rac1-decomp (src/overlays/shared/vendor_002BA7C8.c: func_L00_002BFF50), where it is exact; names translated to the US level program. */ @@ -218,10 +218,10 @@ void restore_saved_state_fields_from_hero(char *destination_state) __asm__("FUN_ void restore_saved_state_fields_from_hero(char *destination_state) { struct Hero *hero_state = &hero; - *(float *)(destination_state + 0x50) = hero_state->unk1F20; - *(float *)(destination_state + 0x54) = hero_state->unk1F24; - *(float *)(destination_state + 0x58) = hero_state->unk1F28; - *(char *)(destination_state + 0x68) = hero_state->unk1F3F; + *(float *)(destination_state + 0x50) = hero_state->hop_vertical_speed; + *(float *)(destination_state + 0x54) = hero_state->hop_horizontal_speed; + *(float *)(destination_state + 0x58) = hero_state->hop_heading; + *(char *)(destination_state + 0x68) = hero_state->hop_mode; *(float *)(destination_state + 0x44) = hero_state->unk1F40; } From 67edb4564e19adf095c1d05bc0066b92d50028d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:42:22 +0000 Subject: [PATCH 116/213] decomp: name the enemy hurt flag in the sentrybot, paratrooper and amoeboid pvars --- src/overlays/shared/enemies/blarg_paratrooper.c | 6 +++--- src/overlays/shared/enemies/large_amoeboid.c | 6 +++--- src/overlays/shared/enemies/sentrybot.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/overlays/shared/enemies/blarg_paratrooper.c b/src/overlays/shared/enemies/blarg_paratrooper.c index 79d1f06c1b..e280d885fa 100644 --- a/src/overlays/shared/enemies/blarg_paratrooper.c +++ b/src/overlays/shared/enemies/blarg_paratrooper.c @@ -48,7 +48,7 @@ typedef struct Paratrooper302618 { u8 pad2A[0x4]; unsigned char removal_status; u8 pad2F[0x9]; - s32 unk38; + s32 hurt; /* 0x38: set when the moby is hit, cleared once handled */ u8 pad3C[0x1c]; unsigned char f58; u8 pad59[0x1]; @@ -768,11 +768,11 @@ void update_blarg_paratrooper_damage_and_state(char *moby) { MOBY(moby)->hit_slot = 0xff; update_hit_color_flash(moby, ¶trooper_instance_state->hit_flash); - if (paratrooper_instance_state->unk38 != 0) { + if (paratrooper_instance_state->hurt != 0) { angle = random_float_between(180.0f, 240.0f); angle = scale_time(angle); paratrooper_instance_state->target_range_boost_timer = (short)truncate_float_to_s32(angle); - paratrooper_instance_state->unk38 = 0; + paratrooper_instance_state->hurt = 0; } fast_dec_timer_s16((short *)(¶trooper_instance_state->target_range_boost_timer)); if (paratrooper_instance_state->target_range_boost_timer != 0) diff --git a/src/overlays/shared/enemies/large_amoeboid.c b/src/overlays/shared/enemies/large_amoeboid.c index eeaeda9c11..53e163bdaa 100644 --- a/src/overlays/shared/enemies/large_amoeboid.c +++ b/src/overlays/shared/enemies/large_amoeboid.c @@ -50,7 +50,7 @@ typedef struct LargeAmoeboidVars { u8 pad2A[0x6]; f32 unk30; u8 pad34[0x4]; - s32 unk38; + s32 hurt; /* 0x38: set when the moby is hit, cleared once handled */ u8 pad3C[0x4]; u8 move_displacement[0x18]; s8 unk58; @@ -820,9 +820,9 @@ void process_amoeboid_hits_and_update_targeting(char *moby) { mark_moby_for_removal(moby); return; } - if (moby_vars->unk38 != 0) { + if (moby_vars->hurt != 0) { moby_vars->pursuit_timer = scale_game_frames(0xF0); - moby_vars->unk38 = 0; + moby_vars->hurt = 0; } if (fast_dec_timer(&moby_vars->pursuit_timer) != 0) { moby_vars->effective_target_search_radius = moby_vars->base_target_search_radius; diff --git a/src/overlays/shared/enemies/sentrybot.c b/src/overlays/shared/enemies/sentrybot.c index 4bb8c1f47b..16318a7e4a 100644 --- a/src/overlays/shared/enemies/sentrybot.c +++ b/src/overlays/shared/enemies/sentrybot.c @@ -88,7 +88,7 @@ typedef struct SentrybotVars { u8 hit_response_class; u8 unk29; u8 pad2A[0xE]; - s32 unk38; /* 0x38: set: restart target_countdown */ + s32 hurt; /* 0x38: set when the moby is hit; restarts target_countdown */ u8 pad3C[0x24]; struct HitColorFlash hit_flash; SentrybotKnockback knockback; /* 0x70 */ @@ -1735,12 +1735,12 @@ void update_sentrybot_hit_response_and_target_visibility(void *sentrybot_moby, i update_hit_color_flash(moby, &sentrybot_data->hit_flash); if (flag != 0) return; - if (sentrybot_data->unk38 != 0) { + if (sentrybot_data->hurt != 0) { float random_target_countdown_duration; int rounded; random_target_countdown_duration = random_float_between(180.0f, 240.0f); rounded = truncate_float_to_s32(scale_time(random_target_countdown_duration)); - sentrybot_data->unk38 = 0; + sentrybot_data->hurt = 0; sentrybot_data->target_countdown = (float)rounded; } update_float_countdown(&sentrybot_data->target_countdown); From a37a778d8bd29d0111593078a39329cca0eddbf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:54:14 +0000 Subject: [PATCH 117/213] decomp: name the camera orbit length --- include/rnc/camera/camera_globals.h | 8 ++++---- include/rnc/overlay/shared/camera/level_camera.h | 2 +- src/camera/advance_alternate_camera_transition.c | 4 ++-- src/camera/start_camera_blend.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/rnc/camera/camera_globals.h b/include/rnc/camera/camera_globals.h index fe48eaecb6..f7095061a0 100644 --- a/include/rnc/camera/camera_globals.h +++ b/include/rnc/camera/camera_globals.h @@ -23,10 +23,10 @@ struct CameraBlend { /* advance_alternate_camera_transition's orbit around the focus, from orbit_angles toward the angles compute_camera_angles gives. */ struct CameraOrbit { - f32 angles[3]; /* 0x00: yaw, pitch, distance (compute_camera_angles) */ - s32 frames; /* 0x0C */ - f32 frame_step; /* 0x10: 1 / frames */ - s32 start_count; /* 0x14: counted up on each start */ + f32 angles[3]; /* 0x00: yaw, pitch, distance (compute_camera_angles) */ + s32 frames; /* 0x0C */ + f32 frame_step; /* 0x10: 1 / frames */ + s32 length; /* 0x14: orbit length from the level; start_camera_blend adds one and scales it into frames */ u8 pad_18[0x8]; f32 forward[4]; /* 0x20 */ f32 up[4]; /* 0x30 */ diff --git a/include/rnc/overlay/shared/camera/level_camera.h b/include/rnc/overlay/shared/camera/level_camera.h index 5627a155a1..ab13d4dd4a 100644 --- a/include/rnc/overlay/shared/camera/level_camera.h +++ b/include/rnc/overlay/shared/camera/level_camera.h @@ -47,7 +47,7 @@ typedef struct LevelCamera { u8 pad28C[0x8]; f32 transition_position_rate; /* 0x294: CameraBlend.configured_position_rate */ u8 pad298[0x5c]; - s32 transition_orbit_frames; /* 0x2F4: CameraOrbit.start_count, the orbit length; start_camera_blend adds one */ + s32 transition_orbit_frames; /* 0x2F4: CameraOrbit.length; start_camera_blend adds one */ u8 pad2F8[0x58]; f32 rows[12]; /* 0x350: forward, right and up; the hero's input direction is turned by them */ u8 pad380[0x10]; diff --git a/src/camera/advance_alternate_camera_transition.c b/src/camera/advance_alternate_camera_transition.c index 49d5a1ffa4..74d1960766 100644 --- a/src/camera/advance_alternate_camera_transition.c +++ b/src/camera/advance_alternate_camera_transition.c @@ -67,8 +67,8 @@ int advance_alternate_camera_transition(char *target_camera, struct CameraOrbit if (orbit->frames <= 0) { return 1; } - step = 1.0f / cosine_interpolate( - 1.0f, (f32)orbit->start_count, (f32)orbit->frames * orbit->frame_step); + step = + 1.0f / cosine_interpolate(1.0f, (f32)orbit->length, (f32)orbit->frames * orbit->frame_step); if (cam_trans_state.kind == CAMERA_TRANSITION_KIND_STORED_FOCUS_ORBIT) { qcopy(&focus_position, D_0013F3D0); qcopy(&forward_axis, orbit->forward); diff --git a/src/camera/start_camera_blend.c b/src/camera/start_camera_blend.c index 3409edc045..ee82639593 100644 --- a/src/camera/start_camera_blend.c +++ b/src/camera/start_camera_blend.c @@ -83,7 +83,7 @@ void start_camera_blend(struct UpdateCam *source) { qcopy(blend->from_rotation, blend->rotation); } else { struct CameraOrbit *orbit = &transition->orbit; - int configured_frame_count = ++orbit->start_count; + int configured_frame_count = ++orbit->length; orbit->frames = scale_game_frames(configured_frame_count); orbit->frame_step = 1.0f / convert_integer_to_float(orbit->frames); From 0a56732ff7bb39d204f6bc7e86ae49cdf6f3ab65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:48:45 +0000 Subject: [PATCH 118/213] decomp: define the save block lists mc_gamedata and mc_leveldata in C --- config/us/levels/exe_data.tsv | 19 ++++++ config/us/undefined_syms.txt | 10 +++ configure.py | 1 + include/rnc/data_labels.h | 101 ++++++++++++++-------------- include/rnc/game/item_state.h | 4 +- include/rnc/game/level_progress.h | 4 +- include/rnc/game/options.h | 1 + include/rnc/save/mc_data.h | 20 +++++- include/rnc/save/saved_globals.h | 25 +++++++ include/rnc/ui/help/help_record.h | 2 +- src/overlays/l05/mobys/help_hints.c | 25 ++----- src/save/memcard_restore_game.c | 77 +++++++++++++++++++++ 12 files changed, 213 insertions(+), 76 deletions(-) create mode 100644 include/rnc/save/saved_globals.h diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index 9299e5cb3b..30e8167a29 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -93,6 +93,7 @@ 00 00182A70 304 00 001844B0 20 00 00184538 100 +00 001845C0 960 00 001849C0 9036 00 00196CC0 64 00 00196F80 896 @@ -277,6 +278,7 @@ 01 00182EF0 304 01 00184930 20 01 001849B8 100 +01 00184A40 960 01 00184E40 9036 01 00197140 64 01 00197400 896 @@ -461,6 +463,7 @@ 02 00183070 304 02 00184AB0 20 02 00184B38 100 +02 00184BC0 960 02 00184FC0 9036 02 001972C0 64 02 00197580 896 @@ -645,6 +648,7 @@ 03 00182B70 304 03 001845B0 20 03 00184638 100 +03 001846C0 960 03 00184AC0 9036 03 00196DC0 64 03 00197080 896 @@ -829,6 +833,7 @@ 04 00182BF0 304 04 00184630 20 04 001846B8 100 +04 00184740 960 04 00184B40 9036 04 00196E40 64 04 00197100 896 @@ -1013,6 +1018,7 @@ 05 00182EF0 304 05 00184930 20 05 001849B8 100 +05 00184A40 960 05 00184E40 9036 05 00197140 64 05 00197400 896 @@ -1197,6 +1203,7 @@ 06 001831F0 304 06 00184C30 20 06 00184CB8 100 +06 00184D40 960 06 00185140 9036 06 00197440 64 06 00197700 896 @@ -1381,6 +1388,7 @@ 07 00182AF0 304 07 00184530 20 07 001845B8 100 +07 00184640 960 07 00184A40 9036 07 00196D40 64 07 00197000 896 @@ -1565,6 +1573,7 @@ 08 00183270 304 08 00184CB0 20 08 00184D38 100 +08 00184DC0 960 08 001851C0 9036 08 001974C0 64 08 00197780 896 @@ -1749,6 +1758,7 @@ 09 00182BF0 304 09 00184630 20 09 001846B8 100 +09 00184740 960 09 00184B40 9036 09 00196E40 64 09 00197100 896 @@ -1933,6 +1943,7 @@ 10 00182EF0 304 10 00184930 20 10 001849B8 100 +10 00184A40 960 10 00184E40 9036 10 00197140 64 10 00197400 896 @@ -2117,6 +2128,7 @@ 11 00183470 304 11 00184EB0 20 11 00184F38 100 +11 00184FC0 960 11 001853C0 9036 11 001976C0 64 11 00197980 896 @@ -2301,6 +2313,7 @@ 12 00182EF0 304 12 00184930 20 12 001849B8 100 +12 00184A40 960 12 00184E40 9036 12 00197140 64 12 00197400 896 @@ -2485,6 +2498,7 @@ 13 00182D70 304 13 001847B0 20 13 00184838 100 +13 001848C0 960 13 00184CC0 9036 13 00196FC0 64 13 00197280 896 @@ -2669,6 +2683,7 @@ 14 00183170 304 14 00184BB0 20 14 00184C38 100 +14 00184CC0 960 14 001850C0 9036 14 001973C0 64 14 00197680 896 @@ -2853,6 +2868,7 @@ 15 00183070 304 15 00184AB0 20 15 00184B38 100 +15 00184BC0 960 15 00184FC0 9036 15 001972C0 64 15 00197580 896 @@ -3037,6 +3053,7 @@ 16 00182EF0 304 16 00184930 20 16 001849B8 100 +16 00184A40 960 16 00184E40 9036 16 00197140 64 16 00197400 896 @@ -3221,6 +3238,7 @@ 17 00183370 304 17 00184DB0 20 17 00184E38 100 +17 00184EC0 960 17 001852C0 9036 17 001975C0 64 17 00197880 896 @@ -3405,6 +3423,7 @@ 18 00183470 304 18 00184EB0 20 18 00184F38 100 +18 00184FC0 960 18 001853C0 9036 18 001976C0 64 18 00197980 896 diff --git a/config/us/undefined_syms.txt b/config/us/undefined_syms.txt index 88e4aa77ad..b1e01eb334 100644 --- a/config/us/undefined_syms.txt +++ b/config/us/undefined_syms.txt @@ -85,3 +85,13 @@ D_001A26C0 = 0x001A26C0; D_001A28C8 = 0x001A28C8; D_001A2A08 = 0x001A2A08; D_001A2AF8 = 0x001A2AF8; +D_00141680 = 0x00141680; +D_00141720 = 0x00141720; +D_0015ED8C = 0x0015ED8C; +D_0015ED90 = 0x0015ED90; +D_0015ED94 = 0x0015ED94; +D_0015ED9C = 0x0015ED9C; +D_0015EE28 = 0x0015EE28; +D_0015EE2C = 0x0015EE2C; +D_0015EEA8 = 0x0015EEA8; +D_0015EEAC = 0x0015EEAC; diff --git a/configure.py b/configure.py index 0de3481307..78c0fe1c41 100755 --- a/configure.py +++ b/configure.py @@ -1232,6 +1232,7 @@ "ui/map/world_to_map_coords": (0x19E970, 0x9F8F0, 304), "ui/text/copy_text_to_shared_buffer": (0x19A440, 0x9B3C0, 80), "ui/menus/save_data/run_state_handler": (0x1A0438, 0xA13B8, 100), + "save/memcard_restore_game": (0x1A04C0, 0xA1440, 960), # the save block lists mc_gamedata, mc_leveldata "mobys/find_or_allocate_moby_render_slot": (0x1B2BC0, 0xB3B40, 64), "mobys/stash_moby_class_dists": (0x1B2E80, 0xB3E00, 896), "ui/menus/pause/assign_heli_pack_label_text_table": (0x1D06D0, 0xD1650, 112), diff --git a/include/rnc/data_labels.h b/include/rnc/data_labels.h index 56d5359d79..47b3aba00a 100644 --- a/include/rnc/data_labels.h +++ b/include/rnc/data_labels.h @@ -60,55 +60,56 @@ extern s32 D_0015B500[]; extern u8 D_0015B550[]; extern u8 D_0015ED58; extern float D_0015ED60_gp __attribute__((sda)); -extern int D_0015ED8C; -extern u8 D_0015EE1C; -extern u8 D_0015EE1D; -extern int D_0015EE24; -extern int D_0015EE78_gp; -extern s32 D_0015EEA0; -extern int D_0015EEA4; -extern s32 D_0015EEA8; -extern s32 D_0015EEB8; -extern s32 D_0015EEBC; -extern s32 D_0015EEC0; -extern s64 D_0015EF48; -extern s32 D_0015F5B4; -extern s32 D_0015F5B8; -extern s32 D_0015F5D0; -extern s32 D_0015F5D4; -extern s32 D_0015F638; -extern s32 D_0015F63C; -extern s32 D_0015F648; -extern s32 D_0015FF00; -extern s32 D_0015FF0C; -extern s32 D_0015FF40; -extern s32 D_00160034; -extern char D_001602A0[]; -extern char D_001602D0[]; -extern s32 D_001603F0; -extern s32 D_00160408[2] __attribute__((sda)); -extern s32 D_00160410 __attribute__((sda)); -extern s64 D_00160588; -extern char D_00160820[]; -extern char D_00160830[]; -extern s32 D_00160EBC; -extern s32 D_00160EF8[]; -extern s32 *D_00160F00_store; -extern s32 D_00160F10; -extern s32 D_00160F18; -extern s32 D_00160F1C; -extern s32 D_00161280; -extern s32 D_00161288; -extern s32 D_001940C0[]; -extern char D_00194120[]; -extern s32 D_001A03A8[]; -extern char D_001B2C00[]; -extern s32 D_001CDF80[]; -extern s32 D_001D2640[]; -extern u8 D_001D8EB0[]; -extern u8 D_001E1300[]; -extern u8 D_002169C0[]; -extern u8 D_1FF8000[]; -extern u8 D_24135F[]; +extern int D_0015ED8C __asm__("D_0015ED8C"); +extern u8 D_0015EE1C __asm__("D_0015EE1C"); +extern u8 D_0015EE1D __asm__("D_0015EE1D"); +/* Play time in frames: a save entry shows it as its time. */ +extern int D_0015EE24 __asm__("D_0015EE24"); +extern int D_0015EE78_gp; +extern s32 D_0015EEA0 __asm__("D_0015EEA0"); +extern int D_0015EEA4 __asm__("D_0015EEA4"); +extern s32 D_0015EEA8 __asm__("D_0015EEA8"); +extern s32 D_0015EEB8; +extern s32 D_0015EEBC; +extern s32 D_0015EEC0; +extern s64 D_0015EF48; +extern s32 D_0015F5B4; +extern s32 D_0015F5B8; +extern s32 D_0015F5D0; +extern s32 D_0015F5D4; +extern s32 D_0015F638; +extern s32 D_0015F63C; +extern s32 D_0015F648; +extern s32 D_0015FF00; +extern s32 D_0015FF0C; +extern s32 D_0015FF40; +extern s32 D_00160034; +extern char D_001602A0[]; +extern char D_001602D0[]; +extern s32 D_001603F0; +extern s32 D_00160408[2] __attribute__((sda)); +extern s32 D_00160410 __attribute__((sda)); +extern s64 D_00160588; +extern char D_00160820[]; +extern char D_00160830[]; +extern s32 D_00160EBC; +extern s32 D_00160EF8[]; +extern s32 *D_00160F00_store; +extern s32 D_00160F10; +extern s32 D_00160F18; +extern s32 D_00160F1C; +extern s32 D_00161280; +extern s32 D_00161288; +extern s32 D_001940C0[]; +extern char D_00194120[]; +extern s32 D_001A03A8[]; +extern char D_001B2C00[]; +extern s32 D_001CDF80[]; +extern s32 D_001D2640[]; +extern u8 D_001D8EB0[]; +extern u8 D_001E1300[]; +extern u8 D_002169C0[]; +extern u8 D_1FF8000[]; +extern u8 D_24135F[]; #endif diff --git a/include/rnc/game/item_state.h b/include/rnc/game/item_state.h index 5d33ee653e..c9e8fb9f89 100644 --- a/include/rnc/game/item_state.h +++ b/include/rnc/game/item_state.h @@ -20,13 +20,13 @@ extern u8 item_available[37] __asm__("D_0013D4C0"); #define ITEM_VENDOR_DISCOUNT 35 extern u8 item_text_variant[40] __asm__("D_0013E520"); -extern u8 D_0015EDD0[] __attribute__((sda)); +extern u8 D_0015EDD0[] __asm__("D_0015EDD0") __attribute__((sda)); extern u8 items_acquired[37] __asm__("D_0013D4E8"); /* Per-weapon totals (37 items, mc_gamedata blocks 0x3E8-0x3EA of 0x94 bytes). */ extern s32 ammo_bought_stats[37] __asm__("D_0013DD70"); extern s32 weapon_ammo_pickup_totals[37] __asm__("D_0013DE08"); extern s32 weapon_ammo_used_counts[37] __asm__("D_0013DEA0"); extern s32 pause_iop_sprite_lists[8] __asm__("D_00141EA0"); -extern s32 D_00141660; +extern s32 D_00141660 __asm__("D_00141660"); #endif /* LOMBYTE_RNC_GAME_ITEM_STATE_H */ diff --git a/include/rnc/game/level_progress.h b/include/rnc/game/level_progress.h index 673700dfde..c8769b8cf3 100644 --- a/include/rnc/game/level_progress.h +++ b/include/rnc/game/level_progress.h @@ -10,12 +10,12 @@ #define LEVEL_RECORD_COUNT 20 /* Per-level counters of the main save (mc_gamedata saves 0x50 bytes of each). */ -extern s32 D_0013D510[LEVEL_RECORD_COUNT]; +extern s32 D_0013D510[LEVEL_RECORD_COUNT] __asm__("D_0013D510"); /* Best coverage result save_map_coverage got per level (one slot per level record). */ extern s32 max_coverage_save_result_by_level[LEVEL_RECORD_COUNT] __asm__("D_0013D560"); /* Per-level counters the hero code bumps; mc_leveldata saves 4 bytes of each per level. */ extern s32 level_bolts[LEVEL_RECORD_COUNT] __asm__("D_0013DF38"); /* bolts collected per level */ -extern s32 D_0013DF88[LEVEL_RECORD_COUNT]; +extern s32 D_0013DF88[LEVEL_RECORD_COUNT] __asm__("D_0013DF88"); extern s32 hero_respawn_counts_by_level[LEVEL_RECORD_COUNT] __asm__("D_0013DFD8"); /* Explored map pages: save_map_coverage packs one 0x800-byte page per level. */ diff --git a/include/rnc/game/options.h b/include/rnc/game/options.h index 6c3330711d..2020229316 100644 --- a/include/rnc/game/options.h +++ b/include/rnc/game/options.h @@ -13,6 +13,7 @@ extern s32 music_volume __asm__("D_0015EDEC"); extern s32 sound_volume __asm__("D_0015EDF0"); extern s32 alternate_animation_sequence __asm__("D_0015EE20"); extern s32 selected_save_slot __asm__("D_0015EE34"); +extern u8 subtitles_enabled __asm__("D_0015EE40"); extern s32 boot_level_active __asm__("D_0015F5E8"); #endif /* LOMBYTE_RNC_GAME_OPTIONS_H */ diff --git a/include/rnc/save/mc_data.h b/include/rnc/save/mc_data.h index 1139b2c8a1..04d7c064de 100644 --- a/include/rnc/save/mc_data.h +++ b/include/rnc/save/mc_data.h @@ -3,7 +3,23 @@ #include "types.h" -extern u8 mc_gamedata[] __asm__("D_001A04C0"); -extern u8 mc_leveldata[] __asm__("D_001A07C0"); +/* One block of a save: SIZE bytes at DATA, stored in the file under ID + (0-37 and 1000-1011 in the main block, 3001-3008 and 4000-4002 in a + level record). + memcard_prepare_data packs each block (record SLOT at data + slot * size), + memcard_restore_data copies it back and sets restore_status (1: sizes + match, -1: the saved block is shorter, -2: longer). A null DATA ends the + list; memcard_get_data_size sums the packed size. */ +struct SaveDataBlock { + void *data; + s32 size; + s32 id; + s32 restore_status; +}; + +/* The main save block list (written once) and the per-level record list + (written for each of the 20 levels). */ +extern struct SaveDataBlock mc_gamedata[48] __asm__("D_001A04C0"); +extern struct SaveDataBlock mc_leveldata[12] __asm__("D_001A07C0"); #endif /* LOMBYTE_RNC_SAVE_MC_DATA_H */ diff --git a/include/rnc/save/saved_globals.h b/include/rnc/save/saved_globals.h new file mode 100644 index 0000000000..c6912395ab --- /dev/null +++ b/include/rnc/save/saved_globals.h @@ -0,0 +1,25 @@ +#ifndef LOMBYTE_RNC_SAVE_SAVED_GLOBALS_H +#define LOMBYTE_RNC_SAVE_SAVED_GLOBALS_H + +#include "types.h" +#include "rnc/save/memory_card_state.h" + +/* Globals the save block list mc_gamedata (rnc/save/mc_data.h) stores and no + other header declares yet; each type follows the size its block saves. */ + +/* The sceCdReadClock time taken when the game is saved. */ +extern struct MemoryCardSaveClock D_0015EE98 __asm__("D_0015EE98"); + +extern s32 D_0015ED90 __asm__("D_0015ED90"); +extern s32 D_0015ED94 __asm__("D_0015ED94"); +extern s32 D_0015ED9C __asm__("D_0015ED9C"); +/* Indexed by a configured text label's selector (rebuild_configured_text_label_list). */ +extern u8 selector_available[12] __asm__("D_0015EDC0"); +extern s32 D_0015EE28 __asm__("D_0015EE28"); +extern s32 D_0015EE2C __asm__("D_0015EE2C"); +extern s32 D_0015EEAC __asm__("D_0015EEAC"); +/* One time per help record (148), in units of 600 frames: level 5's + help_hints subtracts it times 600 from scale_game_frames. */ +extern u16 D_00141720[148] __asm__("D_00141720"); + +#endif /* LOMBYTE_RNC_SAVE_SAVED_GLOBALS_H */ diff --git a/include/rnc/ui/help/help_record.h b/include/rnc/ui/help/help_record.h index fa84799283..9cc2c8f5b3 100644 --- a/include/rnc/ui/help/help_record.h +++ b/include/rnc/ui/help/help_record.h @@ -13,6 +13,6 @@ typedef struct { walks all 0x94 of them. */ #define HELP_RECORD_COUNT 0x94 -extern HelpRecord D_00141968[HELP_RECORD_COUNT]; +extern HelpRecord D_00141968[HELP_RECORD_COUNT] __asm__("D_00141968"); #endif /* LOMBYTE_RNC_UI_HELP_HELP_RECORD_H */ diff --git a/src/overlays/l05/mobys/help_hints.c b/src/overlays/l05/mobys/help_hints.c index 5a8fade9f7..651b6564a8 100644 --- a/src/overlays/l05/mobys/help_hints.c +++ b/src/overlays/l05/mobys/help_hints.c @@ -4,6 +4,7 @@ #include "sda.h" #include "rnc/hero/hero.h" #include "rnc/game/usage_stats.h" +#include "rnc/save/saved_globals.h" #include "rnc/rendering/clip_volume.h" #include "rnc/mobys/moby.h" #include "rnc/overlay/l05/mobys/help_hints_globals.h" @@ -43,25 +44,11 @@ extern struct UsageStat D_00141968[]; #define D_00141C5C (D_00141968[94].level_mask) #define D_00141B88 (D_00141968[68].count) #define D_00141BB8 (D_00141968[74].count) -typedef struct { - unsigned char pad_0[82]; - unsigned short D_00141772; - unsigned char pad_54[38]; - unsigned short D_0014179A; - unsigned char pad_7c[6]; - unsigned short D_001417A2; - unsigned char pad_84[6]; - unsigned short D_001417AA; - unsigned char pad_8c[22]; - unsigned short D_001417C2; -} L05Fields_00141720; - -extern L05Fields_00141720 l05_00141720 __asm__("D_00141720"); -#define D_001417A2 (l05_00141720.D_001417A2) -#define D_0014179A (l05_00141720.D_0014179A) -#define D_001417C2 (l05_00141720.D_001417C2) -#define D_00141772 (l05_00141720.D_00141772) -#define D_001417AA (l05_00141720.D_001417AA) +#define D_00141772 (D_00141720[41]) +#define D_0014179A (D_00141720[61]) +#define D_001417A2 (D_00141720[65]) +#define D_001417AA (D_00141720[69]) +#define D_001417C2 (D_00141720[81]) typedef struct { unsigned char D_0013D388; unsigned char pad_1[12]; diff --git a/src/save/memcard_restore_game.c b/src/save/memcard_restore_game.c index 8b9f0f417f..fc480b90bc 100644 --- a/src/save/memcard_restore_game.c +++ b/src/save/memcard_restore_game.c @@ -1,6 +1,17 @@ #include "types.h" #include "rnc/data_labels.h" +#include "rnc/game/game_globals.h" +#include "rnc/game/item_state.h" +#include "rnc/game/level_object_states.h" +#include "rnc/game/level_progress.h" +#include "rnc/game/level_state.h" +#include "rnc/game/options.h" +#include "rnc/game/usage_stats.h" +#include "rnc/globals.h" #include "rnc/save/mc_data.h" +#include "rnc/save/saved_globals.h" +#include "rnc/ui/help/help_record.h" +#include "rnc/ui/help/message_state.h" #include "rnc/save/memcard_get_data_size.h" #include "rnc/save/memory_card_state.h" #include "rnc/sdk/debug.h" @@ -30,3 +41,69 @@ void memcard_restore_game(u8 *save_buffer) { } extern __typeof__(memcard_restore_game) func_00209298 __attribute__((alias("FUN_00209298"))); + +struct SaveDataBlock mc_gamedata[48] = { + {¤t_level_index, 4, 0, 0}, + {¤t_bolt_count, 4, 1, 0}, + {&alternate_animation_sequence, 4, 2, 0}, + {&D_0015EE24, 4, 3, 0}, + {&D_0015EE98, 8, 4, 0}, + {&alternate_item_available, 0x80, 5, 0}, + {&big_head_cheat_enabled, 0xc, 7, 0}, + {&item_unlocked, 0x20, 8, 0}, + {&weapon_ammo_counts, 0x94, 9, 0}, + {&item_available, 0x25, 10, 0}, + {&items_acquired, 0x25, 11, 0}, + {&D_0015EDD0, 0xc, 12, 0}, + {&pause_iop_sprite_lists, 0x20, 13, 0}, + {&hero_max_health, 4, 19, 0}, + {&level_available, 0x14, 14, 0}, + {&D_0013D510, 0x50, 20, 0}, + {&level_object_states, 0x790, 15, 0}, + {&D_00141968, 0x4a0, 16, 0}, + {&usage_stats, 0x120, 17, 0}, + {&D_00141720, 0x128, 18, 0}, + {&D_0015ED8C, 4, 21, 0}, + {&D_0015ED90, 4, 22, 0}, + {&D_0015ED94, 4, 23, 0}, + {&D_0015ED9C, 4, 24, 0}, + {&opt_cam_invert, 4, 25, 0}, + {&invert52, 4, 26, 0}, + {&opt_cam_yaw_rate, 4, 27, 0}, + {&D_0015EE1C, 1, 28, 0}, + {&D_0015EE1D, 1, 29, 0}, + {&item_text_variant, 0x28, 30, 0}, + {&D_0015EEA0, 4, 31, 0}, + {&D_00141660, 0x1c, 32, 0}, + {&subtitles_enabled, 1, 33, 0}, + {&playback_mode, 4, 34, 0}, + {&music_volume, 4, 35, 0}, + {&sound_volume, 4, 36, 0}, + {&selector_available, 0xc, 37, 0}, + {&ammo_bought_stats, 0x94, 1000, 0}, + {&weapon_ammo_pickup_totals, 0x94, 1001, 0}, + {&weapon_ammo_used_counts, 0x94, 1002, 0}, + {&D_0015EEA4, 4, 1003, 0}, + {&D_0015EEA8, 4, 1004, 0}, + {&D_0015EEAC, 4, 1005, 0}, + {&D_0015EE28, 4, 1008, 0}, + {&D_0015EE2C, 4, 1009, 0}, + {&active_message_records, 0x96, 1010, 0}, + {&active_message_record_count, 4, 1011, 0}, + {0}, +}; + +struct SaveDataBlock mc_leveldata[12] = { + {&level_visit_state, 1, 3001, 0}, + {&map_coverage_pages, 0x800, 3002, 0}, + {&gold_bolts_collected, 4, 3003, 0}, + {&visited52, 0x10, 3004, 0}, + {&D_0014C190_257218, 0x100, 3005, 0}, + {&bolt_source_stats, 0x100, 3006, 0}, + {&item_usage, 8, 3007, 0}, + {&buried_bolt_states, 0x10, 3008, 0}, + {&level_bolts, 4, 4000, 0}, + {&D_0013DF88, 4, 4001, 0}, + {&hero_respawn_counts_by_level, 4, 4002, 0}, + {0}, +}; From dd5421a017b9755a106c3c331fe95474a08b1ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:53:01 +0000 Subject: [PATCH 119/213] decomp: define the gadget preview resource bindings in C --- config/us/levels/exe_data.tsv | 19 +++++++++++++++ configure.py | 1 + .../ui/menus/item_preview/preview_animation.h | 8 +++++++ include/rnc/ui/menus/menu_globals.h | 7 +++--- .../clear_preview_resource_bindings.c | 23 ++++++++++++++++++- .../load_preview_resource_bindings.c | 2 +- 6 files changed, 54 insertions(+), 6 deletions(-) diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index 30e8167a29..35d368b8e3 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -112,6 +112,7 @@ 00 001B9120 96 00 001B9198 588 00 001B93E8 1776 +00 001B9AD8 136 00 001B9CA0 80 00 001B9CF0 328 00 001B9E90 56 @@ -297,6 +298,7 @@ 01 001B95A0 96 01 001B9618 588 01 001B9868 1776 +01 001B9F58 136 01 001BA120 80 01 001BA170 328 01 001BA310 56 @@ -482,6 +484,7 @@ 02 001B9720 96 02 001B9798 588 02 001B99E8 1776 +02 001BA0D8 136 02 001BA2A0 80 02 001BA2F0 328 02 001BA490 56 @@ -667,6 +670,7 @@ 03 001B9220 96 03 001B9298 588 03 001B94E8 1776 +03 001B9BD8 136 03 001B9DA0 80 03 001B9DF0 328 03 001B9F90 56 @@ -852,6 +856,7 @@ 04 001B92A0 96 04 001B9318 588 04 001B9568 1776 +04 001B9C58 136 04 001B9E20 80 04 001B9E70 328 04 001BA010 56 @@ -1037,6 +1042,7 @@ 05 001B95A0 96 05 001B9618 588 05 001B9868 1776 +05 001B9F58 136 05 001BA120 80 05 001BA170 328 05 001BA310 56 @@ -1222,6 +1228,7 @@ 06 001B98A0 96 06 001B9918 588 06 001B9B68 1776 +06 001BA258 136 06 001BA420 80 06 001BA470 328 06 001BA610 56 @@ -1407,6 +1414,7 @@ 07 001B91A0 96 07 001B9218 588 07 001B9468 1776 +07 001B9B58 136 07 001B9D20 80 07 001B9D70 328 07 001B9F10 56 @@ -1592,6 +1600,7 @@ 08 001B9920 96 08 001B9998 588 08 001B9BE8 1776 +08 001BA2D8 136 08 001BA4A0 80 08 001BA4F0 328 08 001BA690 56 @@ -1777,6 +1786,7 @@ 09 001B92A0 96 09 001B9318 588 09 001B9568 1776 +09 001B9C58 136 09 001B9E20 80 09 001B9E70 328 09 001BA010 56 @@ -1962,6 +1972,7 @@ 10 001B95A0 96 10 001B9618 588 10 001B9868 1776 +10 001B9F58 136 10 001BA120 80 10 001BA170 328 10 001BA310 56 @@ -2147,6 +2158,7 @@ 11 001B9B20 96 11 001B9B98 588 11 001B9DE8 1776 +11 001BA4D8 136 11 001BA6A0 80 11 001BA6F0 328 11 001BA890 56 @@ -2332,6 +2344,7 @@ 12 001B95A0 96 12 001B9618 588 12 001B9868 1776 +12 001B9F58 136 12 001BA120 80 12 001BA170 328 12 001BA310 56 @@ -2517,6 +2530,7 @@ 13 001B9420 96 13 001B9498 588 13 001B96E8 1776 +13 001B9DD8 136 13 001B9FA0 80 13 001B9FF0 328 13 001BA190 56 @@ -2702,6 +2716,7 @@ 14 001B9820 96 14 001B9898 588 14 001B9AE8 1776 +14 001BA1D8 136 14 001BA3A0 80 14 001BA3F0 328 14 001BA590 56 @@ -2887,6 +2902,7 @@ 15 001B9720 96 15 001B9798 588 15 001B99E8 1776 +15 001BA0D8 136 15 001BA2A0 80 15 001BA2F0 328 15 001BA490 56 @@ -3072,6 +3088,7 @@ 16 001B95A0 96 16 001B9618 588 16 001B9868 1776 +16 001B9F58 136 16 001BA120 80 16 001BA170 328 16 001BA310 56 @@ -3257,6 +3274,7 @@ 17 001B9A20 96 17 001B9A98 588 17 001B9CE8 1776 +17 001BA3D8 136 17 001BA5A0 80 17 001BA5F0 328 17 001BA790 56 @@ -3442,6 +3460,7 @@ 18 001B9B20 96 18 001B9B98 588 18 001B9DE8 1776 +18 001BA4D8 136 18 001BA6A0 80 18 001BA6F0 328 18 001BA890 56 diff --git a/configure.py b/configure.py index 78c0fe1c41..de3a9ed5d7 100755 --- a/configure.py +++ b/configure.py @@ -1253,6 +1253,7 @@ "ui/map/draw_map_overlay": (0x1E8068, 0xE8FE8, 17), # no map text "ui/map/update_map_icons": (0x1A08C0, 0xA1840, 9036), # mission and map icon lists of each level "ui/menus/item_preview/draw_menu_preview_objects": (0x1D5020, 0xD5FA0, 96), # slot draw flags + "ui/menus/item_preview/clear_preview_resource_bindings": (0x1D59D8, 0xD6958, 136), } # Uninitialised variables a unit defines. `.sbss` (small ones) sits in the diff --git a/include/rnc/ui/menus/item_preview/preview_animation.h b/include/rnc/ui/menus/item_preview/preview_animation.h index 619b2a7f8e..4b23df5300 100644 --- a/include/rnc/ui/menus/item_preview/preview_animation.h +++ b/include/rnc/ui/menus/item_preview/preview_animation.h @@ -28,6 +28,14 @@ typedef struct { s32 animation_index; } PreviewResourceBinding; +/* The animations a gadget preview streams in: gadget_animations + (rnc/weapons/hand_gadget.h) names a range of these per gadget, the + highest ending at 17. */ +#define PREVIEW_RESOURCE_BINDING_COUNT 17 + +extern PreviewResourceBinding + preview_resource_bindings[PREVIEW_RESOURCE_BINDING_COUNT] __asm__("D_001D59D8"); + extern f32 ammo_preview_offsets[6] __asm__("D_001D5E90"); extern f32 ammo_preview_velocities[6] __asm__("D_001D5EA8"); diff --git a/include/rnc/ui/menus/menu_globals.h b/include/rnc/ui/menus/menu_globals.h index 7aa5fd8420..db6724bb30 100644 --- a/include/rnc/ui/menus/menu_globals.h +++ b/include/rnc/ui/menus/menu_globals.h @@ -26,11 +26,11 @@ typedef struct MenuItemInfo { u8 pad4[4]; s32 slot; /* 0x08: equip slot the item goes in */ u8 padC[0x2C]; - u16 icon; /* 0x38: copied into the pause item list */ + u16 icon; /* 0x38: copied into the pause item list */ s16 preview_class; /* 0x3A: preview moby class, -1 for none */ u8 pad3C[4]; - s16 name_text; /* 0x40: pause list value for the plain text */ - s16 alt_name_text; /* 0x42: pause list value when item_text_variant is set */ + s16 name_text; /* 0x40: pause list value for the plain text */ + s16 alt_name_text; /* 0x42: pause list value when item_text_variant is set */ s16 description_text; /* 0x44: copied into the filtered item list */ u8 pad46[6]; } MenuItemInfo; @@ -70,6 +70,5 @@ struct Moby; extern struct Moby *menu_action_messages[] __asm__("D_00199478"); extern s32 help_msg_count[] __asm__("D_001996FC"); extern s32 selected_level_index[] __asm__("D_001A0314"); -extern u8 preview_resource_bindings[] __asm__("D_001D59D8"); #endif /* LOMBYTE_RNC_UI_MENUS_MENU_GLOBALS_H */ diff --git a/src/ui/menus/item_preview/clear_preview_resource_bindings.c b/src/ui/menus/item_preview/clear_preview_resource_bindings.c index 9208bc1d4a..ffe5766f3e 100644 --- a/src/ui/menus/item_preview/clear_preview_resource_bindings.c +++ b/src/ui/menus/item_preview/clear_preview_resource_bindings.c @@ -21,7 +21,7 @@ void clear_preview_resource_bindings(void) { if (resource_index < (resource_index + menu_system.preview_resource_count)) { u8 *class_slots = resident_class_slot_by_id; u8 *class_resources = (u8 *)moby_class_resources; - u8 *bindings = preview_resource_bindings; + u8 *bindings = (u8 *)preview_resource_bindings; binding_base = bindings; binding = (PreviewResourceBinding *)((resource_index * 8) + binding_base); @@ -39,3 +39,24 @@ void clear_preview_resource_bindings(void) { } menu_system.preview_resource_count = 0; } + +PreviewResourceBinding preview_resource_bindings[PREVIEW_RESOURCE_BINDING_COUNT] = { + /* {moby class id, animation index in its class} */ + {168, 5}, + {657, 1}, + { 74, 3}, + {497, 1}, + {497, 2}, + {497, 3}, + {203, 3}, + {186, 8}, + {186, 9}, + {186, 10}, + {483, 3}, + {634, 8}, + {188, 3}, + {433, 3}, + {163, 4}, + {619, 3}, + {270, 4}, +}; diff --git a/src/ui/menus/item_preview/load_preview_resource_bindings.c b/src/ui/menus/item_preview/load_preview_resource_bindings.c index 5e98f4f242..5798e7ab21 100644 --- a/src/ui/menus/item_preview/load_preview_resource_bindings.c +++ b/src/ui/menus/item_preview/load_preview_resource_bindings.c @@ -39,7 +39,7 @@ void load_preview_resource_bindings(s32 first_resource, s32 resource_count) { its zero, so its live range is not doubled. */ if (resource_index < count) { resource_offset = first_resource * 4; - binding = ((PreviewResourceBinding *)preview_resource_bindings) + first_resource; + binding = preview_resource_bindings + first_resource; do { buffer_skip = 0; class_slot = resident_class_slot_by_id[binding->class_id]; From 6c289b08dca8972374cf7ef7f5cd9b9ca4d06dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 16:57:40 +0000 Subject: [PATCH 120/213] decomp: define the GS depth test packets in C --- config/us/levels/exe_data.tsv | 19 +++++++++ configure.py | 1 + include/rnc/rendering/depth_test_packets.h | 40 +++++++++++++++++++ .../emit_selected_graphics_dma_packets.c | 28 +++++++++---- 4 files changed, 81 insertions(+), 7 deletions(-) create mode 100644 include/rnc/rendering/depth_test_packets.h diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index 35d368b8e3..9742d7a80b 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -121,6 +121,7 @@ 00 001BA1B8 40 00 001BA1E0 212 00 001BA2B8 256 +00 001BBE90 192 00 001BBF50 224 00 001BC030 1408 00 001BD8B0 224 @@ -307,6 +308,7 @@ 01 001BA638 40 01 001BA660 212 01 001BA738 256 +01 001BC310 192 01 001BC3D0 224 01 001BC4B0 1408 01 001BDD30 224 @@ -493,6 +495,7 @@ 02 001BA7B8 40 02 001BA7E0 212 02 001BA8B8 256 +02 001BC490 192 02 001BC550 224 02 001BC630 1408 02 001BDEB0 224 @@ -679,6 +682,7 @@ 03 001BA2B8 40 03 001BA2E0 212 03 001BA3B8 256 +03 001BBF90 192 03 001BC050 224 03 001BC130 1408 03 001BD9B0 224 @@ -865,6 +869,7 @@ 04 001BA338 40 04 001BA360 212 04 001BA438 256 +04 001BC010 192 04 001BC0D0 224 04 001BC1B0 1408 04 001BDA30 224 @@ -1051,6 +1056,7 @@ 05 001BA638 40 05 001BA660 212 05 001BA738 256 +05 001BC310 192 05 001BC3D0 224 05 001BC4B0 1408 05 001BDD30 224 @@ -1237,6 +1243,7 @@ 06 001BA938 40 06 001BA960 212 06 001BAA38 256 +06 001BC610 192 06 001BC6D0 224 06 001BC7B0 1408 06 001BE030 224 @@ -1423,6 +1430,7 @@ 07 001BA238 40 07 001BA260 212 07 001BA338 256 +07 001BBF10 192 07 001BBFD0 224 07 001BC0B0 1408 07 001BD930 224 @@ -1609,6 +1617,7 @@ 08 001BA9B8 40 08 001BA9E0 212 08 001BAAB8 256 +08 001BC690 192 08 001BC750 224 08 001BC830 1408 08 001BE0B0 224 @@ -1795,6 +1804,7 @@ 09 001BA338 40 09 001BA360 212 09 001BA438 256 +09 001BC010 192 09 001BC0D0 224 09 001BC1B0 1408 09 001BDA30 224 @@ -1981,6 +1991,7 @@ 10 001BA638 40 10 001BA660 212 10 001BA738 256 +10 001BC310 192 10 001BC3D0 224 10 001BC4B0 1408 10 001BDD30 224 @@ -2167,6 +2178,7 @@ 11 001BABB8 40 11 001BABE0 212 11 001BACB8 256 +11 001BC890 192 11 001BC950 224 11 001BCA30 1408 11 001BE2B0 224 @@ -2353,6 +2365,7 @@ 12 001BA638 40 12 001BA660 212 12 001BA738 256 +12 001BC310 192 12 001BC3D0 224 12 001BC4B0 1408 12 001BDD30 224 @@ -2539,6 +2552,7 @@ 13 001BA4B8 40 13 001BA4E0 212 13 001BA5B8 256 +13 001BC190 192 13 001BC250 224 13 001BC330 1408 13 001BDBB0 224 @@ -2725,6 +2739,7 @@ 14 001BA8B8 40 14 001BA8E0 212 14 001BA9B8 256 +14 001BC590 192 14 001BC650 224 14 001BC730 1408 14 001BDFB0 224 @@ -2911,6 +2926,7 @@ 15 001BA7B8 40 15 001BA7E0 212 15 001BA8B8 256 +15 001BC490 192 15 001BC550 224 15 001BC630 1408 15 001BDEB0 224 @@ -3097,6 +3113,7 @@ 16 001BA638 40 16 001BA660 212 16 001BA738 256 +16 001BC310 192 16 001BC3D0 224 16 001BC4B0 1408 16 001BDD30 224 @@ -3283,6 +3300,7 @@ 17 001BAAB8 40 17 001BAAE0 212 17 001BABB8 256 +17 001BC790 192 17 001BC850 224 17 001BC930 1408 17 001BE1B0 224 @@ -3469,6 +3487,7 @@ 18 001BABB8 40 18 001BABE0 212 18 001BACB8 256 +18 001BC890 192 18 001BC950 224 18 001BCA30 1408 18 001BE2B0 224 diff --git a/configure.py b/configure.py index de3a9ed5d7..33bc77b318 100755 --- a/configure.py +++ b/configure.py @@ -1254,6 +1254,7 @@ "ui/map/update_map_icons": (0x1A08C0, 0xA1840, 9036), # mission and map icon lists of each level "ui/menus/item_preview/draw_menu_preview_objects": (0x1D5020, 0xD5FA0, 96), # slot draw flags "ui/menus/item_preview/clear_preview_resource_bindings": (0x1D59D8, 0xD6958, 136), + "ui/menus/system/emit_selected_graphics_dma_packets": (0x1D7D90, 0xD8D10, 192), } # Uninitialised variables a unit defines. `.sbss` (small ones) sits in the diff --git a/include/rnc/rendering/depth_test_packets.h b/include/rnc/rendering/depth_test_packets.h new file mode 100644 index 0000000000..a476afda1b --- /dev/null +++ b/include/rnc/rendering/depth_test_packets.h @@ -0,0 +1,40 @@ +#ifndef LOMBYTE_RNC_RENDERING_DEPTH_TEST_PACKETS_H +#define LOMBYTE_RNC_RENDERING_DEPTH_TEST_PACKETS_H + +#include "types.h" +#include "rnc/sdk/libgraph.h" + +/* GS register addresses the packets write through A+D. */ +#define GS_REG_TEST_1 0x47 +#define GS_REG_TEXFLUSH 0x3F + +/* GIF tag (low word) fields. */ +#define GIF_TAG_NLOOP(n) ((u64)(n)) +#define GIF_TAG_EOP ((u64)1 << 15) +#define GIF_TAG_NREG(n) ((u64)(n) << 60) + +/* TEST_1 fields the packets set: alpha test on with ATST NEVER and AFAIL + FB_ONLY, depth test on, ZTST in bits 17-18. */ +#define GS_TEST_ATE 0x1 +#define GS_TEST_AFAIL_FB 0x1000 +#define GS_TEST_ZTE 0x10000 +#define GS_TEST_ZTST(method) ((u64)(method) << 17) +#define GS_ZTST_NEVER 0 +#define GS_ZTST_ALWAYS 1 +#define GS_ZTST_GEQUAL 2 +#define GS_ZTST_GREATER 3 + +/* A GS packet of two A+D writes: TEST_1, then TEXFLUSH. emit_selected_ + graphics_dma_packets sends one by reference; entry i tests depth with + ZTST i (NEVER, ALWAYS, GEQUAL, GREATER). */ +struct GsDepthTestPacket { + u64 tag[2]; /* GIF tag: PACKED, NREG 1, REGS A+D */ + u64 test; + u64 test_reg; + u64 texflush; + u64 texflush_reg; +}; + +extern struct GsDepthTestPacket gs_depth_test_packets[4] __asm__("D_001D7D90"); + +#endif /* LOMBYTE_RNC_RENDERING_DEPTH_TEST_PACKETS_H */ diff --git a/src/ui/menus/system/emit_selected_graphics_dma_packets.c b/src/ui/menus/system/emit_selected_graphics_dma_packets.c index d4aa387f95..db7c315841 100644 --- a/src/ui/menus/system/emit_selected_graphics_dma_packets.c +++ b/src/ui/menus/system/emit_selected_graphics_dma_packets.c @@ -1,11 +1,7 @@ #include "types.h" #include "rnc/rendering/dma_tag.h" +#include "rnc/rendering/depth_test_packets.h" -struct Mat { - u8 pad[0x30]; -}; - -extern struct Mat graphics_dma_reference_records[] __asm__("D_001D7D90"); /* Small data, defined above the code so it is reached $gp-relative. */ s32 graphics_packet_payload_words_by_slot[2] __asm__("D_00160360") = {0x7F8080FF, (s32)0x8280FF80}; @@ -20,8 +16,7 @@ void emit_selected_graphics_dma_packets(s32 render_selector, s32 dma_reference_record_index) { render_packet_cursor.tag->tag = 0x30000003; - render_packet_cursor.tag->addr = - (u32)&graphics_dma_reference_records[dma_reference_record_index]; + render_packet_cursor.tag->addr = (u32)&gs_depth_test_packets[dma_reference_record_index]; render_packet_cursor.tag->vif0 = 0x13000000; render_packet_cursor.tag->vif1 = 0x50000003; render_packet_cursor.tag++; @@ -30,3 +25,22 @@ void emit_selected_graphics_dma_packets(s32 render_selector, extern __typeof__(emit_selected_graphics_dma_packets) func_00227140 __attribute__((alias("FUN_00227140"))); + +struct GsDepthTestPacket gs_depth_test_packets[4] = { + {{GIF_TAG_NLOOP(2) | GIF_TAG_EOP | GIF_TAG_NREG(1), 0xEEEEEE}, + GS_TEST_ATE | GS_TEST_AFAIL_FB | GS_TEST_ZTE | GS_TEST_ZTST(GS_ZTST_NEVER), + GS_REG_TEST_1, 0, + GS_REG_TEXFLUSH}, + {{GIF_TAG_NLOOP(2) | GIF_TAG_EOP | GIF_TAG_NREG(1), 0xEEEEEE}, + GS_TEST_ATE | GS_TEST_AFAIL_FB | GS_TEST_ZTE | GS_TEST_ZTST(GS_ZTST_ALWAYS), + GS_REG_TEST_1, 0, + GS_REG_TEXFLUSH}, + {{GIF_TAG_NLOOP(2) | GIF_TAG_EOP | GIF_TAG_NREG(1), 0xEEEEEE}, + GS_TEST_ATE | GS_TEST_AFAIL_FB | GS_TEST_ZTE | GS_TEST_ZTST(GS_ZTST_GEQUAL), + GS_REG_TEST_1, 0, + GS_REG_TEXFLUSH}, + {{GIF_TAG_NLOOP(2) | GIF_TAG_EOP | GIF_TAG_NREG(1), 0xEEEEEE}, + GS_TEST_ATE | GS_TEST_AFAIL_FB | GS_TEST_ZTE | GS_TEST_ZTST(GS_ZTST_GREATER), + GS_REG_TEST_1, 0, + GS_REG_TEXFLUSH}, +}; From 9b01f99d8868c86269e59e230b568f5ccd2d40a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:01:16 +0000 Subject: [PATCH 121/213] decomp: define the level 6 backdrop mesh vertices and texture coordinates in C --- config/us/levels/data.tsv | 4 + src/overlays/l06/mobys/breakable_window.c | 1492 ++++++++++++++++++++- 2 files changed, 1489 insertions(+), 7 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 7dffcd5836..52de3e1912 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -10883,8 +10883,12 @@ D_L06_001F1540 1168 D_L06_001F19D0 800 D_L06_001F2610 800 D_L06_001F2E90 32 +D_L06_001F2EB0 1536 D_L06_001F34B0 1024 +D_L06_001F38B0 3200 +D_L06_001F77B0 1792 D_L06_001F7EB0 1536 +D_L06_001F84B0 7744 D_L06_001FA2F0 1536 D_L06_001FAFF0 1536 D_L06_001FE9D0 4 diff --git a/src/overlays/l06/mobys/breakable_window.c b/src/overlays/l06/mobys/breakable_window.c index 260dca2e1d..517c4ebc2f 100644 --- a/src/overlays/l06/mobys/breakable_window.c +++ b/src/overlays/l06/mobys/breakable_window.c @@ -81,7 +81,56 @@ extern unsigned int l06_backdrop_mesh_vertex_color __asm__("D_L06_0016206C") __a #include "rnc/overlay/l06/mobys/breakable_window_data/draw_backdrop_mesh.h" -extern V3003f0 l06_backdrop_mesh_vertex_positions[] __asm__("D_L06_001F2EB0"); +V3003f0 l06_backdrop_mesh_vertex_positions[96] __asm__("D_L06_001F2EB0") = { + {{37184.555f, 33235.867f, 1.39e+04f, 1.0f}}, {{37116.426f, 33281.39f, 1.39e+04f, 1.0f}}, + {{37116.426f, 33281.39f, 13983.305f, 1.0f}}, {{37184.555f, 33235.867f, 13983.305f, 1.0f}}, + {{37036.062f, 33297.375f, 1.39e+04f, 1.0f}}, {{37036.062f, 33297.375f, 13934.511f, 1.0f}}, + {{36955.7f, 33281.39f, 1.39e+04f, 1.0f}}, {{36955.7f, 33281.39f, 13983.305f, 1.0f}}, + {{36887.57f, 33235.867f, 1.39e+04f, 1.0f}}, {{36887.57f, 33235.867f, 13919.205f, 1.0f}}, + {{36842.047f, 33167.74f, 1.39e+04f, 1.0f}}, {{36842.047f, 33167.74f, 13924.697f, 1.0f}}, + {{36826.062f, 33087.375f, 1.39e+04f, 1.0f}}, {{36826.062f, 33087.375f, 13943.56f, 1.0f}}, + {{36842.047f, 33007.01f, 1.39e+04f, 1.0f}}, {{36842.047f, 33007.01f, 13983.305f, 1.0f}}, + {{36887.57f, 32938.883f, 1.39e+04f, 1.0f}}, {{36887.57f, 32938.883f, 13918.155f, 1.0f}}, + {{36955.7f, 32893.36f, 1.39e+04f, 1.0f}}, {{36955.7f, 32893.36f, 13983.305f, 1.0f}}, + {{37036.062f, 32877.375f, 1.39e+04f, 1.0f}}, {{37036.062f, 32877.375f, 13926.972f, 1.0f}}, + {{37116.426f, 32893.36f, 1.39e+04f, 1.0f}}, {{37116.426f, 32893.36f, 13935.359f, 1.0f}}, + {{37184.555f, 32938.883f, 1.39e+04f, 1.0f}}, {{37184.555f, 32938.883f, 13983.305f, 1.0f}}, + {{37230.08f, 33007.01f, 1.39e+04f, 1.0f}}, {{37230.08f, 33007.01f, 13966.268f, 1.0f}}, + {{37246.062f, 33087.375f, 1.39e+04f, 1.0f}}, {{37246.062f, 33087.375f, 13983.305f, 1.0f}}, + {{37230.08f, 33167.74f, 1.39e+04f, 1.0f}}, {{37230.08f, 33167.74f, 13983.305f, 1.0f}}, + {{37184.555f, 33235.867f, 14278.347f, 1.0f}}, {{37116.426f, 33281.39f, 14333.163f, 1.0f}}, + {{37116.426f, 33281.39f, 14402.978f, 1.0f}}, {{37184.555f, 33235.867f, 14376.695f, 1.0f}}, + {{37036.062f, 33297.375f, 14278.347f, 1.0f}}, {{37036.062f, 33297.375f, 14376.695f, 1.0f}}, + {{36955.7f, 33281.39f, 14343.895f, 1.0f}}, {{36955.7f, 33281.39f, 14376.695f, 1.0f}}, + {{36887.57f, 33235.867f, 14356.365f, 1.0f}}, {{36887.57f, 33235.867f, 14376.695f, 1.0f}}, + {{36842.047f, 33167.74f, 14278.347f, 1.0f}}, {{36842.047f, 33167.74f, 14376.695f, 1.0f}}, + {{36825.637f, 33086.273f, 14349.788f, 1.0f}}, {{36826.062f, 33087.375f, 14376.695f, 1.0f}}, + {{36842.047f, 33007.01f, 14278.347f, 1.0f}}, {{36842.047f, 33007.01f, 14376.695f, 1.0f}}, + {{36887.57f, 32938.883f, 14406.318f, 1.0f}}, {{36887.57f, 32938.883f, 14435.389f, 1.0f}}, + {{36955.7f, 32893.36f, 14346.871f, 1.0f}}, {{36955.7f, 32893.36f, 14376.695f, 1.0f}}, + {{37036.062f, 32877.375f, 14278.347f, 1.0f}}, {{37036.062f, 32877.375f, 14376.695f, 1.0f}}, + {{37116.426f, 32893.36f, 14390.541f, 1.0f}}, {{37116.426f, 32893.36f, 14419.676f, 1.0f}}, + {{37184.555f, 32938.883f, 14278.347f, 1.0f}}, {{37184.555f, 32938.883f, 14376.695f, 1.0f}}, + {{37230.08f, 33007.01f, 14269.135f, 1.0f}}, {{37230.08f, 33007.01f, 14370.939f, 1.0f}}, + {{37246.062f, 33087.375f, 14278.347f, 1.0f}}, {{37246.062f, 33087.375f, 14376.695f, 1.0f}}, + {{37230.08f, 33167.74f, 14331.171f, 1.0f}}, {{37230.08f, 33167.74f, 14407.026f, 1.0f}}, + {{37116.426f, 33281.39f, 1.446e+04f, 1.0f}}, {{37184.555f, 33235.867f, 1.446e+04f, 1.0f}}, + {{37036.062f, 33297.375f, 1.446e+04f, 1.0f}}, {{36955.7f, 33281.39f, 1.446e+04f, 1.0f}}, + {{36887.57f, 33235.867f, 1.446e+04f, 1.0f}}, {{36842.047f, 33167.74f, 1.446e+04f, 1.0f}}, + {{36826.062f, 33087.375f, 1.446e+04f, 1.0f}}, {{36842.047f, 33007.01f, 1.446e+04f, 1.0f}}, + {{36887.57f, 32938.883f, 1.446e+04f, 1.0f}}, {{36955.7f, 32893.36f, 1.446e+04f, 1.0f}}, + {{37036.062f, 32877.375f, 1.446e+04f, 1.0f}}, {{37116.426f, 32893.36f, 1.446e+04f, 1.0f}}, + {{37184.555f, 32938.883f, 1.446e+04f, 1.0f}}, {{37230.08f, 33007.01f, 1.446e+04f, 1.0f}}, + {{37246.062f, 33087.375f, 1.446e+04f, 1.0f}}, {{37230.08f, 33167.74f, 1.446e+04f, 1.0f}}, + {{37184.555f, 33235.867f, 14014.767f, 1.0f}}, {{37230.08f, 33167.74f, 14081.653f, 1.0f}}, + {{37116.426f, 33281.39f, 13998.416f, 1.0f}}, {{37036.062f, 33297.375f, 13970.915f, 1.0f}}, + {{36955.7f, 33281.39f, 14081.653f, 1.0f}}, {{36887.57f, 33235.867f, 13985.018f, 1.0f}}, + {{36842.047f, 33167.74f, 13966.334f, 1.0f}}, {{36826.062f, 33087.375f, 13972.607f, 1.0f}}, + {{36842.047f, 33007.01f, 14081.653f, 1.0f}}, {{36887.57f, 32938.883f, 13961.376f, 1.0f}}, + {{36955.7f, 32893.36f, 14081.653f, 1.0f}}, {{37036.062f, 32877.375f, 14062.227f, 1.0f}}, + {{37116.426f, 32893.36f, 13960.649f, 1.0f}}, {{37184.555f, 32938.883f, 14081.653f, 1.0f}}, + {{37230.08f, 33007.01f, 13982.1f, 1.0f}}, {{37246.062f, 33087.375f, 14009.818f, 1.0f}}, +}; /* 4 corners for each of the 64 quads draw_backdrop_mesh draws. */ I3003f0 l06_backdrop_mesh_quad_corner_index_pairs[256] __asm__("D_L06_001F34B0") = { @@ -343,7 +392,408 @@ I3003f0 l06_backdrop_mesh_quad_corner_index_pairs[256] __asm__("D_L06_001F34B0") {81, 273}, }; -extern UV3003f0 l06_backdrop_mesh_texture_coordinates[] __asm__("D_L06_001F38B0"); +UV3003f0 l06_backdrop_mesh_texture_coordinates[400] __asm__("D_L06_001F38B0") = { + {0.163243f, 1.0f}, + {0.280669f, 1.0f}, + {0.280669f, 0.851241f}, + {0.163243f, 0.851241f}, + {0.375525f, 1.0f}, + {0.375525f, 0.851241f}, + {0.375525f, 1.0f}, + {0.459585f, 1.0f}, + {0.459585f, 0.851241f}, + {0.375525f, 0.851241f}, + {0.540415f, 1.0f}, + {0.540415f, 0.851241f}, + {0.540415f, 1.0f}, + {0.624475f, 1.0f}, + {0.624475f, 0.851241f}, + {0.540415f, 0.851241f}, + {0.719331f, 1.0f}, + {0.719331f, 0.851241f}, + {0.719331f, 1.0f}, + {0.836757f, 1.0f}, + {0.836757f, 0.851241f}, + {0.719331f, 0.851241f}, + {1.0f, 1.0f}, + {1.0f, 0.851241f}, + {0.0f, 1.0f}, + {0.174348f, 1.0f}, + {0.174348f, 0.851241f}, + {0.0f, 0.851241f}, + {0.315185f, 1.0f}, + {0.315185f, 0.851241f}, + {0.315185f, 1.0f}, + {0.439994f, 1.0f}, + {0.439994f, 0.851241f}, + {0.315185f, 0.851241f}, + {0.560006f, 1.0f}, + {0.560006f, 0.851241f}, + {0.560006f, 1.0f}, + {0.684815f, 1.0f}, + {0.684815f, 0.851241f}, + {0.560006f, 0.851241f}, + {0.825652f, 1.0f}, + {0.825652f, 0.851241f}, + {0.825652f, 1.0f}, + {1.0f, 1.0f}, + {1.0f, 0.851241f}, + {0.825652f, 0.851241f}, + {0.163243f, 1.0f}, + {0.163243f, 0.851241f}, + {0.163243f, 0.324379f}, + {0.280669f, 0.324379f}, + {0.280669f, 0.148759f}, + {0.163243f, 0.148759f}, + {0.375525f, 0.324379f}, + {0.375525f, 0.148759f}, + {0.375525f, 0.324379f}, + {0.459585f, 0.324379f}, + {0.459585f, 0.148759f}, + {0.375525f, 0.148759f}, + {0.540415f, 0.324379f}, + {0.540415f, 0.148759f}, + {0.540415f, 0.324379f}, + {0.624475f, 0.324379f}, + {0.624475f, 0.148759f}, + {0.540415f, 0.148759f}, + {0.719331f, 0.324379f}, + {0.719331f, 0.148759f}, + {0.719331f, 0.324379f}, + {0.836757f, 0.324379f}, + {0.836757f, 0.148759f}, + {0.719331f, 0.148759f}, + {1.0f, 0.324379f}, + {1.0f, 0.148759f}, + {0.0f, 0.324379f}, + {0.174348f, 0.324379f}, + {0.174348f, 0.148759f}, + {0.0f, 0.148759f}, + {0.315185f, 0.324379f}, + {0.315185f, 0.148759f}, + {0.315185f, 0.324379f}, + {0.439994f, 0.324379f}, + {0.439994f, 0.148759f}, + {0.315185f, 0.148759f}, + {0.560006f, 0.324379f}, + {0.560006f, 0.148759f}, + {0.560006f, 0.324379f}, + {0.684815f, 0.324379f}, + {0.684815f, 0.148759f}, + {0.560006f, 0.148759f}, + {0.825652f, 0.324379f}, + {0.825652f, 0.148759f}, + {0.825652f, 0.324379f}, + {1.0f, 0.324379f}, + {1.0f, 0.148759f}, + {0.825652f, 0.148759f}, + {0.163243f, 0.324379f}, + {0.163243f, 0.148759f}, + {0.280669f, 0.0f}, + {0.163243f, 0.0f}, + {0.375525f, 0.0f}, + {0.459585f, 0.0f}, + {0.375525f, 0.0f}, + {0.540415f, 0.0f}, + {0.624475f, 0.0f}, + {0.540415f, 0.0f}, + {0.719331f, 0.0f}, + {0.836757f, 0.0f}, + {0.719331f, 0.0f}, + {1.0f, 0.0f}, + {0.174348f, 0.0f}, + {0}, + {0.315185f, 0.0f}, + {0.439994f, 0.0f}, + {0.315185f, 0.0f}, + {0.560006f, 0.0f}, + {0.684815f, 0.0f}, + {0.560006f, 0.0f}, + {0.825652f, 0.0f}, + {1.0f, 0.0f}, + {0.825652f, 0.0f}, + {0.163243f, 0.0f}, + {0.163243f, 0.675621f}, + {1.0f, 0.675621f}, + {0.280669f, 0.675621f}, + {0.163243f, 0.675621f}, + {0.375525f, 0.675621f}, + {0.459585f, 0.675621f}, + {0.375525f, 0.675621f}, + {0.540415f, 0.675621f}, + {0.624475f, 0.675621f}, + {0.540415f, 0.675621f}, + {0.719331f, 0.675621f}, + {0.836757f, 0.675621f}, + {0.719331f, 0.675621f}, + {1.0f, 0.675621f}, + {0.174348f, 0.675621f}, + {0.0f, 0.675621f}, + {0.315185f, 0.675621f}, + {0.439994f, 0.675621f}, + {0.315185f, 0.675621f}, + {0.560006f, 0.675621f}, + {0.684815f, 0.675621f}, + {0.560006f, 0.675621f}, + {0.825652f, 0.675621f}, + {0.825652f, 0.675621f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, +}; /* Draws the 96 quads of the second backdrop mesh, skipping those that face away from D_L06_00167540. */ typedef float FVec4_l06[4] __attribute__((aligned(16))); @@ -455,8 +905,1036 @@ FRow_l06 l06_second_backdrop_mesh_quad_normals[96] __asm__("D_L06_001FA2F0") = { {{0.980787f, -0.19508f, 0.0f, 1.0f}}, {{0.980787f, 0.19508f, 0.0f, 1.0f}}, }; -extern FRow_l06 D_L06_001F77B0[] NOT_SDA; -extern float D_L06_001F84B0[][2] NOT_SDA; +/* Vertex positions and texture coordinates the second backdrop mesh's quads index. */ +FRow_l06 l06_second_backdrop_mesh_vertex_positions[112] __asm__("D_L06_001F77B0") = { + {{37184.555f, 33235.867f, 1.39e+04f, 1.0f}}, {{37116.426f, 33281.39f, 1.39e+04f, 1.0f}}, + {{37116.426f, 33281.39f, 13983.305f, 1.0f}}, {{37184.555f, 33235.867f, 13983.305f, 1.0f}}, + {{37036.062f, 33297.375f, 1.39e+04f, 1.0f}}, {{37036.062f, 33297.375f, 13983.305f, 1.0f}}, + {{36955.7f, 33281.39f, 1.39e+04f, 1.0f}}, {{36955.7f, 33281.39f, 13983.305f, 1.0f}}, + {{36887.57f, 33235.867f, 1.39e+04f, 1.0f}}, {{36887.57f, 33235.867f, 13983.305f, 1.0f}}, + {{36842.047f, 33167.74f, 1.39e+04f, 1.0f}}, {{36842.047f, 33167.74f, 13983.305f, 1.0f}}, + {{36826.062f, 33087.375f, 1.39e+04f, 1.0f}}, {{36826.062f, 33087.375f, 13983.305f, 1.0f}}, + {{36842.047f, 33007.01f, 1.39e+04f, 1.0f}}, {{36842.047f, 33007.01f, 13983.305f, 1.0f}}, + {{36887.57f, 32938.883f, 1.39e+04f, 1.0f}}, {{36887.57f, 32938.883f, 13983.305f, 1.0f}}, + {{36955.7f, 32893.36f, 1.39e+04f, 1.0f}}, {{36955.7f, 32893.36f, 13983.305f, 1.0f}}, + {{37036.062f, 32877.375f, 1.39e+04f, 1.0f}}, {{37036.062f, 32877.375f, 13983.305f, 1.0f}}, + {{37116.426f, 32893.36f, 1.39e+04f, 1.0f}}, {{37116.426f, 32893.36f, 13983.305f, 1.0f}}, + {{37184.555f, 32938.883f, 1.39e+04f, 1.0f}}, {{37184.555f, 32938.883f, 13983.305f, 1.0f}}, + {{37230.08f, 33007.01f, 1.39e+04f, 1.0f}}, {{37230.08f, 33007.01f, 13983.305f, 1.0f}}, + {{37246.062f, 33087.375f, 1.39e+04f, 1.0f}}, {{37246.062f, 33087.375f, 13983.305f, 1.0f}}, + {{37230.08f, 33167.74f, 1.39e+04f, 1.0f}}, {{37230.08f, 33167.74f, 13983.305f, 1.0f}}, + {{37184.555f, 33235.867f, 14081.653f, 1.0f}}, {{37116.426f, 33281.39f, 14081.653f, 1.0f}}, + {{37116.426f, 33281.39f, 1.418e+04f, 1.0f}}, {{37184.555f, 33235.867f, 1.418e+04f, 1.0f}}, + {{37036.062f, 33297.375f, 14081.653f, 1.0f}}, {{37036.062f, 33297.375f, 1.418e+04f, 1.0f}}, + {{36955.7f, 33281.39f, 14081.653f, 1.0f}}, {{36955.7f, 33281.39f, 1.418e+04f, 1.0f}}, + {{36887.57f, 33235.867f, 14081.653f, 1.0f}}, {{36887.57f, 33235.867f, 1.418e+04f, 1.0f}}, + {{36842.047f, 33167.74f, 14081.653f, 1.0f}}, {{36842.047f, 33167.74f, 1.418e+04f, 1.0f}}, + {{36826.062f, 33087.375f, 14081.653f, 1.0f}}, {{36826.062f, 33087.375f, 1.418e+04f, 1.0f}}, + {{36842.047f, 33007.01f, 14081.653f, 1.0f}}, {{36842.047f, 33007.01f, 1.418e+04f, 1.0f}}, + {{36887.57f, 32938.883f, 14081.653f, 1.0f}}, {{36887.57f, 32938.883f, 1.418e+04f, 1.0f}}, + {{36955.7f, 32893.36f, 14081.653f, 1.0f}}, {{36955.7f, 32893.36f, 1.418e+04f, 1.0f}}, + {{37036.062f, 32877.375f, 14081.653f, 1.0f}}, {{37036.062f, 32877.375f, 1.418e+04f, 1.0f}}, + {{37116.426f, 32893.36f, 14081.653f, 1.0f}}, {{37116.426f, 32893.36f, 1.418e+04f, 1.0f}}, + {{37184.555f, 32938.883f, 14081.653f, 1.0f}}, {{37184.555f, 32938.883f, 1.418e+04f, 1.0f}}, + {{37230.08f, 33007.01f, 14081.653f, 1.0f}}, {{37230.08f, 33007.01f, 1.418e+04f, 1.0f}}, + {{37246.062f, 33087.375f, 14081.653f, 1.0f}}, {{37246.062f, 33087.375f, 1.418e+04f, 1.0f}}, + {{37230.08f, 33167.74f, 14081.653f, 1.0f}}, {{37230.08f, 33167.74f, 1.418e+04f, 1.0f}}, + {{37184.555f, 33235.867f, 14278.347f, 1.0f}}, {{37116.426f, 33281.39f, 14278.347f, 1.0f}}, + {{37116.426f, 33281.39f, 14376.695f, 1.0f}}, {{37184.555f, 33235.867f, 14376.695f, 1.0f}}, + {{37036.062f, 33297.375f, 14278.347f, 1.0f}}, {{37036.062f, 33297.375f, 14376.695f, 1.0f}}, + {{36955.7f, 33281.39f, 14278.347f, 1.0f}}, {{36955.7f, 33281.39f, 14376.695f, 1.0f}}, + {{36887.57f, 33235.867f, 14278.347f, 1.0f}}, {{36887.57f, 33235.867f, 14376.695f, 1.0f}}, + {{36842.047f, 33167.74f, 14278.347f, 1.0f}}, {{36842.047f, 33167.74f, 14376.695f, 1.0f}}, + {{36826.062f, 33087.375f, 14278.347f, 1.0f}}, {{36826.062f, 33087.375f, 14376.695f, 1.0f}}, + {{36842.047f, 33007.01f, 14278.347f, 1.0f}}, {{36842.047f, 33007.01f, 14376.695f, 1.0f}}, + {{36887.57f, 32938.883f, 14278.347f, 1.0f}}, {{36887.57f, 32938.883f, 14376.695f, 1.0f}}, + {{36955.7f, 32893.36f, 14278.347f, 1.0f}}, {{36955.7f, 32893.36f, 14376.695f, 1.0f}}, + {{37036.062f, 32877.375f, 14278.347f, 1.0f}}, {{37036.062f, 32877.375f, 14376.695f, 1.0f}}, + {{37116.426f, 32893.36f, 14278.347f, 1.0f}}, {{37116.426f, 32893.36f, 14376.695f, 1.0f}}, + {{37184.555f, 32938.883f, 14278.347f, 1.0f}}, {{37184.555f, 32938.883f, 14376.695f, 1.0f}}, + {{37230.08f, 33007.01f, 14278.347f, 1.0f}}, {{37230.08f, 33007.01f, 14376.695f, 1.0f}}, + {{37246.062f, 33087.375f, 14278.347f, 1.0f}}, {{37246.062f, 33087.375f, 14376.695f, 1.0f}}, + {{37230.08f, 33167.74f, 14278.347f, 1.0f}}, {{37230.08f, 33167.74f, 14376.695f, 1.0f}}, + {{37116.426f, 33281.39f, 1.446e+04f, 1.0f}}, {{37184.555f, 33235.867f, 1.446e+04f, 1.0f}}, + {{37036.062f, 33297.375f, 1.446e+04f, 1.0f}}, {{36955.7f, 33281.39f, 1.446e+04f, 1.0f}}, + {{36887.57f, 33235.867f, 1.446e+04f, 1.0f}}, {{36842.047f, 33167.74f, 1.446e+04f, 1.0f}}, + {{36826.062f, 33087.375f, 1.446e+04f, 1.0f}}, {{36842.047f, 33007.01f, 1.446e+04f, 1.0f}}, + {{36887.57f, 32938.883f, 1.446e+04f, 1.0f}}, {{36955.7f, 32893.36f, 1.446e+04f, 1.0f}}, + {{37036.062f, 32877.375f, 1.446e+04f, 1.0f}}, {{37116.426f, 32893.36f, 1.446e+04f, 1.0f}}, + {{37184.555f, 32938.883f, 1.446e+04f, 1.0f}}, {{37230.08f, 33007.01f, 1.446e+04f, 1.0f}}, + {{37246.062f, 33087.375f, 1.446e+04f, 1.0f}}, {{37230.08f, 33167.74f, 1.446e+04f, 1.0f}}, +}; + +float l06_second_backdrop_mesh_texture_coordinates[968][2] __asm__("D_L06_001F84B0") = { + {0.163243f, 1.0f}, + {0.280669f, 1.0f}, + {0.280669f, 0.851241f}, + {0.163243f, 0.851241f}, + {0.375525f, 1.0f}, + {0.375525f, 0.851241f}, + {0.375525f, 1.0f}, + {0.459585f, 1.0f}, + {0.459585f, 0.851241f}, + {0.375525f, 0.851241f}, + {0.540415f, 1.0f}, + {0.540415f, 0.851241f}, + {0.540415f, 1.0f}, + {0.624475f, 1.0f}, + {0.624475f, 0.851241f}, + {0.540415f, 0.851241f}, + {0.719331f, 1.0f}, + {0.719331f, 0.851241f}, + {0.719331f, 1.0f}, + {0.836757f, 1.0f}, + {0.836757f, 0.851241f}, + {0.719331f, 0.851241f}, + { 1.0f, 1.0f}, + { 1.0f, 0.851241f}, + { 0.0f, 1.0f}, + {0.174348f, 1.0f}, + {0.174348f, 0.851241f}, + { 0.0f, 0.851241f}, + {0.315185f, 1.0f}, + {0.315185f, 0.851241f}, + {0.315185f, 1.0f}, + {0.439994f, 1.0f}, + {0.439994f, 0.851241f}, + {0.315185f, 0.851241f}, + {0.560006f, 1.0f}, + {0.560006f, 0.851241f}, + {0.560006f, 1.0f}, + {0.684815f, 1.0f}, + {0.684815f, 0.851241f}, + {0.560006f, 0.851241f}, + {0.825652f, 1.0f}, + {0.825652f, 0.851241f}, + {0.825652f, 1.0f}, + { 1.0f, 1.0f}, + { 1.0f, 0.851241f}, + {0.825652f, 0.851241f}, + {0.163243f, 1.0f}, + {0.163243f, 0.851241f}, + {0.163243f, 0.675621f}, + {0.280669f, 0.675621f}, + {0.280669f, 0.5f}, + {0.163243f, 0.5f}, + {0.375525f, 0.675621f}, + {0.375525f, 0.5f}, + {0.375525f, 0.675621f}, + {0.459585f, 0.675621f}, + {0.459585f, 0.5f}, + {0.375525f, 0.5f}, + {0.540415f, 0.675621f}, + {0.540415f, 0.5f}, + {0.540415f, 0.675621f}, + {0.624475f, 0.675621f}, + {0.624475f, 0.5f}, + {0.540415f, 0.5f}, + {0.719331f, 0.675621f}, + {0.719331f, 0.5f}, + {0.719331f, 0.675621f}, + {0.836757f, 0.675621f}, + {0.836757f, 0.5f}, + {0.719331f, 0.5f}, + { 1.0f, 0.675621f}, + { 1.0f, 0.5f}, + { 0.0f, 0.675621f}, + {0.174348f, 0.675621f}, + {0.174348f, 0.5f}, + { 0.0f, 0.5f}, + {0.315185f, 0.675621f}, + {0.315185f, 0.5f}, + {0.315185f, 0.675621f}, + {0.439994f, 0.675621f}, + {0.439994f, 0.5f}, + {0.315185f, 0.5f}, + {0.560006f, 0.675621f}, + {0.560006f, 0.5f}, + {0.560006f, 0.675621f}, + {0.684815f, 0.675621f}, + {0.684815f, 0.5f}, + {0.560006f, 0.5f}, + {0.825652f, 0.675621f}, + {0.825652f, 0.5f}, + {0.825652f, 0.675621f}, + { 1.0f, 0.675621f}, + { 1.0f, 0.5f}, + {0.825652f, 0.5f}, + {0.163243f, 0.675621f}, + {0.163243f, 0.5f}, + {0.163243f, 0.324379f}, + {0.280669f, 0.324379f}, + {0.280669f, 0.148759f}, + {0.163243f, 0.148759f}, + {0.375525f, 0.324379f}, + {0.375525f, 0.148759f}, + {0.375525f, 0.324379f}, + {0.459585f, 0.324379f}, + {0.459585f, 0.148759f}, + {0.375525f, 0.148759f}, + {0.540415f, 0.324379f}, + {0.540415f, 0.148759f}, + {0.540415f, 0.324379f}, + {0.624475f, 0.324379f}, + {0.624475f, 0.148759f}, + {0.540415f, 0.148759f}, + {0.719331f, 0.324379f}, + {0.719331f, 0.148759f}, + {0.719331f, 0.324379f}, + {0.836757f, 0.324379f}, + {0.836757f, 0.148759f}, + {0.719331f, 0.148759f}, + { 1.0f, 0.324379f}, + { 1.0f, 0.148759f}, + { 0.0f, 0.324379f}, + {0.174348f, 0.324379f}, + {0.174348f, 0.148759f}, + { 0.0f, 0.148759f}, + {0.315185f, 0.324379f}, + {0.315185f, 0.148759f}, + {0.315185f, 0.324379f}, + {0.439994f, 0.324379f}, + {0.439994f, 0.148759f}, + {0.315185f, 0.148759f}, + {0.560006f, 0.324379f}, + {0.560006f, 0.148759f}, + {0.560006f, 0.324379f}, + {0.684815f, 0.324379f}, + {0.684815f, 0.148759f}, + {0.560006f, 0.148759f}, + {0.825652f, 0.324379f}, + {0.825652f, 0.148759f}, + {0.825652f, 0.324379f}, + { 1.0f, 0.324379f}, + { 1.0f, 0.148759f}, + {0.825652f, 0.148759f}, + {0.163243f, 0.324379f}, + {0.163243f, 0.148759f}, + {0.280669f, 0.0f}, + {0.163243f, 0.0f}, + {0.375525f, 0.0f}, + {0.459585f, 0.0f}, + {0.375525f, 0.0f}, + {0.540415f, 0.0f}, + {0.624475f, 0.0f}, + {0.540415f, 0.0f}, + {0.719331f, 0.0f}, + {0.836757f, 0.0f}, + {0.719331f, 0.0f}, + { 1.0f, 0.0f}, + {0.174348f, 0.0f}, + { 0.0f, 0.0f}, + {0.315185f, 0.0f}, + {0.439994f, 0.0f}, + {0.315185f, 0.0f}, + {0.560006f, 0.0f}, + {0.684815f, 0.0f}, + {0.560006f, 0.0f}, + {0.825652f, 0.0f}, + { 1.0f, 0.0f}, + {0.825652f, 0.0f}, + {0.163243f, 0.0f}, + { 1.0f, 0.5f}, + {0.163243f, 0.5f}, + {0.163243f, 0.5f}, + {0.280669f, 0.5f}, + {0.375525f, 0.5f}, + {0.375525f, 0.5f}, + {0.459585f, 0.5f}, + {0.540415f, 0.5f}, + {0.540415f, 0.5f}, + {0.624475f, 0.5f}, + {0.719331f, 0.5f}, + {0.719331f, 0.5f}, + {0.836757f, 0.5f}, + { 1.0f, 0.5f}, + { 0.0f, 0.5f}, + {0.174348f, 0.5f}, + {0.315185f, 0.5f}, + {0.315185f, 0.5f}, + {0.439994f, 0.5f}, + {0.560006f, 0.5f}, + {0.560006f, 0.5f}, + {0.684815f, 0.5f}, + {0.825652f, 0.5f}, + {0.825652f, 0.5f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, +}; /* (vertex, uv) index pair of each corner of the 96 quads. */ short l06_second_backdrop_mesh_quad_corner_indices[96][4][2] __asm__("D_L06_001F7EB0") = { @@ -855,10 +2333,10 @@ void effect_quad_draw_single(void) { int quad_source_vertex_index = l06_second_backdrop_mesh_quad_corner_indices[i][j][0]; int quad_source_uv_index = l06_second_backdrop_mesh_quad_corner_indices[i][j][1]; fast_vec_scale(&quad_corner_positions[j], - &D_L06_001F77B0[quad_source_vertex_index], + &l06_second_backdrop_mesh_vertex_positions[quad_source_vertex_index], backdrop_mesh_vertex_position_scale_gp); - uv[j][0] = D_L06_001F84B0[quad_source_uv_index][0]; - uv[j][1] = D_L06_001F84B0[quad_source_uv_index][1]; + uv[j][0] = l06_second_backdrop_mesh_texture_coordinates[quad_source_uv_index][0]; + uv[j][1] = l06_second_backdrop_mesh_texture_coordinates[quad_source_uv_index][1]; } draw_geometry_quad(quad_corner_positions, backdrop_quad_transform_matrix, 0); } From 14e939c0623b806725022971d0d872096ec185de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:03:56 +0000 Subject: [PATCH 122/213] decomp: define the interpolated packet scale tables of seven levels in C --- config/us/levels/data.tsv | 7 + .../rendering/build_interpolated_dma_packet.c | 310 +++++++++++++++++- 2 files changed, 316 insertions(+), 1 deletion(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 52de3e1912..8df0386782 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -6306,6 +6306,7 @@ D_L02_001CAAE4 4 D_L02_001CAAE8 4 D_L02_001CAB14 4 D_L02_001CAE80 24 +D_L02_001CB500 1008 D_L02_001CBDC0 32 D_L02_001CBDCC 2 D_L02_001CBDE0 144 @@ -7337,6 +7338,7 @@ D_L03_001CA5E4 4 D_L03_001CA5E8 4 D_L03_001CA614 4 D_L03_001CA980 24 +D_L03_001CB000 1008 D_L03_001CB4C4 4 D_L03_001CB4C8 4 D_L03_001CB4CC 4 @@ -9583,6 +9585,7 @@ D_L05_001CAD38 4 D_L05_001CADA0 2 D_L05_001CAE00 2 D_L05_001CAFE0 4 +D_L05_001CB380 1008 D_L05_001CB844 4 D_L05_001CB848 4 D_L05_001CB84C 4 @@ -11904,6 +11907,7 @@ D_L07_001CA940 2 D_L07_001CA9A0 2 D_L07_001CAA00 2 D_L07_001CABE0 4 +D_L07_001CAF80 1008 D_L07_001CB444 4 D_L07_001CB448 4 D_L07_001CB44C 4 @@ -13121,6 +13125,7 @@ D_L08_001CACE4 4 D_L08_001CACE8 4 D_L08_001CAD14 4 D_L08_001CB080 24 +D_L08_001CB700 1008 D_L08_001CBBC4 4 D_L08_001CBBC8 4 D_L08_001CBBCC 4 @@ -14389,6 +14394,7 @@ D_L09_001CA664 4 D_L09_001CA668 4 D_L09_001CA694 4 D_L09_001CAA00 24 +D_L09_001CB080 1008 D_L09_001CB544 4 D_L09_001CB548 4 D_L09_001CB54C 4 @@ -20456,6 +20462,7 @@ D_L14_001CABE4 4 D_L14_001CABE8 4 D_L14_001CAC14 4 D_L14_001CAF80 24 +D_L14_001CB600 1008 D_L14_001CBAC4 4 D_L14_001CBAC8 4 D_L14_001CBACC 4 diff --git a/src/overlays/shared/rendering/build_interpolated_dma_packet.c b/src/overlays/shared/rendering/build_interpolated_dma_packet.c index 9dc3a0ca2d..4e27a66e29 100644 --- a/src/overlays/shared/rendering/build_interpolated_dma_packet.c +++ b/src/overlays/shared/rendering/build_interpolated_dma_packet.c @@ -60,7 +60,315 @@ extern u8 scaled_table_output[] __asm__("D_L02_001CB9C0"); extern s32 scaled_table_header_leading_word_gp __asm__("D_L02_001612A0") __attribute__((sda)); -extern float scaled_table_source[] __asm__("D_L02_001CB500"); +/* Four header words, then the 248 values the packet scales. Each level that + holds this code has its own copy (D_LNN_ below). */ +float scaled_table_source[252] __asm__("D_L02_001CB500") = { + 0.0f, 0.0f, 0.0f, 0.0f, -3.0f, -3.0f, + -3.0f, -2.1399999f, -2.1399999f, -3.0f, -2.1399999f, -2.1399999f, + -1.29f, -3.0f, -1.29f, -2.1399999f, -0.43000007f, -3.0f, + -0.43000007f, -2.1399999f, 0.43000007f, -3.0f, 0.43000007f, -2.1399999f, + 1.29f, -3.0f, 1.29f, -2.1399999f, 2.1399999f, -3.0f, + 2.1399999f, -2.1399999f, 3.0f, -3.0f, 3.0f, -2.1399999f, + 3.0f, -2.1399999f, -3.0f, -2.1399999f, -3.0f, -2.1399999f, + -3.0f, -1.29f, -2.1399999f, -2.1399999f, -2.1399999f, -1.29f, + -1.29f, -2.1399999f, -1.29f, -1.29f, -0.43000007f, -2.1399999f, + -0.43000007f, -1.29f, 0.43000007f, -2.1399999f, 0.43000007f, -1.29f, + 1.29f, -2.1399999f, 1.29f, -1.29f, 2.1399999f, -2.1399999f, + 2.1399999f, -1.29f, 3.0f, -2.1399999f, 3.0f, -1.29f, + 3.0f, -1.29f, -3.0f, -1.29f, -3.0f, -1.29f, + -3.0f, -0.43000007f, -2.1399999f, -1.29f, -2.1399999f, -0.43000007f, + -1.29f, -1.29f, -1.29f, -0.43000007f, -0.43000007f, -1.29f, + -0.43000007f, -0.43000007f, 0.43000007f, -1.29f, 0.43000007f, -0.43000007f, + 1.29f, -1.29f, 1.29f, -0.43000007f, 2.1399999f, -1.29f, + 2.1399999f, -0.43000007f, 3.0f, -1.29f, 3.0f, -0.43000007f, + 3.0f, -0.43000007f, -3.0f, -0.43000007f, -3.0f, -0.43000007f, + -3.0f, 0.43000007f, -2.1399999f, -0.43000007f, -2.1399999f, 0.43000007f, + -1.29f, -0.43000007f, -1.29f, 0.43000007f, -0.43000007f, -0.43000007f, + -0.43000007f, 0.43000007f, 0.43000007f, -0.43000007f, 0.43000007f, 0.43000007f, + 1.29f, -0.43000007f, 1.29f, 0.43000007f, 2.1399999f, -0.43000007f, + 2.1399999f, 0.43000007f, 3.0f, -0.43000007f, 3.0f, 0.43000007f, + 3.0f, 0.43000007f, -3.0f, 0.43000007f, -3.0f, 0.43000007f, + -3.0f, 1.29f, -2.1399999f, 0.43000007f, -2.1399999f, 1.29f, + -1.29f, 0.43000007f, -1.29f, 1.29f, -0.43000007f, 0.43000007f, + -0.43000007f, 1.29f, 0.43000007f, 0.43000007f, 0.43000007f, 1.29f, + 1.29f, 0.43000007f, 1.29f, 1.29f, 2.1399999f, 0.43000007f, + 2.1399999f, 1.29f, 3.0f, 0.43000007f, 3.0f, 1.29f, + 3.0f, 1.29f, -3.0f, 1.29f, -3.0f, 1.29f, + -3.0f, 2.1399999f, -2.1399999f, 1.29f, -2.1399999f, 2.1399999f, + -1.29f, 1.29f, -1.29f, 2.1399999f, -0.43000007f, 1.29f, + -0.43000007f, 2.1399999f, 0.43000007f, 1.29f, 0.43000007f, 2.1399999f, + 1.29f, 1.29f, 1.29f, 2.1399999f, 2.1399999f, 1.29f, + 2.1399999f, 2.1399999f, 3.0f, 1.29f, 3.0f, 2.1399999f, + 3.0f, 2.1399999f, -3.0f, 2.1399999f, -3.0f, 2.1399999f, + -3.0f, 3.0f, -2.1399999f, 2.1399999f, -2.1399999f, 3.0f, + -1.29f, 2.1399999f, -1.29f, 3.0f, -0.43000007f, 2.1399999f, + -0.43000007f, 3.0f, 0.43000007f, 2.1399999f, 0.43000007f, 3.0f, + 1.29f, 2.1399999f, 1.29f, 3.0f, 2.1399999f, 2.1399999f, + 2.1399999f, 3.0f, 3.0f, 2.1399999f, 3.0f, 3.0f}; + +float D_L03_001CB000[252] = { + 0.0f, 0.0f, 0.0f, 0.0f, -3.0f, -3.0f, + -3.0f, -2.1399999f, -2.1399999f, -3.0f, -2.1399999f, -2.1399999f, + -1.29f, -3.0f, -1.29f, -2.1399999f, -0.43000007f, -3.0f, + -0.43000007f, -2.1399999f, 0.43000007f, -3.0f, 0.43000007f, -2.1399999f, + 1.29f, -3.0f, 1.29f, -2.1399999f, 2.1399999f, -3.0f, + 2.1399999f, -2.1399999f, 3.0f, -3.0f, 3.0f, -2.1399999f, + 3.0f, -2.1399999f, -3.0f, -2.1399999f, -3.0f, -2.1399999f, + -3.0f, -1.29f, -2.1399999f, -2.1399999f, -2.1399999f, -1.29f, + -1.29f, -2.1399999f, -1.29f, -1.29f, -0.43000007f, -2.1399999f, + -0.43000007f, -1.29f, 0.43000007f, -2.1399999f, 0.43000007f, -1.29f, + 1.29f, -2.1399999f, 1.29f, -1.29f, 2.1399999f, -2.1399999f, + 2.1399999f, -1.29f, 3.0f, -2.1399999f, 3.0f, -1.29f, + 3.0f, -1.29f, -3.0f, -1.29f, -3.0f, -1.29f, + -3.0f, -0.43000007f, -2.1399999f, -1.29f, -2.1399999f, -0.43000007f, + -1.29f, -1.29f, -1.29f, -0.43000007f, -0.43000007f, -1.29f, + -0.43000007f, -0.43000007f, 0.43000007f, -1.29f, 0.43000007f, -0.43000007f, + 1.29f, -1.29f, 1.29f, -0.43000007f, 2.1399999f, -1.29f, + 2.1399999f, -0.43000007f, 3.0f, -1.29f, 3.0f, -0.43000007f, + 3.0f, -0.43000007f, -3.0f, -0.43000007f, -3.0f, -0.43000007f, + -3.0f, 0.43000007f, -2.1399999f, -0.43000007f, -2.1399999f, 0.43000007f, + -1.29f, -0.43000007f, -1.29f, 0.43000007f, -0.43000007f, -0.43000007f, + -0.43000007f, 0.43000007f, 0.43000007f, -0.43000007f, 0.43000007f, 0.43000007f, + 1.29f, -0.43000007f, 1.29f, 0.43000007f, 2.1399999f, -0.43000007f, + 2.1399999f, 0.43000007f, 3.0f, -0.43000007f, 3.0f, 0.43000007f, + 3.0f, 0.43000007f, -3.0f, 0.43000007f, -3.0f, 0.43000007f, + -3.0f, 1.29f, -2.1399999f, 0.43000007f, -2.1399999f, 1.29f, + -1.29f, 0.43000007f, -1.29f, 1.29f, -0.43000007f, 0.43000007f, + -0.43000007f, 1.29f, 0.43000007f, 0.43000007f, 0.43000007f, 1.29f, + 1.29f, 0.43000007f, 1.29f, 1.29f, 2.1399999f, 0.43000007f, + 2.1399999f, 1.29f, 3.0f, 0.43000007f, 3.0f, 1.29f, + 3.0f, 1.29f, -3.0f, 1.29f, -3.0f, 1.29f, + -3.0f, 2.1399999f, -2.1399999f, 1.29f, -2.1399999f, 2.1399999f, + -1.29f, 1.29f, -1.29f, 2.1399999f, -0.43000007f, 1.29f, + -0.43000007f, 2.1399999f, 0.43000007f, 1.29f, 0.43000007f, 2.1399999f, + 1.29f, 1.29f, 1.29f, 2.1399999f, 2.1399999f, 1.29f, + 2.1399999f, 2.1399999f, 3.0f, 1.29f, 3.0f, 2.1399999f, + 3.0f, 2.1399999f, -3.0f, 2.1399999f, -3.0f, 2.1399999f, + -3.0f, 3.0f, -2.1399999f, 2.1399999f, -2.1399999f, 3.0f, + -1.29f, 2.1399999f, -1.29f, 3.0f, -0.43000007f, 2.1399999f, + -0.43000007f, 3.0f, 0.43000007f, 2.1399999f, 0.43000007f, 3.0f, + 1.29f, 2.1399999f, 1.29f, 3.0f, 2.1399999f, 2.1399999f, + 2.1399999f, 3.0f, 3.0f, 2.1399999f, 3.0f, 3.0f}; + +float D_L05_001CB380[252] = { + 0.0f, 0.0f, 0.0f, 0.0f, -3.0f, -3.0f, + -3.0f, -2.1399999f, -2.1399999f, -3.0f, -2.1399999f, -2.1399999f, + -1.29f, -3.0f, -1.29f, -2.1399999f, -0.43000007f, -3.0f, + -0.43000007f, -2.1399999f, 0.43000007f, -3.0f, 0.43000007f, -2.1399999f, + 1.29f, -3.0f, 1.29f, -2.1399999f, 2.1399999f, -3.0f, + 2.1399999f, -2.1399999f, 3.0f, -3.0f, 3.0f, -2.1399999f, + 3.0f, -2.1399999f, -3.0f, -2.1399999f, -3.0f, -2.1399999f, + -3.0f, -1.29f, -2.1399999f, -2.1399999f, -2.1399999f, -1.29f, + -1.29f, -2.1399999f, -1.29f, -1.29f, -0.43000007f, -2.1399999f, + -0.43000007f, -1.29f, 0.43000007f, -2.1399999f, 0.43000007f, -1.29f, + 1.29f, -2.1399999f, 1.29f, -1.29f, 2.1399999f, -2.1399999f, + 2.1399999f, -1.29f, 3.0f, -2.1399999f, 3.0f, -1.29f, + 3.0f, -1.29f, -3.0f, -1.29f, -3.0f, -1.29f, + -3.0f, -0.43000007f, -2.1399999f, -1.29f, -2.1399999f, -0.43000007f, + -1.29f, -1.29f, -1.29f, -0.43000007f, -0.43000007f, -1.29f, + -0.43000007f, -0.43000007f, 0.43000007f, -1.29f, 0.43000007f, -0.43000007f, + 1.29f, -1.29f, 1.29f, -0.43000007f, 2.1399999f, -1.29f, + 2.1399999f, -0.43000007f, 3.0f, -1.29f, 3.0f, -0.43000007f, + 3.0f, -0.43000007f, -3.0f, -0.43000007f, -3.0f, -0.43000007f, + -3.0f, 0.43000007f, -2.1399999f, -0.43000007f, -2.1399999f, 0.43000007f, + -1.29f, -0.43000007f, -1.29f, 0.43000007f, -0.43000007f, -0.43000007f, + -0.43000007f, 0.43000007f, 0.43000007f, -0.43000007f, 0.43000007f, 0.43000007f, + 1.29f, -0.43000007f, 1.29f, 0.43000007f, 2.1399999f, -0.43000007f, + 2.1399999f, 0.43000007f, 3.0f, -0.43000007f, 3.0f, 0.43000007f, + 3.0f, 0.43000007f, -3.0f, 0.43000007f, -3.0f, 0.43000007f, + -3.0f, 1.29f, -2.1399999f, 0.43000007f, -2.1399999f, 1.29f, + -1.29f, 0.43000007f, -1.29f, 1.29f, -0.43000007f, 0.43000007f, + -0.43000007f, 1.29f, 0.43000007f, 0.43000007f, 0.43000007f, 1.29f, + 1.29f, 0.43000007f, 1.29f, 1.29f, 2.1399999f, 0.43000007f, + 2.1399999f, 1.29f, 3.0f, 0.43000007f, 3.0f, 1.29f, + 3.0f, 1.29f, -3.0f, 1.29f, -3.0f, 1.29f, + -3.0f, 2.1399999f, -2.1399999f, 1.29f, -2.1399999f, 2.1399999f, + -1.29f, 1.29f, -1.29f, 2.1399999f, -0.43000007f, 1.29f, + -0.43000007f, 2.1399999f, 0.43000007f, 1.29f, 0.43000007f, 2.1399999f, + 1.29f, 1.29f, 1.29f, 2.1399999f, 2.1399999f, 1.29f, + 2.1399999f, 2.1399999f, 3.0f, 1.29f, 3.0f, 2.1399999f, + 3.0f, 2.1399999f, -3.0f, 2.1399999f, -3.0f, 2.1399999f, + -3.0f, 3.0f, -2.1399999f, 2.1399999f, -2.1399999f, 3.0f, + -1.29f, 2.1399999f, -1.29f, 3.0f, -0.43000007f, 2.1399999f, + -0.43000007f, 3.0f, 0.43000007f, 2.1399999f, 0.43000007f, 3.0f, + 1.29f, 2.1399999f, 1.29f, 3.0f, 2.1399999f, 2.1399999f, + 2.1399999f, 3.0f, 3.0f, 2.1399999f, 3.0f, 3.0f}; + +float D_L07_001CAF80[252] = { + 0.0f, 0.0f, 0.0f, 0.0f, -3.0f, -3.0f, + -3.0f, -2.1399999f, -2.1399999f, -3.0f, -2.1399999f, -2.1399999f, + -1.29f, -3.0f, -1.29f, -2.1399999f, -0.43000007f, -3.0f, + -0.43000007f, -2.1399999f, 0.43000007f, -3.0f, 0.43000007f, -2.1399999f, + 1.29f, -3.0f, 1.29f, -2.1399999f, 2.1399999f, -3.0f, + 2.1399999f, -2.1399999f, 3.0f, -3.0f, 3.0f, -2.1399999f, + 3.0f, -2.1399999f, -3.0f, -2.1399999f, -3.0f, -2.1399999f, + -3.0f, -1.29f, -2.1399999f, -2.1399999f, -2.1399999f, -1.29f, + -1.29f, -2.1399999f, -1.29f, -1.29f, -0.43000007f, -2.1399999f, + -0.43000007f, -1.29f, 0.43000007f, -2.1399999f, 0.43000007f, -1.29f, + 1.29f, -2.1399999f, 1.29f, -1.29f, 2.1399999f, -2.1399999f, + 2.1399999f, -1.29f, 3.0f, -2.1399999f, 3.0f, -1.29f, + 3.0f, -1.29f, -3.0f, -1.29f, -3.0f, -1.29f, + -3.0f, -0.43000007f, -2.1399999f, -1.29f, -2.1399999f, -0.43000007f, + -1.29f, -1.29f, -1.29f, -0.43000007f, -0.43000007f, -1.29f, + -0.43000007f, -0.43000007f, 0.43000007f, -1.29f, 0.43000007f, -0.43000007f, + 1.29f, -1.29f, 1.29f, -0.43000007f, 2.1399999f, -1.29f, + 2.1399999f, -0.43000007f, 3.0f, -1.29f, 3.0f, -0.43000007f, + 3.0f, -0.43000007f, -3.0f, -0.43000007f, -3.0f, -0.43000007f, + -3.0f, 0.43000007f, -2.1399999f, -0.43000007f, -2.1399999f, 0.43000007f, + -1.29f, -0.43000007f, -1.29f, 0.43000007f, -0.43000007f, -0.43000007f, + -0.43000007f, 0.43000007f, 0.43000007f, -0.43000007f, 0.43000007f, 0.43000007f, + 1.29f, -0.43000007f, 1.29f, 0.43000007f, 2.1399999f, -0.43000007f, + 2.1399999f, 0.43000007f, 3.0f, -0.43000007f, 3.0f, 0.43000007f, + 3.0f, 0.43000007f, -3.0f, 0.43000007f, -3.0f, 0.43000007f, + -3.0f, 1.29f, -2.1399999f, 0.43000007f, -2.1399999f, 1.29f, + -1.29f, 0.43000007f, -1.29f, 1.29f, -0.43000007f, 0.43000007f, + -0.43000007f, 1.29f, 0.43000007f, 0.43000007f, 0.43000007f, 1.29f, + 1.29f, 0.43000007f, 1.29f, 1.29f, 2.1399999f, 0.43000007f, + 2.1399999f, 1.29f, 3.0f, 0.43000007f, 3.0f, 1.29f, + 3.0f, 1.29f, -3.0f, 1.29f, -3.0f, 1.29f, + -3.0f, 2.1399999f, -2.1399999f, 1.29f, -2.1399999f, 2.1399999f, + -1.29f, 1.29f, -1.29f, 2.1399999f, -0.43000007f, 1.29f, + -0.43000007f, 2.1399999f, 0.43000007f, 1.29f, 0.43000007f, 2.1399999f, + 1.29f, 1.29f, 1.29f, 2.1399999f, 2.1399999f, 1.29f, + 2.1399999f, 2.1399999f, 3.0f, 1.29f, 3.0f, 2.1399999f, + 3.0f, 2.1399999f, -3.0f, 2.1399999f, -3.0f, 2.1399999f, + -3.0f, 3.0f, -2.1399999f, 2.1399999f, -2.1399999f, 3.0f, + -1.29f, 2.1399999f, -1.29f, 3.0f, -0.43000007f, 2.1399999f, + -0.43000007f, 3.0f, 0.43000007f, 2.1399999f, 0.43000007f, 3.0f, + 1.29f, 2.1399999f, 1.29f, 3.0f, 2.1399999f, 2.1399999f, + 2.1399999f, 3.0f, 3.0f, 2.1399999f, 3.0f, 3.0f}; + +float D_L08_001CB700[252] = { + 0.0f, 0.0f, 0.0f, 0.0f, -3.0f, -3.0f, + -3.0f, -2.1399999f, -2.1399999f, -3.0f, -2.1399999f, -2.1399999f, + -1.29f, -3.0f, -1.29f, -2.1399999f, -0.43000007f, -3.0f, + -0.43000007f, -2.1399999f, 0.43000007f, -3.0f, 0.43000007f, -2.1399999f, + 1.29f, -3.0f, 1.29f, -2.1399999f, 2.1399999f, -3.0f, + 2.1399999f, -2.1399999f, 3.0f, -3.0f, 3.0f, -2.1399999f, + 3.0f, -2.1399999f, -3.0f, -2.1399999f, -3.0f, -2.1399999f, + -3.0f, -1.29f, -2.1399999f, -2.1399999f, -2.1399999f, -1.29f, + -1.29f, -2.1399999f, -1.29f, -1.29f, -0.43000007f, -2.1399999f, + -0.43000007f, -1.29f, 0.43000007f, -2.1399999f, 0.43000007f, -1.29f, + 1.29f, -2.1399999f, 1.29f, -1.29f, 2.1399999f, -2.1399999f, + 2.1399999f, -1.29f, 3.0f, -2.1399999f, 3.0f, -1.29f, + 3.0f, -1.29f, -3.0f, -1.29f, -3.0f, -1.29f, + -3.0f, -0.43000007f, -2.1399999f, -1.29f, -2.1399999f, -0.43000007f, + -1.29f, -1.29f, -1.29f, -0.43000007f, -0.43000007f, -1.29f, + -0.43000007f, -0.43000007f, 0.43000007f, -1.29f, 0.43000007f, -0.43000007f, + 1.29f, -1.29f, 1.29f, -0.43000007f, 2.1399999f, -1.29f, + 2.1399999f, -0.43000007f, 3.0f, -1.29f, 3.0f, -0.43000007f, + 3.0f, -0.43000007f, -3.0f, -0.43000007f, -3.0f, -0.43000007f, + -3.0f, 0.43000007f, -2.1399999f, -0.43000007f, -2.1399999f, 0.43000007f, + -1.29f, -0.43000007f, -1.29f, 0.43000007f, -0.43000007f, -0.43000007f, + -0.43000007f, 0.43000007f, 0.43000007f, -0.43000007f, 0.43000007f, 0.43000007f, + 1.29f, -0.43000007f, 1.29f, 0.43000007f, 2.1399999f, -0.43000007f, + 2.1399999f, 0.43000007f, 3.0f, -0.43000007f, 3.0f, 0.43000007f, + 3.0f, 0.43000007f, -3.0f, 0.43000007f, -3.0f, 0.43000007f, + -3.0f, 1.29f, -2.1399999f, 0.43000007f, -2.1399999f, 1.29f, + -1.29f, 0.43000007f, -1.29f, 1.29f, -0.43000007f, 0.43000007f, + -0.43000007f, 1.29f, 0.43000007f, 0.43000007f, 0.43000007f, 1.29f, + 1.29f, 0.43000007f, 1.29f, 1.29f, 2.1399999f, 0.43000007f, + 2.1399999f, 1.29f, 3.0f, 0.43000007f, 3.0f, 1.29f, + 3.0f, 1.29f, -3.0f, 1.29f, -3.0f, 1.29f, + -3.0f, 2.1399999f, -2.1399999f, 1.29f, -2.1399999f, 2.1399999f, + -1.29f, 1.29f, -1.29f, 2.1399999f, -0.43000007f, 1.29f, + -0.43000007f, 2.1399999f, 0.43000007f, 1.29f, 0.43000007f, 2.1399999f, + 1.29f, 1.29f, 1.29f, 2.1399999f, 2.1399999f, 1.29f, + 2.1399999f, 2.1399999f, 3.0f, 1.29f, 3.0f, 2.1399999f, + 3.0f, 2.1399999f, -3.0f, 2.1399999f, -3.0f, 2.1399999f, + -3.0f, 3.0f, -2.1399999f, 2.1399999f, -2.1399999f, 3.0f, + -1.29f, 2.1399999f, -1.29f, 3.0f, -0.43000007f, 2.1399999f, + -0.43000007f, 3.0f, 0.43000007f, 2.1399999f, 0.43000007f, 3.0f, + 1.29f, 2.1399999f, 1.29f, 3.0f, 2.1399999f, 2.1399999f, + 2.1399999f, 3.0f, 3.0f, 2.1399999f, 3.0f, 3.0f}; + +float D_L09_001CB080[252] = { + 0.0f, 0.0f, 0.0f, 0.0f, -3.0f, -3.0f, + -3.0f, -2.1399999f, -2.1399999f, -3.0f, -2.1399999f, -2.1399999f, + -1.29f, -3.0f, -1.29f, -2.1399999f, -0.43000007f, -3.0f, + -0.43000007f, -2.1399999f, 0.43000007f, -3.0f, 0.43000007f, -2.1399999f, + 1.29f, -3.0f, 1.29f, -2.1399999f, 2.1399999f, -3.0f, + 2.1399999f, -2.1399999f, 3.0f, -3.0f, 3.0f, -2.1399999f, + 3.0f, -2.1399999f, -3.0f, -2.1399999f, -3.0f, -2.1399999f, + -3.0f, -1.29f, -2.1399999f, -2.1399999f, -2.1399999f, -1.29f, + -1.29f, -2.1399999f, -1.29f, -1.29f, -0.43000007f, -2.1399999f, + -0.43000007f, -1.29f, 0.43000007f, -2.1399999f, 0.43000007f, -1.29f, + 1.29f, -2.1399999f, 1.29f, -1.29f, 2.1399999f, -2.1399999f, + 2.1399999f, -1.29f, 3.0f, -2.1399999f, 3.0f, -1.29f, + 3.0f, -1.29f, -3.0f, -1.29f, -3.0f, -1.29f, + -3.0f, -0.43000007f, -2.1399999f, -1.29f, -2.1399999f, -0.43000007f, + -1.29f, -1.29f, -1.29f, -0.43000007f, -0.43000007f, -1.29f, + -0.43000007f, -0.43000007f, 0.43000007f, -1.29f, 0.43000007f, -0.43000007f, + 1.29f, -1.29f, 1.29f, -0.43000007f, 2.1399999f, -1.29f, + 2.1399999f, -0.43000007f, 3.0f, -1.29f, 3.0f, -0.43000007f, + 3.0f, -0.43000007f, -3.0f, -0.43000007f, -3.0f, -0.43000007f, + -3.0f, 0.43000007f, -2.1399999f, -0.43000007f, -2.1399999f, 0.43000007f, + -1.29f, -0.43000007f, -1.29f, 0.43000007f, -0.43000007f, -0.43000007f, + -0.43000007f, 0.43000007f, 0.43000007f, -0.43000007f, 0.43000007f, 0.43000007f, + 1.29f, -0.43000007f, 1.29f, 0.43000007f, 2.1399999f, -0.43000007f, + 2.1399999f, 0.43000007f, 3.0f, -0.43000007f, 3.0f, 0.43000007f, + 3.0f, 0.43000007f, -3.0f, 0.43000007f, -3.0f, 0.43000007f, + -3.0f, 1.29f, -2.1399999f, 0.43000007f, -2.1399999f, 1.29f, + -1.29f, 0.43000007f, -1.29f, 1.29f, -0.43000007f, 0.43000007f, + -0.43000007f, 1.29f, 0.43000007f, 0.43000007f, 0.43000007f, 1.29f, + 1.29f, 0.43000007f, 1.29f, 1.29f, 2.1399999f, 0.43000007f, + 2.1399999f, 1.29f, 3.0f, 0.43000007f, 3.0f, 1.29f, + 3.0f, 1.29f, -3.0f, 1.29f, -3.0f, 1.29f, + -3.0f, 2.1399999f, -2.1399999f, 1.29f, -2.1399999f, 2.1399999f, + -1.29f, 1.29f, -1.29f, 2.1399999f, -0.43000007f, 1.29f, + -0.43000007f, 2.1399999f, 0.43000007f, 1.29f, 0.43000007f, 2.1399999f, + 1.29f, 1.29f, 1.29f, 2.1399999f, 2.1399999f, 1.29f, + 2.1399999f, 2.1399999f, 3.0f, 1.29f, 3.0f, 2.1399999f, + 3.0f, 2.1399999f, -3.0f, 2.1399999f, -3.0f, 2.1399999f, + -3.0f, 3.0f, -2.1399999f, 2.1399999f, -2.1399999f, 3.0f, + -1.29f, 2.1399999f, -1.29f, 3.0f, -0.43000007f, 2.1399999f, + -0.43000007f, 3.0f, 0.43000007f, 2.1399999f, 0.43000007f, 3.0f, + 1.29f, 2.1399999f, 1.29f, 3.0f, 2.1399999f, 2.1399999f, + 2.1399999f, 3.0f, 3.0f, 2.1399999f, 3.0f, 3.0f}; + +float D_L14_001CB600[252] = { + 0.0f, 0.0f, 0.0f, 0.0f, -3.0f, -3.0f, + -3.0f, -2.1399999f, -2.1399999f, -3.0f, -2.1399999f, -2.1399999f, + -1.29f, -3.0f, -1.29f, -2.1399999f, -0.43000007f, -3.0f, + -0.43000007f, -2.1399999f, 0.43000007f, -3.0f, 0.43000007f, -2.1399999f, + 1.29f, -3.0f, 1.29f, -2.1399999f, 2.1399999f, -3.0f, + 2.1399999f, -2.1399999f, 3.0f, -3.0f, 3.0f, -2.1399999f, + 3.0f, -2.1399999f, -3.0f, -2.1399999f, -3.0f, -2.1399999f, + -3.0f, -1.29f, -2.1399999f, -2.1399999f, -2.1399999f, -1.29f, + -1.29f, -2.1399999f, -1.29f, -1.29f, -0.43000007f, -2.1399999f, + -0.43000007f, -1.29f, 0.43000007f, -2.1399999f, 0.43000007f, -1.29f, + 1.29f, -2.1399999f, 1.29f, -1.29f, 2.1399999f, -2.1399999f, + 2.1399999f, -1.29f, 3.0f, -2.1399999f, 3.0f, -1.29f, + 3.0f, -1.29f, -3.0f, -1.29f, -3.0f, -1.29f, + -3.0f, -0.43000007f, -2.1399999f, -1.29f, -2.1399999f, -0.43000007f, + -1.29f, -1.29f, -1.29f, -0.43000007f, -0.43000007f, -1.29f, + -0.43000007f, -0.43000007f, 0.43000007f, -1.29f, 0.43000007f, -0.43000007f, + 1.29f, -1.29f, 1.29f, -0.43000007f, 2.1399999f, -1.29f, + 2.1399999f, -0.43000007f, 3.0f, -1.29f, 3.0f, -0.43000007f, + 3.0f, -0.43000007f, -3.0f, -0.43000007f, -3.0f, -0.43000007f, + -3.0f, 0.43000007f, -2.1399999f, -0.43000007f, -2.1399999f, 0.43000007f, + -1.29f, -0.43000007f, -1.29f, 0.43000007f, -0.43000007f, -0.43000007f, + -0.43000007f, 0.43000007f, 0.43000007f, -0.43000007f, 0.43000007f, 0.43000007f, + 1.29f, -0.43000007f, 1.29f, 0.43000007f, 2.1399999f, -0.43000007f, + 2.1399999f, 0.43000007f, 3.0f, -0.43000007f, 3.0f, 0.43000007f, + 3.0f, 0.43000007f, -3.0f, 0.43000007f, -3.0f, 0.43000007f, + -3.0f, 1.29f, -2.1399999f, 0.43000007f, -2.1399999f, 1.29f, + -1.29f, 0.43000007f, -1.29f, 1.29f, -0.43000007f, 0.43000007f, + -0.43000007f, 1.29f, 0.43000007f, 0.43000007f, 0.43000007f, 1.29f, + 1.29f, 0.43000007f, 1.29f, 1.29f, 2.1399999f, 0.43000007f, + 2.1399999f, 1.29f, 3.0f, 0.43000007f, 3.0f, 1.29f, + 3.0f, 1.29f, -3.0f, 1.29f, -3.0f, 1.29f, + -3.0f, 2.1399999f, -2.1399999f, 1.29f, -2.1399999f, 2.1399999f, + -1.29f, 1.29f, -1.29f, 2.1399999f, -0.43000007f, 1.29f, + -0.43000007f, 2.1399999f, 0.43000007f, 1.29f, 0.43000007f, 2.1399999f, + 1.29f, 1.29f, 1.29f, 2.1399999f, 2.1399999f, 1.29f, + 2.1399999f, 2.1399999f, 3.0f, 1.29f, 3.0f, 2.1399999f, + 3.0f, 2.1399999f, -3.0f, 2.1399999f, -3.0f, 2.1399999f, + -3.0f, 3.0f, -2.1399999f, 2.1399999f, -2.1399999f, 3.0f, + -1.29f, 2.1399999f, -1.29f, 3.0f, -0.43000007f, 2.1399999f, + -0.43000007f, 3.0f, 0.43000007f, 2.1399999f, 0.43000007f, 3.0f, + 1.29f, 2.1399999f, 1.29f, 3.0f, 2.1399999f, 2.1399999f, + 2.1399999f, 3.0f, 3.0f, 2.1399999f, 3.0f, 3.0f}; extern void FUN_L02_002a4058_u(char *arg, int val) __asm__("FUN_L02_002a4058"); From d8f6ff2b965e2c42f177dfd00e57e17992a7f5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:05:44 +0000 Subject: [PATCH 123/213] decomp: name the enemy target info record and its fields in enemy pvars get_moby_target_info returns pvars[0], which enemies point at pvars+0x20. Its readers name the fields: resolve_moby_hit_response (hit weight, hit kinds, cooldown), auto-aim, blaster, suck cannon and doom bot (size, aim height), the wrench hit sound and the hero look-at tracking (look range, priority and height). Add MobyTargetInfo, use it in those readers and rename unk28/29/2A/30/58/59/5A in the enemy pvars structs. --- .../overlay/shared/mobys/moby_target_info.h | 35 ++++++++++++ src/overlays/l02/mobys/sand_shark.c | 8 +-- src/overlays/l03/mobys/mine_layer.c | 36 ++++++------ src/overlays/l04/mobys/blarg_trooper.c | 36 ++++++------ src/overlays/l05/mobys/extermibot.c | 34 +++++------ src/overlays/l05/mobys/extermitank.c | 42 +++++++------- .../l07/mobys/command_falling_platform.c | 4 +- src/overlays/l07/mobys/mine.c | 10 ++-- src/overlays/l07/mobys/snagglebeast.c | 28 +++++----- src/overlays/l08/mobys/bomber_tank.c | 20 +++---- src/overlays/l11/mobys/psytcopus.c | 12 ++-- src/overlays/l11/mobys/puffoid.c | 16 +++--- src/overlays/l12/mobys/blarg_helicopter.c | 30 +++++----- src/overlays/l12/mobys/helicopter.c | 12 ++-- src/overlays/l13/mobys/blarg_gunner.c | 34 +++++------ src/overlays/l13/mobys/blarg_space_commando.c | 34 +++++------ .../l14/mobys/blarg_heavy_interceptor.c | 32 +++++------ src/overlays/l14/mobys/path_mover.c | 4 +- src/overlays/l15/mobys/helicopter.c | 28 +++++----- src/overlays/l16/mobys/chomper.c | 8 +-- .../l16/mobys/test_dummy_on_hoverboard.c | 4 +- .../shared/enemies/blarg_elite_commando.c | 26 ++++----- .../shared/enemies/blarg_space_commando.c | 42 +++++++------- src/overlays/shared/enemies/frog.c | 28 +++++----- src/overlays/shared/enemies/horny_toad.c | 12 ++-- src/overlays/shared/enemies/plasmabot.c | 56 +++++++++---------- src/overlays/shared/enemies/seeker.c | 28 +++++----- src/overlays/shared/enemies/sentrybot.c | 20 +++---- src/overlays/shared/hero/hero_idle_sequence.c | 20 +++---- .../mobys/select_auto_aim_target_moby.c | 17 ++---- src/overlays/shared/weapons/blaster.c | 22 +++----- src/overlays/shared/weapons/doom_bot.c | 30 ++++------ src/overlays/shared/weapons/suckcannon.c | 12 ++-- src/overlays/shared/weapons/wrench.c | 15 ++--- 34 files changed, 405 insertions(+), 390 deletions(-) create mode 100644 include/rnc/overlay/shared/mobys/moby_target_info.h diff --git a/include/rnc/overlay/shared/mobys/moby_target_info.h b/include/rnc/overlay/shared/mobys/moby_target_info.h new file mode 100644 index 0000000000..55811d417c --- /dev/null +++ b/include/rnc/overlay/shared/mobys/moby_target_info.h @@ -0,0 +1,35 @@ +#ifndef LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_MOBY_TARGET_INFO_H +#define LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_MOBY_TARGET_INFO_H + +#include "types.h" + +/* The target info record get_moby_target_info returns (pvars[0] of a moby with + flag 0x20). Enemies keep it at pvars+0x20, so their pvars structs spell the + same fields at +0x20: health 0x20, hit_weight 0x28, wrench_hit_sound 0x29, + size 0x2A, aim_height 0x30, look_range 0x58, look_priority 0x59 and + look_height 0x5A. + + Readers: resolve_moby_hit_response (hit_weight, last_hit_kind, hit_kind, + hit_cooldown), select_auto_aim_target_moby (size, aim_height), the blaster, + suck cannon and doom bot (aim_height), get_wrench_hit_sound_variant + (wrench_hit_sound) and update_hero_target_tracking (look_*). */ +typedef struct MobyTargetInfo { + f32 health; /* 0x00 */ + u8 pad4[4]; /* 0x04 */ + u8 hit_weight; /* 0x08: hit response table column, knockback scale row */ + u8 wrench_hit_sound; /* 0x09: 1 picks the wrench's second hit sound */ + u8 size; /* 0x0A: radius in eighths, for auto-aim */ + u8 padB[5]; /* 0x0B */ + f32 aim_height; /* 0x10: height above the moby position that shots aim at */ + s16 last_hit_kind; /* 0x14: kind of the last hit; a different kind clears hit_cooldown */ + s16 hit_kind; /* 0x16: kind of this frame's hit, -1 for none */ + u8 pad18[4]; /* 0x18 */ + s16 hit_cooldown; /* 0x1C: while it runs, repeat hits of the same kind get a weaker response */ + u16 flags; /* 0x1E: 0x80 set on the moby a suck cannon shot is aimed at */ + u8 pad20[0x18]; /* 0x20 */ + u8 look_range; /* 0x38: Ratchet looks at the moby from this close */ + u8 look_priority; /* 0x39: the highest priority in range wins */ + u8 look_height; /* 0x3A: eighths above the moby position that Ratchet looks at */ +} MobyTargetInfo; + +#endif /* LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_MOBY_TARGET_INFO_H */ diff --git a/src/overlays/l02/mobys/sand_shark.c b/src/overlays/l02/mobys/sand_shark.c index ce03e6d23a..313611c06b 100644 --- a/src/overlays/l02/mobys/sand_shark.c +++ b/src/overlays/l02/mobys/sand_shark.c @@ -189,13 +189,13 @@ typedef struct { /* 0x020 */ float health; /* 0x024 */ short unk24; /* 0x026 */ char pad26[3]; - /* 0x029 */ unsigned char unk29; + /* 0x029 */ unsigned char wrench_hit_sound; /* 0x02A */ char pad2A[4]; /* 0x02E */ unsigned char relaunch_request_state; /* 0x02F */ char pad2F[0x11]; /* 0x040 */ OvlVec4 vel; /* 0x050 */ char pad50[8]; - /* 0x058 */ unsigned char unk58; + /* 0x058 */ unsigned char look_range; /* 0x059 */ char pad59[3]; /* 0x05C */ unsigned char unk5C; /* 0x05D */ char pad5D[0x6B]; @@ -339,10 +339,10 @@ void sand_shark_update(struct Moby *moby) { qcopy(&sand_shark_behavior_vars->spawn_position, &moby->pos); sand_shark_behavior_vars->unk24 = 1; sand_shark_behavior_vars->health = 1.0f; - sand_shark_behavior_vars->unk58 = D_L02_00161900; + sand_shark_behavior_vars->look_range = D_L02_00161900; sand_shark_behavior_vars->unk5C = 1; sand_shark_behavior_vars->relaunch_request_state = 1; - sand_shark_behavior_vars->unk29 = 1; + sand_shark_behavior_vars->wrench_hit_sound = 1; sand_shark_behavior_vars->target_range_extension_timer = 0; FUN_L01_0026d930_e50(&sand_shark_behavior_vars->walk_mode); sand_shark_behavior_vars->walk_188 = sand_shark_behavior_vars->walk_18C = 2.0f; diff --git a/src/overlays/l03/mobys/mine_layer.c b/src/overlays/l03/mobys/mine_layer.c index 7ea1d2049a..1798f5ff82 100644 --- a/src/overlays/l03/mobys/mine_layer.c +++ b/src/overlays/l03/mobys/mine_layer.c @@ -37,21 +37,21 @@ typedef struct { /* Pvars of the l03 trooper. */ typedef struct { - u8 pad0[0x20]; - f32 health; /* 0x20 */ - s16 max_health; - u8 pad26[2]; - u8 hit_response_class; - u8 unk29; - u8 pad2A[0xE]; - s32 alerted; /* 0x38: set when it is hit */ - u8 pad3C[4]; - u8 effect[0x18]; /* 0x40: debris record (spawn_explosion, FUN_L00_00259028) */ - u8 unk58; - u8 pad59; - u8 unk5A; - u8 pad5B[5]; - struct HitColorFlash hit_flash; + u8 pad0[0x20]; + f32 health; /* 0x20 */ + s16 max_health; + u8 pad26[2]; + u8 hit_response_class; + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad2A[0xE]; + s32 alerted; /* 0x38: set when it is hit */ + u8 pad3C[4]; + u8 effect[0x18]; /* 0x40: debris record (spawn_explosion, FUN_L00_00259028) */ + u8 look_range; + u8 pad59; + u8 look_height; + u8 pad5B[5]; + struct HitColorFlash hit_flash; struct KnockbackMotion knockback; struct GroundMoveControl walk; /* 0xD0 */ TrooperPatrol patrol; /* 0x120 */ @@ -143,14 +143,14 @@ void mine_layer_update(struct Moby *mine_layer_moby) { mine_layer_vars->walk.max_turn_step = frame_time * 6.2831855f; mine_layer_vars->walk.turn_damping = frame_time_sq * 18.849556f; mine_layer_vars->walk.max_speed = frame_time * 5.0f; - mine_layer_vars->unk58 = 8; - mine_layer_vars->unk5A = 8; + mine_layer_vars->look_range = 8; + mine_layer_vars->look_height = 8; mine_layer_vars->walk.max_climb = 2.0f; mine_layer_vars->walk.max_drop = 2.0f; mine_layer_vars->health = 2.0f; mine_layer_vars->max_health = 2; mine_layer_vars->hit_response_class = 1; - mine_layer_vars->unk29 = 0; + mine_layer_vars->wrench_hit_sound = 0; path = l03_paths[mine_layer_vars->patrol.path_index]; mine_layer_vars->patrol.path = path; qcopy(&mine_layer_moby->pos, &path->points[0]); diff --git a/src/overlays/l04/mobys/blarg_trooper.c b/src/overlays/l04/mobys/blarg_trooper.c index 66e234558c..ebfbbeb65d 100644 --- a/src/overlays/l04/mobys/blarg_trooper.c +++ b/src/overlays/l04/mobys/blarg_trooper.c @@ -19,21 +19,21 @@ #include "rnc/overlay/shared/math/quad.h" typedef struct BlargTrooperVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 unk29; - u8 pad_2A[0x4]; - u8 unk2E; - u8 pad_2F[0x9]; - s32 retimer; - u8 pad_3C[0x1C]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x5]; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad_2A[0x4]; + u8 unk2E; + u8 pad_2F[0x9]; + s32 retimer; + u8 pad_3C[0x1C]; + u8 look_range; + u8 pad_59[0x1]; + u8 look_height; + u8 pad_5B[0x5]; struct HitColorFlash hit_flash; struct KnockbackMotion knockback; f32 fall_speed; @@ -394,16 +394,16 @@ void blarg_trooper_update(struct Moby *moby) { blarg_trooper_pvars->max_health = 2; blarg_trooper_pvars->hit_response_class = 1; blarg_trooper_pvars->unk2E = 1; - blarg_trooper_pvars->unk29 = 1; + blarg_trooper_pvars->wrench_hit_sound = 1; blarg_trooper_pvars->timer_F0 = 0; blarg_trooper_pvars->alert_timer = 0; blarg_trooper_pvars->idle_anim_timer = 0; blarg_trooper_pvars->fall_speed = 0.0f; { float z = moby->pos.z; - blarg_trooper_pvars->unk58 = 8; + blarg_trooper_pvars->look_range = 8; blarg_trooper_pvars->spawn_z = z; - blarg_trooper_pvars->unk5A = 0xA; + blarg_trooper_pvars->look_height = 0xA; } if (rand() & 1) { moby->flags |= 0x8000; diff --git a/src/overlays/l05/mobys/extermibot.c b/src/overlays/l05/mobys/extermibot.c index 6ff920a6a1..68edb4c317 100644 --- a/src/overlays/l05/mobys/extermibot.c +++ b/src/overlays/l05/mobys/extermibot.c @@ -100,19 +100,19 @@ extern char extermibot_strike_flags_selector[] __asm__("D_001404A8"); void extermibot_update(unsigned char *m) __asm__("FUN_L05_00301f48"); typedef struct ExtermibotVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 unk29; - u8 pad_2A[0x6]; - f32 unk30; - u8 pad_34[0x24]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x15]; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad_2A[0x6]; + f32 aim_height; + u8 pad_34[0x24]; + u8 look_range; + u8 pad_59[0x1]; + u8 look_height; + u8 pad_5B[0x15]; struct KnockbackMotion motion; struct GroundMoveControl move; u8 pad_120[0x40]; @@ -179,13 +179,13 @@ void extermibot_update(unsigned char *moby) { MOBY(moby)->flags |= 0x1000; qcopy(&moby_data->home_position, moby + 0x10); moby_data->health = 2.0f; - moby_data->unk29 = 0; + moby_data->wrench_hit_sound = 0; moby_data->target_pursuit_timer = 0; moby_data->hit_response_class = 1; - moby_data->unk30 = 1.0f; + moby_data->aim_height = 1.0f; moby_data->max_health = 2; - moby_data->unk58 = truncate_float_to_s32(14.0f); - moby_data->unk5A = truncate_float_to_s32(11.2f); + moby_data->look_range = truncate_float_to_s32(14.0f); + moby_data->look_height = truncate_float_to_s32(11.2f); init_ground_move_control(&moby_data->move); { float movement_scale = D_L05_00161A98; diff --git a/src/overlays/l05/mobys/extermitank.c b/src/overlays/l05/mobys/extermitank.c index caa73f8a75..9811ec9953 100644 --- a/src/overlays/l05/mobys/extermitank.c +++ b/src/overlays/l05/mobys/extermitank.c @@ -98,24 +98,24 @@ typedef char *(*Spawn_305778)(void *, void *, void *, int, int, long, long, long void extermitank_update(unsigned char *m) __asm__("FUN_L05_00304320"); typedef struct ExtermitankVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 unk29; - u8 pad_2A[0x4]; - u8 lifecycle_state; - u8 pad_2F[0x9]; - s32 retimer; - u8 pad_3C[0x2]; - u16 unk3E; - f32 velocity[4]; - u8 pad_50[0x8]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x5]; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad_2A[0x4]; + u8 lifecycle_state; + u8 pad_2F[0x9]; + s32 retimer; + u8 pad_3C[0x2]; + u16 unk3E; + f32 velocity[4]; + u8 pad_50[0x8]; + u8 look_range; + u8 pad_59[0x1]; + u8 look_height; + u8 pad_5B[0x5]; struct HitColorFlash hit_flash; struct GroundMoveControl mover; s32 path_point; @@ -228,7 +228,7 @@ void extermitank_update(unsigned char *moby) { clear_u64_value(extermitank_vars->velocity); extermitank_vars->unk3E |= 2; extermitank_vars->lifecycle_state = 1; - extermitank_vars->unk29 = 0; + extermitank_vars->wrench_hit_sound = 0; extermitank_vars->max_health = 6; extermitank_vars->hit_response_class = 3; extermitank_vars->health = 6.0f; @@ -237,9 +237,9 @@ void extermitank_update(unsigned char *moby) { { float t = *(volatile float *)&D_L05_00161B78; extermitank_vars->turret_yaw = *(volatile float *)(moby + 0x48); - extermitank_vars->unk58 = truncate_float_to_s32(t); + extermitank_vars->look_range = truncate_float_to_s32(t); } - extermitank_vars->unk5A = truncate_float_to_s32(D_L05_00161B7C * 8.0f); + extermitank_vars->look_height = truncate_float_to_s32(D_L05_00161B7C * 8.0f); break; } case EXTERMITANK_FOLLOW_PATH: { diff --git a/src/overlays/l07/mobys/command_falling_platform.c b/src/overlays/l07/mobys/command_falling_platform.c index 869f5b1a28..611c6302bd 100644 --- a/src/overlays/l07/mobys/command_falling_platform.c +++ b/src/overlays/l07/mobys/command_falling_platform.c @@ -34,7 +34,7 @@ typedef struct CommandFallingPlatformVars { s32 unk20; s16 unk24; u8 pad_26[0x2]; - u8 unk28; + u8 hit_weight; /* 0x28: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad_29[0x15]; s16 unk3E; u8 pad_40[0x20]; @@ -100,7 +100,7 @@ void command_falling_platform_update(char *moby) { case PLATFORM_INITIALIZE: falling_platform_vars->unk20 = 0; falling_platform_vars->unk24 = 0; - falling_platform_vars->unk28 = 4; + falling_platform_vars->hit_weight = 4; falling_platform_vars->unk3E = 13; timer = rand(); if (timer & 1) diff --git a/src/overlays/l07/mobys/mine.c b/src/overlays/l07/mobys/mine.c index 6f88b8588e..c42359ec65 100644 --- a/src/overlays/l07/mobys/mine.c +++ b/src/overlays/l07/mobys/mine.c @@ -79,10 +79,10 @@ typedef struct { /* pvars of a mine. */ typedef struct { - u8 pad0[0x20]; - u8 collision[9]; /* 0x20: contact state for resolve_moby_hit_response */ - u8 unk29; /* 0x29 */ - u8 pad2A[0xE]; + u8 pad0[0x20]; + u8 collision[9]; /* 0x20: contact state for resolve_moby_hit_response */ + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad2A[0xE]; struct Moby *perch; /* 0x38 */ u8 pad3C[0x24]; Vec4 velocity; /* 0x60 */ @@ -220,7 +220,7 @@ void diving_mine_update(struct Moby *moby) { moby->rot.y = 0.0f; moby->rot.z = fast_arc_tan(swooper_instance_vars->goal.f[0] - moby->pos.x, swooper_instance_vars->goal.f[1] - moby->pos.y); - swooper_instance_vars->unk29 = 0; + swooper_instance_vars->wrench_hit_sound = 0; moby->state = MINE_WAIT_AT_GOAL; moby->command = 0; break; diff --git a/src/overlays/l07/mobys/snagglebeast.c b/src/overlays/l07/mobys/snagglebeast.c index 0bc4924e20..52503730a7 100644 --- a/src/overlays/l07/mobys/snagglebeast.c +++ b/src/overlays/l07/mobys/snagglebeast.c @@ -72,17 +72,17 @@ extern void draw_geometry_quad(void *, int, int) __asm__("FUN_001f7d30"); extern float normalize_angle(float) __asm__("FUN_L00_0025e310"); typedef struct SnagglebeastVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - s16 unk26; - u8 pad_28[0x1]; - u8 unk29; - u8 pad_2A[0x2E]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x5]; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + s16 unk26; + u8 pad_28[0x1]; + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad_2A[0x2E]; + u8 look_range; + u8 pad_59[0x1]; + u8 look_height; + u8 pad_5B[0x5]; struct HitColorFlash hit_flash; u8 pad_70[0x14]; s32 unk84; @@ -1263,9 +1263,9 @@ void snagglebeast_update(unsigned char *moby) { MOBY(moby)->scale *= 1.75f; snagglebeast_instance_state->hero_capture_attack_enabled = 0; snagglebeast_instance_state->turn_start_angle = 1.7453293f; - snagglebeast_instance_state->unk29 = 1; - snagglebeast_instance_state->unk58 = truncate_float_to_s32(30.0f); - snagglebeast_instance_state->unk5A = truncate_float_to_s32(40.0f); + snagglebeast_instance_state->wrench_hit_sound = 1; + snagglebeast_instance_state->look_range = truncate_float_to_s32(30.0f); + snagglebeast_instance_state->look_height = truncate_float_to_s32(40.0f); break; case SNAGGLEBEAST_IDLE: if (MOBY(moby)->anim_flags & 2) { diff --git a/src/overlays/l08/mobys/bomber_tank.c b/src/overlays/l08/mobys/bomber_tank.c index 7f482f5df7..d4d482ac85 100644 --- a/src/overlays/l08/mobys/bomber_tank.c +++ b/src/overlays/l08/mobys/bomber_tank.c @@ -103,19 +103,19 @@ typedef struct { f32 health; /* 0x20 */ u8 pad24[4]; u8 hit_response_class; - u8 unk29; - u8 unk2A; + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 size; u8 pad2B[3]; u8 removal_control; /* 0x2E: 2 removes the tank and its parts */ u8 pad2F; - f32 unk30; + f32 aim_height; u8 pad34[0xA]; u16 flags; /* 0x3E */ u64 unk40; u8 pad48[0x10]; - u8 unk58; + u8 look_range; u8 pad59; - u8 unk5A; + u8 look_height; u8 pad5B[5]; u8 entity_matrix[0x90]; Moby *target; /* 0xF0 */ @@ -230,18 +230,18 @@ void bomber_tank_update(Moby *moby) { blend_moby_animation(moby, 1, 0, 0); } clear_u64_value(&bomber_tank_update_vars->unk40); - bomber_tank_update_vars->unk29 = 0; + bomber_tank_update_vars->wrench_hit_sound = 0; bomber_tank_update_vars->hit_response_class = 3; - bomber_tank_update_vars->unk30 = 3.0f; + bomber_tank_update_vars->aim_height = 3.0f; bomber_tank_update_vars->health = 9.0f; - bomber_tank_update_vars->unk2A = 12; + bomber_tank_update_vars->size = 12; bomber_tank_update_vars->removal_control = 1; bomber_tank_update_vars->flags |= 2; clear_u64_value(&bomber_tank_update_vars->unk40); bomber_tank_update_vars->pitch = 0.0f; bomber_tank_update_vars->yaw = moby->rot.z; - bomber_tank_update_vars->unk58 = truncate_float_to_s32(D_L08_001618CC); - bomber_tank_update_vars->unk5A = truncate_float_to_s32(D_L08_001618D0 * 8.0f); + bomber_tank_update_vars->look_range = truncate_float_to_s32(D_L08_001618CC); + bomber_tank_update_vars->look_height = truncate_float_to_s32(D_L08_001618D0 * 8.0f); break; case BOMBER_TANK_STATE_FOLLOW_PATH: advance_bomber_tank_along_path(moby, bomber_tank_update_vars->path); diff --git a/src/overlays/l11/mobys/psytcopus.c b/src/overlays/l11/mobys/psytcopus.c index f7fe75a008..3fe410d467 100644 --- a/src/overlays/l11/mobys/psytcopus.c +++ b/src/overlays/l11/mobys/psytcopus.c @@ -36,11 +36,11 @@ struct PokiPathVars { u8 pad_26[2]; u8 hit_response_class; /* 0x28 */ u8 pad_29; - u8 unk2A; /* 0x2A */ + u8 size; /* 0x2A: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad_2B[0x2D]; - u8 unk58; /* 0x58 */ + u8 look_range; /* 0x58 */ u8 pad_59; - u8 unk5A; /* 0x5A */ + u8 look_height; /* 0x5A */ u8 pad_5B[5]; struct HitColorFlash hit_flash; struct KnockbackMotion knockback; /* 0x70 */ @@ -125,9 +125,9 @@ void psytcopus_update(struct Moby *psytcopus) { psytcopus_vars->max_health = 3; psytcopus_vars->health = 3.0f; psytcopus_vars->hit_response_class = 2; - psytcopus_vars->unk2A = 6; - psytcopus_vars->unk58 = truncate_float_to_s32(8.0f); - psytcopus_vars->unk5A = truncate_float_to_s32(8.0f); + psytcopus_vars->size = 6; + psytcopus_vars->look_range = truncate_float_to_s32(8.0f); + psytcopus_vars->look_height = truncate_float_to_s32(8.0f); psytcopus->state = PSYTCOPUS_STATE_FACE_PLAYER; if (psytcopus->prev_seq != 0) { blend_moby_animation(psytcopus, 0, 0, scale_game_frames(10)); diff --git a/src/overlays/l11/mobys/puffoid.c b/src/overlays/l11/mobys/puffoid.c index 3af21e6064..c736e7bb7e 100644 --- a/src/overlays/l11/mobys/puffoid.c +++ b/src/overlays/l11/mobys/puffoid.c @@ -55,15 +55,15 @@ typedef struct { s16 max_health; /* 0x24 */ u8 pad26[2]; u8 hit_response_class; /* 0x28 */ - u8 unk29; /* 0x29 */ + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad2A[6]; - f32 unk30; /* 0x30 */ + f32 aim_height; /* 0x30 */ u8 pad34[0xC]; f32 vel[4]; /* 0x40: jump velocity; [2] falls by D_L11_001622F0 * frame_time_sq */ u8 pad50[8]; - u8 unk58; /* 0x58 */ + u8 look_range; /* 0x58 */ u8 pad59; - u8 unk5A; /* 0x5A */ + u8 look_height; /* 0x5A */ u8 pad5B[0x6D]; s16 unkC8; /* 0xC8 */ u8 padCA[6]; @@ -157,10 +157,10 @@ void puffoid_update(struct Moby *moby) { puffoid_vars->hp = 2.0f; puffoid_vars->max_health = 2; puffoid_vars->hit_response_class = 1; - puffoid_vars->unk30 = 0.25f; - puffoid_vars->unk58 = truncate_float_to_s32(8.0f); - puffoid_vars->unk5A = truncate_float_to_s32(2.0f); - puffoid_vars->unk29 = 1; + puffoid_vars->aim_height = 0.25f; + puffoid_vars->look_range = truncate_float_to_s32(8.0f); + puffoid_vars->look_height = truncate_float_to_s32(2.0f); + puffoid_vars->wrench_hit_sound = 1; puffoid_vars->unkD0 = &D_L11_001622C0; init_ground_move_control(&puffoid_vars->move_control); puffoid_vars->move_control.max_climb = 0.5f; diff --git a/src/overlays/l12/mobys/blarg_helicopter.c b/src/overlays/l12/mobys/blarg_helicopter.c index 90684bd787..d6e268b323 100644 --- a/src/overlays/l12/mobys/blarg_helicopter.c +++ b/src/overlays/l12/mobys/blarg_helicopter.c @@ -129,17 +129,17 @@ void cache_consecutive_point_distances(int point_data_index) { extern float spring_turn(float *vel, float cur, float target, float k, float d, float max) __asm__("FUN_L00_00258110"); typedef struct BlargHelicopterVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 unk29; - u8 pad_2A[0x2E]; - u8 unk58; - u8 unk59; - u8 unk5A; - u8 pad_5B[0x5]; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad_2A[0x2E]; + u8 look_range; + u8 look_priority; + u8 look_height; + u8 pad_5B[0x5]; struct HitColorFlash hit_flash; f32 velocity[4]; s32 trigger_volume; @@ -253,7 +253,7 @@ void blarg_helicopter_update(struct Moby *moby) { blarg_helicopter_vars->max_health = 6; blarg_helicopter_vars->health = 6.0f; blarg_helicopter_vars->hit_response_class = 2; - blarg_helicopter_vars->unk29 = 0; + blarg_helicopter_vars->wrench_hit_sound = 0; blarg_helicopter_vars->speed = 0.0f; blarg_helicopter_vars->roll_turn_velocity = 0.0f; blarg_helicopter_vars->pitch_turn_velocity = 0.0f; @@ -298,9 +298,9 @@ void blarg_helicopter_update(struct Moby *moby) { is_point_inside_clip_volume(&hero.motion.pos, blarg_helicopter_vars->trigger_volume)) || triggered) { - blarg_helicopter_vars->unk58 = 22; - blarg_helicopter_vars->unk59 = 1; - blarg_helicopter_vars->unk5A = 7; + blarg_helicopter_vars->look_range = 22; + blarg_helicopter_vars->look_priority = 1; + blarg_helicopter_vars->look_height = 7; moby->hit_slot = 255; moby->flags &= 0xffbe; child = blarg_helicopter_vars->commander; diff --git a/src/overlays/l12/mobys/helicopter.c b/src/overlays/l12/mobys/helicopter.c index 9e9d928cc9..1f6229df4b 100644 --- a/src/overlays/l12/mobys/helicopter.c +++ b/src/overlays/l12/mobys/helicopter.c @@ -53,13 +53,13 @@ void process_helicopter_hits_and_reactivation(struct Moby *moby, typedef struct HelicopterVars { u8 pad_0[0x28]; - u8 unk28; + u8 hit_weight; /* 0x28: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad_29[0x1]; - u8 unk2A; + u8 size; u8 unk2B; u8 unk2C; u8 pad_2D[0x3]; - f32 unk30; + f32 aim_height; u8 pad_34[0x2C]; s32 path_node; /* path cursor (initialize_path_descriptor): node, step at +4, nodes at +0x10 */ u8 pad_64[0xC]; @@ -165,10 +165,10 @@ void helicopter_update(char *moby) { if (last_node_index < initial_node_index) initial_node_index = last_node_index; qcopy((moby + 0x10), tbl + initial_node_index * 16 + 0x10); - moby_vars->unk2A = 0x10; - moby_vars->unk28 = 2; + moby_vars->size = 0x10; + moby_vars->hit_weight = 2; moby_vars->unk2C = 0x2C; - moby_vars->unk30 = 1.4f; + moby_vars->aim_height = 1.4f; moby_vars->unk2B = 1; moby_vars->path_node = initial_node_index; MOBY(moby)->state = HELICOPTER_FOLLOW_PATH; diff --git a/src/overlays/l13/mobys/blarg_gunner.c b/src/overlays/l13/mobys/blarg_gunner.c index d357a5437b..40e087c12c 100644 --- a/src/overlays/l13/mobys/blarg_gunner.c +++ b/src/overlays/l13/mobys/blarg_gunner.c @@ -46,20 +46,20 @@ extern void spawn_explosion(void *, int) __asm__("FUN_L00_0025e450"); typedef struct { - void *damage_record; /* creature header: points at health */ - u8 pad4[0x8]; - void *hit_flash_record; /* creature header: points at hit_flash */ - u8 pad10[0x10]; - f32 health; - s16 max_health; - u8 pad26[2]; - u8 hit_response_class; - u8 unk29; - u8 unk2A; - u8 pad2B[5]; - f32 unk30; - u8 pad34[0x2C]; - u8 hit_flash[0x10]; + void *damage_record; /* creature header: points at health */ + u8 pad4[0x8]; + void *hit_flash_record; /* creature header: points at hit_flash */ + u8 pad10[0x10]; + f32 health; + s16 max_health; + u8 pad26[2]; + u8 hit_response_class; + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 size; + u8 pad2B[5]; + f32 aim_height; + u8 pad34[0x2C]; + u8 hit_flash[0x10]; struct Moby *parent; } Vars; @@ -89,10 +89,10 @@ struct Moby *spawn_blarg_turret_child(struct Moby *parent) { child_moby->scale = child_moby->pclass->scale * parent->scale / parent->pclass->scale; child_vars->health = 1.0f; child_vars->max_health = 1; - child_vars->unk29 = 1; - child_vars->unk2A = 3; + child_vars->wrench_hit_sound = 1; + child_vars->size = 3; child_vars->hit_response_class = 0; - child_vars->unk30 = 0.9f; + child_vars->aim_height = 0.9f; update_entity(child_moby); copy_hero_moby_field_38(child_moby); } diff --git a/src/overlays/l13/mobys/blarg_space_commando.c b/src/overlays/l13/mobys/blarg_space_commando.c index 775643616b..c479a25841 100644 --- a/src/overlays/l13/mobys/blarg_space_commando.c +++ b/src/overlays/l13/mobys/blarg_space_commando.c @@ -89,20 +89,20 @@ typedef struct { } Shot; typedef struct { - u8 pad0[0x20]; - f32 health; - s16 max_health; - u8 pad26[2]; - u8 hit_response_class; - u8 pad29[7]; - f32 unk30; - u8 pad34[0x24]; - u8 unk58; - u8 pad59; - u8 unk5A; - u8 pad5B[5]; - Vec4 vel; /* 0x60 */ - u8 pad70[0x50]; + u8 pad0[0x20]; + f32 health; + s16 max_health; + u8 pad26[2]; + u8 hit_response_class; + u8 pad29[7]; + f32 aim_height; /* 0x30: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad34[0x24]; + u8 look_range; + u8 pad59; + u8 look_height; + u8 pad5B[5]; + Vec4 vel; /* 0x60 */ + u8 pad70[0x50]; struct GroundMoveControl ctl; /* 0xC0 */ u8 pad110[0x50]; struct Moby *target; /* 0x160 */ @@ -203,10 +203,10 @@ void blarg_space_commando_update(struct Moby *moby) { case BLARG_SPACE_COMMANDO_INITIALIZE: blarg_space_commando_vars->health = 2.0f; blarg_space_commando_vars->hit_response_class = 1; - blarg_space_commando_vars->unk58 = 12; - blarg_space_commando_vars->unk5A = 8; + blarg_space_commando_vars->look_range = 12; + blarg_space_commando_vars->look_height = 8; blarg_space_commando_vars->max_health = 2; - blarg_space_commando_vars->unk30 = 1.5f; + blarg_space_commando_vars->aim_height = 1.5f; init_ground_move_control(&blarg_space_commando_vars->ctl); blarg_space_commando_vars->ctl.max_drop = 2.0f; blarg_space_commando_vars->ctl.max_climb = 0.5f; diff --git a/src/overlays/l14/mobys/blarg_heavy_interceptor.c b/src/overlays/l14/mobys/blarg_heavy_interceptor.c index fb5f93b680..1893011ffe 100644 --- a/src/overlays/l14/mobys/blarg_heavy_interceptor.c +++ b/src/overlays/l14/mobys/blarg_heavy_interceptor.c @@ -196,20 +196,20 @@ extern Vec4 D_L14_00174560; void blarg_heavy_interceptor_update(struct Moby *m) __asm__("FUN_L14_002ac618"); typedef struct BlargHeavyInterceptorVars { - u8 pad_0[0x20]; - f32 health; - s16 max_health; - u8 pad_26[0x2]; - u8 hit_response_class; - u8 pad_29[0x5]; - u8 removal_status; - u8 pad_2F[0x11]; - f32 unk40[4]; - u8 pad_50[0x8]; - u8 unk58; - u8 pad_59[0x1]; - u8 unk5A; - u8 pad_5B[0x5]; + u8 pad_0[0x20]; + f32 health; + s16 max_health; + u8 pad_26[0x2]; + u8 hit_response_class; + u8 pad_29[0x5]; + u8 removal_status; + u8 pad_2F[0x11]; + f32 unk40[4]; + u8 pad_50[0x8]; + u8 look_range; /* 0x58: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad_59[0x1]; + u8 look_height; + u8 pad_5B[0x5]; struct HitColorFlash hit_flash; s32 turret_group; s32 spawn_path; @@ -318,8 +318,8 @@ void blarg_heavy_interceptor_update(struct Moby *moby) { moby->collision = 0; moby->update_dist = 0xFF; moby->state = INTERCEPTOR_STATE_GROUP_EFFECTS_CONTROLLER; - moby_vars->unk58 = truncate_float_to_s32(17.0f); - moby_vars->unk5A = truncate_float_to_s32(6.0f); + moby_vars->look_range = truncate_float_to_s32(17.0f); + moby_vars->look_height = truncate_float_to_s32(6.0f); moby_vars->group_member_count = count_moby_group_members(moby); return; } diff --git a/src/overlays/l14/mobys/path_mover.c b/src/overlays/l14/mobys/path_mover.c index e3d99269e4..07e2ad6972 100644 --- a/src/overlays/l14/mobys/path_mover.c +++ b/src/overlays/l14/mobys/path_mover.c @@ -19,7 +19,7 @@ typedef struct { s32 unk20; s16 unk24; u8 pad26[2]; - u8 unk28; + u8 hit_weight; /* 0x28: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad29[0x15]; s16 unk3E; u8 pad40[0x20]; @@ -120,7 +120,7 @@ void path_mover_update(struct Moby *moby) { f32 t; Vec4 *points; - path_mover_vars->unk28 = 4; + path_mover_vars->hit_weight = 4; path_mover_vars->unk3E = 5; path_mover_vars->unk20 = 0; path_mover_vars->unk24 = 0; diff --git a/src/overlays/l15/mobys/helicopter.c b/src/overlays/l15/mobys/helicopter.c index 88b872bc45..6c8137f150 100644 --- a/src/overlays/l15/mobys/helicopter.c +++ b/src/overlays/l15/mobys/helicopter.c @@ -319,11 +319,11 @@ typedef struct { u8 pad29[5]; u8 removal_status; /* 0x2E: anything but 1 removes it */ u8 pad2F; - f32 unk30; + f32 aim_height; /* 0x30: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad34[0x24]; - u8 unk58; - u8 unk59; - u8 unk5A; + u8 look_range; + u8 look_priority; + u8 look_height; u8 pad5B[0x75]; u8 turret_yaw_joint[0x40]; u8 turret_pitch_joint[0x50]; @@ -434,7 +434,7 @@ void helicopter_update(struct Moby *moby) { hero.vehicle_mode != HERO_VEHICLE_MODE_GIANT_CLANK) { moby->collision = 0; moby->flags = (moby->flags | 0x41) & 0xEFFF; - helicopter_instance_vars->unk58 = 0; + helicopter_instance_vars->look_range = 0; if (helicopter_instance_vars->pilot != 0) helicopter_instance_vars->pilot->flags |= 0x41; moby->state = HELICOPTER_WAIT_FOR_ACTIVATION; @@ -476,11 +476,11 @@ void helicopter_update(struct Moby *moby) { helicopter_instance_vars->health = 3.0f; helicopter_instance_vars->max_health = truncate_float_to_s32(3.0f); helicopter_instance_vars->hit_response_class = 2; - helicopter_instance_vars->unk58 = 0x19; - helicopter_instance_vars->unk30 = 1.0f; + helicopter_instance_vars->look_range = 0x19; + helicopter_instance_vars->aim_height = 1.0f; helicopter_instance_vars->removal_status = 1; - helicopter_instance_vars->unk59 = 1; - helicopter_instance_vars->unk5A = 6; + helicopter_instance_vars->look_priority = 1; + helicopter_instance_vars->look_height = 6; moby->update_dist = 0xFF; moby->draw_dist = 0x80; if (helicopter_instance_vars->entry_path != -1) { @@ -508,7 +508,7 @@ void helicopter_update(struct Moby *moby) { } moby->collision = 0; moby->flags = (moby->flags | 0x41) & 0xEFFF; - helicopter_instance_vars->unk58 = 0; + helicopter_instance_vars->look_range = 0; if (helicopter_instance_vars->pilot != 0) helicopter_instance_vars->pilot->flags |= 0x41; break; @@ -517,7 +517,7 @@ void helicopter_update(struct Moby *moby) { hero.vehicle_mode != HERO_VEHICLE_MODE_GIANT_CLANK) { moby->collision = 0; moby->flags = (moby->flags | 0x41) & 0xEFFF; - helicopter_instance_vars->unk58 = 0; + helicopter_instance_vars->look_range = 0; if (helicopter_instance_vars->pilot != 0) helicopter_instance_vars->pilot->flags |= 0x41; return; @@ -531,7 +531,7 @@ void helicopter_update(struct Moby *moby) { break; moby->collision = moby->pclass->collision; moby->flags = (moby->flags & 0xFFBE) | 0x1000; - helicopter_instance_vars->unk58 = 0x19; + helicopter_instance_vars->look_range = 0x19; if (helicopter_instance_vars->entry_path != -1) moby->state = HELICOPTER_FOLLOW_ENTRY_PATH; else @@ -543,7 +543,7 @@ void helicopter_update(struct Moby *moby) { break; moby->collision = moby->pclass->collision; moby->flags = (moby->flags & 0xFFBE) | 0x1000; - helicopter_instance_vars->unk58 = 0x19; + helicopter_instance_vars->look_range = 0x19; if (helicopter_instance_vars->entry_path != -1) moby->state = HELICOPTER_FOLLOW_ENTRY_PATH; else @@ -779,7 +779,7 @@ void helicopter_update(struct Moby *moby) { case HELICOPTER_DEAD_WAIT_FOR_RESET: moby->collision = 0; moby->flags = (moby->flags | 0x41) & 0xEFFF; - helicopter_instance_vars->unk58 = 0; + helicopter_instance_vars->look_range = 0; if (helicopter_instance_vars->pilot != 0) helicopter_instance_vars->pilot->flags |= 0x41; D_L15_001BABD0.cleared[(short)moby->save_id] = 0; diff --git a/src/overlays/l16/mobys/chomper.c b/src/overlays/l16/mobys/chomper.c index bd02ab62c7..88b3575284 100644 --- a/src/overlays/l16/mobys/chomper.c +++ b/src/overlays/l16/mobys/chomper.c @@ -75,9 +75,9 @@ typedef struct ChomperVars { u8 pad_26[0x2]; u8 hit_response_class; u8 pad_29[0x2F]; - u8 unk58; + u8 look_range; /* 0x58: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad_59[0x1]; - u8 unk5A; + u8 look_height; u8 pad_5B[0x6D]; u16 unkC8; u8 pad_CA[0x6]; @@ -127,8 +127,8 @@ void chomper_update(struct Moby *chomper_moby) { chomper_moby->state = CHOMPER_WAIT_TO_APPROACH_TARGET; if (chomper_moby->prev_seq != 2) blend_moby_animation(chomper_moby, 2, 0, scale_game_frames(20)); - chomper_data->unk58 = truncate_float_to_s32(8.0f); - chomper_data->unk5A = truncate_float_to_s32(3.2f); + chomper_data->look_range = truncate_float_to_s32(8.0f); + chomper_data->look_height = truncate_float_to_s32(3.2f); break; case CHOMPER_WAIT_TO_APPROACH_TARGET: if (chomper_data->pursuit_target_selection_status != 2) { diff --git a/src/overlays/l16/mobys/test_dummy_on_hoverboard.c b/src/overlays/l16/mobys/test_dummy_on_hoverboard.c index bf9c0c9bd3..55b6d2c6fc 100644 --- a/src/overlays/l16/mobys/test_dummy_on_hoverboard.c +++ b/src/overlays/l16/mobys/test_dummy_on_hoverboard.c @@ -144,7 +144,7 @@ void advance_hoverboard_dummy_path_node(char *patrol_moby) { typedef struct HoverboardDummyVars { u8 pad_0[0x29]; - u8 unk29; + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad_2A[0x1]; u8 unk2B; u8 pad_2C[0x34]; @@ -610,7 +610,7 @@ void test_dummy_on_hoverboard_update(unsigned char *moby) { hoverboard_dummy_data->boost_speed_target *= slow; } hoverboard_dummy_data->bob_phase = random_angle_radians(); - hoverboard_dummy_data->unk29 = 0; + hoverboard_dummy_data->wrench_hit_sound = 0; MOBY(moby)->state = HOVERBOARD_DUMMY_STATE_WAIT_FOR_RACE; break; } diff --git a/src/overlays/shared/enemies/blarg_elite_commando.c b/src/overlays/shared/enemies/blarg_elite_commando.c index 807dd3d305..d4fee5b356 100644 --- a/src/overlays/shared/enemies/blarg_elite_commando.c +++ b/src/overlays/shared/enemies/blarg_elite_commando.c @@ -42,17 +42,17 @@ enum { }; typedef struct L16DamageData { - u8 pad0[0x20]; - float health; - s16 max_health; - u8 pad26[0x2]; - s8 hit_response_class; - s8 unk29; - u8 pad2A[0x6]; - f32 unk30; - u8 pad34[0x4]; - int reset_timer; - u8 pad3C[0x24]; + u8 pad0[0x20]; + float health; + s16 max_health; + u8 pad26[0x2]; + s8 hit_response_class; + s8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad2A[0x6]; + f32 aim_height; + u8 pad34[0x4]; + int reset_timer; + u8 pad3C[0x24]; struct HitColorFlash hit_flash; float knockback[4]; float impulse_time; @@ -242,10 +242,10 @@ void blarg_elite_commando_update(char *commando_moby) { switch (((unsigned char *)commando_moby)[0x20]) { case COMMANDO_STATE_INITIALIZE: *(int *)&commando_data->bobbing_amplitude = 0; - commando_data->unk29 = 1; + commando_data->wrench_hit_sound = 1; commando_data->max_health = 3; commando_data->hit_response_class = 2; - commando_data->unk30 = 1.5f; + commando_data->aim_height = 1.5f; commando_data->health = 3.0f; commando_data->bobbing_x_phase = random_angle_radians(); commando_data->bobbing_y_phase = random_angle_radians(); diff --git a/src/overlays/shared/enemies/blarg_space_commando.c b/src/overlays/shared/enemies/blarg_space_commando.c index 0100365924..82d7c2a8b7 100644 --- a/src/overlays/shared/enemies/blarg_space_commando.c +++ b/src/overlays/shared/enemies/blarg_space_commando.c @@ -44,23 +44,23 @@ typedef struct { /* pvars of blarg_space_commando_update */ typedef struct { - u8 pad0[0x20]; - f32 health; - s16 max_health; - u8 pad26[2]; - u8 hit_response_class; - u8 unk29; - u8 pad2A[6]; - f32 unk30; - u8 pad34[0xC]; - Vec4 unk40; - u8 pad50[8]; - u8 unk58; - u8 pad59; - u8 unk5A; - u8 pad5B[5]; - Vec4 vel; /* 0x60 */ - u8 pad70[0x50]; + u8 pad0[0x20]; + f32 health; + s16 max_health; + u8 pad26[2]; + u8 hit_response_class; + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad2A[6]; + f32 aim_height; + u8 pad34[0xC]; + Vec4 unk40; + u8 pad50[8]; + u8 look_range; + u8 pad59; + u8 look_height; + u8 pad5B[5]; + Vec4 vel; /* 0x60 */ + u8 pad70[0x50]; struct GroundMoveControl ctl; /* 0xC0 */ u8 pad110[0x50]; struct Moby *target; /* 0x160 */ @@ -161,11 +161,11 @@ void blarg_space_commando_update(struct Moby *moby) { case BLARG_COMMANDO_STATE_INITIALIZE: blarg_commando_state->hit_response_class = 1; blarg_commando_state->health = 2.0f; - blarg_commando_state->unk30 = 2.0f; - blarg_commando_state->unk29 = 1; + blarg_commando_state->aim_height = 2.0f; + blarg_commando_state->wrench_hit_sound = 1; blarg_commando_state->max_health = 2; - blarg_commando_state->unk58 = truncate_float_to_s32(12.0f); - blarg_commando_state->unk5A = truncate_float_to_s32(13.6f); + blarg_commando_state->look_range = truncate_float_to_s32(12.0f); + blarg_commando_state->look_height = truncate_float_to_s32(13.6f); init_ground_move_control(&blarg_commando_state->ctl); blarg_commando_state->ctl.max_drop = 2.0f; blarg_commando_state->ctl.max_climb = 0.5f; diff --git a/src/overlays/shared/enemies/frog.c b/src/overlays/shared/enemies/frog.c index 4354cf2fba..c1766ebe01 100644 --- a/src/overlays/shared/enemies/frog.c +++ b/src/overlays/shared/enemies/frog.c @@ -40,17 +40,17 @@ enum { }; typedef struct FrogVars { - u8 pad0[0x29]; - s8 unk29; - u8 pad2A[0x2e]; - s8 unk58; - u8 pad59[0x1]; - s8 unk5A; - u8 pad5B[0x6d]; - s16 unkC8; - u8 padCA[0x6]; - short *unkD0; - u8 padD4[0x4c]; + u8 pad0[0x29]; + s8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad2A[0x2e]; + s8 look_range; + u8 pad59[0x1]; + s8 look_height; + u8 pad5B[0x6d]; + s16 unkC8; + u8 padCA[0x6]; + short *unkD0; + u8 padD4[0x4c]; struct KnockbackMotion knockback; /* 0x120 */ u8 pad180[0x40]; unsigned char *target; @@ -305,8 +305,8 @@ void frog_update(unsigned char *moby) { MOBY(moby)->bolts = MOBY(moby)->bolts / divisor; } MOBY(moby)->flags |= 0x100; - frog_instance_vars->unk58 = truncate_float_to_s32(8.0f); - frog_instance_vars->unk5A = truncate_float_to_s32(3.2f); + frog_instance_vars->look_range = truncate_float_to_s32(8.0f); + frog_instance_vars->look_height = truncate_float_to_s32(3.2f); qcopy(&frog_instance_vars->home_position, &MOBY(moby)->pos); qcopy(&frog_instance_vars->wander_destination, &MOBY(moby)->pos); qcopy(&frog_instance_vars->home_rotation, moby + 0x40); @@ -319,7 +319,7 @@ void frog_update(unsigned char *moby) { frog_instance_vars->approach_stop_distance = wait; frog_instance_vars->glow_animation_phase = random_angle_radians(); frog_instance_vars->unkD0 = D_L06_00161BF0; - frog_instance_vars->unk29 = 1; + frog_instance_vars->wrench_hit_sound = 1; if (frog_instance_vars->spawns_child != 0) { char *child; MOBY(moby)->state = FROG_STATE_WAIT_WITH_CHILD; diff --git a/src/overlays/shared/enemies/horny_toad.c b/src/overlays/shared/enemies/horny_toad.c index 26c79c0651..e1d19338ef 100644 --- a/src/overlays/shared/enemies/horny_toad.c +++ b/src/overlays/shared/enemies/horny_toad.c @@ -52,11 +52,11 @@ typedef struct { typedef struct { u8 pad0[0x29]; - u8 unk29; + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad2A[0x58 - 0x2A]; - u8 unk58; + u8 look_range; u8 pad59; - u8 unk5A; + u8 look_height; u8 pad5B[0x70 - 0x5B]; u8 motion[0x138 - 0x70]; s16 unk138; @@ -223,7 +223,7 @@ void horny_toad_update(Moby *moby) { qcopy(horny_toad_vars->home, (*(ToadVec *)&moby->pos)); if (moby->prev_seq != 1) blend_moby_animation(moby, 1, 0, 0); - horny_toad_vars->unk29 = 1; + horny_toad_vars->wrench_hit_sound = 1; horny_toad_vars->unk140 = &D_L00_00161960; qcopy(horny_toad_vars->wander_center, (*(ToadVec *)&moby->pos)); k = frame_time; @@ -239,8 +239,8 @@ void horny_toad_update(Moby *moby) { horny_toad_vars->wander_radius = 0.75f; } } - horny_toad_vars->unk58 = truncate_float_to_s32(12.0f); - horny_toad_vars->unk5A = truncate_float_to_s32(2.0f); + horny_toad_vars->look_range = truncate_float_to_s32(12.0f); + horny_toad_vars->look_height = truncate_float_to_s32(2.0f); if (horny_toad_vars->path >= 0) { if (horny_toad_vars->wait_path_point_set_index >= 0) { ToadPath *path = toad_paths[horny_toad_vars->path]; diff --git a/src/overlays/shared/enemies/plasmabot.c b/src/overlays/shared/enemies/plasmabot.c index cbf6584a50..a8c5e1913c 100644 --- a/src/overlays/shared/enemies/plasmabot.c +++ b/src/overlays/shared/enemies/plasmabot.c @@ -56,30 +56,30 @@ enum { }; typedef struct PlasmabotVars { - u8 pad0[0x20]; - f32 health; - s16 max_health; - s16 stagger_reaction_duration_frames; - s8 hit_response_class; - s8 unk29; - u8 pad2A[0x6]; - f32 unk30; - u8 pad34[0xc]; - u8 unk40[0x18]; - s8 unk58; - u8 pad59[0x1]; - s8 unk5A; - u8 pad5B[0x5]; - u8 motion[0x18]; - f32 knockback_speed; - f32 knockback_vertical_speed; - s32 knockback_collision_radius; - u8 pad84[0x4]; - f32 knockback_collision_z_offset; - u8 pad8C[0x24]; - f32 knockback_apex_animation_frame; - f32 knockback_landing_animation_frame; - u8 padB8[0x8]; + u8 pad0[0x20]; + f32 health; + s16 max_health; + s16 stagger_reaction_duration_frames; + s8 hit_response_class; + s8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad2A[0x6]; + f32 aim_height; + u8 pad34[0xc]; + u8 unk40[0x18]; + s8 look_range; + u8 pad59[0x1]; + s8 look_height; + u8 pad5B[0x5]; + u8 motion[0x18]; + f32 knockback_speed; + f32 knockback_vertical_speed; + s32 knockback_collision_radius; + u8 pad84[0x4]; + f32 knockback_collision_z_offset; + u8 pad8C[0x24]; + f32 knockback_apex_animation_frame; + f32 knockback_landing_animation_frame; + u8 padB8[0x8]; struct HitColorFlash hit_flash; u8 path_search_point[0x40]; s32 target; /* 0x110: target moby */ @@ -462,12 +462,12 @@ void plasmabot_update(char *moby) { (char *)l14_paths[plasmabot_update_private_vars->path_index] + 0x10); } plasmabot_update_private_vars->hit_response_class = 1; - plasmabot_update_private_vars->unk29 = 0; + plasmabot_update_private_vars->wrench_hit_sound = 0; plasmabot_update_private_vars->health = 2.0f; - plasmabot_update_private_vars->unk30 = 1.25f; + plasmabot_update_private_vars->aim_height = 1.25f; plasmabot_update_private_vars->max_health = 2; - plasmabot_update_private_vars->unk58 = truncate_float_to_s32(15.0f); - plasmabot_update_private_vars->unk5A = truncate_float_to_s32(16.0f); + plasmabot_update_private_vars->look_range = truncate_float_to_s32(15.0f); + plasmabot_update_private_vars->look_height = truncate_float_to_s32(16.0f); plasmabot_update_private_vars->path_traversal_direction = 1.0f; plasmabot_update_private_vars->path_traversal_delay_timer = 0; plasmabot_update_private_vars->heading_angular_velocity = 0; diff --git a/src/overlays/shared/enemies/seeker.c b/src/overlays/shared/enemies/seeker.c index 799c4086ec..7e59200d01 100644 --- a/src/overlays/shared/enemies/seeker.c +++ b/src/overlays/shared/enemies/seeker.c @@ -33,18 +33,18 @@ enum { }; typedef struct { - u8 pad0[0x20]; - f32 health; - s16 max_health; - u8 pad26[2]; - u8 hit_response_class; - u8 pad29[0x2F]; - u8 unk58; - u8 pad59; - u8 unk5A; - u8 pad5B[0x15]; - Vec4 vel; - u8 pad80[0x50]; + u8 pad0[0x20]; + f32 health; + s16 max_health; + u8 pad26[2]; + u8 hit_response_class; + u8 pad29[0x2F]; + u8 look_range; /* 0x58: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad59; + u8 look_height; + u8 pad5B[0x15]; + Vec4 vel; + u8 pad80[0x50]; struct GroundMoveControl move_control; /* 0xD0 */ u8 pad120[0x40]; struct Moby *target; @@ -132,8 +132,8 @@ void seeker_update(struct Moby *moby) { seeker_instance_vars->health = 3.0f; seeker_instance_vars->max_health = 3; seeker_instance_vars->hit_response_class = 2; - seeker_instance_vars->unk5A = 6; - seeker_instance_vars->unk58 = 8; + seeker_instance_vars->look_height = 6; + seeker_instance_vars->look_range = 8; if (seeker_instance_vars->bound_path == -1) { debug_print(seeker_invalid_bound_path_format, moby->save_id); mark_moby_for_removal(moby); diff --git a/src/overlays/shared/enemies/sentrybot.c b/src/overlays/shared/enemies/sentrybot.c index 16318a7e4a..fa1fdffa58 100644 --- a/src/overlays/shared/enemies/sentrybot.c +++ b/src/overlays/shared/enemies/sentrybot.c @@ -81,15 +81,15 @@ typedef struct SentrybotKnockback { } SentrybotKnockback; typedef struct SentrybotVars { - u8 pad0[0x20]; - f32 health; /* 0x20: hit damage is taken from it */ - s16 max_health; - u8 pad26[2]; - u8 hit_response_class; - u8 unk29; - u8 pad2A[0xE]; - s32 hurt; /* 0x38: set when the moby is hit; restarts target_countdown */ - u8 pad3C[0x24]; + u8 pad0[0x20]; + f32 health; /* 0x20: hit damage is taken from it */ + s16 max_health; + u8 pad26[2]; + u8 hit_response_class; + u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad2A[0xE]; + s32 hurt; /* 0x38: set when the moby is hit; restarts target_countdown */ + u8 pad3C[0x24]; struct HitColorFlash hit_flash; SentrybotKnockback knockback; /* 0x70 */ u8 padB0[0x10]; @@ -358,7 +358,7 @@ void sentrybot_update(unsigned char *moby) { sentrybot_instance_data->max_health = 3; sentrybot_instance_data->health = 3.0f; sentrybot_instance_data->hit_response_class = 2; - sentrybot_instance_data->unk29 = 0; + sentrybot_instance_data->wrench_hit_sound = 0; qcopy(&sentrybot_instance_data->home_pos, &MOBY(moby)->pos); sentrybot_instance_data->home_yaw = MOBY(moby)->rot.z; if (sentrybot_instance_data->patrol_pause_duration_frames < 5) diff --git a/src/overlays/shared/hero/hero_idle_sequence.c b/src/overlays/shared/hero/hero_idle_sequence.c index af25d4f31f..9813e74964 100644 --- a/src/overlays/shared/hero/hero_idle_sequence.c +++ b/src/overlays/shared/hero/hero_idle_sequence.c @@ -16,6 +16,7 @@ #include "rnc/math/spherical_offset.h" #include "rnc/world/collision/ground_probe.h" #include "rnc/mobys/get_moby_target_info.h" +#include "rnc/overlay/shared/mobys/moby_target_info.h" #include "rnc/runtime/callbacks/add_draw_callback.h" #include "rnc/mobys/animation/build_moby_bone_transform.h" #include "rnc/overlay/shared/mobys/select_auto_aim_target_moby.h" @@ -3052,7 +3053,8 @@ void update_hero_target_tracking(void) { float bestPri, bestDist; float aim_position_scratch[8]; char *secondary_position; - char *candidate_targeting_metadata, *selected_targeting_metadata, *selected_moby; + MobyTargetInfo *candidate_target_info, *selected_target_info; + char *selected_moby; struct HeroEase *manipulator_table; float yaw_delta, pitch, s; int mode = *(int *)(hero_control_mode_owner + 0x208C); @@ -3068,12 +3070,11 @@ void update_hero_target_tracking(void) { bestPri = 0.0f; best = 0; for (i = 0; (candidate_moby = active_mobies[i]) != 0; i++) { - candidate_targeting_metadata = (char *)get_moby_target_info(candidate_moby); - if (candidate_targeting_metadata != 0) { + candidate_target_info = (MobyTargetInfo *)get_moby_target_info(candidate_moby); + if (candidate_target_info != 0) { float candidate_distance, candidate_yaw_difference, sc, pri; candidate_distance = vector_distance_xy(hero_pos + 0x0, &MOBY(candidate_moby)->pos); - if ((float)*(unsigned char *)(candidate_targeting_metadata + 0x38) < - candidate_distance) + if ((float)candidate_target_info->look_range < candidate_distance) continue; candidate_reference_hero_state = (char *)hero_pos - 0x80; candidate_yaw_difference = fast_difference_between_rotations( @@ -3096,7 +3097,7 @@ void update_hero_target_tracking(void) { if (sc < 0.0f) sc = 0.0f; } - pri = (float)*(unsigned char *)(candidate_targeting_metadata + 0x39); + pri = (float)candidate_target_info->look_priority; if (bestPri < pri) goto upd; if (sc < bestDist) { @@ -3124,10 +3125,9 @@ void update_hero_target_tracking(void) { if (selected_moby == 0) return; qcopy(aim_position_scratch, &MOBY(selected_moby)->pos); - selected_targeting_metadata = (char *)get_moby_target_info(selected_moby); - if (selected_targeting_metadata != 0) - aim_position_scratch[2] += - (float)*(unsigned char *)(selected_targeting_metadata + 0x3A) * 0.125f; + selected_target_info = (MobyTargetInfo *)get_moby_target_info(selected_moby); + if (selected_target_info != 0) + aim_position_scratch[2] += (float)selected_target_info->look_height * 0.125f; transform_hero_local_offset_to_world(&aim_position_scratch[4], 0.3f, 0.0f, 0.85f); yaw_delta = fast_subtract_rotations(fast_arc_tan(aim_position_scratch[0] - aim_position_scratch[4], diff --git a/src/overlays/shared/mobys/select_auto_aim_target_moby.c b/src/overlays/shared/mobys/select_auto_aim_target_moby.c index 034cf13fbd..d0b810cbde 100644 --- a/src/overlays/shared/mobys/select_auto_aim_target_moby.c +++ b/src/overlays/shared/mobys/select_auto_aim_target_moby.c @@ -15,19 +15,12 @@ #include "rnc/math/spherical_offset.h" #include "rnc/rendering/effect_texture.h" #include "rnc/mobys/get_moby_target_info.h" +#include "rnc/overlay/shared/mobys/moby_target_info.h" #include "rnc/mobys/animation/build_moby_bone_transform.h" #include "rnc/overlay/shared/math/random/random_vector.h" #include "rnc/overlay/shared/ui/hud/hud_keep_visible.h" #include "rnc/overlay/shared/mobys/evaluate_moby_animation_pose.h" -/* Record get_moby_target_info returns for a moby: collision size and aim height. */ -typedef struct MobyBound { - u8 pad0[0xA]; - u8 size; /* 0x0A: radius in eighths */ - u8 padb[5]; - f32 height; /* 0x10: aim height above the moby position */ -} MobyBound; - extern struct Moby *suck_moby_list __asm__("D_L00_0015FFE4"); extern u8 D_L00_00166DC0[]; int collision_line(void *, Vec4 *, int, void *, int) __asm__("FUN_001efa68"); @@ -58,14 +51,14 @@ struct Moby *select_auto_aim_target_moby( for (candidate_moby = suck_moby_list; candidate_moby != 0; candidate_moby = candidate_moby->next) { - MobyBound *aim_bounds; - f32 t_yaw, t_pitch, target_distance, aim_angle_error; + MobyTargetInfo *aim_bounds; + f32 t_yaw, t_pitch, target_distance, aim_angle_error; if ((s8)candidate_moby->state < 0) continue; qcopy(&target, &candidate_moby->pos); aim_bounds = get_moby_target_info(candidate_moby); if (aim_bounds) - target.f[2] += aim_bounds->height; + target.f[2] += aim_bounds->aim_height; else target.f[2] += 0.5f; if (!(candidate_moby->flags & 0x1000) || !candidate_moby || !candidate_moby->pclass || @@ -103,7 +96,7 @@ struct Moby *select_auto_aim_target_moby( *pitch = -t_pitch; *yaw = t_yaw; if (aim_bounds) - *height = aim_bounds->height; + *height = aim_bounds->aim_height; else *height = 0.5f; } diff --git a/src/overlays/shared/weapons/blaster.c b/src/overlays/shared/weapons/blaster.c index 33ca870e88..2fa42c7ca3 100644 --- a/src/overlays/shared/weapons/blaster.c +++ b/src/overlays/shared/weapons/blaster.c @@ -7,6 +7,7 @@ #include "rnc/input/pad_state.h" #include "rnc/math/spherical_offset.h" #include "rnc/mobys/get_moby_target_info.h" +#include "rnc/overlay/shared/mobys/moby_target_info.h" #include "rnc/mobys/moby.h" #include "qcopy.h" #include "rnc/math/fast_math.h" @@ -59,11 +60,6 @@ typedef struct BlasterUsage { int levels; } BlasterUsage; -typedef struct AimTarget { - char pad0[0x10]; - float height; -} AimTarget; - typedef struct ShotSpawn { BlasterVec pos; struct Moby *owner; @@ -296,13 +292,13 @@ void blaster_update(struct Moby *moby) { } if (target && blaster_vars->lock == 0) { if (get_ammo(-1)) { - AimTarget *aim = (AimTarget *)get_moby_target_info(target); - float distance = fast_vec_dist(g_debug_camera.position, &target->pos) / 50.0f; - float height; + MobyTargetInfo *aim = (MobyTargetInfo *)get_moby_target_info(target); + float distance = fast_vec_dist(g_debug_camera.position, &target->pos) / 50.0f; + float height; qcopy(&camera_aim_and_effect_scratch.point, &target->pos); height = 0.5f; if (aim) - height = aim->height; + height = aim->aim_height; camera_aim_and_effect_scratch.point.f.z += height; FUN_L00_001edf60_49a8((int)moby, 0xFF0FFF0F, @@ -321,12 +317,12 @@ void blaster_update(struct Moby *moby) { if (use_ammo(-1, 1) && !hero.item_use_locked) { blaster_vars->cooldown = scale_game_frames(6); if (target) { - float speed = frame_time * 40.0f; - AimTarget *aim; + float speed = frame_time * 40.0f; + MobyTargetInfo *aim; qcopy(&aim_point, &target->pos); - aim = (AimTarget *)get_moby_target_info(target); + aim = (MobyTargetInfo *)get_moby_target_info(target); if (aim) - aim_point.f.z += aim->height; + aim_point.f.z += aim->aim_height; else aim_point.f.z += 0.5f; pitch = -fast_arc_tan(vector_distance_xy(&launch, &aim_point), diff --git a/src/overlays/shared/weapons/doom_bot.c b/src/overlays/shared/weapons/doom_bot.c index 17a366cf84..a2211b64bc 100644 --- a/src/overlays/shared/weapons/doom_bot.c +++ b/src/overlays/shared/weapons/doom_bot.c @@ -15,18 +15,12 @@ #include "rnc/overlay/shared/world/collision.h" #include "rnc/world/collision/ground_probe.h" #include "rnc/mobys/get_moby_target_info.h" +#include "rnc/overlay/shared/mobys/moby_target_info.h" #include "rnc/overlay/shared/mobys/find_moby_hit.h" #include "rnc/math/asm_helpers.h" #include "rnc/math/fast_math.h" #include "rnc/overlay/shared/weapons/doom_bot_movement.h" -typedef struct { - char pad0[10]; - unsigned char radius; - char padB[5]; - float height; -} AimInfo; - typedef struct { OvlVec4 target, velocity, previous_position; int timer, age; @@ -178,14 +172,14 @@ void doom_bot_update(struct Moby *moby) { enum { MOBY_STATE_PENDING_REMOVAL = 0xFE }; - OvlVec4 movement_and_detonation_vectors[4]; - float clearance; - DoomBotVars *doom_bot_vars; - struct Moby *target; - AimInfo *aim; - float scale, speed, z, height, reach, angle, distance; - int blocked, move_flags, count, arc_motion_result; - unsigned char old_state; + OvlVec4 movement_and_detonation_vectors[4]; + float clearance; + DoomBotVars *doom_bot_vars; + struct Moby *target; + MobyTargetInfo *aim; + float scale, speed, z, height, reach, angle, distance; + int blocked, move_flags, count, arc_motion_result; + unsigned char old_state; if (!moby || !(doom_bot_vars = (DoomBotVars *)moby->pvars)) return; if (D_L00_0015F5C4 == 2) { @@ -339,11 +333,11 @@ void doom_bot_update(struct Moby *moby) { target = doom_bot_vars->target_moby; if (target && target->state != MOBY_STATE_PENDING_REMOVAL && target->state != 0xFD) { height = target->pos.z; - aim = (AimInfo *)get_moby_target_info((char *)doom_bot_vars->target_moby); + aim = (MobyTargetInfo *)get_moby_target_info((char *)doom_bot_vars->target_moby); reach = speed; if (aim) { - reach = speed + convert_integer_to_float(aim->radius) * 0.125f; - height += aim->height; + reach = speed + convert_integer_to_float(aim->size) * 0.125f; + height += aim->aim_height; } if (fast_vec_dist(&moby->pos, &doom_bot_vars->target_moby->pos) < reach && coll_sphere(&moby->pos, speed, 1, moby)) { diff --git a/src/overlays/shared/weapons/suckcannon.c b/src/overlays/shared/weapons/suckcannon.c index c37f34cee0..e9a2219f2c 100644 --- a/src/overlays/shared/weapons/suckcannon.c +++ b/src/overlays/shared/weapons/suckcannon.c @@ -16,6 +16,7 @@ #include "rnc/math/spherical_offset.h" #include "rnc/game/interpolated_record.h" #include "rnc/mobys/get_moby_target_info.h" +#include "rnc/overlay/shared/mobys/moby_target_info.h" #include "rnc/runtime/callbacks/add_draw_callback.h" #include "rnc/overlay/shared/mobys/find_moby_hit.h" #include "rnc/overlay/shared/mobys/moby_point_position.h" @@ -249,11 +250,6 @@ typedef struct { u8 gold; } SuckItemVariant; /* item 9 (Suck Cannon) is gold */ -typedef struct { - u8 pad[0x10]; - float height; -} SuckAimHeight; - typedef s32 (*Fn_db890)(void *); typedef struct Cb_db890 { @@ -1646,12 +1642,12 @@ void suckcannon_update(SuckMoby *suck_cannon_moby) { candidate_target = suck_moby_list; while (candidate_target) { if (candidate_target->state >= 0 && candidate_target != stored) { - float tyaw, tpitch, dyaw, distance, offangle; - SuckAimHeight *candidate_aim_height; + float tyaw, tpitch, dyaw, distance, offangle; + MobyTargetInfo *candidate_aim_height; qcopy(&aim_and_fire_scratch.fire.point, &candidate_target->pos); candidate_aim_height = get_moby_target_info(candidate_target); if (candidate_aim_height) - aim_and_fire_scratch.fire.point.f.z += candidate_aim_height->height; + aim_and_fire_scratch.fire.point.f.z += candidate_aim_height->aim_height; else aim_and_fire_scratch.fire.point.f.z += 0.5f; if ((candidate_target->flags & 0x1000) && candidate_target && diff --git a/src/overlays/shared/weapons/wrench.c b/src/overlays/shared/weapons/wrench.c index a0a54a7c00..dee0aa6fec 100644 --- a/src/overlays/shared/weapons/wrench.c +++ b/src/overlays/shared/weapons/wrench.c @@ -28,6 +28,7 @@ #include "rnc/input/pad_globals.h" #include "rnc/overlay/shared/pickups/bolt.h" #include "rnc/math/vector.h" +#include "rnc/overlay/shared/mobys/moby_target_info.h" typedef int q_2a7780 __attribute__((mode(TI))); @@ -424,18 +425,18 @@ void update_wrench_animation_from_hero_state(O_002a7c70 *wrench_moby) { /* Ported from rac1-decomp (src/overlays/shared/vendor_002A5138.c: func_L00_002A9030), where it is exact; names translated to the US level program. */ -/* True when the record for coll_hit_moby (get_moby_target_info) has byte 9 equal to 1. */ +/* 1 when the moby the wrench hit asks for the second hit sound (MobyTargetInfo.wrench_hit_sound). */ int get_wrench_hit_sound_variant(void) __asm__("FUN_L00_002a7d90"); int get_wrench_hit_sound_variant(void) { - int record_byte_9_is_one = 0; - char *x = 0; + int second_sound = 0; + MobyTargetInfo *target_info = 0; if (coll_hit_moby != 0) - x = get_moby_target_info(coll_hit_moby); - if (x != 0) - record_byte_9_is_one = *(unsigned char *)(x + 9) == 1; - return record_byte_9_is_one; + target_info = (MobyTargetInfo *)get_moby_target_info(coll_hit_moby); + if (target_info != 0) + second_sound = target_info->wrench_hit_sound == 1; + return second_sound; } /* True when FUN_L00_0025c338((int)coll_hit_moby) is set and has flag 2 at 0x1E. */ From f5738b225bb4603ff2ff9d5af70cdadd2baaec27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:12:47 +0000 Subject: [PATCH 124/213] decomp: name the target info fields in the ground melee enemy pvars --- src/overlays/shared/enemies/ground_melee_enemy.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/overlays/shared/enemies/ground_melee_enemy.c b/src/overlays/shared/enemies/ground_melee_enemy.c index b1b2d65d2d..ad4c308345 100644 --- a/src/overlays/shared/enemies/ground_melee_enemy.c +++ b/src/overlays/shared/enemies/ground_melee_enemy.c @@ -48,18 +48,19 @@ typedef struct { } __attribute__((aligned(16))) V_2E39E0; typedef struct { - char pad0[0x20]; + char pad0[0x20]; + /* 0x20: enemy target info, see moby_target_info.h */ float health; short f24; short cooldown; char pad28[1]; - unsigned char f29; + unsigned char wrench_hit_sound; char pad2A[0xE]; int hurt; char pad3C[0x1C]; - unsigned char f58; + unsigned char look_range; char pad59[1]; - unsigned char f5A; + unsigned char look_height; char pad5B[0x6D]; short fC8; char padCA[6]; @@ -335,11 +336,11 @@ void ground_melee_enemy_update(Moby *moby) { case GROUND_ENEMY_STATE_INITIALIZE: qcopy(&ground_enemy_vars->home, &moby->pos); moby->state = GROUND_ENEMY_STATE_IDLE; - ground_enemy_vars->f29 = 0; + ground_enemy_vars->wrench_hit_sound = 0; ground_enemy_vars->health = 1.0f; ground_enemy_vars->f24 = 1; - ground_enemy_vars->f5A = 2; - ground_enemy_vars->f58 = 8; + ground_enemy_vars->look_height = 2; + ground_enemy_vars->look_range = 8; ground_enemy_vars->alert = 0; ground_enemy_vars->f208 = 0; steer_init_2E39E0(&ground_enemy_vars->steer); From ac135e52873497e25d4cbd07d7657469445d58f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:12:53 +0000 Subject: [PATCH 125/213] decomp: name the hero ground move block, doom bot movement fields and board spring angle Doom bots hand hero+0x1EC0 to step_mover, so it is a GroundMoveControl: 0x1ED0 is speed and 0x1ED4 turn velocity (the names were swapped), 0x1ED8 vertical velocity, 0x1EE4 max speed and 0x1F08 the move timer. 0x1F40 is the hop arc's turn velocity (update_arc_motion). DoomBotParams now embeds struct GroundMoveControl, and DoomBotVars gets the matching names. Hero 0x87C/0x858 are an angle and velocity sprung toward 70 degrees on the hoverboard. --- include/rnc/hero/hero.h | 90 ++++++----- src/check/hero_layout_check.c | 16 +- src/overlays/l05/hero/hero_set_state.c | 2 +- .../l05/hero/update_hero_motion_by_state.c | 8 +- src/overlays/l16/hero/hero_set_state.c | 2 +- .../update_hero_motion_for_current_state.c | 8 +- src/overlays/shared/weapons/doom_bot.c | 150 +++++++++--------- .../shared/weapons/doom_bot_movement.c | 28 ++-- 8 files changed, 157 insertions(+), 147 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index f2bf8fb1b2..a337e01eb0 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -492,41 +492,41 @@ struct Hero { s16 race_rank[8]; /* 0x7C0 */ f32 ground_distance_history[0x20]; /* 0x7D0 */ u8 pad_850[0x4]; - f32 board_vertical_speed; /* 0x854 */ - f32 unk858; /* 0x858 */ - f32 hoverboard_speed; /* 0x85C */ - f32 board_gravity; /* 0x860 */ - s32 boost_frames; /* 0x864 */ - f32 boost_speed; /* 0x868 */ - u8 *hoverboard_moby; /* 0x86C */ - s32 unk870; /* 0x870 */ - f32 board_air_yaw; /* 0x874 */ - f32 air_yaw_spring_vel; /* 0x878 */ - f32 unk87C; /* 0x87C */ - s32 trick_hud_handle; /* 0x880 */ - s16 board_boost_active; /* 0x884 */ - s16 landing_turn_delay; /* 0x886 */ - s16 board_jump_land_frames; /* 0x888 */ - s16 prev_air_frames; /* 0x88A */ - u8 steep_jump; /* 0x88C */ - u8 trick_input; /* 0x88D */ - u8 vert_ramp_launch; /* 0x88E */ - u8 air_pose_index; /* 0x88F */ - u8 *unk890; /* 0x890 */ - s32 race_time_frames; /* 0x894: frame counter shown as m:ss.hh on the HUD (FUN_L05_00266710) */ - s16 race_path_node; /* 0x898 */ - s16 race_lap; /* 0x89A: shown + 1 (capped at 3) on the HUD (FUN_L05_00266320) */ - s16 board_jump_frames; /* 0x89C */ - s16 board_jump_cooldown; /* 0x89E */ - f32 board_floor_z; /* 0x8A0 */ - f32 wall_face_yaw; /* 0x8A4 */ - s32 race_score; /* 0x8A8: count shown on the HUD (FUN_L05_00266710) */ - s16 high_jump_window; /* 0x8AC */ - u8 off_course_frames; /* 0x8AE */ - u8 off_course_reset_pending; /* 0x8AF */ - s16 height_ring_count; /* 0x8B0 */ - s16 ground_distance_history_index; /* 0x8B2 */ - void *race_path; /* 0x8B4 */ + f32 board_vertical_speed; /* 0x854 */ + f32 board_spring_angle_velocity; /* 0x858: vendor_spring velocity of board_spring_angle */ + f32 hoverboard_speed; /* 0x85C */ + f32 board_gravity; /* 0x860 */ + s32 boost_frames; /* 0x864 */ + f32 boost_speed; /* 0x868 */ + u8 *hoverboard_moby; /* 0x86C */ + s32 unk870; /* 0x870 */ + f32 board_air_yaw; /* 0x874 */ + f32 air_yaw_spring_vel; /* 0x878 */ + f32 board_spring_angle; /* 0x87C: sprung toward 70 degrees on the board, faster while boosting */ + s32 trick_hud_handle; /* 0x880 */ + s16 board_boost_active; /* 0x884 */ + s16 landing_turn_delay; /* 0x886 */ + s16 board_jump_land_frames; /* 0x888 */ + s16 prev_air_frames; /* 0x88A */ + u8 steep_jump; /* 0x88C */ + u8 trick_input; /* 0x88D */ + u8 vert_ramp_launch; /* 0x88E */ + u8 air_pose_index; /* 0x88F */ + u8 *unk890; /* 0x890 */ + s32 race_time_frames; /* 0x894: frame counter shown as m:ss.hh on the HUD (FUN_L05_00266710) */ + s16 race_path_node; /* 0x898 */ + s16 race_lap; /* 0x89A: shown + 1 (capped at 3) on the HUD (FUN_L05_00266320) */ + s16 board_jump_frames; /* 0x89C */ + s16 board_jump_cooldown; /* 0x89E */ + f32 board_floor_z; /* 0x8A0 */ + f32 wall_face_yaw; /* 0x8A4 */ + s32 race_score; /* 0x8A8: count shown on the HUD (FUN_L05_00266710) */ + s16 high_jump_window; /* 0x8AC */ + u8 off_course_frames; /* 0x8AE */ + u8 off_course_reset_pending; /* 0x8AF */ + s16 height_ring_count; /* 0x8B0 */ + s16 ground_distance_history_index; /* 0x8B2 */ + void *race_path; /* 0x8B4 */ union { f32 f; s32 i; @@ -737,23 +737,25 @@ struct Hero { s16 unk1EB0; /* 0x1EB0 */ s16 unk1EB2; /* 0x1EB2: once flag for queueing FUN_L00_00207d40 */ u8 pad_1EB4[0x1C]; - /* 0x1EC0..0x1F44: the moby walk and hop parameters doom bots copy in and out - (save_state_fields_to_hero, initialize_moby_hop_trajectory) */ - f32 move_turn_velocity; /* 0x1ED0: DoomBotVars.turn_velocity */ - f32 move_speed; /* 0x1ED4: DoomBotVars.movement_speed */ - f32 unk1ED8; /* 0x1ED8 */ + /* 0x1EC0..0x1F10: a struct GroundMoveControl (ground_move_control.h) that doom + bots hand to step_mover; 0x1F10..0x1F50: the hop arc state update_arc_motion + steps. Doom bots copy their own copies of the fields in and out + (save_state_fields_to_hero, save_state_vector_and_fields_to_hero). */ + f32 move_speed; /* 0x1ED0: GroundMoveControl.speed */ + f32 move_turn_velocity; /* 0x1ED4: GroundMoveControl.turn_velocity */ + f32 move_vertical_velocity; /* 0x1ED8: GroundMoveControl.vertical_velocity */ u8 pad_1EDC[0x8]; - f32 move_turn_rate; /* 0x1EE4: DoomBotVars.turn_rate */ + f32 move_max_speed; /* 0x1EE4: GroundMoveControl.max_speed */ u8 pad_1EE8[0x20]; - s32 unk1F08; /* 0x1F08 */ + s32 move_timer; /* 0x1F08: GroundMoveControl.move_timer */ u8 pad_1F0C[0x4]; Vec4 hop_target; /* 0x1F10: landing point */ f32 hop_vertical_speed; /* 0x1F20: launch speed, capped at 7 * frame_time */ f32 hop_horizontal_speed; /* 0x1F24 */ f32 hop_heading; /* 0x1F28: atan2 toward hop_target */ u8 pad_1F2C[0x13]; - s8 hop_mode; /* 0x1F3F: cleared when a hop starts */ - f32 unk1F40; /* 0x1F40 */ + s8 hop_mode; /* 0x1F3F: cleared when a hop starts */ + f32 hop_turn_velocity; /* 0x1F40: spring turn velocity toward hop_heading */ u8 pad_1F44[0x1C]; u8 unk1F60[0x40]; /* 0x1F60: 0x40-byte buffer cleared by FUN_L00_002b58d8 */ u8 unk1FA0[0x40]; /* 0x1FA0: 0x40-byte buffer cleared by FUN_L00_002b58d8 */ diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index 0f1b64248f..a935e1dc31 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -428,17 +428,17 @@ HERO_OFFSET_CHECK(stick_y, 0x1D24); HERO_OFFSET_CHECK(unk1D90, 0x1D90); HERO_OFFSET_CHECK(unk1EB0, 0x1EB0); HERO_OFFSET_CHECK(unk1EB2, 0x1EB2); -HERO_OFFSET_CHECK(move_turn_velocity, 0x1ED0); -HERO_OFFSET_CHECK(move_speed, 0x1ED4); -HERO_OFFSET_CHECK(unk1ED8, 0x1ED8); -HERO_OFFSET_CHECK(move_turn_rate, 0x1EE4); -HERO_OFFSET_CHECK(unk1F08, 0x1F08); +HERO_OFFSET_CHECK(move_speed, 0x1ED0); +HERO_OFFSET_CHECK(move_turn_velocity, 0x1ED4); +HERO_OFFSET_CHECK(move_vertical_velocity, 0x1ED8); +HERO_OFFSET_CHECK(move_max_speed, 0x1EE4); +HERO_OFFSET_CHECK(move_timer, 0x1F08); HERO_OFFSET_CHECK(hop_target, 0x1F10); HERO_OFFSET_CHECK(hop_vertical_speed, 0x1F20); HERO_OFFSET_CHECK(hop_horizontal_speed, 0x1F24); HERO_OFFSET_CHECK(hop_heading, 0x1F28); HERO_OFFSET_CHECK(hop_mode, 0x1F3F); -HERO_OFFSET_CHECK(unk1F40, 0x1F40); +HERO_OFFSET_CHECK(hop_turn_velocity, 0x1F40); HERO_OFFSET_CHECK(unk1F60, 0x1F60); HERO_OFFSET_CHECK(unk1FA0, 0x1FA0); HERO_OFFSET_CHECK(visibomb_missile, 0x1FE0); @@ -547,12 +547,12 @@ HERO_OFFSET_CHECK(ramp_launch_forward, 0x770); HERO_OFFSET_CHECK(tilt_up_dir, 0x780); HERO_OFFSET_CHECK(ground_move_dir, 0x790); HERO_OFFSET_CHECK(board_vertical_speed, 0x854); -HERO_OFFSET_CHECK(unk858, 0x858); +HERO_OFFSET_CHECK(board_spring_angle_velocity, 0x858); HERO_OFFSET_CHECK(hoverboard_speed, 0x85C); HERO_OFFSET_CHECK(boost_frames, 0x864); HERO_OFFSET_CHECK(boost_speed, 0x868); HERO_OFFSET_CHECK(air_yaw_spring_vel, 0x878); -HERO_OFFSET_CHECK(unk87C, 0x87C); +HERO_OFFSET_CHECK(board_spring_angle, 0x87C); HERO_OFFSET_CHECK(board_boost_active, 0x884); HERO_OFFSET_CHECK(landing_turn_delay, 0x886); HERO_OFFSET_CHECK(prev_air_frames, 0x88A); diff --git a/src/overlays/l05/hero/hero_set_state.c b/src/overlays/l05/hero/hero_set_state.c index 95b8a0ba70..f74f20fdec 100644 --- a/src/overlays/l05/hero/hero_set_state.c +++ b/src/overlays/l05/hero/hero_set_state.c @@ -512,7 +512,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { q->hoverboard_moby = (u8 *)m; q->unk890 = (u8 *)moby_pool_4f60 + (*(int *)(*(char **)(m + 0x78) + 0x28) << 8); q->board_gravity = frame_time_sq * 22.0f; - q->unk87C = 1.2217305f; + q->board_spring_angle = 1.2217305f; q->trick_hud_handle = -1; if (alternate_item_available[0] != 0) { hud_release_held_element(); diff --git a/src/overlays/l05/hero/update_hero_motion_by_state.c b/src/overlays/l05/hero/update_hero_motion_by_state.c index 13f223c588..865eead4af 100644 --- a/src/overlays/l05/hero/update_hero_motion_by_state.c +++ b/src/overlays/l05/hero/update_hero_motion_by_state.c @@ -891,8 +891,8 @@ void update_hero_motion_by_state(void) { hero.boost_min_frames = scale_game_frames(20); } hero.board_boost_active = 1; - vendor_spring(&hero.unk87C, - &hero.unk858, + vendor_spring(&hero.board_spring_angle, + &hero.board_spring_angle_velocity, 1.2217305f, frame_scale_sq * 0.01f, frame_scale_sq * 0.3f, @@ -908,8 +908,8 @@ void update_hero_motion_by_state(void) { } } else { hero.board_boost_active = 0; - vendor_spring(&hero.unk87C, - &hero.unk858, + vendor_spring(&hero.board_spring_angle, + &hero.board_spring_angle_velocity, 1.2217305f, frame_scale_sq * 0.007f, frame_scale_sq * 0.3f, diff --git a/src/overlays/l16/hero/hero_set_state.c b/src/overlays/l16/hero/hero_set_state.c index 919349b1c3..c731a41607 100644 --- a/src/overlays/l16/hero/hero_set_state.c +++ b/src/overlays/l16/hero/hero_set_state.c @@ -525,7 +525,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { q->hoverboard_moby = (u8 *)m; q->unk890 = (u8 *)D_L16_0015FFD8 + (*(int *)(*(char **)(m + 0x78) + 0x28) << 8); q->board_gravity = frame_time_sq * 22.0f; - q->unk87C = 1.2217305f; + q->board_spring_angle = 1.2217305f; q->trick_hud_handle = -1; if (alternate_item_available[0] != 0) { hud_release_held_element(); diff --git a/src/overlays/l16/hero/update_hero_motion_for_current_state.c b/src/overlays/l16/hero/update_hero_motion_for_current_state.c index bb44d5859f..c834b8d5c3 100644 --- a/src/overlays/l16/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l16/hero/update_hero_motion_for_current_state.c @@ -1047,8 +1047,8 @@ void update_hero_motion_for_current_state(void) { hero.boost_min_frames = scale_game_frames(20); } hero.board_boost_active = 1; - vendor_spring(&hero.unk87C, - &hero.unk858, + vendor_spring(&hero.board_spring_angle, + &hero.board_spring_angle_velocity, 1.2217305f, frame_scale_sq * 0.01f, frame_scale_sq * 0.3f, @@ -1064,8 +1064,8 @@ void update_hero_motion_for_current_state(void) { } } else { hero.board_boost_active = 0; - vendor_spring(&hero.unk87C, - &hero.unk858, + vendor_spring(&hero.board_spring_angle, + &hero.board_spring_angle_velocity, 1.2217305f, frame_scale_sq * 0.007f, frame_scale_sq * 0.3f, diff --git a/src/overlays/shared/weapons/doom_bot.c b/src/overlays/shared/weapons/doom_bot.c index a2211b64bc..412ab6ab98 100644 --- a/src/overlays/shared/weapons/doom_bot.c +++ b/src/overlays/shared/weapons/doom_bot.c @@ -20,14 +20,15 @@ #include "rnc/math/asm_helpers.h" #include "rnc/math/fast_math.h" #include "rnc/overlay/shared/weapons/doom_bot_movement.h" +#include "rnc/overlay/shared/mobys/ground_move_control.h" typedef struct { OvlVec4 target, velocity, previous_position; int timer, age; struct Moby *target_moby, *last; - float turn_velocity, movement_speed, unknown48; - int unknown4C; - float f50, f54, f58, turn_rate; + float speed, turn_velocity, vertical_velocity; /* 0x40: as GroundMoveControl */ + int move_timer; + float hop_vertical_speed, hop_horizontal_speed, hop_heading, max_speed; struct Moby *owner; float angle; unsigned char mode; @@ -37,24 +38,15 @@ typedef struct { OvlVec4 target; float vertical_speed, horizontal_speed, heading, gravity, radius, launch_frame, landing_lead; unsigned char anim2C, anim2D, anim2E, mode2F; - float turn_velocity, speed, rate, max; + float turn_velocity, turn_spring, turn_damping, max_turn_step; } DoomBotJump; typedef struct { - char pad0[0x1EC0]; - int damage; - float f1EC4, f1EC8, f1ECC, turn_velocity, movement_velocity; - int f1ED8; - float turn_k, turn_d, turn_max, yawlim; - char pad1EEC[4]; - float f1EF0; - char pad1EF4[8]; - float move_k, move_d, move_max; - int f1F08; - char pad1F0C[4]; - DoomBotJump config; - char pad1F50[0x130]; - struct Moby *moby; + char pad0[0x1EC0]; + struct GroundMoveControl move; /* 0x1EC0: handed to step_mover */ + DoomBotJump config; /* 0x1F10: hop arc state for update_arc_motion */ + char pad1F50[0x130]; + struct Moby *moby; } DoomBotParams; void update_entity() __asm__("FUN_L00_00250df8"); @@ -202,42 +194,42 @@ void doom_bot_update(struct Moby *moby) { else moby->anim_speed = 1.0f; if (moby->state != DOOM_BOT_DETONATE) { - int damage = truncate_float_to_s32(scale * 183.296f) + 1; + int collision_radius = truncate_float_to_s32(scale * 183.296f) + 1; DoomBotParams *hp = (DoomBotParams *)&hero; - hp->damage = damage; - hp->f1EF0 = 0; - hp->f1EC4 = scale * 0.198f + 0.02f; + hp->move.collision_radius_1024ths = collision_radius; + hp->move.ground_probe_depth = 0; + hp->move.step_height = scale * 0.198f + 0.02f; if (moby->state == DOOM_BOT_INITIALIZE) { - float frame, turn; + float frame, acceleration; memset(&hp->config, 0, 64); frame = frame_scale; - hp->f1ECC = hp->f1EC8 = scale * 0.25f; - doom_bot_vars->movement_speed = frame * 0.2f; - turn = scale * 0.01f * frame; - doom_bot_vars->turn_velocity = turn; - hp->turn_d = 0.3f; - hp->turn_max = 2.7f; - hp->turn_k = turn; - hp->f1ED8 = 0; - doom_bot_vars->turn_rate = frame * 0.066f * speed; + hp->move.max_climb = hp->move.max_drop = scale * 0.25f; + doom_bot_vars->turn_velocity = frame * 0.2f; + acceleration = scale * 0.01f * frame; + doom_bot_vars->speed = acceleration; + hp->move.brake = 0.3f; + hp->move.max_speed = 2.7f; + hp->move.acceleration = acceleration; + hp->move.vertical_velocity = 0; + doom_bot_vars->max_speed = frame * 0.066f * speed; hp->config.anim2C = 2; hp->config.anim2D = 3; hp->config.anim2E = 4; - hp->yawlim = 3.1415927f; - hp->move_d = frame * 0.01f; - hp->move_k = frame * 0.02f; - hp->move_max = frame * 0.045f; + hp->move.heading_tolerance = 3.1415927f; + hp->move.turn_damping = frame * 0.01f; + hp->move.turn_spring = frame * 0.02f; + hp->move.max_turn_step = frame * 0.045f; hp->config.gravity = frame_time_sq * 29.7f; hp->config.radius = scale * 0.1f; hp->config.launch_frame = 7.5f; hp->config.landing_lead = 11.5f; - hp->config.speed = frame * 0.02f; - hp->config.rate = frame * 0.01f; - hp->config.max = frame * 0.045f; + hp->config.turn_spring = frame * 0.02f; + hp->config.turn_damping = frame * 0.01f; + hp->config.max_turn_step = frame * 0.045f; doom_bot_vars->target_moby = 0; moby->state = DOOM_BOT_INITIAL_FALL; doom_bot_vars->timer = 0; - doom_bot_vars->turn_rate = frame_scale * 0.1f * speed; + doom_bot_vars->max_speed = frame_scale * 0.1f * speed; save_state_fields_to_hero((char *)doom_bot_vars); save_state_vector_and_fields_to_hero((char *)doom_bot_vars); if (moby->prev_seq != 5) @@ -303,8 +295,12 @@ void doom_bot_update(struct Moby *moby) { doom_bot_vars->velocity.f[2] -= frame_time_sq * 9.0f; save_state_fields_to_hero((char *)doom_bot_vars); hp = (DoomBotParams *)&hero; - blocked = move_moby_with_collision_integer_radius( - moby, &doom_bot_vars->velocity, hp->damage, 0, scale * 0.7f, hp->f1EF0) & + blocked = move_moby_with_collision_integer_radius(moby, + &doom_bot_vars->velocity, + hp->move.collision_radius_1024ths, + 0, + scale * 0.7f, + hp->move.ground_probe_depth) & 2; if (blocked) { doom_bot_vars->velocity.f[2] = 0; @@ -351,7 +347,7 @@ void doom_bot_update(struct Moby *moby) { moby, &((DoomBotParams *)&hero)->config, &doom_bot_vars->target_moby->pos); restore_saved_state_fields_from_hero((char *)doom_bot_vars); qcopy(doom_bot_vars, &doom_bot_vars->target_moby->pos); - doom_bot_vars->turn_rate = frame_scale * 0.066f * speed; + doom_bot_vars->max_speed = frame_scale * 0.066f * speed; if (moby->prev_seq != 0) blend_moby_animation(moby, 0, 0, scale_game_frames(2)); moby->state = DOOM_BOT_ALIGN_TO_TARGET; @@ -362,15 +358,16 @@ void doom_bot_update(struct Moby *moby) { if (random_integer_below(4) == 0) doom_bot_vars->target_moby = select_class5_target_or_hero( moby, &movement_and_detonation_vectors[0], &moby->rot, doom_bot_vars->last, 1); - doom_bot_vars->turn_rate = frame_scale * 0.1f * speed; + doom_bot_vars->max_speed = frame_scale * 0.1f * speed; moby->state = DOOM_BOT_MOVE_HIGH_TURN_RATE; if (!doom_bot_vars->target_moby) { angle = random_float_between(-3.1415927f, 3.1415927f); if (random_integer_below(4) == 0) { float step_height = scale * 0.35f; float range = 4.0f; - float radius = - convert_integer_to_float(((DoomBotParams *)&hero)->damage) * 0.0009765625f; + float radius = convert_integer_to_float( + ((DoomBotParams *)&hero)->move.collision_radius_1024ths) * + 0.0009765625f; doom_bot_vars->angle = select_moby_heading_by_collision_probes(moby, &moby->pos, angle, @@ -392,7 +389,7 @@ void doom_bot_update(struct Moby *moby) { !(doom_bot_vars->target_moby->flags & 0x1000))) { doom_bot_vars->target_moby = 0; moby->state = DOOM_BOT_SELECT_MOVEMENT_MODE; - doom_bot_vars->turn_rate = frame_scale * 0.0273f * speed; + doom_bot_vars->max_speed = frame_scale * 0.0273f * speed; break; } old_state = moby->state; @@ -400,12 +397,12 @@ void doom_bot_update(struct Moby *moby) { moby->state = DOOM_BOT_MOVE_LOW_TURN_RATE; if (moby->prev_seq != 6) blend_moby_animation(moby, 6, 0, scale_game_frames(10)); - doom_bot_vars->turn_rate = frame_scale * 0.0273f * speed; + doom_bot_vars->max_speed = frame_scale * 0.0273f * speed; } else { if (random_integer_below(4) == 0 && try_start_moby_hop(moby, doom_bot_vars, &doom_bot_vars->target_moby->pos, 1)) { qcopy(doom_bot_vars, &doom_bot_vars->target_moby->pos); - doom_bot_vars->turn_rate = frame_scale * 0.066f * speed; + doom_bot_vars->max_speed = frame_scale * 0.066f * speed; if (moby->prev_seq != 0) blend_moby_animation(moby, 0, 0, scale_game_frames(2)); moby->state = DOOM_BOT_ALIGN_TO_TARGET; @@ -418,25 +415,26 @@ void doom_bot_update(struct Moby *moby) { moby->state = DOOM_BOT_MOVE_LOW_TURN_RATE; if ((moby->anim_flags & 2) && moby->prev_seq != 6) blend_moby_animation(moby, 6, 0, scale_game_frames(0)); - doom_bot_vars->turn_rate = frame_scale * 0.0273f * speed; + doom_bot_vars->max_speed = frame_scale * 0.0273f * speed; } } if (!(distance < 8.0f) && distance > 20.0f) { moby->state = DOOM_BOT_MOVE_LOW_TURN_RATE; if (moby->prev_seq != 0) blend_moby_animation(moby, 0, 0, scale_game_frames(10)); - doom_bot_vars->turn_rate = frame_scale * 0.0273f * speed; + doom_bot_vars->max_speed = frame_scale * 0.0273f * speed; } else { moby->state = DOOM_BOT_MOVE_HIGH_TURN_RATE; if (moby->prev_seq != 7) blend_moby_animation(moby, 7, 0, scale_game_frames(10)); - doom_bot_vars->turn_rate = frame_scale * 0.1f * speed; + doom_bot_vars->max_speed = frame_scale * 0.1f * speed; } if (random_integer_below(4) == 0) { DoomBotParams *hp = (DoomBotParams *)&hero; Vec4f *target_pos = &doom_bot_vars->target_moby->pos; float range = 4.0f; - float radius = convert_integer_to_float(hp->damage) * 0.0009765625f; + float radius = + convert_integer_to_float(hp->move.collision_radius_1024ths) * 0.0009765625f; doom_bot_vars->angle = select_moby_heading_by_collision_probes(moby, &moby->pos, moby->rot.z, @@ -464,11 +462,11 @@ void doom_bot_update(struct Moby *moby) { { DoomBotParams *hp = (DoomBotParams *)&hero; FUN_L00_00258278(moby, - &doom_bot_vars->movement_speed, + &doom_bot_vars->turn_velocity, doom_bot_vars->angle, - hp->move_k, - hp->move_d, - hp->move_max); + hp->move.turn_spring, + hp->move.turn_damping, + hp->move.max_turn_step); } fast_vec_scale(&movement_and_detonation_vectors[3], &doom_bot_vars->velocity, 5.0f); movement_and_detonation_vectors[3].f[2] = 0; @@ -486,8 +484,10 @@ void doom_bot_update(struct Moby *moby) { (coll_hit.moby && ((struct Moby *)coll_hit.moby)->pclass && ((struct Moby *)coll_hit.moby)->pclass->type == 5)) { z = moby->pos.z; - move_flags = step_mover_2e3f20( - moby, &((DoomBotParams *)&hero)->damage, doom_bot_vars, &doom_bot_vars->velocity); + move_flags = step_mover_2e3f20(moby, + &((DoomBotParams *)&hero)->move.collision_radius_1024ths, + doom_bot_vars, + &doom_bot_vars->velocity); if (absolute_float(moby->pos.z - z) > 1.0f) { moby->pos.z = z; if (probe_moby_raised_sphere_collision((char *)moby, 5, 0)) { @@ -507,7 +507,7 @@ void doom_bot_update(struct Moby *moby) { restore_state_fields_from_hero((char *)doom_bot_vars); if ((move_flags & 2) || clearance < 4.0f) { if (try_start_moby_hop(moby, doom_bot_vars, doom_bot_vars, 0)) { - doom_bot_vars->turn_rate = frame_scale * 0.066f * speed; + doom_bot_vars->max_speed = frame_scale * 0.066f * speed; if (moby->prev_seq != 0) blend_moby_animation(moby, 0, 0, scale_game_frames(2)); moby->state = DOOM_BOT_ALIGN_TO_TARGET; @@ -534,10 +534,14 @@ void doom_bot_update(struct Moby *moby) { float *velocity; DoomBotParams *hp; save_state_fields_to_hero((char *)doom_bot_vars); - velocity = &((DoomBotParams *)&hero)->movement_velocity; + velocity = &((DoomBotParams *)&hero)->move.turn_velocity; hp = (DoomBotParams *)&hero; - FUN_L00_00258278( - moby, velocity, heading, 2.0f * hp->move_k, 0.5f * hp->move_d, 2.0f * hp->move_max); + FUN_L00_00258278(moby, + velocity, + heading, + 2.0f * hp->move.turn_spring, + 0.5f * hp->move.turn_damping, + 2.0f * hp->move.max_turn_step); restore_state_fields_from_hero((char *)doom_bot_vars); if (fast_difference_between_rotations(moby->rot.z, heading) < 0.08726646f) { blend_moby_animation(moby, hp->config.anim2C, 0, scale_game_frames(3)); @@ -553,7 +557,7 @@ void doom_bot_update(struct Moby *moby) { moby->state = arc_motion_result; if (moby->prev_seq != 7) blend_moby_animation(moby, 7, 0, scale_game_frames(3)); - doom_bot_vars->turn_rate = frame_scale * 0.1f * speed; + doom_bot_vars->max_speed = frame_scale * 0.1f * speed; } restore_saved_state_fields_from_hero((char *)doom_bot_vars); absolute_float(moby->pos.z - z); @@ -610,7 +614,7 @@ void doom_bot_update(struct Moby *moby) { moby->state = DOOM_BOT_MOVE_HIGH_TURN_RATE; if (moby->prev_seq != 7) blend_moby_animation(moby, 7, 0, scale_game_frames(10)); - doom_bot_vars->turn_rate = frame_scale * 0.1f * speed; + doom_bot_vars->max_speed = frame_scale * 0.1f * speed; } break; case DOOM_BOT_SQUIRM: @@ -632,8 +636,12 @@ void doom_bot_update(struct Moby *moby) { doom_bot_vars->velocity.f[2] -= frame_time_sq * 9.0f; save_state_fields_to_hero((char *)doom_bot_vars); hp = (DoomBotParams *)&hero; - blocked = move_moby_with_collision_integer_radius( - moby, &doom_bot_vars->velocity, hp->damage, 0, scale * 0.7f, hp->f1EF0) & + blocked = move_moby_with_collision_integer_radius(moby, + &doom_bot_vars->velocity, + hp->move.collision_radius_1024ths, + 0, + scale * 0.7f, + hp->move.ground_probe_depth) & 2; if (blocked) { doom_bot_vars->velocity.f[2] = 0; @@ -654,11 +662,11 @@ void doom_bot_update(struct Moby *moby) { fast_arc_tan(doom_bot_vars->velocity.f[0], doom_bot_vars->velocity.f[1]); DoomBotParams *hp = (DoomBotParams *)&hero; FUN_L00_00258278(moby, - &doom_bot_vars->turn_velocity, + &doom_bot_vars->speed, direction, - hp->turn_k, - hp->turn_d, - hp->turn_max); + hp->move.acceleration, + hp->move.brake, + hp->move.max_speed); /* Fakematch: no-op update of data; it depends on the a1 setup, so a1 is scheduled before a0. */ doom_bot_vars = (DoomBotVars *)((int)doom_bot_vars | ((unsigned char)(int)doom_bot_vars >> 8)); diff --git a/src/overlays/shared/weapons/doom_bot_movement.c b/src/overlays/shared/weapons/doom_bot_movement.c index 80b9f35aef..bbf4646b17 100644 --- a/src/overlays/shared/weapons/doom_bot_movement.c +++ b/src/overlays/shared/weapons/doom_bot_movement.c @@ -170,30 +170,30 @@ int probe_moby_raised_sphere_collision(char *moby, int b, Vx *position_override) /* Ported from rac1-decomp (src/overlays/shared/vendor_002BA7C8.c: func_L00_002BFE98), where it is exact; names translated to the US level program. */ -/* Saves the doom bot turn velocity, speed, words 0x48/0x4C and turn rate into the hero move parameters. */ +/* Saves the doom bot speed, turn velocity, vertical velocity, move timer and max speed into the hero GroundMoveControl. */ void save_state_fields_to_hero(char *source_state) __asm__("FUN_L00_002beb90"); void save_state_fields_to_hero(char *source_state) { struct Hero *hero_state = &hero; - hero_state->move_turn_velocity = *(float *)(source_state + 0x40); - hero_state->move_speed = *(float *)(source_state + 0x44); - hero_state->unk1ED8 = *(float *)(source_state + 0x48); - hero_state->unk1F08 = *(int *)(source_state + 0x4C); - hero_state->move_turn_rate = *(float *)(source_state + 0x5C); + hero_state->move_speed = *(float *)(source_state + 0x40); + hero_state->move_turn_velocity = *(float *)(source_state + 0x44); + hero_state->move_vertical_velocity = *(float *)(source_state + 0x48); + hero_state->move_timer = *(int *)(source_state + 0x4C); + hero_state->move_max_speed = *(float *)(source_state + 0x5C); } /* Ported from rac1-decomp (src/overlays/shared/vendor_002BA7C8.c: func_L00_002BFED0), where it is exact; names translated to the US level program. */ -/* Restores the doom bot turn velocity, speed, words 0x48/0x4C and turn rate from the hero move parameters. */ +/* Restores the doom bot speed, turn velocity, vertical velocity, move timer and max speed from the hero GroundMoveControl. */ void restore_state_fields_from_hero(char *destination_state) __asm__("FUN_L00_002bebc8"); void restore_state_fields_from_hero(char *destination_state) { struct Hero *hero_state = &hero; - *(float *)(destination_state + 0x40) = hero_state->move_turn_velocity; - *(float *)(destination_state + 0x44) = hero_state->move_speed; - *(float *)(destination_state + 0x48) = hero_state->unk1ED8; - *(int *)(destination_state + 0x4C) = hero_state->unk1F08; - *(float *)(destination_state + 0x5C) = hero_state->move_turn_rate; + *(float *)(destination_state + 0x40) = hero_state->move_speed; + *(float *)(destination_state + 0x44) = hero_state->move_turn_velocity; + *(float *)(destination_state + 0x48) = hero_state->move_vertical_velocity; + *(int *)(destination_state + 0x4C) = hero_state->move_timer; + *(float *)(destination_state + 0x5C) = hero_state->move_max_speed; } /* Ported from rac1-decomp (src/overlays/shared/vendor_002BA7C8.c: func_L00_002BFF08), where it is exact; names translated to the US level program. */ @@ -207,7 +207,7 @@ void save_state_vector_and_fields_to_hero(char *source_state) { hero_state->hop_horizontal_speed = *(float *)(source_state + 0x54); hero_state->hop_heading = *(float *)(source_state + 0x58); hero_state->hop_mode = *(char *)(source_state + 0x68); - hero_state->unk1F40 = *(float *)(source_state + 0x44); + hero_state->hop_turn_velocity = *(float *)(source_state + 0x44); qcopy(&hero_state->hop_target, source_state); } @@ -222,7 +222,7 @@ void restore_saved_state_fields_from_hero(char *destination_state) { *(float *)(destination_state + 0x54) = hero_state->hop_horizontal_speed; *(float *)(destination_state + 0x58) = hero_state->hop_heading; *(char *)(destination_state + 0x68) = hero_state->hop_mode; - *(float *)(destination_state + 0x44) = hero_state->unk1F40; + *(float *)(destination_state + 0x44) = hero_state->hop_turn_velocity; } float probe_moby_landing_height(Vec4_2bec80 *probe_position, From 1f538fa75a7a1ee3b26aff43a4d1aa7f13894595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:18:46 +0000 Subject: [PATCH 126/213] decomp: name the doom bot move states after their max speed --- src/overlays/shared/weapons/doom_bot.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/overlays/shared/weapons/doom_bot.c b/src/overlays/shared/weapons/doom_bot.c index 412ab6ab98..325e45585c 100644 --- a/src/overlays/shared/weapons/doom_bot.c +++ b/src/overlays/shared/weapons/doom_bot.c @@ -148,8 +148,8 @@ void doom_bot_update(struct Moby *moby) { DOOM_BOT_WAIT_FOR_ANIMATION_BEFORE_MOVEMENT = 1, DOOM_BOT_SELECT_MOVEMENT_MODE = 2, DOOM_BOT_UPDATE_TARGET_AND_MOVEMENT = 3, - DOOM_BOT_MOVE_HIGH_TURN_RATE = 4, - DOOM_BOT_MOVE_LOW_TURN_RATE = 5, + DOOM_BOT_MOVE_FAST = 4, + DOOM_BOT_MOVE_SLOW = 5, DOOM_BOT_ALIGN_TO_TARGET = 6, DOOM_BOT_EXECUTE_JUMP = 7, DOOM_BOT_COLLISION_RECOVERY_FALL = 8, @@ -324,8 +324,8 @@ void doom_bot_update(struct Moby *moby) { goto Contact; case DOOM_BOT_SELECT_MOVEMENT_MODE: case DOOM_BOT_UPDATE_TARGET_AND_MOVEMENT: - case DOOM_BOT_MOVE_HIGH_TURN_RATE: - case DOOM_BOT_MOVE_LOW_TURN_RATE: { + case DOOM_BOT_MOVE_FAST: + case DOOM_BOT_MOVE_SLOW: { target = doom_bot_vars->target_moby; if (target && target->state != MOBY_STATE_PENDING_REMOVAL && target->state != 0xFD) { height = target->pos.z; @@ -359,7 +359,7 @@ void doom_bot_update(struct Moby *moby) { doom_bot_vars->target_moby = select_class5_target_or_hero( moby, &movement_and_detonation_vectors[0], &moby->rot, doom_bot_vars->last, 1); doom_bot_vars->max_speed = frame_scale * 0.1f * speed; - moby->state = DOOM_BOT_MOVE_HIGH_TURN_RATE; + moby->state = DOOM_BOT_MOVE_FAST; if (!doom_bot_vars->target_moby) { angle = random_float_between(-3.1415927f, 3.1415927f); if (random_integer_below(4) == 0) { @@ -394,7 +394,7 @@ void doom_bot_update(struct Moby *moby) { } old_state = moby->state; if (!doom_bot_vars->target_moby) { - moby->state = DOOM_BOT_MOVE_LOW_TURN_RATE; + moby->state = DOOM_BOT_MOVE_SLOW; if (moby->prev_seq != 6) blend_moby_animation(moby, 6, 0, scale_game_frames(10)); doom_bot_vars->max_speed = frame_scale * 0.0273f * speed; @@ -412,19 +412,19 @@ void doom_bot_update(struct Moby *moby) { { DoomBotParams *hp = (DoomBotParams *)&hero; if (doom_bot_vars->target_moby == hp->moby) { - moby->state = DOOM_BOT_MOVE_LOW_TURN_RATE; + moby->state = DOOM_BOT_MOVE_SLOW; if ((moby->anim_flags & 2) && moby->prev_seq != 6) blend_moby_animation(moby, 6, 0, scale_game_frames(0)); doom_bot_vars->max_speed = frame_scale * 0.0273f * speed; } } if (!(distance < 8.0f) && distance > 20.0f) { - moby->state = DOOM_BOT_MOVE_LOW_TURN_RATE; + moby->state = DOOM_BOT_MOVE_SLOW; if (moby->prev_seq != 0) blend_moby_animation(moby, 0, 0, scale_game_frames(10)); doom_bot_vars->max_speed = frame_scale * 0.0273f * speed; } else { - moby->state = DOOM_BOT_MOVE_HIGH_TURN_RATE; + moby->state = DOOM_BOT_MOVE_FAST; if (moby->prev_seq != 7) blend_moby_animation(moby, 7, 0, scale_game_frames(10)); doom_bot_vars->max_speed = frame_scale * 0.1f * speed; @@ -448,8 +448,7 @@ void doom_bot_update(struct Moby *moby) { } else clearance = 5.0f; } - if (moby->state == DOOM_BOT_MOVE_HIGH_TURN_RATE && - old_state == DOOM_BOT_MOVE_LOW_TURN_RATE) { + if (moby->state == DOOM_BOT_MOVE_FAST && old_state == DOOM_BOT_MOVE_SLOW) { moby->state = DOOM_BOT_WAIT_FOR_TRANSITION_ANIMATION; if (moby->prev_seq != 1) blend_moby_animation(moby, 1, 0, scale_game_frames(10)); @@ -611,7 +610,7 @@ void doom_bot_update(struct Moby *moby) { return; case DOOM_BOT_WAIT_FOR_TRANSITION_ANIMATION: if (moby->anim_flags & 2) { - moby->state = DOOM_BOT_MOVE_HIGH_TURN_RATE; + moby->state = DOOM_BOT_MOVE_FAST; if (moby->prev_seq != 7) blend_moby_animation(moby, 7, 0, scale_game_frames(10)); doom_bot_vars->max_speed = frame_scale * 0.1f * speed; From 65b191b777902b729a1fa6bfde745a73538a416e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:28:04 +0000 Subject: [PATCH 127/213] decomp: name Clank's rotor and antenna glow mobys, the delayed voice queue and the item slot effect fields in the hero --- include/rnc/hero/hero.h | 54 +++++++------ src/check/hero_layout_check.c | 20 ++--- src/overlays/shared/hero/hero_frame_update.c | 2 +- src/overlays/shared/hero/hero_idle_sequence.c | 73 +++++++++-------- .../shared/hero/hero_move_state_velocity.c | 12 +-- src/overlays/shared/hero/hero_switch_item.c | 16 ++-- src/overlays/shared/hero/set_hero_animation.c | 36 +++++---- .../shared/hero/update_hero_frame_pipeline.c | 2 +- ...ate_hero_vehicle_attachments_and_effects.c | 80 +++++++++++-------- 9 files changed, 158 insertions(+), 137 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index a337e01eb0..0309b0efe5 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -76,7 +76,7 @@ struct HeroItemSlot { struct Moby *moby; /* 0x00: item moby */ struct Moby *moby2; /* 0x04: second item moby */ u8 pad_08[0x4]; - u8 *unk0C; /* 0x0C */ + u8 *moby3; /* 0x0C: third item moby */ s32 button_mask; /* 0x10: pad buttons that hold the gadget states */ s32 respawn_frame; /* 0x14: set on release */ s16 timer; /* 0x18: counts down; a slot change waits for 0 */ @@ -89,12 +89,12 @@ struct HeroItemSlot { s32 state; /* 0x24: 0 empty, 2 ready, 3 released */ s32 item_id; /* 0x28: item in the slot */ f32 glow_phase; /* 0x2C: phase of the item moby's colour pulse (FUN_L00_002080b0) */ - f32 unk30; /* 0x30 */ - f32 unk34; /* 0x34 */ - s32 unk38; /* 0x38 */ - s16 unk3C; /* 0x3C */ - u16 unk3E; /* 0x3E */ - s32 locked_on; /* 0x40: on slot 6, nonzero makes the Ryno aim along lock_yaw */ + f32 effect_random_base; /* 0x30: configure_hero_point_effect_emission */ + f32 effect_random_half_range; /* 0x34 */ + s32 effect_updates_left; /* 0x38 */ + s16 effect_count_per_point; /* 0x3C */ + u16 effect_flags; /* 0x3E */ + s32 locked_on; /* 0x40: on slot 6, nonzero makes the Ryno aim along lock_yaw */ u8 pad_44[0x4]; struct Moby *lock_target; /* 0x48: on slot 6, the moby the weapons lock on to while locked_on is set */ @@ -708,9 +708,10 @@ struct Hero { u8 ship_flags; /* 0x160F: 2 = being steered back from the edge or height limit of the space arena (FUN_L11_00313f60) */ u8 pad_1610[0x4]; s32 fidget_prop_moby; /* 0x1614: moby animated with HERO_STATE_FIDGET_ALT, removed when it ends */ - u8 pad_1618[0x8]; - void *unk1620; /* 0x1620 */ - void *unk1624; /* 0x1624 */ + u8 pad_1618[0x8]; + void * + clank_rotor_moby; /* 0x1620: Clank's rotor moby (class 0x47A), made while hero.vehicle_mode is Clank */ + void *clank_antenna_glow_moby; /* 0x1624: Clank's antenna glow moby (class 0x4B4) */ f32 glow_phase; /* 0x1628: phase of the hero moby's colour pulse (FUN_L00_002080b0) */ u8 pad_162C[0x4]; s32 vehicle_hp; /* 0x1630 */ @@ -723,7 +724,7 @@ struct Hero { s32 sink_jump_count; /* 0x1660 */ u8 pad_1664[0xC]; struct MobyTrail trail; /* 0x1670: trail of moby copies following hero.moby */ - u8 unk17B0[0x140]; /* 0x17B0: buffer handed to FUN_L00_00262500 / FUN_L00_00262528 */ + u8 wrench_trail[0x140]; /* 0x17B0: after-image trail of the thrown wrench (Comet-Strike) */ struct HeroEase item_eases [3]; /* 0x18F0: eased records, kind 5 set when an item slot is ready (FUN_L00_00210748) */ Vec4 pos_history[32]; /* 0x1B00: ring of 32 quads indexed by pos_history_index */ @@ -732,10 +733,10 @@ struct Hero { f32 stick_y; /* 0x1D24 */ u8 pad_1D28[0x68]; struct HeroEase - unk1D90; /* 0x1D90: manipulator record handed to attach_manipulator (FUN_L00_00234808) */ + item5_manipulator; /* 0x1D90: manipulator record handed to attach_manipulator (FUN_L00_00234808) */ u8 pad_1E40[0x70]; - s16 unk1EB0; /* 0x1EB0 */ - s16 unk1EB2; /* 0x1EB2: once flag for queueing FUN_L00_00207d40 */ + s16 unk1EB0; /* 0x1EB0 */ + s16 glow_draw_queued; /* 0x1EB2: draw_hero_glow_quads queued this frame */ u8 pad_1EB4[0x1C]; /* 0x1EC0..0x1F10: a struct GroundMoveControl (ground_move_control.h) that doom bots hand to step_mover; 0x1F10..0x1F50: the hop arc state update_arc_motion @@ -784,17 +785,17 @@ struct Hero { u8 item_anim_active; /* 0x20A8 */ u8 wading; /* 0x20A9 */ u8 weapon_up; /* 0x20AA */ - u8 item_slot_anim_count; /* 0x20AB: item slot blends to play: 0 none, 1 slot 0, 2 both */ - u8 item_use_locked; /* 0x20AC */ - u8 tilt_disabled; /* 0x20AD */ - u8 unk20AE; /* 0x20AE */ - u8 hand_item_hidden; /* 0x20AF */ - u8 hydro_tank_full; /* 0x20B0 */ - u8 fall_fade_pending; /* 0x20B1 */ - u8 on_hoverboard; /* 0x20B2 */ - u8 gravity_mode; /* 0x20B3 */ - u8 pyrocitor_tap_count; /* 0x20B4 */ - u8 wrench_combo_step; /* 0x20B5 */ + u8 item_slot_anim_count; /* 0x20AB: item slot blends to play: 0 none, 1 slot 0, 2 both */ + u8 item_use_locked; /* 0x20AC */ + u8 tilt_disabled; /* 0x20AD */ + u8 wrench_hidden_by_state; /* 0x20AE: hides the wrench in slot 0 (ledge, special and water jump states) */ + u8 hand_item_hidden; /* 0x20AF */ + u8 hydro_tank_full; /* 0x20B0 */ + u8 fall_fade_pending; /* 0x20B1 */ + u8 on_hoverboard; /* 0x20B2 */ + u8 gravity_mode; /* 0x20B3 */ + u8 pyrocitor_tap_count; /* 0x20B4 */ + u8 wrench_combo_step; /* 0x20B5 */ u8 pad_20B6[0x2]; s32 pending_item[7]; /* 0x20B8: per slot: item to switch to */ s32 selected_item[7]; /* 0x20D4: per slot: item after a switch */ @@ -806,7 +807,8 @@ struct Hero { s32 pos_history_index; /* 0x21B0: pos_history ring index */ s32 pos_history_count; /* 0x21B4: pos_history ring count */ u8 pad_21B8[0x20]; - s16 unk21D8[8][4]; /* 0x21D8: 8 slots of four s16 */ + s16 delayed_voices + [8][4]; /* 0x21D8: delayed voice queue (help_queue_add): busy, entry, timer, argument */ s32 grind_voice; /* 0x2218: voice of sound slot 0, -1 = none (slots 0-7 run to 0x2234, FUN_L00_00206c08) */ s32 unk221C; /* 0x221C: voice of sound slot 1 */ s32 voice_slot2; /* 0x2220 */ diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index a935e1dc31..43bdfa2ae2 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -40,9 +40,9 @@ SLOT_OFFSET_CHECK(item_id, 0x28); HERO_OFFSET_CHECK(items[1], 0x10E0); HERO_OFFSET_CHECK(items[3].item_id, 0x11A8); HERO_OFFSET_CHECK(items[6].state, 0x1294); -HERO_OFFSET_CHECK(items[3].unk0C, 0x118C); -HERO_OFFSET_CHECK(items[6].unk30, 0x12A0); -HERO_OFFSET_CHECK(items[6].unk3E, 0x12AE); +HERO_OFFSET_CHECK(items[3].moby3, 0x118C); +HERO_OFFSET_CHECK(items[6].effect_random_base, 0x12A0); +HERO_OFFSET_CHECK(items[6].effect_flags, 0x12AE); HERO_OFFSET_CHECK(item_eases[0].attach_joint, 0x1990); HERO_OFFSET_CHECK(item_eases[2].kind, 0x1AF2); HERO_OFFSET_CHECK(wall_normal_pitch, 0x250); @@ -412,8 +412,8 @@ HERO_OFFSET_CHECK(selector_13, 0x12EC); HERO_OFFSET_CHECK(ground_sound_class, 0x12ED); HERO_OFFSET_CHECK(grind_jump_block, 0x12EE); HERO_OFFSET_CHECK(fidget_prop_moby, 0x1614); -HERO_OFFSET_CHECK(unk1620, 0x1620); -HERO_OFFSET_CHECK(unk1624, 0x1624); +HERO_OFFSET_CHECK(clank_rotor_moby, 0x1620); +HERO_OFFSET_CHECK(clank_antenna_glow_moby, 0x1624); HERO_OFFSET_CHECK(vehicle_hp, 0x1630); HERO_OFFSET_CHECK(vehicle_anim_handle, 0x1634); HERO_OFFSET_CHECK(vehicle_triangle_cooldown, 0x1636); @@ -425,9 +425,9 @@ HERO_OFFSET_CHECK(pos_history, 0x1B00); HERO_OFFSET_CHECK(pos_history[31], 0x1CF0); HERO_OFFSET_CHECK(stick_x, 0x1D20); HERO_OFFSET_CHECK(stick_y, 0x1D24); -HERO_OFFSET_CHECK(unk1D90, 0x1D90); +HERO_OFFSET_CHECK(item5_manipulator, 0x1D90); HERO_OFFSET_CHECK(unk1EB0, 0x1EB0); -HERO_OFFSET_CHECK(unk1EB2, 0x1EB2); +HERO_OFFSET_CHECK(glow_draw_queued, 0x1EB2); HERO_OFFSET_CHECK(move_speed, 0x1ED0); HERO_OFFSET_CHECK(move_turn_velocity, 0x1ED4); HERO_OFFSET_CHECK(move_vertical_velocity, 0x1ED8); @@ -467,7 +467,7 @@ HERO_OFFSET_CHECK(weapon_up, 0x20AA); HERO_OFFSET_CHECK(item_slot_anim_count, 0x20AB); HERO_OFFSET_CHECK(item_use_locked, 0x20AC); HERO_OFFSET_CHECK(tilt_disabled, 0x20AD); -HERO_OFFSET_CHECK(unk20AE, 0x20AE); +HERO_OFFSET_CHECK(wrench_hidden_by_state, 0x20AE); HERO_OFFSET_CHECK(hand_item_hidden, 0x20AF); HERO_OFFSET_CHECK(hydro_tank_full, 0x20B0); HERO_OFFSET_CHECK(fall_fade_pending, 0x20B1); @@ -533,7 +533,7 @@ HERO_OFFSET_CHECK(grab_rail_yaw, 0x610); HERO_OFFSET_CHECK(follow_path_pitch, 0x614); HERO_OFFSET_CHECK(pos_history_index, 0x21B0); HERO_OFFSET_CHECK(pos_history_count, 0x21B4); -HERO_OFFSET_CHECK(unk21D8, 0x21D8); +HERO_OFFSET_CHECK(delayed_voices, 0x21D8); HERO_OFFSET_CHECK(grind_voice, 0x2218); HERO_OFFSET_CHECK(pivot_rot_x, 0x6D0); HERO_OFFSET_CHECK(trick_rot_y, 0x6D4); @@ -569,6 +569,6 @@ HERO_OFFSET_CHECK(sway_phase, 0x6B0); HERO_OFFSET_CHECK(sway_axis_phase, 0x6B4); HERO_OFFSET_CHECK(trick_hud_handle, 0x880); HERO_OFFSET_CHECK(unk890, 0x890); -HERO_OFFSET_CHECK(unk17B0, 0x17B0); +HERO_OFFSET_CHECK(wrench_trail, 0x17B0); HERO_OFFSET_CHECK(saved_pos_rot, 0x1D00); HERO_OFFSET_CHECK(grapple_target_swings, 0x978); diff --git a/src/overlays/shared/hero/hero_frame_update.c b/src/overlays/shared/hero/hero_frame_update.c index 70226fca00..3e7741c612 100644 --- a/src/overlays/shared/hero/hero_frame_update.c +++ b/src/overlays/shared/hero/hero_frame_update.c @@ -253,7 +253,7 @@ void update_hero_frame(void) { q[0x20B1] = 1; return; } - hero_state_base->unk1EB2 = 0; + hero_state_base->glow_draw_queued = 0; hero_state_base->unk1EB0 = 0; if (hero_state_base->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { hero_frame_update(); diff --git a/src/overlays/shared/hero/hero_idle_sequence.c b/src/overlays/shared/hero/hero_idle_sequence.c index 9813e74964..aa93a77730 100644 --- a/src/overlays/shared/hero/hero_idle_sequence.c +++ b/src/overlays/shared/hero/hero_idle_sequence.c @@ -811,25 +811,30 @@ void update_hero_in_vehicle_mode(void) { FUN_L00_0024f7c8(((char *)g->moby), 7, scratch.rotation); qcopy((char *)g + 0x1d80, &scratch.rotation[0]); enqueue_hero_glow_draw_callback_once(); - if (((char *)g->unk1624) != 0) { + if (((char *)g->clank_antenna_glow_moby) != 0) { build_moby_bone_transform(((char *)g->moby), 7, scratch.help.transform); - qcopy_nc(((char *)g->unk1624) + 0x10, &scratch.help.transform[3]); - copy_matrix3x4(((char *)g->unk1624) + 0xc0, scratch.help.transform); + qcopy_nc(((char *)g->clank_antenna_glow_moby) + 0x10, + &scratch.help.transform[3]); + copy_matrix3x4(((char *)g->clank_antenna_glow_moby) + 0xc0, + scratch.help.transform); scratch.help.offset = 0; ((f32 *)&scratch.help.offset)[2] = 0.0257f; - transform_vector_by_basis( - &scratch.help.offset, &scratch.help.offset, ((char *)g->unk1624) + 0xc0); - *(f32 *)(((char *)g->unk1624) + 0x18) -= ((f32 *)&scratch.help.offset)[2]; - update_entity(((char *)g->unk1624)); + transform_vector_by_basis(&scratch.help.offset, + &scratch.help.offset, + ((char *)g->clank_antenna_glow_moby) + 0xc0); + *(f32 *)(((char *)g->clank_antenna_glow_moby) + 0x18) -= + ((f32 *)&scratch.help.offset)[2]; + update_entity(((char *)g->clank_antenna_glow_moby)); scale = 1.7f; if (D_0015EDB3_macro) scale = 3.1f; if (g->attachment_pulse_timer) scale *= 1.4f; - FUN_L00_0025b868(*(f32 *)(*(char **)(((char *)g->unk1624) + 0x24) + 0x24) * - scale, - 0.02f, - ((char *)g->unk1624) + 0x2c); + FUN_L00_0025b868( + *(f32 *)(*(char **)(((char *)g->clank_antenna_glow_moby) + 0x24) + 0x24) * + scale, + 0.02f, + ((char *)g->clank_antenna_glow_moby) + 0x2c); } } } @@ -868,29 +873,31 @@ void update_hero_in_vehicle_mode(void) { s32 tint; wave = FUN_L00_001ff800(g->glow_phase); tint = FUN_L00_00200298(wave * 0.5f + 0.5f, color, color2); - if (((char *)g->unk1624)) - *(u32 *)(((char *)g->unk1624) + 0x90) = FUN_L00_00200298( - D_0015ED60_gp * 0.1f, *(u32 *)(((char *)g->unk1624) + 0x90), tint); + if (((char *)g->clank_antenna_glow_moby)) + *(u32 *)(((char *)g->clank_antenna_glow_moby) + 0x90) = + FUN_L00_00200298(D_0015ED60_gp * 0.1f, + *(u32 *)(((char *)g->clank_antenna_glow_moby) + 0x90), + tint); *(u32 *)((char *)g + 0x2300) = FUN_L00_00200298(frame_scale_macro * 0.1f, *(u32 *)((char *)g + 0x2300), tint); - if (((char *)g->unk1620) == 0) { - g->unk1620 = create_moby(0x47a); - if (((char *)g->unk1620)) { - char *moby = ((char *)g->unk1620); + if (((char *)g->clank_rotor_moby) == 0) { + g->clank_rotor_moby = create_moby(0x47a); + if (((char *)g->clank_rotor_moby)) { + char *moby = ((char *)g->clank_rotor_moby); qcopy(&MOBY(moby)->pos, &g->motion.pos); qcopy(moby + 0x40, &g->motion.rot); MOBY(moby)->draw_dist = 0x40; - (((char *)g->unk1620))[0x31] = 1; - (((char *)g->unk1620))[0x30] = 0; - *(u16 *)(((char *)g->unk1620) + 0x34) = 0; - update_entity(((char *)g->unk1620)); + (((char *)g->clank_rotor_moby))[0x31] = 1; + (((char *)g->clank_rotor_moby))[0x30] = 0; + *(u16 *)(((char *)g->clank_rotor_moby) + 0x34) = 0; + update_entity(((char *)g->clank_rotor_moby)); } } - if (((char *)g->unk1620)) { + if (((char *)g->clank_rotor_moby)) { build_moby_bone_transform(((char *)g->moby), 5, scratch.rotation); { OvlQuad *position = &scratch.rotation[3]; - char *moby = ((char *)g->unk1620); + char *moby = ((char *)g->clank_rotor_moby); qcopy_nc(&MOBY(moby)->pos, position); update_entity(moby); } @@ -898,15 +905,15 @@ void update_hero_in_vehicle_mode(void) { ((f32 *)(scratch.rotation + 4))[2] = -g->motion.rot.f[2]; euler_rotation_matrix(scratch.help.inverse, (scratch.rotation + 4)); multiply_matrix(scratch.rotation, scratch.rotation, scratch.help.inverse); - copy_matrix3x4(((char *)g->unk1620) + 0xc0, scratch.rotation); - *(u64 *)(((char *)g->unk1620) + 0x38) = g->moby->spawn_frame; + copy_matrix3x4(((char *)g->clank_rotor_moby) + 0xc0, scratch.rotation); + *(u64 *)(((char *)g->clank_rotor_moby) + 0x38) = g->moby->spawn_frame; if (g->state.current == 0x4f) { - if (*(u8 *)(((char *)g->unk1620) + 0x53) != 1) + if (*(u8 *)(((char *)g->clank_rotor_moby) + 0x53) != 1) blend_moby_animation_2062b0( - ((char *)g->unk1620), 1, 0, FUN_L00_001fef20(10)); - } else if (*(u8 *)(((char *)g->unk1620) + 0x53) != 0) { + ((char *)g->clank_rotor_moby), 1, 0, FUN_L00_001fef20(10)); + } else if (*(u8 *)(((char *)g->clank_rotor_moby) + 0x53) != 0) { blend_moby_animation_2062b0( - ((char *)g->unk1620), 0, 0, FUN_L00_001fef20(0x11)); + ((char *)g->clank_rotor_moby), 0, 0, FUN_L00_001fef20(0x11)); } } } @@ -1244,7 +1251,7 @@ void coordinate_hero_frame_update(void) { } return; } - hero_state->unk1EB2 = 0; + hero_state->glow_draw_queued = 0; hero_state->unk1EB0 = 0; if (hero_state->vehicle_mode) { update_hero_in_vehicle_mode(); @@ -1605,8 +1612,8 @@ extern void draw_hero_glow_quads(void) __asm__("FUN_L00_00207d40"); /* Once (flag at ((char *)&hero)+0x1EB2) queues FUN_L00_00207d40 with the object at +0x2080. */ void enqueue_hero_glow_draw_callback_once(void) { struct Hero *hero_state = &hero; - if (hero_state->unk1EB2 == 0) { - hero_state->unk1EB2 = 1; + if (hero_state->glow_draw_queued == 0) { + hero_state->glow_draw_queued = 1; add_draw_callback(draw_hero_glow_quads, ((int)hero_state->moby)); } } diff --git a/src/overlays/shared/hero/hero_move_state_velocity.c b/src/overlays/shared/hero/hero_move_state_velocity.c index 9abb3e44f2..f282b95efa 100644 --- a/src/overlays/shared/hero/hero_move_state_velocity.c +++ b/src/overlays/shared/hero/hero_move_state_velocity.c @@ -948,7 +948,7 @@ void help_queue_add(s32 voice_entry_index, s32 voice_delay_timer, s32 voice_allo s16 *current_slot; s32 slots_examined = 0; hero_state = &hero; - current_slot = (s16 *)(&hero_state->unk21D8[0]); + current_slot = (s16 *)(&hero_state->delayed_voices[0]); do { slots_examined = slots_examined + 1; if (current_slot[0] == 0) { @@ -971,8 +971,8 @@ extern int allocate_hero_voice_for_entry(); void update_hero_delayed_voice_requests(void) __asm__("FUN_L00_00216f10"); void update_hero_delayed_voice_requests(void) { - char *slot_timer_base = (char *)&hero.unk21D8[0][2]; - short *slot_voice_argument_base = (short *)(&hero.unk21D8[0][3]); + char *slot_timer_base = (char *)&hero.delayed_voices[0][2]; + short *slot_voice_argument_base = (short *)(&hero.delayed_voices[0][3]); int i; for (i = 0; i < 8; i++) { @@ -1321,9 +1321,9 @@ void launch_hero_wrench(void) { matrix_to_euler(out_mat, &equipped_wrench_moby->rot); launched_item_vars->unk64 = 0; launched_item_vars->unk60 = frame_time * 23.0f; - initialize_moby_transform_history(equipped_wrench_moby, hero.unk17B0); - create_moby_transform_history_entry(hero.unk17B0, 0x30, 3); - create_moby_transform_history_entry(hero.unk17B0, 0x17, 5); + initialize_moby_transform_history(equipped_wrench_moby, hero.wrench_trail); + create_moby_transform_history_entry(hero.wrench_trail, 0x30, 3); + create_moby_transform_history_entry(hero.wrench_trail, 0x17, 5); blend_moby_animation(equipped_wrench_moby, 6, 0, scale_game_frames(5)); } diff --git a/src/overlays/shared/hero/hero_switch_item.c b/src/overlays/shared/hero/hero_switch_item.c index 37dcfb5bec..094f133168 100644 --- a/src/overlays/shared/hero/hero_switch_item.c +++ b/src/overlays/shared/hero/hero_switch_item.c @@ -2316,9 +2316,9 @@ void update_hero_equipped_items(void) { if (hero_is_in_special_state() || hero.state.control_mode == 0x15 || hero.state.control_mode == 0x16 || hero.state.control_mode == HERO_MODE_LEDGE || hero.state.current == 0x12) { - hero.unk20AE = 1; + hero.wrench_hidden_by_state = 1; } else { - hero.unk20AE = 0; + hero.wrench_hidden_by_state = 0; } spawn_hero_item_mobies(); update_hero_item_mobys(); @@ -2386,13 +2386,13 @@ void exit_hero_vehicle_mode(void) { if (hero_state->vehicle_mode == HERO_VEHICLE_MODE_CLANK) { hero_state->health.vehicle_mode_hp = hero_state->health.hp; hero_state->health.hp = hero_state->health.saved_hp; - if (hero_state->unk1620) { - mark_moby_for_removal(hero_state->unk1620); - hero_state->unk1620 = 0; + if (hero_state->clank_rotor_moby) { + mark_moby_for_removal(hero_state->clank_rotor_moby); + hero_state->clank_rotor_moby = 0; } - if (hero_state->unk1624) { - mark_moby_for_removal(hero_state->unk1624); - hero_state->unk1624 = 0; + if (hero_state->clank_antenna_glow_moby) { + mark_moby_for_removal(hero_state->clank_antenna_glow_moby); + hero_state->clank_antenna_glow_moby = 0; } } { diff --git a/src/overlays/shared/hero/set_hero_animation.c b/src/overlays/shared/hero/set_hero_animation.c index c825379415..fcd9752bc5 100644 --- a/src/overlays/shared/hero/set_hero_animation.c +++ b/src/overlays/shared/hero/set_hero_animation.c @@ -724,12 +724,12 @@ void set_hero_item_moby_flag_bit0(void) { } } tail = &hero; - hero_flag_target = ((char *)tail->items[3].unk0C); + hero_flag_target = ((char *)tail->items[3].moby3); if (hero_flag_target != 0) { *(unsigned short *)(hero_flag_target + 0x34) |= 1; } if (tail->vehicle_mode == HERO_VEHICLE_MODE_CLANK) { - hero_flag_target = ((char *)tail->unk1624); + hero_flag_target = ((char *)tail->clank_antenna_glow_moby); if (hero_flag_target != 0) { *(unsigned short *)(hero_flag_target + 0x34) |= 1; } @@ -772,12 +772,12 @@ void update_hero_item_moby_flags(void) { } } blk2 = &hero; - hero_flag_target = *(char **)&blk2->items[3].unk0C; + hero_flag_target = *(char **)&blk2->items[3].moby3; if (hero_flag_target != 0) { *(unsigned short *)(hero_flag_target + 0x34) &= ~1; } if (blk2->vehicle_mode == HERO_VEHICLE_MODE_CLANK) { - hero_flag_target = *(char **)&blk2->unk1624; + hero_flag_target = *(char **)&blk2->clank_antenna_glow_moby; if (hero_flag_target != 0) { *(unsigned short *)(hero_flag_target + 0x34) &= ~1; } @@ -792,13 +792,14 @@ void update_hero_item_moby_flags(void) { if (hero_flag_target != 0) { *(unsigned short *)(hero_flag_target + 0x34) |= 0x41; } - hero_flag_target = *(char **)&blk3->items[3].unk0C; + hero_flag_target = *(char **)&blk3->items[3].moby3; if (hero_flag_target != 0) { *(unsigned short *)(hero_flag_target + 0x34) |= 0x41; } } blk4 = &hero; - if ((blk4->unk20AE != 0 && blk4->items[0].item_id == 8) || blk4->hand_item_hidden != 0) { + if ((blk4->wrench_hidden_by_state != 0 && blk4->items[0].item_id == 8) || + blk4->hand_item_hidden != 0) { struct Hero *blk5 = &hero; hero_flag_target = *(char **)&blk5->items[0].moby; @@ -819,7 +820,7 @@ void set_hero_moby_flag_bit0(void) { char *optional_hero_flag_target; hero_flag_state->moby->flags |= 1; - optional_hero_flag_target = ((char *)hero_flag_state->unk1620); + optional_hero_flag_target = ((char *)hero_flag_state->clank_rotor_moby); if (optional_hero_flag_target != 0) { *(unsigned short *)(optional_hero_flag_target + 0x34) |= 1; } @@ -836,7 +837,7 @@ void clear_hero_moby_flag_bit0(void) { char *optional_hero_flag_target; hero_flag_clear_state->moby->flags &= ~1; - optional_hero_flag_target = ((char *)hero_flag_clear_state->unk1620); + optional_hero_flag_target = ((char *)hero_flag_clear_state->clank_rotor_moby); if (optional_hero_flag_target != 0) { *(unsigned short *)(optional_hero_flag_target + 0x34) &= ~1; } @@ -863,12 +864,12 @@ void configure_hero_point_effect_emission(float random_value_base, unsigned char flags_to_clear) { struct Hero *hero_point_effect_state = &hero; - hero_point_effect_state->items[6].unk38 = remaining_updates; - hero_point_effect_state->items[6].unk3C = count_per_point; - hero_point_effect_state->items[6].unk3E = - (hero_point_effect_state->items[6].unk3E & ~flags_to_clear) | flags_to_set; - hero_point_effect_state->items[6].unk30 = random_value_base; - hero_point_effect_state->items[6].unk34 = random_value_half_range; + hero_point_effect_state->items[6].effect_updates_left = remaining_updates; + hero_point_effect_state->items[6].effect_count_per_point = count_per_point; + hero_point_effect_state->items[6].effect_flags = + (hero_point_effect_state->items[6].effect_flags & ~flags_to_clear) | flags_to_set; + hero_point_effect_state->items[6].effect_random_base = random_value_base; + hero_point_effect_state->items[6].effect_random_half_range = random_value_half_range; } typedef unsigned int u128_2332d0 __attribute__((mode(TI), aligned(16))); @@ -1774,10 +1775,11 @@ void animate_hero_slot4_and_slot5_visuals(void) { MOBY(slot5_moby)->glow_color = fast_tween_color(0xAAC8AA, 0x965050, fast_sin(hero.item5_glow_phase) * 0.5f + 0.5f); if (slot5_moby) { - if (!hero.unk1D90.attached) - attach_manipulator(slot5_moby, 0, &hero.unk1D90); + if (!hero.item5_manipulator.attached) + attach_manipulator(slot5_moby, 0, &hero.item5_manipulator); else - build_axis_rotation_quaternion(&hero.unk1D90.quat, 0, hero.item5_glow_phase); + build_axis_rotation_quaternion( + &hero.item5_manipulator.quat, 0, hero.item5_glow_phase); } } } diff --git a/src/overlays/shared/hero/update_hero_frame_pipeline.c b/src/overlays/shared/hero/update_hero_frame_pipeline.c index 12c0585c95..911e7480b0 100644 --- a/src/overlays/shared/hero/update_hero_frame_pipeline.c +++ b/src/overlays/shared/hero/update_hero_frame_pipeline.c @@ -32,7 +32,7 @@ void update_hero_frame_pipeline(void) { q[0x20B1] = 1; return; } - hero_state->unk1EB2 = 0; + hero_state->glow_draw_queued = 0; hero_state->unk1EB0 = 0; if (hero_state->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { hero_frame_update(); diff --git a/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c b/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c index 89956b7514..5fc0f75dcc 100644 --- a/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c +++ b/src/overlays/shared/hero/update_hero_vehicle_attachments_and_effects.c @@ -171,24 +171,30 @@ void update_hero_vehicle_attachments_and_effects(void) { moby_point_position(((char *)g->moby), 7, scratch.rotation); qcopy((char *)g + 0x1d80, &scratch.rotation[0]); enqueue_hero_glow_draw_callback_once(); - if (((char *)g->unk1624) != 0) { + if (((char *)g->clank_antenna_glow_moby) != 0) { build_moby_bone_transform(((char *)g->moby), 7, scratch.help.transform); - qcopy_nc(((char *)g->unk1624) + 0x10, &scratch.help.transform[3]); - copy_matrix3x4(((char *)g->unk1624) + 0xc0, scratch.help.transform); + qcopy_nc(((char *)g->clank_antenna_glow_moby) + 0x10, + &scratch.help.transform[3]); + copy_matrix3x4(((char *)g->clank_antenna_glow_moby) + 0xc0, + scratch.help.transform); scratch.help.offset = 0; ((f32 *)&scratch.help.offset)[2] = 0.0257f; - transform_vector_by_basis( - &scratch.help.offset, &scratch.help.offset, ((char *)g->unk1624) + 0xc0); - *(f32 *)(((char *)g->unk1624) + 0x18) -= ((f32 *)&scratch.help.offset)[2]; - update_entity(((char *)g->unk1624)); + transform_vector_by_basis(&scratch.help.offset, + &scratch.help.offset, + ((char *)g->clank_antenna_glow_moby) + 0xc0); + *(f32 *)(((char *)g->clank_antenna_glow_moby) + 0x18) -= + ((f32 *)&scratch.help.offset)[2]; + update_entity(((char *)g->clank_antenna_glow_moby)); scale = 1.7f; if (D_0015EDB3_macro) scale = 3.1f; if (g->attachment_pulse_timer) scale *= 1.4f; - approach_value(*(f32 *)(*(char **)(((char *)g->unk1624) + 0x24) + 0x24) * scale, - 0.02f, - ((char *)g->unk1624) + 0x2c); + approach_value( + *(f32 *)(*(char **)(((char *)g->clank_antenna_glow_moby) + 0x24) + 0x24) * + scale, + 0.02f, + ((char *)g->clank_antenna_glow_moby) + 0x2c); } } } @@ -227,29 +233,31 @@ void update_hero_vehicle_attachments_and_effects(void) { s32 tint; wave = fast_sin(g->glow_phase); tint = fast_tween_color(wave * 0.5f + 0.5f, color, color2); - if (((char *)g->unk1624)) - *(u32 *)(((char *)g->unk1624) + 0x90) = fast_tween_color( - D_0015ED60_gp * 0.1f, *(u32 *)(((char *)g->unk1624) + 0x90), tint); + if (((char *)g->clank_antenna_glow_moby)) + *(u32 *)(((char *)g->clank_antenna_glow_moby) + 0x90) = + fast_tween_color(D_0015ED60_gp * 0.1f, + *(u32 *)(((char *)g->clank_antenna_glow_moby) + 0x90), + tint); *(u32 *)((char *)g + 0x2300) = fast_tween_color(frame_scale_macro * 0.1f, *(u32 *)((char *)g + 0x2300), tint); - if (((char *)g->unk1620) == 0) { - g->unk1620 = create_moby(0x47a); - if (((char *)g->unk1620)) { - char *moby = ((char *)g->unk1620); + if (((char *)g->clank_rotor_moby) == 0) { + g->clank_rotor_moby = create_moby(0x47a); + if (((char *)g->clank_rotor_moby)) { + char *moby = ((char *)g->clank_rotor_moby); qcopy(&MOBY(moby)->pos, &g->motion.pos); qcopy(moby + 0x40, &g->motion.rot); MOBY(moby)->draw_dist = 0x40; - (((char *)g->unk1620))[0x31] = 1; - (((char *)g->unk1620))[0x30] = 0; - *(u16 *)(((char *)g->unk1620) + 0x34) = 0; - update_entity(((char *)g->unk1620)); + (((char *)g->clank_rotor_moby))[0x31] = 1; + (((char *)g->clank_rotor_moby))[0x30] = 0; + *(u16 *)(((char *)g->clank_rotor_moby) + 0x34) = 0; + update_entity(((char *)g->clank_rotor_moby)); } } - if (((char *)g->unk1620)) { + if (((char *)g->clank_rotor_moby)) { build_moby_bone_transform(((char *)g->moby), 5, scratch.rotation); { OvlQuad *position = &scratch.rotation[3]; - char *moby = ((char *)g->unk1620); + char *moby = ((char *)g->clank_rotor_moby); qcopy_nc(&MOBY(moby)->pos, position); update_entity(moby); } @@ -257,13 +265,15 @@ void update_hero_vehicle_attachments_and_effects(void) { ((f32 *)(scratch.rotation + 4))[2] = -g->motion.rot.f[2]; euler_rotation_matrix(scratch.help.inverse, (scratch.rotation + 4)); multiply_matrix(scratch.rotation, scratch.rotation, scratch.help.inverse); - copy_matrix3x4(((char *)g->unk1620) + 0xc0, scratch.rotation); - *(u64 *)(((char *)g->unk1620) + 0x38) = g->moby->spawn_frame; + copy_matrix3x4(((char *)g->clank_rotor_moby) + 0xc0, scratch.rotation); + *(u64 *)(((char *)g->clank_rotor_moby) + 0x38) = g->moby->spawn_frame; if (g->state.current == 0x4f) { - if (*(u8 *)(((char *)g->unk1620) + 0x53) != 1) - blend_moby_animation(((char *)g->unk1620), 1, 0, scale_game_frames(10)); - } else if (*(u8 *)(((char *)g->unk1620) + 0x53) != 0) { - blend_moby_animation(((char *)g->unk1620), 0, 0, scale_game_frames(0x11)); + if (*(u8 *)(((char *)g->clank_rotor_moby) + 0x53) != 1) + blend_moby_animation( + ((char *)g->clank_rotor_moby), 1, 0, scale_game_frames(10)); + } else if (*(u8 *)(((char *)g->clank_rotor_moby) + 0x53) != 0) { + blend_moby_animation( + ((char *)g->clank_rotor_moby), 0, 0, scale_game_frames(0x11)); } } } @@ -373,13 +383,13 @@ void restore_hero_from_vehicle_mode(void) { if (hero_context->vehicle_mode == HERO_VEHICLE_MODE_CLANK) { hero_context->health.vehicle_mode_hp = hero_context->health.hp; hero_context->health.hp = hero_context->health.saved_hp; - if (hero_context->unk1620) { - mark_moby_for_removal(hero_context->unk1620); - hero_context->unk1620 = 0; + if (hero_context->clank_rotor_moby) { + mark_moby_for_removal(hero_context->clank_rotor_moby); + hero_context->clank_rotor_moby = 0; } - if (hero_context->unk1624) { - mark_moby_for_removal(hero_context->unk1624); - hero_context->unk1624 = 0; + if (hero_context->clank_antenna_glow_moby) { + mark_moby_for_removal(hero_context->clank_antenna_glow_moby); + hero_context->clank_antenna_glow_moby = 0; } } { From a3ab53657e59ca9dbfad8f8ca1dd6d98ef851266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:29:39 +0000 Subject: [PATCH 128/213] decomp: name the transition archives in the disc table, the HUD skip flag and the map highlight cells --- include/rnc/streaming/disc_table.h | 48 ++++++++++++---------- include/rnc/ui/hud/hud_state.h | 4 +- include/rnc/ui/map/map_state.h | 10 ++--- src/check/map_layout_check.c | 2 +- src/game/initialize_level_runtime.c | 5 ++- src/game/transitions/transition_load_wad.c | 5 ++- src/ui/hud/update_hud.c | 6 +-- src/ui/map/draw_map_overlay.c | 2 +- 8 files changed, 44 insertions(+), 38 deletions(-) diff --git a/include/rnc/streaming/disc_table.h b/include/rnc/streaming/disc_table.h index 4904736f1c..7b5a2e9b5e 100644 --- a/include/rnc/streaming/disc_table.h +++ b/include/rnc/streaming/disc_table.h @@ -45,33 +45,37 @@ struct DiscTable { known field, not a proven count of valid archives. */ struct DiscFile render_archives[201]; s32 music_50000[40][6]; /* 0xF00, tracks 50000.., one location per language */ - struct DiscFile startup_archive; /* 0x12C0 */ + struct DiscFile startup_archive; /* 0x12C0 */ struct DiscFile level_archives[4]; /* 0x12C8, by level index */ - struct DiscFile chunk_archives[10]; /* 0x12E8, overlays: x of an x/y pair picked by D_0015ED80 */ - struct DiscFile chunk_archives_alt[10]; /* 0x1338, the y half of chunk_archives */ - struct DiscFile loading_slides[6]; /* 0x1388, one per language */ - struct DiscFile unk13B8; /* 0x13B8 */ - struct DiscFile music_40000[36]; /* 0x13C0, music tracks 40000.. */ - s32 sound_bank; /* 0x14E0, passed to load_audio_bank_by_location */ + struct DiscFile + chunk_archives[10]; /* 0x12E8, overlays: x of an x/y pair picked by D_0015ED80 */ + struct DiscFile chunk_archives_alt[10]; /* 0x1338, the y half of chunk_archives */ + struct DiscFile loading_slides[6]; /* 0x1388, one per language */ + struct DiscFile + space_transition_archive; /* 0x13B8: read by do_space_transition (initialize_level_runtime) */ + struct DiscFile music_40000[36]; /* 0x13C0, music tracks 40000.. */ + s32 sound_bank; /* 0x14E0, passed to load_audio_bank_by_location */ s32 pad_14E4; - struct DiscFile unk14E8; /* 0x14E8 */ - u8 pad_14F0[0x8]; + struct DiscFile + transition_archive; /* 0x14E8: read by transition_do_transition (transition_load_wad) */ + u8 pad_14F0[0x8]; struct DiscFile wad_chunks[6]; /* 0x14F8, level wad chunks */ struct DiscFile help_text; /* 0x1528, per-language archive read by update_menu_help_text_load */ - struct DiscFile scene_chunk_archives[14]; /* 0x1530, overlays: x of an x/y pair picked by D_0015ED80 */ - struct DiscFile scene_chunk_archives_alt[14]; /* 0x15A0, the y half of scene_chunk_archives */ - struct DiscFile animation_table; /* 0x1610, read with animation_asset_read_active set */ - struct DiscFile music_60000[62]; /* 0x1618, music tracks 60000.. */ - struct DiscFile scene_movies[19]; /* 0x1808, overlays: x of an x/y pair picked by D_0015ED80 */ - struct DiscFile scene_movies_alt[19]; /* 0x18A0, the y half of scene_movies */ - struct DiscFile movies[12]; /* 0x1938, level transition movies */ - struct DiscFile movies_alt[12]; /* 0x1998, picked by the video mode flag */ - struct DiscFile streams[3]; /* 0x19F8, overlays: x/y pair picked by D_0015ED80 */ - struct DiscFile streams_alt[3]; /* 0x1A10, the y half of streams */ - struct DiscFile queued_movies[5]; /* 0x1A28, overlays: x/y pair picked by D_0015ED80 */ + struct DiscFile + scene_chunk_archives[14]; /* 0x1530, overlays: x of an x/y pair picked by D_0015ED80 */ + struct DiscFile scene_chunk_archives_alt[14]; /* 0x15A0, the y half of scene_chunk_archives */ + struct DiscFile animation_table; /* 0x1610, read with animation_asset_read_active set */ + struct DiscFile music_60000[62]; /* 0x1618, music tracks 60000.. */ + struct DiscFile scene_movies[19]; /* 0x1808, overlays: x of an x/y pair picked by D_0015ED80 */ + struct DiscFile scene_movies_alt[19]; /* 0x18A0, the y half of scene_movies */ + struct DiscFile movies[12]; /* 0x1938, level transition movies */ + struct DiscFile movies_alt[12]; /* 0x1998, picked by the video mode flag */ + struct DiscFile streams[3]; /* 0x19F8, overlays: x/y pair picked by D_0015ED80 */ + struct DiscFile streams_alt[3]; /* 0x1A10, the y half of streams */ + struct DiscFile queued_movies[5]; /* 0x1A28, overlays: x/y pair picked by D_0015ED80 */ struct DiscFile queued_movies_alt[5]; /* 0x1A50, the y half of queued_movies */ - struct DiscFile start_movies[4]; /* 0x1A78, played by start_level */ - struct DiscFile start_movies_alt[4]; /* 0x1A98, while D_0015ED80 is set */ + struct DiscFile start_movies[4]; /* 0x1A78, played by start_level */ + struct DiscFile start_movies_alt[4]; /* 0x1A98, while D_0015ED80 is set */ u8 pad_1AB8[0xEB0]; struct DiscFile shared_archive; /* 0x2968 */ struct DiscFile sound_archive; /* 0x2970 */ diff --git a/include/rnc/ui/hud/hud_state.h b/include/rnc/ui/hud/hud_state.h index 200d7d31f2..b77ae75d4a 100644 --- a/include/rnc/ui/hud/hud_state.h +++ b/include/rnc/ui/hud/hud_state.h @@ -76,7 +76,7 @@ struct HudState { struct HudTexPage *image_pages; /* 0x24 */ struct HudTexPage *palette_pages; /* 0x28 */ s32 unk2C; - s32 unk30; + s32 skip_update; /* 0x30: update_hud skips one frame and clears it */ }; /* Compile-time layout checks: a wrong offset makes the array size negative. */ @@ -90,7 +90,7 @@ HUD_STATE_OFFSET_CHECK(anim_defs, 0x1C); HUD_STATE_OFFSET_CHECK(frame_refs, 0x20); HUD_STATE_OFFSET_CHECK(image_pages, 0x24); HUD_STATE_OFFSET_CHECK(palette_pages, 0x28); -HUD_STATE_OFFSET_CHECK(unk30, 0x30); +HUD_STATE_OFFSET_CHECK(skip_update, 0x30); extern struct HudState hud_state __asm__("D_0019A3E8"); diff --git a/include/rnc/ui/map/map_state.h b/include/rnc/ui/map/map_state.h index c311ec504c..ef33317ea7 100644 --- a/include/rnc/ui/map/map_state.h +++ b/include/rnc/ui/map/map_state.h @@ -39,18 +39,18 @@ struct MapState { struct MapIcon *icons; /* 0x020: icon list of the shown level */ s32 unk24; /* 0x024: zero: update_map_zoom_and_pan and draw_map_overlay return early */ s32 coverage_enabled; /* 0x028: zero: the save page is cleared, not packed */ - s32 unk2C; /* 0x02C: see unk8 */ + s32 unk2C; /* 0x02C: see unk8 */ struct { - s32 unk0; /* draw_map_overlay draft: <0 skipped */ + s32 cell; /* cell of a 16x16 grid over the map, <0 = unused */ u8 pad4[0xC]; - } unk30[8]; /* 0x030 */ + } highlighted_cells[8]; /* 0x030: drawn as dark rectangles by draw_map_overlay */ s32 marker_count; /* 0x0B0: entries in markers */ f32 zoom[20]; /* 0x0B4: per-map zoom, 0.65..4 */ s32 pan_x[20]; /* 0x104 */ s32 pan_y[20]; /* 0x154 */ u8 pad1A4[0x80]; - s32 level; /* 0x224: selected level 0..19 */ - s32 loaded; /* 0x228: index of the loaded map, -1 none */ + s32 level; /* 0x224: selected level 0..19 */ + s32 loaded; /* 0x228: index of the loaded map, -1 none */ s32 current_map_data; /* 0x22C: stash_receive_data argument */ s32 unk230; /* 0x230: compared with -current_level_index (draw_map_screen) */ s32 current_map_size; /* 0x234: stash_receive_data byte count */ diff --git a/src/check/map_layout_check.c b/src/check/map_layout_check.c index a16f73c8f1..5af26e5770 100644 --- a/src/check/map_layout_check.c +++ b/src/check/map_layout_check.c @@ -12,7 +12,7 @@ CHECK(MapState, mask, mask, 0xC); CHECK(MapState, markers, markers, 0x1C); CHECK(MapState, icons, icons, 0x20); CHECK(MapState, unk24, unk24, 0x24); -CHECK(MapState, unk30, unk30, 0x30); +CHECK(MapState, highlighted_cells, highlighted_cells, 0x30); CHECK(MapState, marker_count, marker_count, 0xB0); CHECK(MapState, zoom, zoom, 0xB4); CHECK(MapState, pan_x, pan_x, 0x104); diff --git a/src/game/initialize_level_runtime.c b/src/game/initialize_level_runtime.c index 8314361be6..5c4d8279e5 100644 --- a/src/game/initialize_level_runtime.c +++ b/src/game/initialize_level_runtime.c @@ -191,8 +191,9 @@ void initialize_level_runtime(void) { init_view_context(); update_view_context(); vu1_init_chain(); - submit_audio_stream_io_request( - D_001940C0.buffer + 0x400000, disc_table.unk13B8.sector, disc_table.unk13B8.size); + submit_audio_stream_io_request(D_001940C0.buffer + 0x400000, + disc_table.space_transition_archive.sector, + disc_table.space_transition_archive.size); fade_to_black(scale_game_frames(0xC)); sceCdSync(0); FlushCache(0); diff --git a/src/game/transitions/transition_load_wad.c b/src/game/transitions/transition_load_wad.c index 214f4ae27e..56b6eb70d5 100644 --- a/src/game/transitions/transition_load_wad.c +++ b/src/game/transitions/transition_load_wad.c @@ -191,8 +191,9 @@ void transition_load_wad(void) { init_view_context(); update_view_context(); vu1_init_chain(); - start_audio_stream_read( - D_001940C0.hdr + 0x1000000, disc_table.unk14E8.sector, disc_table.unk14E8.size); + start_audio_stream_read(D_001940C0.hdr + 0x1000000, + disc_table.transition_archive.sector, + disc_table.transition_archive.size); update_audio_stream_until_idle(1); FlushCache(0); size = decompress_wad(D_001940C0.hdr + 0x1000000, D_001940C0.hdr); diff --git a/src/ui/hud/update_hud.c b/src/ui/hud/update_hud.c index c5abff09cf..7c9d235057 100644 --- a/src/ui/hud/update_hud.c +++ b/src/ui/hud/update_hud.c @@ -28,17 +28,17 @@ void update_hud(void) { s32 raised_alpha; s32 lowered_alpha; s32 remaining; - if (hud_state.unk30 == 0) { + if (hud_state.skip_update == 0) { goto block_2; } - hud_state.unk30 = 0; + hud_state.skip_update = 0; return; block_2: if (occl_chain_active == 0) { goto block_5; } - hud_state.unk30 = 0; + hud_state.skip_update = 0; return; block_5: slot = hud_chan_slots; diff --git a/src/ui/map/draw_map_overlay.c b/src/ui/map/draw_map_overlay.c index ef4281f79e..b22ab41add 100644 --- a/src/ui/map/draw_map_overlay.c +++ b/src/ui/map/draw_map_overlay.c @@ -184,7 +184,7 @@ void draw_map_overlay(void) { dx = map_right - map_left; dy = map_bottom - map_top; for (i = 0; i < 8; i++) { - cell = level_map_selection.unk30[i].unk0; + cell = level_map_selection.highlighted_cells[i].cell; if (cell >= 0) { cell_x = cell % 16; cell_y = cell / 16; From 740fc69e600b8ec3e27c6ead92efa0b2e2835883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:32:25 +0000 Subject: [PATCH 129/213] decomp: name the menu option and choice labels and the vendor menu auxiliary moby and cutscene offset --- .../rnc/overlay/shared/vendor/vendor_menu.h | 42 ++++++++++--------- include/rnc/ui/menus/menu_screen.h | 10 ++--- .../shared/vendor/draw_vendor_inset_quads.c | 4 +- src/overlays/shared/vendor/vendor_menu.c | 31 +++++++------- .../menus/selection/update_menu_option_list.c | 2 +- .../menus/widgets/update_menu_choice_list.c | 2 +- 6 files changed, 47 insertions(+), 44 deletions(-) diff --git a/include/rnc/overlay/shared/vendor/vendor_menu.h b/include/rnc/overlay/shared/vendor/vendor_menu.h index b82bc5f096..8ac9738341 100644 --- a/include/rnc/overlay/shared/vendor/vendor_menu.h +++ b/include/rnc/overlay/shared/vendor/vendor_menu.h @@ -48,16 +48,18 @@ typedef struct { /* The vendor menu state at D_L00_001CA4C0. */ typedef struct { - s32 state; /* 0x00: menu state: 0 opening, 1 open, 2 closing, 3 exit cutscene */ - s32 frames; /* 0x04: frames in the current state */ - s32 unk08; - s32 unk0C; - s32 unk10; - struct VendorMoby *unk14; - s32 unk18; /* 0x18: decompressed resource data */ + s32 state; /* 0x00: menu state: 0 opening, 1 open, 2 closing, 3 exit cutscene */ + s32 frames; /* 0x04: frames in the current state */ + s32 unk08; + s32 unk0C; + s32 unk10; + struct VendorMoby + *moby_buffer; /* 0x14: auxiliary_moby at +0, menu_mobys at +0x100, unk2C at +0x1400 */ + s32 unk18; /* 0x18: decompressed resource data */ struct VendorMoby *vendor_moby; /* 0x1C */ struct VendorMoby *menu_mobys; /* 0x20: the menu's mobys [0..5] */ - struct VendorMoby *unk24; + struct VendorMoby + *auxiliary_moby; /* 0x24: placed at vendor_auxiliary_moby_local_offset on the vendor */ struct VendorMoby *unk28; s32 unk2C; s32 unk30; @@ -66,18 +68,18 @@ typedef struct { s32 unk3C; s32 mode; /* 0x40: nonzero: rows and prices are for ammo */ s32 unk44; - s32 purchased_item; /* 0x48 */ - s32 scroll; /* 0x4C: list scroll, in steps of 0x38 */ - s32 item_text; /* 0x50: hud animation of the item text, -1 = none */ - s32 title_text; /* 0x54 */ - s32 cursor; /* 0x58: selected row */ - s32 purchase_state; /* 0x5C */ - Vec4 eye; /* 0x60 */ - Vec4 look; /* 0x70 */ - Vec4 basis[4]; /* 0x80: the vendor's transform */ - Vec4 unkC0; - VendorMenuRow rows[16]; /* 0xD0 */ - s32 row_count; /* 0x210 */ + s32 purchased_item; /* 0x48 */ + s32 scroll; /* 0x4C: list scroll, in steps of 0x38 */ + s32 item_text; /* 0x50: hud animation of the item text, -1 = none */ + s32 title_text; /* 0x54 */ + s32 cursor; /* 0x58: selected row */ + s32 purchase_state; /* 0x5C */ + Vec4 eye; /* 0x60 */ + Vec4 look; /* 0x70 */ + Vec4 basis[4]; /* 0x80: the vendor's transform */ + Vec4 cutscene_offset; /* 0xC0: added to the exit cutscene positions after basis */ + VendorMenuRow rows[16]; /* 0xD0 */ + s32 row_count; /* 0x210 */ u8 pad214[0xC]; } VendorMenu; diff --git a/include/rnc/ui/menus/menu_screen.h b/include/rnc/ui/menus/menu_screen.h index 168e6b2fa0..e34e76ccf0 100644 --- a/include/rnc/ui/menus/menu_screen.h +++ b/include/rnc/ui/menus/menu_screen.h @@ -26,7 +26,7 @@ struct MenuScreenWords { /* Option list screen (update_menu_option_list). */ struct MenuOption { - s32 unk0; /* 0x0: help text id of the option; 0 ends the list */ + s32 label; /* 0x0: text id of the option; 0 ends the list */ u8 *flag; /* 0x4: toggled by confirm (pad 0x40) */ s32 first_message; /* 0x8: text id */ s32 second_message; /* 0xC: text id */ @@ -35,21 +35,21 @@ struct MenuOption { struct MenuOptionListData { s32 flags; /* 0x30: bit 0 draws a box while the list is empty (draw_cheats_menu) */ - struct MenuOption *list; /* 0x34: ended by a null unk0 */ + struct MenuOption *list; /* 0x34: ended by a zero label */ s32 selection; /* 0x38: pad 0x1000 up, 0x4000 down */ s32 fade_timer; /* 0x3C: counts down after fade_to_black, drives D_0015F43C */ }; /* Choice list screen (update_menu_choice_list). */ struct MenuChoice { - s32 unk0; /* 0x0: 0 ends the list */ + s32 label; /* 0x0: text id of the choice; 0 ends the list */ u8 *value; /* 0x4: chosen option; confirm advances it */ s32 option[4]; /* 0x8: 0 ends them early */ }; /* size 0x18 */ struct MenuChoiceListData { u8 pad_30[0x4]; - struct MenuChoice *list; /* 0x34: ended by a zero unk0 */ + struct MenuChoice *list; /* 0x34: ended by a zero label */ s32 selection; /* 0x38: pad 0x1000 up, 0x4000 down */ }; @@ -350,7 +350,7 @@ struct MenuScreen { s32 (*draw)(struct MenuScreen *); /* 0x04 */ void (*enter)(struct MenuScreen *, s32); /* 0x08 */ void (*leave)(struct MenuScreen *, s32); /* 0x0C */ - s32 flags; /* 0x10: MENU_SCREEN_HIDDEN while the help text loads */ + s32 flags; /* 0x10: MENU_SCREEN_HIDDEN while the help text loads */ s32 moby; /* 0x14: its menu moby D_001D5D90[i]; menu sounds play on it */ s32 x; /* 0x18: left edge */ s32 y; /* 0x1C: top edge */ diff --git a/src/overlays/shared/vendor/draw_vendor_inset_quads.c b/src/overlays/shared/vendor/draw_vendor_inset_quads.c index 8f301465f0..08b17eaf23 100644 --- a/src/overlays/shared/vendor/draw_vendor_inset_quads.c +++ b/src/overlays/shared/vendor/draw_vendor_inset_quads.c @@ -383,7 +383,7 @@ void draw_vendor_screen(void) { D_L00_00165F80[2] = D_L00_00166FD0[2]; fast_vec_cross(&D_L00_00166FD0[1], &D_L00_00166FD0[0], &D_L00_00166FD0[2]); } - p->menu_mobys = (struct VendorMoby *)((u8 *)p->unk14 + 0x100); + p->menu_mobys = (struct VendorMoby *)((u8 *)p->moby_buffer + 0x100); init_moby_instance(((u8 *)p->menu_mobys), 0xD); *(u16 *)(((u8 *)p->menu_mobys) + 0x32) = 0x40; update_entity(((u8 *)p->menu_mobys)); @@ -393,7 +393,7 @@ void draw_vendor_screen(void) { update_entity(((u8 *)p->menu_mobys) + 0x500); pack_render_command_fields(((u8 *)p->menu_mobys) + 0x500, 0x202020, 0xE, 0xE, 0); initialize_vendor_selected_item_mobys(); - p->unk2C = (s32)p->unk14 + 0x1400; + p->unk2C = (s32)p->moby_buffer + 0x1400; fast_mem_zero16(p->unk2C, 0x400); p->unk18 = p->unk2C + 0x400; if (cd_read_active[0] == 0) { diff --git a/src/overlays/shared/vendor/vendor_menu.c b/src/overlays/shared/vendor/vendor_menu.c index 0d4bc9cbc9..19855b6159 100644 --- a/src/overlays/shared/vendor/vendor_menu.c +++ b/src/overlays/shared/vendor/vendor_menu.c @@ -446,7 +446,7 @@ void open_vendor_menu(void *vendor_moby_arg) { D_L00_0015F5D8 = 1; vendor_menu.state = VENDOR_MENU_OPENING; vendor_menu.unk10 = D_L00_00173E00[2] + 0x60000; - vendor_menu.unk14 = (struct VendorMoby *)(D_L00_00173E00[1] + 0x60000); + vendor_menu.moby_buffer = (struct VendorMoby *)(D_L00_00173E00[1] + 0x60000); vendor_menu.unk08 = 0; vendor_menu.vendor_moby = (struct VendorMoby *)vendor_moby; allocate_voice_for_target_entry(3, 0, vendor_moby); @@ -1253,12 +1253,12 @@ void update_vendor_menu(void) { case VENDOR_MENU_OPEN: if (D_L00_00161188 == 0 && cd_read_active[0] == 0 && D_L00_0016118C != 0) { decompress_and_relocate_vendor_moby_assets(); - vendor_menu.unk24 = vendor_menu.unk14; - init_moby_instance(vendor_menu.unk24, 0xC); - vendor_menu.unk24->h32 = 0x40; - vendor_menu.unk24->rot.f[2] = vendor_menu.vendor_moby->rot.f[2]; - update_entity(vendor_menu.unk24); - pack_render_command_fields(vendor_menu.unk24, 0x202020, 0xE, 0xE, 0); + vendor_menu.auxiliary_moby = vendor_menu.moby_buffer; + init_moby_instance(vendor_menu.auxiliary_moby, 0xC); + vendor_menu.auxiliary_moby->h32 = 0x40; + vendor_menu.auxiliary_moby->rot.f[2] = vendor_menu.vendor_moby->rot.f[2]; + update_entity(vendor_menu.auxiliary_moby); + pack_render_command_fields(vendor_menu.auxiliary_moby, 0x202020, 0xE, 0xE, 0); D_L00_00161188 = 1; D_L00_0016118C = 0; handle_vendor_auxiliary_moby_event(1); @@ -1266,14 +1266,15 @@ void update_vendor_menu(void) { advance_moby_animation(vendor_menu.vendor_moby); update_entity(vendor_menu.vendor_moby); if (D_L00_00161188 == 1) { - transform_vector_by_basis(&vendor_menu.unk24->pos, + transform_vector_by_basis(&vendor_menu.auxiliary_moby->pos, &vendor_auxiliary_moby_local_offset_gp, vendor_menu.vendor_moby->mtx); - fast_vec_add( - &vendor_menu.unk24->pos, &vendor_menu.unk24->pos, &vendor_menu.vendor_moby->pos); - advance_moby_animation(vendor_menu.unk24); - update_entity(vendor_menu.unk24); - update_resident_dialogue_animation_state(vendor_menu.unk24); + fast_vec_add(&vendor_menu.auxiliary_moby->pos, + &vendor_menu.auxiliary_moby->pos, + &vendor_menu.vendor_moby->pos); + advance_moby_animation(vendor_menu.auxiliary_moby); + update_entity(vendor_menu.auxiliary_moby); + update_resident_dialogue_animation_state(vendor_menu.auxiliary_moby); } k1 = -0.05f; k2 = -0.36f; @@ -1574,7 +1575,7 @@ void update_vendor_menu(void) { update_view_context(); qcopy(l00_camera.pos.f, current_camera_key); transform_vector_by_basis(l00_camera.pos.f, l00_camera.pos.f, vendor_menu.basis); - fast_vec_add(l00_camera.pos.f, l00_camera.pos.f, &vendor_menu.unkC0); + fast_vec_add(l00_camera.pos.f, l00_camera.pos.f, &vendor_menu.cutscene_offset); camera_world_z_rotation = fast_add_rotations(rot[2], vendor_menu.basis[3].f[2]); sce_vu0_unit_matrix(camera_rotation_matrix); sce_vu0_rot_matrix_x(camera_rotation_matrix, camera_rotation_matrix, rot[0]); @@ -1604,7 +1605,7 @@ void update_vendor_menu(void) { fast_vec_scale(&position_contribution_scratch, &keys[mb->next_frame], mb->blend); fast_vec_add(&mb->pos, &position_scratch, &position_contribution_scratch); transform_vector_by_basis(&mb->pos, &mb->pos, vendor_menu.basis); - fast_vec_add(&mb->pos, &mb->pos, &vendor_menu.unkC0); + fast_vec_add(&mb->pos, &mb->pos, &vendor_menu.cutscene_offset); mb->rot.f[2] = vendor_menu.basis[3].f[2]; mb->b71 = 0xFF; update_entity(mb); diff --git a/src/ui/menus/selection/update_menu_option_list.c b/src/ui/menus/selection/update_menu_option_list.c index 86422f812f..e8c07f3b12 100644 --- a/src/ui/menus/selection/update_menu_option_list.c +++ b/src/ui/menus/selection/update_menu_option_list.c @@ -47,7 +47,7 @@ s32 update_menu_option_list(struct MenuScreen *menu_screen) { menu_screen->data.options.selection = previous_selection - 1; } if ((controller_state.pressed_unmasked & PAD_DOWN) && - menu_screen->data.options.list[menu_screen->data.options.selection + 1].unk0 != 0) { + menu_screen->data.options.list[menu_screen->data.options.selection + 1].label != 0) { menu_screen->data.options.selection = menu_screen->data.options.selection + 1; } if (controller_state.pressed_unmasked & PAD_CROSS) { diff --git a/src/ui/menus/widgets/update_menu_choice_list.c b/src/ui/menus/widgets/update_menu_choice_list.c index 5e2fadb1af..bc386005f0 100644 --- a/src/ui/menus/widgets/update_menu_choice_list.c +++ b/src/ui/menus/widgets/update_menu_choice_list.c @@ -35,7 +35,7 @@ s32 update_menu_choice_list(struct MenuScreen *menu) { } if (controller_state.pressed_unmasked & PAD_DOWN) { selected_choice_index = menu->data.choices.selection; - if (menu->data.choices.list[selected_choice_index + 1].unk0 != 0) { + if (menu->data.choices.list[selected_choice_index + 1].label != 0) { menu->data.choices.selection = selected_choice_index + 1; } } From 87f1441477cd25fca708b8269a45a246a497816a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:33:56 +0000 Subject: [PATCH 130/213] decomp: name the item def weapon_up flag and update stale hero field names in comments --- include/rnc/overlay/shared/hero/item_defs.h | 2 +- .../shared/hero/advance_hero_animation.c | 6 ++-- .../shared/hero/hero_move_state_velocity.c | 2 +- src/overlays/shared/hero/hero_switch_item.c | 30 +++++++++---------- src/overlays/shared/hero/initialize_hero.c | 2 +- .../hero/process_hero_item_action_input.c | 18 +++++------ .../hero/process_hero_primary_item_input.c | 6 ++-- 7 files changed, 33 insertions(+), 33 deletions(-) diff --git a/include/rnc/overlay/shared/hero/item_defs.h b/include/rnc/overlay/shared/hero/item_defs.h index 27d8c07eb2..edc6bd7ce2 100644 --- a/include/rnc/overlay/shared/hero/item_defs.h +++ b/include/rnc/overlay/shared/hero/item_defs.h @@ -21,7 +21,7 @@ typedef struct ItemDef { s32 hero_animation; /* 0x24: animation the hero plays while holding the item */ s32 animation; /* 0x28: animation of the item's slot moby */ s32 animation_mode_12; /* 0x2C: used instead while state.control_mode is 12 */ - s32 unk30; /* 0x30: copied to hero.weapon_up */ + s32 weapon_up; /* 0x30: copied to hero.weapon_up when the item is drawn */ s16 pickup_message_multiple; /* 0x34: dialogue message when more than one ammo is picked up */ s16 pickup_message_single; /* 0x36: dialogue message when one ammo is picked up */ u16 unk38; /* 0x38 */ diff --git a/src/overlays/shared/hero/advance_hero_animation.c b/src/overlays/shared/hero/advance_hero_animation.c index 96634abde6..33f6ada9dc 100644 --- a/src/overlays/shared/hero/advance_hero_animation.c +++ b/src/overlays/shared/hero/advance_hero_animation.c @@ -39,11 +39,11 @@ extern void sync_hero_slot3_animation_speed(void) __asm__("FUN_L00_00232128"); extern void sync_hero_mapped_moby_animation_speed(void) __asm__("FUN_L00_002322c8"); /* Hero animation frame advance: steps the hero moby's frame position - (unk54) by the rate in hero.anim_speed/unkA94 or a scripted table, moves to + (anim_time) by the rate in hero.anim_frame_rate or a scripted table, moves to the next frame of the sequence each time it passes 1.0 (wrapping or - jumping as hero.anim_loop_frame/unkAB4/unkAB8 request), fires the sequence's sound + jumping as hero.queued_anim_frame and queued_frame_request request), fires the sequence's sound triggers crossed this frame, keeps the moby's looping sound in step, - and records the distance moved (hero.anim_frame/unkAAC). */ + and records the distance moved (hero.anim_frame_delta). */ void advance_hero_animation(void) __asm__("FUN_L00_00232670"); void advance_hero_animation(void) { diff --git a/src/overlays/shared/hero/hero_move_state_velocity.c b/src/overlays/shared/hero/hero_move_state_velocity.c index f282b95efa..338fcf0a8e 100644 --- a/src/overlays/shared/hero/hero_move_state_velocity.c +++ b/src/overlays/shared/hero/hero_move_state_velocity.c @@ -402,7 +402,7 @@ extern f32 D_0015EE18; symbol (D_0015EDB0[3]) changes the code */ #define BYTE_0015EDB3 (*(u8 *)0x15EDB3) -/* In hero state 2, sets the lean values from motion.unk188 (clamped to +/* In hero state 2, sets the lean values from motion.yaw_error (clamped to +-1.4); needs the moby in item slot 3. */ void update_hero_lean_and_sway_parameters(void) __asm__("FUN_L00_00215ef8"); diff --git a/src/overlays/shared/hero/hero_switch_item.c b/src/overlays/shared/hero/hero_switch_item.c index 094f133168..64d4c1cb98 100644 --- a/src/overlays/shared/hero/hero_switch_item.c +++ b/src/overlays/shared/hero/hero_switch_item.c @@ -1054,7 +1054,7 @@ void start_equipped_item_animation(void) { slot_animation_id = item_defs[item_id].animation_mode_12; P->item_anim_active = 1; { - s32 k = item_defs[item_id].unk30; + s32 k = item_defs[item_id].weapon_up; P->weapon_up = k; } animation_step_divisor = scale_game_frames(10); @@ -2741,7 +2741,7 @@ extern void matrix_from_basis_rows(void *, void *) __asm__("FUN_L00_001ffcf8"); extern void update_hero_motion_and_collision_probes(void) __asm__("FUN_L00_00221310"); extern void update_hero_timers_and_reach_state(void) __asm__("FUN_L00_002215c8"); -/* Per-frame hero input: stick (or d-pad) into unk1D20/24, the yaw and position +/* Per-frame hero input: stick (or d-pad) into stick_x/stick_y, the yaw and position history rings, then the hero basis matrix and the movement updates. */ void hero_update(void) __asm__("FUN_L00_00211670"); @@ -2831,7 +2831,7 @@ int test_hero_animation_frame_window(float animation_frame_threshold) { return 0; } -/* Clears hero.target_speed and unk194 as words. */ +/* Clears hero.target_speed and ground_speed as words. */ void clear_hero_target_and_ground_speeds(void) __asm__("FUN_L00_002118b0"); void clear_hero_target_and_ground_speeds(void) { @@ -2925,7 +2925,7 @@ void stick_target(float scale, int mode) { hero.target_speed = scale * vector_length_xy(&stick_vector); } -/* Hero speed clamp after a move update (twin of hero_speed_from_table): in state 0x3F it scales unk190 by 3.5 frame steps with a floor; otherwise it picks a table speed, and in state 0x73 it slows by 0.8 down to a floor. */ +/* Hero speed clamp after a move update (twin of hero_speed_from_table): in state 0x3F it scales target_speed by 3.5 frame steps with a floor; otherwise it picks a table speed, and in state 0x73 it slows by 0.8 down to a floor. */ void update_hero_target_speed_from_stick(void) __asm__("FUN_L00_00211be8"); void update_hero_target_speed_from_stick(void) { @@ -3790,15 +3790,15 @@ void resolve_hero_collisions_with_history(void) { #include "rnc/sdk/eetypes.h" /* * Hero movement step (FUN_L01_00233de0 twin; control mode 0xF caps the horizontal speed, 0xD and 0xE skip the cap): clamps the velocity, moves the hero by it (plus the - * one-frame impulse at unk920 and the push at unkF0), runs collision, then + * one-frame impulse move_impulse and the push platform_delta), runs collision, then * derives this frame's movement vectors and speeds: - * motion.unk100 position change this frame - * motion.unk110 movement direction scaled by the velocity along it - * motion.unk120 same, without the gravity-up component - * motion.unk130 same, gravity-up part only - * motion.unk140 displacement caused by the push - * motion.speed_xy speed, unk164 horizontal speed, unk168 forward speed - * motion.unk16C slope: vertical / horizontal change, clamped to +-0.5 + * motion.displacement position change this frame + * motion.resolved_velocity movement direction scaled by the velocity along it + * motion.resolved_velocity_z same, without the gravity-up component + * motion.resolved_velocity_xy same, gravity-up part only + * motion.platform_carry displacement caused by the push + * motion.speed_xy speed, flat_speed horizontal speed, forward_speed forward speed + * motion.move_slope slope: vertical / horizontal change, clamped to +-0.5 */ /* The FUN_L00_00233xxx helpers work in the hero's gravity frame (hero byte @@ -3936,7 +3936,7 @@ void apply_hero_motion_and_resolve_collisions(void) { } fast_vec_sub(&hero.motion.platform_carry, &hero.motion.pos, &movement_scratch_vector); { - /* push w moves to unk140.w; a block-local keeps retail's order */ + /* push w moves to platform_carry.w; a block-local keeps retail's order */ f32 push_w = hero.motion.platform_delta.f[3]; hero.motion.platform_delta.f[3] = 0.0f; @@ -4082,7 +4082,7 @@ void steer_hero_planar_velocity(f32 step) { /* Ported from rac1-decomp (src/overlays/shared/help_002274A8.c: HeroAirAccel). */ void air_accel(f32 step) __asm__("FUN_L01_00234358"); -/* Same steering as FUN_L00_00213e68, without the copy into motion.unk130. */ +/* Same steering as FUN_L00_00213e68, without the copy into motion.resolved_velocity_xy. */ void air_accel(f32 step) { struct Hero *player = &hero; f32 delta[4]; @@ -4306,7 +4306,7 @@ void hero_integrate_velocity(void) { if (z < floor) { z = floor; } - /* Fakematch: unk20AD is a u8, so this test never fires. It only + /* Fakematch: tilt_disabled is a u8, so this test never fires. It only keeps g alive past the subtraction, which gives retail's mov.s $f2,$f0; every clean spelling (MIN/MAX, helpers, ternary, a constant in a variable) folds g into the sub.s instead. */ diff --git a/src/overlays/shared/hero/initialize_hero.c b/src/overlays/shared/hero/initialize_hero.c index ca6c5bc561..f7380444a9 100644 --- a/src/overlays/shared/hero/initialize_hero.c +++ b/src/overlays/shared/hero/initialize_hero.c @@ -76,7 +76,7 @@ void initialize_hero(void) { clear_u64_value(&hero_eases_lui[i].pos); clear_u64_value(&hero_eases_lui[i].pos_vel); } - /* the eight voice slots unk2218..unk2234 as one array, indexed from the hero base */ + /* the eight voice slots grind_voice..0x2234 as one array, indexed from the hero base */ for (i = 0; i < 8; i++) ((struct { u8 pad[0x2218]; diff --git a/src/overlays/shared/hero/process_hero_item_action_input.c b/src/overlays/shared/hero/process_hero_item_action_input.c index 2cf8e52a7a..5c2e0267e7 100644 --- a/src/overlays/shared/hero/process_hero_item_action_input.c +++ b/src/overlays/shared/hero/process_hero_item_action_input.c @@ -41,15 +41,15 @@ void update_hero_stick_target_magnitude(void) { #include "qcopy.h" /* * Hero movement step (FUN_L01_00233de0 twin; control modes 0xD and 0xE skip the speed cap): clamps the velocity, moves the hero by it (plus the - * one-frame impulse at unk920 and the push at unkF0), runs collision, then + * one-frame impulse move_impulse and the push platform_delta), runs collision, then * derives this frame's movement vectors and speeds: - * motion.unk100 position change this frame - * motion.unk110 movement direction scaled by the velocity along it - * motion.unk120 same, without the gravity-up component - * motion.unk130 same, gravity-up part only - * motion.unk140 displacement caused by the push - * motion.unk160 speed, unk164 horizontal speed, unk168 forward speed - * motion.unk16C slope: vertical / horizontal change, clamped to +-0.5 + * motion.displacement position change this frame + * motion.resolved_velocity movement direction scaled by the velocity along it + * motion.resolved_velocity_z same, without the gravity-up component + * motion.resolved_velocity_xy same, gravity-up part only + * motion.platform_carry displacement caused by the push + * motion.speed_xy speed, flat_speed horizontal speed, forward_speed forward speed + * motion.move_slope slope: vertical / horizontal change, clamped to +-0.5 */ /* The FUN_L00_00233xxx helpers work in the hero's gravity frame (hero byte @@ -181,7 +181,7 @@ void integrate_hero_movement(void) { } fast_vec_sub(&hero.motion.platform_carry, &hero.motion.pos, &movement_vector_scratch); { - /* push w moves to unk140.w; a block-local keeps retail's order */ + /* push w moves to platform_carry.w; a block-local keeps retail's order */ f32 push_w = hero.motion.platform_delta.f[3]; hero.motion.platform_delta.f[3] = 0.0f; diff --git a/src/overlays/shared/hero/process_hero_primary_item_input.c b/src/overlays/shared/hero/process_hero_primary_item_input.c index 3c86b56081..6d0ddc8fb1 100644 --- a/src/overlays/shared/hero/process_hero_primary_item_input.c +++ b/src/overlays/shared/hero/process_hero_primary_item_input.c @@ -103,9 +103,9 @@ int hero_anim_tilt_lookup(int id, float *out_tilt_radians) { /* Applies the wrench/item selection for slot i: resolves pending, queued and requested items and refreshes the slot when it changes. */ /* Ported from rac1-decomp (src/overlays/shared/help_0020CDF0.c: func_L00_00210558), where it is exact; names translated to the US level program. */ -/* L05 adds to hero_switch_item the state.control_mode / unk8CE test that guards the second - unk20A6 set, and a new unguarded statement (the prologue's i!=0 branch lands - on it, so it runs for every slot) that sets unk20A6 for items[0].item_id == 0x24 with +/* L05 adds to hero_switch_item the state.control_mode / race_ammo test that guards the second + force_slot0_item8 set, and a new unguarded statement (the prologue's i!=0 branch lands + on it, so it runs for every slot) that sets force_slot0_item8 for items[0].item_id == 0x24 with state.control_mode != 0x16. The second condition is negated: retail's `beq` skips the store when state.control_mode == 0x16, which is what makes this spelling the only one that lands `beq` there. */ From a3edd8a8248a5fc56a566fd58bc7192481ec0a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:35:16 +0000 Subject: [PATCH 131/213] decomp: name the camera record class field --- include/rnc/camera/follow_cam.h | 26 +++++++++---------- include/rnc/camera/update_cam.h | 10 +++---- src/camera/apply_camera_shake.c | 2 +- src/camera/camera_activation_check_priority.c | 2 +- .../handle_camera_collision_with_hero.c | 2 +- src/camera/update_camera_underwater_flag.c | 2 +- .../shared/camera/aim_volume_camera.c | 2 +- src/overlays/shared/camera/grindrail_camera.c | 6 ++--- .../shared/camera/swing_volume_camera.c | 2 +- src/overlays/shared/props/trespasser_pad.c | 2 +- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/include/rnc/camera/follow_cam.h b/include/rnc/camera/follow_cam.h index ab43a4cac3..3618fc185c 100644 --- a/include/rnc/camera/follow_cam.h +++ b/include/rnc/camera/follow_cam.h @@ -10,19 +10,19 @@ * follow_camera_transition reads `follow` for its spring constants, and * fast_dec_timer counts `blend_timer` down. The follow_camera_set_* setters * (FUN_L00_002e8450..002e8680) each write one field and do nothing while the - * record's unk86 is set. The shot cameras (volume_camera_swing, volume_camera_aim) + * record's camera_class is set. The shot cameras (volume_camera_swing, volume_camera_aim) * snap every vector at once when a shot starts. */ typedef struct { f32 focus[4]; /* 0x40: point the camera looks at, moved by velocity each frame */ f32 velocity[4]; /* 0x50: focus displacement for this frame */ u8 pad60[0x20]; - f32 look_target[4]; /* 0x80: focus offset blended towards the hero */ - f32 eye[4]; /* 0x90: resulting camera position */ - f32 offset[4]; /* 0xA0: eased offset, split into a lateral and an up part */ - f32 lateral_ease[4]; /* 0xB0: cam_interp_values state of the lateral part */ - f32 up_ease[4]; /* 0xC0: cam_interp_values state of the up part */ - f32 snap_look_target[4]; /* 0xD0: set to look_target when a shot camera snaps */ + f32 look_target[4]; /* 0x80: focus offset blended towards the hero */ + f32 eye[4]; /* 0x90: resulting camera position */ + f32 offset[4]; /* 0xA0: eased offset, split into a lateral and an up part */ + f32 lateral_ease[4]; /* 0xB0: cam_interp_values state of the lateral part */ + f32 up_ease[4]; /* 0xC0: cam_interp_values state of the up part */ + f32 snap_look_target[4]; /* 0xD0: set to look_target when a shot camera snaps */ u8 padE0[0x10]; f32 look_height; /* 0xF0: height of look_target above the hero */ u8 padF4[0x22]; @@ -48,18 +48,18 @@ typedef struct { /* 0x1D0: written when a shot camera snaps. */ typedef struct { u8 pad1D0[0x20]; - f32 shot_pos[4]; /* 0x1F0: set to the record's position */ - f32 eye_distance_error; /* 0x200: eye_distance minus the length of eye_offset */ + f32 shot_pos[4]; /* 0x1F0: set to the record's position */ + f32 eye_distance_error; /* 0x200: eye_distance minus the length of eye_offset */ u8 pad204[8]; } FollowCamSnap; typedef struct { - f32 eye_offset[4]; /* 0x130: eye offset; its length is the eye distance */ + f32 eye_offset[4]; /* 0x130: eye offset; its length is the eye distance */ f32 saved_eye_offset[4]; /* 0x140: copy of eye_offset */ u8 pad150[0xC]; - f32 eye_distance; /* 0x15C: eye distance, set with eye_offset by the shot cameras */ - f32 distance; /* 0x160: distance of the eye behind the hero */ - f32 unk164; /* 0x164: aim cameras start only while it is (nearly) 0 */ + f32 eye_distance; /* 0x15C: eye distance, set with eye_offset by the shot cameras */ + f32 distance; /* 0x160: distance of the eye behind the hero */ + f32 unk164; /* 0x164: aim cameras start only while it is (nearly) 0 */ u8 pad168[0x40]; FollowCamFlags ctl; /* 0x1A8 */ u8 pad1BC[0x10]; diff --git a/include/rnc/camera/update_cam.h b/include/rnc/camera/update_cam.h index ceb2c456ab..76f0767790 100644 --- a/include/rnc/camera/update_cam.h +++ b/include/rnc/camera/update_cam.h @@ -27,11 +27,11 @@ struct UpdateCam { s16 transition_state; u8 pad80[4]; s16 descriptor_index; - s16 unk86; /* 0 lets the hero collision moby spawn; 6 disables shake */ - u8 pad88[4]; - s16 type; /* index into camera_types (D_001E8C00) */ - s16 activation_blocked; - u8 pad90[0x10]; + s16 camera_class; /* 0x86: 0 the follow camera (lets the hero collision moby spawn), 6 disables shake, 7 Swingshot */ + u8 pad88[4]; + s16 type; /* index into camera_types (D_001E8C00) */ + s16 activation_blocked; + u8 pad90[0x10]; }; /* Per camera type callbacks, indexed by UpdateCam.type. */ diff --git a/src/camera/apply_camera_shake.c b/src/camera/apply_camera_shake.c index 10d1d4159b..48911ffdcf 100644 --- a/src/camera/apply_camera_shake.c +++ b/src/camera/apply_camera_shake.c @@ -23,7 +23,7 @@ void apply_camera_shake(struct CameraShake *shake, s32 axis_index) { f32 applied_shake_offset; s32 remaining_frames; - if (cur_cam[0] != 0 && cur_cam[0]->unk86 == 6) { + if (cur_cam[0] != 0 && cur_cam[0]->camera_class == 6) { shake->frames = 0; shake->frames_max = 0; } else { diff --git a/src/camera/camera_activation_check_priority.c b/src/camera/camera_activation_check_priority.c index 2818638c60..95e723da3b 100644 --- a/src/camera/camera_activation_check_priority.c +++ b/src/camera/camera_activation_check_priority.c @@ -88,7 +88,7 @@ int camera_activation_check_priority(struct UpdateCam *candidate, struct UpdateC } case CAMERA_ACTIVATION_MATCH_LISTENER_GROUP: { struct Hero *hero_state = &hero; - short listener_group = candidate->unk86; + short listener_group = candidate->camera_class; if (listener_group != hero_state->camera_mode) { return 0; diff --git a/src/camera/handle_camera_collision_with_hero.c b/src/camera/handle_camera_collision_with_hero.c index 8c584bbbef..1ef5bc3a05 100644 --- a/src/camera/handle_camera_collision_with_hero.c +++ b/src/camera/handle_camera_collision_with_hero.c @@ -14,7 +14,7 @@ void handle_camera_collision_with_hero(struct UpdateCam *cam) __asm__("FUN_001eb void handle_camera_collision_with_hero(struct UpdateCam *selected_camera) { struct CamColl *collision_state = &cam_coll_state; - if (selected_camera->unk86 == 0) { + if (selected_camera->camera_class == 0) { if (collision_state->moby == 0) { collision_state->moby = noop_callback_l((u8 *)collision_state - 0x50); } diff --git a/src/camera/update_camera_underwater_flag.c b/src/camera/update_camera_underwater_flag.c index 067da8c826..621b9834d8 100644 --- a/src/camera/update_camera_underwater_flag.c +++ b/src/camera/update_camera_underwater_flag.c @@ -19,7 +19,7 @@ void update_camera_underwater_flag(void) { float probe_end[4]; int i; - if (camera->current_camera->unk86 == 6 || game_mode_macro != 0) { + if (camera->current_camera->camera_class == 6 || game_mode_macro != 0) { camera->underwater = 0; return; } diff --git a/src/overlays/shared/camera/aim_volume_camera.c b/src/overlays/shared/camera/aim_volume_camera.c index 7da8af4e75..f5d3bee312 100644 --- a/src/overlays/shared/camera/aim_volume_camera.c +++ b/src/overlays/shared/camera/aim_volume_camera.c @@ -54,7 +54,7 @@ s32 volume_camera_aim_active(struct UpdateCam *aim_camera_record) { FollowCamState *state = FOLLOW_CAM_STATE(current_follow_camera_record); FollowCamTail *tail = &state->tail; FollowCamFlags *ctl = &state->tail.ctl; - if (current_follow_camera_record->unk86 != 0) + if (current_follow_camera_record->camera_class != 0) return 0; if (params->only_in_mode_1 != 0 && D_001413F4 != 1) return 0; diff --git a/src/overlays/shared/camera/grindrail_camera.c b/src/overlays/shared/camera/grindrail_camera.c index 3b1a3c4e66..272fbb1893 100644 --- a/src/overlays/shared/camera/grindrail_camera.c +++ b/src/overlays/shared/camera/grindrail_camera.c @@ -617,8 +617,8 @@ typedef struct { u8 pad00[0x7E]; s16 mode; /* 0x7E: set to 3 or 5 */ u8 pad80[4]; - s16 slot; /* 0x84: index into l01_camera_preset_rows */ - s16 unk86; /* 0x86: compared with hero.camera_mode */ + s16 slot; /* 0x84: index into l01_camera_preset_rows */ + s16 camera_class; /* 0x86: UpdateCam.camera_class, compared with hero.camera_mode */ } CamUser; void update_camera_mode_from_preset(CamUser *camera_user) __asm__("FUN_L01_00316030"); @@ -626,7 +626,7 @@ void update_camera_mode_from_preset(CamUser *camera_user) __asm__("FUN_L01_00316 void update_camera_mode_from_preset(CamUser *camera_user) { CameraPreset *camera_preset = l01_camera_preset_rows[camera_user->slot].preset; - if (hero.camera_mode == camera_user->unk86) { + if (hero.camera_mode == camera_user->camera_class) { if (camera_preset->target < 0) { return; } diff --git a/src/overlays/shared/camera/swing_volume_camera.c b/src/overlays/shared/camera/swing_volume_camera.c index 0dea107023..b3dc8366b4 100644 --- a/src/overlays/shared/camera/swing_volume_camera.c +++ b/src/overlays/shared/camera/swing_volume_camera.c @@ -103,7 +103,7 @@ s32 volume_camera_swing_active(struct UpdateCam *swing_camera_record) { u16 type; params = camera_descriptors[swing_camera_record->descriptor_index].params; - if (current_follow_cam->unk86 != 0) { + if (current_follow_cam->camera_class != 0) { return 0; } type = *(u16 *)¶ms->type; diff --git a/src/overlays/shared/props/trespasser_pad.c b/src/overlays/shared/props/trespasser_pad.c index 5c66ff82ce..b05d85ba4e 100644 --- a/src/overlays/shared/props/trespasser_pad.c +++ b/src/overlays/shared/props/trespasser_pad.c @@ -340,7 +340,7 @@ void tresspasser_pad_update(Moby *moby) { set_camera_rotation(&camera_rot); D_L02_0017EB08_lui = 1; force_help_message(6, 0); - if (l02_camera.current_camera != 0 && l02_camera.current_camera->unk86 != 5) { + if (l02_camera.current_camera != 0 && l02_camera.current_camera->camera_class != 5) { jet_mount(&l02_camera.pos, &l02_camera.rotation_x, 1, 0, 0); } i = 0; From 7ee1e03ec865adf231ad251f9df4ece62a6050c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:22:57 +0000 Subject: [PATCH 132/213] decomp: define the glyph metrics of the three fonts in C --- config/us/levels/exe_data.tsv | 19 + configure.py | 1 + include/rnc/ui/text/font_metrics.h | 19 +- .../draw_localized_three_option_menu.c | 16 +- src/ui/menus/widgets/draw_menu_text_list.c | 5 +- .../widgets/render_configured_text_label.c | 5 +- src/ui/text/draw_dialog_text.c | 3 +- src/ui/text/font/font_print.c | 714 +++++++++++++++++- src/ui/text/render_localized_ui_entry_list.c | 6 +- 9 files changed, 758 insertions(+), 30 deletions(-) diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index 9742d7a80b..06243a8815 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -139,6 +139,7 @@ 00 001C24F0 48 00 001C28F0 64 00 001C2F00 48 +00 001C3150 2784 00 001C44B8 80 00 001C4508 1152 00 001C4988 76 @@ -326,6 +327,7 @@ 01 001C2970 48 01 001C2D70 64 01 001C3380 48 +01 001C35D0 2784 01 001C4938 80 01 001C4988 1152 01 001C4E08 76 @@ -513,6 +515,7 @@ 02 001C2AF0 48 02 001C2EF0 64 02 001C3500 48 +02 001C3750 2784 02 001C4AB8 80 02 001C4B08 1152 02 001C4F88 76 @@ -700,6 +703,7 @@ 03 001C25F0 48 03 001C29F0 64 03 001C3000 48 +03 001C3250 2784 03 001C45B8 80 03 001C4608 1152 03 001C4A88 76 @@ -887,6 +891,7 @@ 04 001C2670 48 04 001C2A70 64 04 001C3080 48 +04 001C32D0 2784 04 001C4638 80 04 001C4688 1152 04 001C4B08 76 @@ -1074,6 +1079,7 @@ 05 001C2970 48 05 001C2D70 64 05 001C3380 48 +05 001C35D0 2784 05 001C4938 80 05 001C4988 1152 05 001C4E08 76 @@ -1261,6 +1267,7 @@ 06 001C2C70 48 06 001C3070 64 06 001C3680 48 +06 001C38D0 2784 06 001C4C38 80 06 001C4C88 1152 06 001C5108 76 @@ -1448,6 +1455,7 @@ 07 001C2570 48 07 001C2970 64 07 001C2F80 48 +07 001C31D0 2784 07 001C4538 80 07 001C4588 1152 07 001C4A08 76 @@ -1635,6 +1643,7 @@ 08 001C2CF0 48 08 001C30F0 64 08 001C3700 48 +08 001C3950 2784 08 001C4CB8 80 08 001C4D08 1152 08 001C5188 76 @@ -1822,6 +1831,7 @@ 09 001C2670 48 09 001C2A70 64 09 001C3080 48 +09 001C32D0 2784 09 001C4638 80 09 001C4688 1152 09 001C4B08 76 @@ -2009,6 +2019,7 @@ 10 001C2970 48 10 001C2D70 64 10 001C3380 48 +10 001C35D0 2784 10 001C4938 80 10 001C4988 1152 10 001C4E08 76 @@ -2196,6 +2207,7 @@ 11 001C2EF0 48 11 001C32F0 64 11 001C3900 48 +11 001C3B50 2784 11 001C4EB8 80 11 001C4F08 1152 11 001C5388 76 @@ -2383,6 +2395,7 @@ 12 001C2970 48 12 001C2D70 64 12 001C3380 48 +12 001C35D0 2784 12 001C4938 80 12 001C4988 1152 12 001C4E08 76 @@ -2570,6 +2583,7 @@ 13 001C27F0 48 13 001C2BF0 64 13 001C3200 48 +13 001C3450 2784 13 001C47B8 80 13 001C4808 1152 13 001C4C88 76 @@ -2757,6 +2771,7 @@ 14 001C2BF0 48 14 001C2FF0 64 14 001C3600 48 +14 001C3850 2784 14 001C4BB8 80 14 001C4C08 1152 14 001C5088 76 @@ -2944,6 +2959,7 @@ 15 001C2AF0 48 15 001C2EF0 64 15 001C3500 48 +15 001C3750 2784 15 001C4AB8 80 15 001C4B08 1152 15 001C4F88 76 @@ -3131,6 +3147,7 @@ 16 001C2970 48 16 001C2D70 64 16 001C3380 48 +16 001C35D0 2784 16 001C4938 80 16 001C4988 1152 16 001C4E08 76 @@ -3318,6 +3335,7 @@ 17 001C2DF0 48 17 001C31F0 64 17 001C3800 48 +17 001C3A50 2784 17 001C4DB8 80 17 001C4E08 1152 17 001C5288 76 @@ -3505,6 +3523,7 @@ 18 001C2EF0 48 18 001C32F0 64 18 001C3900 48 +18 001C3B50 2784 18 001C4EB8 80 18 001C4F08 1152 18 001C5388 76 diff --git a/configure.py b/configure.py index 33bc77b318..883747ae64 100755 --- a/configure.py +++ b/configure.py @@ -1255,6 +1255,7 @@ "ui/menus/item_preview/draw_menu_preview_objects": (0x1D5020, 0xD5FA0, 96), # slot draw flags "ui/menus/item_preview/clear_preview_resource_bindings": (0x1D59D8, 0xD6958, 136), "ui/menus/system/emit_selected_graphics_dma_packets": (0x1D7D90, 0xD8D10, 192), + "ui/text/font/font_print": (0x1DF050, 0xDFFD0, 2784), # glyph records of the three fonts } # Uninitialised variables a unit defines. `.sbss` (small ones) sits in the diff --git a/include/rnc/ui/text/font_metrics.h b/include/rnc/ui/text/font_metrics.h index a61e5a106d..0bc1d6a220 100644 --- a/include/rnc/ui/text/font_metrics.h +++ b/include/rnc/ui/text/font_metrics.h @@ -3,9 +3,20 @@ #include "types.h" -/* 232 glyph records of 4 bytes (u, v, y offset, advance) per font. */ -extern u8 normal_font_metrics[0x3A0] __asm__("D_001DF050"); -extern u8 small_font_metrics[0x3A0] __asm__("D_001DF3F0"); -extern u8 large_font_metrics[0x3A0] __asm__("D_001DF790"); +/* One character of a font: where its glyph sits in the font texture, how + * far it drops below the line and how far the pen moves after it (a glyph + * with advance 0 is not drawn). */ +struct Glyph { + u8 u; + u8 v; + s8 top; + s8 adv; +}; + +/* Glyph records by character code, one table per font texture (effect + * textures 1, 2 and 3). */ +extern struct Glyph normal_font_metrics[232] __asm__("D_001DF050"); +extern struct Glyph small_font_metrics[232] __asm__("D_001DF3F0"); +extern struct Glyph large_font_metrics[232] __asm__("D_001DF790"); #endif /* LOMBYTE_RNC_UI_TEXT_FONT_METRICS_H */ diff --git a/src/ui/menus/widgets/draw_localized_three_option_menu.c b/src/ui/menus/widgets/draw_localized_three_option_menu.c index 483b79d85e..0e7940e8b5 100644 --- a/src/ui/menus/widgets/draw_localized_three_option_menu.c +++ b/src/ui/menus/widgets/draw_localized_three_option_menu.c @@ -21,18 +21,18 @@ extern s32 count_skill_points(void) __asm__("func_00215348"); extern s32 measure_text_width_regular(char *, s32) __asm__("func_001F6250"); extern void font_print_center(s32, s32, u64, char *, s32) __asm__("func_001F6AF0"); extern void draw_menu_selection_marker(s32, s32, s32) __asm__("func_0021F8E8"); -extern void font_print(s32, s32, u64, char *, s32, s64, u8 *) __asm__("func_001F62B0"); +extern void font_print(s32, s32, u64, char *, s32, s64, struct Glyph *) __asm__("func_001F62B0"); s32 draw_localized_three_option_menu(struct ThreeOptionMenu *menu) __asm__("FUN_00222a98"); s32 draw_localized_three_option_menu(struct ThreeOptionMenu *menu) { - char text_buffer[0x50]; - s32 font_texture_index; - u8 *glyphs; - s32 maximum_text_width; - s32 measured_width; - s32 line_spacing; - s32 draw_y; + char text_buffer[0x50]; + s32 font_texture_index; + struct Glyph *glyphs; + s32 maximum_text_width; + s32 measured_width; + s32 line_spacing; + s32 draw_y; font_texture_index = 1; setup_gif_paging(0); diff --git a/src/ui/menus/widgets/draw_menu_text_list.c b/src/ui/menus/widgets/draw_menu_text_list.c index 8ee62382e3..42279f7168 100644 --- a/src/ui/menus/widgets/draw_menu_text_list.c +++ b/src/ui/menus/widgets/draw_menu_text_list.c @@ -18,8 +18,7 @@ extern void setup_gif_paging(s32) __asm__("func_001F4280"); extern void do_gif_paging(void) __asm__("func_001F4398"); extern s32 get_effect_texture(s32) __asm__("FUN_001f44b8"); -extern void -font_print_window(struct TextRegion *, long, char *, s32, s32, u8 *) __asm__("FUN_001f7090"); +extern void font_print_window(struct TextRegion *, long, char *, s32, s32, struct Glyph *) __asm__("FUN_001f7090"); extern char *get_help_message_text(s32) __asm__("func_001FDD10"); extern void draw_menu_selection_marker(s32, s32, s32) __asm__("func_0021F8E8"); extern void *memset(void *, int, unsigned int); @@ -35,7 +34,7 @@ s32 draw_menu_text_list(struct MenuScreen *menu) { s32 font_size; s32 font_kind; s32 focused; - u8 *font; + struct Glyph *font; s32 item_count; struct MenuTextItem *item_count_cursor; s32 row_height; diff --git a/src/ui/menus/widgets/render_configured_text_label.c b/src/ui/menus/widgets/render_configured_text_label.c index d708781c7f..e1d8389c8f 100644 --- a/src/ui/menus/widgets/render_configured_text_label.c +++ b/src/ui/menus/widgets/render_configured_text_label.c @@ -29,8 +29,7 @@ extern char fallback_label_text[] __asm__("D_00160288"); extern void setup_gif_paging(int) __asm__("func_001F4280"); extern void do_gif_paging(void) __asm__("func_001F4398"); extern long get_effect_texture(int) __asm__("func_001F44B8"); -extern void -font_print_window(struct TextRegion *, long, char *, int, long, u8 *) __asm__("func_001F7090"); +extern void font_print_window(struct TextRegion *, long, char *, int, long, struct Glyph *) __asm__("func_001F7090"); extern int scale_game_frames(int) __asm__("func_001F96F8"); extern s32 fast_tween_color(s32, s32, f32) __asm__("func_001FA6E0"); extern char *get_help_message_text(int) __asm__("func_001FDD10"); @@ -42,7 +41,7 @@ int render_configured_text_label(struct MenuScreen *label) __asm__("FUN_0021a328 int render_configured_text_label(struct MenuScreen *label) { char formatted_text[64]; - u8 *font; + struct Glyph *font; int font_texture_index; char *text; int value_variant; diff --git a/src/ui/text/draw_dialog_text.c b/src/ui/text/draw_dialog_text.c index 3426f76117..7a07481797 100644 --- a/src/ui/text/draw_dialog_text.c +++ b/src/ui/text/draw_dialog_text.c @@ -28,8 +28,7 @@ extern s32 get_effect_texture(s32) __asm__("FUN_001f44b8"); extern void draw_ui_frame(s32, s32, s32, s32, s32) __asm__("func_001F5F18"); extern void draw_outlined_rect(s32, s32, s32, s32, s32) __asm__("func_001F6060"); extern s32 font_print_center(s32, s32, s64, char *, s32) __asm__("func_001F6AF0"); -extern void -font_print_window(struct TextRegion *, s64, void *, s32, s32, u8 *) __asm__("FUN_001f7090"); +extern void font_print_window(struct TextRegion *, s64, void *, s32, s32, struct Glyph *) __asm__("FUN_001f7090"); extern void font_print_window_regular(struct TextRegion *, s32, char *, s32) __asm__("func_001F7580"); extern s32 fast_tween_color(s32, s32, f32) __asm__("func_001FA6E0"); diff --git a/src/ui/text/font/font_print.c b/src/ui/text/font/font_print.c index 221bce0452..98f8dd193a 100644 --- a/src/ui/text/font/font_print.c +++ b/src/ui/text/font/font_print.c @@ -2,13 +2,7 @@ #include "rnc/data_labels.h" #include "rnc/ui/text/font_state.h" #include "rnc/game/game_globals.h" - -struct Glyph { - u8 u; - u8 v; - s8 top; - s8 adv; -}; +#include "rnc/ui/text/font_metrics.h" #include "rnc/ui/text/font_palette.h" @@ -107,3 +101,709 @@ void font_print( } extern __typeof__(font_print) func_001F62B0 __attribute__((alias("FUN_001f62b0"))); + +/* Indexed by character code; codes 0x80..0xA7 draw a second glyph 0x40 entries later. */ +struct Glyph normal_font_metrics[232] = { + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 96, 0, 18}, + { 72, 96, 0, 18}, + { 48, 96, 0, 18}, + { 24, 96, 0, 18}, + { 96, 96, 0, 25}, + {144, 96, 0, 25}, + {120, 96, 0, 25}, + {168, 96, 0, 25}, + {208, 96, 0, 16}, + {232, 96, 0, 16}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 5}, /* ' ' */ + { 48, 80, 0, 7}, /* '!' */ + {240, 80, -8, 9}, /* '"' */ + { 24, 96, 0, 18}, /* '#' */ + {176, 64, -10, 11}, /* '$' */ + { 0, 96, 0, 18}, /* '%' */ + { 0, 0, 0, 0}, /* '&' */ + { 64, 80, -8, 4}, /* '\'' */ + { 96, 80, 0, 9}, /* '(' */ + {112, 80, 0, 9}, /* ')' */ + { 0, 0, 0, 0}, /* '*' */ + {160, 80, -2, 9}, /* '+' */ + { 16, 80, 1, 6}, /* ',' */ + { 80, 80, -4, 9}, /* '-' */ + { 0, 80, 0, 6}, /* '.' */ + {160, 64, 0, 7}, /* '/' */ + { 0, 64, 0, 13}, /* '0' */ + { 16, 64, 0, 13}, /* '1' */ + { 32, 64, 0, 13}, /* '2' */ + { 48, 64, 0, 13}, /* '3' */ + { 64, 64, 0, 13}, /* '4' */ + { 80, 64, 0, 13}, /* '5' */ + { 96, 64, 0, 13}, /* '6' */ + {112, 64, 0, 13}, /* '7' */ + {128, 64, 0, 13}, /* '8' */ + {144, 64, 0, 13}, /* '9' */ + {128, 80, 0, 6}, /* ':' */ + {144, 80, 0, 6}, /* ';' */ + {192, 80, -2, 11}, /* '<' */ + { 0, 0, 0, 0}, /* '=' */ + {176, 80, -2, 11}, /* '>' */ + { 32, 80, 0, 11}, /* '?' */ + { 72, 96, 0, 18}, /* '@' */ + { 0, 0, 0, 14}, /* 'A' */ + { 16, 0, 0, 13}, /* 'B' */ + { 32, 0, 0, 13}, /* 'C' */ + { 48, 0, 0, 14}, /* 'D' */ + { 64, 0, 0, 12}, /* 'E' */ + { 80, 0, 0, 12}, /* 'F' */ + { 96, 0, 0, 14}, /* 'G' */ + {112, 0, 0, 14}, /* 'H' */ + {128, 0, 0, 4}, /* 'I' */ + {144, 0, 0, 9}, /* 'J' */ + {160, 0, 0, 13}, /* 'K' */ + {176, 0, 0, 11}, /* 'L' */ + {192, 0, 0, 16}, /* 'M' */ + { 0, 16, 0, 13}, /* 'N' */ + { 16, 16, 0, 16}, /* 'O' */ + { 32, 16, 0, 14}, /* 'P' */ + { 48, 16, 1, 16}, /* 'Q' */ + { 64, 16, 0, 14}, /* 'R' */ + { 80, 16, 0, 14}, /* 'S' */ + { 96, 16, 0, 13}, /* 'T' */ + {112, 16, 0, 14}, /* 'U' */ + {128, 16, 0, 14}, /* 'V' */ + {144, 16, 0, 16}, /* 'W' */ + {160, 16, 0, 13}, /* 'X' */ + {176, 16, 0, 13}, /* 'Y' */ + {192, 16, 0, 13}, /* 'Z' */ + { 0, 0, 0, 0}, /* '[' */ + { 0, 0, 0, 0}, /* '\\' */ + { 0, 0, 0, 0}, /* ']' */ + { 48, 96, 0, 18}, /* '^' */ + {192, 64, 0, 14}, /* '_' */ + { 0, 0, 0, 0}, /* '`' */ + { 0, 32, 0, 10}, /* 'a' */ + { 16, 32, 0, 11}, /* 'b' */ + { 32, 32, 0, 9}, /* 'c' */ + { 48, 32, 0, 10}, /* 'd' */ + { 64, 32, 0, 11}, /* 'e' */ + { 80, 32, 0, 8}, /* 'f' */ + { 96, 32, 2, 10}, /* 'g' */ + {112, 32, 0, 10}, /* 'h' */ + {128, 32, 0, 4}, /* 'i' */ + {144, 32, 2, 6}, /* 'j' */ + {160, 32, 0, 9}, /* 'k' */ + {176, 32, 0, 4}, /* 'l' */ + {192, 32, 0, 15}, /* 'm' */ + { 0, 48, 0, 10}, /* 'n' */ + { 16, 48, 0, 11}, /* 'o' */ + { 32, 48, 2, 11}, /* 'p' */ + { 48, 48, 2, 10}, /* 'q' */ + { 64, 48, 0, 7}, /* 'r' */ + { 80, 48, 0, 9}, /* 's' */ + { 96, 48, 0, 8}, /* 't' */ + {112, 48, 0, 10}, /* 'u' */ + {128, 48, 0, 10}, /* 'v' */ + {144, 48, 0, 15}, /* 'w' */ + {160, 48, 0, 10}, /* 'x' */ + {176, 48, 3, 11}, /* 'y' */ + {192, 48, 0, 9}, /* 'z' */ + { 0, 0, 0, 0}, /* '{' */ + { 0, 0, 0, 0}, /* '|' */ + { 0, 0, 0, 0}, /* '}' */ + { 0, 0, 0, 0}, /* '~' */ + { 0, 0, 0, 0}, + { 0, 0, 0, 14}, + { 0, 0, 0, 14}, + { 0, 0, 0, 14}, + { 0, 0, 0, 14}, + { 0, 32, 0, 10}, + { 0, 32, 0, 10}, + { 0, 32, 0, 10}, + { 0, 32, 0, 10}, + { 64, 0, 0, 12}, + { 64, 0, 0, 12}, + { 64, 0, 0, 12}, + { 64, 0, 0, 12}, + { 64, 32, 0, 11}, + { 64, 32, 0, 11}, + { 64, 32, 0, 11}, + { 64, 32, 0, 11}, + {192, 112, 0, 5}, + {192, 112, 0, 5}, + {192, 112, 0, 5}, + {192, 112, 0, 5}, + {208, 112, 0, 6}, + {208, 112, 0, 6}, + {208, 112, 0, 6}, + {208, 112, 0, 6}, + { 16, 16, 0, 16}, + { 16, 16, 0, 16}, + { 16, 16, 0, 16}, + { 16, 16, 0, 16}, + { 16, 48, 0, 11}, + { 16, 48, 0, 11}, + { 16, 48, 0, 11}, + { 16, 48, 0, 11}, + {112, 16, 0, 14}, + {112, 16, 0, 14}, + {112, 16, 0, 14}, + {112, 16, 0, 14}, + {112, 48, 0, 10}, + {112, 48, 0, 10}, + {112, 48, 0, 10}, + {112, 48, 0, 10}, + {128, 112, -2, 13}, + {144, 112, 0, 10}, + {160, 112, 2, 13}, + {176, 112, 3, 9}, + {224, 112, -2, 12}, + {240, 112, -1, 16}, + {224, 80, 0, 7}, + {208, 80, 0, 11}, + {192, 96, 0, 15}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 64, 112, -2, 1}, + { 80, 112, -2, 1}, + { 96, 112, -2, 2}, + {112, 112, -2, 1}, + { 0, 112, 0, 0}, + { 16, 112, 0, 0}, + { 32, 112, 0, 0}, + { 48, 112, 0, 0}, + { 64, 112, -2, 1}, + { 80, 112, -2, 1}, + { 96, 112, -2, 1}, + {112, 112, -2, 1}, + { 0, 112, 0, 0}, + { 16, 112, 0, 0}, + { 32, 112, 0, 0}, + { 48, 112, 0, 0}, + { 0, 112, -3, -2}, + { 16, 112, -3, -2}, + { 32, 112, -3, -2}, + { 48, 112, -3, -2}, + { 0, 112, 0, -2}, + { 16, 112, 0, -2}, + { 32, 112, 0, -2}, + { 48, 112, 0, -2}, + { 64, 112, -2, 2}, + { 80, 112, -2, 2}, + { 96, 112, -2, 3}, + {112, 112, -2, 2}, + { 0, 112, 0, 1}, + { 16, 112, 0, 1}, + { 32, 112, 0, 1}, + { 48, 112, 0, 1}, + { 64, 112, -2, 2}, + { 80, 112, -2, 2}, + { 96, 112, -2, 3}, + {112, 112, -2, 2}, + { 0, 112, 0, 0}, + { 16, 112, 0, 0}, + { 32, 112, 0, 0}, + { 48, 112, 0, 0}, +}; + +struct Glyph small_font_metrics[232] = { + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 96, 0, 18}, + { 72, 96, 0, 18}, + { 48, 96, 0, 18}, + { 24, 96, 0, 18}, + { 96, 96, 0, 25}, + {144, 96, 0, 25}, + {120, 96, 0, 25}, + {168, 96, 0, 25}, + {208, 96, 0, 16}, + {232, 96, 0, 16}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 4}, /* ' ' */ + { 48, 80, 0, 7}, /* '!' */ + {240, 80, -7, 8}, /* '"' */ + { 24, 96, 0, 18}, /* '#' */ + {176, 64, -9, 11}, /* '$' */ + { 0, 96, 0, 18}, /* '%' */ + { 0, 0, 0, 0}, /* '&' */ + { 64, 80, -7, 3}, /* '\'' */ + { 96, 80, 0, 8}, /* '(' */ + {112, 80, 0, 8}, /* ')' */ + { 0, 0, 0, 0}, /* '*' */ + {160, 80, -2, 10}, /* '+' */ + { 16, 80, 1, 6}, /* ',' */ + { 80, 80, -3, 8}, /* '-' */ + { 0, 80, -1, 5}, /* '.' */ + {160, 64, 0, 6}, /* '/' */ + { 0, 64, 0, 12}, /* '0' */ + { 16, 64, 0, 12}, /* '1' */ + { 32, 64, 0, 12}, /* '2' */ + { 48, 64, 0, 12}, /* '3' */ + { 64, 64, 0, 12}, /* '4' */ + { 80, 64, 0, 12}, /* '5' */ + { 96, 64, 0, 12}, /* '6' */ + {112, 64, 0, 12}, /* '7' */ + {128, 64, 0, 12}, /* '8' */ + {144, 64, 0, 12}, /* '9' */ + {128, 80, 0, 6}, /* ':' */ + {144, 80, 0, 6}, /* ';' */ + {192, 80, -2, 11}, /* '<' */ + { 0, 0, 0, 0}, /* '=' */ + {176, 80, -2, 11}, /* '>' */ + { 32, 80, 0, 11}, /* '?' */ + { 72, 96, 0, 18}, /* '@' */ + { 0, 0, 0, 12}, /* 'A' */ + { 16, 0, 0, 12}, /* 'B' */ + { 32, 0, 0, 11}, /* 'C' */ + { 48, 0, 0, 12}, /* 'D' */ + { 64, 0, 0, 11}, /* 'E' */ + { 80, 0, 0, 11}, /* 'F' */ + { 96, 0, 0, 12}, /* 'G' */ + {112, 0, 0, 12}, /* 'H' */ + {128, 0, 0, 5}, /* 'I' */ + {144, 0, 0, 8}, /* 'J' */ + {160, 0, 0, 11}, /* 'K' */ + {176, 0, 0, 10}, /* 'L' */ + {192, 0, 0, 14}, /* 'M' */ + { 0, 16, 0, 12}, /* 'N' */ + { 16, 16, 0, 13}, /* 'O' */ + { 32, 16, 0, 12}, /* 'P' */ + { 48, 16, 0, 13}, /* 'Q' */ + { 64, 16, 0, 11}, /* 'R' */ + { 80, 16, 0, 11}, /* 'S' */ + { 96, 16, 0, 11}, /* 'T' */ + {112, 16, 0, 12}, /* 'U' */ + {128, 16, 0, 11}, /* 'V' */ + {144, 16, 0, 15}, /* 'W' */ + {160, 16, 0, 11}, /* 'X' */ + {176, 16, 0, 12}, /* 'Y' */ + {192, 16, 0, 11}, /* 'Z' */ + { 0, 0, 0, 0}, /* '[' */ + { 0, 0, 0, 0}, /* '\\' */ + { 0, 0, 0, 0}, /* ']' */ + { 48, 96, 0, 18}, /* '^' */ + {192, 64, 0, 14}, /* '_' */ + { 0, 0, 0, 0}, /* '`' */ + { 0, 32, 0, 9}, /* 'a' */ + { 16, 32, 0, 10}, /* 'b' */ + { 32, 32, 0, 8}, /* 'c' */ + { 48, 32, 0, 9}, /* 'd' */ + { 64, 32, 0, 9}, /* 'e' */ + { 80, 32, 0, 7}, /* 'f' */ + { 96, 32, 0, 10}, /* 'g' */ + {112, 32, 0, 10}, /* 'h' */ + {128, 32, 0, 4}, /* 'i' */ + {144, 32, 0, 5}, /* 'j' */ + {160, 32, 0, 9}, /* 'k' */ + {176, 32, 0, 4}, /* 'l' */ + {192, 32, 0, 13}, /* 'm' */ + { 0, 48, 0, 9}, /* 'n' */ + { 16, 48, 0, 10}, /* 'o' */ + { 32, 48, 0, 9}, /* 'p' */ + { 48, 48, 0, 10}, /* 'q' */ + { 64, 48, 0, 7}, /* 'r' */ + { 80, 48, 0, 9}, /* 's' */ + { 96, 48, 0, 6}, /* 't' */ + {112, 48, 0, 10}, /* 'u' */ + {128, 48, 0, 10}, /* 'v' */ + {144, 48, 0, 14}, /* 'w' */ + {160, 48, 0, 10}, /* 'x' */ + {176, 48, 0, 9}, /* 'y' */ + {192, 48, 0, 9}, /* 'z' */ + { 0, 0, 0, 0}, /* '{' */ + { 0, 0, 0, 0}, /* '|' */ + { 0, 0, 0, 0}, /* '}' */ + { 0, 0, 0, 0}, /* '~' */ + { 0, 0, 0, 0}, + { 0, 0, 0, 12}, + { 0, 0, 0, 12}, + { 0, 0, 0, 12}, + { 0, 0, 0, 12}, + { 0, 32, 0, 9}, + { 0, 32, 0, 9}, + { 0, 32, 0, 9}, + { 0, 32, 0, 9}, + { 64, 0, 0, 11}, + { 64, 0, 0, 11}, + { 64, 0, 0, 11}, + { 64, 0, 0, 11}, + { 64, 32, 0, 9}, + { 64, 32, 0, 9}, + { 64, 32, 0, 9}, + { 64, 32, 0, 9}, + {192, 112, 0, 5}, + {192, 112, 0, 5}, + {192, 112, 0, 5}, + {192, 112, 0, 5}, + {208, 112, 0, 6}, + {208, 112, 0, 6}, + {208, 112, 0, 6}, + {208, 112, 0, 6}, + { 16, 16, 0, 13}, + { 16, 16, 0, 13}, + { 16, 16, 0, 13}, + { 16, 16, 0, 13}, + { 16, 48, 0, 10}, + { 16, 48, 0, 10}, + { 16, 48, 0, 10}, + { 16, 48, 0, 10}, + {112, 16, 0, 12}, + {112, 16, 0, 12}, + {112, 16, 0, 12}, + {112, 16, 0, 12}, + {112, 48, 0, 10}, + {112, 48, 0, 10}, + {112, 48, 0, 10}, + {112, 48, 0, 10}, + {128, 112, -2, 12}, + {144, 112, 0, 10}, + {160, 112, 2, 11}, + {176, 112, 3, 8}, + {224, 112, -2, 10}, + {240, 112, -2, 14}, + {224, 80, 0, 7}, + {208, 80, 0, 10}, + {192, 96, 0, 14}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 64, 112, -1, 1}, + { 80, 112, -1, 1}, + { 96, 112, -1, 2}, + {112, 112, -1, 1}, + { 0, 112, 0, 0}, + { 16, 112, 0, 0}, + { 32, 112, 0, 0}, + { 48, 112, 0, 0}, + { 64, 112, -1, 1}, + { 80, 112, -1, 1}, + { 96, 112, -1, 1}, + {112, 112, -1, 1}, + { 0, 112, 0, 0}, + { 16, 112, 0, 0}, + { 32, 112, 0, 0}, + { 48, 112, 0, 0}, + { 0, 112, -2, -2}, + { 16, 112, -2, -2}, + { 32, 112, -2, -1}, + { 48, 112, -2, -1}, + { 0, 112, 0, -2}, + { 16, 112, 0, -2}, + { 32, 112, 0, -2}, + { 48, 112, 0, -2}, + { 64, 112, -1, 2}, + { 80, 112, -1, 2}, + { 96, 112, -1, 2}, + {112, 112, -1, 2}, + { 0, 112, 0, 1}, + { 16, 112, 0, 1}, + { 32, 112, 0, 1}, + { 48, 112, 0, 1}, + { 64, 112, -1, 2}, + { 80, 112, -1, 2}, + { 96, 112, -2, 2}, + {112, 112, -1, 2}, + { 0, 112, 0, 0}, + { 16, 112, 0, 0}, + { 32, 112, 0, 1}, + { 48, 112, 0, 1}, +}; + +struct Glyph large_font_metrics[232] = { + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 96, 0, 18}, + { 72, 96, 0, 18}, + { 48, 96, 0, 18}, + { 24, 96, 0, 18}, + { 96, 96, 0, 25}, + {144, 96, 0, 25}, + {120, 96, 0, 25}, + {168, 96, 0, 25}, + {208, 96, 0, 16}, + {232, 96, 0, 16}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 5}, /* ' ' */ + { 48, 80, 0, 7}, /* '!' */ + {240, 80, -9, 10}, /* '"' */ + { 24, 96, 0, 18}, /* '#' */ + {176, 64, -10, 11}, /* '$' */ + { 0, 96, 0, 18}, /* '%' */ + { 0, 0, 0, 0}, /* '&' */ + { 64, 80, -8, 4}, /* '\'' */ + { 96, 80, 0, 8}, /* '(' */ + {112, 80, 0, 8}, /* ')' */ + { 0, 0, 0, 0}, /* '*' */ + {160, 80, -2, 9}, /* '+' */ + { 16, 80, 1, 6}, /* ',' */ + { 80, 80, -4, 9}, /* '-' */ + { 0, 80, 0, 6}, /* '.' */ + {160, 64, 0, 8}, /* '/' */ + { 0, 64, 0, 16}, /* '0' */ + { 16, 64, 0, 16}, /* '1' */ + { 32, 64, 0, 16}, /* '2' */ + { 48, 64, 0, 16}, /* '3' */ + { 64, 64, 0, 16}, /* '4' */ + { 80, 64, 0, 16}, /* '5' */ + { 96, 64, 0, 16}, /* '6' */ + {112, 64, 0, 16}, /* '7' */ + {128, 64, 0, 16}, /* '8' */ + {144, 64, 0, 16}, /* '9' */ + {128, 80, 0, 6}, /* ':' */ + {144, 80, 0, 6}, /* ';' */ + {192, 80, -2, 12}, /* '<' */ + { 0, 0, 0, 0}, /* '=' */ + {176, 80, -2, 12}, /* '>' */ + { 32, 80, 0, 11}, /* '?' */ + { 72, 96, 0, 18}, /* '@' */ + { 0, 0, 0, 15}, /* 'A' */ + { 16, 0, 0, 15}, /* 'B' */ + { 32, 0, 0, 14}, /* 'C' */ + { 48, 0, 0, 15}, /* 'D' */ + { 64, 0, 0, 13}, /* 'E' */ + { 80, 0, 0, 13}, /* 'F' */ + { 96, 0, 0, 16}, /* 'G' */ + {112, 0, 0, 15}, /* 'H' */ + {128, 0, 0, 4}, /* 'I' */ + {144, 0, 0, 10}, /* 'J' */ + {160, 0, 0, 15}, /* 'K' */ + {176, 0, 0, 13}, /* 'L' */ + {192, 0, 0, 16}, /* 'M' */ + { 0, 16, 0, 15}, /* 'N' */ + { 16, 16, 0, 17}, /* 'O' */ + { 32, 16, 0, 15}, /* 'P' */ + { 48, 16, 1, 16}, /* 'Q' */ + { 64, 16, 0, 15}, /* 'R' */ + { 80, 16, 0, 14}, /* 'S' */ + { 96, 16, 0, 14}, /* 'T' */ + {112, 16, 0, 16}, /* 'U' */ + {128, 16, 0, 15}, /* 'V' */ + {144, 16, 0, 16}, /* 'W' */ + {160, 16, 0, 14}, /* 'X' */ + {176, 16, 0, 14}, /* 'Y' */ + {192, 16, 0, 14}, /* 'Z' */ + { 0, 0, 0, 0}, /* '[' */ + { 0, 0, 0, 0}, /* '\\' */ + { 0, 0, 0, 0}, /* ']' */ + { 48, 96, 0, 18}, /* '^' */ + {192, 64, 0, 14}, /* '_' */ + { 0, 0, 0, 0}, /* '`' */ + { 0, 32, 0, 12}, /* 'a' */ + { 16, 32, 0, 12}, /* 'b' */ + { 32, 32, 0, 10}, /* 'c' */ + { 48, 32, 0, 12}, /* 'd' */ + { 64, 32, 0, 12}, /* 'e' */ + { 80, 32, 0, 9}, /* 'f' */ + { 96, 32, 3, 12}, /* 'g' */ + {112, 32, 0, 12}, /* 'h' */ + {128, 32, 0, 4}, /* 'i' */ + {144, 32, 1, 6}, /* 'j' */ + {160, 32, 0, 10}, /* 'k' */ + {176, 32, 0, 4}, /* 'l' */ + {192, 32, 0, 16}, /* 'm' */ + { 0, 48, 0, 11}, /* 'n' */ + { 16, 48, 0, 13}, /* 'o' */ + { 32, 48, 3, 12}, /* 'p' */ + { 48, 48, 3, 12}, /* 'q' */ + { 64, 48, 0, 8}, /* 'r' */ + { 80, 48, 0, 11}, /* 's' */ + { 96, 48, 0, 9}, /* 't' */ + {112, 48, 0, 12}, /* 'u' */ + {128, 48, 0, 12}, /* 'v' */ + {144, 48, 0, 16}, /* 'w' */ + {160, 48, 0, 11}, /* 'x' */ + {176, 48, 3, 11}, /* 'y' */ + {192, 48, 0, 10}, /* 'z' */ + { 0, 0, 0, 0}, /* '{' */ + { 0, 0, 0, 0}, /* '|' */ + { 0, 0, 0, 0}, /* '}' */ + { 0, 0, 0, 0}, /* '~' */ + { 0, 0, 0, 0}, + { 0, 0, 0, 15}, + { 0, 0, 0, 15}, + { 0, 0, 0, 15}, + { 0, 0, 0, 15}, + { 0, 32, 0, 12}, + { 0, 32, 0, 12}, + { 0, 32, 0, 12}, + { 0, 32, 0, 12}, + { 64, 0, 0, 13}, + { 64, 0, 0, 13}, + { 64, 0, 0, 13}, + { 64, 0, 0, 13}, + { 64, 32, 0, 12}, + { 64, 32, 0, 12}, + { 64, 32, 0, 12}, + { 64, 32, 0, 12}, + {192, 112, 0, 6}, + {192, 112, 0, 6}, + {192, 112, 0, 6}, + {192, 112, 0, 6}, + {208, 112, 0, 6}, + {208, 112, 0, 6}, + {208, 112, 0, 6}, + {208, 112, 0, 6}, + { 16, 16, 0, 17}, + { 16, 16, 0, 17}, + { 16, 16, 0, 17}, + { 16, 16, 0, 17}, + { 16, 48, 0, 13}, + { 16, 48, 0, 13}, + { 16, 48, 0, 13}, + { 16, 48, 0, 13}, + {112, 16, 0, 16}, + {112, 16, 0, 16}, + {112, 16, 0, 16}, + {112, 16, 0, 16}, + {112, 48, 0, 12}, + {112, 48, 0, 12}, + {112, 48, 0, 12}, + {112, 48, 0, 12}, + {128, 112, -1, 15}, + {144, 112, 0, 11}, + {160, 112, 1, 14}, + {176, 112, 3, 10}, + {224, 112, -1, 14}, + {240, 112, 0, 16}, + {224, 80, 0, 7}, + {208, 80, 0, 11}, + {192, 96, 0, 16}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 0, 0, 0, 0}, + { 64, 112, -3, 1}, + { 80, 112, -3, 1}, + { 96, 112, -3, 2}, + {112, 112, -3, 1}, + { 0, 112, 0, 1}, + { 16, 112, 0, 1}, + { 32, 112, 0, 1}, + { 48, 112, 0, 1}, + { 64, 112, -3, 1}, + { 80, 112, -3, 1}, + { 96, 112, -3, 1}, + {112, 112, -3, 1}, + { 0, 112, 0, 1}, + { 16, 112, 0, 1}, + { 32, 112, 0, 1}, + { 48, 112, 0, 1}, + { 0, 112, -3, -2}, + { 16, 112, -3, -3}, + { 32, 112, -3, -2}, + { 48, 112, -3, -2}, + { 0, 112, 0, -3}, + { 16, 112, 0, -3}, + { 32, 112, 0, -3}, + { 48, 112, 0, -3}, + { 64, 112, -3, 2}, + { 80, 112, -3, 2}, + { 96, 112, -3, 3}, + {112, 112, -3, 2}, + { 0, 112, 0, 1}, + { 16, 112, 0, 1}, + { 32, 112, 0, 1}, + { 48, 112, 0, 1}, + { 64, 112, -3, 2}, + { 80, 112, -3, 2}, + { 96, 112, -3, 3}, + {112, 112, -3, 2}, + { 0, 112, 0, 1}, + { 16, 112, 0, 1}, + { 32, 112, 0, 1}, + { 48, 112, 0, 1}, +}; diff --git a/src/ui/text/render_localized_ui_entry_list.c b/src/ui/text/render_localized_ui_entry_list.c index d700789577..8b154f7d64 100644 --- a/src/ui/text/render_localized_ui_entry_list.c +++ b/src/ui/text/render_localized_ui_entry_list.c @@ -13,14 +13,14 @@ extern void setup_gif_paging(s32) __asm__("func_001F4280"); extern void do_gif_paging(void) __asm__("func_001F4398"); extern s32 get_effect_texture(s32) __asm__("FUN_001f44b8"); -extern s32 measure_text_width(char *, s32, u8 *) __asm__("func_001F6200"); -extern void font_print(s32, s32, long, char *, s32, s32, u8 *) __asm__("func_001F62B0"); +extern s32 measure_text_width(char *, s32, struct Glyph *) __asm__("func_001F6200"); +extern void font_print(s32, s32, long, char *, s32, s32, struct Glyph *) __asm__("func_001F62B0"); extern char *get_help_message_text(s32) __asm__("func_001FDD10"); s32 render_localized_ui_entry_list(struct MenuScreen *menu) __asm__("FUN_0021b1c8"); s32 render_localized_ui_entry_list(struct MenuScreen *menu) { s32 focused; - u8 *glyphs; + struct Glyph *glyphs; s32 font_texture_index; s32 row_height; s32 half_width; From a3cca8a3811e710a5a21099bae991d04374225d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:32:31 +0000 Subject: [PATCH 133/213] decomp: define the vendor item prices in C --- config/us/levels/exe_data.tsv | 19 ++++++++ configure.py | 1 + include/rnc/ui/vendor/vendor_capture.h | 7 ++- .../menus/weapons/draw_selected_item_ammo.c | 38 ++++++--------- src/ui/vendor/render_vendor_buy_label_pass.c | 46 +++++++++++++++++++ .../render_vendor_purchase_prompt_pass.c | 24 ++++------ 6 files changed, 94 insertions(+), 41 deletions(-) diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index 06243a8815..e5324d2328 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -140,6 +140,7 @@ 00 001C28F0 64 00 001C2F00 48 00 001C3150 2784 +00 001C40B0 1032 00 001C44B8 80 00 001C4508 1152 00 001C4988 76 @@ -328,6 +329,7 @@ 01 001C2D70 64 01 001C3380 48 01 001C35D0 2784 +01 001C4530 1032 01 001C4938 80 01 001C4988 1152 01 001C4E08 76 @@ -516,6 +518,7 @@ 02 001C2EF0 64 02 001C3500 48 02 001C3750 2784 +02 001C46B0 1032 02 001C4AB8 80 02 001C4B08 1152 02 001C4F88 76 @@ -704,6 +707,7 @@ 03 001C29F0 64 03 001C3000 48 03 001C3250 2784 +03 001C41B0 1032 03 001C45B8 80 03 001C4608 1152 03 001C4A88 76 @@ -892,6 +896,7 @@ 04 001C2A70 64 04 001C3080 48 04 001C32D0 2784 +04 001C4230 1032 04 001C4638 80 04 001C4688 1152 04 001C4B08 76 @@ -1080,6 +1085,7 @@ 05 001C2D70 64 05 001C3380 48 05 001C35D0 2784 +05 001C4530 1032 05 001C4938 80 05 001C4988 1152 05 001C4E08 76 @@ -1268,6 +1274,7 @@ 06 001C3070 64 06 001C3680 48 06 001C38D0 2784 +06 001C4830 1032 06 001C4C38 80 06 001C4C88 1152 06 001C5108 76 @@ -1456,6 +1463,7 @@ 07 001C2970 64 07 001C2F80 48 07 001C31D0 2784 +07 001C4130 1032 07 001C4538 80 07 001C4588 1152 07 001C4A08 76 @@ -1644,6 +1652,7 @@ 08 001C30F0 64 08 001C3700 48 08 001C3950 2784 +08 001C48B0 1032 08 001C4CB8 80 08 001C4D08 1152 08 001C5188 76 @@ -1832,6 +1841,7 @@ 09 001C2A70 64 09 001C3080 48 09 001C32D0 2784 +09 001C4230 1032 09 001C4638 80 09 001C4688 1152 09 001C4B08 76 @@ -2020,6 +2030,7 @@ 10 001C2D70 64 10 001C3380 48 10 001C35D0 2784 +10 001C4530 1032 10 001C4938 80 10 001C4988 1152 10 001C4E08 76 @@ -2208,6 +2219,7 @@ 11 001C32F0 64 11 001C3900 48 11 001C3B50 2784 +11 001C4AB0 1032 11 001C4EB8 80 11 001C4F08 1152 11 001C5388 76 @@ -2396,6 +2408,7 @@ 12 001C2D70 64 12 001C3380 48 12 001C35D0 2784 +12 001C4530 1032 12 001C4938 80 12 001C4988 1152 12 001C4E08 76 @@ -2584,6 +2597,7 @@ 13 001C2BF0 64 13 001C3200 48 13 001C3450 2784 +13 001C43B0 1032 13 001C47B8 80 13 001C4808 1152 13 001C4C88 76 @@ -2772,6 +2786,7 @@ 14 001C2FF0 64 14 001C3600 48 14 001C3850 2784 +14 001C47B0 1032 14 001C4BB8 80 14 001C4C08 1152 14 001C5088 76 @@ -2960,6 +2975,7 @@ 15 001C2EF0 64 15 001C3500 48 15 001C3750 2784 +15 001C46B0 1032 15 001C4AB8 80 15 001C4B08 1152 15 001C4F88 76 @@ -3148,6 +3164,7 @@ 16 001C2D70 64 16 001C3380 48 16 001C35D0 2784 +16 001C4530 1032 16 001C4938 80 16 001C4988 1152 16 001C4E08 76 @@ -3336,6 +3353,7 @@ 17 001C31F0 64 17 001C3800 48 17 001C3A50 2784 +17 001C49B0 1032 17 001C4DB8 80 17 001C4E08 1152 17 001C5288 76 @@ -3524,6 +3542,7 @@ 18 001C32F0 64 18 001C3900 48 18 001C3B50 2784 +18 001C4AB0 1032 18 001C4EB8 80 18 001C4F08 1152 18 001C5388 76 diff --git a/configure.py b/configure.py index 883747ae64..7600778b13 100755 --- a/configure.py +++ b/configure.py @@ -1256,6 +1256,7 @@ "ui/menus/item_preview/clear_preview_resource_bindings": (0x1D59D8, 0xD6958, 136), "ui/menus/system/emit_selected_graphics_dma_packets": (0x1D7D90, 0xD8D10, 192), "ui/text/font/font_print": (0x1DF050, 0xDFFD0, 2784), # glyph records of the three fonts + "ui/vendor/render_vendor_buy_label_pass": (0x1DFFB0, 0xE0F30, 1032), # vendor prices by item } # Uninitialised variables a unit defines. `.sbss` (small ones) sits in the diff --git a/include/rnc/ui/vendor/vendor_capture.h b/include/rnc/ui/vendor/vendor_capture.h index 98c6584b70..64bbb7836f 100644 --- a/include/rnc/ui/vendor/vendor_capture.h +++ b/include/rnc/ui/vendor/vendor_capture.h @@ -3,14 +3,17 @@ #include "types.h" +/* Vendor prices by item id; the discounted columns apply while the vendor's + discount pricing is on (render_vendor_buy_label_pass). */ struct VendorItemPricing { s32 purchase_price; s32 discounted_purchase_price; u16 ammo_price; u16 discounted_ammo_price; - u16 pad0C; + u16 unk0C; u16 ammo_capacity; - u8 pad10[4]; + u16 unk10; + u16 unk12; u16 gold_weapon_price; /* bolts; a gold weapon also costs 4 gold bolts (process_menu_entry) */ u8 pad16[2]; }; diff --git a/src/ui/menus/weapons/draw_selected_item_ammo.c b/src/ui/menus/weapons/draw_selected_item_ammo.c index 9a4b948568..0097904cc1 100644 --- a/src/ui/menus/weapons/draw_selected_item_ammo.c +++ b/src/ui/menus/weapons/draw_selected_item_ammo.c @@ -6,38 +6,30 @@ #include "rnc/rendering/texture.h" #include "rnc/sdk/libc/stdio.h" #include "rnc/ui/text/text_region.h" +#include "rnc/ui/vendor/vendor_capture.h" extern char D_001602A0[]; extern char ammo_count_decimal_format[] __asm__("D_001602B8"); extern char ammo_count_grouped_decimal_format[] __asm__("D_001602C0"); extern char D_001602D0[]; -struct ImageEntry { - u8 pad0[8]; - u16 unk8; - u8 padA[4]; - u16 unkE; - u8 pad10[8]; -}; - -extern struct ImageEntry D_001DFFB0[]; -extern void setup_gif_paging(s32) __asm__("func_001F4280"); -extern void do_gif_paging() __asm__("func_001F4398"); +extern void setup_gif_paging(s32) __asm__("func_001F4280"); +extern void do_gif_paging() __asm__("func_001F4398"); extern void font_print_window_regular(void *, u64, void *, s32) __asm__("func_001F7580"); extern u8 *get_help_message_text(s32) __asm__("func_001FDD10"); extern void vu1_add_g_sregister(s32, s32) __asm__("func_00233980"); s32 draw_selected_item_ammo(s32 image_descriptor_input) __asm__("FUN_0021f158"); s32 draw_selected_item_ammo(s32 image_descriptor_input) { - u8 ammo_text[0x50]; - u8 descriptor[0x20]; - s16 cell_id; - s32 selected_item_id; - s32 ammo; - s32 entry_field; - struct ImageEntry *selected_item_record; - struct MenuScreen *grid; - u8 *end_ptr; + u8 ammo_text[0x50]; + u8 descriptor[0x20]; + s16 cell_id; + s32 selected_item_id; + s32 ammo; + s32 entry_field; + struct VendorItemPricing *selected_item_record; + struct MenuScreen *grid; + u8 *end_ptr; grid = menu_system.current->focus; cell_id = grid->data.grid.cells[grid->data.grid.selected_cell].id; @@ -46,11 +38,11 @@ s32 draw_selected_item_ammo(s32 image_descriptor_input) { return 0; } ammo = weapon_ammo_counts[selected_item_id]; - selected_item_record = &D_001DFFB0[selected_item_id]; - entry_field = (s32)selected_item_record->unkE; + selected_item_record = &vendor_item_prices[selected_item_id]; + entry_field = (s32)selected_item_record->ammo_capacity; vu1_add_g_sregister(0x42, 0x44); vu1_add_g_sregister(0x47, 0xB); - if (selected_item_record->unk8 == 0) { + if (selected_item_record->ammo_price == 0) { sprintf(ammo_text, get_help_message_text(0x4F52)); } else { if (ammo < 0x3E8) { diff --git a/src/ui/vendor/render_vendor_buy_label_pass.c b/src/ui/vendor/render_vendor_buy_label_pass.c index 78c2b94cb8..7d15ce807d 100644 --- a/src/ui/vendor/render_vendor_buy_label_pass.c +++ b/src/ui/vendor/render_vendor_buy_label_pass.c @@ -104,3 +104,49 @@ void render_vendor_buy_label_pass(char *unused, int width, int height) { extern __typeof__(render_vendor_buy_label_pass) func_00238F08 __attribute__((alias("FUN_00238f08"))); + +struct VendorItemPricing vendor_item_prices[43] = { + {0}, /* item 0 */ + {0}, /* item 1 */ + {1000, 1000, 0, 0, 0, 0, 0, 0, 0}, /* item 2 */ + {2000, 2000, 0, 0, 0, 0, 0, 0, 0}, /* item 3 */ + {2000, 2000, 0, 0, 0, 0, 0, 0, 0}, /* item 4 */ + {0}, /* item 5 */ + {0}, /* item 6 */ + {0}, /* item 7 */ + {0}, /* item 8 */ + {0, 0, 0, 0, 0, 0, 0, 0, 10000}, /* item 9 */ + {0, 0, 5, 25, 3, 40, 10, 10, 20000}, /* item 10 */ + {10000, 7500, 50, 100, 2, 20, 10, 10, 60000}, /* item 11 */ + {1000, 1000, 0, 0, 0, 0, 0, 0, 0}, /* item 12 */ + {15000, 10000, 100, 200, 1, 20, 10, 10, 0}, /* item 13 */ + {2500, 1250, 0, 0, 0, 0, 0, 0, 0}, /* item 14 */ + {2500, 1250, 1, 10, 25, 200, 100, 100, 20000}, /* item 15 */ + {2500, 1250, 1, 5, 20, 240, 120, 120, 30000}, /* item 16 */ + {7500, 5000, 5, 15, 5, 50, 25, 25, 10000}, /* item 17 */ + {7500, 5000, 0, 0, 0, 0, 0, 0, 0}, /* item 18 */ + {40000, 30000, 1, 10, 20, 240, 120, 120, 60000}, /* item 19 */ + {7500, 5000, 40, 100, 1, 10, 3, 3, 10000}, /* item 20 */ + {0, 0, 0, 0, 0, 0, 0, 0, 20000}, /* item 21 */ + {0}, /* item 22 */ + {150000, 150000, 20, 50, 1, 50, 25, 25, 0}, /* item 23 */ + {7500, 5000, 40, 100, 1, 10, 3, 3, 0}, /* item 24 */ + {7500, 5000, 10, 50, 2, 20, 10, 10, 10000}, /* item 25 */ + {0}, /* item 26 */ + {0}, /* item 27 */ + {0}, /* item 28 */ + {2000, 2000, 0, 0, 0, 0, 0, 0, 0}, /* item 29 */ + {0}, /* item 30 */ + {0}, /* item 31 */ + {1000, 1000, 0, 0, 0, 0, 0, 0, 0}, /* item 32 */ + {0}, /* item 33 */ + {0}, /* item 34 */ + {0}, /* item 35 */ + {0}, /* item 36 */ + {500, 500, 0, 0, 0, 0, 0, 0, 0}, /* item 37 */ + {4000, 4000, 0, 0, 0, 0, 0, 0, 0}, /* item 38 */ + {2000, 2000, 0, 0, 0, 0, 0, 0, 0}, /* item 39 */ + {4000, 4000, 0, 0, 0, 0, 0, 0, 0}, /* item 40 */ + {30000, 30000, 0, 0, 0, 0, 0, 0, 0}, /* item 41 */ + {2000, 2000, 0, 0, 0, 0, 0, 0, 0}, /* item 42 */ +}; diff --git a/src/ui/vendor/render_vendor_purchase_prompt_pass.c b/src/ui/vendor/render_vendor_purchase_prompt_pass.c index ba7eaf3913..cdc4e76fdd 100644 --- a/src/ui/vendor/render_vendor_purchase_prompt_pass.c +++ b/src/ui/vendor/render_vendor_purchase_prompt_pass.c @@ -1,15 +1,6 @@ #include "types.h" #include "rnc/globals.h" - -struct Goal { - s32 bolts; - s32 boltsHard; - u16 cost; - u16 costHard; - u16 pad0C; - u16 need; - u8 pad10[8]; -}; +#include "rnc/ui/vendor/vendor_capture.h" struct Slot { s32 id; @@ -28,7 +19,6 @@ struct Shop { }; extern struct Shop D_001E63C0; -extern struct Goal D_001DFFB0[]; #include "rnc/game/item_state.h" @@ -48,15 +38,16 @@ void render_vendor_purchase_prompt_pass(void) { if (vendor_shop->open != 0) { if (vendor_shop->slots[vendor_shop->cur].kind == 1) { if (weapon_ammo_counts[vendor_shop->slots[vendor_shop->cur].id] >= - D_001DFFB0[vendor_shop->slots[vendor_shop->cur].id].need) { + vendor_item_prices[vendor_shop->slots[vendor_shop->cur].id].ammo_capacity) { return; } } if (vendor_shop->slots[vendor_shop->cur].kind == 1) { if (vendor_shop->hard != 0) { - cost = D_001DFFB0[vendor_shop->slots[vendor_shop->cur].id].costHard; + cost = vendor_item_prices[vendor_shop->slots[vendor_shop->cur].id] + .discounted_ammo_price; } else { - cost = D_001DFFB0[vendor_shop->slots[vendor_shop->cur].id].cost; + cost = vendor_item_prices[vendor_shop->slots[vendor_shop->cur].id].ammo_price; } if (current_bolt_count < cost) { return; @@ -64,9 +55,10 @@ void render_vendor_purchase_prompt_pass(void) { id = 0x4EE0; } else { if (item_available[ITEM_VENDOR_DISCOUNT] != 0) { - cost = D_001DFFB0[vendor_shop->slots[vendor_shop->cur].id].boltsHard; + cost = vendor_item_prices[vendor_shop->slots[vendor_shop->cur].id] + .discounted_purchase_price; } else { - cost = D_001DFFB0[vendor_shop->slots[vendor_shop->cur].id].bolts; + cost = vendor_item_prices[vendor_shop->slots[vendor_shop->cur].id].purchase_price; } if (current_bolt_count < cost) { return; From 739bd5241c0ad80a6e7a5c4c91d87830680d46de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:35:58 +0000 Subject: [PATCH 134/213] decomp: define the map layer screen insets per level in C --- config/us/levels/exe_data.tsv | 19 +++++++++++++++++++ configure.py | 1 + src/ui/map/draw_map_screen_layers.c | 16 +++++++++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index e5324d2328..6b1ead2b1e 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -134,6 +134,7 @@ 00 001BDDE0 13504 00 001C12A0 1080 00 001C1E40 552 +00 001C2068 76 00 001C20B8 76 00 001C24C0 48 00 001C24F0 48 @@ -323,6 +324,7 @@ 01 001BE260 13504 01 001C1720 1080 01 001C22C0 552 +01 001C24E8 76 01 001C2538 76 01 001C2940 48 01 001C2970 48 @@ -512,6 +514,7 @@ 02 001BE3E0 13504 02 001C18A0 1080 02 001C2440 552 +02 001C2668 76 02 001C26B8 76 02 001C2AC0 48 02 001C2AF0 48 @@ -701,6 +704,7 @@ 03 001BDEE0 13504 03 001C13A0 1080 03 001C1F40 552 +03 001C2168 76 03 001C21B8 76 03 001C25C0 48 03 001C25F0 48 @@ -890,6 +894,7 @@ 04 001BDF60 13504 04 001C1420 1080 04 001C1FC0 552 +04 001C21E8 76 04 001C2238 76 04 001C2640 48 04 001C2670 48 @@ -1079,6 +1084,7 @@ 05 001BE260 13504 05 001C1720 1080 05 001C22C0 552 +05 001C24E8 76 05 001C2538 76 05 001C2940 48 05 001C2970 48 @@ -1268,6 +1274,7 @@ 06 001BE560 13504 06 001C1A20 1080 06 001C25C0 552 +06 001C27E8 76 06 001C2838 76 06 001C2C40 48 06 001C2C70 48 @@ -1457,6 +1464,7 @@ 07 001BDE60 13504 07 001C1320 1080 07 001C1EC0 552 +07 001C20E8 76 07 001C2138 76 07 001C2540 48 07 001C2570 48 @@ -1646,6 +1654,7 @@ 08 001BE5E0 13504 08 001C1AA0 1080 08 001C2640 552 +08 001C2868 76 08 001C28B8 76 08 001C2CC0 48 08 001C2CF0 48 @@ -1835,6 +1844,7 @@ 09 001BDF60 13504 09 001C1420 1080 09 001C1FC0 552 +09 001C21E8 76 09 001C2238 76 09 001C2640 48 09 001C2670 48 @@ -2024,6 +2034,7 @@ 10 001BE260 13504 10 001C1720 1080 10 001C22C0 552 +10 001C24E8 76 10 001C2538 76 10 001C2940 48 10 001C2970 48 @@ -2213,6 +2224,7 @@ 11 001BE7E0 13504 11 001C1CA0 1080 11 001C2840 552 +11 001C2A68 76 11 001C2AB8 76 11 001C2EC0 48 11 001C2EF0 48 @@ -2402,6 +2414,7 @@ 12 001BE260 13504 12 001C1720 1080 12 001C22C0 552 +12 001C24E8 76 12 001C2538 76 12 001C2940 48 12 001C2970 48 @@ -2591,6 +2604,7 @@ 13 001BE0E0 13504 13 001C15A0 1080 13 001C2140 552 +13 001C2368 76 13 001C23B8 76 13 001C27C0 48 13 001C27F0 48 @@ -2780,6 +2794,7 @@ 14 001BE4E0 13504 14 001C19A0 1080 14 001C2540 552 +14 001C2768 76 14 001C27B8 76 14 001C2BC0 48 14 001C2BF0 48 @@ -2969,6 +2984,7 @@ 15 001BE3E0 13504 15 001C18A0 1080 15 001C2440 552 +15 001C2668 76 15 001C26B8 76 15 001C2AC0 48 15 001C2AF0 48 @@ -3158,6 +3174,7 @@ 16 001BE260 13504 16 001C1720 1080 16 001C22C0 552 +16 001C24E8 76 16 001C2538 76 16 001C2940 48 16 001C2970 48 @@ -3347,6 +3364,7 @@ 17 001BE6E0 13504 17 001C1BA0 1080 17 001C2740 552 +17 001C2968 76 17 001C29B8 76 17 001C2DC0 48 17 001C2DF0 48 @@ -3536,6 +3554,7 @@ 18 001BE7E0 13504 18 001C1CA0 1080 18 001C2840 552 +18 001C2A68 76 18 001C2AB8 76 18 001C2EC0 48 18 001C2EF0 48 diff --git a/configure.py b/configure.py index 7600778b13..972cef8e1e 100755 --- a/configure.py +++ b/configure.py @@ -1257,6 +1257,7 @@ "ui/menus/system/emit_selected_graphics_dma_packets": (0x1D7D90, 0xD8D10, 192), "ui/text/font/font_print": (0x1DF050, 0xDFFD0, 2784), # glyph records of the three fonts "ui/vendor/render_vendor_buy_label_pass": (0x1DFFB0, 0xE0F30, 1032), # vendor prices by item + "ui/map/draw_map_screen_layers": (0x1DDF68, 0xDEEE8, 76), # map inset per level } # Uninitialised variables a unit defines. `.sbss` (small ones) sits in the diff --git a/src/ui/map/draw_map_screen_layers.c b/src/ui/map/draw_map_screen_layers.c index ff91a3fc40..f94707867e 100644 --- a/src/ui/map/draw_map_screen_layers.c +++ b/src/ui/map/draw_map_screen_layers.c @@ -4,8 +4,10 @@ #include "rnc/game/game_globals.h" #include "rnc/rendering/packets.h" +#include "rnc/world/level_id.h" + +extern s32 map_layer_screen_insets[LEVEL_COUNT] __asm__("D_001DDF68"); -extern s32 map_layer_screen_insets[] __asm__("D_001DDF68"); extern void vu1_add_g_sregister(s32, u64) __asm__("func_00233980"); s32 draw_map_screen_layers(void) __asm__("FUN_00220850"); @@ -105,3 +107,15 @@ s32 draw_map_screen_layers(void) { } extern __typeof__(draw_map_screen_layers) func_00220850 __attribute__((alias("FUN_00220850"))); + +/* How far (in 1/16 pixels) each level's map layers sit inside the screen edges; the three + levels without a map (space) have none. */ +s32 map_layer_screen_insets[LEVEL_COUNT] = { + [LEVEL_VELDIN1] = 1200, [LEVEL_NOVALIS] = 1000, [LEVEL_ARIDIA] = 1300, + [LEVEL_KERWAN] = 400, [LEVEL_EUDORA] = 1100, [LEVEL_RILGAR] = 900, + [LEVEL_NEBULA_G34] = 0, [LEVEL_UMBRIS] = 1200, [LEVEL_BATALIA] = 700, + [LEVEL_GASPAR] = 190, [LEVEL_ORXON] = 800, [LEVEL_POKITARU] = 1550, + [LEVEL_HOVEN] = 300, [LEVEL_OLTANIS_ORBIT] = 0, [LEVEL_OLTANIS] = 600, + [LEVEL_QUARTU] = 900, [LEVEL_KALEBO3] = 500, [LEVEL_VELDIN_ORBIT] = 0, + [LEVEL_VELDIN2] = 1200, +}; From d6b02ea6012bd7c3c89ca9768734382cef4a8498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:41:22 +0000 Subject: [PATCH 135/213] decomp: define the level 6 backdrop mesh tables of the second draw copies in C --- config/us/levels/data.tsv | 8 + src/overlays/l06/mobys/breakable_window.c | 1555 +++++++++++++++++++++ 2 files changed, 1563 insertions(+) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 8df0386782..ab7f045cb4 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -10889,11 +10889,19 @@ D_L06_001F2E90 32 D_L06_001F2EB0 1536 D_L06_001F34B0 1024 D_L06_001F38B0 3200 +D_L06_001F5330 1536 +D_L06_001F5930 1024 +D_L06_001F5D30 3200 D_L06_001F77B0 1792 D_L06_001F7EB0 1536 D_L06_001F84B0 7744 D_L06_001FA2F0 1536 D_L06_001FAFF0 1536 +D_L06_001FB5F0 1792 +D_L06_001FBCF0 1536 +D_L06_001FC2F0 4608 +D_L06_001FD4F0 1536 +D_L06_001FE1F0 1536 D_L06_001FE9D0 4 D_L06_001FEA10 4 D_L06_001FED70 24 diff --git a/src/overlays/l06/mobys/breakable_window.c b/src/overlays/l06/mobys/breakable_window.c index 517c4ebc2f..1840aab6d4 100644 --- a/src/overlays/l06/mobys/breakable_window.c +++ b/src/overlays/l06/mobys/breakable_window.c @@ -2036,6 +2036,1561 @@ short l06_second_backdrop_mesh_quad_corner_indices[96][4][2] __asm__("D_L06_001F {{61, 758}, {63, 759}, {92, 756}, {94, 757}}, }; +/* The tables of the second copy of draw_backdrop_mesh (at 0x300588), which + draws the same mesh shape at another place. */ +V3003f0 l06_backdrop_mesh_copy_vertex_positions[96] __asm__("D_L06_001F5330") = { + {{37040.22f, 32510.229f, 1.39e+04f, 1.0f}}, {{36972.09f, 32555.752f, 1.39e+04f, 1.0f}}, + {{36972.09f, 32555.752f, 13983.305f, 1.0f}}, {{37040.22f, 32510.229f, 13983.305f, 1.0f}}, + {{36891.727f, 32571.736f, 1.39e+04f, 1.0f}}, {{36891.727f, 32571.736f, 13934.511f, 1.0f}}, + {{36811.363f, 32555.752f, 1.39e+04f, 1.0f}}, {{36811.363f, 32555.752f, 13983.305f, 1.0f}}, + {{36743.234f, 32510.229f, 1.39e+04f, 1.0f}}, {{36743.234f, 32510.229f, 13919.205f, 1.0f}}, + {{36697.71f, 32442.1f, 1.39e+04f, 1.0f}}, {{36697.71f, 32442.1f, 13924.697f, 1.0f}}, + {{36681.727f, 32361.736f, 1.39e+04f, 1.0f}}, {{36681.727f, 32361.736f, 13943.56f, 1.0f}}, + {{36697.71f, 32281.373f, 1.39e+04f, 1.0f}}, {{36697.71f, 32281.373f, 13983.305f, 1.0f}}, + {{36743.234f, 32213.244f, 1.39e+04f, 1.0f}}, {{36743.234f, 32213.244f, 13918.155f, 1.0f}}, + {{36811.363f, 32167.72f, 1.39e+04f, 1.0f}}, {{36811.363f, 32167.72f, 13983.305f, 1.0f}}, + {{36891.727f, 32151.736f, 1.39e+04f, 1.0f}}, {{36891.727f, 32151.736f, 13926.972f, 1.0f}}, + {{36972.09f, 32167.72f, 1.39e+04f, 1.0f}}, {{36972.09f, 32167.72f, 13935.359f, 1.0f}}, + {{37040.22f, 32213.244f, 1.39e+04f, 1.0f}}, {{37040.22f, 32213.244f, 13983.305f, 1.0f}}, + {{37085.742f, 32281.373f, 1.39e+04f, 1.0f}}, {{37085.742f, 32281.373f, 13966.268f, 1.0f}}, + {{37101.727f, 32361.736f, 1.39e+04f, 1.0f}}, {{37101.727f, 32361.736f, 13983.305f, 1.0f}}, + {{37085.742f, 32442.1f, 1.39e+04f, 1.0f}}, {{37085.742f, 32442.1f, 13983.305f, 1.0f}}, + {{37040.22f, 32510.229f, 14278.347f, 1.0f}}, {{36972.09f, 32555.752f, 14333.163f, 1.0f}}, + {{36972.09f, 32555.752f, 14402.978f, 1.0f}}, {{37040.22f, 32510.229f, 14376.695f, 1.0f}}, + {{36891.727f, 32571.736f, 14278.347f, 1.0f}}, {{36891.727f, 32571.736f, 14376.695f, 1.0f}}, + {{36811.363f, 32555.752f, 14343.895f, 1.0f}}, {{36811.363f, 32555.752f, 14376.695f, 1.0f}}, + {{36743.234f, 32510.229f, 14356.365f, 1.0f}}, {{36743.234f, 32510.229f, 14376.695f, 1.0f}}, + {{36697.71f, 32442.1f, 14278.347f, 1.0f}}, {{36697.71f, 32442.1f, 14376.695f, 1.0f}}, + {{36681.3f, 32360.635f, 14349.788f, 1.0f}}, {{36681.727f, 32361.736f, 14376.695f, 1.0f}}, + {{36697.71f, 32281.373f, 14278.347f, 1.0f}}, {{36697.71f, 32281.373f, 14376.695f, 1.0f}}, + {{36743.234f, 32213.244f, 14406.318f, 1.0f}}, {{36743.234f, 32213.244f, 14435.389f, 1.0f}}, + {{36811.363f, 32167.72f, 14346.871f, 1.0f}}, {{36811.363f, 32167.72f, 14376.695f, 1.0f}}, + {{36891.727f, 32151.736f, 14278.347f, 1.0f}}, {{36891.727f, 32151.736f, 14376.695f, 1.0f}}, + {{36972.09f, 32167.72f, 14390.541f, 1.0f}}, {{36972.09f, 32167.72f, 14419.676f, 1.0f}}, + {{37040.22f, 32213.244f, 14278.347f, 1.0f}}, {{37040.22f, 32213.244f, 14376.695f, 1.0f}}, + {{37085.742f, 32281.373f, 14269.135f, 1.0f}}, {{37085.742f, 32281.373f, 14370.939f, 1.0f}}, + {{37101.727f, 32361.736f, 14278.347f, 1.0f}}, {{37101.727f, 32361.736f, 14376.695f, 1.0f}}, + {{37085.742f, 32442.1f, 14331.171f, 1.0f}}, {{37085.742f, 32442.1f, 14407.026f, 1.0f}}, + {{36972.09f, 32555.752f, 1.446e+04f, 1.0f}}, {{37040.22f, 32510.229f, 1.446e+04f, 1.0f}}, + {{36891.727f, 32571.736f, 1.446e+04f, 1.0f}}, {{36811.363f, 32555.752f, 1.446e+04f, 1.0f}}, + {{36743.234f, 32510.229f, 1.446e+04f, 1.0f}}, {{36697.71f, 32442.1f, 1.446e+04f, 1.0f}}, + {{36681.727f, 32361.736f, 1.446e+04f, 1.0f}}, {{36697.71f, 32281.373f, 1.446e+04f, 1.0f}}, + {{36743.234f, 32213.244f, 1.446e+04f, 1.0f}}, {{36811.363f, 32167.72f, 1.446e+04f, 1.0f}}, + {{36891.727f, 32151.736f, 1.446e+04f, 1.0f}}, {{36972.09f, 32167.72f, 1.446e+04f, 1.0f}}, + {{37040.22f, 32213.244f, 1.446e+04f, 1.0f}}, {{37085.742f, 32281.373f, 1.446e+04f, 1.0f}}, + {{37101.727f, 32361.736f, 1.446e+04f, 1.0f}}, {{37085.742f, 32442.1f, 1.446e+04f, 1.0f}}, + {{37040.22f, 32510.229f, 14014.767f, 1.0f}}, {{37085.742f, 32442.1f, 14081.653f, 1.0f}}, + {{36972.09f, 32555.752f, 13998.416f, 1.0f}}, {{36891.727f, 32571.736f, 13970.915f, 1.0f}}, + {{36811.363f, 32555.752f, 14081.653f, 1.0f}}, {{36743.234f, 32510.229f, 13985.018f, 1.0f}}, + {{36697.71f, 32442.1f, 13966.334f, 1.0f}}, {{36681.727f, 32361.736f, 13972.607f, 1.0f}}, + {{36697.71f, 32281.373f, 14081.653f, 1.0f}}, {{36743.234f, 32213.244f, 13961.376f, 1.0f}}, + {{36811.363f, 32167.72f, 14081.653f, 1.0f}}, {{36891.727f, 32151.736f, 14062.227f, 1.0f}}, + {{36972.09f, 32167.72f, 13960.649f, 1.0f}}, {{37040.22f, 32213.244f, 14081.653f, 1.0f}}, + {{37085.742f, 32281.373f, 13982.1f, 1.0f}}, {{37101.727f, 32361.736f, 14009.818f, 1.0f}}, +}; + +I3003f0 l06_backdrop_mesh_copy_quad_corner_index_pairs[256] __asm__("D_L06_001F5930") = { + { 0, 0x152}, + { 1, 0x153}, + { 3, 0x150}, + { 2, 0x151}, + { 1, 0x156}, + { 4, 0x157}, + { 2, 0x154}, + { 5, 0x155}, + { 4, 0x15a}, + { 6, 0x15b}, + { 5, 0x158}, + { 7, 0x159}, + { 6, 0x15e}, + { 8, 0x15f}, + { 7, 0x15c}, + { 9, 0x15d}, + { 8, 0x162}, + { 0xa, 0x163}, + { 9, 0x160}, + { 0xb, 0x161}, + { 0xa, 0x166}, + { 0xc, 0x167}, + { 0xb, 0x164}, + { 0xd, 0x165}, + { 0xc, 0x16a}, + { 0xe, 0x16b}, + { 0xd, 0x168}, + { 0xf, 0x169}, + { 0xe, 0x16e}, + {0x10, 0x16f}, + { 0xf, 0x16c}, + {0x11, 0x16d}, + {0x10, 0x172}, + {0x12, 0x173}, + {0x11, 0x170}, + {0x13, 0x171}, + {0x12, 0x176}, + {0x14, 0x177}, + {0x13, 0x174}, + {0x15, 0x175}, + {0x14, 0x17a}, + {0x16, 0x17b}, + {0x15, 0x178}, + {0x17, 0x179}, + {0x16, 0x17e}, + {0x18, 0x17f}, + {0x17, 0x17c}, + {0x19, 0x17d}, + {0x18, 0x182}, + {0x1a, 0x183}, + {0x19, 0x180}, + {0x1b, 0x181}, + {0x1a, 0x186}, + {0x1c, 0x187}, + {0x1b, 0x184}, + {0x1d, 0x185}, + {0x1c, 0x18a}, + {0x1e, 0x18b}, + {0x1d, 0x188}, + {0x1f, 0x189}, + {0x1e, 0x18e}, + { 0, 0x18f}, + {0x1f, 0x18c}, + { 3, 0x18d}, + {0x20, 0xd2}, + {0x21, 0xd3}, + {0x23, 0xd0}, + {0x22, 0xd1}, + {0x21, 0x10e}, + {0x24, 0x10f}, + {0x22, 0x10c}, + {0x25, 0x10d}, + {0x24, 0x10a}, + {0x26, 0x10b}, + {0x25, 0x108}, + {0x27, 0x109}, + {0x26, 0x106}, + {0x28, 0x107}, + {0x27, 0x104}, + {0x29, 0x105}, + {0x28, 0x102}, + {0x2a, 0x103}, + {0x29, 0x100}, + {0x2b, 0x101}, + {0x2a, 0xfe}, + {0x2c, 0xff}, + {0x2b, 0xfc}, + {0x2d, 0xfd}, + {0x2c, 0xfa}, + {0x2e, 0xfb}, + {0x2d, 0xf8}, + {0x2f, 0xf9}, + {0x2e, 0xf6}, + {0x30, 0xf7}, + {0x2f, 0xf4}, + {0x31, 0xf5}, + {0x30, 0xf2}, + {0x32, 0xf3}, + {0x31, 0xf0}, + {0x33, 0xf1}, + {0x32, 0xee}, + {0x34, 0xef}, + {0x33, 0xec}, + {0x35, 0xed}, + {0x34, 0xea}, + {0x36, 0xeb}, + {0x35, 0xe8}, + {0x37, 0xe9}, + {0x36, 0xe6}, + {0x38, 0xe7}, + {0x37, 0xe4}, + {0x39, 0xe5}, + {0x38, 0xe2}, + {0x3a, 0xe3}, + {0x39, 0xe0}, + {0x3b, 0xe1}, + {0x3a, 0xde}, + {0x3c, 0xdf}, + {0x3b, 0xdc}, + {0x3d, 0xdd}, + {0x3c, 0xda}, + {0x3e, 0xdb}, + {0x3d, 0xd8}, + {0x3f, 0xd9}, + {0x3e, 0xd6}, + {0x20, 0xd7}, + {0x3f, 0xd4}, + {0x23, 0xd5}, + {0x23, 0xce}, + {0x22, 0xcf}, + {0x41, 0xcc}, + {0x40, 0xcd}, + {0x22, 0xca}, + {0x25, 0xcb}, + {0x40, 0xc8}, + {0x42, 0xc9}, + {0x25, 0xc6}, + {0x27, 0xc7}, + {0x42, 0xc4}, + {0x43, 0xc5}, + {0x27, 0xc2}, + {0x29, 0xc3}, + {0x43, 0xc0}, + {0x44, 0xc1}, + {0x29, 0xbe}, + {0x2b, 0xbf}, + {0x44, 0xbc}, + {0x45, 0xbd}, + {0x2b, 0xba}, + {0x2d, 0xbb}, + {0x45, 0xb8}, + {0x46, 0xb9}, + {0x2d, 0xb6}, + {0x2f, 0xb7}, + {0x46, 0xb4}, + {0x47, 0xb5}, + {0x2f, 0xb2}, + {0x31, 0xb3}, + {0x47, 0xb0}, + {0x48, 0xb1}, + {0x31, 0xae}, + {0x33, 0xaf}, + {0x48, 0xac}, + {0x49, 0xad}, + {0x33, 0xaa}, + {0x35, 0xab}, + {0x49, 0xa8}, + {0x4a, 0xa9}, + {0x35, 0xa6}, + {0x37, 0xa7}, + {0x4a, 0xa4}, + {0x4b, 0xa5}, + {0x37, 0xa2}, + {0x39, 0xa3}, + {0x4b, 0xa0}, + {0x4c, 0xa1}, + {0x39, 0x9e}, + {0x3b, 0x9f}, + {0x4c, 0x9c}, + {0x4d, 0x9d}, + {0x3b, 0x9a}, + {0x3d, 0x9b}, + {0x4d, 0x98}, + {0x4e, 0x99}, + {0x3d, 0x96}, + {0x3f, 0x97}, + {0x4e, 0x94}, + {0x4f, 0x95}, + {0x3f, 0x92}, + {0x23, 0x93}, + {0x4f, 0x90}, + {0x41, 0x91}, + {0x1f, 0x112}, + { 3, 0x113}, + {0x51, 0x110}, + {0x50, 0x111}, + { 3, 0x14e}, + { 2, 0x14f}, + {0x50, 0x14c}, + {0x52, 0x14d}, + { 2, 0x14a}, + { 5, 0x14b}, + {0x52, 0x148}, + {0x53, 0x149}, + { 5, 0x146}, + { 7, 0x147}, + {0x53, 0x144}, + {0x54, 0x145}, + { 7, 0x142}, + { 9, 0x143}, + {0x54, 0x140}, + {0x55, 0x141}, + { 9, 0x13e}, + { 0xb, 0x13f}, + {0x55, 0x13c}, + {0x56, 0x13d}, + { 0xb, 0x13a}, + { 0xd, 0x13b}, + {0x56, 0x138}, + {0x57, 0x139}, + { 0xd, 0x136}, + { 0xf, 0x137}, + {0x57, 0x134}, + {0x58, 0x135}, + { 0xf, 0x132}, + {0x11, 0x133}, + {0x58, 0x130}, + {0x59, 0x131}, + {0x11, 0x12e}, + {0x13, 0x12f}, + {0x59, 0x12c}, + {0x5a, 0x12d}, + {0x13, 0x12a}, + {0x15, 0x12b}, + {0x5a, 0x128}, + {0x5b, 0x129}, + {0x15, 0x126}, + {0x17, 0x127}, + {0x5b, 0x124}, + {0x5c, 0x125}, + {0x17, 0x122}, + {0x19, 0x123}, + {0x5c, 0x120}, + {0x5d, 0x121}, + {0x19, 0x11e}, + {0x1b, 0x11f}, + {0x5d, 0x11c}, + {0x5e, 0x11d}, + {0x1b, 0x11a}, + {0x1d, 0x11b}, + {0x5e, 0x118}, + {0x5f, 0x119}, + {0x1d, 0x116}, + {0x1f, 0x117}, + {0x5f, 0x114}, + {0x51, 0x115}, +}; + +UV3003f0 l06_backdrop_mesh_copy_texture_coordinates[400] __asm__("D_L06_001F5D30") = { + {0.163243f, 1.0f}, + {0.280669f, 1.0f}, + {0.280669f, 0.851241f}, + {0.163243f, 0.851241f}, + {0.375525f, 1.0f}, + {0.375525f, 0.851241f}, + {0.375525f, 1.0f}, + {0.459585f, 1.0f}, + {0.459585f, 0.851241f}, + {0.375525f, 0.851241f}, + {0.540415f, 1.0f}, + {0.540415f, 0.851241f}, + {0.540415f, 1.0f}, + {0.624475f, 1.0f}, + {0.624475f, 0.851241f}, + {0.540415f, 0.851241f}, + {0.719331f, 1.0f}, + {0.719331f, 0.851241f}, + {0.719331f, 1.0f}, + {0.836757f, 1.0f}, + {0.836757f, 0.851241f}, + {0.719331f, 0.851241f}, + {1.0f, 1.0f}, + {1.0f, 0.851241f}, + {0.0f, 1.0f}, + {0.174348f, 1.0f}, + {0.174348f, 0.851241f}, + {0.0f, 0.851241f}, + {0.315185f, 1.0f}, + {0.315185f, 0.851241f}, + {0.315185f, 1.0f}, + {0.439994f, 1.0f}, + {0.439994f, 0.851241f}, + {0.315185f, 0.851241f}, + {0.560006f, 1.0f}, + {0.560006f, 0.851241f}, + {0.560006f, 1.0f}, + {0.684815f, 1.0f}, + {0.684815f, 0.851241f}, + {0.560006f, 0.851241f}, + {0.825652f, 1.0f}, + {0.825652f, 0.851241f}, + {0.825652f, 1.0f}, + {1.0f, 1.0f}, + {1.0f, 0.851241f}, + {0.825652f, 0.851241f}, + {0.163243f, 1.0f}, + {0.163243f, 0.851241f}, + {0.163243f, 0.324379f}, + {0.280669f, 0.324379f}, + {0.280669f, 0.148759f}, + {0.163243f, 0.148759f}, + {0.375525f, 0.324379f}, + {0.375525f, 0.148759f}, + {0.375525f, 0.324379f}, + {0.459585f, 0.324379f}, + {0.459585f, 0.148759f}, + {0.375525f, 0.148759f}, + {0.540415f, 0.324379f}, + {0.540415f, 0.148759f}, + {0.540415f, 0.324379f}, + {0.624475f, 0.324379f}, + {0.624475f, 0.148759f}, + {0.540415f, 0.148759f}, + {0.719331f, 0.324379f}, + {0.719331f, 0.148759f}, + {0.719331f, 0.324379f}, + {0.836757f, 0.324379f}, + {0.836757f, 0.148759f}, + {0.719331f, 0.148759f}, + {1.0f, 0.324379f}, + {1.0f, 0.148759f}, + {0.0f, 0.324379f}, + {0.174348f, 0.324379f}, + {0.174348f, 0.148759f}, + {0.0f, 0.148759f}, + {0.315185f, 0.324379f}, + {0.315185f, 0.148759f}, + {0.315185f, 0.324379f}, + {0.439994f, 0.324379f}, + {0.439994f, 0.148759f}, + {0.315185f, 0.148759f}, + {0.560006f, 0.324379f}, + {0.560006f, 0.148759f}, + {0.560006f, 0.324379f}, + {0.684815f, 0.324379f}, + {0.684815f, 0.148759f}, + {0.560006f, 0.148759f}, + {0.825652f, 0.324379f}, + {0.825652f, 0.148759f}, + {0.825652f, 0.324379f}, + {1.0f, 0.324379f}, + {1.0f, 0.148759f}, + {0.825652f, 0.148759f}, + {0.163243f, 0.324379f}, + {0.163243f, 0.148759f}, + {0.280669f, 0.0f}, + {0.163243f, 0.0f}, + {0.375525f, 0.0f}, + {0.459585f, 0.0f}, + {0.375525f, 0.0f}, + {0.540415f, 0.0f}, + {0.624475f, 0.0f}, + {0.540415f, 0.0f}, + {0.719331f, 0.0f}, + {0.836757f, 0.0f}, + {0.719331f, 0.0f}, + {1.0f, 0.0f}, + {0.174348f, 0.0f}, + {0}, + {0.315185f, 0.0f}, + {0.439994f, 0.0f}, + {0.315185f, 0.0f}, + {0.560006f, 0.0f}, + {0.684815f, 0.0f}, + {0.560006f, 0.0f}, + {0.825652f, 0.0f}, + {1.0f, 0.0f}, + {0.825652f, 0.0f}, + {0.163243f, 0.0f}, + {0.163243f, 0.675621f}, + {1.0f, 0.675621f}, + {0.280669f, 0.675621f}, + {0.163243f, 0.675621f}, + {0.375525f, 0.675621f}, + {0.459585f, 0.675621f}, + {0.375525f, 0.675621f}, + {0.540415f, 0.675621f}, + {0.624475f, 0.675621f}, + {0.540415f, 0.675621f}, + {0.719331f, 0.675621f}, + {0.836757f, 0.675621f}, + {0.719331f, 0.675621f}, + {1.0f, 0.675621f}, + {0.174348f, 0.675621f}, + {0.0f, 0.675621f}, + {0.315185f, 0.675621f}, + {0.439994f, 0.675621f}, + {0.315185f, 0.675621f}, + {0.560006f, 0.675621f}, + {0.684815f, 0.675621f}, + {0.560006f, 0.675621f}, + {0.825652f, 0.675621f}, + {0.825652f, 0.675621f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, + {0}, + {1.0f, 0.0f}, + {0.0f, -1.0f}, + {1.0f, -1.0f}, +}; + +/* The tables of the second copy of effect_quad_draw_single (at 0x300958). */ +FRow_l06 l06_second_backdrop_mesh_copy_vertex_positions[112] __asm__("D_L06_001FB5F0") = { + {{37040.22f, 32510.229f, 1.39e+04f, 1.0f}}, {{36972.09f, 32555.752f, 1.39e+04f, 1.0f}}, + {{36972.09f, 32555.752f, 13983.305f, 1.0f}}, {{37040.22f, 32510.229f, 13983.305f, 1.0f}}, + {{36891.727f, 32571.736f, 1.39e+04f, 1.0f}}, {{36891.727f, 32571.736f, 13983.305f, 1.0f}}, + {{36811.363f, 32555.752f, 1.39e+04f, 1.0f}}, {{36811.363f, 32555.752f, 13983.305f, 1.0f}}, + {{36743.234f, 32510.229f, 1.39e+04f, 1.0f}}, {{36743.234f, 32510.229f, 13983.305f, 1.0f}}, + {{36697.71f, 32442.1f, 1.39e+04f, 1.0f}}, {{36697.71f, 32442.1f, 13983.305f, 1.0f}}, + {{36681.727f, 32361.736f, 1.39e+04f, 1.0f}}, {{36681.727f, 32361.736f, 13983.305f, 1.0f}}, + {{36697.71f, 32281.373f, 1.39e+04f, 1.0f}}, {{36697.71f, 32281.373f, 13983.305f, 1.0f}}, + {{36743.234f, 32213.244f, 1.39e+04f, 1.0f}}, {{36743.234f, 32213.244f, 13983.305f, 1.0f}}, + {{36811.363f, 32167.72f, 1.39e+04f, 1.0f}}, {{36811.363f, 32167.72f, 13983.305f, 1.0f}}, + {{36891.727f, 32151.736f, 1.39e+04f, 1.0f}}, {{36891.727f, 32151.736f, 13983.305f, 1.0f}}, + {{36972.09f, 32167.72f, 1.39e+04f, 1.0f}}, {{36972.09f, 32167.72f, 13983.305f, 1.0f}}, + {{37040.22f, 32213.244f, 1.39e+04f, 1.0f}}, {{37040.22f, 32213.244f, 13983.305f, 1.0f}}, + {{37085.742f, 32281.373f, 1.39e+04f, 1.0f}}, {{37085.742f, 32281.373f, 13983.305f, 1.0f}}, + {{37101.727f, 32361.736f, 1.39e+04f, 1.0f}}, {{37101.727f, 32361.736f, 13983.305f, 1.0f}}, + {{37085.742f, 32442.1f, 1.39e+04f, 1.0f}}, {{37085.742f, 32442.1f, 13983.305f, 1.0f}}, + {{37040.22f, 32510.229f, 14081.653f, 1.0f}}, {{36972.09f, 32555.752f, 14081.653f, 1.0f}}, + {{36972.09f, 32555.752f, 1.418e+04f, 1.0f}}, {{37040.22f, 32510.229f, 1.418e+04f, 1.0f}}, + {{36891.727f, 32571.736f, 14081.653f, 1.0f}}, {{36891.727f, 32571.736f, 1.418e+04f, 1.0f}}, + {{36811.363f, 32555.752f, 14081.653f, 1.0f}}, {{36811.363f, 32555.752f, 1.418e+04f, 1.0f}}, + {{36743.234f, 32510.229f, 14081.653f, 1.0f}}, {{36743.234f, 32510.229f, 1.418e+04f, 1.0f}}, + {{36697.71f, 32442.1f, 14081.653f, 1.0f}}, {{36697.71f, 32442.1f, 1.418e+04f, 1.0f}}, + {{36681.727f, 32361.736f, 14081.653f, 1.0f}}, {{36681.727f, 32361.736f, 1.418e+04f, 1.0f}}, + {{36697.71f, 32281.373f, 14081.653f, 1.0f}}, {{36697.71f, 32281.373f, 1.418e+04f, 1.0f}}, + {{36743.234f, 32213.244f, 14081.653f, 1.0f}}, {{36743.234f, 32213.244f, 1.418e+04f, 1.0f}}, + {{36811.363f, 32167.72f, 14081.653f, 1.0f}}, {{36811.363f, 32167.72f, 1.418e+04f, 1.0f}}, + {{36891.727f, 32151.736f, 14081.653f, 1.0f}}, {{36891.727f, 32151.736f, 1.418e+04f, 1.0f}}, + {{36972.09f, 32167.72f, 14081.653f, 1.0f}}, {{36972.09f, 32167.72f, 1.418e+04f, 1.0f}}, + {{37040.22f, 32213.244f, 14081.653f, 1.0f}}, {{37040.22f, 32213.244f, 1.418e+04f, 1.0f}}, + {{37085.742f, 32281.373f, 14081.653f, 1.0f}}, {{37085.742f, 32281.373f, 1.418e+04f, 1.0f}}, + {{37101.727f, 32361.736f, 14081.653f, 1.0f}}, {{37101.727f, 32361.736f, 1.418e+04f, 1.0f}}, + {{37085.742f, 32442.1f, 14081.653f, 1.0f}}, {{37085.742f, 32442.1f, 1.418e+04f, 1.0f}}, + {{37040.22f, 32510.229f, 14278.347f, 1.0f}}, {{36972.09f, 32555.752f, 14278.347f, 1.0f}}, + {{36972.09f, 32555.752f, 14376.695f, 1.0f}}, {{37040.22f, 32510.229f, 14376.695f, 1.0f}}, + {{36891.727f, 32571.736f, 14278.347f, 1.0f}}, {{36891.727f, 32571.736f, 14376.695f, 1.0f}}, + {{36811.363f, 32555.752f, 14278.347f, 1.0f}}, {{36811.363f, 32555.752f, 14376.695f, 1.0f}}, + {{36743.234f, 32510.229f, 14278.347f, 1.0f}}, {{36743.234f, 32510.229f, 14376.695f, 1.0f}}, + {{36697.71f, 32442.1f, 14278.347f, 1.0f}}, {{36697.71f, 32442.1f, 14376.695f, 1.0f}}, + {{36681.727f, 32361.736f, 14278.347f, 1.0f}}, {{36681.727f, 32361.736f, 14376.695f, 1.0f}}, + {{36697.71f, 32281.373f, 14278.347f, 1.0f}}, {{36697.71f, 32281.373f, 14376.695f, 1.0f}}, + {{36743.234f, 32213.244f, 14278.347f, 1.0f}}, {{36743.234f, 32213.244f, 14376.695f, 1.0f}}, + {{36811.363f, 32167.72f, 14278.347f, 1.0f}}, {{36811.363f, 32167.72f, 14376.695f, 1.0f}}, + {{36891.727f, 32151.736f, 14278.347f, 1.0f}}, {{36891.727f, 32151.736f, 14376.695f, 1.0f}}, + {{36972.09f, 32167.72f, 14278.347f, 1.0f}}, {{36972.09f, 32167.72f, 14376.695f, 1.0f}}, + {{37040.22f, 32213.244f, 14278.347f, 1.0f}}, {{37040.22f, 32213.244f, 14376.695f, 1.0f}}, + {{37085.742f, 32281.373f, 14278.347f, 1.0f}}, {{37085.742f, 32281.373f, 14376.695f, 1.0f}}, + {{37101.727f, 32361.736f, 14278.347f, 1.0f}}, {{37101.727f, 32361.736f, 14376.695f, 1.0f}}, + {{37085.742f, 32442.1f, 14278.347f, 1.0f}}, {{37085.742f, 32442.1f, 14376.695f, 1.0f}}, + {{36972.09f, 32555.752f, 1.446e+04f, 1.0f}}, {{37040.22f, 32510.229f, 1.446e+04f, 1.0f}}, + {{36891.727f, 32571.736f, 1.446e+04f, 1.0f}}, {{36811.363f, 32555.752f, 1.446e+04f, 1.0f}}, + {{36743.234f, 32510.229f, 1.446e+04f, 1.0f}}, {{36697.71f, 32442.1f, 1.446e+04f, 1.0f}}, + {{36681.727f, 32361.736f, 1.446e+04f, 1.0f}}, {{36697.71f, 32281.373f, 1.446e+04f, 1.0f}}, + {{36743.234f, 32213.244f, 1.446e+04f, 1.0f}}, {{36811.363f, 32167.72f, 1.446e+04f, 1.0f}}, + {{36891.727f, 32151.736f, 1.446e+04f, 1.0f}}, {{36972.09f, 32167.72f, 1.446e+04f, 1.0f}}, + {{37040.22f, 32213.244f, 1.446e+04f, 1.0f}}, {{37085.742f, 32281.373f, 1.446e+04f, 1.0f}}, + {{37101.727f, 32361.736f, 1.446e+04f, 1.0f}}, {{37085.742f, 32442.1f, 1.446e+04f, 1.0f}}, +}; + +short l06_second_backdrop_mesh_copy_quad_corner_indices[96][4][2] __asm__("D_L06_001FBCF0") = { + { {0, 0x20a}, {1, 0x20b}, {3, 0x208}, {2, 0x209}}, + { {1, 0x206}, {4, 0x207}, {2, 0x204}, {5, 0x205}}, + { {4, 0x202}, {6, 0x203}, {5, 0x200}, {7, 0x201}}, + { {6, 0x20e}, {8, 0x20f}, {7, 0x20c}, {9, 0x20d}}, + { {8, 0x212}, {0xa, 0x213}, {9, 0x210}, {0xb, 0x211}}, + { {0xa, 0x216}, {0xc, 0x217}, {0xb, 0x214}, {0xd, 0x215}}, + { {0xc, 0x21a}, {0xe, 0x21b}, {0xd, 0x218}, {0xf, 0x219}}, + { {0xe, 0x21e}, {0x10, 0x21f}, {0xf, 0x21c}, {0x11, 0x21d}}, + {{0x10, 0x222}, {0x12, 0x223}, {0x11, 0x220}, {0x13, 0x221}}, + {{0x12, 0x226}, {0x14, 0x227}, {0x13, 0x224}, {0x15, 0x225}}, + {{0x14, 0x22a}, {0x16, 0x22b}, {0x15, 0x228}, {0x17, 0x229}}, + {{0x16, 0x22e}, {0x18, 0x22f}, {0x17, 0x22c}, {0x19, 0x22d}}, + {{0x18, 0x232}, {0x1a, 0x233}, {0x19, 0x230}, {0x1b, 0x231}}, + {{0x1a, 0x236}, {0x1c, 0x237}, {0x1b, 0x234}, {0x1d, 0x235}}, + {{0x1c, 0x23a}, {0x1e, 0x23b}, {0x1d, 0x238}, {0x1f, 0x239}}, + {{0x1e, 0x23e}, {0, 0x23f}, {0x1f, 0x23c}, {3, 0x23d}}, + {{0x20, 0x182}, {0x21, 0x183}, {0x23, 0x180}, {0x22, 0x181}}, + {{0x21, 0x1be}, {0x24, 0x1bf}, {0x22, 0x1bc}, {0x25, 0x1bd}}, + {{0x24, 0x1ba}, {0x26, 0x1bb}, {0x25, 0x1b8}, {0x27, 0x1b9}}, + {{0x26, 0x1b6}, {0x28, 0x1b7}, {0x27, 0x1b4}, {0x29, 0x1b5}}, + {{0x28, 0x1b2}, {0x2a, 0x1b3}, {0x29, 0x1b0}, {0x2b, 0x1b1}}, + {{0x2a, 0x1ae}, {0x2c, 0x1af}, {0x2b, 0x1ac}, {0x2d, 0x1ad}}, + {{0x2c, 0x1aa}, {0x2e, 0x1ab}, {0x2d, 0x1a8}, {0x2f, 0x1a9}}, + {{0x2e, 0x1a6}, {0x30, 0x1a7}, {0x2f, 0x1a4}, {0x31, 0x1a5}}, + {{0x30, 0x1a2}, {0x32, 0x1a3}, {0x31, 0x1a0}, {0x33, 0x1a1}}, + {{0x32, 0x19e}, {0x34, 0x19f}, {0x33, 0x19c}, {0x35, 0x19d}}, + {{0x34, 0x19a}, {0x36, 0x19b}, {0x35, 0x198}, {0x37, 0x199}}, + {{0x36, 0x196}, {0x38, 0x197}, {0x37, 0x194}, {0x39, 0x195}}, + {{0x38, 0x192}, {0x3a, 0x193}, {0x39, 0x190}, {0x3b, 0x191}}, + {{0x3a, 0x18e}, {0x3c, 0x18f}, {0x3b, 0x18c}, {0x3d, 0x18d}}, + {{0x3c, 0x18a}, {0x3e, 0x18b}, {0x3d, 0x188}, {0x3f, 0x189}}, + {{0x3e, 0x186}, {0x20, 0x187}, {0x3f, 0x184}, {0x23, 0x185}}, + {{0x40, 0x13a}, {0x41, 0x13b}, {0x43, 0x138}, {0x42, 0x139}}, + {{0x41, 0x136}, {0x44, 0x137}, {0x42, 0x134}, {0x45, 0x135}}, + {{0x44, 0x132}, {0x46, 0x133}, {0x45, 0x130}, {0x47, 0x131}}, + {{0x46, 0x12e}, {0x48, 0x12f}, {0x47, 0x12c}, {0x49, 0x12d}}, + {{0x48, 0x12a}, {0x4a, 0x12b}, {0x49, 0x128}, {0x4b, 0x129}}, + {{0x4a, 0x126}, {0x4c, 0x127}, {0x4b, 0x124}, {0x4d, 0x125}}, + {{0x4c, 0x122}, {0x4e, 0x123}, {0x4d, 0x120}, {0x4f, 0x121}}, + {{0x4e, 0x11e}, {0x50, 0x11f}, {0x4f, 0x11c}, {0x51, 0x11d}}, + {{0x50, 0x11a}, {0x52, 0x11b}, {0x51, 0x118}, {0x53, 0x119}}, + {{0x52, 0x116}, {0x54, 0x117}, {0x53, 0x114}, {0x55, 0x115}}, + {{0x54, 0x112}, {0x56, 0x113}, {0x55, 0x110}, {0x57, 0x111}}, + {{0x56, 0x10e}, {0x58, 0x10f}, {0x57, 0x10c}, {0x59, 0x10d}}, + {{0x58, 0x10a}, {0x5a, 0x10b}, {0x59, 0x108}, {0x5b, 0x109}}, + {{0x5a, 0x106}, {0x5c, 0x107}, {0x5b, 0x104}, {0x5d, 0x105}}, + {{0x5c, 0x102}, {0x5e, 0x103}, {0x5d, 0x100}, {0x5f, 0x101}}, + {{0x5e, 0x13e}, {0x40, 0x13f}, {0x5f, 0x13c}, {0x43, 0x13d}}, + { {0x43, 0xf6}, {0x42, 0xf7}, {0x61, 0xf4}, {0x60, 0xf5}}, + { {0x42, 0xf2}, {0x45, 0xf3}, {0x60, 0xf0}, {0x62, 0xf1}}, + { {0x45, 0xee}, {0x47, 0xef}, {0x62, 0xec}, {0x63, 0xed}}, + { {0x47, 0xea}, {0x49, 0xeb}, {0x63, 0xe8}, {0x64, 0xe9}}, + { {0x49, 0xe6}, {0x4b, 0xe7}, {0x64, 0xe4}, {0x65, 0xe5}}, + { {0x4b, 0xe2}, {0x4d, 0xe3}, {0x65, 0xe0}, {0x66, 0xe1}}, + { {0x4d, 0xde}, {0x4f, 0xdf}, {0x66, 0xdc}, {0x67, 0xdd}}, + { {0x4f, 0xda}, {0x51, 0xdb}, {0x67, 0xd8}, {0x68, 0xd9}}, + { {0x51, 0xd6}, {0x53, 0xd7}, {0x68, 0xd4}, {0x69, 0xd5}}, + { {0x53, 0xd2}, {0x55, 0xd3}, {0x69, 0xd0}, {0x6a, 0xd1}}, + { {0x55, 0xce}, {0x57, 0xcf}, {0x6a, 0xcc}, {0x6b, 0xcd}}, + { {0x57, 0xca}, {0x59, 0xcb}, {0x6b, 0xc8}, {0x6c, 0xc9}}, + { {0x59, 0xc6}, {0x5b, 0xc7}, {0x6c, 0xc4}, {0x6d, 0xc5}}, + { {0x5b, 0xc2}, {0x5d, 0xc3}, {0x6d, 0xc0}, {0x6e, 0xc1}}, + { {0x5d, 0xfe}, {0x5f, 0xff}, {0x6e, 0xfc}, {0x6f, 0xfd}}, + { {0x5f, 0xfa}, {0x43, 0xfb}, {0x6f, 0xf8}, {0x61, 0xf9}}, + {{0x1f, 0x1ca}, {3, 0x1cb}, {0x3e, 0x1c8}, {0x20, 0x1c9}}, + { {3, 0x1c6}, {2, 0x1c7}, {0x20, 0x1c4}, {0x21, 0x1c5}}, + { {2, 0x1c2}, {5, 0x1c3}, {0x21, 0x1c0}, {0x24, 0x1c1}}, + { {5, 0x1fe}, {7, 0x1ff}, {0x24, 0x1fc}, {0x26, 0x1fd}}, + { {7, 0x1fa}, {9, 0x1fb}, {0x26, 0x1f8}, {0x28, 0x1f9}}, + { {9, 0x1f6}, {0xb, 0x1f7}, {0x28, 0x1f4}, {0x2a, 0x1f5}}, + { {0xb, 0x1f2}, {0xd, 0x1f3}, {0x2a, 0x1f0}, {0x2c, 0x1f1}}, + { {0xd, 0x1ee}, {0xf, 0x1ef}, {0x2c, 0x1ec}, {0x2e, 0x1ed}}, + { {0xf, 0x1ea}, {0x11, 0x1eb}, {0x2e, 0x1e8}, {0x30, 0x1e9}}, + {{0x11, 0x1e6}, {0x13, 0x1e7}, {0x30, 0x1e4}, {0x32, 0x1e5}}, + {{0x13, 0x1e2}, {0x15, 0x1e3}, {0x32, 0x1e0}, {0x34, 0x1e1}}, + {{0x15, 0x1de}, {0x17, 0x1df}, {0x34, 0x1dc}, {0x36, 0x1dd}}, + {{0x17, 0x1da}, {0x19, 0x1db}, {0x36, 0x1d8}, {0x38, 0x1d9}}, + {{0x19, 0x1d6}, {0x1b, 0x1d7}, {0x38, 0x1d4}, {0x3a, 0x1d5}}, + {{0x1b, 0x1d2}, {0x1d, 0x1d3}, {0x3a, 0x1d0}, {0x3c, 0x1d1}}, + {{0x1d, 0x1ce}, {0x1f, 0x1cf}, {0x3c, 0x1cc}, {0x3e, 0x1cd}}, + {{0x3f, 0x142}, {0x23, 0x143}, {0x5e, 0x140}, {0x40, 0x141}}, + {{0x23, 0x17e}, {0x22, 0x17f}, {0x40, 0x17c}, {0x41, 0x17d}}, + {{0x22, 0x17a}, {0x25, 0x17b}, {0x41, 0x178}, {0x44, 0x179}}, + {{0x25, 0x176}, {0x27, 0x177}, {0x44, 0x174}, {0x46, 0x175}}, + {{0x27, 0x172}, {0x29, 0x173}, {0x46, 0x170}, {0x48, 0x171}}, + {{0x29, 0x16e}, {0x2b, 0x16f}, {0x48, 0x16c}, {0x4a, 0x16d}}, + {{0x2b, 0x16a}, {0x2d, 0x16b}, {0x4a, 0x168}, {0x4c, 0x169}}, + {{0x2d, 0x166}, {0x2f, 0x167}, {0x4c, 0x164}, {0x4e, 0x165}}, + {{0x2f, 0x162}, {0x31, 0x163}, {0x4e, 0x160}, {0x50, 0x161}}, + {{0x31, 0x15e}, {0x33, 0x15f}, {0x50, 0x15c}, {0x52, 0x15d}}, + {{0x33, 0x15a}, {0x35, 0x15b}, {0x52, 0x158}, {0x54, 0x159}}, + {{0x35, 0x156}, {0x37, 0x157}, {0x54, 0x154}, {0x56, 0x155}}, + {{0x37, 0x152}, {0x39, 0x153}, {0x56, 0x150}, {0x58, 0x151}}, + {{0x39, 0x14e}, {0x3b, 0x14f}, {0x58, 0x14c}, {0x5a, 0x14d}}, + {{0x3b, 0x14a}, {0x3d, 0x14b}, {0x5a, 0x148}, {0x5c, 0x149}}, + {{0x3d, 0x146}, {0x3f, 0x147}, {0x5c, 0x144}, {0x5e, 0x145}}, +}; + +float l06_second_backdrop_mesh_copy_texture_coordinates[576][2] __asm__("D_L06_001FC2F0") = { + {0.163243f, 1.0f}, + {0.280669f, 1.0f}, + {0.280669f, 0.851241f}, + {0.163243f, 0.851241f}, + {0.375525f, 1.0f}, + {0.375525f, 0.851241f}, + {0.375525f, 1.0f}, + {0.459585f, 1.0f}, + {0.459585f, 0.851241f}, + {0.375525f, 0.851241f}, + {0.540415f, 1.0f}, + {0.540415f, 0.851241f}, + {0.540415f, 1.0f}, + {0.624475f, 1.0f}, + {0.624475f, 0.851241f}, + {0.540415f, 0.851241f}, + {0.719331f, 1.0f}, + {0.719331f, 0.851241f}, + {0.719331f, 1.0f}, + {0.836757f, 1.0f}, + {0.836757f, 0.851241f}, + {0.719331f, 0.851241f}, + { 1.0f, 1.0f}, + { 1.0f, 0.851241f}, + { 0.0f, 1.0f}, + {0.174348f, 1.0f}, + {0.174348f, 0.851241f}, + { 0.0f, 0.851241f}, + {0.315185f, 1.0f}, + {0.315185f, 0.851241f}, + {0.315185f, 1.0f}, + {0.439994f, 1.0f}, + {0.439994f, 0.851241f}, + {0.315185f, 0.851241f}, + {0.560006f, 1.0f}, + {0.560006f, 0.851241f}, + {0.560006f, 1.0f}, + {0.684815f, 1.0f}, + {0.684815f, 0.851241f}, + {0.560006f, 0.851241f}, + {0.825652f, 1.0f}, + {0.825652f, 0.851241f}, + {0.825652f, 1.0f}, + { 1.0f, 1.0f}, + { 1.0f, 0.851241f}, + {0.825652f, 0.851241f}, + {0.163243f, 1.0f}, + {0.163243f, 0.851241f}, + {0.163243f, 0.675621f}, + {0.280669f, 0.675621f}, + {0.280669f, 0.5f}, + {0.163243f, 0.5f}, + {0.375525f, 0.675621f}, + {0.375525f, 0.5f}, + {0.375525f, 0.675621f}, + {0.459585f, 0.675621f}, + {0.459585f, 0.5f}, + {0.375525f, 0.5f}, + {0.540415f, 0.675621f}, + {0.540415f, 0.5f}, + {0.540415f, 0.675621f}, + {0.624475f, 0.675621f}, + {0.624475f, 0.5f}, + {0.540415f, 0.5f}, + {0.719331f, 0.675621f}, + {0.719331f, 0.5f}, + {0.719331f, 0.675621f}, + {0.836757f, 0.675621f}, + {0.836757f, 0.5f}, + {0.719331f, 0.5f}, + { 1.0f, 0.675621f}, + { 1.0f, 0.5f}, + { 0.0f, 0.675621f}, + {0.174348f, 0.675621f}, + {0.174348f, 0.5f}, + { 0.0f, 0.5f}, + {0.315185f, 0.675621f}, + {0.315185f, 0.5f}, + {0.315185f, 0.675621f}, + {0.439994f, 0.675621f}, + {0.439994f, 0.5f}, + {0.315185f, 0.5f}, + {0.560006f, 0.675621f}, + {0.560006f, 0.5f}, + {0.560006f, 0.675621f}, + {0.684815f, 0.675621f}, + {0.684815f, 0.5f}, + {0.560006f, 0.5f}, + {0.825652f, 0.675621f}, + {0.825652f, 0.5f}, + {0.825652f, 0.675621f}, + { 1.0f, 0.675621f}, + { 1.0f, 0.5f}, + {0.825652f, 0.5f}, + {0.163243f, 0.675621f}, + {0.163243f, 0.5f}, + {0.163243f, 0.324379f}, + {0.280669f, 0.324379f}, + {0.280669f, 0.148759f}, + {0.163243f, 0.148759f}, + {0.375525f, 0.324379f}, + {0.375525f, 0.148759f}, + {0.375525f, 0.324379f}, + {0.459585f, 0.324379f}, + {0.459585f, 0.148759f}, + {0.375525f, 0.148759f}, + {0.540415f, 0.324379f}, + {0.540415f, 0.148759f}, + {0.540415f, 0.324379f}, + {0.624475f, 0.324379f}, + {0.624475f, 0.148759f}, + {0.540415f, 0.148759f}, + {0.719331f, 0.324379f}, + {0.719331f, 0.148759f}, + {0.719331f, 0.324379f}, + {0.836757f, 0.324379f}, + {0.836757f, 0.148759f}, + {0.719331f, 0.148759f}, + { 1.0f, 0.324379f}, + { 1.0f, 0.148759f}, + { 0.0f, 0.324379f}, + {0.174348f, 0.324379f}, + {0.174348f, 0.148759f}, + { 0.0f, 0.148759f}, + {0.315185f, 0.324379f}, + {0.315185f, 0.148759f}, + {0.315185f, 0.324379f}, + {0.439994f, 0.324379f}, + {0.439994f, 0.148759f}, + {0.315185f, 0.148759f}, + {0.560006f, 0.324379f}, + {0.560006f, 0.148759f}, + {0.560006f, 0.324379f}, + {0.684815f, 0.324379f}, + {0.684815f, 0.148759f}, + {0.560006f, 0.148759f}, + {0.825652f, 0.324379f}, + {0.825652f, 0.148759f}, + {0.825652f, 0.324379f}, + { 1.0f, 0.324379f}, + { 1.0f, 0.148759f}, + {0.825652f, 0.148759f}, + {0.163243f, 0.324379f}, + {0.163243f, 0.148759f}, + {0.280669f, 0.0f}, + {0.163243f, 0.0f}, + {0.375525f, 0.0f}, + {0.459585f, 0.0f}, + {0.375525f, 0.0f}, + {0.540415f, 0.0f}, + {0.624475f, 0.0f}, + {0.540415f, 0.0f}, + {0.719331f, 0.0f}, + {0.836757f, 0.0f}, + {0.719331f, 0.0f}, + { 1.0f, 0.0f}, + {0.174348f, 0.0f}, + { 0.0f, 0.0f}, + {0.315185f, 0.0f}, + {0.439994f, 0.0f}, + {0.315185f, 0.0f}, + {0.560006f, 0.0f}, + {0.684815f, 0.0f}, + {0.560006f, 0.0f}, + {0.825652f, 0.0f}, + { 1.0f, 0.0f}, + {0.825652f, 0.0f}, + {0.163243f, 0.0f}, + { 1.0f, 0.5f}, + {0.163243f, 0.5f}, + {0.163243f, 0.5f}, + {0.280669f, 0.5f}, + {0.375525f, 0.5f}, + {0.375525f, 0.5f}, + {0.459585f, 0.5f}, + {0.540415f, 0.5f}, + {0.540415f, 0.5f}, + {0.624475f, 0.5f}, + {0.719331f, 0.5f}, + {0.719331f, 0.5f}, + {0.836757f, 0.5f}, + { 1.0f, 0.5f}, + { 0.0f, 0.5f}, + {0.174348f, 0.5f}, + {0.315185f, 0.5f}, + {0.315185f, 0.5f}, + {0.439994f, 0.5f}, + {0.560006f, 0.5f}, + {0.560006f, 0.5f}, + {0.684815f, 0.5f}, + {0.825652f, 0.5f}, + {0.825652f, 0.5f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, + { 0.0f, 0.0f}, + { 1.0f, 0.0f}, + { 0.0f, -1.0f}, + { 1.0f, -1.0f}, +}; + +FRow_l06 l06_second_backdrop_mesh_copy_quad_normals[96] __asm__("D_L06_001FD4F0") = { + {{0.55558f, 0.831463f, 0.0f, 1.0f}}, {{0.19508f, 0.980787f, 0.0f, 1.0f}}, + {{-0.19508f, 0.980787f, 0.0f, 1.0f}}, {{-0.55558f, 0.831463f, 0.0f, 1.0f}}, + {{-0.831463f, 0.55558f, 0.0f, 1.0f}}, {{-0.980787f, 0.19508f, 0.0f, 1.0f}}, + {{-0.980787f, -0.19508f, 0.0f, 1.0f}}, {{-0.831463f, -0.55558f, 0.0f, 1.0f}}, + {{-0.55558f, -0.831463f, 0.0f, 1.0f}}, {{-0.19508f, -0.980787f, 0.0f, 1.0f}}, + {{0.19508f, -0.980787f, 0.0f, 1.0f}}, {{0.55558f, -0.831463f, 0.0f, 1.0f}}, + {{0.831463f, -0.55558f, 0.0f, 1.0f}}, {{0.980787f, -0.19508f, 0.0f, 1.0f}}, + {{0.980787f, 0.19508f, 0.0f, 1.0f}}, {{0.831463f, 0.55558f, 0.0f, 1.0f}}, + {{0.55558f, 0.831463f, 0.0f, 1.0f}}, {{0.19508f, 0.980787f, 0.0f, 1.0f}}, + {{-0.19508f, 0.980787f, 0.0f, 1.0f}}, {{-0.55558f, 0.831463f, 0.0f, 1.0f}}, + {{-0.831463f, 0.55558f, 0.0f, 1.0f}}, {{-0.980787f, 0.19508f, 0.0f, 1.0f}}, + {{-0.980787f, -0.19508f, 0.0f, 1.0f}}, {{-0.831463f, -0.55558f, 0.0f, 1.0f}}, + {{-0.55558f, -0.831463f, 0.0f, 1.0f}}, {{-0.19508f, -0.980787f, 0.0f, 1.0f}}, + {{0.19508f, -0.980787f, 0.0f, 1.0f}}, {{0.55558f, -0.831463f, 0.0f, 1.0f}}, + {{0.831463f, -0.55558f, 0.0f, 1.0f}}, {{0.980787f, -0.19508f, 0.0f, 1.0f}}, + {{0.980787f, 0.19508f, 0.0f, 1.0f}}, {{0.831463f, 0.55558f, 0.0f, 1.0f}}, + {{0.55558f, 0.831463f, 0.0f, 1.0f}}, {{0.19508f, 0.980787f, 0.0f, 1.0f}}, + {{-0.19508f, 0.980787f, 0.0f, 1.0f}}, {{-0.55558f, 0.831463f, 0.0f, 1.0f}}, + {{-0.831463f, 0.55558f, 0.0f, 1.0f}}, {{-0.980787f, 0.19508f, 0.0f, 1.0f}}, + {{-0.980787f, -0.19508f, 0.0f, 1.0f}}, {{-0.831463f, -0.55558f, 0.0f, 1.0f}}, + {{-0.55558f, -0.831463f, 0.0f, 1.0f}}, {{-0.19508f, -0.980787f, 0.0f, 1.0f}}, + {{0.19508f, -0.980787f, 0.0f, 1.0f}}, {{0.55558f, -0.831463f, 0.0f, 1.0f}}, + {{0.831463f, -0.55558f, 0.0f, 1.0f}}, {{0.980787f, -0.19508f, 0.0f, 1.0f}}, + {{0.980787f, 0.19508f, 0.0f, 1.0f}}, {{0.831463f, 0.55558f, 0.0f, 1.0f}}, + {{0.55558f, 0.831463f, 0.0f, 1.0f}}, {{0.19508f, 0.980787f, 0.0f, 1.0f}}, + {{-0.19508f, 0.980787f, 0.0f, 1.0f}}, {{-0.55558f, 0.831463f, 0.0f, 1.0f}}, + {{-0.831463f, 0.55558f, 0.0f, 1.0f}}, {{-0.980787f, 0.19508f, 0.0f, 1.0f}}, + {{-0.980787f, -0.19508f, 0.0f, 1.0f}}, {{-0.831463f, -0.55558f, 0.0f, 1.0f}}, + {{-0.55558f, -0.831463f, 0.0f, 1.0f}}, {{-0.19508f, -0.980787f, 0.0f, 1.0f}}, + {{0.19508f, -0.980787f, 0.0f, 1.0f}}, {{0.55558f, -0.831463f, 0.0f, 1.0f}}, + {{0.831463f, -0.55558f, 0.0f, 1.0f}}, {{0.980787f, -0.19508f, 0.0f, 1.0f}}, + {{0.980787f, 0.19508f, 0.0f, 1.0f}}, {{0.831463f, 0.55558f, 0.0f, 1.0f}}, + {{0.831463f, 0.55558f, 0.0f, 1.0f}}, {{0.55558f, 0.831463f, 0.0f, 1.0f}}, + {{0.19508f, 0.980787f, 0.0f, 1.0f}}, {{-0.19508f, 0.980787f, 0.0f, 1.0f}}, + {{-0.55558f, 0.831463f, 0.0f, 1.0f}}, {{-0.831463f, 0.55558f, 0.0f, 1.0f}}, + {{-0.980787f, 0.19508f, 0.0f, 1.0f}}, {{-0.980787f, -0.19508f, 0.0f, 1.0f}}, + {{-0.831463f, -0.55558f, 0.0f, 1.0f}}, {{-0.55558f, -0.831463f, 0.0f, 1.0f}}, + {{-0.19508f, -0.980787f, 0.0f, 1.0f}}, {{0.19508f, -0.980787f, 0.0f, 1.0f}}, + {{0.55558f, -0.831463f, 0.0f, 1.0f}}, {{0.831463f, -0.55558f, 0.0f, 1.0f}}, + {{0.980787f, -0.19508f, 0.0f, 1.0f}}, {{0.980787f, 0.19508f, 0.0f, 1.0f}}, + {{0.831463f, 0.55558f, 0.0f, 1.0f}}, {{0.55558f, 0.831463f, 0.0f, 1.0f}}, + {{0.19508f, 0.980787f, 0.0f, 1.0f}}, {{-0.19508f, 0.980787f, 0.0f, 1.0f}}, + {{-0.55558f, 0.831463f, 0.0f, 1.0f}}, {{-0.831463f, 0.55558f, 0.0f, 1.0f}}, + {{-0.980787f, 0.19508f, 0.0f, 1.0f}}, {{-0.980787f, -0.19508f, 0.0f, 1.0f}}, + {{-0.831463f, -0.55558f, 0.0f, 1.0f}}, {{-0.55558f, -0.831463f, 0.0f, 1.0f}}, + {{-0.19508f, -0.980787f, 0.0f, 1.0f}}, {{0.19508f, -0.980787f, 0.0f, 1.0f}}, + {{0.55558f, -0.831463f, 0.0f, 1.0f}}, {{0.831463f, -0.55558f, 0.0f, 1.0f}}, + {{0.980787f, -0.19508f, 0.0f, 1.0f}}, {{0.980787f, 0.19508f, 0.0f, 1.0f}}, +}; + +FRow_l06 l06_second_backdrop_mesh_copy_quad_centres[96] __asm__("D_L06_001FE1F0") = { + {{37006.156f, 32532.99f, 13941.652f, 1.0f}}, {{36931.906f, 32563.744f, 13941.652f, 1.0f}}, + {{36851.547f, 32563.744f, 13941.652f, 1.0f}}, {{36777.297f, 32532.99f, 13941.652f, 1.0f}}, + {{36720.473f, 32476.164f, 13941.652f, 1.0f}}, {{36689.72f, 32401.918f, 13941.652f, 1.0f}}, + {{36689.72f, 32321.555f, 13941.652f, 1.0f}}, {{36720.473f, 32247.309f, 13941.652f, 1.0f}}, + {{36777.297f, 32190.482f, 13941.652f, 1.0f}}, {{36851.547f, 32159.729f, 13941.652f, 1.0f}}, + {{36931.906f, 32159.729f, 13941.652f, 1.0f}}, {{37006.156f, 32190.482f, 13941.652f, 1.0f}}, + {{37062.98f, 32247.309f, 13941.652f, 1.0f}}, {{37093.734f, 32321.555f, 13941.652f, 1.0f}}, + {{37093.734f, 32401.918f, 13941.652f, 1.0f}}, {{37062.98f, 32476.164f, 13941.652f, 1.0f}}, + {{37006.156f, 32532.99f, 14130.826f, 1.0f}}, {{36931.906f, 32563.744f, 14130.826f, 1.0f}}, + {{36851.547f, 32563.744f, 14130.826f, 1.0f}}, {{36777.297f, 32532.99f, 14130.826f, 1.0f}}, + {{36720.473f, 32476.164f, 14130.826f, 1.0f}}, {{36689.72f, 32401.918f, 14130.826f, 1.0f}}, + {{36689.72f, 32321.555f, 14130.826f, 1.0f}}, {{36720.473f, 32247.309f, 14130.826f, 1.0f}}, + {{36777.297f, 32190.482f, 14130.826f, 1.0f}}, {{36851.547f, 32159.729f, 14130.826f, 1.0f}}, + {{36931.906f, 32159.729f, 14130.826f, 1.0f}}, {{37006.156f, 32190.482f, 14130.826f, 1.0f}}, + {{37062.98f, 32247.309f, 14130.826f, 1.0f}}, {{37093.734f, 32321.555f, 14130.826f, 1.0f}}, + {{37093.734f, 32401.918f, 14130.826f, 1.0f}}, {{37062.98f, 32476.164f, 14130.826f, 1.0f}}, + {{37006.156f, 32532.99f, 14327.521f, 1.0f}}, {{36931.906f, 32563.744f, 14327.521f, 1.0f}}, + {{36851.547f, 32563.744f, 14327.521f, 1.0f}}, {{36777.297f, 32532.99f, 14327.521f, 1.0f}}, + {{36720.473f, 32476.164f, 14327.521f, 1.0f}}, {{36689.72f, 32401.918f, 14327.521f, 1.0f}}, + {{36689.72f, 32321.555f, 14327.521f, 1.0f}}, {{36720.473f, 32247.309f, 14327.521f, 1.0f}}, + {{36777.297f, 32190.482f, 14327.521f, 1.0f}}, {{36851.547f, 32159.729f, 14327.521f, 1.0f}}, + {{36931.906f, 32159.729f, 14327.521f, 1.0f}}, {{37006.156f, 32190.482f, 14327.521f, 1.0f}}, + {{37062.98f, 32247.309f, 14327.521f, 1.0f}}, {{37093.734f, 32321.555f, 14327.521f, 1.0f}}, + {{37093.734f, 32401.918f, 14327.521f, 1.0f}}, {{37062.98f, 32476.164f, 14327.521f, 1.0f}}, + {{37006.156f, 32532.99f, 14418.348f, 1.0f}}, {{36931.906f, 32563.744f, 14418.348f, 1.0f}}, + {{36851.547f, 32563.744f, 14418.348f, 1.0f}}, {{36777.297f, 32532.99f, 14418.348f, 1.0f}}, + {{36720.473f, 32476.164f, 14418.348f, 1.0f}}, {{36689.72f, 32401.918f, 14418.348f, 1.0f}}, + {{36689.72f, 32321.555f, 14418.348f, 1.0f}}, {{36720.473f, 32247.309f, 14418.348f, 1.0f}}, + {{36777.297f, 32190.482f, 14418.348f, 1.0f}}, {{36851.547f, 32159.729f, 14418.348f, 1.0f}}, + {{36931.906f, 32159.729f, 14418.348f, 1.0f}}, {{37006.156f, 32190.482f, 14418.348f, 1.0f}}, + {{37062.98f, 32247.309f, 14418.348f, 1.0f}}, {{37093.734f, 32321.555f, 14418.348f, 1.0f}}, + {{37093.734f, 32401.918f, 14418.348f, 1.0f}}, {{37062.98f, 32476.164f, 14418.348f, 1.0f}}, + {{37062.98f, 32476.164f, 14032.479f, 1.0f}}, {{37006.156f, 32532.99f, 14032.479f, 1.0f}}, + {{36931.906f, 32563.744f, 14032.479f, 1.0f}}, {{36851.547f, 32563.744f, 14032.479f, 1.0f}}, + {{36777.297f, 32532.99f, 14032.479f, 1.0f}}, {{36720.473f, 32476.164f, 14032.479f, 1.0f}}, + {{36689.72f, 32401.918f, 14032.479f, 1.0f}}, {{36689.72f, 32321.555f, 14032.479f, 1.0f}}, + {{36720.473f, 32247.309f, 14032.479f, 1.0f}}, {{36777.297f, 32190.482f, 14032.479f, 1.0f}}, + {{36851.547f, 32159.729f, 14032.479f, 1.0f}}, {{36931.906f, 32159.729f, 14032.479f, 1.0f}}, + {{37006.156f, 32190.482f, 14032.479f, 1.0f}}, {{37062.98f, 32247.309f, 14032.479f, 1.0f}}, + {{37093.734f, 32321.555f, 14032.479f, 1.0f}}, {{37093.734f, 32401.918f, 14032.479f, 1.0f}}, + {{37062.98f, 32476.164f, 14229.174f, 1.0f}}, {{37006.156f, 32532.99f, 14229.174f, 1.0f}}, + {{36931.906f, 32563.744f, 14229.174f, 1.0f}}, {{36851.547f, 32563.744f, 14229.174f, 1.0f}}, + {{36777.297f, 32532.99f, 14229.174f, 1.0f}}, {{36720.473f, 32476.164f, 14229.174f, 1.0f}}, + {{36689.72f, 32401.918f, 14229.174f, 1.0f}}, {{36689.72f, 32321.555f, 14229.174f, 1.0f}}, + {{36720.473f, 32247.309f, 14229.174f, 1.0f}}, {{36777.297f, 32190.482f, 14229.174f, 1.0f}}, + {{36851.547f, 32159.729f, 14229.174f, 1.0f}}, {{36931.906f, 32159.729f, 14229.174f, 1.0f}}, + {{37006.156f, 32190.482f, 14229.174f, 1.0f}}, {{37062.98f, 32247.309f, 14229.174f, 1.0f}}, + {{37093.734f, 32321.555f, 14229.174f, 1.0f}}, {{37093.734f, 32401.918f, 14229.174f, 1.0f}}, +}; + extern char D_0013F3D0[] NOT_SDA; /* Moby class 1083 */ From 1b2ab67adee91fce505ee8df4eb92561527a3cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:43:33 +0000 Subject: [PATCH 136/213] decomp: define the unused point pair tables of the level 16 reflection meshes in C --- config/us/levels/data.tsv | 5 + src/overlays/l16/mobys/reflection_mesh_pair.c | 114 ++++++++++++++++-- 2 files changed, 110 insertions(+), 9 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index ab7f045cb4..c80934f0ac 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -22911,6 +22911,8 @@ D_L16_001DD4A8 1500 D_L16_001DDA88 500 D_L16_001DE150 1320 D_L16_001DE678 156 +D_L16_001DE720 880 +D_L16_001DEA90 104 D_L16_001DEAF8 1320 D_L16_001DF020 156 D_L16_001DF0C0 440 @@ -22918,6 +22920,9 @@ D_L16_001DF278 52 D_L16_001DF7B0 1776 D_L16_001DFEA0 1776 D_L16_001E0590 636 +D_L16_001E0810 1184 +D_L16_001E0CB0 1184 +D_L16_001E1150 424 D_L16_001E12F8 1776 D_L16_001E19E8 1776 D_L16_001E20D8 636 diff --git a/src/overlays/l16/mobys/reflection_mesh_pair.c b/src/overlays/l16/mobys/reflection_mesh_pair.c index 849f4fa649..24376ccb4c 100644 --- a/src/overlays/l16/mobys/reflection_mesh_pair.c +++ b/src/overlays/l16/mobys/reflection_mesh_pair.c @@ -62,11 +62,13 @@ extern float reflection_mesh_pair_positions_0[330] __asm__("D_L16_001DE150"); /* 110 points x 3 floats */ extern float reflection_mesh_pair_positions_1[39] __asm__("D_L16_001DE678"); /* 13 points x 3 floats */ -extern float D_L16_001DE720[]; -extern float D_L16_001DEA90[]; +extern float + reflection_mesh_pair_unused_pairs_0[220] __asm__("D_L16_001DE720"); /* 110 points x 2 floats */ +extern float + reflection_mesh_pair_unused_pairs_1[26] __asm__("D_L16_001DEA90"); /* 13 points x 2 floats */ -float *reflection_mesh_pair_unused_pair_tables[2] __asm__("D_L16_00161FA0") = {D_L16_001DE720, - D_L16_001DEA90}; +float *reflection_mesh_pair_unused_pair_tables[2] __asm__("D_L16_00161FA0") = { + reflection_mesh_pair_unused_pairs_0, reflection_mesh_pair_unused_pairs_1}; extern float reflection_mesh_pair_directions_0[330] __asm__("D_L16_001DEAF8"); /* 110 points x 3 floats */ @@ -212,11 +214,18 @@ float *reflection_mesh_batch_position_tables[4] __asm__("D_L16_00161FC8") reflection_mesh_batch_positions_2, 0}; -extern float D_L16_001E0810[]; -extern float D_L16_001E0CB0[]; -extern float D_L16_001E1150[]; -float *reflection_mesh_batch_unused_pair_tables[4] __asm__("D_L16_00161FD8") - __attribute__((section(".sdata"))) = {D_L16_001E0810, D_L16_001E0CB0, D_L16_001E1150, 0}; +extern float + reflection_mesh_batch_unused_pairs_0[296] __asm__("D_L16_001E0810"); /* 148 points x 2 floats */ +extern float + reflection_mesh_batch_unused_pairs_1[296] __asm__("D_L16_001E0CB0"); /* 148 points x 2 floats */ +extern float + reflection_mesh_batch_unused_pairs_2[106] __asm__("D_L16_001E1150"); /* 53 points x 2 floats */ +float *reflection_mesh_batch_unused_pair_tables[4] __asm__("D_L16_00161FD8") + + __attribute__((section(".sdata"))) = {reflection_mesh_batch_unused_pairs_0, + reflection_mesh_batch_unused_pairs_1, + reflection_mesh_batch_unused_pairs_2, + 0}; extern float reflection_mesh_batch_directions_0[444] __asm__("D_L16_001E12F8"); /* 148 points x 3 floats */ @@ -737,3 +746,90 @@ u32 reflection_mesh_batch_colours_2[53] __asm__("D_L16_001E27F8") = { 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f}; + +float reflection_mesh_pair_unused_pairs_0[220] __asm__("D_L16_001DE720") = { + 1.0f, -1.0f, 0.5f, -1.0f, 1.0f, -0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, + 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.0f, -1.0f, + 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, + 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.0f, -1.0f, + 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, + 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.0f, -1.0f, + 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, + 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.0f, -1.0f, + 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, + 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.0f, -1.0f, + 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, + 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.0f, -1.0f, + 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, + 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.0f, -1.0f, + 0.5f, -0.5f, 0.5f, -1.0f, 0.5f, -0.5f, 0.0f, -1.0f, 0.5f, -0.5f, 0.0f, -0.5f, 0.5f, -0.5f, + 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 1.0f, -0.5f, 1.0f, 0.0f, +}; + +float reflection_mesh_pair_unused_pairs_1[26] __asm__("D_L16_001DEA90") = { + 1.0f, -1.0f, 0.5f, -1.0f, 1.0f, -0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, + 0.0f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -1.0f, +}; + +float reflection_mesh_batch_unused_pairs_0[296] __asm__("D_L16_001E0810") = { + 1.0f, 0.0f, 1.0f, -1.0f, 0.75f, 0.0f, 0.75f, -1.0f, 0.5f, 0.0f, 0.5f, -1.0f, 0.25f, + 0.0f, 0.25f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.75f, 0.0f, 0.75f, -1.0f, 0.5f, 0.0f, + 0.5f, -1.0f, 0.25f, 0.0f, 0.25f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.75f, 0.0f, 0.75f, + -1.0f, 0.5f, 0.0f, 0.5f, -1.0f, 0.25f, 0.0f, 0.25f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, + 0.75f, 0.0f, 0.75f, -1.0f, 0.5f, 0.0f, 0.5f, -1.0f, 0.25f, 0.0f, 0.25f, -1.0f, 0.0f, + 0.0f, 0.0f, -1.0f, 0.75f, 0.0f, 0.75f, -1.0f, 0.5f, 0.0f, 0.5f, -1.0f, 0.25f, 0.0f, + 0.25f, -1.0f, 0.25f, 0.0f, 0.0f, -1.0f, 0.25f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, + 1.0f, 0.25f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.25f, 0.0f, 0.0f, 0.0f, + 1.0f, 1.0f, 0.0f, 1.0f, 0.25f, -1.0f, 0.0f, 0.0f, 0.25f, -1.0f, 0.25f, 0.0f, 0.5f, + -1.0f, 0.5f, 0.0f, 0.75f, -1.0f, 0.75f, 0.0f, 1.0f, -1.0f, 1.0f, 0.0f, 0.25f, -1.0f, + 0.25f, 0.0f, 0.5f, -1.0f, 0.5f, 0.0f, 0.75f, -1.0f, 0.75f, 0.0f, 1.0f, -1.0f, 1.0f, + 0.0f, 0.25f, -1.0f, 0.25f, 0.0f, 0.5f, -1.0f, 0.5f, 0.0f, 0.75f, -1.0f, 0.75f, 0.0f, + 1.0f, -1.0f, 1.0f, 0.0f, 0.25f, -1.0f, 0.25f, 0.0f, 0.5f, -1.0f, 0.5f, 0.0f, 0.75f, + -1.0f, 0.75f, 0.0f, 1.0f, -1.0f, 1.0f, 0.0f, 0.25f, -1.0f, 0.25f, 0.0f, 0.5f, -1.0f, + 0.5f, 0.0f, 0.75f, -1.0f, 0.75f, 0.0f, 0.75f, -1.0f, 1.0f, 0.0f, 0.75f, -1.0f, 1.0f, + -1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.75f, -1.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f, + 0.75f, -1.0f, 1.0f, -1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, + 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, + 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, + 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, + 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, +}; + +float reflection_mesh_batch_unused_pairs_1[296] __asm__("D_L16_001E0CB0") = { + 1.0f, 1.0f, 0.0f, 1.0f, 0.5f, 0.0f, 0.25f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.5f, + 0.0f, 0.25f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, + 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, + 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, + 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, + 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.5f, -1.0f, 0.75f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f, + 0.5f, 0.0f, 0.75f, -1.0f, 0.5f, 0.0f, 0.5f, -1.0f, 0.25f, 0.0f, 0.25f, -1.0f, 0.0f, + 0.0f, 0.0f, -1.0f, 0.75f, 0.0f, 0.75f, -1.0f, 0.5f, 0.0f, 0.5f, -1.0f, 0.25f, 0.0f, + 0.25f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.75f, 0.0f, 0.75f, -1.0f, 0.5f, 0.0f, 0.5f, + -1.0f, 0.25f, 0.0f, 0.25f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.75f, 0.0f, 0.75f, -1.0f, + 0.5f, 0.0f, 0.5f, -1.0f, 0.25f, 0.0f, 0.25f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.75f, + 0.0f, 0.75f, -1.0f, 0.75f, 0.0f, 0.5f, -1.0f, 0.75f, 0.0f, 0.5f, 0.0f, 1.0f, 1.0f, + 0.0f, 1.0f, 0.75f, -1.0f, 0.5f, 0.0f, 0.75f, -1.0f, 0.75f, 0.0f, 0.75f, -1.0f, 1.0f, + 0.0f, 0.75f, -1.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, + 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.25f, -1.0f, 0.25f, 0.0f, 0.25f, + -1.0f, 0.5f, 0.0f, 0.25f, -1.0f, 0.5f, -1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.5f, 0.0f, 0.75f, -1.0f, 0.75f, + 0.0f, 0.75f, -1.0f, 1.0f, 0.0f, 0.75f, -1.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 1.0f, + 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.25f, + -1.0f, 0.25f, 0.0f, 0.25f, -1.0f, 0.5f, 0.0f, 0.25f, -1.0f, 0.5f, -1.0f, 0.0f, 0.0f, + 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, +}; + +float reflection_mesh_batch_unused_pairs_2[106] __asm__("D_L16_001E1150") = { + 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.5f, 0.0f, 0.75f, -1.0f, 0.75f, 0.0f, 0.75f, -1.0f, + 1.0f, 0.0f, 0.75f, -1.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, + 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.25f, -1.0f, 0.25f, 0.0f, 0.25f, -1.0f, + 0.5f, 0.0f, 0.25f, -1.0f, 0.5f, -1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, + 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.5f, 0.0f, 0.75f, -1.0f, 0.75f, 0.0f, 0.75f, -1.0f, + 1.0f, 0.0f, 0.75f, -1.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, + 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.25f, -1.0f, 0.5f, 0.0f, + 0.25f, -1.0f, 0.25f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, +}; From 54e2dcd8302c7d3c73fcc9f0309828175f9ed728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:46:39 +0000 Subject: [PATCH 137/213] decomp: define the unused point pair tables of the other level 16 and 17 reflection meshes in C --- config/us/levels/data.tsv | 13 ++ src/overlays/l16/mobys/reflection_mesh.c | 28 ++- src/overlays/l16/mobys/reflection_mesh_trio.c | 74 +++++++- src/overlays/l17/reflection_strips.c | 170 ++++++++++++++++-- 4 files changed, 260 insertions(+), 25 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index c80934f0ac..d1429a6829 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -22900,6 +22900,9 @@ D_L16_001D9800 64 D_L16_001D98D0 1776 D_L16_001D9FC0 1776 D_L16_001DA6B0 300 +D_L16_001DA7E0 1184 +D_L16_001DAC80 1184 +D_L16_001DB120 200 D_L16_001DB1E8 1776 D_L16_001DB8D8 1776 D_L16_001DBFC8 300 @@ -22907,6 +22910,7 @@ D_L16_001DC0F8 592 D_L16_001DC348 592 D_L16_001DC598 100 D_L16_001DCAE0 1500 +D_L16_001DD0C0 1000 D_L16_001DD4A8 1500 D_L16_001DDA88 500 D_L16_001DE150 1320 @@ -24244,29 +24248,38 @@ D_L17_001DE070 20 D_L17_001DE0D0 20 D_L17_001DE150 312 D_L17_001DE288 312 +D_L17_001DE3C0 208 +D_L17_001DE490 208 D_L17_001DE560 312 D_L17_001DE698 312 D_L17_001DE7D0 104 D_L17_001DE838 104 D_L17_001DED50 792 +D_L17_001DF070 528 D_L17_001DF280 792 D_L17_001DF598 264 D_L17_001DFB70 168 D_L17_001DFC18 336 +D_L17_001DFD70 112 +D_L17_001DFDE0 224 D_L17_001DFEC0 168 D_L17_001DFF68 336 D_L17_001E00B8 56 D_L17_001E00F0 112 D_L17_001E0610 552 +D_L17_001E0840 368 D_L17_001E09B0 552 D_L17_001E0BD8 184 D_L17_001E1160 1428 D_L17_001E16F8 924 +D_L17_001E1AA0 952 +D_L17_001E1E60 616 D_L17_001E20C8 1428 D_L17_001E2660 924 D_L17_001E2A00 476 D_L17_001E2BE0 308 D_L17_001E31D0 792 +D_L17_001E34F0 528 D_L17_001E3700 792 D_L17_001E3A18 264 D_L17_001E3FD0 4 diff --git a/src/overlays/l16/mobys/reflection_mesh.c b/src/overlays/l16/mobys/reflection_mesh.c index 59e49ca386..b5f9e3d65f 100644 --- a/src/overlays/l16/mobys/reflection_mesh.c +++ b/src/overlays/l16/mobys/reflection_mesh.c @@ -59,8 +59,11 @@ extern float float *single_reflection_mesh_position_tables[2] __asm__("D_L16_00161F60") = { single_reflection_mesh_positions, 0}; -extern float D_L16_001DD0C0[]; -float *single_reflection_mesh_unused_pair_tables[2] __asm__("D_L16_00161F68") = {D_L16_001DD0C0, 0}; +extern float + single_reflection_mesh_unused_pairs[250] __asm__("D_L16_001DD0C0"); /* 125 points x 2 floats */ + +float *single_reflection_mesh_unused_pair_tables[2] __asm__("D_L16_00161F68") = { + single_reflection_mesh_unused_pairs, 0}; extern float single_reflection_mesh_directions[375] __asm__("D_L16_001DD4A8"); /* 125 points x 3 floats */ @@ -296,3 +299,24 @@ u32 single_reflection_mesh_colours[125] __asm__("D_L16_001DDA88") = { 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f}; + +float single_reflection_mesh_unused_pairs[250] __asm__("D_L16_001DD0C0") = { + 0.5f, -1.0f, 0.0f, -1.0f, 0.5f, -0.5f, 0.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, + 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, + 1.0f, -1.0f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, + 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, + 1.0f, -1.0f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, + 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, + 1.0f, -1.0f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, + 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, + 1.0f, -1.0f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, + 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, + 1.0f, -1.0f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, + 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, + 1.0f, -1.0f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, + 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, + 1.0f, -1.0f, 0.0f, -0.5f, 0.5f, -1.0f, 0.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, + 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, -1.0f, 1.0f, -0.5f, + 1.0f, -1.0f, 0.5f, -0.5f, 0.5f, -1.0f, 0.5f, -0.5f, 1.0f, -1.0f, 0.5f, -0.5f, 1.0f, -0.5f, + 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, +}; diff --git a/src/overlays/l16/mobys/reflection_mesh_trio.c b/src/overlays/l16/mobys/reflection_mesh_trio.c index c2466f60f4..21b91b17db 100644 --- a/src/overlays/l16/mobys/reflection_mesh_trio.c +++ b/src/overlays/l16/mobys/reflection_mesh_trio.c @@ -119,11 +119,18 @@ float *reflection_mesh_trio_position_tables[4] __asm__("D_L16_00161F00") reflection_mesh_trio_positions_2, 0}; -extern float D_L16_001DA7E0[]; -extern float D_L16_001DAC80[]; -extern float D_L16_001DB120[]; -float *reflection_mesh_trio_unused_pair_tables[4] __asm__("D_L16_00161F10") - __attribute__((section(".sdata"))) = {D_L16_001DA7E0, D_L16_001DAC80, D_L16_001DB120, 0}; +extern float + reflection_mesh_trio_unused_pairs_0[296] __asm__("D_L16_001DA7E0"); /* 148 points x 2 floats */ +extern float + reflection_mesh_trio_unused_pairs_1[296] __asm__("D_L16_001DAC80"); /* 148 points x 2 floats */ +extern float + reflection_mesh_trio_unused_pairs_2[50] __asm__("D_L16_001DB120"); /* 25 points x 2 floats */ +float *reflection_mesh_trio_unused_pair_tables[4] __asm__("D_L16_00161F10") + + __attribute__((section(".sdata"))) = {reflection_mesh_trio_unused_pairs_0, + reflection_mesh_trio_unused_pairs_1, + reflection_mesh_trio_unused_pairs_2, + 0}; extern float reflection_mesh_trio_directions_0[444] __asm__("D_L16_001DB1E8"); /* 148 points x 3 floats */ @@ -565,3 +572,60 @@ u32 reflection_mesh_trio_colours_2[25] __asm__("D_L16_001DC598") = { 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f, 0x7f7f7f7f}; + +float reflection_mesh_trio_unused_pairs_0[296] __asm__("D_L16_001DA7E0") = { + 1.0f, -0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, 0.0f, 0.0f, -0.5f, 0.5f, -0.5f, 1.0f, -0.5f, + 0.5f, 0.0f, 1.0f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 1.0f, -0.5f, 1.0f, 0.0f, + 0.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, 0.0f, 0.0f, -0.5f, + 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.5f, 0.0f, 0.0f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, + 1.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 1.0f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, + 0.5f, 0.0f, 1.0f, -0.5f, 1.0f, 0.0f, 0.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.5f, -0.5f, + 1.0f, 0.0f, 0.5f, 0.0f, 0.0f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, 1.0f, -0.5f, + 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.5f, 0.0f, 0.0f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, + 1.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, + 0.0f, -0.5f, 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, 1.0f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, + 0.5f, 0.0f, 1.0f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 1.0f, -0.5f, 1.0f, 0.0f, + 0.5f, -0.5f, 0.5f, 0.0f, 1.0f, -0.5f, 1.0f, 0.0f, 0.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, + 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, 0.0f, 0.0f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.5f, -0.5f, 0.0f, -0.5f, 0.5f, 0.0f, 1.0f, -0.5f, + 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 1.0f, -0.5f, 1.0f, 0.0f, 0.0f, -0.5f, 0.5f, 0.0f, + 0.0f, -0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.5f, 0.0f, 0.0f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, + 1.0f, 0.0f, 1.0f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, 0.0f, 1.0f, 0.0f, + 0.5f, -0.5f, 1.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.5f, -0.5f, 1.0f, -0.5f, + 0.5f, 0.0f, +}; + +float reflection_mesh_trio_unused_pairs_1[296] __asm__("D_L16_001DAC80") = { + 1.0f, -0.5f, 0.5f, 0.0f, 1.0f, -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, + 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, + 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, + 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, + 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, + 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, + 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, + 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, + 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, + 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f, + 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.0f, + 1.0f, -0.5f, +}; + +float reflection_mesh_trio_unused_pairs_2[50] __asm__("D_L16_001DB120") = { + 0.5f, 0.0f, 1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.5f, + -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 1.0f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, + 0.5f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 0.0f, -0.5f, 0.5f, + -0.5f, 1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, +}; diff --git a/src/overlays/l17/reflection_strips.c b/src/overlays/l17/reflection_strips.c index 421edac97f..065cf7e174 100644 --- a/src/overlays/l17/reflection_strips.c +++ b/src/overlays/l17/reflection_strips.c @@ -147,11 +147,13 @@ f32 reflection_strip_pair0_positions_1[26][3] __asm__("D_L17_001DE288") = { MeshPoint *reflection_strip_pair0_position_tables[2] __asm__("D_L17_001623F8") = { reflection_strip_pair0_positions_0, reflection_strip_pair0_positions_1}; -extern float D_L17_001DE3C0[]; -extern float D_L17_001DE490[]; +extern float + reflection_strip_pair0_unused_pairs_0[52] __asm__("D_L17_001DE3C0"); /* 26 points x 2 floats */ +extern float + reflection_strip_pair0_unused_pairs_1[52] __asm__("D_L17_001DE490"); /* 26 points x 2 floats */ -float *reflection_strip_pair0_unused_pair_tables[2] __asm__("D_L17_00162400") = {D_L17_001DE3C0, - D_L17_001DE490}; +float *reflection_strip_pair0_unused_pair_tables[2] __asm__("D_L17_00162400") = { + reflection_strip_pair0_unused_pairs_0, reflection_strip_pair0_unused_pairs_1}; f32 reflection_strip_pair0_directions_0[26][3] __asm__("D_L17_001DE560") = { {-0.903587f, 0.426433f, 0.041043f}, @@ -416,8 +418,11 @@ u32 *reflection_strip0_colour_tables[2] __asm__("D_L17_00162458") = {reflection_ int reflection_strip0_vertex_counts[2] __asm__("D_L17_00162420") = {66, 0}; -extern float D_L17_001DF070[]; -float *reflection_strip0_unused_pair_tables[2] __asm__("D_L17_00162448") = {D_L17_001DF070, 0}; +extern float + reflection_strip0_unused_pairs[132] __asm__("D_L17_001DF070"); /* 66 points x 2 floats */ + +float *reflection_strip0_unused_pair_tables[2] __asm__("D_L17_00162448") = { + reflection_strip0_unused_pairs, 0}; void draw_reflection_strip(void) __asm__("FUN_L17_002f59a8"); @@ -497,11 +502,13 @@ void compute_vertex_to_reference_sphere_map_uvs( position, unused pair, direction and colour tables. */ s32 reflection_strip_pair1_vertex_counts[2] __asm__("D_L17_00162460") = {14, 28}; -extern float D_L17_001DFD70[]; -extern float D_L17_001DFDE0[]; +extern float + reflection_strip_pair1_unused_pairs_0[28] __asm__("D_L17_001DFD70"); /* 14 points x 2 floats */ +extern float + reflection_strip_pair1_unused_pairs_1[56] __asm__("D_L17_001DFDE0"); /* 28 points x 2 floats */ -float *reflection_strip_pair1_unused_pair_tables[2] __asm__("D_L17_00162470") = {D_L17_001DFD70, - D_L17_001DFDE0}; +float *reflection_strip_pair1_unused_pair_tables[2] __asm__("D_L17_00162470") = { + reflection_strip_pair1_unused_pairs_0, reflection_strip_pair1_unused_pairs_1}; f32 reflection_strip_pair1_positions_0[14][3] __asm__("D_L17_001DFB70") = { { 515.7769f, 351.20242f, 139.9068f}, @@ -631,8 +638,11 @@ u32 *reflection_strip_pair1_colour_tables[2] __asm__("D_L17_00162480") = { s32 reflection_strip1_vertex_counts[1] __asm__("D_L17_00162490") = {46}; -extern float D_L17_001E0840[]; -float *reflection_strip1_unused_pair_tables[1] __asm__("D_L17_001624B8") = {D_L17_001E0840}; +extern float + reflection_strip1_unused_pairs[92] __asm__("D_L17_001E0840"); /* 46 points x 2 floats */ + +float *reflection_strip1_unused_pair_tables[1] __asm__("D_L17_001624B8") = { + reflection_strip1_unused_pairs}; f32 reflection_strip1_positions[46][3] __asm__("D_L17_001E0610") = { {351.31015f, 302.03717f, 180.51582f}, @@ -750,11 +760,12 @@ u32 *reflection_strip1_colour_tables[1] __asm__("D_L17_001624C8") = {reflection_ s32 reflection_strip_pair2_vertex_counts[2] __asm__("D_L17_001624D0") = {119, 77}; -extern float D_L17_001E1AA0[]; -extern float D_L17_001E1E60[]; +extern float reflection_strip_pair2_unused_pairs_0[238] __asm__("D_L17_001E1AA0"); /* 119 points x 2 floats */ +extern float + reflection_strip_pair2_unused_pairs_1[154] __asm__("D_L17_001E1E60"); /* 77 points x 2 floats */ -float *reflection_strip_pair2_unused_pair_tables[2] __asm__("D_L17_001624E0") = {D_L17_001E1AA0, - D_L17_001E1E60}; +float *reflection_strip_pair2_unused_pair_tables[2] __asm__("D_L17_001624E0") = { + reflection_strip_pair2_unused_pairs_0, reflection_strip_pair2_unused_pairs_1}; f32 reflection_strip_pair2_positions_0[119][3] __asm__("D_L17_001E1160") = { { 333.5018f, 536.7269f, 156.07521f}, @@ -1200,8 +1211,11 @@ u32 *reflection_strip_pair2_colour_tables[2] __asm__("D_L17_001624F0") = { s32 reflection_strip2_vertex_counts[1] __asm__("D_L17_00162500") = {66}; -extern float D_L17_001E34F0[]; -float *reflection_strip2_unused_pair_tables[1] __asm__("D_L17_00162528") = {D_L17_001E34F0}; +extern float + reflection_strip2_unused_pairs[132] __asm__("D_L17_001E34F0"); /* 66 points x 2 floats */ + +float *reflection_strip2_unused_pair_tables[1] __asm__("D_L17_00162528") = { + reflection_strip2_unused_pairs}; f32 reflection_strip2_positions[66][3] __asm__("D_L17_001E31D0") = { { 554.8556f, 441.49615f, 147.95636f}, @@ -1359,3 +1373,123 @@ u32 reflection_strip2_colours[66] __asm__("D_L17_001E3A18") = { 0x7f7f7f7f, 0x7f7f7f7f}; u32 *reflection_strip2_colour_tables[1] __asm__("D_L17_00162538") = {reflection_strip2_colours}; + +float reflection_strip_pair0_unused_pairs_0[52] __asm__("D_L17_001DE3C0") = { + 0.002547f, 0.0f, 0.0f, 0.999993f, 0.916672f, 0.0f, 0.925335f, 1.0f, + 0.949743f, 0.0f, 0.959294f, 1.0f, 0.949639f, 0.0f, 0.959239f, 0.999999f, + 0.915533f, 0.0f, 0.925256f, 0.999997f, 0.910503f, 0.0f, 0.921981f, 1.0f, + 0.897339f, 0.0f, 0.910764f, 1.0f, 0.897221f, 0.0f, 0.913595f, 0.999999f, + 0.910344f, 0.0f, 0.928366f, 0.999997f, 0.913635f, 0.0f, 0.932138f, 0.999993f, + 0.94699f, 0.0f, 0.963856f, 0.999989f, 0.013715f, 1.0f, 0.0f, 0.0f, + 0.913853f, 0.0f, 0.924482f, 1.0f, +}; + +float reflection_strip_pair0_unused_pairs_1[52] __asm__("D_L17_001DE490") = { + 0.016217f, 0.0f, 0.0f, 0.99998f, 0.947737f, 0.0f, 0.992272f, 1.0f, 0.966256f, + 0.0f, 1.0f, 0.972631f, 0.980575f, 0.0f, 1.0f, 0.972348f, 0.984832f, 0.0f, + 0.993187f, 1.0f, 1.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 0.0f, + -1.0f, 1.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, + 1.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, + 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, +}; + +float reflection_strip0_unused_pairs[132] __asm__("D_L17_001DF070") = { + 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, + 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, + 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, + 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, + 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, + 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, + 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, +}; + +float reflection_strip_pair1_unused_pairs_0[28] __asm__("D_L17_001DFD70") = { + 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, +}; + +float reflection_strip_pair1_unused_pairs_1[56] __asm__("D_L17_001DFDE0") = { + 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, + 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, +}; + +float reflection_strip1_unused_pairs[92] __asm__("D_L17_001E0840") = { + 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, +}; + +float reflection_strip_pair2_unused_pairs_0[238] __asm__("D_L17_001E1AA0") = { + 0.0f, -1.0f, 0.0f, -0.5f, 0.5f, -1.0f, 0.5f, -0.5f, + 1.0f, -1.0f, 1.0f, -0.5f, 0.5f, 1.0f, 0.498316f, 0.51742f, + 0.0f, 1.0f, 0.0f, 0.5f, 0.5f, 1.0f, 0.494591f, 0.523361f, + 0.0f, 1.0f, 0.0f, 0.5f, 0.5f, 1.0f, 0.492487f, 0.525705f, + 0.0f, 1.0f, 0.0f, 0.5f, 0.5f, 1.0f, 0.49332f, 0.521308f, + 0.0f, 1.0f, 0.0f, 0.5f, 0.5f, 1.0f, 0.495799f, 0.518415f, + 0.0f, 1.0f, 0.0f, 0.5f, 1.0f, 0.5f, 0.50976f, 0.499113f, + 1.0f, 1.0f, 0.5f, 1.0f, 1.0f, 0.5f, 0.510561f, 0.50094f, + 1.0f, 1.0f, 0.5f, 1.0f, 0.5f, 1.0f, 0.495875f, 0.518409f, + 1.0f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 0.493397f, 0.521295f, + 1.0f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 0.492567f, 0.52568f, + 1.0f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 0.494643f, 0.523334f, + 1.0f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 0.495478f, 0.532581f, + 1.0f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 0.505084f, 0.542154f, + 1.0f, 1.0f, 0.505084f, 0.542154f, 1.0f, 0.5f, 0.505084f, 0.542154f, + 1.0f, 0.0f, 0.505084f, 0.542154f, 0.5f, 0.0f, 0.0f, 0.5f, + 0.0f, 0.0f, 0.495478f, 0.532581f, 0.5f, 0.0f, 0.0f, 0.5f, + 0.0f, 0.0f, 0.494643f, 0.523334f, 0.5f, 0.0f, 0.0f, 0.5f, + 0.0f, 0.0f, 0.492567f, 0.52568f, 0.5f, 0.0f, 0.0f, 0.5f, + 0.0f, 0.0f, 0.493397f, 0.521295f, 0.5f, 0.0f, 0.0f, 0.5f, + 0.0f, 0.0f, 0.495875f, 0.518409f, 0.5f, 0.0f, 0.0f, 0.5f, + 0.0f, 0.0f, 0.5f, 1.0f, 0.0f, 0.5f, 0.510561f, 0.50094f, + 0.0f, 0.0f, 0.5f, 0.0f, 0.0f, 0.5f, 0.50976f, 0.499113f, + 0.0f, 0.5f, 0.5f, 0.0f, 0.0f, 0.0f, 0.495799f, 0.518415f, + 0.5f, 0.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.49332f, 0.521308f, + 0.5f, 0.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.492487f, 0.525705f, + 0.5f, 0.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.494591f, 0.523361f, + 0.5f, 0.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.498316f, 0.51742f, + 0.5f, 0.0f, 1.0f, 0.5f, 1.0f, 0.0f, 0.5f, -0.5f, + 0.5f, 0.0f, 0.0f, -0.5f, 0.0f, 0.0f, +}; + +float reflection_strip_pair2_unused_pairs_1[154] __asm__("D_L17_001E1E60") = { + 1.0f, -0.856595f, 1.0f, -0.713189f, 0.750592f, -0.863672f, 0.75f, -0.721642f, + 0.5f, -0.865047f, 0.5f, -0.730094f, 0.252355f, -0.867085f, 0.25f, -0.729716f, + 0.0f, -0.864669f, 0.25f, -0.729716f, 0.0f, -0.729338f, 0.247301f, -0.616709f, + 0.0f, -0.614669f, 0.25f, -0.5f, 0.0f, -0.5f, 0.250051f, -0.379046f, + 0.0f, -0.375f, 0.25f, -0.25f, 0.0f, -0.25f, 0.250135f, -0.128908f, + 0.0f, -0.125f, 0.250135f, -0.128908f, 0.0f, 0.0f, 0.250135f, -0.128908f, + 0.25f, 0.0f, 0.5f, -0.125f, 0.5f, 0.0f, 0.749854f, -0.128628f, + 0.75f, 0.0f, 0.749854f, -0.128628f, 1.0f, 0.0f, 0.749854f, -0.128628f, + 1.0f, -0.125f, 0.75f, -0.25f, 1.0f, -0.25f, 0.749936f, -0.378782f, + 1.0f, -0.375f, 0.75f, -0.5f, 1.0f, -0.5f, 0.749352f, -0.6128f, + 1.0f, -0.606595f, 0.749352f, -0.6128f, 1.0f, -0.713189f, 0.749352f, -0.6128f, + 0.75f, -0.721642f, 0.5f, -0.615047f, 0.5f, -0.730094f, 0.5f, -0.615047f, + 0.25f, -0.729716f, 0.5f, -0.615047f, 0.247301f, -0.616709f, 0.5f, -0.615047f, + 0.25f, -0.5f, 0.5f, -0.615047f, 0.5f, -0.5f, 0.749352f, -0.6128f, + 0.5f, -0.5f, 0.75f, -0.5f, 0.5f, -0.5f, 0.749936f, -0.378782f, + 0.5f, -0.5f, 0.5f, -0.375f, 0.25f, -0.5f, 0.5f, -0.375f, + 0.250051f, -0.379046f, 0.5f, -0.25f, 0.25f, -0.25f, 0.5f, -0.25f, + 0.250135f, -0.128908f, 0.5f, -0.25f, 0.5f, -0.125f, 0.5f, -0.25f, + 0.749854f, -0.128628f, 0.5f, -0.25f, 0.75f, -0.25f, 0.5f, -0.375f, + 0.749936f, -0.378782f, +}; + +float reflection_strip2_unused_pairs[132] __asm__("D_L17_001E34F0") = { + 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, + 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, + 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, + 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, + 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, + 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, + 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, + 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, +}; From 77baf2c96051f81214b7b7d6f2862e0442df7bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:49:44 +0000 Subject: [PATCH 138/213] decomp: name the follow camera leash, pitch and pull-back fields and the hoverboard camera springs --- include/rnc/camera/follow_cam.h | 54 +++++----- include/rnc/mobys/moby.h | 4 +- include/rnc/overlay/shared/camera/camera.h | 6 +- src/camera/backup_current_cam.c | 4 +- src/camera/camera_activation_check_priority.c | 35 ++++--- src/check/follow_cam_layout_check.c | 8 +- .../shared/camera/aim_volume_camera.c | 36 +++---- .../shared/camera/follow_camera_setup.c | 5 +- src/overlays/shared/camera/grindrail_camera.c | 13 +-- .../shared/camera/hoverboard_camera.c | 98 +++++++++++-------- .../shared/camera/moby_controlled_camera.c | 3 +- .../set_nonzero_follow_camera_parameters.c | 5 +- .../shared/camera/swing_volume_camera.c | 24 ++--- 13 files changed, 161 insertions(+), 134 deletions(-) diff --git a/include/rnc/camera/follow_cam.h b/include/rnc/camera/follow_cam.h index 3618fc185c..d3ab12903d 100644 --- a/include/rnc/camera/follow_cam.h +++ b/include/rnc/camera/follow_cam.h @@ -39,8 +39,8 @@ typedef struct { /* 0x1A8: FUN_L00_002e8680 and the shot cameras reach `flags` through it. */ typedef struct { - u8 pad1A8[8]; - f32 unk1B0; /* 0x1B0: aim cameras start only while it is (nearly) 0 */ + u8 pad1A8[8]; + f32 pitch_input; /* 0x1B0: normalised stick pitch; aim cameras start only while it is (nearly) 0 */ u8 pad1B4[4]; s32 flags; /* 0x1B8: bits 0 and 1 set by the shot cameras and FUN_L00_002e8680 */ } FollowCamFlags; @@ -54,43 +54,43 @@ typedef struct { } FollowCamSnap; typedef struct { - f32 eye_offset[4]; /* 0x130: eye offset; its length is the eye distance */ - f32 saved_eye_offset[4]; /* 0x140: copy of eye_offset */ - u8 pad150[0xC]; - f32 eye_distance; /* 0x15C: eye distance, set with eye_offset by the shot cameras */ - f32 distance; /* 0x160: distance of the eye behind the hero */ - f32 unk164; /* 0x164: aim cameras start only while it is (nearly) 0 */ - u8 pad168[0x40]; + f32 eye_offset[4]; /* 0x130: eye offset; its length is the eye distance */ + f32 saved_eye_offset[4]; /* 0x140: copy of eye_offset */ + u8 pad150[0xC]; + f32 eye_distance; /* 0x15C: eye distance, set with eye_offset by the shot cameras */ + f32 distance; /* 0x160: distance of the eye behind the hero */ + f32 yaw_step; /* 0x164: yaw step this frame; aim cameras start only while it is (nearly) 0 */ + u8 pad168[0x40]; FollowCamFlags ctl; /* 0x1A8 */ u8 pad1BC[0x10]; - f32 unk1CC; /* 0x1CC: set by FUN_L00_002e8540 */ - FollowCamSnap snap; /* 0x1D0 */ - f32 zoom_scale; /* 0x20C */ - f32 zoom; /* 0x210: 1.0 is no zoom */ - f32 zoom_range; /* 0x214 */ + f32 script_pitch; /* 0x1CC: scripted pitch in radians, set by FUN_L00_002e8540 */ + FollowCamSnap snap; /* 0x1D0 */ + f32 zoom_scale; /* 0x20C */ + f32 zoom; /* 0x210: 1.0 is no zoom */ + f32 zoom_range; /* 0x214 */ u8 pad218[0xE]; - s16 unk226; /* 0x226: set to 1 by FUN_L00_002e8620 */ - u8 pad228[4]; - f32 unk22C; /* 0x22C: set by FUN_L00_002e8490 */ - s32 mode; /* 0x230: 0 normal; shot cameras of type 10 and 11 set 0x14D and 2 */ + s16 run_toward_lock; /* 0x226: 1 (FUN_L00_002e8620) keeps the camera from pulling back while the hero runs toward it */ + u8 pad228[4]; + f32 pull_back_max; /* 0x22C: farthest pull-back while the hero runs toward the camera (6.0), set by FUN_L00_002e8490 */ + s32 mode; /* 0x230: 0 normal; shot cameras of type 10 and 11 set 0x14D and 2 */ } FollowCamTail; /* 0x20..0x3B: eased values reset when a shot camera snaps. */ typedef struct { u8 pad20[2]; - s16 unk22; /* 0x22 */ - f32 look_height; /* 0x24: copy of follow.look_height */ - f32 distance; /* 0x28: copy of tail.distance */ - f32 unk2C; /* 0x2C */ - f32 unk30; /* 0x30 */ - f32 unk34; /* 0x34 */ - f32 unk38; /* 0x38 */ + s16 unk22; /* 0x22 */ + f32 look_height; /* 0x24: copy of follow.look_height */ + f32 distance; /* 0x28: copy of tail.distance */ + f32 look_height_vel; /* 0x2C: cam_interp_values step of look_height */ + f32 distance_vel; /* 0x30: cam_interp_values step of distance */ + f32 pitch_bias; /* 0x34: springed pitch bias while the camera is low */ + f32 pitch_bias_vel; /* 0x38 */ u8 pad3C[4]; } FollowCamReset; typedef struct FollowCamState { - f32 position[4]; /* 0x00: the record's position when a shot camera snaps */ - s16 unk10; /* 0x10: set by set_follow_camera_orbit_clamp_mode */ + f32 position[4]; /* 0x00: the record's position when a shot camera snaps */ + s16 leash; /* 0x10: nonzero lets the camera trail the hero on a leash; set by set_follow_camera_orbit_clamp_mode */ u8 pad12[0xE]; FollowCamReset reset; /* 0x20 */ FollowCamBlock follow; /* 0x40 */ diff --git a/include/rnc/mobys/moby.h b/include/rnc/mobys/moby.h index 9644be8fa3..ffa1ff133d 100644 --- a/include/rnc/mobys/moby.h +++ b/include/rnc/mobys/moby.h @@ -72,9 +72,7 @@ struct Moby { u8 sound_slot; /* 0x7D: D_0013E550 slot of its looping sound, 0xFF: none (advance_hero_animation) */ u8 anim_trigger_count; u8 shadow_range; /* shadow range in units of 1024; 0x17 from seeker_update near D_L09_00166F40 */ - u8 pad80[6]; - s16 unk86; - u8 pad88[8]; + u8 pad80[0x10]; s32 glow_color; /* glow colour (class header + 0x40) */ u32 collision; /* collision data, from the class header (MobyClass.collision) */ s32 collision_disable; /* per-primitive collision disable bits; 1 while a carrier holds the moby (glove_of_doom_update) */ diff --git a/include/rnc/overlay/shared/camera/camera.h b/include/rnc/overlay/shared/camera/camera.h index 9cb2dac366..82c28f890d 100644 --- a/include/rnc/overlay/shared/camera/camera.h +++ b/include/rnc/overlay/shared/camera/camera.h @@ -4,12 +4,12 @@ #include "types.h" /* What D_L00_00166E04 points to: the hero-aligned camera crosses the hero's - up axis with its first vector, and the follow camera setup tests unk86 - against 7. */ + up axis with its first vector, and the follow camera setup tests its camera_class + (UpdateCam.camera_class) against 7, the Swingshot camera. */ typedef struct { f32 axis[4]; u8 pad10[0x76]; - s16 unk86; + s16 camera_class; /* 0x86: UpdateCam.camera_class */ } FollowCamSideRef; #endif /* LOMBYTE_RNC_OVERLAY_SHARED_CAMERA_CAMERA_H */ diff --git a/src/camera/backup_current_cam.c b/src/camera/backup_current_cam.c index 22f5a3457d..c42a48b63b 100644 --- a/src/camera/backup_current_cam.c +++ b/src/camera/backup_current_cam.c @@ -3,7 +3,7 @@ struct CameraBackupState { u8 pad_0[0x70]; - s32 unk70; + s32 saved_state; /* 0x70: UpdateCam.saved_state */ }; extern u32 cur_cam[] __asm__("D_001870C0"); @@ -14,7 +14,7 @@ void backup_current_cam(void) __asm__("FUN_001ebc90") void backup_current_cam(void) { fast_mem_copy(&backup_cam, cur_cam[0], 0xA0); fast_mem_copy(&camera_saved_states[2], &camera_saved_states[0], 0x280); - backup_cam.unk70 = (s32)&camera_saved_states[2]; + backup_cam.saved_state = (s32)&camera_saved_states[2]; } struct CameraSavedState camera_saved_states[3] = {0}; diff --git a/src/camera/camera_activation_check_priority.c b/src/camera/camera_activation_check_priority.c index 95e723da3b..904b5bf418 100644 --- a/src/camera/camera_activation_check_priority.c +++ b/src/camera/camera_activation_check_priority.c @@ -6,12 +6,21 @@ #include "rnc/rendering/clip_volume.h" #include "rnc/camera/update_cam.h" +/* A 0x20-byte row of the level's camera record table: the record's + pvars (pvar +0x0C: the clip volume of its activation, +0x24: the spline + row of its rail) sit at +0x1C. */ typedef struct { - char unk_00[0x10]; - int unk10; - char unk14[8]; - int unk1C; -} CamRec20; + char pad00[0x1C]; + int pvars; +} CameraRecordRow; + +/* A 0x20-byte row of the level's spline table (LevelSpline): path is what + hero.rail_spline holds while the hero grinds that rail. */ +typedef struct { + char pad00[0x10]; + int path; + char pad14[0xC]; +} CameraSplineRow; /* UpdateCam from its activation rule on, as this check reads it: the rule as a word, then the priority (UpdateCam.active) and the handoff byte. */ @@ -22,8 +31,8 @@ struct CameraActivation { u8 handoff_ready; /* UpdateCam 0x7D */ }; -extern CamRec20 *D_0015EF90 MACRO_ADDR; -extern CamRec20 *D_0015EF40 MACRO_ADDR; +extern CameraRecordRow *D_0015EF90 MACRO_ADDR; +extern CameraSplineRow *D_0015EF40 MACRO_ADDR; /* Each case ends in `if (x) return 1;` falling out to the one shared `return 0;`, which is what lets cross-jumping and reorg give retail's @@ -75,7 +84,7 @@ int camera_activation_check_priority(struct UpdateCam *candidate, struct UpdateC } break; case CAMERA_ACTIVATION_IN_CLIP_VOLUME: { - char *camera_descriptor_bytes = (char *)D_0015EF90[candidate->descriptor_index].unk1C; + char *camera_descriptor_bytes = (char *)D_0015EF90[candidate->descriptor_index].pvars; if (current != 0 && current->transition_state == CAMERA_TRANSITION_PRIORITY_GATED && !(activation->priority > current->active)) { @@ -101,12 +110,12 @@ int camera_activation_check_priority(struct UpdateCam *candidate, struct UpdateC return 1; } { - CamRec20 *candidate_descriptor_entry = &D_0015EF90[candidate->descriptor_index]; - int secondary_descriptor_index = - *(int *)((char *)candidate_descriptor_entry->unk1C + 0x24); + CameraRecordRow *candidate_descriptor_entry = &D_0015EF90[candidate->descriptor_index]; + int secondary_descriptor_index = + *(int *)((char *)candidate_descriptor_entry->pvars + 0x24); if (secondary_descriptor_index < 0 || - (hero_state->rail_spline == D_0015EF40[secondary_descriptor_index].unk10 && + (hero_state->rail_spline == D_0015EF40[secondary_descriptor_index].path && hero_state->rail_off_frames == 0)) { return 1; } @@ -121,4 +130,4 @@ extern __typeof__(camera_activation_check_priority) func_001EC210 __attribute__((alias("FUN_001ec210"))); /* Defined below their only users, so retail reaches them with lui. */ -CamRec20 *D_0015EF40 MACRO_ADDR = 0; +CameraSplineRow *D_0015EF40 MACRO_ADDR = 0; diff --git a/src/check/follow_cam_layout_check.c b/src/check/follow_cam_layout_check.c index 2a0dcc451e..e8142bb56f 100644 --- a/src/check/follow_cam_layout_check.c +++ b/src/check/follow_cam_layout_check.c @@ -9,7 +9,7 @@ OFFSET_CHECK(reset, FollowCamState, reset, 0x20); OFFSET_CHECK(reset_distance, FollowCamState, reset.distance, 0x28); -OFFSET_CHECK(reset_unk38, FollowCamState, reset.unk38, 0x38); +OFFSET_CHECK(reset_pitch_bias_vel, FollowCamState, reset.pitch_bias_vel, 0x38); OFFSET_CHECK(follow, FollowCamState, follow, 0x40); OFFSET_CHECK(snap_look_target, FollowCamState, follow.snap_look_target, 0xD0); OFFSET_CHECK(look_height, FollowCamState, follow.look_height, 0xF0); @@ -20,12 +20,12 @@ OFFSET_CHECK(eye_distance, FollowCamState, tail.eye_distance, 0x15C); OFFSET_CHECK(distance, FollowCamState, tail.distance, 0x160); OFFSET_CHECK(ctl, FollowCamState, tail.ctl, 0x1A8); OFFSET_CHECK(flags, FollowCamState, tail.ctl.flags, 0x1B8); -OFFSET_CHECK(unk1CC, FollowCamState, tail.unk1CC, 0x1CC); +OFFSET_CHECK(script_pitch, FollowCamState, tail.script_pitch, 0x1CC); OFFSET_CHECK(snap, FollowCamState, tail.snap, 0x1D0); OFFSET_CHECK(eye_distance_error, FollowCamState, tail.snap.eye_distance_error, 0x200); OFFSET_CHECK(zoom_scale, FollowCamState, tail.zoom_scale, 0x20C); OFFSET_CHECK(zoom_range, FollowCamState, tail.zoom_range, 0x214); -OFFSET_CHECK(unk226, FollowCamState, tail.unk226, 0x226); -OFFSET_CHECK(unk22C, FollowCamState, tail.unk22C, 0x22C); +OFFSET_CHECK(run_toward_lock, FollowCamState, tail.run_toward_lock, 0x226); +OFFSET_CHECK(pull_back_max, FollowCamState, tail.pull_back_max, 0x22C); OFFSET_CHECK(mode, FollowCamState, tail.mode, 0x230); SIZE_CHECK(follow_cam_state, FollowCamState, 0x234); diff --git a/src/overlays/shared/camera/aim_volume_camera.c b/src/overlays/shared/camera/aim_volume_camera.c index f5d3bee312..c252728a33 100644 --- a/src/overlays/shared/camera/aim_volume_camera.c +++ b/src/overlays/shared/camera/aim_volume_camera.c @@ -23,15 +23,15 @@ typedef struct { s32 clip_volume; /* 0x0C: is_point_inside_clip_volume id, -1 none */ s32 volume_25fa38; /* 0x10: FUN_L00_0025fa38 volume, -1 none */ u8 pad14[0xC]; - s32 timer; /* 0x20: frames since the camera started (capped at 200), 0 when off */ - s16 keep_unk10; /* 0x24: 0 clears FollowCamState.unk10 each frame */ - s16 done; /* 0x26: set when the camera ends */ - f32 unk28; /* 0x28: degrees, passed to FUN_L00_002e8540 */ - f32 angle; /* 0x2C: radians; with height and distance gives offset_scale */ + s32 timer; /* 0x20: frames since the camera started (capped at 200), 0 when off */ + s16 keep_leash; /* 0x24: 0 clears FollowCamState.leash each frame */ + s16 done; /* 0x26: set when the camera ends */ + f32 script_pitch; /* 0x28: degrees, FollowCamState.tail.script_pitch through FUN_L00_002e8540 */ + f32 angle; /* 0x2C: radians; with height and distance gives offset_scale */ u8 pad30[4]; - s32 need_still; /* 0x34: start only while tail.unk164 and tail.unk1B0 are (nearly) 0 */ - f32 distance; /* 0x38: horizontal distance from the hero to the position */ - f32 height; /* 0x3C: height of the hero below the position */ + s32 need_still; /* 0x34: start only while tail.yaw_step and tail.ctl.pitch_input are (nearly) 0 */ + f32 distance; /* 0x38: horizontal distance from the hero to the position */ + f32 height; /* 0x3C: height of the hero below the position */ f32 offset_scale; /* 0x40 */ s16 not_in_mode_1; /* 0x44: nonzero blocks the camera while D_001413F4 is 1 */ s16 only_in_mode_1; /* 0x46: nonzero allows it only while D_001413F4 is 1 */ @@ -61,9 +61,9 @@ s32 volume_camera_aim_active(struct UpdateCam *aim_camera_record) { if (params->not_in_mode_1 != 0 && D_001413F4 == 1) return 0; if (params->need_still != 0) { - if (0.01f < absolute_float(tail->unk164)) + if (0.01f < absolute_float(tail->yaw_step)) return 0; - if (0.01f < absolute_float(ctl->unk1B0)) + if (0.01f < absolute_float(ctl->pitch_input)) return 0; } if (params->clip_volume >= 0 && @@ -166,16 +166,16 @@ void volume_camera_aim(struct UpdateCam *aim_camera_record) { qcopy(state->position, rec_pos); qcopy(state->tail.snap.shot_pos, rec_pos); *(s32 *)&snap->eye_distance_error = 0; - *(s32 *)&reset->unk34 = 0; + *(s32 *)&reset->pitch_bias = 0; reset->look_height = follow->look_height; { - f32 zero = reset->unk34; + f32 zero = reset->pitch_bias; f32 distance = tail->distance; reset->distance = distance; reset->unk22 = 0; - reset->unk38 = zero; - reset->unk30 = zero; - reset->unk2C = zero; + reset->pitch_bias_vel = zero; + reset->distance_vel = zero; + reset->look_height_vel = zero; } } params->timer += 1; @@ -192,10 +192,10 @@ void volume_camera_aim(struct UpdateCam *aim_camera_record) { if (params->offset_scale != 0.0f) { follow_camera_set_offset_scale(0, params->offset_scale, 0.005f); } - if (params->unk28 != 0.0f) { - FUN_L00_002e8540(params->unk28 * 0.017453292f); + if (params->script_pitch != 0.0f) { + FUN_L00_002e8540(params->script_pitch * 0.017453292f); } - if (params->keep_unk10 == 0) { + if (params->keep_leash == 0) { set_follow_camera_orbit_clamp_mode(0); } } diff --git a/src/overlays/shared/camera/follow_camera_setup.c b/src/overlays/shared/camera/follow_camera_setup.c index 13b6e1375b..00c2957e12 100644 --- a/src/overlays/shared/camera/follow_camera_setup.c +++ b/src/overlays/shared/camera/follow_camera_setup.c @@ -1,5 +1,6 @@ /* Follow camera: setup, per-frame approach and overrides, pose rebuild, and the collision probes that keep it clear of the level. */ #include "types.h" +#include "rnc/camera/update_cam.h" #include "rnc/input/pad_state.h" #include "rnc/overlay/shared/camera/camera.h" #include "rnc/overlay/shared/world/level_globals.h" @@ -565,7 +566,7 @@ void reset_follow_camera_state_from_position(char *camera_moby) { char *orbit_state; char *target_position; - if (MOBY(camera_moby)->unk86 == 0) { + if (((struct UpdateCam *)camera_moby)->camera_class == 0) { camera_target_state = *(char **)(camera_moby + 0x70); camera_state = camera_target_state; orbit_state = camera_target_state + 0x130; @@ -884,7 +885,7 @@ void follow_camera_setup(Moby_2E8210 *camera_moby) { if (camera_moby->b7D == 2) { reset_follow_camera_state_from_position(camera_moby); qcopy(camera_moby->v40, camera_moby->v0); - if (D_L00_00166E04->unk86 == 7 && D_0013F450_2E8210.h30C == 0) { + if (D_L00_00166E04->camera_class == 7 && D_0013F450_2E8210.h30C == 0) { e->e.h0 = 0; } else { camera_height_state->h0 = scale_game_frames(D_L00_00161D24_gp); diff --git a/src/overlays/shared/camera/grindrail_camera.c b/src/overlays/shared/camera/grindrail_camera.c index 272fbb1893..529c5e0197 100644 --- a/src/overlays/shared/camera/grindrail_camera.c +++ b/src/overlays/shared/camera/grindrail_camera.c @@ -50,12 +50,13 @@ typedef struct { u8 pad44[0xC]; } CameraTrack; +/* The camera's place on its path (Data.c in the update). */ typedef struct { - s32 unk0; - s32 unk4; + s32 segment; /* 0x150 */ + s32 fraction; /* 0x154: f32 0 when reset */ s32 unk8; s32 unkC; - s32 unk10; + s32 hero_range_node; /* 0x160 */ } CameraBlend; typedef struct { @@ -170,11 +171,11 @@ void reset_camera_state_and_prepare_preset_paths(Camera *destination_camera) { track->unk38 = 0.2f; track->unk3C = 0; blend = &destination_camera->orbit->blend; - blend->unk0 = 0; - blend->unk4 = 0; + blend->segment = 0; + blend->fraction = 0; blend->unk8 = 0; blend->unkC = 0; - blend->unk10 = 1; + blend->hero_range_node = 1; if (preset->kind == CAMERA_PRESET_KIND_MAPPED_PATHS && preset->ready == 0) { track_path = ((CameraPath *)l01_paths[preset->track_path]); target_path = (CameraPath *)l01_splines[preset->target].path; diff --git a/src/overlays/shared/camera/hoverboard_camera.c b/src/overlays/shared/camera/hoverboard_camera.c index 31d2dba8ea..ae9b0b6bf7 100644 --- a/src/overlays/shared/camera/hoverboard_camera.c +++ b/src/overlays/shared/camera/hoverboard_camera.c @@ -143,7 +143,7 @@ typedef struct { u8 pad10[0x20]; Vec4 side; /* 0x30 */ s32 state; /* 0x40: 5 after a preset reset */ - s32 unk44; /* 0x44 */ + s32 hero_moby; /* 0x44: D_001413D0[0]; no hoverboard camera code reads it */ f32 max_angle; /* 0x48 */ f32 dist; /* 0x4C */ u8 pad50[8]; @@ -170,20 +170,20 @@ typedef struct { u8 pad14[0xC]; Vec4 accel; /* 0x20 */ u8 pad30[4]; - f32 unk34; /* 0x34 */ - f32 unk38; /* 0x38 */ - s32 unk3C; /* 0x3C */ - s32 unk40; /* 0x40 */ + f32 swing_stiffness; /* 0x34: cam_interp_values spring of swing */ + f32 swing_damping; /* 0x38 */ + s32 swing_max_step; /* 0x3C */ + s32 swing; /* 0x40: sideways offset of the look target, eased with the board's facing */ u8 pad44[0xC]; } CameraTrack; /* Orbit state the camera keeps while it circles the hero. */ typedef struct { - Vec4 axis; /* 0x00 */ - f32 unk10; /* 0x10: 0.01 unless the preset gives one (FUN_L05_003294c0) */ - f32 unk14; /* 0x14: 0.2 unless the preset gives one */ - s32 unk18; /* 0x18 */ - s16 mode; /* 0x1C: 0 waiting, 1 orbiting */ + Vec4 axis; /* 0x00 */ + f32 stiffness; /* 0x10: cam_interp_values spring of the position; 0.01 unless the preset gives one (FUN_L05_003294c0) */ + f32 damping; /* 0x14: 0.2 unless the preset gives one */ + s32 max_step; /* 0x18 */ + s16 mode; /* 0x1C: 0 waiting, 1 orbiting */ u8 pad1E[0x12]; CameraView view; /* 0x30 */ CameraFocus focus; /* 0x80 */ @@ -223,16 +223,16 @@ typedef struct { typedef struct { f32 unk0; /* 0x00 */ u8 pad4[0x1C]; - f32 unk20; /* 0x20 */ - f32 unk24; /* 0x24 */ + f32 swing_stiffness; /* 0x20: CameraTrack.swing_stiffness */ + f32 swing_damping; /* 0x24 */ f32 spring_dist; /* 0x28 */ f32 spring_height; /* 0x2C */ f32 dist; /* 0x30 */ f32 airborne_spring_dist; /* 0x34 */ f32 airborne_spring_height; /* 0x38 */ f32 airborne_focus_dist; /* 0x3C */ - f32 unk40; /* 0x40 */ - f32 unk44; /* 0x44 */ + f32 position_stiffness; /* 0x40: CameraOrbit.stiffness (< 0: 0.01) */ + f32 position_damping; /* 0x44: CameraOrbit.damping (< 0: 0.2) */ f32 height_vel; /* 0x48: spring velocity of the camera height */ } CameraPreset; @@ -268,7 +268,7 @@ void reset_hero_follow_camera_from_preset(Camera *camera_to_reset) { clear_u64_value(&orbit_state->bias_vel); focus = &camera_to_reset->orbit->focus; focus->state = 5; - focus->unk44 = D_001413D0[0]; + focus->hero_moby = D_001413D0[0]; focus->dist = orbit_state->dist; focus->max_angle = 0.209439516f; focus->unk58 = 0.00174532924f; @@ -278,19 +278,19 @@ void reset_hero_follow_camera_from_preset(Camera *camera_to_reset) { spring->unk4 = 0.5f; spring->height = orbit_state->spring_height; orbit = camera_to_reset->orbit; - orbit->unk10 = 0.01f; - orbit->unk14 = 0.2f; - orbit->unk18 = 0; + orbit->stiffness = 0.01f; + orbit->damping = 0.2f; + orbit->max_step = 0; orbit->mode = CAMERA_ORBIT_MODE_FOLLOW; clear_u64_value(orbit); track = &camera_to_reset->orbit->track; clear_u64_value(track); clear_u64_value(&track->accel); - track->unk40 = 0; + track->swing = 0; track->unk10 = preset->unk0; - track->unk34 = preset->unk20; - track->unk38 = preset->unk24; - track->unk3C = 0; + track->swing_stiffness = preset->swing_stiffness; + track->swing_damping = preset->swing_damping; + track->swing_max_step = 0; view = &camera_to_reset->orbit->view; view->unk20 = 0.8f; view->unk24 = 0.3f; @@ -304,8 +304,8 @@ void reset_hero_follow_camera_from_preset(Camera *camera_to_reset) { preset->airborne_spring_dist, preset->airborne_spring_height, preset->airborne_focus_dist, - preset->unk40, - preset->unk44); + preset->position_stiffness, + preset->position_damping); build_hero_follow_camera_transform((char *)camera_to_reset); camera_to_reset->transition_state = 0; } @@ -430,13 +430,13 @@ typedef struct { char pad10[0x10]; float state[4]; char pad30[4]; - float k34, k38, k3C; - float blend; + float swing_stiffness, swing_damping, swing_max_step; + float swing; } Track; typedef struct { float vel[4]; - float k10, k14, k18; + float stiffness, damping, max_step; short mode; char pad1E[0x62]; Focus focus; @@ -521,12 +521,24 @@ void update_orbit_camera_position(Camera_32B1F8 *camera) { fast_vec_normalize(&offset, &focus_state->axis, spring->height); fast_vec_add(&goal, &camera_position_before_height, &offset); fast_vec_add(&goal, &goal, &orbit->bias); - camera->pos.x = cam_interp_values( - camera->pos.x, goal.x, &orbit->vel[0], orbit->k10, orbit->k14, orbit->k18); - camera->pos.y = cam_interp_values( - camera->pos.y, goal.y, &orbit->vel[1], orbit->k10, orbit->k14, orbit->k18); - camera->pos.z = cam_interp_values( - camera->pos.z, goal.z, &orbit->vel[2], orbit->k10, orbit->k14, orbit->k18); + camera->pos.x = cam_interp_values(camera->pos.x, + goal.x, + &orbit->vel[0], + orbit->stiffness, + orbit->damping, + orbit->max_step); + camera->pos.y = cam_interp_values(camera->pos.y, + goal.y, + &orbit->vel[1], + orbit->stiffness, + orbit->damping, + orbit->max_step); + camera->pos.z = cam_interp_values(camera->pos.z, + goal.z, + &orbit->vel[2], + orbit->stiffness, + orbit->damping, + orbit->max_step); vel = camera->vel; probe.x = vel[0]; probe.y = vel[1]; @@ -634,8 +646,12 @@ void update_orbit_camera_position(Camera_32B1F8 *camera) { fast_vec_cross(&camera->side, &camera->up, &rel); if (orbiting == 0 || absolute_float(along) < 0.5f || (vel = (float *)(D_0013E633_32B1F8 - 0x290), ((Hero *)vel)->trick_input != 0)) { - track->blend = - cam_interp_values(track->blend, 0.0f, track->state, track->k34, track->k38, track->k3C); + track->swing = cam_interp_values(track->swing, + 0.0f, + track->state, + track->swing_stiffness, + track->swing_damping, + track->swing_max_step); } else { float tilt; fast_vec_normalize(&probe, ((char *)((Hero *)vel)->moby) + 0xC0, 1.0f); @@ -643,15 +659,15 @@ void update_orbit_camera_position(Camera_32B1F8 *camera) { fast_vec_normalize(&step, &camera->side, tilt); fast_vec_sub(&probe, &probe, &step); tilt = fast_vec_dot(&probe, &camera->up); - track->blend = cam_interp_values(track->blend, + track->swing = cam_interp_values(track->swing, tilt * D_L05_001621A8_gp, track->state, - track->k34, - track->k38, - track->k3C); + track->swing_stiffness, + track->swing_damping, + track->swing_max_step); } - if (0.00001f < absolute_float(track->blend)) { - fast_vec_normalize(&probe, &camera->up, track->blend); + if (0.00001f < absolute_float(track->swing)) { + fast_vec_normalize(&probe, &camera->up, track->swing); fast_vec_add(&goal, &goal, &probe); } fast_vec_sub(&rel, &goal, &camera->pos); diff --git a/src/overlays/shared/camera/moby_controlled_camera.c b/src/overlays/shared/camera/moby_controlled_camera.c index ac08c719bd..ee5cf9be66 100644 --- a/src/overlays/shared/camera/moby_controlled_camera.c +++ b/src/overlays/shared/camera/moby_controlled_camera.c @@ -1,6 +1,7 @@ /* Camera type 18, the moby-controlled camera: takes over while the hero is inside its moby's volume, and the release a moby calls to hand it back for a frame. */ #include "types.h" +#include "rnc/camera/update_cam.h" #include "rnc/overlay/shared/camera/level_camera.h" #include "rnc/hero/hero.h" #include "rnc/math_consts.h" @@ -443,7 +444,7 @@ extern char *target_reference_table __asm__("D_L06_0015EF50"); void release_moby_camera_control(char *moby) __asm__("FUN_L06_00316330"); void release_moby_camera_control(char *moby) { - if (MOBY(moby)->unk86 == 0x12) { + if (((struct UpdateCam *)moby)->camera_class == 0x12) { *(int *)(*(char **)(target_reference_table + *(short *)(moby + 0x84) * 32 + 0x1C) + 0x50) = 1; } diff --git a/src/overlays/shared/camera/set_nonzero_follow_camera_parameters.c b/src/overlays/shared/camera/set_nonzero_follow_camera_parameters.c index 83fc4cacc8..a31737ec8f 100644 --- a/src/overlays/shared/camera/set_nonzero_follow_camera_parameters.c +++ b/src/overlays/shared/camera/set_nonzero_follow_camera_parameters.c @@ -1,6 +1,7 @@ /* Setters for the follow camera's control word, offsets and position triplets. */ #include "types.h" +#include "rnc/camera/update_cam.h" #include "rnc/camera/follow_cam.h" #include "rnc/mobys/moby.h" @@ -13,7 +14,7 @@ void set_follow_camera_control_word(int value) __asm__("FUN_L02_002f6570"); void set_follow_camera_control_word(int control_word) { char *moby = D_L02_00167400; - if (MOBY(moby)->unk86 == 0) { + if (((struct UpdateCam *)moby)->camera_class == 0) { char *follow_camera_data = *(char **)(moby + 0x70); *(int *)(follow_camera_data + 0x218) = control_word; } @@ -25,7 +26,7 @@ void set_nonzero_follow_camera_parameters(float x, float y, float z) __asm__("FU void set_nonzero_follow_camera_parameters(float x, float y, float z) { char *moby = D_L02_00167400_lui; - if (MOBY(moby)->unk86 == 0) { + if (((struct UpdateCam *)moby)->camera_class == 0) { char *follow_camera_parameter_base = *(char **)(moby + 0x70) + 0x1D0; if (*(float *)(follow_camera_parameter_base + 0x3C) != 0.0f) { *(float *)(follow_camera_parameter_base + 0x3C) = x; diff --git a/src/overlays/shared/camera/swing_volume_camera.c b/src/overlays/shared/camera/swing_volume_camera.c index b3dc8366b4..bb44000cb1 100644 --- a/src/overlays/shared/camera/swing_volume_camera.c +++ b/src/overlays/shared/camera/swing_volume_camera.c @@ -40,7 +40,7 @@ typedef struct { s16 type; /* 0x2C: 1..11, picks timing and easing */ s16 timer; /* 0x2E: frames since the camera started, 0 when off */ f32 offset_scale; /* 0x30: follow_camera_set_offset_scale; follow.look_height on a type 5 snap */ - s16 keep_unk10; /* 0x34: 0 clears FollowCamState.unk10 each frame */ + s16 keep_leash; /* 0x34: 0 clears FollowCamState.leash each frame */ s16 check_yaw; /* 0x36: nonzero ends the camera when D_L00_00166DD8 is 80 degrees or more off `yaw` */ f32 lateral_stiffness; /* 0x38: eased in over 120 frames from start_lateral_stiffness */ f32 lateral_damping; /* 0x3C: likewise from start_lateral_damping */ @@ -49,9 +49,9 @@ typedef struct { s16 l_buttons_end; /* 0x48: type 5 ends on L1 or L2; with `done` set it does not restart */ s16 done; /* 0x4A: set when the camera ends */ s32 clip_volume2; /* 0x4C: second clip volume, -1 none */ - f32 unk50; /* 0x50: degrees, passed to FUN_L00_002e8540 */ - s16 set_flag1; /* 0x54: sets tail.ctl.flags bit 1 each frame */ - s16 set_flag0; /* 0x56: sets tail.ctl.flags bit 0 each frame */ + f32 script_pitch; /* 0x50: degrees, FollowCamState.tail.script_pitch through FUN_L00_002e8540 */ + s16 set_flag1; /* 0x54: sets tail.ctl.flags bit 1 each frame */ + s16 set_flag0; /* 0x56: sets tail.ctl.flags bit 0 each frame */ } SwingCameraParams; extern void follow_camera_set_distance(int, float, float) __asm__("FUN_L00_002e8450"); @@ -232,15 +232,15 @@ void volume_camera_swing(struct UpdateCam *swing_camera_record) { qcopy(state->position, pos); qcopy(state->tail.snap.shot_pos, pos); snap->eye_distance_error = tail->eye_distance - fast_vec_length(tail->eye_offset); - *(s32 *)&reset->unk34 = 0; + *(s32 *)&reset->pitch_bias = 0; reset->look_height = follow->look_height; { - f32 zero = reset->unk34; + f32 zero = reset->pitch_bias; f32 distance = tail->distance; reset->distance = distance; - reset->unk38 = zero; - reset->unk30 = zero; - reset->unk2C = zero; + reset->pitch_bias_vel = zero; + reset->distance_vel = zero; + reset->look_height_vel = zero; } } at_end = 0; @@ -334,8 +334,8 @@ void volume_camera_swing(struct UpdateCam *swing_camera_record) { follow_camera_set_offset_scale(0, params->offset_scale, 0.005f); } } - if (params->unk50 != 0.0f) { - FUN_L00_002e8540(params->unk50 * 0.017453292f); + if (params->script_pitch != 0.0f) { + FUN_L00_002e8540(params->script_pitch * 0.017453292f); } if (params->set_flag1 != 0) { { @@ -349,7 +349,7 @@ void volume_camera_swing(struct UpdateCam *swing_camera_record) { ctl->flags |= 1; } } - if (params->keep_unk10 == 0) { + if (params->keep_leash == 0) { set_follow_camera_orbit_clamp_mode(0); } if (params->lateral_stiffness != 0.0f || params->lateral_damping != 0.0f) { From c9d2f443a0ad3b512868dfebd81ffa2c35e9f7f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:51:38 +0000 Subject: [PATCH 139/213] decomp: name the level camera tracking block and camera moby and the follow camera probe and pull-back fields --- .../rnc/overlay/shared/camera/level_camera.h | 12 +++--- .../shared/camera/follow_camera_setup.c | 40 +++++++++---------- .../shared/camera/hero_aligned_camera.c | 6 +-- .../shared/camera/init_camera_system.c | 16 ++++---- 4 files changed, 38 insertions(+), 36 deletions(-) diff --git a/include/rnc/overlay/shared/camera/level_camera.h b/include/rnc/overlay/shared/camera/level_camera.h index ab13d4dd4a..eadd7af172 100644 --- a/include/rnc/overlay/shared/camera/level_camera.h +++ b/include/rnc/overlay/shared/camera/level_camera.h @@ -30,11 +30,13 @@ typedef struct LevelCamera { struct UpdateCam *current_camera; /* 0x180: the record the view follows */ struct UpdateCam *previous_camera; /* 0x184 */ u8 pad188[0x8]; - u8 unk190[0x30]; - f32 unk1C0[4]; /* 0x1C0 */ - u8 unk1D0[0x84]; - s32 unk254; /* 0x254 */ - u8 pad258[0x4]; + u8 smoothed_hero + [0x30]; /* 0x190: hero position with its z springed, +0x10 the spring step, +0x20 the smoothed up */ + f32 gravity_up[4]; /* 0x1C0: minus the hero's gravity direction */ + u8 tracking + [0x84]; /* 0x1D0: previous gravity_up, +0x10 up spring steps, +0x20 previous hero position */ + s32 camera_moby; /* 0x254: moby handle_camera_collision_with_hero spawns while the follow camera is current */ + u8 pad258[0x4]; struct Moby * focus_moby; /* 0x25C: a moby that takes the camera's attention (blarg helicopter); 0: none */ s32 focus_time; /* 0x260: reset to 0 when focus_moby is set */ diff --git a/src/overlays/shared/camera/follow_camera_setup.c b/src/overlays/shared/camera/follow_camera_setup.c index 00c2957e12..0c7546abe2 100644 --- a/src/overlays/shared/camera/follow_camera_setup.c +++ b/src/overlays/shared/camera/follow_camera_setup.c @@ -42,7 +42,7 @@ typedef struct { char pad44[8]; int distance_target; /* 0x17C */ char pad50[8]; - float unk58; + float base_distance; /* 0x188 */ } CamOrbit; /* FollowCamBlock (rnc/camera/follow_cam.h), from saved state + 0x40 */ @@ -61,24 +61,24 @@ typedef struct { typedef struct { char pad0[0x10]; - short unk10; + short leash; /* 0x10: FollowCamState.leash */ char pad12[0x10]; short unk22; } Cam_2e5e38; typedef struct { char pad0[0x3C]; - float unk3C; - float unk40; - float unk44; - int unk48; + float probe_scale; /* 0x20C: collision probe sphere scale */ + float probe_count; /* 0x210 */ + float probe_step_growth; /* 0x214 */ + int probe_flags; /* 0x218 */ } CamSpring; typedef struct { char pad0[0x6]; - short unk6; + short run_toward_lock; /* 0x226: FollowCamState.tail.run_toward_lock */ char pad8[4]; - float unkC; + float pull_back_max; /* 0x22C: FollowCamState.tail.pull_back_max */ } CamEnd; float cam_interp_values(void *, float, float, float, float, float) __asm__("FUN_001ebd78"); @@ -156,10 +156,10 @@ void follow_camera_approach(unsigned char *moby) { ((CamOrbit *)orbit)->distance_override = 0; ((CamOrbit *)orbit)->eye_distance_target = 0; ((CamOrbit *)orbit)->distance_target = 0; - ((CamOrbit *)orbit)->unk58 = ((CamOrbit *)default_orbit)->eye_distance; + ((CamOrbit *)orbit)->base_distance = ((CamOrbit *)default_orbit)->eye_distance; ((CamTarget *)target)->target_height_override_pending = 0; ((CamTarget *)target)->look_height_target = 0; - (*(Cam_2e5e38 **)(moby + 0x70))->unk10 = 1; + (*(Cam_2e5e38 **)(moby + 0x70))->leash = 1; (*(Cam_2e5e38 **)(moby + 0x70))->unk22 = 0; ((CamTarget *)target)->lateral_stiffness = D_L00_00161CA0_gp; ((CamTarget *)target)->up_stiffness = D_L00_00161CA0_gp; @@ -167,13 +167,13 @@ void follow_camera_approach(unsigned char *moby) { ((CamTarget *)target)->up_damping = 0.2f; ((CamTarget *)target)->blending_in = 0; spring_reset = (CamSpring *)(*(unsigned char **)(moby + 0x70) + 0x1D0); - spring_reset->unk44 = l00_follow_camera_collision_probe_step_growth_factor; - spring_reset->unk3C = l00_follow_camera_collision_probe_scale; - spring_reset->unk40 = l00_follow_camera_collision_probe_count; - spring_reset->unk48 = D_L00_0015EF60_macro; + spring_reset->probe_step_growth = l00_follow_camera_collision_probe_step_growth_factor; + spring_reset->probe_scale = l00_follow_camera_collision_probe_scale; + spring_reset->probe_count = l00_follow_camera_collision_probe_count; + spring_reset->probe_flags = D_L00_0015EF60_macro; reset = *(unsigned char **)(moby + 0x70) + 0x220; - ((CamEnd *)reset)->unkC = D_L00_00161D1C_gp; - ((CamEnd *)reset)->unk6 = 0; + ((CamEnd *)reset)->pull_back_max = D_L00_00161D1C_gp; + ((CamEnd *)reset)->run_toward_lock = 0; } typedef struct { @@ -448,10 +448,10 @@ void rebuild_follow_camera_pose(int snap) __asm__("FUN_L00_002e66b8"); void rebuild_follow_camera_pose(int snap) { LevelCamera *cams = &l00_camera; char *camera_moby = ((char *)cams->current_camera); - char *track = &cams->unk190; /* the followed player: position at 0, up vector at 0x30 */ - char *follow_camera_state = *(char **)(camera_moby + 0x70); - char *orbit = follow_camera_state + 0x130; /* distance at 0x2C, height at 0x30 */ - char *target = + char *track = &cams->smoothed_hero; /* the followed player: position at 0, up vector at 0x30 */ + char *follow_camera_state = *(char **)(camera_moby + 0x70); + char *orbit = follow_camera_state + 0x130; /* distance at 0x2C, height at 0x30 */ + char *target = follow_camera_state + 0x40; /* point looked at; eye height at 0xB0, moby at 0xC0 */ float up[4], rise[4], look[4], eye[4]; int mask; diff --git a/src/overlays/shared/camera/hero_aligned_camera.c b/src/overlays/shared/camera/hero_aligned_camera.c index e83bd43458..af43acaba5 100644 --- a/src/overlays/shared/camera/hero_aligned_camera.c +++ b/src/overlays/shared/camera/hero_aligned_camera.c @@ -532,8 +532,8 @@ void initialize_hero_aligned_camera_mode(void) { camera_globals->transition_position_rate = 0.05f; camera_globals->transition_rotation_rate = 0.05f; FUN_L00_002e9ef0_v(); - if (camera_globals->unk254 != 0) - allocate_voice_for_target_entry(0, 0, camera_globals->unk254); + if (camera_globals->camera_moby != 0) + allocate_voice_for_target_entry(0, 0, camera_globals->camera_moby); } void select_camera_mode_by_hero_vector_alignment(A_2ea810 *camera_object) __asm__("FUN_L00_002ea810"); @@ -556,7 +556,7 @@ void select_camera_mode_by_hero_vector_alignment(A_2ea810 *camera_object) { Q.transition_rotation_rate = 0.018f; return; } - comparison_axis = Q.unk1C0; + comparison_axis = Q.gravity_up; dot_product_or_asin_result = FUN_001f9ab0_2ea810(comparison_axis, camera_object); FUN_001f9a68_2ea810(scaled_axis_scratch, comparison_axis, dot_product_or_asin_result); FUN_001f9a28_2ea810(camera_vector_residual, camera_object, scaled_axis_scratch); diff --git a/src/overlays/shared/camera/init_camera_system.c b/src/overlays/shared/camera/init_camera_system.c index 9a059b0851..3ce9eeeedc 100644 --- a/src/overlays/shared/camera/init_camera_system.c +++ b/src/overlays/shared/camera/init_camera_system.c @@ -77,7 +77,7 @@ typedef struct { #include "rnc/overlay/shared/camera/level_camera.h" -/* Sets h and clears b in the block l00_camera.unk180 points to. */ +/* Sets h and clears b in the block l00_camera.current_camera points to. */ void initialize_camera_record_handoff_defaults(void) __asm__("FUN_L00_001eb448"); void initialize_camera_record_handoff_defaults(void) { @@ -144,7 +144,7 @@ void init_camera_system(void) { camera_record_vector_destination[1] = camera_vector_snapshot[1]; camera_record_vector_destination[2] = camera_vector_snapshot[2]; vector_copy_source = (float *)(D_0013E533 + 0xE9D); - vector_copy_destination = (float *)(&camera_system_state->unk190); + vector_copy_destination = (float *)(&camera_system_state->smoothed_hero); vector_copy_destination[0] = vector_copy_source[0]; vector_copy_destination[1] = vector_copy_source[1]; vector_copy_destination[2] = vector_copy_source[2]; @@ -204,15 +204,15 @@ void setup_level_cameras(void) { } camera_system_state_alias = &l00_camera; hero_state = &hero; - q = &camera_system_state_alias->unk190; - normalized_hero_vector = &camera_system_state_alias->unk190[32]; + q = &camera_system_state_alias->smoothed_hero; + normalized_hero_vector = &camera_system_state_alias->smoothed_hero[32]; *(int *)&camera_system_state_alias->previous_camera = 0; camera_system_state_alias->transition_mode = 0; fast_vec_normalize(normalized_hero_vector, (char *)(((int)hero_state->moby) + 0xE0), 1.0f); - qcopy(&camera_system_state_alias->unk1C0, normalized_hero_vector); - qcopy(&camera_system_state_alias->unk1D0, normalized_hero_vector); - clear_u64_value(&camera_system_state_alias->unk1D0[16]); - qcopy(&camera_system_state_alias->unk1D0[32], &hero_state->motion.pos); + qcopy(&camera_system_state_alias->gravity_up, normalized_hero_vector); + qcopy(&camera_system_state_alias->tracking, normalized_hero_vector); + clear_u64_value(&camera_system_state_alias->tracking[16]); + qcopy(&camera_system_state_alias->tracking[32], &hero_state->motion.pos); { float hero_rotation_z = hero_state->motion.rot.f[2]; float hero_position_z = hero_state->motion.pos.f[2]; From 94e6e06a409497742ada652e6cc1a0c22fa361d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:53:27 +0000 Subject: [PATCH 140/213] decomp: name enemy target info, hit surface type and probe direction fields --- .../shared/enemies/blarg_trooper_projectile.c | 8 ++-- src/overlays/shared/enemies/bolt_thief_mine.c | 12 ++--- src/overlays/shared/enemies/gadgebot.c | 6 +-- src/overlays/shared/enemies/large_amoeboid.c | 44 +++++++++---------- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/overlays/shared/enemies/blarg_trooper_projectile.c b/src/overlays/shared/enemies/blarg_trooper_projectile.c index 4082604e38..87266eae7f 100644 --- a/src/overlays/shared/enemies/blarg_trooper_projectile.c +++ b/src/overlays/shared/enemies/blarg_trooper_projectile.c @@ -170,9 +170,9 @@ typedef struct { s32 mask; /* 0x14: collision classes */ u8 unk18; u8 unk19; - s16 oclass; /* 0x1A */ - f32 radius; /* 0x1C */ - s32 unk20; + s16 oclass; /* 0x1A */ + f32 radius; /* 0x1C */ + s32 has_direction; /* 0x20: 1 from make_hit_descriptor, which copies dir */ } CollisionProbe; extern f32 D_L04_00166F40[]; /* arena centre */ @@ -232,7 +232,7 @@ void blarg_trooper_projectile_update(struct Moby *moby) { pr.mask = 0x10001; pr.radius = 1.0f; } - pr.unk20 = 1; + pr.has_direction = 1; qcopy(&pr.dir, &v->dir); set_vector_length_xy(&pr.dir, &pr.dir, 1.0f); probe = ≺ diff --git a/src/overlays/shared/enemies/bolt_thief_mine.c b/src/overlays/shared/enemies/bolt_thief_mine.c index 26b1392ed4..d6cea15902 100644 --- a/src/overlays/shared/enemies/bolt_thief_mine.c +++ b/src/overlays/shared/enemies/bolt_thief_mine.c @@ -29,11 +29,11 @@ typedef struct { typedef struct { float damage; - s16 unk4; + s16 max_health; /* 0x04: the target info resolve_moby_hit_response takes (MobyTargetInfo) */ u8 pad6[0xA]; - float unk10; + float aim_height; u8 pad14[0x26]; - u8 unk3A; + u8 look_height; u8 unk3B; u8 pad3C[4]; } HitInfo; @@ -116,10 +116,10 @@ void bolt_thief_mine_update(struct Moby *moby) { } hit = find_moby_hit(moby, 0x230000, 0); fast_mem_zero16(&scratch.info, 0x40); - scratch.info.unk4 = 1; + scratch.info.max_health = 1; scratch.info.damage = 1.0f; - scratch.info.unk10 = 0.5f; - scratch.info.unk3A = 7; + scratch.info.aim_height = 0.5f; + scratch.info.look_height = 7; scratch.info.unk3B = 0xFF; resolve_moby_hit_response(moby, hit, &scratch.info, 0, &count, 0, 0, 4); if ((count >= 2 && hit != 0 && hit->moby->oclass != 0x283) || diff --git a/src/overlays/shared/enemies/gadgebot.c b/src/overlays/shared/enemies/gadgebot.c index 90c2a53c07..33cee82784 100644 --- a/src/overlays/shared/enemies/gadgebot.c +++ b/src/overlays/shared/enemies/gadgebot.c @@ -165,7 +165,7 @@ typedef struct { typedef struct { char p0[0x18]; GbMoby *moby; - int unk1C; + int surface_type; /* 0x1C: CollisionHit.surface_type */ char p20[0x10]; float position[4]; float normal_xy[2]; @@ -182,7 +182,7 @@ typedef int u128_c __attribute__((mode(TI))); typedef struct { char p0[0x18]; Moby *moby; - int unk1C; + int surface_type; /* 0x1C: CollisionHit.surface_type */ char p20[0x10]; float position[4]; float normal_xy[2]; @@ -1112,7 +1112,7 @@ void gadgebot_update(GbMoby *moby) { return; } } - if (D_L06_001745C0.moby != 0 && D_L06_001745C0.unk1C > 0) { + if (D_L06_001745C0.moby != 0 && D_L06_001745C0.surface_type > 0) { gadgebot_vars->collision_contact_moby = D_L06_001745C0.moby; } else { gadgebot_vars->collision_contact_moby = 0; diff --git a/src/overlays/shared/enemies/large_amoeboid.c b/src/overlays/shared/enemies/large_amoeboid.c index 53e163bdaa..d524a05a76 100644 --- a/src/overlays/shared/enemies/large_amoeboid.c +++ b/src/overlays/shared/enemies/large_amoeboid.c @@ -43,20 +43,20 @@ enum { }; typedef struct LargeAmoeboidVars { - u8 pad0[0x20]; - f32 health; - u8 pad24[0x5]; - s8 unk29; - u8 pad2A[0x6]; - f32 unk30; - u8 pad34[0x4]; - s32 hurt; /* 0x38: set when the moby is hit, cleared once handled */ - u8 pad3C[0x4]; - u8 move_displacement[0x18]; - s8 unk58; - u8 pad59[0x1]; - s8 unk5A; - u8 pad5B[0x5]; + u8 pad0[0x20]; + f32 health; + u8 pad24[0x5]; + s8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ + u8 pad2A[0x6]; + f32 aim_height; /* 0x30 */ + u8 pad34[0x4]; + s32 hurt; /* 0x38: set when the moby is hit, cleared once handled */ + u8 pad3C[0x4]; + u8 move_displacement[0x18]; + s8 look_range; /* 0x58 */ + u8 pad59[0x1]; + s8 look_height; /* 0x5A */ + u8 pad5B[0x5]; struct KnockbackMotion knockback; /* 0x60 */ u8 padC0[0x68]; u16 unk128; @@ -263,28 +263,28 @@ void large_amoeboid_update(unsigned char *moby) { qcopy(&large_amoeboid_vars->home_pos, &MOBY(moby)->pos); switch (MOBY(moby)->oclass) { case LARGE_AMOEBOID_LARGE_VARIANT: - large_amoeboid_vars->unk58 = truncate_float_to_s32(14.0f); - large_amoeboid_vars->unk5A = truncate_float_to_s32(10.4f); + large_amoeboid_vars->look_range = truncate_float_to_s32(14.0f); + large_amoeboid_vars->look_height = truncate_float_to_s32(10.4f); large_amoeboid_vars->size_scale = 1.0f; break; case LARGE_AMOEBOID_MEDIUM_VARIANT: - large_amoeboid_vars->unk58 = truncate_float_to_s32(14.0f); - large_amoeboid_vars->unk5A = truncate_float_to_s32(5.6f); + large_amoeboid_vars->look_range = truncate_float_to_s32(14.0f); + large_amoeboid_vars->look_height = truncate_float_to_s32(5.6f); large_amoeboid_vars->size_scale = 0.7f; break; case LARGE_AMOEBOID_SMALL_VARIANT: - large_amoeboid_vars->unk58 = truncate_float_to_s32(14.0f); - large_amoeboid_vars->unk5A = truncate_float_to_s32(4.0f); + large_amoeboid_vars->look_range = truncate_float_to_s32(14.0f); + large_amoeboid_vars->look_height = truncate_float_to_s32(4.0f); large_amoeboid_vars->size_scale = 0.49f; break; } - large_amoeboid_vars->unk30 = large_amoeboid_vars->size_scale; + large_amoeboid_vars->aim_height = large_amoeboid_vars->size_scale; large_amoeboid_vars->glow_cycle_phase = FUN_00213308(); if (MOBY(moby)->oclass == 0x362) large_amoeboid_vars->unk130 = &D_L01_00161A50; else large_amoeboid_vars->unk130 = &D_L01_00161A40; - large_amoeboid_vars->unk29 = 1; + large_amoeboid_vars->wrench_hit_sound = 1; if (large_amoeboid_vars->removal_height_table_index != 0) { large_amoeboid_vars->health = 1.0f; large_amoeboid_vars->starts_active = 1; From b77a9970ac477a1c171995c9b64bdf7cfc97e845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:54:39 +0000 Subject: [PATCH 141/213] decomp: name the target info look and wrench sound fields of level enemies --- src/overlays/l00/mobys/veldin_robot_enemy.c | 12 ++++++------ src/overlays/l06/mobys/alien_queen.c | 12 ++++++------ src/overlays/l13/mobys/hovering_rocket_attacker.c | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/overlays/l00/mobys/veldin_robot_enemy.c b/src/overlays/l00/mobys/veldin_robot_enemy.c index 99981ff595..4133406716 100644 --- a/src/overlays/l00/mobys/veldin_robot_enemy.c +++ b/src/overlays/l00/mobys/veldin_robot_enemy.c @@ -58,13 +58,13 @@ typedef struct { s16 max_health; s16 unk26; u8 hit_response_class; - u8 unk29; + u8 wrench_hit_sound; u8 pad2A[0x38 - 0x2A]; s32 retimer; u8 pad3C[0x58 - 0x3C]; - u8 unk58; + u8 look_range; u8 pad59; - u8 unk5A; + u8 look_height; u8 pad5B[0x60 - 0x5B]; u8 move[7]; u8 damage_secondary_red; @@ -199,12 +199,12 @@ void veldin_robot_enemy_update(ElectroidMoby *moby) { switch (moby->state) { case VELDIN_ROBOT_STATE_INITIALIZE: qcopy(&vars->spawnPos, &moby->pos); - vars->unk29 = 0; + vars->wrench_hit_sound = 0; vars->health = 2.0f; vars->hit_response_class = 1; vars->max_health = 2; - vars->unk58 = truncate_float_to_s32(14.0f); - vars->unk5A = truncate_float_to_s32(8.0f); + vars->look_range = truncate_float_to_s32(14.0f); + vars->look_height = truncate_float_to_s32(8.0f); vars->pathPt = 1; if (random_integer_below(2) != 0) { moby->flags |= 0x8000; diff --git a/src/overlays/l06/mobys/alien_queen.c b/src/overlays/l06/mobys/alien_queen.c index a86226d4b6..f6c3241985 100644 --- a/src/overlays/l06/mobys/alien_queen.c +++ b/src/overlays/l06/mobys/alien_queen.c @@ -362,15 +362,15 @@ typedef struct AlienQueenVars { s16 max_health; u8 pad_26[0x2]; u8 hit_response_class; - u8 unk29; + u8 wrench_hit_sound; u8 pad_2A[0x4]; u8 death_control_flags; u8 pad_2F[0x19]; f32 z_velocity; u8 pad_4C[0xC]; - u8 unk58; + u8 look_range; u8 pad_59[0x1]; - u8 unk5A; + u8 look_height; u8 pad_5B[0x5]; struct HitColorFlash hit_flash; u8 goal; /* target record (FUN_L00_0025ff38): target at +0x40 */ @@ -437,11 +437,11 @@ void alien_queen_update(unsigned char *moby) { int *path; alien_queen_update_vars->health = 30.0f; alien_queen_update_vars->max_health = 0x1E; - alien_queen_update_vars->unk29 = 1; + alien_queen_update_vars->wrench_hit_sound = 1; alien_queen_update_vars->hit_response_class = 3; alien_queen_update_vars->death_control_flags = 1; - alien_queen_update_vars->unk58 = truncate_float_to_s32(14.0f); - alien_queen_update_vars->unk5A = truncate_float_to_s32(18.4f); + alien_queen_update_vars->look_range = truncate_float_to_s32(14.0f); + alien_queen_update_vars->look_height = truncate_float_to_s32(18.4f); alien_queen_update_vars->timer_120 = scale_game_frames(0x4B0); alien_queen_update_vars->suppress_death_dialogue = 0; qcopy(alien_queen_update_vars->home_position, moby + 0x10); diff --git a/src/overlays/l13/mobys/hovering_rocket_attacker.c b/src/overlays/l13/mobys/hovering_rocket_attacker.c index 0d69990a97..734c282d08 100644 --- a/src/overlays/l13/mobys/hovering_rocket_attacker.c +++ b/src/overlays/l13/mobys/hovering_rocket_attacker.c @@ -82,9 +82,9 @@ typedef struct HoveringRocketAttackerVars { u8 pad_26[0x2]; u8 hit_response_class; u8 pad_29[0x2F]; - u8 unk58; + u8 look_range; u8 pad_59[0x1]; - u8 unk5A; + u8 look_height; u8 pad_5B[0x5]; struct HitColorFlash hit_flash; f32 path_search_point[4]; @@ -136,8 +136,8 @@ void hovering_rocket_attacker_update(unsigned char *moby) { moby_data->max_health = 4; moby_data->hit_response_class = 3; moby_data->rocket_max_travel_distance = 15.0f; - moby_data->unk58 = 50; - moby_data->unk5A = 0; + moby_data->look_range = 50; + moby_data->look_height = 0; MOBY(moby)->draw_dist = 255; MOBY(moby)->pos.z += 1.0f; if (MOBY(moby)->prev_seq != 0) From 17cf9d243304fc3f2231fc256ba6fcf1dfd637ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 17:55:36 +0000 Subject: [PATCH 142/213] decomp: name the hud bank stash handles and hud slot update, mode and item fields --- include/rnc/ui/hud/hud_state.h | 8 ++++---- src/ui/hud/banks/load_hud_banks.c | 8 ++++---- src/ui/hud/init_hud.c | 8 ++++---- src/ui/hud/update_hud.c | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/rnc/ui/hud/hud_state.h b/include/rnc/ui/hud/hud_state.h index b77ae75d4a..a255a5fec3 100644 --- a/include/rnc/ui/hud/hud_state.h +++ b/include/rnc/ui/hud/hud_state.h @@ -53,11 +53,11 @@ struct HudBank { s32 has60; s32 has64; u8 pad68[0x2C]; - s32 unk94; + s32 bank0_stash; /* 0x94: stash_send_data handle of chunk 1 (bank 0) */ s32 unk98; - s32 unk9C; - s32 unkA0; - s32 unkA4; + s32 bank2_stash; /* 0x9C: of chunk 3 */ + s32 bank3_stash; /* 0xA0: of chunk 4 */ + s32 bank4_stash; /* 0xA4: of chunk 5 */ }; struct HudState { diff --git a/src/ui/hud/banks/load_hud_banks.c b/src/ui/hud/banks/load_hud_banks.c index 92c46c3430..f29e9f4fe6 100644 --- a/src/ui/hud/banks/load_hud_banks.c +++ b/src/ui/hud/banks/load_hud_banks.c @@ -69,7 +69,7 @@ void load_hud_banks(void) { if (hud_bank->has54) { chunk_1_qword_count = ALIGN64(hud_file->chunk[1].size) >> 4; load_compressed_hud_bank(0, vram); - hb->header.bank->unk94 = + hb->header.bank->bank0_stash = stash_send_data((void *)(hud_file->chunk[1].offset + (s32)hud_file), chunk_1_qword_count, chunk_1_qword_count, @@ -84,7 +84,7 @@ void load_hud_banks(void) { } if (hb->header.bank->has5C) { u32 chunk_3_qword_count = ALIGN64(hud_file->chunk[3].size) >> 4; - hb->header.bank->unk9C = + hb->header.bank->bank2_stash = stash_send_data((void *)(hud_file->chunk[3].offset + (s32)hud_file), chunk_3_qword_count, chunk_3_qword_count, @@ -92,7 +92,7 @@ void load_hud_banks(void) { } if (hb->header.bank->has60) { u32 chunk_4_qword_count = ALIGN64(hud_file->chunk[4].size) >> 4; - hb->header.bank->unkA0 = + hb->header.bank->bank3_stash = stash_send_data((void *)(hud_file->chunk[4].offset + (s32)hud_file), chunk_4_qword_count, chunk_4_qword_count, @@ -100,7 +100,7 @@ void load_hud_banks(void) { } if (hb->header.bank->has64) { u32 chunk_5_qword_count = ALIGN64(hud_file->chunk[5].size) >> 4; - hb->header.bank->unkA4 = + hb->header.bank->bank4_stash = stash_send_data((void *)(hud_file->chunk[5].offset + (s32)hud_file), chunk_5_qword_count, chunk_5_qword_count, diff --git a/src/ui/hud/init_hud.c b/src/ui/hud/init_hud.c index 0cd3e62268..5812e42a23 100644 --- a/src/ui/hud/init_hud.c +++ b/src/ui/hud/init_hud.c @@ -9,9 +9,9 @@ struct Globals_0015FA00 { }; struct HudSlot { - s32 unk0; + s32 next_mode; /* 0x24 of the slot: queue_animation_update's next_mode */ u8 pad_4[0x3C]; - s32 unk40; + s32 item_id; /* 0x64 of the slot: remove_hud_item's slot_item_id, -1 none */ u8 pad_44[0x4]; s32 unk48; u8 pad_4C[0xC]; @@ -48,14 +48,14 @@ void init_hud(void) { hud_state.serial = 0; hud_state.unk4 = 0; do { - slot->unk40 = -1; + slot->item_id = -1; *(s32 *)((u8 *)slot - 0x4) = 0x10000; queue_animation_update(slot_index, 0xFFFF, 0, 0, 0, 0, 1); slot_index += 1; slot->unk58 = 0; slot->unk48 = -6; *(s32 *)((u8 *)slot - 0x20) = 0; - slot->unk0 = 0; + slot->next_mode = 0; slot = (struct HudSlot *)((u8 *)slot + 0x90); } while (slot_index < 0xD); bank = hud_bank_main; diff --git a/src/ui/hud/update_hud.c b/src/ui/hud/update_hud.c index 7c9d235057..55afce6302 100644 --- a/src/ui/hud/update_hud.c +++ b/src/ui/hud/update_hud.c @@ -6,7 +6,7 @@ struct HudSlot { u8 pad_0[0x18]; - s32 unk18; + s32 update; /* 0x18: called with the slot each frame when set */ }; extern s32 hud_msg_count __asm__("D_0015F680"); @@ -46,7 +46,7 @@ void update_hud(void) { hud_state.z = 0xFFFFF0; remaining = 0xC; loop_6: - update_fn = ((struct HudSlot *)slot)->unk18; + update_fn = ((struct HudSlot *)slot)->update; if (update_fn == 0) { goto block_8; From 6e4b6ba19d80a861271fd882da3890f5dc7b9ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:02:42 +0000 Subject: [PATCH 143/213] decomp: name the crate burst hit descriptor fields --- src/overlays/shared/pickups/crate.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/overlays/shared/pickups/crate.c b/src/overlays/shared/pickups/crate.c index 45555cae6b..cce018aad3 100644 --- a/src/overlays/shared/pickups/crate.c +++ b/src/overlays/shared/pickups/crate.c @@ -83,14 +83,14 @@ typedef struct { s32 frameFC; } CrateVars; -/* Fourth argument of collect_mobies_in_sphere. */ +/* Fourth argument of collect_mobies_in_sphere: a hit descriptor (record_moby_hit). */ typedef struct { Vec4f pos; struct Moby *moby; - s32 unk14; + s32 flags; /* 0x14: hit mask, becomes MobyHit.flags */ u8 pad18[0x1C - 0x18]; - f32 unk1C; - s32 unk20; + f32 damage; /* 0x1C: MobyHit.damage */ + s32 has_direction; /* 0x20: MobyHit.has_direction */ } Burst; typedef unsigned int Q_2cfcb8 __attribute__((mode(TI))); @@ -409,17 +409,17 @@ void crate_update(struct Moby *moby) { f32 burst_radius_scale; burst.moby = moby; - burst.unk1C = 2.0f; + burst.damage = 2.0f; clear_u64_value(&burst.pos); - burst.unk20 = 0; + burst.has_direction = 0; fast_vec_normalize(&at, &moby->rot_row2, 0.5f); add_vector_xyz(&at, &at, &moby->pos); burst_radius_scale = convert_integer_to_float(crate_vars->burst_frame) / scale_time(20.0f); - burst.unk14 = 1; + burst.flags = 1; collect_mobies_in_sphere( burst_radius_scale + burst_radius_scale, &at, 0x10, moby, &burst); - burst.unk14 = 0x30000; + burst.flags = 0x30000; collect_mobies_in_sphere(burst_radius_scale * 3.0f, &at, 0x10, D_001413D0_lui, &burst); crate_vars->burst_frame++; break; From 6efe6bca810bcc572f82a8ff7d0a064f4a505586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:13:06 +0000 Subject: [PATCH 144/213] decomp: define the HUD selector slot tables per level in C The eight-slot item ring and the four-slot gadgebot command ring, the two records used before a slot is chosen, and the table pointers of every level as pointers to them. The gadgebot command enum moves to its header. --- config/us/levels/data.tsv | 187 +- include/rnc/overlay/shared/enemies/gadgebot.h | 8 + .../draw_hud_item_selector_panel_globals.h | 44 +- src/overlays/shared/enemies/gadgebot.c | 7 +- .../ui/hud/draw_hud_item_selector_panel.c | 2039 +++++++++-------- 5 files changed, 1160 insertions(+), 1125 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index d1429a6829..c823c537e4 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -3492,6 +3492,10 @@ D_L00_0015F6B8 4 D_L00_0015F6B8 4 D_L00_0015F6B8 4 D_L00_0015F6B8 4 +D_L00_0017DAC0 224 +D_L00_0017DBA0 112 +D_L00_0017DC10 28 +D_L00_0017DC30 28 D_L00_0015F924 2 D_L00_0015F928 2 D_L00_0015F92C 2 @@ -4283,6 +4287,11 @@ D_L01_0015F724 4 D_L01_0015F728 4 D_L01_0015F72C 4 D_L01_0015F738 4 +D_L01_0015F740 4 +D_L01_0017DF40 224 +D_L01_0017E020 112 +D_L01_0017E090 28 +D_L01_0017E0B0 28 D_L01_0015F750 4 D_L01_0015F754 4 D_L01_0015F758 4 @@ -4937,10 +4946,6 @@ D_L01_0017C050 4 D_L01_0017C070 4 D_L01_0017CB00 1 D_L01_0017CF00 1 -D_L01_0017E098 4 -D_L01_0017E09C 4 -D_L01_0017E0A0 4 -D_L01_0017E0A4 4 D_L01_0017E958 28 D_L01_0017E974 4 D_L01_0017E984 4 @@ -5359,6 +5364,11 @@ D_L02_0015F724 4 D_L02_0015F728 4 D_L02_0015F72C 4 D_L02_0015F738 4 +D_L02_0015F740 4 +D_L02_0017E0C0 224 +D_L02_0017E1A0 112 +D_L02_0017E210 28 +D_L02_0017E230 28 D_L02_0015F750 4 D_L02_0015F754 4 D_L02_0015F758 4 @@ -6104,10 +6114,6 @@ D_L02_0017C960 4 D_L02_0017C964 4 D_L02_0017CC80 1 D_L02_0017D080 1 -D_L02_0017E218 4 -D_L02_0017E21C 4 -D_L02_0017E220 4 -D_L02_0017E224 4 D_L02_0017EAD8 28 D_L02_0017EAF4 4 D_L02_0017EB04 4 @@ -6489,6 +6495,11 @@ D_L03_0015F724 4 D_L03_0015F728 4 D_L03_0015F72C 4 D_L03_0015F738 4 +D_L03_0015F740 4 +D_L03_0017DBC0 224 +D_L03_0017DCA0 112 +D_L03_0017DD10 28 +D_L03_0017DD30 28 D_L03_0015F750 4 D_L03_0015F754 4 D_L03_0015F758 4 @@ -7136,10 +7147,6 @@ D_L03_0017C460 4 D_L03_0017C464 4 D_L03_0017C780 1 D_L03_0017CB80 1 -D_L03_0017DD18 4 -D_L03_0017DD1C 4 -D_L03_0017DD20 4 -D_L03_0017DD24 4 D_L03_0017E5D8 28 D_L03_0017E5F4 4 D_L03_0017E604 4 @@ -7542,6 +7549,10 @@ D_L04_0015F724 4 D_L04_0015F728 4 D_L04_0015F72C 4 D_L04_0015F738 4 +D_L04_0017DC40 224 +D_L04_0017DD20 112 +D_L04_0017DD90 28 +D_L04_0017DDB0 28 D_L04_0015F740 4 D_L04_0015F750 4 D_L04_0015F754 4 @@ -8237,14 +8248,6 @@ D_L04_0017C5E0 4 D_L04_0017C5E4 4 D_L04_0017C800 1 D_L04_0017CC00 1 -D_L04_0017DD98 4 -D_L04_0017DD9C 4 -D_L04_0017DDA0 4 -D_L04_0017DDA4 4 -D_L04_0017DDB8 4 -D_L04_0017DDBC 4 -D_L04_0017DDC0 4 -D_L04_0017DDC4 4 D_L04_0017E658 28 D_L04_0017E674 4 D_L04_0017E684 4 @@ -8611,6 +8614,11 @@ D_L05_0015F734 4 D_L05_0015F738 4 D_L05_0015F73C 4 D_L05_0015F748 4 +D_L05_0015F750 4 +D_L05_0017DF40 224 +D_L05_0017E020 112 +D_L05_0017E090 28 +D_L05_0017E0B0 28 D_L05_0015F760 4 D_L05_0015F764 4 D_L05_0015F768 4 @@ -9410,10 +9418,6 @@ D_L05_0017C7C0 4 D_L05_0017C7C4 4 D_L05_0017CB00 1 D_L05_0017CF00 1 -D_L05_0017E098 4 -D_L05_0017E09C 4 -D_L05_0017E0A0 4 -D_L05_0017E0A4 4 D_L05_0017E918 60 D_L05_0017E918 60 D_L05_0017E918 60 @@ -9785,6 +9789,10 @@ D_L06_0015F724 4 D_L06_0015F728 4 D_L06_0015F72C 4 D_L06_0015F738 4 +D_L06_0017E240 224 +D_L06_0017E320 112 +D_L06_0017E390 28 +D_L06_0017E3B0 28 D_L06_0015F740 4 D_L06_0015F750 4 D_L06_0015F754 4 @@ -10591,14 +10599,6 @@ D_L06_0017CBE0 4 D_L06_0017CBE4 4 D_L06_0017CE00 1 D_L06_0017D200 1 -D_L06_0017E398 4 -D_L06_0017E39C 4 -D_L06_0017E3A0 4 -D_L06_0017E3A4 4 -D_L06_0017E3B8 4 -D_L06_0017E3BC 4 -D_L06_0017E3C0 4 -D_L06_0017E3C4 4 D_L06_0017EC74 4 D_L06_0017EC84 4 D_L06_0017EC88 4 @@ -11049,6 +11049,10 @@ D_L07_0015F724 4 D_L07_0015F728 4 D_L07_0015F72C 4 D_L07_0015F738 4 +D_L07_0017DB40 224 +D_L07_0017DC20 112 +D_L07_0017DC90 28 +D_L07_0017DCB0 28 D_L07_0015F740 4 D_L07_0015F750 4 D_L07_0015F754 4 @@ -11709,14 +11713,6 @@ D_L07_0017C3E4 4 D_L07_0017C4C0 1 D_L07_0017C700 1 D_L07_0017CB00 1 -D_L07_0017DC98 4 -D_L07_0017DC9C 4 -D_L07_0017DCA0 4 -D_L07_0017DCA4 4 -D_L07_0017DCB8 4 -D_L07_0017DCBC 4 -D_L07_0017DCC0 4 -D_L07_0017DCC4 4 D_L07_0017E558 28 D_L07_0017E574 4 D_L07_0017E584 4 @@ -12129,6 +12125,11 @@ D_L08_0015F724 4 D_L08_0015F728 4 D_L08_0015F72C 4 D_L08_0015F738 4 +D_L08_0015F740 4 +D_L08_0017E2C0 224 +D_L08_0017E3A0 112 +D_L08_0017E410 28 +D_L08_0017E430 28 D_L08_0015F750 4 D_L08_0015F754 4 D_L08_0015F758 4 @@ -12924,10 +12925,6 @@ D_L08_0017CB60 4 D_L08_0017CB64 4 D_L08_0017CE80 1 D_L08_0017D280 1 -D_L08_0017E418 4 -D_L08_0017E41C 4 -D_L08_0017E420 4 -D_L08_0017E424 4 D_L08_0017ECD8 28 D_L08_0017ECF4 4 D_L08_0017ED04 4 @@ -13508,6 +13505,10 @@ D_L09_0015F724 4 D_L09_0015F728 4 D_L09_0015F72C 4 D_L09_0015F738 4 +D_L09_0017DC40 224 +D_L09_0017DD20 112 +D_L09_0017DD90 28 +D_L09_0017DDB0 28 D_L09_0015F740 4 D_L09_0015F750 4 D_L09_0015F754 4 @@ -14208,14 +14209,6 @@ D_L09_0017C4E4 4 D_L09_0017C5C0 1 D_L09_0017C800 1 D_L09_0017CC00 1 -D_L09_0017DD98 4 -D_L09_0017DD9C 4 -D_L09_0017DDA0 4 -D_L09_0017DDA4 4 -D_L09_0017DDB8 4 -D_L09_0017DDBC 4 -D_L09_0017DDC0 4 -D_L09_0017DDC4 4 D_L09_0017E658 28 D_L09_0017E674 4 D_L09_0017E684 4 @@ -14829,6 +14822,10 @@ D_L10_0015F724 4 D_L10_0015F728 4 D_L10_0015F72C 4 D_L10_0015F738 4 +D_L10_0017DF40 224 +D_L10_0017E020 112 +D_L10_0017E090 28 +D_L10_0017E0B0 28 D_L10_0015F740 4 D_L10_0015F750 4 D_L10_0015F754 4 @@ -15598,14 +15595,6 @@ D_L10_0017C7E4 4 D_L10_0017C8C0 1 D_L10_0017CB00 1 D_L10_0017CF00 1 -D_L10_0017E098 4 -D_L10_0017E09C 4 -D_L10_0017E0A0 4 -D_L10_0017E0A4 4 -D_L10_0017E0B8 4 -D_L10_0017E0BC 4 -D_L10_0017E0C0 4 -D_L10_0017E0C4 4 D_L10_0017E958 48 D_L10_0017E974 4 D_L10_0017E984 4 @@ -15958,6 +15947,11 @@ D_L11_0015F724 4 D_L11_0015F728 4 D_L11_0015F72C 4 D_L11_0015F738 4 +D_L11_0015F740 4 +D_L11_0017E4C0 224 +D_L11_0017E5A0 112 +D_L11_0017E610 28 +D_L11_0017E630 28 D_L11_0015F750 4 D_L11_0015F754 4 D_L11_0015F758 4 @@ -16734,10 +16728,6 @@ D_L11_0017CD40 44 D_L11_0017CE40 1 D_L11_0017D080 1 D_L11_0017D480 1 -D_L11_0017E618 4 -D_L11_0017E61C 4 -D_L11_0017E620 4 -D_L11_0017E624 4 D_L11_0017EED8 28 D_L11_0017EEF4 4 D_L11_0017EF04 4 @@ -17258,6 +17248,11 @@ D_L12_0015F724 4 D_L12_0015F728 4 D_L12_0015F72C 4 D_L12_0015F738 4 +D_L12_0015F740 4 +D_L12_0017DF40 224 +D_L12_0017E020 112 +D_L12_0017E090 28 +D_L12_0017E0B0 28 D_L12_0015F750 4 D_L12_0015F754 4 D_L12_0015F758 4 @@ -18000,10 +17995,6 @@ D_L12_0017C7E0 4 D_L12_0017C7E4 4 D_L12_0017CB00 1 D_L12_0017CF00 1 -D_L12_0017E098 4 -D_L12_0017E09C 4 -D_L12_0017E0A0 4 -D_L12_0017E0A4 4 D_L12_0017E958 28 D_L12_0017E974 4 D_L12_0017E984 4 @@ -18397,6 +18388,10 @@ D_L13_0015F724 4 D_L13_0015F728 4 D_L13_0015F72C 4 D_L13_0015F738 4 +D_L13_0017DDC0 224 +D_L13_0017DEA0 112 +D_L13_0017DF10 28 +D_L13_0017DF30 28 D_L13_0015F740 4 D_L13_0015F750 4 D_L13_0015F754 4 @@ -19115,14 +19110,6 @@ D_L13_0017C664 4 D_L13_0017C740 1 D_L13_0017C980 1 D_L13_0017CD80 1 -D_L13_0017DF18 4 -D_L13_0017DF1C 4 -D_L13_0017DF20 4 -D_L13_0017DF24 4 -D_L13_0017DF38 4 -D_L13_0017DF3C 4 -D_L13_0017DF40 4 -D_L13_0017DF44 4 D_L13_0017E7D8 28 D_L13_0017E7F4 4 D_L13_0017E804 4 @@ -19481,6 +19468,11 @@ D_L14_0015F724 4 D_L14_0015F728 4 D_L14_0015F72C 4 D_L14_0015F738 4 +D_L14_0015F740 4 +D_L14_0017E1C0 224 +D_L14_0017E2A0 112 +D_L14_0017E310 28 +D_L14_0017E330 28 D_L14_0015F750 4 D_L14_0015F754 4 D_L14_0015F758 4 @@ -20253,10 +20245,6 @@ D_L14_0017CB60 4 D_L14_0017CB64 4 D_L14_0017CD80 1 D_L14_0017D180 1 -D_L14_0017E318 4 -D_L14_0017E31C 4 -D_L14_0017E320 4 -D_L14_0017E324 4 D_L14_0017EBD8 28 D_L14_0017EBF4 4 D_L14_0017EC04 4 @@ -20717,6 +20705,11 @@ D_L15_0015F724 4 D_L15_0015F728 4 D_L15_0015F72C 4 D_L15_0015F738 4 +D_L15_0015F740 4 +D_L15_0017E0C0 224 +D_L15_0017E1A0 112 +D_L15_0017E210 28 +D_L15_0017E230 28 D_L15_0015F750 4 D_L15_0015F754 4 D_L15_0015F758 4 @@ -21475,10 +21468,6 @@ D_L15_0017CA60 4 D_L15_0017CA64 4 D_L15_0017CC80 1 D_L15_0017D080 1 -D_L15_0017E218 4 -D_L15_0017E21C 4 -D_L15_0017E220 4 -D_L15_0017E224 4 D_L15_0017EAD8 28 D_L15_0017EAF4 4 D_L15_0017EB04 4 @@ -21909,6 +21898,11 @@ D_L16_0015F734 4 D_L16_0015F738 4 D_L16_0015F73C 4 D_L16_0015F748 4 +D_L16_0015F750 4 +D_L16_0017DF40 224 +D_L16_0017E020 112 +D_L16_0017E090 28 +D_L16_0017E0B0 28 D_L16_0015F760 4 D_L16_0015F764 4 D_L16_0015F768 4 @@ -22640,10 +22634,6 @@ D_L16_0017C7C4 4 D_L16_0017C8A0 1 D_L16_0017CB00 1 D_L16_0017CF00 1 -D_L16_0017E098 4 -D_L16_0017E09C 4 -D_L16_0017E0A0 4 -D_L16_0017E0A4 4 D_L16_0017E918 60 D_L16_0017E958 28 D_L16_0017E974 4 @@ -23057,6 +23047,10 @@ D_L17_0015F724 4 D_L17_0015F728 4 D_L17_0015F72C 4 D_L17_0015F738 4 +D_L17_0017E3C0 224 +D_L17_0017E4A0 112 +D_L17_0017E510 28 +D_L17_0017E530 28 D_L17_0015F740 4 D_L17_0015F750 4 D_L17_0015F754 4 @@ -23921,14 +23915,6 @@ D_L17_0017CC64 4 D_L17_0017CD40 1 D_L17_0017CF80 1 D_L17_0017D380 1 -D_L17_0017E518 4 -D_L17_0017E51C 4 -D_L17_0017E520 4 -D_L17_0017E524 4 -D_L17_0017E538 4 -D_L17_0017E53C 4 -D_L17_0017E540 4 -D_L17_0017E544 4 D_L17_0017EDD8 28 D_L17_0017EDF4 4 D_L17_0017EE04 4 @@ -24394,6 +24380,11 @@ D_L18_0015F724 4 D_L18_0015F728 4 D_L18_0015F72C 4 D_L18_0015F738 4 +D_L18_0015F740 4 +D_L18_0017E4C0 224 +D_L18_0017E5A0 112 +D_L18_0017E610 28 +D_L18_0017E630 28 D_L18_0015F750 4 D_L18_0015F754 4 D_L18_0015F758 4 @@ -25140,10 +25131,6 @@ D_L18_0017C5F0 4 D_L18_0017CD40 44 D_L18_0017D080 1 D_L18_0017D480 1 -D_L18_0017E618 4 -D_L18_0017E61C 4 -D_L18_0017E620 4 -D_L18_0017E624 4 D_L18_0017EED8 28 D_L18_0017EEF4 4 D_L18_0017EF04 4 diff --git a/include/rnc/overlay/shared/enemies/gadgebot.h b/include/rnc/overlay/shared/enemies/gadgebot.h index 476c9d4bbd..c8d4c967bd 100644 --- a/include/rnc/overlay/shared/enemies/gadgebot.h +++ b/include/rnc/overlay/shared/enemies/gadgebot.h @@ -3,6 +3,14 @@ #include "types.h" +/* What the hero's four-slot HUD selector tells the gadgebots in range to do (D_00141610). */ +enum GadgebotCommand { + GADGEBOT_COMMAND_FOLLOW_HERO = 1, + GADGEBOT_COMMAND_STAND_AND_FACE_HERO = 2, + GADGEBOT_COMMAND_SEEK_AND_ATTACK_TARGET = 3, + GADGEBOT_COMMAND_SEEK_INTERACTION_TARGET = 4 +}; + void gadgebot_update() __asm__("FUN_L06_002f0040"); #endif /* LOMBYTE_RNC_OVERLAY_SHARED_ENEMIES_GADGEBOT_H */ diff --git a/include/rnc/overlay/shared/ui/hud/draw_hud_item_selector_panel_globals.h b/include/rnc/overlay/shared/ui/hud/draw_hud_item_selector_panel_globals.h index 0f92c39e4f..bdda3ac776 100644 --- a/include/rnc/overlay/shared/ui/hud/draw_hud_item_selector_panel_globals.h +++ b/include/rnc/overlay/shared/ui/hud/draw_hud_item_selector_panel_globals.h @@ -5,26 +5,28 @@ /* Scalar data read by src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c. */ /* Explicit _gp views stay in the source at their assembler declaration sites. */ -extern s32 eight_slot_hud_selector_table_pointer __asm__("D_L00_0015F738"); -extern int saved_hud_selector_slot_index __asm__("D_L00_0015FA9C"); -extern float hud_item_selector_even_slot_edge_fraction __asm__("D_L00_0015F788"); -extern float hud_item_selector_slot_angle_offset __asm__("D_L00_0015F784"); -extern int hud_item_selector_text_shadow_color_to __asm__("D_L00_0015F79C"); -extern int hud_item_selector_nonzero_ammo_text_color_to __asm__("D_L00_0015F7AC"); -extern int hud_item_selector_title_with_ammo_y_offset __asm__("D_L00_0015F7B4"); -extern int hud_item_selector_split_title_without_ammo_y_offset __asm__("D_L00_0015F7B8"); -extern int four_slot_hud_selector_table_pointer __asm__("D_L00_0015F740"); -extern s32 bolt_count_text_x_offset __asm__("D_L00_0015F834"); -extern s32 bolt_count_text_y_offset __asm__("D_L00_0015F838"); -extern s32 bolt_dot_separator_x_offset __asm__("D_L00_0015F844"); -extern s32 bolt_dot_separator_y_offset __asm__("D_L00_0015F848"); -extern s32 bolt_exclamation_panel_max_alpha __asm__("D_L00_0015F8F8"); -extern s32 bolt_exclamation_panel_open_slide_distance __asm__("D_L00_0015F8FC"); -extern s32 bolt_exclamation_panel_right_x_offset __asm__("D_L00_0015F900"); -extern s32 bolt_exclamation_label_x_offset __asm__("D_L00_0015F904"); -extern s32 bolt_exclamation_label_y_offset __asm__("D_L00_0015F908"); -extern s32 bolt_exclamation_label_color_from __asm__("D_L00_0015F90C"); -extern s32 bolt_exclamation_label_color_to __asm__("D_L00_0015F910"); -extern s32 bolt_exclamation_label_pulse_base_period_frames __asm__("D_L00_0015F914"); +struct HudSelectorSlot; + +extern struct HudSelectorSlot *eight_slot_hud_selector_table_pointer __asm__("D_L00_0015F738"); +extern int saved_hud_selector_slot_index __asm__("D_L00_0015FA9C"); +extern float hud_item_selector_even_slot_edge_fraction __asm__("D_L00_0015F788"); +extern float hud_item_selector_slot_angle_offset __asm__("D_L00_0015F784"); +extern int hud_item_selector_text_shadow_color_to __asm__("D_L00_0015F79C"); +extern int hud_item_selector_nonzero_ammo_text_color_to __asm__("D_L00_0015F7AC"); +extern int hud_item_selector_title_with_ammo_y_offset __asm__("D_L00_0015F7B4"); +extern int hud_item_selector_split_title_without_ammo_y_offset __asm__("D_L00_0015F7B8"); +extern struct HudSelectorSlot *four_slot_hud_selector_table_pointer __asm__("D_L00_0015F740"); +extern s32 bolt_count_text_x_offset __asm__("D_L00_0015F834"); +extern s32 bolt_count_text_y_offset __asm__("D_L00_0015F838"); +extern s32 bolt_dot_separator_x_offset __asm__("D_L00_0015F844"); +extern s32 bolt_dot_separator_y_offset __asm__("D_L00_0015F848"); +extern s32 bolt_exclamation_panel_max_alpha __asm__("D_L00_0015F8F8"); +extern s32 bolt_exclamation_panel_open_slide_distance __asm__("D_L00_0015F8FC"); +extern s32 bolt_exclamation_panel_right_x_offset __asm__("D_L00_0015F900"); +extern s32 bolt_exclamation_label_x_offset __asm__("D_L00_0015F904"); +extern s32 bolt_exclamation_label_y_offset __asm__("D_L00_0015F908"); +extern s32 bolt_exclamation_label_color_from __asm__("D_L00_0015F90C"); +extern s32 bolt_exclamation_label_color_to __asm__("D_L00_0015F910"); +extern s32 bolt_exclamation_label_pulse_base_period_frames __asm__("D_L00_0015F914"); #endif /* LOMBYTE_RNC_OVERLAY_SHARED_UI_HUD_DRAW_HUD_ITEM_SELECTOR_PANEL_GLOBALS_H */ diff --git a/src/overlays/shared/enemies/gadgebot.c b/src/overlays/shared/enemies/gadgebot.c index 33cee82784..c12420fcea 100644 --- a/src/overlays/shared/enemies/gadgebot.c +++ b/src/overlays/shared/enemies/gadgebot.c @@ -24,6 +24,7 @@ #include "rnc/game/game_globals.h" #include "rnc/overlay/shared/enemies/gadgebot_spawn_container.h" #include "rnc/overlay/shared/enemies/gadgebot_spawn_pad.h" +#include "rnc/overlay/shared/enemies/gadgebot.h" #include "rnc/overlay/shared/math/random/random_int_between.h" #include "rnc/overlay/shared/mobys/ground_move_control.h" @@ -299,12 +300,6 @@ void gadgebot_update(GbMoby *moby) { GADGEBOT_ATTACK_RECOVER_AFTER_STRIKE = 3, GADGEBOT_ATTACK_WAIT_FOR_TARGET = 4 }; - enum { - GADGEBOT_COMMAND_FOLLOW_HERO = 1, - GADGEBOT_COMMAND_STAND_AND_FACE_HERO = 2, - GADGEBOT_COMMAND_SEEK_AND_ATTACK_TARGET = 3, - GADGEBOT_COMMAND_SEEK_INTERACTION_TARGET = 4 - }; enum { GADGEBOT_FOLLOW_INITIALIZE = 0, GADGEBOT_FOLLOW_MOVE_TOWARD_HERO = 1, diff --git a/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c b/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c index c053ca0e60..f6eb0e0f48 100644 --- a/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c +++ b/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c @@ -22,6 +22,7 @@ #include "rnc/ui/help/get_help_message_text.h" #include "rnc/overlay/shared/ui/hud/hud_keep_visible.h" #include "rnc/sdk/libc/stdio.h" +#include "rnc/overlay/shared/enemies/gadgebot.h" extern unsigned char D_0013E529[]; void hud_update_counter(char *) __asm__("FUN_L00_00235ea0"); @@ -144,32 +145,39 @@ typedef struct { s32 x78; } O00237ae8; -typedef struct { - s32 x0; - u8 p[0x14]; - s32 x18; -} D00237ae8; +/* One slot of a HUD selector ring: its icon, the slot each pad direction moves to, and what + choosing it does. */ +typedef struct HudSelectorSlot { + int icon; + int icon_frame; + int left_slot; + int right_slot; + int up_slot; + int down_slot; + int command; /* item id (eight slots) or gadgebot command (four slots) */ +} HudSelectorSlot; extern s32 D_L00_0015FA90; extern void *D_L00_0015FAC0; #include "rnc/overlay/shared/ui/hud/draw_hud_item_selector_panel_globals.h" -extern s32 eight_slot_hud_selector_table_pointer_gp __asm__("D_L00_0015F738") __attribute__((sda)); -extern s32 D_L00_0015F718_gp __asm__("D_L00_0015F718") __attribute__((sda)); -extern s32 D_L00_0015F71C_gp __asm__("D_L00_0015F71C") __attribute__((sda)); -extern s32 D_L00_0015F72C __attribute__((sda)); -extern D00237ae8 l00_eight_slot_hud_selector_entries[] __asm__("D_L00_0017DAC0"); +extern HudSelectorSlot *eight_slot_hud_selector_table_pointer_gp __asm__("D_L00_0015F738") + __attribute__((sda)); +extern s32 D_L00_0015F718_gp __asm__("D_L00_0015F718") __attribute__((sda)); +extern s32 D_L00_0015F71C_gp __asm__("D_L00_0015F71C") __attribute__((sda)); +extern s32 D_L00_0015F72C __attribute__((sda)); +extern HudSelectorSlot eight_slot_hud_selector_slots[8] __asm__("D_L00_0017DAC0"); #include "rnc/overlay/shared/hero/item_defs.h" void initialize_eight_slot_hud_selector(O00237ae8 *hud_element) __asm__("FUN_L00_00237ae8"); void initialize_eight_slot_hud_selector(O00237ae8 *hud_element) { - s32 i; - D00237ae8 *slot_entry; - s32 *item_id_cursor; - ItemDef *tab; + s32 i; + HudSelectorSlot *slot_entry; + s32 *item_id_cursor; + ItemDef *tab; D_L00_0015FA90 = 8; D_L00_0015FAC0 = &eight_slot_hud_selector_table_pointer_gp; hud_element->x48 = 0; @@ -180,21 +188,17 @@ void initialize_eight_slot_hud_selector(O00237ae8 *hud_element) { hud_element->x78 = scale_game_frames(0x1E); hud_element->x70 = 0; D_L00_0015F72C = 0; - slot_entry = l00_eight_slot_hud_selector_entries; + slot_entry = eight_slot_hud_selector_slots; tab = item_defs; item_id_cursor = pause_iop_sprite_lists; for (i = 7; i >= 0; i--) { - slot_entry->x18 = *item_id_cursor; - slot_entry->x0 = tab[*item_id_cursor].unk38; + slot_entry->command = *item_id_cursor; + slot_entry->icon = tab[*item_id_cursor].unk38; item_id_cursor++; slot_entry++; } } -typedef struct { - int icon, icon_frame, left_slot, right_slot, up_slot, down_slot, command; -} Ent; - typedef struct { u8 p0[0x64]; int w64; @@ -210,9 +214,9 @@ typedef struct { extern int D_L00_0017E504 NOT_SDA; extern int D_L00_0015FA90; -extern int l00_hud_selector_fade_counter_limit_gp __asm__("D_L00_0015F780") __attribute__((sda)); -extern int saved_hud_selector_slot_index_gp __asm__("D_L00_0015FA9C") __attribute__((sda)); -extern Ent **D_L00_0015FAC0_c __asm__("D_L00_0015FAC0"); +extern int l00_hud_selector_fade_counter_limit_gp __asm__("D_L00_0015F780") __attribute__((sda)); +extern int saved_hud_selector_slot_index_gp __asm__("D_L00_0015FA9C") __attribute__((sda)); +extern HudSelectorSlot **D_L00_0015FAC0_c __asm__("D_L00_0015FAC0"); extern int D_L00_0017DC38 NOT_SDA; extern int D_L00_0017DC3C NOT_SDA; extern int D_L00_0017DC40 NOT_SDA; @@ -338,8 +342,8 @@ void update_hud_item_selector_selection_and_visibility(Obj *hud_element) { hud_element->w74 = pad_slot_index; } { - Ent *slot_lookup = D_L00_0015FAC0_c[D_L00_0015F72C]; - int selected_slot_index = hud_element->w74; + HudSelectorSlot *slot_lookup = D_L00_0015FAC0_c[D_L00_0015F72C]; + int selected_slot_index = hud_element->w74; if (slot_lookup[selected_slot_index].icon == 0 && slot_step != 0) { k = (selected_slot_index + slot_step) % D_L00_0015FA90; if (slot_lookup[k].icon != 0) @@ -605,9 +609,10 @@ int draw_hud_item_selector_panel(HudElem *selector_element) { return selector_element->w; } -extern int D_L00_0015F72C __attribute__((sda)); -extern int four_slot_hud_selector_table_pointer_gp __asm__("D_L00_0015F740") __attribute__((sda)); -void initialize_four_slot_hud_selector(char *hud_element) __asm__("FUN_L00_00238b18"); +extern int D_L00_0015F72C __attribute__((sda)); +extern HudSelectorSlot *four_slot_hud_selector_table_pointer_gp __asm__("D_L00_0015F740") + __attribute__((sda)); +void initialize_four_slot_hud_selector(char *hud_element) __asm__("FUN_L00_00238b18"); void initialize_four_slot_hud_selector(char *hud_element) { int element_width, element_height; @@ -1483,259 +1488,349 @@ void initialize_numeric_hud_timer_and_base_dimensions(HudElem *hud_element) { initialize_numeric_hud_values_and_dimensions(hud_element); } -s32 D_L01_0017E0A0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L02_0017E220[1] __attribute__((section(".data"))) = {0}; - -s32 D_L03_0017DD20[1] __attribute__((section(".data"))) = {0}; - -s32 D_L04_0017DDA0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L04_0017DDC0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L05_0017E0A0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L06_0017E3A0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L06_0017E3C0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L07_0017DCA0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L07_0017DCC0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L08_0017E420[1] __attribute__((section(".data"))) = {0}; - -s32 D_L09_0017DDA0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L09_0017DDC0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L10_0017E0A0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L10_0017E0C0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L11_0017E620[1] __attribute__((section(".data"))) = {0}; - -s32 D_L12_0017E0A0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L13_0017DF20[1] __attribute__((section(".data"))) = {0}; - -s32 D_L13_0017DF40[1] __attribute__((section(".data"))) = {0}; - -s32 D_L14_0017E320[1] __attribute__((section(".data"))) = {0}; - -s32 D_L15_0017E220[1] __attribute__((section(".data"))) = {0}; - -s32 D_L16_0017E0A0[1] __attribute__((section(".data"))) = {0}; - -s32 D_L17_0017E520[1] __attribute__((section(".data"))) = {0}; - -s32 D_L17_0017E540[1] __attribute__((section(".data"))) = {0}; +/* Icon whose frames 0-3 show the four gadgebot commands. */ +#define GADGEBOT_COMMAND_ICON 0x7553 + +/* Pad links of the eight-slot item ring; initialize_eight_slot_hud_selector fills in each + slot's item and its icon. */ +#define EIGHT_SLOT_HUD_SELECTOR_SLOTS \ + { \ + {.left_slot = 7, .right_slot = 1, .up_slot = 0, .down_slot = 4}, \ + {.left_slot = 0, .right_slot = 2, .up_slot = 0, .down_slot = 2}, \ + {.left_slot = 6, .right_slot = 2, .up_slot = 1, .down_slot = 3}, \ + {.left_slot = 4, .right_slot = 2, .up_slot = 2, .down_slot = 4}, \ + {.left_slot = 5, .right_slot = 3, .up_slot = 0, .down_slot = 4}, \ + {.left_slot = 6, .right_slot = 4, .up_slot = 6, .down_slot = 4}, \ + {.left_slot = 6, .right_slot = 2, .up_slot = 7, .down_slot = 5}, \ + {.left_slot = 6, .right_slot = 0, .up_slot = 0, .down_slot = 6}, \ + } -s32 D_L18_0017E620[1] __attribute__((section(".data"))) = {0}; +/* The gadgebot command ring of Clank's HUD selector. */ +#define FOUR_SLOT_HUD_SELECTOR_SLOTS \ + { \ + {.icon = GADGEBOT_COMMAND_ICON, \ + .icon_frame = 3, \ + .left_slot = 3, \ + .right_slot = 1, \ + .up_slot = 0, \ + .down_slot = 2, \ + .command = GADGEBOT_COMMAND_STAND_AND_FACE_HERO}, \ + {.icon = GADGEBOT_COMMAND_ICON, \ + .icon_frame = 2, \ + .left_slot = 3, \ + .right_slot = 1, \ + .up_slot = 0, \ + .down_slot = 2, \ + .command = GADGEBOT_COMMAND_FOLLOW_HERO}, \ + {.icon = GADGEBOT_COMMAND_ICON, \ + .icon_frame = 0, \ + .left_slot = 3, \ + .right_slot = 1, \ + .up_slot = 0, \ + .down_slot = 2, \ + .command = GADGEBOT_COMMAND_SEEK_AND_ATTACK_TARGET}, \ + {.icon = GADGEBOT_COMMAND_ICON, \ + .icon_frame = 1, \ + .left_slot = 3, \ + .right_slot = 1, \ + .up_slot = 0, \ + .down_slot = 2, \ + .command = GADGEBOT_COMMAND_SEEK_INTERACTION_TARGET}, \ + } -s32 D_L01_0015FA90 = 0; -void *D_L01_0015FAC0 = 0; -s32 D_L01_0015F738 = 0x17df40; -s32 D_L01_0015F718 = 0xd2; -s32 D_L01_0015F71C = 0xc8; -s32 D_L01_0015F72C = 0; -int D_L01_0015F780 = 8; -int D_L01_0015FA9C = 0; -int D_L01_0015FA98 = 0; -int D_L01_0015FA94 = 0; -float D_L01_0015F788 = 0.2f; -float D_L01_0015F784 = 0; -int D_L01_0017E098 NOT_SDA = 6; -int D_L01_0017E09C NOT_SDA = 2; -int D_L01_0017E0A4 NOT_SDA = 4; -int D_L01_0015F720 = 0x69; -int D_L01_0015F724 = 0x64; -float D_L01_0015F78C = 74.0f; -int D_L01_0015F790 = 0xff8080; -int D_L01_0015F794 = 0x80ff8080; -int D_L01_0015F798 = 0; -int D_L01_0015F7A0 = 0x4040ff; -int D_L01_0015F7A4 = 0x804040ff; -int D_L01_0015F7A8 = 0x40e020; -int D_L01_0015F7B0 = 0x1e; -int D_L01_0015F7BC = 0; -float D_L01_0015F7C0 = 0.5f; -float D_L01_0015F7C4 = 1.05f; -Q2395b0 D_L01_0015FAB0 = {0}; +/* Where each pad direction moves when no slot is selected yet. */ +#define EIGHT_SLOT_HUD_SELECTOR_UNSELECTED \ + { .left_slot = 6, .right_slot = 2, .up_slot = 0, .down_slot = 4 } +#define FOUR_SLOT_HUD_SELECTOR_UNSELECTED \ + { .left_slot = 3, .right_slot = 1, .up_slot = 0, .down_slot = 2 } + +HudSelectorSlot + eight_slot_hud_selector_slots[8] __asm__("D_L00_0017DAC0") = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L00_0017DBA0[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L00_0017DC10 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L00_0017DC30 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L01_0017DF40[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L01_0017E020[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L01_0017E090 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L01_0017E0B0 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L02_0017E0C0[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L02_0017E1A0[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L02_0017E210 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L02_0017E230 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L03_0017DBC0[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L03_0017DCA0[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L03_0017DD10 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L03_0017DD30 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L04_0017DC40[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L04_0017DD20[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L04_0017DD90 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L04_0017DDB0 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L05_0017DF40[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L05_0017E020[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L05_0017E090 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L05_0017E0B0 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L06_0017E240[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L06_0017E320[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L06_0017E390 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L06_0017E3B0 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L07_0017DB40[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L07_0017DC20[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L07_0017DC90 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L07_0017DCB0 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L08_0017E2C0[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L08_0017E3A0[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L08_0017E410 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L08_0017E430 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L09_0017DC40[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L09_0017DD20[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L09_0017DD90 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L09_0017DDB0 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L10_0017DF40[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L10_0017E020[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L10_0017E090 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L10_0017E0B0 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L11_0017E4C0[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L11_0017E5A0[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L11_0017E610 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L11_0017E630 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L12_0017DF40[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L12_0017E020[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L12_0017E090 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L12_0017E0B0 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L13_0017DDC0[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L13_0017DEA0[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L13_0017DF10 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L13_0017DF30 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L14_0017E1C0[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L14_0017E2A0[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L14_0017E310 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L14_0017E330 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L15_0017E0C0[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L15_0017E1A0[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L15_0017E210 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L15_0017E230 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L16_0017DF40[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L16_0017E020[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L16_0017E090 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L16_0017E0B0 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L17_0017E3C0[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L17_0017E4A0[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L17_0017E510 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L17_0017E530 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +HudSelectorSlot D_L18_0017E4C0[8] = EIGHT_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L18_0017E5A0[4] = FOUR_SLOT_HUD_SELECTOR_SLOTS; +HudSelectorSlot D_L18_0017E610 = EIGHT_SLOT_HUD_SELECTOR_UNSELECTED; +HudSelectorSlot D_L18_0017E630 = FOUR_SLOT_HUD_SELECTOR_UNSELECTED; + +s32 D_L01_0015FA90 = 0; +void *D_L01_0015FAC0 = 0; +HudSelectorSlot *D_L01_0015F738 = D_L01_0017DF40; +HudSelectorSlot *D_L01_0015F740 = D_L01_0017E020; +s32 D_L01_0015F718 = 0xd2; +s32 D_L01_0015F71C = 0xc8; +s32 D_L01_0015F72C = 0; +int D_L01_0015F780 = 8; +int D_L01_0015FA9C = 0; +int D_L01_0015FA98 = 0; +int D_L01_0015FA94 = 0; +float D_L01_0015F788 = 0.2f; +float D_L01_0015F784 = 0; +int D_L01_0015F720 = 0x69; +int D_L01_0015F724 = 0x64; +float D_L01_0015F78C = 74.0f; +int D_L01_0015F790 = 0xff8080; +int D_L01_0015F794 = 0x80ff8080; +int D_L01_0015F798 = 0; +int D_L01_0015F7A0 = 0x4040ff; +int D_L01_0015F7A4 = 0x804040ff; +int D_L01_0015F7A8 = 0x40e020; +int D_L01_0015F7B0 = 0x1e; +int D_L01_0015F7BC = 0; +float D_L01_0015F7C0 = 0.5f; +float D_L01_0015F7C4 = 1.05f; +Q2395b0 D_L01_0015FAB0 = {0}; s32 D_L01_0015F7F0 = 8; s32 D_L01_0015F7F8[1] = {0xffb0}; HudCounter D_L01_0015FAB8 = {0}; -s32 D_L01_0015F824 = 8; -s32 D_L01_0015F828 = 8; -s32 D_L01_0015F82C = 0xe08060; -s32 D_L01_0015F830 = 0x80e08060; -s32 D_L01_0015F84C = 0xd; -s32 D_L01_0015F834 = -32; -s32 D_L01_0015F838 = 8; -s32 D_L01_0015F83C = -30; -s32 D_L01_0015F840 = 0x15; -s32 D_L01_0015F844 = -29; -s32 D_L01_0015F848 = 0xa; -char D_L01_0015F858 = 0x27; -char D_L01_0015F860 = 0x2e; -s32 D_L01_0015F8F8 = 0x50; -s32 D_L01_0015F8FC = 0x10; -s32 D_L01_0015F900 = -28; -s32 D_L01_0015F904 = -44; -s32 D_L01_0015F908 = 6; -s32 D_L01_0015F90C = 0xff; -s32 D_L01_0015F910 = 0x800000ff; -s32 D_L01_0015F914 = 0x2d; -s32 D_L02_0015FA90 = 0; -void *D_L02_0015FAC0 = 0; -s32 D_L02_0015F738 = 0x17e0c0; -s32 D_L02_0015F718 = 0xd2; -s32 D_L02_0015F71C = 0xc8; -s32 D_L02_0015F72C = 0; -int D_L02_0015F780 = 8; -int D_L02_0015FA9C = 0; -int D_L02_0015FA98 = 0; -int D_L02_0015FA94 = 0; -float D_L02_0015F788 = 0.2f; -float D_L02_0015F784 = 0; -int D_L02_0017E218 NOT_SDA = 6; -int D_L02_0017E21C NOT_SDA = 2; -int D_L02_0017E224 NOT_SDA = 4; -int D_L02_0015F720 = 0x69; -int D_L02_0015F724 = 0x64; -float D_L02_0015F78C = 74.0f; -int D_L02_0015F790 = 0xff8080; -int D_L02_0015F794 = 0x80ff8080; -int D_L02_0015F798 = 0; -int D_L02_0015F7A0 = 0x4040ff; -int D_L02_0015F7A4 = 0x804040ff; -int D_L02_0015F7A8 = 0x40e020; -int D_L02_0015F7B0 = 0x1e; -int D_L02_0015F7BC = 0; -float D_L02_0015F7C0 = 0.5f; -float D_L02_0015F7C4 = 1.05f; -Q2395b0 D_L02_0015FAB0 = {0}; +s32 D_L01_0015F824 = 8; +s32 D_L01_0015F828 = 8; +s32 D_L01_0015F82C = 0xe08060; +s32 D_L01_0015F830 = 0x80e08060; +s32 D_L01_0015F84C = 0xd; +s32 D_L01_0015F834 = -32; +s32 D_L01_0015F838 = 8; +s32 D_L01_0015F83C = -30; +s32 D_L01_0015F840 = 0x15; +s32 D_L01_0015F844 = -29; +s32 D_L01_0015F848 = 0xa; +char D_L01_0015F858 = 0x27; +char D_L01_0015F860 = 0x2e; +s32 D_L01_0015F8F8 = 0x50; +s32 D_L01_0015F8FC = 0x10; +s32 D_L01_0015F900 = -28; +s32 D_L01_0015F904 = -44; +s32 D_L01_0015F908 = 6; +s32 D_L01_0015F90C = 0xff; +s32 D_L01_0015F910 = 0x800000ff; +s32 D_L01_0015F914 = 0x2d; +s32 D_L02_0015FA90 = 0; +void *D_L02_0015FAC0 = 0; +HudSelectorSlot *D_L02_0015F738 = D_L02_0017E0C0; +HudSelectorSlot *D_L02_0015F740 = D_L02_0017E1A0; +s32 D_L02_0015F718 = 0xd2; +s32 D_L02_0015F71C = 0xc8; +s32 D_L02_0015F72C = 0; +int D_L02_0015F780 = 8; +int D_L02_0015FA9C = 0; +int D_L02_0015FA98 = 0; +int D_L02_0015FA94 = 0; +float D_L02_0015F788 = 0.2f; +float D_L02_0015F784 = 0; +int D_L02_0015F720 = 0x69; +int D_L02_0015F724 = 0x64; +float D_L02_0015F78C = 74.0f; +int D_L02_0015F790 = 0xff8080; +int D_L02_0015F794 = 0x80ff8080; +int D_L02_0015F798 = 0; +int D_L02_0015F7A0 = 0x4040ff; +int D_L02_0015F7A4 = 0x804040ff; +int D_L02_0015F7A8 = 0x40e020; +int D_L02_0015F7B0 = 0x1e; +int D_L02_0015F7BC = 0; +float D_L02_0015F7C0 = 0.5f; +float D_L02_0015F7C4 = 1.05f; +Q2395b0 D_L02_0015FAB0 = {0}; s32 D_L02_0015F7F0 = 8; s32 D_L02_0015F7F8[1] = {0xffb0}; HudCounter D_L02_0015FAB8 = {0}; -s32 D_L02_0015F824 = 8; -s32 D_L02_0015F828 = 8; -s32 D_L02_0015F82C = 0xe08060; -s32 D_L02_0015F830 = 0x80e08060; -s32 D_L02_0015F84C = 0xd; -s32 D_L02_0015F834 = -32; -s32 D_L02_0015F838 = 8; -s32 D_L02_0015F83C = -30; -s32 D_L02_0015F840 = 0x15; -s32 D_L02_0015F844 = -29; -s32 D_L02_0015F848 = 0xa; -char D_L02_0015F858 = 0x27; -char D_L02_0015F860 = 0x2e; -s32 D_L02_0015F8F8 = 0x50; -s32 D_L02_0015F8FC = 0x10; -s32 D_L02_0015F900 = -28; -s32 D_L02_0015F904 = -44; -s32 D_L02_0015F908 = 6; -s32 D_L02_0015F90C = 0xff; -s32 D_L02_0015F910 = 0x800000ff; -s32 D_L02_0015F914 = 0x2d; -s32 D_L03_0015FA90 = 0; -void *D_L03_0015FAC0 = 0; -s32 D_L03_0015F738 = 0x17dbc0; -s32 D_L03_0015F718 = 0xd2; -s32 D_L03_0015F71C = 0xc8; -s32 D_L03_0015F72C = 0; -int D_L03_0015F780 = 8; -int D_L03_0015FA9C = 0; -int D_L03_0015FA98 = 0; -int D_L03_0015FA94 = 0; -float D_L03_0015F788 = 0.2f; -float D_L03_0015F784 = 0; -int D_L03_0017DD18 NOT_SDA = 6; -int D_L03_0017DD1C NOT_SDA = 2; -int D_L03_0017DD24 NOT_SDA = 4; -int D_L03_0015F720 = 0x69; -int D_L03_0015F724 = 0x64; -float D_L03_0015F78C = 74.0f; -int D_L03_0015F790 = 0xff8080; -int D_L03_0015F794 = 0x80ff8080; -int D_L03_0015F798 = 0; -int D_L03_0015F7A0 = 0x4040ff; -int D_L03_0015F7A4 = 0x804040ff; -int D_L03_0015F7A8 = 0x40e020; -int D_L03_0015F7B0 = 0x1e; -int D_L03_0015F7BC = 0; -float D_L03_0015F7C0 = 0.5f; -float D_L03_0015F7C4 = 1.05f; -Q2395b0 D_L03_0015FAB0 = {0}; +s32 D_L02_0015F824 = 8; +s32 D_L02_0015F828 = 8; +s32 D_L02_0015F82C = 0xe08060; +s32 D_L02_0015F830 = 0x80e08060; +s32 D_L02_0015F84C = 0xd; +s32 D_L02_0015F834 = -32; +s32 D_L02_0015F838 = 8; +s32 D_L02_0015F83C = -30; +s32 D_L02_0015F840 = 0x15; +s32 D_L02_0015F844 = -29; +s32 D_L02_0015F848 = 0xa; +char D_L02_0015F858 = 0x27; +char D_L02_0015F860 = 0x2e; +s32 D_L02_0015F8F8 = 0x50; +s32 D_L02_0015F8FC = 0x10; +s32 D_L02_0015F900 = -28; +s32 D_L02_0015F904 = -44; +s32 D_L02_0015F908 = 6; +s32 D_L02_0015F90C = 0xff; +s32 D_L02_0015F910 = 0x800000ff; +s32 D_L02_0015F914 = 0x2d; +s32 D_L03_0015FA90 = 0; +void *D_L03_0015FAC0 = 0; +HudSelectorSlot *D_L03_0015F738 = D_L03_0017DBC0; +HudSelectorSlot *D_L03_0015F740 = D_L03_0017DCA0; +s32 D_L03_0015F718 = 0xd2; +s32 D_L03_0015F71C = 0xc8; +s32 D_L03_0015F72C = 0; +int D_L03_0015F780 = 8; +int D_L03_0015FA9C = 0; +int D_L03_0015FA98 = 0; +int D_L03_0015FA94 = 0; +float D_L03_0015F788 = 0.2f; +float D_L03_0015F784 = 0; +int D_L03_0015F720 = 0x69; +int D_L03_0015F724 = 0x64; +float D_L03_0015F78C = 74.0f; +int D_L03_0015F790 = 0xff8080; +int D_L03_0015F794 = 0x80ff8080; +int D_L03_0015F798 = 0; +int D_L03_0015F7A0 = 0x4040ff; +int D_L03_0015F7A4 = 0x804040ff; +int D_L03_0015F7A8 = 0x40e020; +int D_L03_0015F7B0 = 0x1e; +int D_L03_0015F7BC = 0; +float D_L03_0015F7C0 = 0.5f; +float D_L03_0015F7C4 = 1.05f; +Q2395b0 D_L03_0015FAB0 = {0}; s32 D_L03_0015F7F0 = 8; s32 D_L03_0015F7F8[1] = {0xffb0}; HudCounter D_L03_0015FAB8 = {0}; -s32 D_L03_0015F824 = 8; -s32 D_L03_0015F828 = 8; -s32 D_L03_0015F82C = 0xe08060; -s32 D_L03_0015F830 = 0x80e08060; -s32 D_L03_0015F84C = 0xd; -s32 D_L03_0015F834 = -32; -s32 D_L03_0015F838 = 8; -s32 D_L03_0015F83C = -30; -s32 D_L03_0015F840 = 0x15; -s32 D_L03_0015F844 = -29; -s32 D_L03_0015F848 = 0xa; -char D_L03_0015F858 = 0x27; -char D_L03_0015F860 = 0x2e; -s32 D_L03_0015F8F8 = 0x50; -s32 D_L03_0015F8FC = 0x10; -s32 D_L03_0015F900 = -28; -s32 D_L03_0015F904 = -44; -s32 D_L03_0015F908 = 6; -s32 D_L03_0015F90C = 0xff; -s32 D_L03_0015F910 = 0x800000ff; -s32 D_L03_0015F914 = 0x2d; -s32 D_L04_0015FA90 = 0; -void *D_L04_0015FAC0 = 0; -s32 D_L04_0015F738 = 0x17dc40; -s32 D_L04_0015F718 = 0xd2; -s32 D_L04_0015F71C = 0xc8; -s32 D_L04_0015F72C = 0; -int D_L04_0015F780 = 8; -int D_L04_0015FA9C = 0; -int D_L04_0017DDB8 NOT_SDA = 3; -int D_L04_0017DDBC NOT_SDA = 1; -int D_L04_0017DDC4 NOT_SDA = 2; -int D_L04_0015FA98 = 0; -int D_L04_0015FA94 = 0; -float D_L04_0015F788 = 0.2f; -float D_L04_0015F784 = 0; -int D_L04_0017DD98 NOT_SDA = 6; -int D_L04_0017DD9C NOT_SDA = 2; -int D_L04_0017DDA4 NOT_SDA = 4; -int D_L04_0015F720 = 0x69; -int D_L04_0015F724 = 0x64; -float D_L04_0015F78C = 74.0f; -int D_L04_0015F790 = 0xff8080; -int D_L04_0015F794 = 0x80ff8080; -int D_L04_0015F798 = 0; -int D_L04_0015F7A0 = 0x4040ff; -int D_L04_0015F7A4 = 0x804040ff; -int D_L04_0015F7A8 = 0x40e020; -int D_L04_0015F7B0 = 0x1e; -int D_L04_0015F7BC = 0; -float D_L04_0015F7C0 = 0.5f; -float D_L04_0015F7C4 = 1.05f; -int D_L04_0015F740 = 0x17dd20; -int D_L04_0015F7D4 = 0xe0c0a0; -int D_L04_0015F7D8 = 0x80e0c0a0; -int D_L04_0015F7DC = -8; +s32 D_L03_0015F824 = 8; +s32 D_L03_0015F828 = 8; +s32 D_L03_0015F82C = 0xe08060; +s32 D_L03_0015F830 = 0x80e08060; +s32 D_L03_0015F84C = 0xd; +s32 D_L03_0015F834 = -32; +s32 D_L03_0015F838 = 8; +s32 D_L03_0015F83C = -30; +s32 D_L03_0015F840 = 0x15; +s32 D_L03_0015F844 = -29; +s32 D_L03_0015F848 = 0xa; +char D_L03_0015F858 = 0x27; +char D_L03_0015F860 = 0x2e; +s32 D_L03_0015F8F8 = 0x50; +s32 D_L03_0015F8FC = 0x10; +s32 D_L03_0015F900 = -28; +s32 D_L03_0015F904 = -44; +s32 D_L03_0015F908 = 6; +s32 D_L03_0015F90C = 0xff; +s32 D_L03_0015F910 = 0x800000ff; +s32 D_L03_0015F914 = 0x2d; +s32 D_L04_0015FA90 = 0; +void *D_L04_0015FAC0 = 0; +HudSelectorSlot *D_L04_0015F738 = D_L04_0017DC40; +s32 D_L04_0015F718 = 0xd2; +s32 D_L04_0015F71C = 0xc8; +s32 D_L04_0015F72C = 0; +int D_L04_0015F780 = 8; +int D_L04_0015FA9C = 0; +int D_L04_0015FA98 = 0; +int D_L04_0015FA94 = 0; +float D_L04_0015F788 = 0.2f; +float D_L04_0015F784 = 0; +int D_L04_0015F720 = 0x69; +int D_L04_0015F724 = 0x64; +float D_L04_0015F78C = 74.0f; +int D_L04_0015F790 = 0xff8080; +int D_L04_0015F794 = 0x80ff8080; +int D_L04_0015F798 = 0; +int D_L04_0015F7A0 = 0x4040ff; +int D_L04_0015F7A4 = 0x804040ff; +int D_L04_0015F7A8 = 0x40e020; +int D_L04_0015F7B0 = 0x1e; +int D_L04_0015F7BC = 0; +float D_L04_0015F7C0 = 0.5f; +float D_L04_0015F7C4 = 1.05f; +HudSelectorSlot *D_L04_0015F740 = D_L04_0017DD20; +int D_L04_0015F7D4 = 0xe0c0a0; +int D_L04_0015F7D8 = 0x80e0c0a0; +int D_L04_0015F7DC = -8; Ids D_L04_0015F7E0 = { {0x521c, 0x521d, 0x521f, 0x521e} @@ -1748,118 +1843,110 @@ s32 D_L04_0015F7F8[1] = {0xffb0}; HudCounter D_L04_0015FAB8 = {0}; -s32 D_L04_0015F824 = 8; -s32 D_L04_0015F828 = 8; -s32 D_L04_0015F82C = 0xe08060; -s32 D_L04_0015F830 = 0x80e08060; -s32 D_L04_0015F84C = 0xd; -s32 D_L04_0015F834 = -32; -s32 D_L04_0015F838 = 8; -s32 D_L04_0015F83C = -30; -s32 D_L04_0015F840 = 0x15; -s32 D_L04_0015F844 = -29; -s32 D_L04_0015F848 = 0xa; -char D_L04_0015F858 = 0x27; -char D_L04_0015F860 = 0x2e; -s32 D_L04_0015F8F8 = 0x50; -s32 D_L04_0015F8FC = 0x10; -s32 D_L04_0015F900 = -28; -s32 D_L04_0015F904 = -44; -s32 D_L04_0015F908 = 6; -s32 D_L04_0015F90C = 0xff; -s32 D_L04_0015F910 = 0x800000ff; -s32 D_L04_0015F914 = 0x2d; -s32 D_L05_0015FAA0 = 0; -void *D_L05_0015FAD0 = 0; -s32 D_L05_0015F748 = 0x17df40; -s32 D_L05_0015F728 = 0xd2; -s32 D_L05_0015F72C = 0xc8; -s32 D_L05_0015F73C = 0; -int D_L05_0015F790 = 8; -int D_L05_0015FAAC = 0; -int D_L05_0015FAA8 = 0; -int D_L05_0015FAA4 = 0; -float D_L05_0015F798 = 0.2f; -float D_L05_0015F794 = 0; -int D_L05_0017E098 NOT_SDA = 6; -int D_L05_0017E09C NOT_SDA = 2; -int D_L05_0017E0A4 NOT_SDA = 4; -int D_L05_0015F730 = 0x69; -int D_L05_0015F734 = 0x64; -float D_L05_0015F79C = 74.0f; -int D_L05_0015F7A0 = 0xff8080; -int D_L05_0015F7A4 = 0x80ff8080; -int D_L05_0015F7A8 = 0; -int D_L05_0015F7B0 = 0x4040ff; -int D_L05_0015F7B4 = 0x804040ff; -int D_L05_0015F7B8 = 0x40e020; -int D_L05_0015F7C0 = 0x1e; -int D_L05_0015F7CC = 0; -float D_L05_0015F7D0 = 0.5f; -float D_L05_0015F7D4 = 1.05f; -Q2395b0 D_L05_0015FAC0 = {0}; +s32 D_L04_0015F824 = 8; +s32 D_L04_0015F828 = 8; +s32 D_L04_0015F82C = 0xe08060; +s32 D_L04_0015F830 = 0x80e08060; +s32 D_L04_0015F84C = 0xd; +s32 D_L04_0015F834 = -32; +s32 D_L04_0015F838 = 8; +s32 D_L04_0015F83C = -30; +s32 D_L04_0015F840 = 0x15; +s32 D_L04_0015F844 = -29; +s32 D_L04_0015F848 = 0xa; +char D_L04_0015F858 = 0x27; +char D_L04_0015F860 = 0x2e; +s32 D_L04_0015F8F8 = 0x50; +s32 D_L04_0015F8FC = 0x10; +s32 D_L04_0015F900 = -28; +s32 D_L04_0015F904 = -44; +s32 D_L04_0015F908 = 6; +s32 D_L04_0015F90C = 0xff; +s32 D_L04_0015F910 = 0x800000ff; +s32 D_L04_0015F914 = 0x2d; +s32 D_L05_0015FAA0 = 0; +void *D_L05_0015FAD0 = 0; +HudSelectorSlot *D_L05_0015F748 = D_L05_0017DF40; +HudSelectorSlot *D_L05_0015F750 = D_L05_0017E020; +s32 D_L05_0015F728 = 0xd2; +s32 D_L05_0015F72C = 0xc8; +s32 D_L05_0015F73C = 0; +int D_L05_0015F790 = 8; +int D_L05_0015FAAC = 0; +int D_L05_0015FAA8 = 0; +int D_L05_0015FAA4 = 0; +float D_L05_0015F798 = 0.2f; +float D_L05_0015F794 = 0; +int D_L05_0015F730 = 0x69; +int D_L05_0015F734 = 0x64; +float D_L05_0015F79C = 74.0f; +int D_L05_0015F7A0 = 0xff8080; +int D_L05_0015F7A4 = 0x80ff8080; +int D_L05_0015F7A8 = 0; +int D_L05_0015F7B0 = 0x4040ff; +int D_L05_0015F7B4 = 0x804040ff; +int D_L05_0015F7B8 = 0x40e020; +int D_L05_0015F7C0 = 0x1e; +int D_L05_0015F7CC = 0; +float D_L05_0015F7D0 = 0.5f; +float D_L05_0015F7D4 = 1.05f; +Q2395b0 D_L05_0015FAC0 = {0}; s32 D_L05_0015F800 = 8; s32 D_L05_0015F808[1] = {0xffb0}; HudCounter D_L05_0015FAC8 = {0}; -s32 D_L05_0015F834 = 8; -s32 D_L05_0015F838 = 8; -s32 D_L05_0015F83C = 0xe08060; -s32 D_L05_0015F840 = 0x80e08060; -s32 D_L05_0015F85C = 0xd; -s32 D_L05_0015F844 = -32; -s32 D_L05_0015F848 = 8; -s32 D_L05_0015F84C = -30; -s32 D_L05_0015F850 = 0x15; -s32 D_L05_0015F854 = -29; -s32 D_L05_0015F858 = 0xa; -char D_L05_0015F868 = 0x27; -char D_L05_0015F870 = 0x2e; -s32 D_L05_0015F908 = 0x50; -s32 D_L05_0015F90C = 0x10; -s32 D_L05_0015F910 = -28; -s32 D_L05_0015F914 = -44; -s32 D_L05_0015F918 = 6; -s32 D_L05_0015F91C = 0xff; -s32 D_L05_0015F920 = 0x800000ff; -s32 D_L05_0015F924 = 0x2d; -s32 D_L06_0015FA90 = 0; -void *D_L06_0015FAC0 = 0; -s32 D_L06_0015F738 = 0x17e240; -s32 D_L06_0015F718 = 0xd2; -s32 D_L06_0015F71C = 0xc8; -s32 D_L06_0015F72C = 0; -int D_L06_0015F780 = 8; -int D_L06_0015FA9C = 0; -int D_L06_0017E3B8 NOT_SDA = 3; -int D_L06_0017E3BC NOT_SDA = 1; -int D_L06_0017E3C4 NOT_SDA = 2; -int D_L06_0015FA98 = 0; -int D_L06_0015FA94 = 0; -float D_L06_0015F788 = 0.2f; -float D_L06_0015F784 = 0; -int D_L06_0017E398 NOT_SDA = 6; -int D_L06_0017E39C NOT_SDA = 2; -int D_L06_0017E3A4 NOT_SDA = 4; -int D_L06_0015F720 = 0x69; -int D_L06_0015F724 = 0x64; -float D_L06_0015F78C = 74.0f; -int D_L06_0015F790 = 0xff8080; -int D_L06_0015F794 = 0x80ff8080; -int D_L06_0015F798 = 0; -int D_L06_0015F7A0 = 0x4040ff; -int D_L06_0015F7A4 = 0x804040ff; -int D_L06_0015F7A8 = 0x40e020; -int D_L06_0015F7B0 = 0x1e; -int D_L06_0015F7BC = 0; -float D_L06_0015F7C0 = 0.5f; -float D_L06_0015F7C4 = 1.05f; -int D_L06_0015F740 = 0x17e320; -int D_L06_0015F7D4 = 0xe0c0a0; -int D_L06_0015F7D8 = 0x80e0c0a0; -int D_L06_0015F7DC = -8; +s32 D_L05_0015F834 = 8; +s32 D_L05_0015F838 = 8; +s32 D_L05_0015F83C = 0xe08060; +s32 D_L05_0015F840 = 0x80e08060; +s32 D_L05_0015F85C = 0xd; +s32 D_L05_0015F844 = -32; +s32 D_L05_0015F848 = 8; +s32 D_L05_0015F84C = -30; +s32 D_L05_0015F850 = 0x15; +s32 D_L05_0015F854 = -29; +s32 D_L05_0015F858 = 0xa; +char D_L05_0015F868 = 0x27; +char D_L05_0015F870 = 0x2e; +s32 D_L05_0015F908 = 0x50; +s32 D_L05_0015F90C = 0x10; +s32 D_L05_0015F910 = -28; +s32 D_L05_0015F914 = -44; +s32 D_L05_0015F918 = 6; +s32 D_L05_0015F91C = 0xff; +s32 D_L05_0015F920 = 0x800000ff; +s32 D_L05_0015F924 = 0x2d; +s32 D_L06_0015FA90 = 0; +void *D_L06_0015FAC0 = 0; +HudSelectorSlot *D_L06_0015F738 = D_L06_0017E240; +s32 D_L06_0015F718 = 0xd2; +s32 D_L06_0015F71C = 0xc8; +s32 D_L06_0015F72C = 0; +int D_L06_0015F780 = 8; +int D_L06_0015FA9C = 0; +int D_L06_0015FA98 = 0; +int D_L06_0015FA94 = 0; +float D_L06_0015F788 = 0.2f; +float D_L06_0015F784 = 0; +int D_L06_0015F720 = 0x69; +int D_L06_0015F724 = 0x64; +float D_L06_0015F78C = 74.0f; +int D_L06_0015F790 = 0xff8080; +int D_L06_0015F794 = 0x80ff8080; +int D_L06_0015F798 = 0; +int D_L06_0015F7A0 = 0x4040ff; +int D_L06_0015F7A4 = 0x804040ff; +int D_L06_0015F7A8 = 0x40e020; +int D_L06_0015F7B0 = 0x1e; +int D_L06_0015F7BC = 0; +float D_L06_0015F7C0 = 0.5f; +float D_L06_0015F7C4 = 1.05f; +HudSelectorSlot *D_L06_0015F740 = D_L06_0017E320; +int D_L06_0015F7D4 = 0xe0c0a0; +int D_L06_0015F7D8 = 0x80e0c0a0; +int D_L06_0015F7DC = -8; Ids D_L06_0015F7E0 = { {0x521c, 0x521d, 0x521f, 0x521e} @@ -1872,62 +1959,56 @@ s32 D_L06_0015F7F8[1] = {0xffb0}; HudCounter D_L06_0015FAB8 = {0}; -s32 D_L06_0015F824 = 8; -s32 D_L06_0015F828 = 8; -s32 D_L06_0015F82C = 0xe08060; -s32 D_L06_0015F830 = 0x80e08060; -s32 D_L06_0015F84C = 0xd; -s32 D_L06_0015F834 = -32; -s32 D_L06_0015F838 = 8; -s32 D_L06_0015F83C = -30; -s32 D_L06_0015F840 = 0x15; -s32 D_L06_0015F844 = -29; -s32 D_L06_0015F848 = 0xa; -char D_L06_0015F858 = 0x27; -char D_L06_0015F860 = 0x2e; -s32 D_L06_0015F8F8 = 0x50; -s32 D_L06_0015F8FC = 0x10; -s32 D_L06_0015F900 = -28; -s32 D_L06_0015F904 = -44; -s32 D_L06_0015F908 = 6; -s32 D_L06_0015F90C = 0xff; -s32 D_L06_0015F910 = 0x800000ff; -s32 D_L06_0015F914 = 0x2d; -s32 D_L07_0015FA90 = 0; -void *D_L07_0015FAC0 = 0; -s32 D_L07_0015F738 = 0x17db40; -s32 D_L07_0015F718 = 0xd2; -s32 D_L07_0015F71C = 0xc8; -s32 D_L07_0015F72C = 0; -int D_L07_0015F780 = 8; -int D_L07_0015FA9C = 0; -int D_L07_0017DCB8 NOT_SDA = 3; -int D_L07_0017DCBC NOT_SDA = 1; -int D_L07_0017DCC4 NOT_SDA = 2; -int D_L07_0015FA98 = 0; -int D_L07_0015FA94 = 0; -float D_L07_0015F788 = 0.2f; -float D_L07_0015F784 = 0; -int D_L07_0017DC98 NOT_SDA = 6; -int D_L07_0017DC9C NOT_SDA = 2; -int D_L07_0017DCA4 NOT_SDA = 4; -int D_L07_0015F720 = 0x69; -int D_L07_0015F724 = 0x64; -float D_L07_0015F78C = 74.0f; -int D_L07_0015F790 = 0xff8080; -int D_L07_0015F794 = 0x80ff8080; -int D_L07_0015F798 = 0; -int D_L07_0015F7A0 = 0x4040ff; -int D_L07_0015F7A4 = 0x804040ff; -int D_L07_0015F7A8 = 0x40e020; -int D_L07_0015F7B0 = 0x1e; -int D_L07_0015F7BC = 0; -float D_L07_0015F7C0 = 0.5f; -float D_L07_0015F7C4 = 1.05f; -int D_L07_0015F740 = 0x17dc20; -int D_L07_0015F7D4 = 0xe0c0a0; -int D_L07_0015F7D8 = 0x80e0c0a0; -int D_L07_0015F7DC = -8; +s32 D_L06_0015F824 = 8; +s32 D_L06_0015F828 = 8; +s32 D_L06_0015F82C = 0xe08060; +s32 D_L06_0015F830 = 0x80e08060; +s32 D_L06_0015F84C = 0xd; +s32 D_L06_0015F834 = -32; +s32 D_L06_0015F838 = 8; +s32 D_L06_0015F83C = -30; +s32 D_L06_0015F840 = 0x15; +s32 D_L06_0015F844 = -29; +s32 D_L06_0015F848 = 0xa; +char D_L06_0015F858 = 0x27; +char D_L06_0015F860 = 0x2e; +s32 D_L06_0015F8F8 = 0x50; +s32 D_L06_0015F8FC = 0x10; +s32 D_L06_0015F900 = -28; +s32 D_L06_0015F904 = -44; +s32 D_L06_0015F908 = 6; +s32 D_L06_0015F90C = 0xff; +s32 D_L06_0015F910 = 0x800000ff; +s32 D_L06_0015F914 = 0x2d; +s32 D_L07_0015FA90 = 0; +void *D_L07_0015FAC0 = 0; +HudSelectorSlot *D_L07_0015F738 = D_L07_0017DB40; +s32 D_L07_0015F718 = 0xd2; +s32 D_L07_0015F71C = 0xc8; +s32 D_L07_0015F72C = 0; +int D_L07_0015F780 = 8; +int D_L07_0015FA9C = 0; +int D_L07_0015FA98 = 0; +int D_L07_0015FA94 = 0; +float D_L07_0015F788 = 0.2f; +float D_L07_0015F784 = 0; +int D_L07_0015F720 = 0x69; +int D_L07_0015F724 = 0x64; +float D_L07_0015F78C = 74.0f; +int D_L07_0015F790 = 0xff8080; +int D_L07_0015F794 = 0x80ff8080; +int D_L07_0015F798 = 0; +int D_L07_0015F7A0 = 0x4040ff; +int D_L07_0015F7A4 = 0x804040ff; +int D_L07_0015F7A8 = 0x40e020; +int D_L07_0015F7B0 = 0x1e; +int D_L07_0015F7BC = 0; +float D_L07_0015F7C0 = 0.5f; +float D_L07_0015F7C4 = 1.05f; +HudSelectorSlot *D_L07_0015F740 = D_L07_0017DC20; +int D_L07_0015F7D4 = 0xe0c0a0; +int D_L07_0015F7D8 = 0x80e0c0a0; +int D_L07_0015F7DC = -8; Ids D_L07_0015F7E0 = { {0x521c, 0x521d, 0x521f, 0x521e} @@ -1940,118 +2021,110 @@ s32 D_L07_0015F7F8[1] = {0xffb0}; HudCounter D_L07_0015FAB8 = {0}; -s32 D_L07_0015F824 = 8; -s32 D_L07_0015F828 = 8; -s32 D_L07_0015F82C = 0xe08060; -s32 D_L07_0015F830 = 0x80e08060; -s32 D_L07_0015F84C = 0xd; -s32 D_L07_0015F834 = -32; -s32 D_L07_0015F838 = 8; -s32 D_L07_0015F83C = -30; -s32 D_L07_0015F840 = 0x15; -s32 D_L07_0015F844 = -29; -s32 D_L07_0015F848 = 0xa; -char D_L07_0015F858 = 0x27; -char D_L07_0015F860 = 0x2e; -s32 D_L07_0015F8F8 = 0x50; -s32 D_L07_0015F8FC = 0x10; -s32 D_L07_0015F900 = -28; -s32 D_L07_0015F904 = -44; -s32 D_L07_0015F908 = 6; -s32 D_L07_0015F90C = 0xff; -s32 D_L07_0015F910 = 0x800000ff; -s32 D_L07_0015F914 = 0x2d; -s32 D_L08_0015FA90 = 0; -void *D_L08_0015FAC0 = 0; -s32 D_L08_0015F738 = 0x17e2c0; -s32 D_L08_0015F718 = 0xd2; -s32 D_L08_0015F71C = 0xc8; -s32 D_L08_0015F72C = 0; -int D_L08_0015F780 = 8; -int D_L08_0015FA9C = 0; -int D_L08_0015FA98 = 0; -int D_L08_0015FA94 = 0; -float D_L08_0015F788 = 0.2f; -float D_L08_0015F784 = 0; -int D_L08_0017E418 NOT_SDA = 6; -int D_L08_0017E41C NOT_SDA = 2; -int D_L08_0017E424 NOT_SDA = 4; -int D_L08_0015F720 = 0x69; -int D_L08_0015F724 = 0x64; -float D_L08_0015F78C = 74.0f; -int D_L08_0015F790 = 0xff8080; -int D_L08_0015F794 = 0x80ff8080; -int D_L08_0015F798 = 0; -int D_L08_0015F7A0 = 0x4040ff; -int D_L08_0015F7A4 = 0x804040ff; -int D_L08_0015F7A8 = 0x40e020; -int D_L08_0015F7B0 = 0x1e; -int D_L08_0015F7BC = 0; -float D_L08_0015F7C0 = 0.5f; -float D_L08_0015F7C4 = 1.05f; -Q2395b0 D_L08_0015FAB0 = {0}; +s32 D_L07_0015F824 = 8; +s32 D_L07_0015F828 = 8; +s32 D_L07_0015F82C = 0xe08060; +s32 D_L07_0015F830 = 0x80e08060; +s32 D_L07_0015F84C = 0xd; +s32 D_L07_0015F834 = -32; +s32 D_L07_0015F838 = 8; +s32 D_L07_0015F83C = -30; +s32 D_L07_0015F840 = 0x15; +s32 D_L07_0015F844 = -29; +s32 D_L07_0015F848 = 0xa; +char D_L07_0015F858 = 0x27; +char D_L07_0015F860 = 0x2e; +s32 D_L07_0015F8F8 = 0x50; +s32 D_L07_0015F8FC = 0x10; +s32 D_L07_0015F900 = -28; +s32 D_L07_0015F904 = -44; +s32 D_L07_0015F908 = 6; +s32 D_L07_0015F90C = 0xff; +s32 D_L07_0015F910 = 0x800000ff; +s32 D_L07_0015F914 = 0x2d; +s32 D_L08_0015FA90 = 0; +void *D_L08_0015FAC0 = 0; +HudSelectorSlot *D_L08_0015F738 = D_L08_0017E2C0; +HudSelectorSlot *D_L08_0015F740 = D_L08_0017E3A0; +s32 D_L08_0015F718 = 0xd2; +s32 D_L08_0015F71C = 0xc8; +s32 D_L08_0015F72C = 0; +int D_L08_0015F780 = 8; +int D_L08_0015FA9C = 0; +int D_L08_0015FA98 = 0; +int D_L08_0015FA94 = 0; +float D_L08_0015F788 = 0.2f; +float D_L08_0015F784 = 0; +int D_L08_0015F720 = 0x69; +int D_L08_0015F724 = 0x64; +float D_L08_0015F78C = 74.0f; +int D_L08_0015F790 = 0xff8080; +int D_L08_0015F794 = 0x80ff8080; +int D_L08_0015F798 = 0; +int D_L08_0015F7A0 = 0x4040ff; +int D_L08_0015F7A4 = 0x804040ff; +int D_L08_0015F7A8 = 0x40e020; +int D_L08_0015F7B0 = 0x1e; +int D_L08_0015F7BC = 0; +float D_L08_0015F7C0 = 0.5f; +float D_L08_0015F7C4 = 1.05f; +Q2395b0 D_L08_0015FAB0 = {0}; s32 D_L08_0015F7F0 = 8; s32 D_L08_0015F7F8[1] = {0xffb0}; HudCounter D_L08_0015FAB8 = {0}; -s32 D_L08_0015F824 = 8; -s32 D_L08_0015F828 = 8; -s32 D_L08_0015F82C = 0xe08060; -s32 D_L08_0015F830 = 0x80e08060; -s32 D_L08_0015F84C = 0xd; -s32 D_L08_0015F834 = -32; -s32 D_L08_0015F838 = 8; -s32 D_L08_0015F83C = -30; -s32 D_L08_0015F840 = 0x15; -s32 D_L08_0015F844 = -29; -s32 D_L08_0015F848 = 0xa; -char D_L08_0015F858 = 0x27; -char D_L08_0015F860 = 0x2e; -s32 D_L08_0015F8F8 = 0x50; -s32 D_L08_0015F8FC = 0x10; -s32 D_L08_0015F900 = -28; -s32 D_L08_0015F904 = -44; -s32 D_L08_0015F908 = 6; -s32 D_L08_0015F90C = 0xff; -s32 D_L08_0015F910 = 0x800000ff; -s32 D_L08_0015F914 = 0x2d; -s32 D_L09_0015FA90 = 0; -void *D_L09_0015FAC0 = 0; -s32 D_L09_0015F738 = 0x17dc40; -s32 D_L09_0015F718 = 0xd2; -s32 D_L09_0015F71C = 0xc8; -s32 D_L09_0015F72C = 0; -int D_L09_0015F780 = 8; -int D_L09_0015FA9C = 0; -int D_L09_0017DDB8 NOT_SDA = 3; -int D_L09_0017DDBC NOT_SDA = 1; -int D_L09_0017DDC4 NOT_SDA = 2; -int D_L09_0015FA98 = 0; -int D_L09_0015FA94 = 0; -float D_L09_0015F788 = 0.2f; -float D_L09_0015F784 = 0; -int D_L09_0017DD98 NOT_SDA = 6; -int D_L09_0017DD9C NOT_SDA = 2; -int D_L09_0017DDA4 NOT_SDA = 4; -int D_L09_0015F720 = 0x69; -int D_L09_0015F724 = 0x64; -float D_L09_0015F78C = 74.0f; -int D_L09_0015F790 = 0xff8080; -int D_L09_0015F794 = 0x80ff8080; -int D_L09_0015F798 = 0; -int D_L09_0015F7A0 = 0x4040ff; -int D_L09_0015F7A4 = 0x804040ff; -int D_L09_0015F7A8 = 0x40e020; -int D_L09_0015F7B0 = 0x1e; -int D_L09_0015F7BC = 0; -float D_L09_0015F7C0 = 0.5f; -float D_L09_0015F7C4 = 1.05f; -int D_L09_0015F740 = 0x17dd20; -int D_L09_0015F7D4 = 0xe0c0a0; -int D_L09_0015F7D8 = 0x80e0c0a0; -int D_L09_0015F7DC = -8; +s32 D_L08_0015F824 = 8; +s32 D_L08_0015F828 = 8; +s32 D_L08_0015F82C = 0xe08060; +s32 D_L08_0015F830 = 0x80e08060; +s32 D_L08_0015F84C = 0xd; +s32 D_L08_0015F834 = -32; +s32 D_L08_0015F838 = 8; +s32 D_L08_0015F83C = -30; +s32 D_L08_0015F840 = 0x15; +s32 D_L08_0015F844 = -29; +s32 D_L08_0015F848 = 0xa; +char D_L08_0015F858 = 0x27; +char D_L08_0015F860 = 0x2e; +s32 D_L08_0015F8F8 = 0x50; +s32 D_L08_0015F8FC = 0x10; +s32 D_L08_0015F900 = -28; +s32 D_L08_0015F904 = -44; +s32 D_L08_0015F908 = 6; +s32 D_L08_0015F90C = 0xff; +s32 D_L08_0015F910 = 0x800000ff; +s32 D_L08_0015F914 = 0x2d; +s32 D_L09_0015FA90 = 0; +void *D_L09_0015FAC0 = 0; +HudSelectorSlot *D_L09_0015F738 = D_L09_0017DC40; +s32 D_L09_0015F718 = 0xd2; +s32 D_L09_0015F71C = 0xc8; +s32 D_L09_0015F72C = 0; +int D_L09_0015F780 = 8; +int D_L09_0015FA9C = 0; +int D_L09_0015FA98 = 0; +int D_L09_0015FA94 = 0; +float D_L09_0015F788 = 0.2f; +float D_L09_0015F784 = 0; +int D_L09_0015F720 = 0x69; +int D_L09_0015F724 = 0x64; +float D_L09_0015F78C = 74.0f; +int D_L09_0015F790 = 0xff8080; +int D_L09_0015F794 = 0x80ff8080; +int D_L09_0015F798 = 0; +int D_L09_0015F7A0 = 0x4040ff; +int D_L09_0015F7A4 = 0x804040ff; +int D_L09_0015F7A8 = 0x40e020; +int D_L09_0015F7B0 = 0x1e; +int D_L09_0015F7BC = 0; +float D_L09_0015F7C0 = 0.5f; +float D_L09_0015F7C4 = 1.05f; +HudSelectorSlot *D_L09_0015F740 = D_L09_0017DD20; +int D_L09_0015F7D4 = 0xe0c0a0; +int D_L09_0015F7D8 = 0x80e0c0a0; +int D_L09_0015F7DC = -8; Ids D_L09_0015F7E0 = { {0x521c, 0x521d, 0x521f, 0x521e} @@ -2064,62 +2137,56 @@ s32 D_L09_0015F7F8[1] = {0xffb0}; HudCounter D_L09_0015FAB8 = {0}; -s32 D_L09_0015F824 = 8; -s32 D_L09_0015F828 = 8; -s32 D_L09_0015F82C = 0xe08060; -s32 D_L09_0015F830 = 0x80e08060; -s32 D_L09_0015F84C = 0xd; -s32 D_L09_0015F834 = -32; -s32 D_L09_0015F838 = 8; -s32 D_L09_0015F83C = -30; -s32 D_L09_0015F840 = 0x15; -s32 D_L09_0015F844 = -29; -s32 D_L09_0015F848 = 0xa; -char D_L09_0015F858 = 0x27; -char D_L09_0015F860 = 0x2e; -s32 D_L09_0015F8F8 = 0x50; -s32 D_L09_0015F8FC = 0x10; -s32 D_L09_0015F900 = -28; -s32 D_L09_0015F904 = -44; -s32 D_L09_0015F908 = 6; -s32 D_L09_0015F90C = 0xff; -s32 D_L09_0015F910 = 0x800000ff; -s32 D_L09_0015F914 = 0x2d; -s32 D_L10_0015FA90 = 0; -void *D_L10_0015FAC0 = 0; -s32 D_L10_0015F738 = 0x17df40; -s32 D_L10_0015F718 = 0xd2; -s32 D_L10_0015F71C = 0xc8; -s32 D_L10_0015F72C = 0; -int D_L10_0015F780 = 8; -int D_L10_0015FA9C = 0; -int D_L10_0017E0B8 NOT_SDA = 3; -int D_L10_0017E0BC NOT_SDA = 1; -int D_L10_0017E0C4 NOT_SDA = 2; -int D_L10_0015FA98 = 0; -int D_L10_0015FA94 = 0; -float D_L10_0015F788 = 0.2f; -float D_L10_0015F784 = 0; -int D_L10_0017E098 NOT_SDA = 6; -int D_L10_0017E09C NOT_SDA = 2; -int D_L10_0017E0A4 NOT_SDA = 4; -int D_L10_0015F720 = 0x69; -int D_L10_0015F724 = 0x64; -float D_L10_0015F78C = 74.0f; -int D_L10_0015F790 = 0xff8080; -int D_L10_0015F794 = 0x80ff8080; -int D_L10_0015F798 = 0; -int D_L10_0015F7A0 = 0x4040ff; -int D_L10_0015F7A4 = 0x804040ff; -int D_L10_0015F7A8 = 0x40e020; -int D_L10_0015F7B0 = 0x1e; -int D_L10_0015F7BC = 0; -float D_L10_0015F7C0 = 0.5f; -float D_L10_0015F7C4 = 1.05f; -int D_L10_0015F740 = 0x17e020; -int D_L10_0015F7D4 = 0xe0c0a0; -int D_L10_0015F7D8 = 0x80e0c0a0; -int D_L10_0015F7DC = -8; +s32 D_L09_0015F824 = 8; +s32 D_L09_0015F828 = 8; +s32 D_L09_0015F82C = 0xe08060; +s32 D_L09_0015F830 = 0x80e08060; +s32 D_L09_0015F84C = 0xd; +s32 D_L09_0015F834 = -32; +s32 D_L09_0015F838 = 8; +s32 D_L09_0015F83C = -30; +s32 D_L09_0015F840 = 0x15; +s32 D_L09_0015F844 = -29; +s32 D_L09_0015F848 = 0xa; +char D_L09_0015F858 = 0x27; +char D_L09_0015F860 = 0x2e; +s32 D_L09_0015F8F8 = 0x50; +s32 D_L09_0015F8FC = 0x10; +s32 D_L09_0015F900 = -28; +s32 D_L09_0015F904 = -44; +s32 D_L09_0015F908 = 6; +s32 D_L09_0015F90C = 0xff; +s32 D_L09_0015F910 = 0x800000ff; +s32 D_L09_0015F914 = 0x2d; +s32 D_L10_0015FA90 = 0; +void *D_L10_0015FAC0 = 0; +HudSelectorSlot *D_L10_0015F738 = D_L10_0017DF40; +s32 D_L10_0015F718 = 0xd2; +s32 D_L10_0015F71C = 0xc8; +s32 D_L10_0015F72C = 0; +int D_L10_0015F780 = 8; +int D_L10_0015FA9C = 0; +int D_L10_0015FA98 = 0; +int D_L10_0015FA94 = 0; +float D_L10_0015F788 = 0.2f; +float D_L10_0015F784 = 0; +int D_L10_0015F720 = 0x69; +int D_L10_0015F724 = 0x64; +float D_L10_0015F78C = 74.0f; +int D_L10_0015F790 = 0xff8080; +int D_L10_0015F794 = 0x80ff8080; +int D_L10_0015F798 = 0; +int D_L10_0015F7A0 = 0x4040ff; +int D_L10_0015F7A4 = 0x804040ff; +int D_L10_0015F7A8 = 0x40e020; +int D_L10_0015F7B0 = 0x1e; +int D_L10_0015F7BC = 0; +float D_L10_0015F7C0 = 0.5f; +float D_L10_0015F7C4 = 1.05f; +HudSelectorSlot *D_L10_0015F740 = D_L10_0017E020; +int D_L10_0015F7D4 = 0xe0c0a0; +int D_L10_0015F7D8 = 0x80e0c0a0; +int D_L10_0015F7DC = -8; Ids D_L10_0015F7E0 = { {0x521c, 0x521d, 0x521f, 0x521e} @@ -2132,174 +2199,164 @@ s32 D_L10_0015F7F8[1] = {0xffb0}; HudCounter D_L10_0015FAB8 = {0}; -s32 D_L10_0015F824 = 8; -s32 D_L10_0015F828 = 8; -s32 D_L10_0015F82C = 0xe08060; -s32 D_L10_0015F830 = 0x80e08060; -s32 D_L10_0015F84C = 0xd; -s32 D_L10_0015F834 = -32; -s32 D_L10_0015F838 = 8; -s32 D_L10_0015F83C = -30; -s32 D_L10_0015F840 = 0x15; -s32 D_L10_0015F844 = -29; -s32 D_L10_0015F848 = 0xa; -char D_L10_0015F858 = 0x27; -char D_L10_0015F860 = 0x2e; -s32 D_L10_0015F8F8 = 0x50; -s32 D_L10_0015F8FC = 0x10; -s32 D_L10_0015F900 = -28; -s32 D_L10_0015F904 = -44; -s32 D_L10_0015F908 = 6; -s32 D_L10_0015F90C = 0xff; -s32 D_L10_0015F910 = 0x800000ff; -s32 D_L10_0015F914 = 0x2d; -s32 D_L11_0015FA90 = 0; -void *D_L11_0015FAC0 = 0; -s32 D_L11_0015F738 = 0x17e4c0; -s32 D_L11_0015F718 = 0xd2; -s32 D_L11_0015F71C = 0xc8; -s32 D_L11_0015F72C = 0; -int D_L11_0015F780 = 8; -int D_L11_0015FA9C = 0; -int D_L11_0015FA98 = 0; -int D_L11_0015FA94 = 0; -float D_L11_0015F788 = 0.2f; -float D_L11_0015F784 = 0; -int D_L11_0017E618 NOT_SDA = 6; -int D_L11_0017E61C NOT_SDA = 2; -int D_L11_0017E624 NOT_SDA = 4; -int D_L11_0015F720 = 0x69; -int D_L11_0015F724 = 0x64; -float D_L11_0015F78C = 74.0f; -int D_L11_0015F790 = 0xff8080; -int D_L11_0015F794 = 0x80ff8080; -int D_L11_0015F798 = 0; -int D_L11_0015F7A0 = 0x4040ff; -int D_L11_0015F7A4 = 0x804040ff; -int D_L11_0015F7A8 = 0x40e020; -int D_L11_0015F7B0 = 0x1e; -int D_L11_0015F7BC = 0; -float D_L11_0015F7C0 = 0.5f; -float D_L11_0015F7C4 = 1.05f; -Q2395b0 D_L11_0015FAB0 = {0}; +s32 D_L10_0015F824 = 8; +s32 D_L10_0015F828 = 8; +s32 D_L10_0015F82C = 0xe08060; +s32 D_L10_0015F830 = 0x80e08060; +s32 D_L10_0015F84C = 0xd; +s32 D_L10_0015F834 = -32; +s32 D_L10_0015F838 = 8; +s32 D_L10_0015F83C = -30; +s32 D_L10_0015F840 = 0x15; +s32 D_L10_0015F844 = -29; +s32 D_L10_0015F848 = 0xa; +char D_L10_0015F858 = 0x27; +char D_L10_0015F860 = 0x2e; +s32 D_L10_0015F8F8 = 0x50; +s32 D_L10_0015F8FC = 0x10; +s32 D_L10_0015F900 = -28; +s32 D_L10_0015F904 = -44; +s32 D_L10_0015F908 = 6; +s32 D_L10_0015F90C = 0xff; +s32 D_L10_0015F910 = 0x800000ff; +s32 D_L10_0015F914 = 0x2d; +s32 D_L11_0015FA90 = 0; +void *D_L11_0015FAC0 = 0; +HudSelectorSlot *D_L11_0015F738 = D_L11_0017E4C0; +HudSelectorSlot *D_L11_0015F740 = D_L11_0017E5A0; +s32 D_L11_0015F718 = 0xd2; +s32 D_L11_0015F71C = 0xc8; +s32 D_L11_0015F72C = 0; +int D_L11_0015F780 = 8; +int D_L11_0015FA9C = 0; +int D_L11_0015FA98 = 0; +int D_L11_0015FA94 = 0; +float D_L11_0015F788 = 0.2f; +float D_L11_0015F784 = 0; +int D_L11_0015F720 = 0x69; +int D_L11_0015F724 = 0x64; +float D_L11_0015F78C = 74.0f; +int D_L11_0015F790 = 0xff8080; +int D_L11_0015F794 = 0x80ff8080; +int D_L11_0015F798 = 0; +int D_L11_0015F7A0 = 0x4040ff; +int D_L11_0015F7A4 = 0x804040ff; +int D_L11_0015F7A8 = 0x40e020; +int D_L11_0015F7B0 = 0x1e; +int D_L11_0015F7BC = 0; +float D_L11_0015F7C0 = 0.5f; +float D_L11_0015F7C4 = 1.05f; +Q2395b0 D_L11_0015FAB0 = {0}; s32 D_L11_0015F7F0 = 8; s32 D_L11_0015F7F8[1] = {0xffb0}; HudCounter D_L11_0015FAB8 = {0}; -s32 D_L11_0015F824 = 8; -s32 D_L11_0015F828 = 8; -s32 D_L11_0015F82C = 0xe08060; -s32 D_L11_0015F830 = 0x80e08060; -s32 D_L11_0015F84C = 0xd; -s32 D_L11_0015F834 = -32; -s32 D_L11_0015F838 = 8; -s32 D_L11_0015F83C = -30; -s32 D_L11_0015F840 = 0x15; -s32 D_L11_0015F844 = -29; -s32 D_L11_0015F848 = 0xa; -char D_L11_0015F858 = 0x27; -char D_L11_0015F860 = 0x2e; -s32 D_L11_0015F8F8 = 0x50; -s32 D_L11_0015F8FC = 0x10; -s32 D_L11_0015F900 = -28; -s32 D_L11_0015F904 = -44; -s32 D_L11_0015F908 = 6; -s32 D_L11_0015F90C = 0xff; -s32 D_L11_0015F910 = 0x800000ff; -s32 D_L11_0015F914 = 0x2d; -s32 D_L12_0015FA90 = 0; -void *D_L12_0015FAC0 = 0; -s32 D_L12_0015F738 = 0x17df40; -s32 D_L12_0015F718 = 0xd2; -s32 D_L12_0015F71C = 0xc8; -s32 D_L12_0015F72C = 0; -int D_L12_0015F780 = 8; -int D_L12_0015FA9C = 0; -int D_L12_0015FA98 = 0; -int D_L12_0015FA94 = 0; -float D_L12_0015F788 = 0.2f; -float D_L12_0015F784 = 0; -int D_L12_0017E098 NOT_SDA = 6; -int D_L12_0017E09C NOT_SDA = 2; -int D_L12_0017E0A4 NOT_SDA = 4; -int D_L12_0015F720 = 0x69; -int D_L12_0015F724 = 0x64; -float D_L12_0015F78C = 74.0f; -int D_L12_0015F790 = 0xff8080; -int D_L12_0015F794 = 0x80ff8080; -int D_L12_0015F798 = 0; -int D_L12_0015F7A0 = 0x4040ff; -int D_L12_0015F7A4 = 0x804040ff; -int D_L12_0015F7A8 = 0x40e020; -int D_L12_0015F7B0 = 0x1e; -int D_L12_0015F7BC = 0; -float D_L12_0015F7C0 = 0.5f; -float D_L12_0015F7C4 = 1.05f; -Q2395b0 D_L12_0015FAB0 = {0}; +s32 D_L11_0015F824 = 8; +s32 D_L11_0015F828 = 8; +s32 D_L11_0015F82C = 0xe08060; +s32 D_L11_0015F830 = 0x80e08060; +s32 D_L11_0015F84C = 0xd; +s32 D_L11_0015F834 = -32; +s32 D_L11_0015F838 = 8; +s32 D_L11_0015F83C = -30; +s32 D_L11_0015F840 = 0x15; +s32 D_L11_0015F844 = -29; +s32 D_L11_0015F848 = 0xa; +char D_L11_0015F858 = 0x27; +char D_L11_0015F860 = 0x2e; +s32 D_L11_0015F8F8 = 0x50; +s32 D_L11_0015F8FC = 0x10; +s32 D_L11_0015F900 = -28; +s32 D_L11_0015F904 = -44; +s32 D_L11_0015F908 = 6; +s32 D_L11_0015F90C = 0xff; +s32 D_L11_0015F910 = 0x800000ff; +s32 D_L11_0015F914 = 0x2d; +s32 D_L12_0015FA90 = 0; +void *D_L12_0015FAC0 = 0; +HudSelectorSlot *D_L12_0015F738 = D_L12_0017DF40; +HudSelectorSlot *D_L12_0015F740 = D_L12_0017E020; +s32 D_L12_0015F718 = 0xd2; +s32 D_L12_0015F71C = 0xc8; +s32 D_L12_0015F72C = 0; +int D_L12_0015F780 = 8; +int D_L12_0015FA9C = 0; +int D_L12_0015FA98 = 0; +int D_L12_0015FA94 = 0; +float D_L12_0015F788 = 0.2f; +float D_L12_0015F784 = 0; +int D_L12_0015F720 = 0x69; +int D_L12_0015F724 = 0x64; +float D_L12_0015F78C = 74.0f; +int D_L12_0015F790 = 0xff8080; +int D_L12_0015F794 = 0x80ff8080; +int D_L12_0015F798 = 0; +int D_L12_0015F7A0 = 0x4040ff; +int D_L12_0015F7A4 = 0x804040ff; +int D_L12_0015F7A8 = 0x40e020; +int D_L12_0015F7B0 = 0x1e; +int D_L12_0015F7BC = 0; +float D_L12_0015F7C0 = 0.5f; +float D_L12_0015F7C4 = 1.05f; +Q2395b0 D_L12_0015FAB0 = {0}; s32 D_L12_0015F7F0 = 8; s32 D_L12_0015F7F8[1] = {0xffb0}; HudCounter D_L12_0015FAB8 = {0}; -s32 D_L12_0015F824 = 8; -s32 D_L12_0015F828 = 8; -s32 D_L12_0015F82C = 0xe08060; -s32 D_L12_0015F830 = 0x80e08060; -s32 D_L12_0015F84C = 0xd; -s32 D_L12_0015F834 = -32; -s32 D_L12_0015F838 = 8; -s32 D_L12_0015F83C = -30; -s32 D_L12_0015F840 = 0x15; -s32 D_L12_0015F844 = -29; -s32 D_L12_0015F848 = 0xa; -char D_L12_0015F858 = 0x27; -char D_L12_0015F860 = 0x2e; -s32 D_L12_0015F8F8 = 0x50; -s32 D_L12_0015F8FC = 0x10; -s32 D_L12_0015F900 = -28; -s32 D_L12_0015F904 = -44; -s32 D_L12_0015F908 = 6; -s32 D_L12_0015F90C = 0xff; -s32 D_L12_0015F910 = 0x800000ff; -s32 D_L12_0015F914 = 0x2d; -s32 D_L13_0015FA90 = 0; -void *D_L13_0015FAC0 = 0; -s32 D_L13_0015F738 = 0x17ddc0; -s32 D_L13_0015F718 = 0xd2; -s32 D_L13_0015F71C = 0xc8; -s32 D_L13_0015F72C = 0; -int D_L13_0015F780 = 8; -int D_L13_0015FA9C = 0; -int D_L13_0017DF38 NOT_SDA = 3; -int D_L13_0017DF3C NOT_SDA = 1; -int D_L13_0017DF44 NOT_SDA = 2; -int D_L13_0015FA98 = 0; -int D_L13_0015FA94 = 0; -float D_L13_0015F788 = 0.2f; -float D_L13_0015F784 = 0; -int D_L13_0017DF18 NOT_SDA = 6; -int D_L13_0017DF1C NOT_SDA = 2; -int D_L13_0017DF24 NOT_SDA = 4; -int D_L13_0015F720 = 0x69; -int D_L13_0015F724 = 0x64; -float D_L13_0015F78C = 74.0f; -int D_L13_0015F790 = 0xff8080; -int D_L13_0015F794 = 0x80ff8080; -int D_L13_0015F798 = 0; -int D_L13_0015F7A0 = 0x4040ff; -int D_L13_0015F7A4 = 0x804040ff; -int D_L13_0015F7A8 = 0x40e020; -int D_L13_0015F7B0 = 0x1e; -int D_L13_0015F7BC = 0; -float D_L13_0015F7C0 = 0.5f; -float D_L13_0015F7C4 = 1.05f; -int D_L13_0015F740 = 0x17dea0; -int D_L13_0015F7D4 = 0xe0c0a0; -int D_L13_0015F7D8 = 0x80e0c0a0; -int D_L13_0015F7DC = -8; +s32 D_L12_0015F824 = 8; +s32 D_L12_0015F828 = 8; +s32 D_L12_0015F82C = 0xe08060; +s32 D_L12_0015F830 = 0x80e08060; +s32 D_L12_0015F84C = 0xd; +s32 D_L12_0015F834 = -32; +s32 D_L12_0015F838 = 8; +s32 D_L12_0015F83C = -30; +s32 D_L12_0015F840 = 0x15; +s32 D_L12_0015F844 = -29; +s32 D_L12_0015F848 = 0xa; +char D_L12_0015F858 = 0x27; +char D_L12_0015F860 = 0x2e; +s32 D_L12_0015F8F8 = 0x50; +s32 D_L12_0015F8FC = 0x10; +s32 D_L12_0015F900 = -28; +s32 D_L12_0015F904 = -44; +s32 D_L12_0015F908 = 6; +s32 D_L12_0015F90C = 0xff; +s32 D_L12_0015F910 = 0x800000ff; +s32 D_L12_0015F914 = 0x2d; +s32 D_L13_0015FA90 = 0; +void *D_L13_0015FAC0 = 0; +HudSelectorSlot *D_L13_0015F738 = D_L13_0017DDC0; +s32 D_L13_0015F718 = 0xd2; +s32 D_L13_0015F71C = 0xc8; +s32 D_L13_0015F72C = 0; +int D_L13_0015F780 = 8; +int D_L13_0015FA9C = 0; +int D_L13_0015FA98 = 0; +int D_L13_0015FA94 = 0; +float D_L13_0015F788 = 0.2f; +float D_L13_0015F784 = 0; +int D_L13_0015F720 = 0x69; +int D_L13_0015F724 = 0x64; +float D_L13_0015F78C = 74.0f; +int D_L13_0015F790 = 0xff8080; +int D_L13_0015F794 = 0x80ff8080; +int D_L13_0015F798 = 0; +int D_L13_0015F7A0 = 0x4040ff; +int D_L13_0015F7A4 = 0x804040ff; +int D_L13_0015F7A8 = 0x40e020; +int D_L13_0015F7B0 = 0x1e; +int D_L13_0015F7BC = 0; +float D_L13_0015F7C0 = 0.5f; +float D_L13_0015F7C4 = 1.05f; +HudSelectorSlot *D_L13_0015F740 = D_L13_0017DEA0; +int D_L13_0015F7D4 = 0xe0c0a0; +int D_L13_0015F7D8 = 0x80e0c0a0; +int D_L13_0015F7DC = -8; Ids D_L13_0015F7E0 = { {0x521c, 0x521d, 0x521f, 0x521e} @@ -2312,230 +2369,218 @@ s32 D_L13_0015F7F8[1] = {0xffb0}; HudCounter D_L13_0015FAB8 = {0}; -s32 D_L13_0015F824 = 8; -s32 D_L13_0015F828 = 8; -s32 D_L13_0015F82C = 0xe08060; -s32 D_L13_0015F830 = 0x80e08060; -s32 D_L13_0015F84C = 0xd; -s32 D_L13_0015F834 = -32; -s32 D_L13_0015F838 = 8; -s32 D_L13_0015F83C = -30; -s32 D_L13_0015F840 = 0x15; -s32 D_L13_0015F844 = -29; -s32 D_L13_0015F848 = 0xa; -char D_L13_0015F858 = 0x27; -char D_L13_0015F860 = 0x2e; -s32 D_L13_0015F8F8 = 0x50; -s32 D_L13_0015F8FC = 0x10; -s32 D_L13_0015F900 = -28; -s32 D_L13_0015F904 = -44; -s32 D_L13_0015F908 = 6; -s32 D_L13_0015F90C = 0xff; -s32 D_L13_0015F910 = 0x800000ff; -s32 D_L13_0015F914 = 0x2d; -s32 D_L14_0015FA90 = 0; -void *D_L14_0015FAC0 = 0; -s32 D_L14_0015F738 = 0x17e1c0; -s32 D_L14_0015F718 = 0xd2; -s32 D_L14_0015F71C = 0xc8; -s32 D_L14_0015F72C = 0; -int D_L14_0015F780 = 8; -int D_L14_0015FA9C = 0; -int D_L14_0015FA98 = 0; -int D_L14_0015FA94 = 0; -float D_L14_0015F788 = 0.2f; -float D_L14_0015F784 = 0; -int D_L14_0017E318 NOT_SDA = 6; -int D_L14_0017E31C NOT_SDA = 2; -int D_L14_0017E324 NOT_SDA = 4; -int D_L14_0015F720 = 0x69; -int D_L14_0015F724 = 0x64; -float D_L14_0015F78C = 74.0f; -int D_L14_0015F790 = 0xff8080; -int D_L14_0015F794 = 0x80ff8080; -int D_L14_0015F798 = 0; -int D_L14_0015F7A0 = 0x4040ff; -int D_L14_0015F7A4 = 0x804040ff; -int D_L14_0015F7A8 = 0x40e020; -int D_L14_0015F7B0 = 0x1e; -int D_L14_0015F7BC = 0; -float D_L14_0015F7C0 = 0.5f; -float D_L14_0015F7C4 = 1.05f; -Q2395b0 D_L14_0015FAB0 = {0}; +s32 D_L13_0015F824 = 8; +s32 D_L13_0015F828 = 8; +s32 D_L13_0015F82C = 0xe08060; +s32 D_L13_0015F830 = 0x80e08060; +s32 D_L13_0015F84C = 0xd; +s32 D_L13_0015F834 = -32; +s32 D_L13_0015F838 = 8; +s32 D_L13_0015F83C = -30; +s32 D_L13_0015F840 = 0x15; +s32 D_L13_0015F844 = -29; +s32 D_L13_0015F848 = 0xa; +char D_L13_0015F858 = 0x27; +char D_L13_0015F860 = 0x2e; +s32 D_L13_0015F8F8 = 0x50; +s32 D_L13_0015F8FC = 0x10; +s32 D_L13_0015F900 = -28; +s32 D_L13_0015F904 = -44; +s32 D_L13_0015F908 = 6; +s32 D_L13_0015F90C = 0xff; +s32 D_L13_0015F910 = 0x800000ff; +s32 D_L13_0015F914 = 0x2d; +s32 D_L14_0015FA90 = 0; +void *D_L14_0015FAC0 = 0; +HudSelectorSlot *D_L14_0015F738 = D_L14_0017E1C0; +HudSelectorSlot *D_L14_0015F740 = D_L14_0017E2A0; +s32 D_L14_0015F718 = 0xd2; +s32 D_L14_0015F71C = 0xc8; +s32 D_L14_0015F72C = 0; +int D_L14_0015F780 = 8; +int D_L14_0015FA9C = 0; +int D_L14_0015FA98 = 0; +int D_L14_0015FA94 = 0; +float D_L14_0015F788 = 0.2f; +float D_L14_0015F784 = 0; +int D_L14_0015F720 = 0x69; +int D_L14_0015F724 = 0x64; +float D_L14_0015F78C = 74.0f; +int D_L14_0015F790 = 0xff8080; +int D_L14_0015F794 = 0x80ff8080; +int D_L14_0015F798 = 0; +int D_L14_0015F7A0 = 0x4040ff; +int D_L14_0015F7A4 = 0x804040ff; +int D_L14_0015F7A8 = 0x40e020; +int D_L14_0015F7B0 = 0x1e; +int D_L14_0015F7BC = 0; +float D_L14_0015F7C0 = 0.5f; +float D_L14_0015F7C4 = 1.05f; +Q2395b0 D_L14_0015FAB0 = {0}; s32 D_L14_0015F7F0 = 8; s32 D_L14_0015F7F8[1] = {0xffb0}; HudCounter D_L14_0015FAB8 = {0}; -s32 D_L14_0015F824 = 8; -s32 D_L14_0015F828 = 8; -s32 D_L14_0015F82C = 0xe08060; -s32 D_L14_0015F830 = 0x80e08060; -s32 D_L14_0015F84C = 0xd; -s32 D_L14_0015F834 = -32; -s32 D_L14_0015F838 = 8; -s32 D_L14_0015F83C = -30; -s32 D_L14_0015F840 = 0x15; -s32 D_L14_0015F844 = -29; -s32 D_L14_0015F848 = 0xa; -char D_L14_0015F858 = 0x27; -char D_L14_0015F860 = 0x2e; -s32 D_L14_0015F8F8 = 0x50; -s32 D_L14_0015F8FC = 0x10; -s32 D_L14_0015F900 = -28; -s32 D_L14_0015F904 = -44; -s32 D_L14_0015F908 = 6; -s32 D_L14_0015F90C = 0xff; -s32 D_L14_0015F910 = 0x800000ff; -s32 D_L14_0015F914 = 0x2d; -s32 D_L15_0015FA90 = 0; -void *D_L15_0015FAC0 = 0; -s32 D_L15_0015F738 = 0x17e0c0; -s32 D_L15_0015F718 = 0xd2; -s32 D_L15_0015F71C = 0xc8; -s32 D_L15_0015F72C = 0; -int D_L15_0015F780 = 8; -int D_L15_0015FA9C = 0; -int D_L15_0015FA98 = 0; -int D_L15_0015FA94 = 0; -float D_L15_0015F788 = 0.2f; -float D_L15_0015F784 = 0; -int D_L15_0017E218 NOT_SDA = 6; -int D_L15_0017E21C NOT_SDA = 2; -int D_L15_0017E224 NOT_SDA = 4; -int D_L15_0015F720 = 0x69; -int D_L15_0015F724 = 0x64; -float D_L15_0015F78C = 74.0f; -int D_L15_0015F790 = 0xff8080; -int D_L15_0015F794 = 0x80ff8080; -int D_L15_0015F798 = 0; -int D_L15_0015F7A0 = 0x4040ff; -int D_L15_0015F7A4 = 0x804040ff; -int D_L15_0015F7A8 = 0x40e020; -int D_L15_0015F7B0 = 0x1e; -int D_L15_0015F7BC = 0; -float D_L15_0015F7C0 = 0.5f; -float D_L15_0015F7C4 = 1.05f; -Q2395b0 D_L15_0015FAB0 = {0}; +s32 D_L14_0015F824 = 8; +s32 D_L14_0015F828 = 8; +s32 D_L14_0015F82C = 0xe08060; +s32 D_L14_0015F830 = 0x80e08060; +s32 D_L14_0015F84C = 0xd; +s32 D_L14_0015F834 = -32; +s32 D_L14_0015F838 = 8; +s32 D_L14_0015F83C = -30; +s32 D_L14_0015F840 = 0x15; +s32 D_L14_0015F844 = -29; +s32 D_L14_0015F848 = 0xa; +char D_L14_0015F858 = 0x27; +char D_L14_0015F860 = 0x2e; +s32 D_L14_0015F8F8 = 0x50; +s32 D_L14_0015F8FC = 0x10; +s32 D_L14_0015F900 = -28; +s32 D_L14_0015F904 = -44; +s32 D_L14_0015F908 = 6; +s32 D_L14_0015F90C = 0xff; +s32 D_L14_0015F910 = 0x800000ff; +s32 D_L14_0015F914 = 0x2d; +s32 D_L15_0015FA90 = 0; +void *D_L15_0015FAC0 = 0; +HudSelectorSlot *D_L15_0015F738 = D_L15_0017E0C0; +HudSelectorSlot *D_L15_0015F740 = D_L15_0017E1A0; +s32 D_L15_0015F718 = 0xd2; +s32 D_L15_0015F71C = 0xc8; +s32 D_L15_0015F72C = 0; +int D_L15_0015F780 = 8; +int D_L15_0015FA9C = 0; +int D_L15_0015FA98 = 0; +int D_L15_0015FA94 = 0; +float D_L15_0015F788 = 0.2f; +float D_L15_0015F784 = 0; +int D_L15_0015F720 = 0x69; +int D_L15_0015F724 = 0x64; +float D_L15_0015F78C = 74.0f; +int D_L15_0015F790 = 0xff8080; +int D_L15_0015F794 = 0x80ff8080; +int D_L15_0015F798 = 0; +int D_L15_0015F7A0 = 0x4040ff; +int D_L15_0015F7A4 = 0x804040ff; +int D_L15_0015F7A8 = 0x40e020; +int D_L15_0015F7B0 = 0x1e; +int D_L15_0015F7BC = 0; +float D_L15_0015F7C0 = 0.5f; +float D_L15_0015F7C4 = 1.05f; +Q2395b0 D_L15_0015FAB0 = {0}; s32 D_L15_0015F7F0 = 8; s32 D_L15_0015F7F8[1] = {0xffb0}; HudCounter D_L15_0015FAB8 = {0}; -s32 D_L15_0015F824 = 8; -s32 D_L15_0015F828 = 8; -s32 D_L15_0015F82C = 0xe08060; -s32 D_L15_0015F830 = 0x80e08060; -s32 D_L15_0015F84C = 0xd; -s32 D_L15_0015F834 = -32; -s32 D_L15_0015F838 = 8; -s32 D_L15_0015F83C = -30; -s32 D_L15_0015F840 = 0x15; -s32 D_L15_0015F844 = -29; -s32 D_L15_0015F848 = 0xa; -char D_L15_0015F858 = 0x27; -char D_L15_0015F860 = 0x2e; -s32 D_L15_0015F8F8 = 0x50; -s32 D_L15_0015F8FC = 0x10; -s32 D_L15_0015F900 = -28; -s32 D_L15_0015F904 = -44; -s32 D_L15_0015F908 = 6; -s32 D_L15_0015F90C = 0xff; -s32 D_L15_0015F910 = 0x800000ff; -s32 D_L15_0015F914 = 0x2d; -s32 D_L16_0015FAA0 = 0; -void *D_L16_0015FAD0 = 0; -s32 D_L16_0015F748 = 0x17df40; -s32 D_L16_0015F728 = 0xd2; -s32 D_L16_0015F72C = 0xc8; -s32 D_L16_0015F73C = 0; -int D_L16_0015F790 = 8; -int D_L16_0015FAAC = 0; -int D_L16_0015FAA8 = 0; -int D_L16_0015FAA4 = 0; -float D_L16_0015F798 = 0.2f; -float D_L16_0015F794 = 0; -int D_L16_0017E098 NOT_SDA = 6; -int D_L16_0017E09C NOT_SDA = 2; -int D_L16_0017E0A4 NOT_SDA = 4; -int D_L16_0015F730 = 0x69; -int D_L16_0015F734 = 0x64; -float D_L16_0015F79C = 74.0f; -int D_L16_0015F7A0 = 0xff8080; -int D_L16_0015F7A4 = 0x80ff8080; -int D_L16_0015F7A8 = 0; -int D_L16_0015F7B0 = 0x4040ff; -int D_L16_0015F7B4 = 0x804040ff; -int D_L16_0015F7B8 = 0x40e020; -int D_L16_0015F7C0 = 0x1e; -int D_L16_0015F7CC = 0; -float D_L16_0015F7D0 = 0.5f; -float D_L16_0015F7D4 = 1.05f; -Q2395b0 D_L16_0015FAC0 = {0}; +s32 D_L15_0015F824 = 8; +s32 D_L15_0015F828 = 8; +s32 D_L15_0015F82C = 0xe08060; +s32 D_L15_0015F830 = 0x80e08060; +s32 D_L15_0015F84C = 0xd; +s32 D_L15_0015F834 = -32; +s32 D_L15_0015F838 = 8; +s32 D_L15_0015F83C = -30; +s32 D_L15_0015F840 = 0x15; +s32 D_L15_0015F844 = -29; +s32 D_L15_0015F848 = 0xa; +char D_L15_0015F858 = 0x27; +char D_L15_0015F860 = 0x2e; +s32 D_L15_0015F8F8 = 0x50; +s32 D_L15_0015F8FC = 0x10; +s32 D_L15_0015F900 = -28; +s32 D_L15_0015F904 = -44; +s32 D_L15_0015F908 = 6; +s32 D_L15_0015F90C = 0xff; +s32 D_L15_0015F910 = 0x800000ff; +s32 D_L15_0015F914 = 0x2d; +s32 D_L16_0015FAA0 = 0; +void *D_L16_0015FAD0 = 0; +HudSelectorSlot *D_L16_0015F748 = D_L16_0017DF40; +HudSelectorSlot *D_L16_0015F750 = D_L16_0017E020; +s32 D_L16_0015F728 = 0xd2; +s32 D_L16_0015F72C = 0xc8; +s32 D_L16_0015F73C = 0; +int D_L16_0015F790 = 8; +int D_L16_0015FAAC = 0; +int D_L16_0015FAA8 = 0; +int D_L16_0015FAA4 = 0; +float D_L16_0015F798 = 0.2f; +float D_L16_0015F794 = 0; +int D_L16_0015F730 = 0x69; +int D_L16_0015F734 = 0x64; +float D_L16_0015F79C = 74.0f; +int D_L16_0015F7A0 = 0xff8080; +int D_L16_0015F7A4 = 0x80ff8080; +int D_L16_0015F7A8 = 0; +int D_L16_0015F7B0 = 0x4040ff; +int D_L16_0015F7B4 = 0x804040ff; +int D_L16_0015F7B8 = 0x40e020; +int D_L16_0015F7C0 = 0x1e; +int D_L16_0015F7CC = 0; +float D_L16_0015F7D0 = 0.5f; +float D_L16_0015F7D4 = 1.05f; +Q2395b0 D_L16_0015FAC0 = {0}; s32 D_L16_0015F800 = 8; s32 D_L16_0015F808[1] = {0xffb0}; HudCounter D_L16_0015FAC8 = {0}; -s32 D_L16_0015F834 = 8; -s32 D_L16_0015F838 = 8; -s32 D_L16_0015F83C = 0xe08060; -s32 D_L16_0015F840 = 0x80e08060; -s32 D_L16_0015F85C = 0xd; -s32 D_L16_0015F844 = -32; -s32 D_L16_0015F848 = 8; -s32 D_L16_0015F84C = -30; -s32 D_L16_0015F850 = 0x15; -s32 D_L16_0015F854 = -29; -s32 D_L16_0015F858 = 0xa; -char D_L16_0015F868 = 0x27; -char D_L16_0015F870 = 0x2e; -s32 D_L16_0015F908 = 0x50; -s32 D_L16_0015F90C = 0x10; -s32 D_L16_0015F910 = -28; -s32 D_L16_0015F914 = -44; -s32 D_L16_0015F918 = 6; -s32 D_L16_0015F91C = 0xff; -s32 D_L16_0015F920 = 0x800000ff; -s32 D_L16_0015F924 = 0x2d; -s32 D_L17_0015FA90 = 0; -void *D_L17_0015FAC0 = 0; -s32 D_L17_0015F738 = 0x17e3c0; -s32 D_L17_0015F718 = 0xd2; -s32 D_L17_0015F71C = 0xc8; -s32 D_L17_0015F72C = 0; -int D_L17_0015F780 = 8; -int D_L17_0015FA9C = 0; -int D_L17_0017E538 NOT_SDA = 3; -int D_L17_0017E53C NOT_SDA = 1; -int D_L17_0017E544 NOT_SDA = 2; -int D_L17_0015FA98 = 0; -int D_L17_0015FA94 = 0; -float D_L17_0015F788 = 0.2f; -float D_L17_0015F784 = 0; -int D_L17_0017E518 NOT_SDA = 6; -int D_L17_0017E51C NOT_SDA = 2; -int D_L17_0017E524 NOT_SDA = 4; -int D_L17_0015F720 = 0x69; -int D_L17_0015F724 = 0x64; -float D_L17_0015F78C = 74.0f; -int D_L17_0015F790 = 0xff8080; -int D_L17_0015F794 = 0x80ff8080; -int D_L17_0015F798 = 0; -int D_L17_0015F7A0 = 0x4040ff; -int D_L17_0015F7A4 = 0x804040ff; -int D_L17_0015F7A8 = 0x40e020; -int D_L17_0015F7B0 = 0x1e; -int D_L17_0015F7BC = 0; -float D_L17_0015F7C0 = 0.5f; -float D_L17_0015F7C4 = 1.05f; -int D_L17_0015F740 = 0x17e4a0; -int D_L17_0015F7D4 = 0xe0c0a0; -int D_L17_0015F7D8 = 0x80e0c0a0; -int D_L17_0015F7DC = -8; +s32 D_L16_0015F834 = 8; +s32 D_L16_0015F838 = 8; +s32 D_L16_0015F83C = 0xe08060; +s32 D_L16_0015F840 = 0x80e08060; +s32 D_L16_0015F85C = 0xd; +s32 D_L16_0015F844 = -32; +s32 D_L16_0015F848 = 8; +s32 D_L16_0015F84C = -30; +s32 D_L16_0015F850 = 0x15; +s32 D_L16_0015F854 = -29; +s32 D_L16_0015F858 = 0xa; +char D_L16_0015F868 = 0x27; +char D_L16_0015F870 = 0x2e; +s32 D_L16_0015F908 = 0x50; +s32 D_L16_0015F90C = 0x10; +s32 D_L16_0015F910 = -28; +s32 D_L16_0015F914 = -44; +s32 D_L16_0015F918 = 6; +s32 D_L16_0015F91C = 0xff; +s32 D_L16_0015F920 = 0x800000ff; +s32 D_L16_0015F924 = 0x2d; +s32 D_L17_0015FA90 = 0; +void *D_L17_0015FAC0 = 0; +HudSelectorSlot *D_L17_0015F738 = D_L17_0017E3C0; +s32 D_L17_0015F718 = 0xd2; +s32 D_L17_0015F71C = 0xc8; +s32 D_L17_0015F72C = 0; +int D_L17_0015F780 = 8; +int D_L17_0015FA9C = 0; +int D_L17_0015FA98 = 0; +int D_L17_0015FA94 = 0; +float D_L17_0015F788 = 0.2f; +float D_L17_0015F784 = 0; +int D_L17_0015F720 = 0x69; +int D_L17_0015F724 = 0x64; +float D_L17_0015F78C = 74.0f; +int D_L17_0015F790 = 0xff8080; +int D_L17_0015F794 = 0x80ff8080; +int D_L17_0015F798 = 0; +int D_L17_0015F7A0 = 0x4040ff; +int D_L17_0015F7A4 = 0x804040ff; +int D_L17_0015F7A8 = 0x40e020; +int D_L17_0015F7B0 = 0x1e; +int D_L17_0015F7BC = 0; +float D_L17_0015F7C0 = 0.5f; +float D_L17_0015F7C4 = 1.05f; +HudSelectorSlot *D_L17_0015F740 = D_L17_0017E4A0; +int D_L17_0015F7D4 = 0xe0c0a0; +int D_L17_0015F7D8 = 0x80e0c0a0; +int D_L17_0015F7DC = -8; Ids D_L17_0015F7E0 = { {0x521c, 0x521d, 0x521f, 0x521e} @@ -2548,56 +2593,54 @@ s32 D_L17_0015F7F8[1] = {0xffb0}; HudCounter D_L17_0015FAB8 = {0}; -s32 D_L17_0015F824 = 8; -s32 D_L17_0015F828 = 8; -s32 D_L17_0015F82C = 0xe08060; -s32 D_L17_0015F830 = 0x80e08060; -s32 D_L17_0015F84C = 0xd; -s32 D_L17_0015F834 = -32; -s32 D_L17_0015F838 = 8; -s32 D_L17_0015F83C = -30; -s32 D_L17_0015F840 = 0x15; -s32 D_L17_0015F844 = -29; -s32 D_L17_0015F848 = 0xa; -char D_L17_0015F858 = 0x27; -char D_L17_0015F860 = 0x2e; -s32 D_L17_0015F8F8 = 0x50; -s32 D_L17_0015F8FC = 0x10; -s32 D_L17_0015F900 = -28; -s32 D_L17_0015F904 = -44; -s32 D_L17_0015F908 = 6; -s32 D_L17_0015F90C = 0xff; -s32 D_L17_0015F910 = 0x800000ff; -s32 D_L17_0015F914 = 0x2d; -s32 D_L18_0015FA90 = 0; -void *D_L18_0015FAC0 = 0; -s32 D_L18_0015F738 = 0x17e4c0; -s32 D_L18_0015F718 = 0xd2; -s32 D_L18_0015F71C = 0xc8; -s32 D_L18_0015F72C = 0; -int D_L18_0015F780 = 8; -int D_L18_0015FA9C = 0; -int D_L18_0015FA98 = 0; -int D_L18_0015FA94 = 0; -float D_L18_0015F788 = 0.2f; -float D_L18_0015F784 = 0; -int D_L18_0017E618 NOT_SDA = 6; -int D_L18_0017E61C NOT_SDA = 2; -int D_L18_0017E624 NOT_SDA = 4; -int D_L18_0015F720 = 0x69; -int D_L18_0015F724 = 0x64; -float D_L18_0015F78C = 74.0f; -int D_L18_0015F790 = 0xff8080; -int D_L18_0015F794 = 0x80ff8080; -int D_L18_0015F798 = 0; -int D_L18_0015F7A0 = 0x4040ff; -int D_L18_0015F7A4 = 0x804040ff; -int D_L18_0015F7A8 = 0x40e020; -int D_L18_0015F7B0 = 0x1e; -int D_L18_0015F7BC = 0; -float D_L18_0015F7C0 = 0.5f; -float D_L18_0015F7C4 = 1.05f; -Q2395b0 D_L18_0015FAB0 = {0}; +s32 D_L17_0015F824 = 8; +s32 D_L17_0015F828 = 8; +s32 D_L17_0015F82C = 0xe08060; +s32 D_L17_0015F830 = 0x80e08060; +s32 D_L17_0015F84C = 0xd; +s32 D_L17_0015F834 = -32; +s32 D_L17_0015F838 = 8; +s32 D_L17_0015F83C = -30; +s32 D_L17_0015F840 = 0x15; +s32 D_L17_0015F844 = -29; +s32 D_L17_0015F848 = 0xa; +char D_L17_0015F858 = 0x27; +char D_L17_0015F860 = 0x2e; +s32 D_L17_0015F8F8 = 0x50; +s32 D_L17_0015F8FC = 0x10; +s32 D_L17_0015F900 = -28; +s32 D_L17_0015F904 = -44; +s32 D_L17_0015F908 = 6; +s32 D_L17_0015F90C = 0xff; +s32 D_L17_0015F910 = 0x800000ff; +s32 D_L17_0015F914 = 0x2d; +s32 D_L18_0015FA90 = 0; +void *D_L18_0015FAC0 = 0; +HudSelectorSlot *D_L18_0015F738 = D_L18_0017E4C0; +HudSelectorSlot *D_L18_0015F740 = D_L18_0017E5A0; +s32 D_L18_0015F718 = 0xd2; +s32 D_L18_0015F71C = 0xc8; +s32 D_L18_0015F72C = 0; +int D_L18_0015F780 = 8; +int D_L18_0015FA9C = 0; +int D_L18_0015FA98 = 0; +int D_L18_0015FA94 = 0; +float D_L18_0015F788 = 0.2f; +float D_L18_0015F784 = 0; +int D_L18_0015F720 = 0x69; +int D_L18_0015F724 = 0x64; +float D_L18_0015F78C = 74.0f; +int D_L18_0015F790 = 0xff8080; +int D_L18_0015F794 = 0x80ff8080; +int D_L18_0015F798 = 0; +int D_L18_0015F7A0 = 0x4040ff; +int D_L18_0015F7A4 = 0x804040ff; +int D_L18_0015F7A8 = 0x40e020; +int D_L18_0015F7B0 = 0x1e; +int D_L18_0015F7BC = 0; +float D_L18_0015F7C0 = 0.5f; +float D_L18_0015F7C4 = 1.05f; +Q2395b0 D_L18_0015FAB0 = {0}; s32 D_L18_0015F7F0 = 8; s32 D_L18_0015F7F8[1] = {0xffb0}; From 265c16c2a068c5ab656a5323e2975260e1a2e13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:17:09 +0000 Subject: [PATCH 145/213] decomp: define the cutscene moby class per content variant in C --- config/us/levels/exe_data.tsv | 19 +++++++++++++++++++ configure.py | 1 + src/world/update_world_object_animation.c | 6 ++++++ 3 files changed, 26 insertions(+) diff --git a/config/us/levels/exe_data.tsv b/config/us/levels/exe_data.tsv index 6b1ead2b1e..e5e4575016 100644 --- a/config/us/levels/exe_data.tsv +++ b/config/us/levels/exe_data.tsv @@ -47,6 +47,7 @@ 00 001604B8 4 00 00160510 9 00 00160534 4 +00 00160548 12 00 00160580 12 00 00160590 12 00 001605E0 96 @@ -237,6 +238,7 @@ 01 001604B8 4 01 00160510 9 01 00160534 4 +01 00160548 12 01 00160580 12 01 00160590 12 01 001605E0 96 @@ -427,6 +429,7 @@ 02 001604B8 4 02 00160510 9 02 00160534 4 +02 00160548 12 02 00160580 12 02 00160590 12 02 001605E0 96 @@ -617,6 +620,7 @@ 03 001604B8 4 03 00160510 9 03 00160534 4 +03 00160548 12 03 00160580 12 03 00160590 12 03 001605E0 96 @@ -807,6 +811,7 @@ 04 001604B8 4 04 00160510 9 04 00160534 4 +04 00160548 12 04 00160580 12 04 00160590 12 04 001605E0 96 @@ -997,6 +1002,7 @@ 05 001604B8 4 05 00160510 9 05 00160534 4 +05 00160548 12 05 00160580 12 05 00160590 12 05 001605E0 96 @@ -1187,6 +1193,7 @@ 06 001604B8 4 06 00160510 9 06 00160534 4 +06 00160548 12 06 00160580 12 06 00160590 12 06 001605E0 96 @@ -1377,6 +1384,7 @@ 07 001604B8 4 07 00160510 9 07 00160534 4 +07 00160548 12 07 00160580 12 07 00160590 12 07 001605E0 96 @@ -1567,6 +1575,7 @@ 08 001604B8 4 08 00160510 9 08 00160534 4 +08 00160548 12 08 00160580 12 08 00160590 12 08 001605E0 96 @@ -1757,6 +1766,7 @@ 09 001604B8 4 09 00160510 9 09 00160534 4 +09 00160548 12 09 00160580 12 09 00160590 12 09 001605E0 96 @@ -1947,6 +1957,7 @@ 10 001604B8 4 10 00160510 9 10 00160534 4 +10 00160548 12 10 00160580 12 10 00160590 12 10 001605E0 96 @@ -2137,6 +2148,7 @@ 11 001604B8 4 11 00160510 9 11 00160534 4 +11 00160548 12 11 00160580 12 11 00160590 12 11 001605E0 96 @@ -2327,6 +2339,7 @@ 12 001604B8 4 12 00160510 9 12 00160534 4 +12 00160548 12 12 00160580 12 12 00160590 12 12 001605E0 96 @@ -2517,6 +2530,7 @@ 13 001604B8 4 13 00160510 9 13 00160534 4 +13 00160548 12 13 00160580 12 13 00160590 12 13 001605E0 96 @@ -2707,6 +2721,7 @@ 14 001604B8 4 14 00160510 9 14 00160534 4 +14 00160548 12 14 00160580 12 14 00160590 12 14 001605E0 96 @@ -2897,6 +2912,7 @@ 15 001604B8 4 15 00160510 9 15 00160534 4 +15 00160548 12 15 00160580 12 15 00160590 12 15 001605E0 96 @@ -3087,6 +3103,7 @@ 16 001604B8 4 16 00160510 9 16 00160534 4 +16 00160548 12 16 00160580 12 16 00160590 12 16 001605E0 96 @@ -3277,6 +3294,7 @@ 17 001604B8 4 17 00160510 9 17 00160534 4 +17 00160548 12 17 00160580 12 17 00160590 12 17 001605E0 96 @@ -3467,6 +3485,7 @@ 18 001604B8 4 18 00160510 9 18 00160534 4 +18 00160548 12 18 00160580 12 18 00160590 12 18 001605E0 96 diff --git a/configure.py b/configure.py index 972cef8e1e..73d595ffd0 100755 --- a/configure.py +++ b/configure.py @@ -1142,6 +1142,7 @@ "game/startlevel": (0x15EF5C, 0x5FEDC, 4), # boot image buffer "mobys/update_visible_mobys": (0x15FF24, 0x60EA4, 4), # visible moby list "world/select_world_object_resource_tables": (0x15FF44, 0x60EC4, 8), # resource tag and count + "world/update_world_object_animation": (0x160488, 0x61408, 12), # cutscene moby class per content variant "ui/hud/init_hud": (0x15F6D8, 0x60658, 8), # allocation tag "ui/menus/widgets/format_scaled_display_value": (0x161078, 0x61FF8, 11), # display value formats } diff --git a/src/world/update_world_object_animation.c b/src/world/update_world_object_animation.c index 7cba8273b0..eaaca93f63 100644 --- a/src/world/update_world_object_animation.c +++ b/src/world/update_world_object_animation.c @@ -156,3 +156,9 @@ void update_world_object_animation(void *unused_arg) { extern __typeof__(update_world_object_animation) func_00204790 __attribute__((alias("FUN_00204790"))); + +/* The moby class that takes the place of class 0x215 as the first part in game mode 6, per + content variant (0, 1 or 2). Small data in retail, defined after the function so it keeps + reaching the table through lui. */ +int cutscene_moby_ids_by_content_variant[3] + __attribute__((section(".sdata"))) = {0x213, 0x214, 0x215}; From 819221f2dcf964da507558b8105b105a6582f7c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:19:41 +0000 Subject: [PATCH 146/213] decomp: define the level 17 fleet backdrop scrolling quad tables in C --- config/us/levels/data.tsv | 3 ++ src/overlays/l17/mobys/fleet_backdrop.c | 38 +++++++++++++++++-------- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index c823c537e4..29ec7e4740 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -24231,6 +24231,9 @@ D_L17_001DE028 20 D_L17_001DE040 20 D_L17_001DE058 20 D_L17_001DE070 20 +D_L17_001DE088 20 +D_L17_001DE0A0 20 +D_L17_001DE0B8 20 D_L17_001DE0D0 20 D_L17_001DE150 312 D_L17_001DE288 312 diff --git a/src/overlays/l17/mobys/fleet_backdrop.c b/src/overlays/l17/mobys/fleet_backdrop.c index 74faf3efc1..482ae4b5db 100644 --- a/src/overlays/l17/mobys/fleet_backdrop.c +++ b/src/overlays/l17/mobys/fleet_backdrop.c @@ -28,7 +28,9 @@ typedef struct { extern char D_L17_001676C0[]; extern float frame_delta_time __asm__("D_0015ED7C"); extern int fast_tween_color(int, int, float) __asm__("FUN_001fa6e0"); -float D_L17_001623C0[4] __attribute__((section(".sdata"))) = {-0.5f, -1.0f, 1.0f, 1.0f}; +/* How fast each scrolling quad's texture moves along u, per frame time. */ +float backdrop_scrolling_quad_u_speeds[4] __asm__("D_L17_001623C0") + __attribute__((section(".sdata"))) = {-0.5f, -1.0f, 1.0f, 1.0f}; extern void draw_geometry_quad(void *, int, int) __asm__("FUN_001f7d30"); @@ -43,9 +45,16 @@ float backdrop_quad_side_lengths[5] __asm__("D_L17_001DDFF8") = { float backdrop_quad_color_blend_factors[5] __asm__("D_L17_001DE040") = { 0.0f, 1.0f, 0.33f, 0.55f, 0.22f}; -extern float D_L17_001DE0A0[]; -extern float backdrop_scrolling_quad_start_half_widths[] __asm__("D_L17_001DE0B8"); -float backdrop_quad_uv_rotation_angles[5] __asm__("D_L17_001DE0D0") = {0}; +/* The scrolling quads: draw_fleet_backdrop_quads draws only the first two, but each table + holds five entries like the per-quad tables above. */ +/* How far each scrolling quad's texture has moved along u, kept in 0..1. */ +float backdrop_scrolling_quad_u_offsets[5] __asm__("D_L17_001DE0A0") = { + 0.0f, 0.1f, 0.2f, 0.3f, 0.5f}; + +float backdrop_scrolling_quad_start_half_widths[5] __asm__("D_L17_001DE0B8") = { + 20.0f, 10.0f, 20.0f, 20.0f, 20.0f}; + +float backdrop_quad_uv_rotation_angles[5] __asm__("D_L17_001DE0D0") = {0}; float backdrop_scrolling_quad_base_uv_coordinates[8] __asm__("D_L17_001E6FA0") = { -8.0f, 0.0f, -8.0f, 1.0f, 8.0f, 0.0f, 8.0f, 1.0f}; @@ -57,7 +66,9 @@ int backdrop_quad_color_blend_source_colors[5] __asm__("D_L17_001DE010") = { int backdrop_quad_color_blend_target_colors[5] __asm__("D_L17_001DE028") = { 0x80101030, 0x80301010, 0x80101015, 0x80151010, 0x80151015}; -extern int backdrop_scrolling_quad_texture_indices[] __asm__("D_L17_001DE088"); +int backdrop_scrolling_quad_texture_indices[5] __asm__("D_L17_001DE088") = { + 0x0E, 0x0E, 0x31, 0x31, 0x31}; + int backdrop_scrolling_quad_color __asm__("D_L17_001623B8") = 0x807e4931; /* RGBA, 0xAABBGGRR */ void draw_fleet_backdrop_quads(struct Moby *moby) __asm__("FUN_L17_002f32f0"); @@ -126,11 +137,13 @@ void draw_fleet_backdrop_quads(struct Moby *moby) { pkt.m[3] = vv[3]; *(long *)&pkt.q[2] = get_effect_texture(backdrop_scrolling_quad_texture_indices[i]); for (j = 0; j < 4; j++) { - pu[j * 2] = backdrop_scrolling_quad_base_uv_coordinates[j * 2] + D_L17_001DE0A0[i]; + pu[j * 2] = backdrop_scrolling_quad_base_uv_coordinates[j * 2] + + backdrop_scrolling_quad_u_offsets[i]; quad_vertex_v_coordinates[j * 2] = backdrop_scrolling_quad_base_uv_coordinates[j * 2 + 1]; } - D_L17_001DE0A0[i] += D_L17_001623C0[i] * frame_delta_time; + backdrop_scrolling_quad_u_offsets[i] += + backdrop_scrolling_quad_u_speeds[i] * frame_delta_time; draw_geometry_quad(&pkt, 0, 0); } *(long *)&pkt.q[2] = get_effect_texture(0x2F); @@ -262,12 +275,13 @@ void fleet_backdrop_animation_update(struct Moby *moby) { backdrop_quad_uv_rotation_rate_factors[i] * 0.1f * frame_delta_time); } for (i = 0; i < 2; i++) { - D_L17_001DE0A0[i] += D_L17_001623C0[i] * frame_delta_time; - if (1.0f <= D_L17_001DE0A0[i]) { - D_L17_001DE0A0[i] -= 1.0f; + backdrop_scrolling_quad_u_offsets[i] += + backdrop_scrolling_quad_u_speeds[i] * frame_delta_time; + if (1.0f <= backdrop_scrolling_quad_u_offsets[i]) { + backdrop_scrolling_quad_u_offsets[i] -= 1.0f; } - if (D_L17_001DE0A0[i] < 0.0f) { - D_L17_001DE0A0[i] += 1.0f; + if (backdrop_scrolling_quad_u_offsets[i] < 0.0f) { + backdrop_scrolling_quad_u_offsets[i] += 1.0f; } } add_draw_callback(draw_fleet_backdrop_quads, moby); From 08c656763abec3884499a9d031a0ee6b11028e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:29:04 +0000 Subject: [PATCH 147/213] decomp: define the hero jump velocity key tables of every level in C The transform trail jump and water surface jump curves that hero_set_state gives the hero, one copy per level, typed as HeroVelocityKey arrays. --- config/us/levels/data.tsv | 38 +++++++++++++++++++ .../overlay/shared/hero/jump_velocity_keys.h | 25 ++++++++++++ src/overlays/l01/hero/hero_set_state.c | 10 +++-- src/overlays/l02/hero/hero_set_state.c | 13 +++++-- src/overlays/l03/hero/hero_set_state.c | 10 +++-- src/overlays/l05/hero/hero_set_state.c | 13 +++++-- src/overlays/l06/hero/hero_set_state.c | 13 +++++-- src/overlays/l08/hero/hero_set_state.c | 9 +++-- src/overlays/l11/hero/hero_set_state.c | 9 +++-- src/overlays/l12/hero/hero_set_state.c | 11 ++++-- src/overlays/l14/hero/hero_set_state.c | 13 +++++-- src/overlays/l15/hero/hero_set_state.c | 9 +++-- src/overlays/l16/hero/hero_set_state.c | 10 +++-- src/overlays/l17/hero/hero_set_state.c | 10 +++-- src/overlays/l18/hero/hero_set_state.c | 10 +++-- src/overlays/shared/hero/hero_set_state.c | 35 ++++++++++++++--- 16 files changed, 193 insertions(+), 45 deletions(-) create mode 100644 include/rnc/overlay/shared/hero/jump_velocity_keys.h diff --git a/config/us/levels/data.tsv b/config/us/levels/data.tsv index 29ec7e4740..33aa30bfdc 100644 --- a/config/us/levels/data.tsv +++ b/config/us/levels/data.tsv @@ -3492,6 +3492,8 @@ D_L00_0015F6B8 4 D_L00_0015F6B8 4 D_L00_0015F6B8 4 D_L00_0015F6B8 4 +D_L00_0017BF20 60 +D_L00_0017BF60 96 D_L00_0017DAC0 224 D_L00_0017DBA0 112 D_L00_0017DC10 28 @@ -4288,6 +4290,8 @@ D_L01_0015F728 4 D_L01_0015F72C 4 D_L01_0015F738 4 D_L01_0015F740 4 +D_L01_0017C3A0 60 +D_L01_0017C3E0 96 D_L01_0017DF40 224 D_L01_0017E020 112 D_L01_0017E090 28 @@ -5365,6 +5369,8 @@ D_L02_0015F728 4 D_L02_0015F72C 4 D_L02_0015F738 4 D_L02_0015F740 4 +D_L02_0017C520 60 +D_L02_0017C560 96 D_L02_0017E0C0 224 D_L02_0017E1A0 112 D_L02_0017E210 28 @@ -6496,6 +6502,8 @@ D_L03_0015F728 4 D_L03_0015F72C 4 D_L03_0015F738 4 D_L03_0015F740 4 +D_L03_0017C020 60 +D_L03_0017C060 96 D_L03_0017DBC0 224 D_L03_0017DCA0 112 D_L03_0017DD10 28 @@ -7549,6 +7557,8 @@ D_L04_0015F724 4 D_L04_0015F728 4 D_L04_0015F72C 4 D_L04_0015F738 4 +D_L04_0017C0A0 60 +D_L04_0017C0E0 96 D_L04_0017DC40 224 D_L04_0017DD20 112 D_L04_0017DD90 28 @@ -8615,6 +8625,8 @@ D_L05_0015F738 4 D_L05_0015F73C 4 D_L05_0015F748 4 D_L05_0015F750 4 +D_L05_0017C380 60 +D_L05_0017C3C0 96 D_L05_0017DF40 224 D_L05_0017E020 112 D_L05_0017E090 28 @@ -9789,6 +9801,8 @@ D_L06_0015F724 4 D_L06_0015F728 4 D_L06_0015F72C 4 D_L06_0015F738 4 +D_L06_0017C6A0 60 +D_L06_0017C6E0 96 D_L06_0017E240 224 D_L06_0017E320 112 D_L06_0017E390 28 @@ -11049,6 +11063,8 @@ D_L07_0015F724 4 D_L07_0015F728 4 D_L07_0015F72C 4 D_L07_0015F738 4 +D_L07_0017BFA0 60 +D_L07_0017BFE0 96 D_L07_0017DB40 224 D_L07_0017DC20 112 D_L07_0017DC90 28 @@ -12126,6 +12142,8 @@ D_L08_0015F728 4 D_L08_0015F72C 4 D_L08_0015F738 4 D_L08_0015F740 4 +D_L08_0017C720 60 +D_L08_0017C760 96 D_L08_0017E2C0 224 D_L08_0017E3A0 112 D_L08_0017E410 28 @@ -13505,6 +13523,8 @@ D_L09_0015F724 4 D_L09_0015F728 4 D_L09_0015F72C 4 D_L09_0015F738 4 +D_L09_0017C0A0 60 +D_L09_0017C0E0 96 D_L09_0017DC40 224 D_L09_0017DD20 112 D_L09_0017DD90 28 @@ -14822,6 +14842,8 @@ D_L10_0015F724 4 D_L10_0015F728 4 D_L10_0015F72C 4 D_L10_0015F738 4 +D_L10_0017C3A0 60 +D_L10_0017C3E0 96 D_L10_0017DF40 224 D_L10_0017E020 112 D_L10_0017E090 28 @@ -15948,6 +15970,8 @@ D_L11_0015F728 4 D_L11_0015F72C 4 D_L11_0015F738 4 D_L11_0015F740 4 +D_L11_0017C920 60 +D_L11_0017C960 96 D_L11_0017E4C0 224 D_L11_0017E5A0 112 D_L11_0017E610 28 @@ -17249,6 +17273,8 @@ D_L12_0015F728 4 D_L12_0015F72C 4 D_L12_0015F738 4 D_L12_0015F740 4 +D_L12_0017C3A0 60 +D_L12_0017C3E0 96 D_L12_0017DF40 224 D_L12_0017E020 112 D_L12_0017E090 28 @@ -18388,6 +18414,8 @@ D_L13_0015F724 4 D_L13_0015F728 4 D_L13_0015F72C 4 D_L13_0015F738 4 +D_L13_0017C220 60 +D_L13_0017C260 96 D_L13_0017DDC0 224 D_L13_0017DEA0 112 D_L13_0017DF10 28 @@ -19469,6 +19497,8 @@ D_L14_0015F728 4 D_L14_0015F72C 4 D_L14_0015F738 4 D_L14_0015F740 4 +D_L14_0017C620 60 +D_L14_0017C660 96 D_L14_0017E1C0 224 D_L14_0017E2A0 112 D_L14_0017E310 28 @@ -20706,6 +20736,8 @@ D_L15_0015F728 4 D_L15_0015F72C 4 D_L15_0015F738 4 D_L15_0015F740 4 +D_L15_0017C520 60 +D_L15_0017C560 96 D_L15_0017E0C0 224 D_L15_0017E1A0 112 D_L15_0017E210 28 @@ -21899,6 +21931,8 @@ D_L16_0015F738 4 D_L16_0015F73C 4 D_L16_0015F748 4 D_L16_0015F750 4 +D_L16_0017C380 60 +D_L16_0017C3C0 96 D_L16_0017DF40 224 D_L16_0017E020 112 D_L16_0017E090 28 @@ -23047,6 +23081,8 @@ D_L17_0015F724 4 D_L17_0015F728 4 D_L17_0015F72C 4 D_L17_0015F738 4 +D_L17_0017C820 60 +D_L17_0017C860 96 D_L17_0017E3C0 224 D_L17_0017E4A0 112 D_L17_0017E510 28 @@ -24384,6 +24420,8 @@ D_L18_0015F728 4 D_L18_0015F72C 4 D_L18_0015F738 4 D_L18_0015F740 4 +D_L18_0017C920 60 +D_L18_0017C960 96 D_L18_0017E4C0 224 D_L18_0017E5A0 112 D_L18_0017E610 28 diff --git a/include/rnc/overlay/shared/hero/jump_velocity_keys.h b/include/rnc/overlay/shared/hero/jump_velocity_keys.h new file mode 100644 index 0000000000..467fc06062 --- /dev/null +++ b/include/rnc/overlay/shared/hero/jump_velocity_keys.h @@ -0,0 +1,25 @@ +#ifndef LOMBYTE_RNC_OVERLAY_SHARED_HERO_JUMP_VELOCITY_KEYS_H +#define LOMBYTE_RNC_OVERLAY_SHARED_HERO_JUMP_VELOCITY_KEYS_H + +#include "rnc/hero/hero.h" + +/* The vertical velocity curves hero_set_state gives two jumps; every level holds its own copy + next to its hero_set_state. The last key of each holds until velocity_keys_end_frame. */ + +/* HERO_STATE_JUMP_WITH_TRANSFORM_TRAIL. */ +#define HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT 5 +#define HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS \ + { \ + {151.0f, 0.0f, 5}, {0.0f, 0.0f, 27}, {22.0f, 2.0f, 6}, {-999999.0f, -3.0f, 6}, \ + {0.0f, 2.0f, 99}, \ + } + +/* HERO_STATE_WATER_SURFACE_JUMP out of deep water. */ +#define HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT 8 +#define HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS \ + { \ + {-27.0f, 0.0f, 9}, {40.0f, 0.0f, 1}, {55.0f, 0.0f, 1}, {75.0f, 0.0f, 1}, {90.5f, 0.0f, 9}, \ + {75.0f, 0.0f, 4}, {40.0f, 0.0f, 3}, {0.0f, 0.0f, 100}, \ + } + +#endif /* LOMBYTE_RNC_OVERLAY_SHARED_HERO_JUMP_VELOCITY_KEYS_H */ diff --git a/src/overlays/l01/hero/hero_set_state.c b/src/overlays/l01/hero/hero_set_state.c index 1a892943cb..c1b3c787f4 100644 --- a/src/overlays/l01/hero/hero_set_state.c +++ b/src/overlays/l01/hero/hero_set_state.c @@ -4,6 +4,7 @@ #include "rnc/hero/hero_state.h" #include "rnc/weapons/item_id.h" #include "rnc/hero/hero.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" #include "rnc/globals.h" #include "asm.h" #include "rnc/math/fast_math.h" @@ -64,9 +65,12 @@ extern void pool_splash(int, int, int, float, float, float, float) __asm__("FUN_ extern void fill_transfer_words(void *, int, int) __asm__("func_001F97E8"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int l01_hero_set_state(int, int) __asm__("FUN_L01_0023cf98"); -extern char level_01_transform_trail_jump_velocity_keys[] __asm__("D_L01_0017C3A0"); -extern char level_01_water_surface_jump_velocity_keys[] __asm__("D_L01_0017C3E0"); +extern int l01_hero_set_state(int, int) __asm__("FUN_L01_0023cf98"); +struct HeroVelocityKey level_01_transform_trail_jump_velocity_keys + [HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L01_0017C3A0") = + HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey + level_01_water_surface_jump_velocity_keys[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L01_0017C3E0") = HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; int l01_hero_set_state(int requested_state, int animation_setup_mode) { int saved_state_step; diff --git a/src/overlays/l02/hero/hero_set_state.c b/src/overlays/l02/hero/hero_set_state.c index 13a0e63d43..548fc6993a 100644 --- a/src/overlays/l02/hero/hero_set_state.c +++ b/src/overlays/l02/hero/hero_set_state.c @@ -2,6 +2,7 @@ #include "types.h" #include "rnc/hero/hero_state.h" #include "rnc/hero/hero.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" #include "rnc/globals.h" #include "asm.h" #include "rnc/math/fast_math.h" @@ -66,8 +67,10 @@ extern void request_hero_idle_state_for_vehicle_mode(void) __asm__("FUN_L01_0024 extern void blend_moby_animation(void *, int, int, int) __asm__("FUN_00212f90"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L02_0022b728"); -extern char level02_hero_transform_trail_jump_velocity_keys[] __asm__("D_L02_0017C520"); +extern int hero_set_state(int, int) __asm__("FUN_L02_0022b728"); +struct HeroVelocityKey level02_hero_transform_trail_jump_velocity_keys + [HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L02_0017C520") = + HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int entry_animation_mode) { int saved_state_step; @@ -907,7 +910,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - *(char **)&u->velocity_keys = level02_hero_transform_trail_jump_velocity_keys; + u->velocity_keys = level02_hero_transform_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { u->jump_height = 1.9f; @@ -3695,3 +3698,7 @@ void enter_hero_idle_or_stop(void) { hero_set_state(HERO_STATE_STOP, 1); } } + +/* This level's water surface jump uses D_L02_0015F6E8 instead; the copy stays unread. */ +struct HeroVelocityKey D_L02_0017C560[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; diff --git a/src/overlays/l03/hero/hero_set_state.c b/src/overlays/l03/hero/hero_set_state.c index 0d17201790..b223b91e2c 100644 --- a/src/overlays/l03/hero/hero_set_state.c +++ b/src/overlays/l03/hero/hero_set_state.c @@ -24,6 +24,7 @@ #include "rnc/overlay/shared/hero/hero_frame_update.h" #include "rnc/mobys/moby.h" #include "rnc/overlay/shared/hero/hero_tables.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" /* Ported from rac1-decomp (src/overlays/l03_kerwan/help_00216D38.c: func_L03_00216D38), where it is exact; names translated to the US level program. */ @@ -64,9 +65,12 @@ extern void pool_splash(void *, int, int, float, float, float, float) __asm__("F extern void fill_transfer_words(void *, int, int) __asm__("func_001F97E8"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L03_00216648"); -extern char level03_hero_trail_jump_velocity_keys[] __asm__("D_L03_0017C020"); -extern char level03_hero_water_surface_jump_velocity_keys[] __asm__("D_L03_0017C060"); +extern int hero_set_state(int, int) __asm__("FUN_L03_00216648"); +struct HeroVelocityKey + level03_hero_trail_jump_velocity_keys[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L03_0017C020") = HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey level03_hero_water_surface_jump_velocity_keys + [HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L03_0017C060") = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int entry_animation_mode) { int previous_state_step; diff --git a/src/overlays/l05/hero/hero_set_state.c b/src/overlays/l05/hero/hero_set_state.c index f74f20fdec..e41876e3fa 100644 --- a/src/overlays/l05/hero/hero_set_state.c +++ b/src/overlays/l05/hero/hero_set_state.c @@ -28,10 +28,13 @@ #include "rnc/overlay/shared/rendering/set_moby_color.h" #include "rnc/mobys/moby.h" #include "rnc/overlay/shared/hero/hero_tables.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" /* Ported from rac1-decomp (src/overlays/l05_rilgar/help_0024D680.c: func_L05_0024D680), where it is exact; names translated to the US level program. */ -extern char D_L05_0017C380_e[] __asm__("D_L05_0017C380"); +struct HeroVelocityKey level05_hero_transform_trail_jump_velocity_keys + [HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L05_0017C380") = + HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; extern HeroTableRow2C D_L05_0017C088[]; extern char *moby_pool_4f60 __asm__("D_L05_0015FFD8"); extern char *hero_slot_moby(int) __asm__("FUN_L00_0020d460"); @@ -78,8 +81,10 @@ extern void fill_transfer_words(void *, int, int) __asm__("func_001F97E8"); extern void draw_hud_timer(void) __asm__("FUN_L05_00266710"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L05_0024cee8"); -extern char level05_hero_water_surface_jump_velocity_keys[] __asm__("D_L05_0017C3C0"); +extern int hero_set_state(int, int) __asm__("FUN_L05_0024cee8"); +struct HeroVelocityKey level05_hero_water_surface_jump_velocity_keys + [HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L05_0017C3C0") = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int animation_request_mode) { int saved_state_step; @@ -1397,7 +1402,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - u->velocity_keys = D_L05_0017C380_e; + u->velocity_keys = level05_hero_transform_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { u->jump_height = 1.9f; diff --git a/src/overlays/l06/hero/hero_set_state.c b/src/overlays/l06/hero/hero_set_state.c index 3a132a4faa..fac51d3618 100644 --- a/src/overlays/l06/hero/hero_set_state.c +++ b/src/overlays/l06/hero/hero_set_state.c @@ -26,6 +26,7 @@ #include "rnc/overlay/shared/rendering/set_moby_color.h" #include "rnc/mobys/moby.h" #include "rnc/overlay/shared/hero/hero_tables.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" /* Ported from rac1-decomp (src/overlays/l06_blarg/help_00235E08.c: func_L06_00235E08), where it is exact; names translated to the US level program. */ @@ -66,8 +67,10 @@ extern void create_moby_transform_history_entry(char *o, int a, int b) __asm__(" extern void clear_moby_transform_history(char *o) __asm__("FUN_L00_00262840"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L06_002356a0"); -extern char level06_hero_transform_trail_jump_velocity_keys[] __asm__("D_L06_0017C6A0"); +extern int hero_set_state(int, int) __asm__("FUN_L06_002356a0"); +struct HeroVelocityKey level06_hero_transform_trail_jump_velocity_keys + [HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L06_0017C6A0") = + HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int entry_animation_mode) { int saved_state_step; @@ -1034,7 +1037,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - *(char **)&u->velocity_keys = level06_hero_transform_trail_jump_velocity_keys; + u->velocity_keys = level06_hero_transform_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { u->jump_height = 1.9f; @@ -1838,3 +1841,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { } return 1; } + +/* This level's water surface jump uses D_L06_0015F6E8 instead; the copy stays unread. */ +struct HeroVelocityKey D_L06_0017C6E0[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; diff --git a/src/overlays/l08/hero/hero_set_state.c b/src/overlays/l08/hero/hero_set_state.c index bb08b73c8c..a5a7761bea 100644 --- a/src/overlays/l08/hero/hero_set_state.c +++ b/src/overlays/l08/hero/hero_set_state.c @@ -24,6 +24,7 @@ #include "rnc/overlay/shared/hero/hero_frame_update.h" #include "rnc/mobys/moby.h" #include "rnc/overlay/shared/hero/hero_tables.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" /* Ported from rac1-decomp (src/overlays/l08_batalia/help_00231228.c: func_L08_00231228), where it is exact; names translated to the US level program. */ @@ -64,9 +65,11 @@ extern void pool_splash(void *, int, int, float, float, float, float) __asm__("F extern void fill_transfer_words(void *, int, int) __asm__("func_001F97E8"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L08_00230b38"); -extern char hero_water_surface_jump_velocity_keys[] __asm__("D_L08_0017C760"); -extern char hero_transform_trail_jump_velocity_keys[] __asm__("D_L08_0017C720"); +extern int hero_set_state(int, int) __asm__("FUN_L08_00230b38"); +struct HeroVelocityKey + hero_water_surface_jump_velocity_keys[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L08_0017C760") = HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey + hero_transform_trail_jump_velocity_keys[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L08_0017C720") = HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int animation_request_mode) { int previous_state_step; diff --git a/src/overlays/l11/hero/hero_set_state.c b/src/overlays/l11/hero/hero_set_state.c index 6f67260238..d57e2cfd2a 100644 --- a/src/overlays/l11/hero/hero_set_state.c +++ b/src/overlays/l11/hero/hero_set_state.c @@ -24,6 +24,7 @@ #include "rnc/overlay/shared/hero/hero_frame_update.h" #include "rnc/mobys/moby.h" #include "rnc/overlay/shared/hero/hero_tables.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" /* Ported from rac1-decomp (src/overlays/l11_pokitaru/help_0024E240.c: func_L11_0024E240), where it is exact; names translated to the US level program. */ @@ -61,9 +62,11 @@ extern void clear_moby_transform_history(char *o) __asm__("FUN_L00_00262840"); extern void pool_splash(int, int, int, float, float, float, float) __asm__("FUN_L00_002a3ec8"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L11_0024db50"); -extern char level_11_water_surface_jump_velocity_keys[] __asm__("D_L11_0017C960"); -extern char level_11_trail_jump_velocity_keys[] __asm__("D_L11_0017C920"); +extern int hero_set_state(int, int) __asm__("FUN_L11_0024db50"); +struct HeroVelocityKey + level_11_water_surface_jump_velocity_keys[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L11_0017C960") = HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey + level_11_trail_jump_velocity_keys[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L11_0017C920") = HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int animation_update_mode) { int previous_state_step; diff --git a/src/overlays/l12/hero/hero_set_state.c b/src/overlays/l12/hero/hero_set_state.c index d77b6748ec..beaf7a069e 100644 --- a/src/overlays/l12/hero/hero_set_state.c +++ b/src/overlays/l12/hero/hero_set_state.c @@ -25,6 +25,7 @@ #include "rnc/overlay/shared/hero/hero_update_hop_movement.h" #include "rnc/mobys/moby.h" #include "rnc/overlay/shared/hero/hero_tables.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" /* Ported from rac1-decomp (src/overlays/l12_hoven/help_002407C0.c: func_L12_002407C0), where it is exact; names translated to the US level program. */ @@ -62,9 +63,13 @@ extern void clear_moby_transform_history(char *o) __asm__("FUN_L00_00262840"); extern void pool_splash(int, int, int, float, float, float, float) __asm__("FUN_L00_002a3ec8"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L12_002400d0"); -extern char level12_transform_trail_jump_velocity_key_profile[] __asm__("D_L12_0017C3A0"); -extern char level12_water_surface_jump_velocity_key_profile[] __asm__("D_L12_0017C3E0"); +extern int hero_set_state(int, int) __asm__("FUN_L12_002400d0"); +struct HeroVelocityKey level12_transform_trail_jump_velocity_key_profile + [HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L12_0017C3A0") = + HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey level12_water_surface_jump_velocity_key_profile + [HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L12_0017C3E0") = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int entry_animation_mode) { int previous_state_step; diff --git a/src/overlays/l14/hero/hero_set_state.c b/src/overlays/l14/hero/hero_set_state.c index 464fb01c9d..4ad551aac2 100644 --- a/src/overlays/l14/hero/hero_set_state.c +++ b/src/overlays/l14/hero/hero_set_state.c @@ -25,6 +25,7 @@ #include "rnc/overlay/shared/hero/hero_update_hop_movement.h" #include "rnc/mobys/moby.h" #include "rnc/overlay/shared/hero/hero_tables.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" /* Ported from rac1-decomp (src/overlays/l14_oltanis/help_002306C8.c: func_L14_002306C8), where it is exact; names translated to the US level program. */ @@ -61,8 +62,10 @@ extern void create_moby_transform_history_entry(char *o, int a, int b) __asm__(" extern void clear_moby_transform_history(void *o) __asm__("FUN_L00_00262840"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L14_0022ff58"); -extern char level14_transform_trail_jump_velocity_keys[] __asm__("D_L14_0017C620"); +extern int hero_set_state(int, int) __asm__("FUN_L14_0022ff58"); +struct HeroVelocityKey level14_transform_trail_jump_velocity_keys + [HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L14_0017C620") = + HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int animation_update_mode) { int saved_state_step; @@ -999,7 +1002,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { u->unk3DC = 26.0f; u->keyed_move_target_frame = 0.0f; u->keyed_anim_target_frame = scale_game_frames(0x2D); - *(char **)&u->velocity_keys = level14_transform_trail_jump_velocity_keys; + u->velocity_keys = level14_transform_trail_jump_velocity_keys; u->can_chain_high_jump = 1; } else if (u->state.current == 0xF) { u->jump_height = 1.9f; @@ -1628,3 +1631,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { } return 1; } + +/* This level's water surface jump uses D_L14_0015F6E8 instead; the copy stays unread. */ +struct HeroVelocityKey D_L14_0017C660[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; diff --git a/src/overlays/l15/hero/hero_set_state.c b/src/overlays/l15/hero/hero_set_state.c index 727ab6c70f..ac88b4027b 100644 --- a/src/overlays/l15/hero/hero_set_state.c +++ b/src/overlays/l15/hero/hero_set_state.c @@ -25,6 +25,7 @@ #include "rnc/overlay/shared/hero/update_hero_and_vehicle_mode_effects.h" #include "rnc/mobys/moby.h" #include "rnc/overlay/shared/hero/hero_tables.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" /* Ported from rac1-decomp (src/overlays/l15_quartu/help_00217348.c: func_L15_00217348), where it is exact; names translated to the US level program. */ @@ -64,9 +65,11 @@ extern void pool_splash(void *, int, int, float, float, float, float) __asm__("F extern void fill_transfer_words(void *, int, int) __asm__("func_001F97E8"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L15_00216c38"); -extern char hero_trail_jump_velocity_keys[] __asm__("D_L15_0017C520"); -extern char hero_deep_water_jump_velocity_keys[] __asm__("D_L15_0017C560"); +extern int hero_set_state(int, int) __asm__("FUN_L15_00216c38"); +struct HeroVelocityKey + hero_trail_jump_velocity_keys[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L15_0017C520") = HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey + hero_deep_water_jump_velocity_keys[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L15_0017C560") = HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int entry_animation_mode) { int saved_state_step; diff --git a/src/overlays/l16/hero/hero_set_state.c b/src/overlays/l16/hero/hero_set_state.c index c731a41607..bcb680f868 100644 --- a/src/overlays/l16/hero/hero_set_state.c +++ b/src/overlays/l16/hero/hero_set_state.c @@ -27,6 +27,7 @@ #include "rnc/overlay/shared/hero/process_hero_primary_item_input.h" #include "rnc/mobys/moby.h" #include "rnc/overlay/shared/hero/hero_tables.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" /* Ported from rac1-decomp (src/overlays/l16_kalebo3/help_0021EA88.c: func_L16_0021EA88), where it is exact; names translated to the US level program. */ @@ -78,9 +79,12 @@ extern void fill_transfer_words(void *, int, int) __asm__("func_001F97E8"); extern void draw_hud_timer(void) __asm__("FUN_L05_00266710"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L16_0021e398"); -extern char level16_hero_jump_velocity_keys[] __asm__("D_L16_0017C380"); -extern char level16_hero_water_surface_jump_velocity_keys[] __asm__("D_L16_0017C3C0"); +extern int hero_set_state(int, int) __asm__("FUN_L16_0021e398"); +struct HeroVelocityKey + level16_hero_jump_velocity_keys[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L16_0017C380") = HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey level16_hero_water_surface_jump_velocity_keys + [HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L16_0017C3C0") = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int animation_update_mode) { int saved_state_step; diff --git a/src/overlays/l17/hero/hero_set_state.c b/src/overlays/l17/hero/hero_set_state.c index 5d57283b2d..023db9e6bb 100644 --- a/src/overlays/l17/hero/hero_set_state.c +++ b/src/overlays/l17/hero/hero_set_state.c @@ -19,6 +19,7 @@ #include "rnc/overlay/shared/rendering/set_moby_color.h" #include "rnc/mobys/moby.h" #include "rnc/overlay/shared/hero/hero_tables.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" /* Ported from rac1-decomp (src/overlays/l17_fleet/help_0021ED38.c: func_L17_0021ED38), where it is exact; names translated to the US level program. */ @@ -88,9 +89,12 @@ extern void pool_splash(int, int, int, float, float, float, float) __asm__("FUN_ extern void fill_transfer_words(void *, int, int) __asm__("func_001F97E8"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L17_0021e530"); -extern char level17_hero_water_surface_jump_velocity_keys[] __asm__("D_L17_0017C860"); -extern char level17_hero_trail_jump_velocity_keys[] __asm__("D_L17_0017C820"); +extern int hero_set_state(int, int) __asm__("FUN_L17_0021e530"); +struct HeroVelocityKey level17_hero_water_surface_jump_velocity_keys + [HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L17_0017C860") = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey + level17_hero_trail_jump_velocity_keys[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L17_0017C820") = HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int b) { int previous_state_step; diff --git a/src/overlays/l18/hero/hero_set_state.c b/src/overlays/l18/hero/hero_set_state.c index 47c676e46f..3814863027 100644 --- a/src/overlays/l18/hero/hero_set_state.c +++ b/src/overlays/l18/hero/hero_set_state.c @@ -24,6 +24,7 @@ #include "rnc/overlay/shared/hero/update_hero_and_vehicle_mode_effects.h" #include "rnc/mobys/moby.h" #include "rnc/overlay/shared/hero/hero_tables.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" /* Ported from rac1-decomp (src/overlays/l18_veldin2/help_002284E0.c: func_L18_002284E0), where it is exact; names translated to the US level program. */ @@ -65,9 +66,12 @@ extern void pool_splash(void *, int, int, float, float, float, float) __asm__("F extern void fill_transfer_words(void *, int, int) __asm__("func_001F97E8"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L18_00227dd0"); -extern char hero_trail_jump_velocity_key_profile[] __asm__("D_L18_0017C920"); -extern char hero_water_surface_jump_velocity_key_profile[] __asm__("D_L18_0017C960"); +extern int hero_set_state(int, int) __asm__("FUN_L18_00227dd0"); +struct HeroVelocityKey + hero_trail_jump_velocity_key_profile[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L18_0017C920") = HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey hero_water_surface_jump_velocity_key_profile + [HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L18_0017C960") = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int animation_update_mode) { int previous_state_step; diff --git a/src/overlays/shared/hero/hero_set_state.c b/src/overlays/shared/hero/hero_set_state.c index d26f52fde4..a2198ec38e 100644 --- a/src/overlays/shared/hero/hero_set_state.c +++ b/src/overlays/shared/hero/hero_set_state.c @@ -4,6 +4,7 @@ #include "rnc/hero/hero_state.h" #include "rnc/weapons/item_id.h" #include "rnc/hero/hero.h" +#include "rnc/overlay/shared/hero/jump_velocity_keys.h" #include "rnc/globals.h" #include "asm.h" @@ -614,8 +615,9 @@ typedef struct { float x, y, z, w; } __attribute__((aligned(16))) V4_222B80; -extern char hero_pal_timed_jump_keys[4] __asm__("D_L00_0015F6E8") __attribute__((sda)); -extern char D_L00_0017BF60_e[] __asm__("D_L00_0017BF60"); +extern char hero_pal_timed_jump_keys[4] __asm__("D_L00_0015F6E8") __attribute__((sda)); +struct HeroVelocityKey + hero_water_surface_jump_velocity_keys[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L00_0017BF60") = HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; extern HeroTableRow2C attack_records[] __asm__("D_L00_0017BC28"); extern char *hero_slot_moby(int) __asm__("FUN_L00_0020d460"); @@ -672,8 +674,9 @@ extern void blend_moby_animation(void *, int, int, int) __asm__("FUN_00212f90"); extern void fast_vec_normalize(void *, void *, float) __asm__("FUN_001f9bf8"); /* Sets hero.state.current to a: moves state, control_mode and state_timer into the prev_* fields, zeroes state_step, then sets up the new state; returns 0 when the change is refused. */ -extern int hero_set_state(int, int) __asm__("FUN_L00_002223f8"); -extern char hero_velocity_profile_jump_keys[] __asm__("D_L00_0017BF20"); +extern int hero_set_state(int, int) __asm__("FUN_L00_002223f8"); +struct HeroVelocityKey + hero_velocity_profile_jump_keys[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L00_0017BF20") = HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; int hero_set_state(int requested_state, int b) { int previous_state_step; @@ -1794,7 +1797,7 @@ int hero_set_state(int requested_state, int b) { u->keyed_move_target_frame = 0.0f; u->unk3DC = 18.0f; u->keyed_anim_target_frame = scale_game_frames(0x28); - u->velocity_keys = D_L00_0017BF60_e; + u->velocity_keys = hero_water_surface_jump_velocity_keys; } { struct Hero *w = &hero; @@ -3917,3 +3920,25 @@ s32 D_L15_0015F6C8 = 0; s32 D_L16_0015F6D8 = 0; s32 D_L17_0015F6C8 = 0; s32 D_L18_0015F6C8 = 0; + +/* The copies hero_set_state reads at its places in levels 4, 7, 9, 10 and 13. */ +struct HeroVelocityKey D_L04_0017C0A0[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] = + HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey D_L04_0017C0E0[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey D_L07_0017BFA0[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] = + HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey D_L07_0017BFE0[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey D_L09_0017C0A0[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] = + HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey D_L09_0017C0E0[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey D_L10_0017C3A0[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] = + HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey D_L10_0017C3E0[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey D_L13_0017C220[HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] = + HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; +struct HeroVelocityKey D_L13_0017C260[HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS_COUNT] = + HERO_WATER_SURFACE_JUMP_VELOCITY_KEYS; From 67524d94fd03e13e97c9165c34a734ef31e96cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:17:10 +0000 Subject: [PATCH 148/213] decomp: name the follow camera run-toward lock, pull-back max and script pitch setters and its distance and pivot height --- include/rnc/camera/follow_cam.h | 47 ++++++++++--------- include/rnc/overlay/shared/camera.h | 4 +- .../camera/follow_camera_set_up_spring.h | 2 +- src/check/follow_cam_layout_check.c | 8 ++-- src/overlays/l15/moby_follow_camera.c | 2 +- .../shared/camera/aim_volume_camera.c | 32 ++++++------- .../camera/follow_camera_set_distance.c | 11 +++-- .../camera/follow_camera_set_up_spring.c | 8 ++-- .../shared/camera/follow_camera_setup.c | 20 ++++---- .../shared/camera/follow_camera_springs.c | 12 ++--- .../shared/camera/moby_controlled_camera.c | 6 +-- .../shared/camera/swing_volume_camera.c | 34 +++++++------- 12 files changed, 96 insertions(+), 90 deletions(-) diff --git a/include/rnc/camera/follow_cam.h b/include/rnc/camera/follow_cam.h index d3ab12903d..cd5741b442 100644 --- a/include/rnc/camera/follow_cam.h +++ b/include/rnc/camera/follow_cam.h @@ -17,8 +17,9 @@ typedef struct { f32 focus[4]; /* 0x40: point the camera looks at, moved by velocity each frame */ f32 velocity[4]; /* 0x50: focus displacement for this frame */ u8 pad60[0x20]; - f32 look_target[4]; /* 0x80: focus offset blended towards the hero */ - f32 eye[4]; /* 0x90: resulting camera position */ + f32 look_target[4]; /* 0x80: focus offset blended towards the hero */ + f32 pivot + [4]; /* 0x90: point pivot_height above the hero; the camera sits at pivot + eye_offset */ f32 offset[4]; /* 0xA0: eased offset, split into a lateral and an up part */ f32 lateral_ease[4]; /* 0xB0: cam_interp_values state of the lateral part */ f32 up_ease[4]; /* 0xC0: cam_interp_values state of the up part */ @@ -49,42 +50,42 @@ typedef struct { typedef struct { u8 pad1D0[0x20]; f32 shot_pos[4]; /* 0x1F0: set to the record's position */ - f32 eye_distance_error; /* 0x200: eye_distance minus the length of eye_offset */ - u8 pad204[8]; + f32 distance_reduction; /* 0x200: distance minus the length of eye_offset (walls pull the camera in) */ + u8 pad204[8]; } FollowCamSnap; typedef struct { - f32 eye_offset[4]; /* 0x130: eye offset; its length is the eye distance */ + f32 eye_offset[4]; /* 0x130: camera offset from the pivot; its length is distance */ f32 saved_eye_offset[4]; /* 0x140: copy of eye_offset */ u8 pad150[0xC]; - f32 eye_distance; /* 0x15C: eye distance, set with eye_offset by the shot cameras */ - f32 distance; /* 0x160: distance of the eye behind the hero */ + f32 distance; /* 0x15C: distance of the camera from the pivot (4.64), length of eye_offset */ + f32 pivot_height; /* 0x160: height of the pivot above the hero (2.0) */ f32 yaw_step; /* 0x164: yaw step this frame; aim cameras start only while it is (nearly) 0 */ u8 pad168[0x40]; FollowCamFlags ctl; /* 0x1A8 */ u8 pad1BC[0x10]; - f32 script_pitch; /* 0x1CC: scripted pitch in radians, set by FUN_L00_002e8540 */ - FollowCamSnap snap; /* 0x1D0 */ - f32 zoom_scale; /* 0x20C */ - f32 zoom; /* 0x210: 1.0 is no zoom */ - f32 zoom_range; /* 0x214 */ - u8 pad218[0xE]; - s16 run_toward_lock; /* 0x226: 1 (FUN_L00_002e8620) keeps the camera from pulling back while the hero runs toward it */ + f32 script_pitch; /* 0x1CC: scripted pitch in radians, set by set_follow_camera_script_pitch */ + FollowCamSnap snap; /* 0x1D0 */ + f32 zoom_scale; /* 0x20C */ + f32 zoom; /* 0x210: 1.0 is no zoom */ + f32 zoom_range; /* 0x214 */ + u8 pad218[0xE]; + s16 run_toward_lock; /* 0x226: 1 (lock_follow_camera_run_toward) keeps the camera from pulling back while the hero runs toward it */ u8 pad228[4]; - f32 pull_back_max; /* 0x22C: farthest pull-back while the hero runs toward the camera (6.0), set by FUN_L00_002e8490 */ - s32 mode; /* 0x230: 0 normal; shot cameras of type 10 and 11 set 0x14D and 2 */ + f32 pull_back_max; /* 0x22C: farthest pull-back while the hero runs toward the camera (6.0), set by set_follow_camera_pull_back_max */ + s32 mode; /* 0x230: 0 normal; shot cameras of type 10 and 11 set 0x14D and 2 */ } FollowCamTail; /* 0x20..0x3B: eased values reset when a shot camera snaps. */ typedef struct { u8 pad20[2]; - s16 unk22; /* 0x22 */ - f32 look_height; /* 0x24: copy of follow.look_height */ - f32 distance; /* 0x28: copy of tail.distance */ - f32 look_height_vel; /* 0x2C: cam_interp_values step of look_height */ - f32 distance_vel; /* 0x30: cam_interp_values step of distance */ - f32 pitch_bias; /* 0x34: springed pitch bias while the camera is low */ - f32 pitch_bias_vel; /* 0x38 */ + s16 unk22; /* 0x22 */ + f32 look_height; /* 0x24: copy of follow.look_height */ + f32 pivot_height; /* 0x28: eased copy of tail.pivot_height */ + f32 look_height_vel; /* 0x2C: cam_interp_values step of look_height */ + f32 pivot_height_vel; /* 0x30: cam_interp_values step of pivot_height */ + f32 pitch_bias; /* 0x34: springed pitch bias while the camera is low */ + f32 pitch_bias_vel; /* 0x38 */ u8 pad3C[4]; } FollowCamReset; diff --git a/include/rnc/overlay/shared/camera.h b/include/rnc/overlay/shared/camera.h index 4a12803de4..4c549c37ef 100644 --- a/include/rnc/overlay/shared/camera.h +++ b/include/rnc/overlay/shared/camera.h @@ -11,8 +11,8 @@ void set_transform_state_three_when_outside_clip_volume(char *) __asm__("FUN_L03 void try_select_camera_offset_effect_moby(char *) __asm__("FUN_L02_002fa7c8"); void set_follow_camera_orbit_clamp_mode(int) __asm__("FUN_L00_002e8568"); void set_follow_camera_blend_output_flags(void) __asm__("FUN_L00_002e8680"); -void FUN_L00_002e8620(void); -void FUN_L00_002e8490(float); +void lock_follow_camera_run_toward(void) __asm__("FUN_L00_002e8620"); +void set_follow_camera_pull_back_max(float) __asm__("FUN_L00_002e8490"); void follow_camera_setup() __asm__("FUN_L00_002e6d60"); void reset_follow_camera_state_from_position(char *) __asm__("FUN_L00_002e6bf8"); void follow_camera_auto_turn(int) __asm__("FUN_L00_002e8f40"); diff --git a/include/rnc/overlay/shared/camera/follow_camera_set_up_spring.h b/include/rnc/overlay/shared/camera/follow_camera_set_up_spring.h index a4cc569ee7..b57a836bba 100644 --- a/include/rnc/overlay/shared/camera/follow_camera_set_up_spring.h +++ b/include/rnc/overlay/shared/camera/follow_camera_set_up_spring.h @@ -5,6 +5,6 @@ void set_camera_rotation(void *) __asm__("FUN_L00_002eaa30"); -void FUN_L00_002e8540(float); +void set_follow_camera_script_pitch(float) __asm__("FUN_L00_002e8540"); #endif /* LOMBYTE_RNC_OVERLAY_SHARED_CAMERA_FOLLOW_CAMERA_SET_UP_SPRING_H */ diff --git a/src/check/follow_cam_layout_check.c b/src/check/follow_cam_layout_check.c index e8142bb56f..a514158936 100644 --- a/src/check/follow_cam_layout_check.c +++ b/src/check/follow_cam_layout_check.c @@ -8,7 +8,7 @@ #include "rnc/camera/follow_cam.h" OFFSET_CHECK(reset, FollowCamState, reset, 0x20); -OFFSET_CHECK(reset_distance, FollowCamState, reset.distance, 0x28); +OFFSET_CHECK(reset_pivot_height, FollowCamState, reset.pivot_height, 0x28); OFFSET_CHECK(reset_pitch_bias_vel, FollowCamState, reset.pitch_bias_vel, 0x38); OFFSET_CHECK(follow, FollowCamState, follow, 0x40); OFFSET_CHECK(snap_look_target, FollowCamState, follow.snap_look_target, 0xD0); @@ -16,13 +16,13 @@ OFFSET_CHECK(look_height, FollowCamState, follow.look_height, 0xF0); OFFSET_CHECK(blend_timer, FollowCamState, follow.blend_timer, 0x118); OFFSET_CHECK(up_damping, FollowCamState, follow.up_damping, 0x128); OFFSET_CHECK(tail, FollowCamState, tail, 0x130); -OFFSET_CHECK(eye_distance, FollowCamState, tail.eye_distance, 0x15C); -OFFSET_CHECK(distance, FollowCamState, tail.distance, 0x160); +OFFSET_CHECK(distance, FollowCamState, tail.distance, 0x15C); +OFFSET_CHECK(pivot_height, FollowCamState, tail.pivot_height, 0x160); OFFSET_CHECK(ctl, FollowCamState, tail.ctl, 0x1A8); OFFSET_CHECK(flags, FollowCamState, tail.ctl.flags, 0x1B8); OFFSET_CHECK(script_pitch, FollowCamState, tail.script_pitch, 0x1CC); OFFSET_CHECK(snap, FollowCamState, tail.snap, 0x1D0); -OFFSET_CHECK(eye_distance_error, FollowCamState, tail.snap.eye_distance_error, 0x200); +OFFSET_CHECK(distance_reduction, FollowCamState, tail.snap.distance_reduction, 0x200); OFFSET_CHECK(zoom_scale, FollowCamState, tail.zoom_scale, 0x20C); OFFSET_CHECK(zoom_range, FollowCamState, tail.zoom_range, 0x214); OFFSET_CHECK(run_toward_lock, FollowCamState, tail.run_toward_lock, 0x226); diff --git a/src/overlays/l15/moby_follow_camera.c b/src/overlays/l15/moby_follow_camera.c index 769800afa6..5ae9718444 100644 --- a/src/overlays/l15/moby_follow_camera.c +++ b/src/overlays/l15/moby_follow_camera.c @@ -184,7 +184,7 @@ void update_moby_follow_camera(char *moby) { set_follow_camera_angle_blend_from_position(target_record + 0x30, spin_angle_radians, 0.0f); if (*(float *)(slot_data + 0x34) != 0.0f) { follow_camera_set_distance(0, *(float *)(slot_data + 0x34), 0.003f); - FUN_L00_002e8620(); + lock_follow_camera_run_toward(); } if (*(float *)(slot_data + 0x38) != 0.0f) follow_camera_set_height(*(float *)(slot_data + 0x38), 0.003f); diff --git a/src/overlays/shared/camera/aim_volume_camera.c b/src/overlays/shared/camera/aim_volume_camera.c index c252728a33..1bee69f9c8 100644 --- a/src/overlays/shared/camera/aim_volume_camera.c +++ b/src/overlays/shared/camera/aim_volume_camera.c @@ -23,11 +23,11 @@ typedef struct { s32 clip_volume; /* 0x0C: is_point_inside_clip_volume id, -1 none */ s32 volume_25fa38; /* 0x10: FUN_L00_0025fa38 volume, -1 none */ u8 pad14[0xC]; - s32 timer; /* 0x20: frames since the camera started (capped at 200), 0 when off */ - s16 keep_leash; /* 0x24: 0 clears FollowCamState.leash each frame */ - s16 done; /* 0x26: set when the camera ends */ - f32 script_pitch; /* 0x28: degrees, FollowCamState.tail.script_pitch through FUN_L00_002e8540 */ - f32 angle; /* 0x2C: radians; with height and distance gives offset_scale */ + s32 timer; /* 0x20: frames since the camera started (capped at 200), 0 when off */ + s16 keep_leash; /* 0x24: 0 clears FollowCamState.leash each frame */ + s16 done; /* 0x26: set when the camera ends */ + f32 script_pitch; /* 0x28: degrees, FollowCamState.tail.script_pitch through set_follow_camera_script_pitch */ + f32 angle; /* 0x2C: radians; with height and distance gives offset_scale */ u8 pad30[4]; s32 need_still; /* 0x34: start only while tail.yaw_step and tail.ctl.pitch_input are (nearly) 0 */ f32 distance; /* 0x38: horizontal distance from the hero to the position */ @@ -151,12 +151,12 @@ void volume_camera_aim(struct UpdateCam *aim_camera_record) { state = rig; reset = &state->reset; qcopy(rec_pos, pos); - tail->eye_distance = params->distance; - tail->distance = params->height; + tail->distance = params->distance; + tail->pivot_height = params->height; follow->look_height = params->offset_scale; - fast_vec_scale(gravity_offset, &hero.gravity_dir, -tail->distance); - fast_vec_add(state->follow.eye, &hero.motion.pos, gravity_offset); - fast_vec_sub(tail->eye_offset, pos, state->follow.eye); + fast_vec_scale(gravity_offset, &hero.gravity_dir, -tail->pivot_height); + fast_vec_add(state->follow.pivot, &hero.motion.pos, gravity_offset); + fast_vec_sub(tail->eye_offset, pos, state->follow.pivot); qcopy(state->tail.saved_eye_offset, tail->eye_offset); fast_vec_scale(gravity_offset, &hero.gravity_dir, -follow->look_height); fast_vec_add(state->follow.look_target, &hero.motion.pos, gravity_offset); @@ -165,16 +165,16 @@ void volume_camera_aim(struct UpdateCam *aim_camera_record) { qcopy(state->follow.offset, follow->focus); qcopy(state->position, rec_pos); qcopy(state->tail.snap.shot_pos, rec_pos); - *(s32 *)&snap->eye_distance_error = 0; + *(s32 *)&snap->distance_reduction = 0; *(s32 *)&reset->pitch_bias = 0; reset->look_height = follow->look_height; { f32 zero = reset->pitch_bias; - f32 distance = tail->distance; - reset->distance = distance; + f32 distance = tail->pivot_height; + reset->pivot_height = distance; reset->unk22 = 0; reset->pitch_bias_vel = zero; - reset->distance_vel = zero; + reset->pivot_height_vel = zero; reset->look_height_vel = zero; } } @@ -184,7 +184,7 @@ void volume_camera_aim(struct UpdateCam *aim_camera_record) { } if (params->distance != 0.0f) { follow_camera_set_distance(0, params->distance, 0.003f); - FUN_L00_002e8620(); + lock_follow_camera_run_toward(); } if (params->height != 0.0f) { follow_camera_set_height(params->height, 0.003f); @@ -193,7 +193,7 @@ void volume_camera_aim(struct UpdateCam *aim_camera_record) { follow_camera_set_offset_scale(0, params->offset_scale, 0.005f); } if (params->script_pitch != 0.0f) { - FUN_L00_002e8540(params->script_pitch * 0.017453292f); + set_follow_camera_script_pitch(params->script_pitch * 0.017453292f); } if (params->keep_leash == 0) { set_follow_camera_orbit_clamp_mode(0); diff --git a/src/overlays/shared/camera/follow_camera_set_distance.c b/src/overlays/shared/camera/follow_camera_set_distance.c index 8da9756ed3..a712a58319 100644 --- a/src/overlays/shared/camera/follow_camera_set_distance.c +++ b/src/overlays/shared/camera/follow_camera_set_distance.c @@ -130,10 +130,13 @@ void follow_camera_set_distance(s32 copy_distance_to_secondary_slot, } } -void FUN_L00_002e8490(float camera_state_value) { +/* Sets FollowCamState.tail.pull_back_max while the record's short at 0x86 is 0. */ +void set_follow_camera_pull_back_max(float pull_back_max) __asm__("FUN_L00_002e8490"); + +void set_follow_camera_pull_back_max(float pull_back_max) { char *current_camera = (char *)current_follow_cam; if (*(short *)(current_camera + 0x86) == 0) { - *(float *)(*(char **)(current_camera + 0x70) + 0x22C) = camera_state_value; + *(float *)(*(char **)(current_camera + 0x70) + 0x22C) = pull_back_max; } } @@ -197,9 +200,9 @@ void follow_camera_set_lateral_spring(float lateral_spring_value, /* Sets the short at +0x226 of D_L00_00166E00+0x70 while the short at 0x86 is 0. */ /* Ported from rac1-decomp (src/overlays/shared/vendor_002E1660.c: func_L00_002E9AD0), where it is exact; names translated to the US level program. */ -void FUN_L00_002e8620(void); +void lock_follow_camera_run_toward(void) __asm__("FUN_L00_002e8620"); -void FUN_L00_002e8620(void) { +void lock_follow_camera_run_toward(void) { char *current_camera = (char *)current_follow_cam; if (*(short *)(current_camera + 0x86) == 0) { *(short *)(*(char **)(current_camera + 0x70) + 0x226) = 1; diff --git a/src/overlays/shared/camera/follow_camera_set_up_spring.c b/src/overlays/shared/camera/follow_camera_set_up_spring.c index 227c6dc9ff..2b459bbc6c 100644 --- a/src/overlays/shared/camera/follow_camera_set_up_spring.c +++ b/src/overlays/shared/camera/follow_camera_set_up_spring.c @@ -7,11 +7,13 @@ #include "sda.h" #include "rnc/camera/follow_cam.h" -/* Stores f at +0x1CC of D_L00_00166E00+0x70 while the short at 0x86 is 0. */ -void FUN_L00_002e8540(float stored_value) { +/* Sets FollowCamState.tail.script_pitch (radians) while the record's short at 0x86 is 0. */ +void set_follow_camera_script_pitch(float pitch) __asm__("FUN_L00_002e8540"); + +void set_follow_camera_script_pitch(float pitch) { char *camera_record = current_follow_cam; if (*(short *)(camera_record + 0x86) == 0) { - *(float *)(*(char **)(camera_record + 0x70) + 0x1cc) = stored_value; + *(float *)(*(char **)(camera_record + 0x70) + 0x1cc) = pitch; } } diff --git a/src/overlays/shared/camera/follow_camera_setup.c b/src/overlays/shared/camera/follow_camera_setup.c index 0c7546abe2..328d85b28d 100644 --- a/src/overlays/shared/camera/follow_camera_setup.c +++ b/src/overlays/shared/camera/follow_camera_setup.c @@ -34,13 +34,13 @@ extern float D_L00_00161D1C_gp __asm__("D_L00_00161D1C") __attribute__((sda)); /* FollowCamTail (rnc/camera/follow_cam.h), from saved state + 0x130 */ typedef struct { char pad0[0x2C]; - float eye_distance; /* 0x15C */ + float distance; /* 0x15C: FollowCamState.tail.distance */ char pad30[0xC]; - short eye_distance_override; /* 0x16C: eye_distance eases to eye_distance_target */ - short distance_override; /* 0x16E: distance eases to distance_target */ - int eye_distance_target; /* 0x170 */ + short distance_override; /* 0x16C: distance eases to distance_target */ + short pivot_height_override; /* 0x16E: pivot_height eases to pivot_height_target */ + int distance_target; /* 0x170 */ char pad44[8]; - int distance_target; /* 0x17C */ + int pivot_height_target; /* 0x17C */ char pad50[8]; float base_distance; /* 0x188 */ } CamOrbit; @@ -152,11 +152,11 @@ void follow_camera_approach(unsigned char *moby) { 0.2f, 0.0f); } - ((CamOrbit *)orbit)->eye_distance_override = 0; ((CamOrbit *)orbit)->distance_override = 0; - ((CamOrbit *)orbit)->eye_distance_target = 0; + ((CamOrbit *)orbit)->pivot_height_override = 0; ((CamOrbit *)orbit)->distance_target = 0; - ((CamOrbit *)orbit)->base_distance = ((CamOrbit *)default_orbit)->eye_distance; + ((CamOrbit *)orbit)->pivot_height_target = 0; + ((CamOrbit *)orbit)->base_distance = ((CamOrbit *)default_orbit)->distance; ((CamTarget *)target)->target_height_override_pending = 0; ((CamTarget *)target)->look_height_target = 0; (*(Cam_2e5e38 **)(moby + 0x70))->leash = 1; @@ -245,7 +245,7 @@ set_follow_camera_angle_blend_from_direction(f32 *, f32, f32) __asm__("FUN_L00_0 extern void set_follow_camera_angle_blend_from_position(void *, f32, f32) __asm__("FUN_L00_002e8970"); extern void follow_camera_start_slide(void) __asm__("FUN_L00_002e8648"); -extern void FUN_L00_002e8620(void); +extern void lock_follow_camera_run_toward(void) __asm__("FUN_L00_002e8620"); extern void follow_camera_set_height(f32, f32) __asm__("FUN_L00_002e84b8"); extern void follow_camera_set_distance(s32, f32, f32) __asm__("FUN_L00_002e8450"); extern void follow_camera_set_offset_scale(s32, f32, f32) __asm__("FUN_L00_002e84f0"); @@ -316,7 +316,7 @@ void follow_camera_apply_overrides(O_2e6000 *camera_moby) { follow_camera_set_distance(1, follow_camera_vehicle_orbit_distance_gp, 0.003f); follow_camera_set_height(follow_camera_vehicle_orbit_height_gp, 0.003f); } - FUN_L00_002e8620(); + lock_follow_camera_run_toward(); camera_spring_state = (S1D0 *)((u8 *)camera_moby->m + 0x1D0); camera_spring_state->f3C = follow_camera_vehicle_collision_probe_scale_gp; camera_spring_state->f44 = follow_camera_vehicle_collision_probe_step_growth_factor_gp; diff --git a/src/overlays/shared/camera/follow_camera_springs.c b/src/overlays/shared/camera/follow_camera_springs.c index 4bd84aa97e..6b0cf64ece 100644 --- a/src/overlays/shared/camera/follow_camera_springs.c +++ b/src/overlays/shared/camera/follow_camera_springs.c @@ -1442,8 +1442,8 @@ void follow_camera_springs(void *camera_moby) { scale_vector_xyz(look, view + 0x20, 0.5f); } fast_vec_add(blended_focus_or_collision_origin, hero_pos, look); - scale_vector_xyz(look, view + 0x20, camera_tail->distance); - fast_vec_add(follow_block->eye, look, follow_block); + scale_vector_xyz(look, view + 0x20, camera_tail->pivot_height); + fast_vec_add(follow_block->pivot, look, follow_block); up_projection_or_collision_clearance = follow_cam_min_distance_gp + FOLLOW_CAM_STATE(current_follow_cam)->tail.zoom_range * FOLLOW_CAM_STATE(current_follow_cam)->tail.zoom_scale * @@ -1467,18 +1467,18 @@ void follow_camera_springs(void *camera_moby) { up_projection_or_collision_clearance + up_projection_or_collision_clearance) { fast_vec_add(mid, left, probe); scale_vector_xyz(mid, mid, 0.5f); - qcopy(follow_block->eye, mid); + qcopy(follow_block->pivot, mid); fast_vec_sub(collision_resolution_delta, mid, follow_block); follow_camera_set_height(fast_vec_dot(collision_resolution_delta, view + 0x20), 0.003f); } else { f32 reach; fast_vec_sub(collision_resolution_delta, left, follow_block); back = fast_vec_length(collision_resolution_delta); - reach = camera_tail->distance; + reach = camera_tail->pivot_height; if (back <= reach + up_projection_or_collision_clearance) { scale_vector_xyz(mid, view + 0x20, up_projection_or_collision_clearance); fast_vec_sub(mid, left, mid); - qcopy(follow_block->eye, mid); + qcopy(follow_block->pivot, mid); fast_vec_sub(collision_resolution_delta, mid, follow_block); follow_camera_set_height(fast_vec_dot(collision_resolution_delta, view + 0x20), 0.003f); } else { @@ -1487,7 +1487,7 @@ void follow_camera_springs(void *camera_moby) { qcopy(probe, follow_block); } scale_vector_xyz(look, view + 0x20, reach); - fast_vec_add(follow_block->eye, look, probe); + fast_vec_add(follow_block->pivot, look, probe); } } } diff --git a/src/overlays/shared/camera/moby_controlled_camera.c b/src/overlays/shared/camera/moby_controlled_camera.c index ee5cf9be66..6959c7ab29 100644 --- a/src/overlays/shared/camera/moby_controlled_camera.c +++ b/src/overlays/shared/camera/moby_controlled_camera.c @@ -392,7 +392,7 @@ void apply_moby_camera_control(char *moby) { } if (moby_camera_control_record->camera_distance != 0.0f) { follow_camera_set_distance(0, moby_camera_control_record->camera_distance, 0.003f); - FUN_L00_002e8620(); + lock_follow_camera_run_toward(); } if (moby_camera_control_record->camera_height != 0.0f) follow_camera_set_height(moby_camera_control_record->camera_height, 0.003f); @@ -401,7 +401,7 @@ void apply_moby_camera_control(char *moby) { if (moby_camera_control_record->mode == 3) { float heading; set_follow_camera_orbit_clamp_mode(0); - FUN_L00_002e8620(); + lock_follow_camera_run_toward(); follow_camera_start_slide(); follow_camera_set_up_spring(0.01f, 0.2f); if (moby_camera_control_record->active_frames >= scale_game_frames(120)) @@ -415,7 +415,7 @@ void apply_moby_camera_control(char *moby) { } if ((unsigned short)(moby_camera_control_record->mode - 4) < 2) { set_follow_camera_orbit_clamp_mode(0); - FUN_L00_002e8620(); + lock_follow_camera_run_toward(); follow_camera_start_slide(); follow_camera_set_up_spring(0.02f, 0.2f); follow_camera_set_distance(0, 5.84f, 0.003f); diff --git a/src/overlays/shared/camera/swing_volume_camera.c b/src/overlays/shared/camera/swing_volume_camera.c index bb44000cb1..6366372c65 100644 --- a/src/overlays/shared/camera/swing_volume_camera.c +++ b/src/overlays/shared/camera/swing_volume_camera.c @@ -49,9 +49,9 @@ typedef struct { s16 l_buttons_end; /* 0x48: type 5 ends on L1 or L2; with `done` set it does not restart */ s16 done; /* 0x4A: set when the camera ends */ s32 clip_volume2; /* 0x4C: second clip volume, -1 none */ - f32 script_pitch; /* 0x50: degrees, FollowCamState.tail.script_pitch through FUN_L00_002e8540 */ - s16 set_flag1; /* 0x54: sets tail.ctl.flags bit 1 each frame */ - s16 set_flag0; /* 0x56: sets tail.ctl.flags bit 0 each frame */ + f32 script_pitch; /* 0x50: degrees, FollowCamState.tail.script_pitch through set_follow_camera_script_pitch */ + s16 set_flag1; /* 0x54: sets tail.ctl.flags bit 1 each frame */ + s16 set_flag0; /* 0x56: sets tail.ctl.flags bit 0 each frame */ } SwingCameraParams; extern void follow_camera_set_distance(int, float, float) __asm__("FUN_L00_002e8450"); @@ -216,14 +216,14 @@ void volume_camera_swing(struct UpdateCam *swing_camera_record) { state = rig; reset = &state->reset; fast_vec_normalize(tail->eye_offset, tail->eye_offset, params->distance); - tail->eye_distance = params->distance; - tail->distance = params->height; + tail->distance = params->distance; + tail->pivot_height = params->height; follow->look_height = params->offset_scale; qcopy(state->tail.saved_eye_offset, tail->eye_offset); - fast_vec_scale(gravity_offset_or_yaw_direction, &hero.gravity_dir, -tail->distance); + fast_vec_scale(gravity_offset_or_yaw_direction, &hero.gravity_dir, -tail->pivot_height); pos = ¤t_follow_camera_record->pos; - fast_vec_add(state->follow.eye, &hero.motion.pos, gravity_offset_or_yaw_direction); - fast_vec_add(pos, state->follow.eye, tail->eye_offset); + fast_vec_add(state->follow.pivot, &hero.motion.pos, gravity_offset_or_yaw_direction); + fast_vec_add(pos, state->follow.pivot, tail->eye_offset); fast_vec_scale(gravity_offset_or_yaw_direction, &hero.gravity_dir, -follow->look_height); fast_vec_add(state->follow.look_target, &hero.motion.pos, gravity_offset_or_yaw_direction); qcopy(state->follow.snap_look_target, state->follow.look_target); @@ -231,15 +231,15 @@ void volume_camera_swing(struct UpdateCam *swing_camera_record) { qcopy(state->follow.offset, follow->focus); qcopy(state->position, pos); qcopy(state->tail.snap.shot_pos, pos); - snap->eye_distance_error = tail->eye_distance - fast_vec_length(tail->eye_offset); + snap->distance_reduction = tail->distance - fast_vec_length(tail->eye_offset); *(s32 *)&reset->pitch_bias = 0; reset->look_height = follow->look_height; { f32 zero = reset->pitch_bias; - f32 distance = tail->distance; - reset->distance = distance; + f32 distance = tail->pivot_height; + reset->pivot_height = distance; reset->pitch_bias_vel = zero; - reset->distance_vel = zero; + reset->pivot_height_vel = zero; reset->look_height_vel = zero; } } @@ -263,7 +263,7 @@ void volume_camera_swing(struct UpdateCam *swing_camera_record) { at_end = 1; params->timer = scale_game_frames(200); } - FUN_L00_002e8620(); + lock_follow_camera_run_toward(); } else if (params->type == SWING_CAMERA_TYPE_SLIDE_RELEASE_ANGLE_AT_END || params->type == SWING_CAMERA_TYPE_SLIDE_RELEASE_ANGLE_ALLOW_AIRBORNE_ENTRY || params->type == SWING_CAMERA_TYPE_SLIDE_KEEP_ANGLE_AT_END || @@ -312,10 +312,10 @@ void volume_camera_swing(struct UpdateCam *swing_camera_record) { if (params->type == SWING_CAMERA_TYPE_REQUIRE_ZERO_FOLLOW_MODE || params->type == SWING_CAMERA_TYPE_REQUIRE_NONZERO_FOLLOW_MODE) { follow_camera_set_distance(0, params->distance, 0.002f); - FUN_L00_002e8490(params->distance + 1.36f); + set_follow_camera_pull_back_max(params->distance + 1.36f); } else { follow_camera_set_distance(0, params->distance, 0.003f); - FUN_L00_002e8620(); + lock_follow_camera_run_toward(); } } if (params->height != 0.0f) { @@ -335,7 +335,7 @@ void volume_camera_swing(struct UpdateCam *swing_camera_record) { } } if (params->script_pitch != 0.0f) { - FUN_L00_002e8540(params->script_pitch * 0.017453292f); + set_follow_camera_script_pitch(params->script_pitch * 0.017453292f); } if (params->set_flag1 != 0) { { @@ -370,7 +370,7 @@ void volume_camera_swing(struct UpdateCam *swing_camera_record) { if (params->type == SWING_CAMERA_TYPE_SLIDE_RELEASE_ANGLE_AT_END || params->type == SWING_CAMERA_TYPE_SLIDE_RELEASE_ANGLE_ALLOW_AIRBORNE_ENTRY || params->type == SWING_CAMERA_TYPE_SLIDE_KEEP_ANGLE_AT_END) { - FUN_L00_002e8620(); + lock_follow_camera_run_toward(); follow_camera_start_slide(); follow_camera_set_up_spring(0.01f, 0.2f); } From 0c5be88075e16c9f37845a95fea7af75e0352584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:18:26 +0000 Subject: [PATCH 149/213] decomp: name the freeze mode box timer and fade step --- include/rnc/game/freeze_mode_state.h | 8 +++--- src/game/mode_freeze_init.c | 12 ++++----- src/game/update_mode_freeze.c | 38 ++++++++++++++-------------- src/ui/text/draw_dialog_text.c | 10 ++++---- 4 files changed, 35 insertions(+), 33 deletions(-) diff --git a/include/rnc/game/freeze_mode_state.h b/include/rnc/game/freeze_mode_state.h index ded6e6fae1..a9bfc00fbf 100644 --- a/include/rnc/game/freeze_mode_state.h +++ b/include/rnc/game/freeze_mode_state.h @@ -15,9 +15,11 @@ typedef struct FreezeModeState { s32 return_game_mode; /* 0x14: game_mode before the freeze */ s32 context; /* 0x18: mode_freeze_init's second argument */ s32 choice; /* 0x1C */ - s32 unk20; - s32 unk24; - s32 unk28; + s32 box_timer; /* 0x20: frames counted per state: delay before the prompt fades in, video preview + timeout, grow step of the choice box (scale box_timer / 8) */ + s32 fade_step; /* 0x24: counts down to fade the prompt in (1 - fade_step / 30) and to blend the + choice box text (fade_step / 8) */ + s32 unk28; /* 0x28: only cleared by mode_freeze_init */ } FreezeModeState; extern FreezeModeState freeze __asm__("D_00193300"); diff --git a/src/game/mode_freeze_init.c b/src/game/mode_freeze_init.c index 9466bb2533..a4eb069fae 100644 --- a/src/game/mode_freeze_init.c +++ b/src/game/mode_freeze_init.c @@ -40,8 +40,8 @@ void mode_freeze_init(u32 mode, s32 freeze_context) { freeze_state->line2 = (char *)get_help_message_text(0x5249); freeze_state->timer = 0; freeze_state->choice = 0; - freeze_state->unk20 = 0; - freeze_state->unk24 = 0; + freeze_state->box_timer = 0; + freeze_state->fade_step = 0; freeze_state->unk28 = 0; break; case 2: @@ -60,13 +60,13 @@ void mode_freeze_init(u32 mode, s32 freeze_context) { case FREEZE_PUSH_HELP_HISTORY: push_help_history(0x4E2B); freeze.timer = scale_game_frames(0x1E); - freeze.unk20 = 0; - freeze.unk24 = scale_game_frames(0x1E); + freeze.box_timer = 0; + freeze.fade_step = scale_game_frames(0x1E); break; case FREEZE_ERROR: freeze.timer = scale_game_frames(0x1E); - freeze.unk20 = 0; - freeze.unk24 = scale_game_frames(0x1E); + freeze.box_timer = 0; + freeze.fade_step = scale_game_frames(0x1E); break; case FREEZE_VIDEO_MODE_CHANGE: freeze.timer = scale_game_frames(0x1E); diff --git a/src/game/update_mode_freeze.c b/src/game/update_mode_freeze.c index 7b46156857..60377050f1 100644 --- a/src/game/update_mode_freeze.c +++ b/src/game/update_mode_freeze.c @@ -64,14 +64,14 @@ void update_mode_freeze(void) { switch (freeze.state) { case FREEZE_MODE_DELAYED_CONTINUE: { FreezeModeState *state = &freeze; - state->unk20++; - if (scale_game_frames(0x5A) < state->unk20) { - if (state->unk24 != 0) { - state->unk24--; + state->box_timer++; + if (scale_game_frames(0x5A) < state->box_timer) { + if (state->fade_step != 0) { + state->fade_step--; } } state = &freeze; - if (scale_game_frames(0x78) < state->unk20) { + if (scale_game_frames(0x78) < state->box_timer) { if (controller_state.pressed & PAD_CROSS) { game_mode = GAME_MODE_CONTINUE; if (current_level_index == LEVEL_NOVALIS) { @@ -115,12 +115,12 @@ void update_mode_freeze(void) { fade_to_black(4); requested_video_mode = VIDEO_MODE_REQUEST_PAL_DISABLED; freeze.choice = 2; - freeze.unk20 = scale_game_frames(0x258); + freeze.box_timer = scale_game_frames(0x258); } break; case VIDEO_MODE_TEST_PREVIEW_ACTIVE: - if ((freeze.unk20 == 0) || ((--freeze.unk20) == 0)) { + if ((freeze.box_timer == 0) || ((--freeze.box_timer) == 0)) { requested_video_mode = VIDEO_MODE_REQUEST_PAL_ENABLED; freeze.choice = 3; } else if (controller_state.pressed & PAD_TRIANGLE) { @@ -166,10 +166,10 @@ void update_mode_freeze(void) { case FREEZE_MODE_CONFIRM_CANCEL_CHOICE: switch (freeze.choice) { case FREEZE_CHOICE_PREPARE_INPUT: - if (freeze.unk20 < 8) { - freeze.unk20++; - } else if (freeze.unk24 < 8) { - freeze.unk24++; + if (freeze.box_timer < 8) { + freeze.box_timer++; + } else if (freeze.fade_step < 8) { + freeze.fade_step++; } else { freeze.choice = 1; } @@ -188,10 +188,10 @@ void update_mode_freeze(void) { case FREEZE_CHOICE_CONFIRM_EXIT: case FREEZE_CHOICE_CANCEL_EXIT: - if (freeze.unk24 != 0) { - freeze.unk24--; - } else if (freeze.unk20 != 0) { - freeze.unk20--; + if (freeze.fade_step != 0) { + freeze.fade_step--; + } else if (freeze.box_timer != 0) { + freeze.box_timer--; } else { step = freeze.choice; /* Fakematch: a never-true test that combine folds away; it makes step @@ -227,10 +227,10 @@ void update_mode_freeze(void) { break; case FREEZE_MODE_STATE_DISPATCH: - freeze.unk20++; - if (scale_game_frames(0x1E) < freeze.unk20) { - if (freeze.unk24 != 0) { - freeze.unk24--; + freeze.box_timer++; + if (scale_game_frames(0x1E) < freeze.box_timer) { + if (freeze.fade_step != 0) { + freeze.fade_step--; } } switch (save_card_state) { diff --git a/src/ui/text/draw_dialog_text.c b/src/ui/text/draw_dialog_text.c index 7a07481797..6422a5c99a 100644 --- a/src/ui/text/draw_dialog_text.c +++ b/src/ui/text/draw_dialog_text.c @@ -138,7 +138,7 @@ void draw_dialog_text(void) { box.anchor_y = 0x136 - box.rendered_height; font_print_window(&box, color, text_cursor, -1, get_effect_texture(1), normal_font_metrics); tint = fast_tween_color( - 0x20FFFF, 0x8020FFFF, 1.0f - (f32)freeze.unk24 / (f32)scale_game_frames(30)); + 0x20FFFF, 0x8020FFFF, 1.0f - (f32)freeze.fade_step / (f32)scale_game_frames(30)); font_print_center(0x100, 0x140, tint, get_help_message_text(0x524A), -1); mid = (y + box.anchor_y) >> 1; vu1_add_g_sregister(0x47, 0x3004B); @@ -296,7 +296,7 @@ void draw_dialog_text(void) { text, -1); tint = fast_tween_color( - 0x20FFFF, 0x8020FFFF, 1.0f - (f32)freeze.unk24 / (f32)scale_game_frames(30)); + 0x20FFFF, 0x8020FFFF, 1.0f - (f32)freeze.fade_step / (f32)scale_game_frames(30)); if (left != 0) { font_print_center(0xCA, box.bottom - 0x14, tint, get_help_message_text(left), -1); } @@ -376,7 +376,7 @@ void draw_dialog_text(void) { 3.14159f) * 0.5f + 0.5f); - scale = (f32)freeze.unk20 * 0.125f; + scale = (f32)freeze.box_timer * 0.125f; if (scale > 1.0f) { scale = 1.0f; } else if (scale < 0.1f) { @@ -385,8 +385,8 @@ void draw_dialog_text(void) { shared_dialog_text_color = freeze_shared_dialog_text_base_color; matched_record_text_color = freeze_matched_record_text_base_color; unmatched_record_text_color = freeze_unmatched_record_text_base_color; - if (freeze.unk24 != 0) { - color_blend_fraction = (f32)freeze.unk24 * 0.125f; + if (freeze.fade_step != 0) { + color_blend_fraction = (f32)freeze.fade_step * 0.125f; if (color_blend_fraction > 1.0f) { color_blend_fraction = 1.0f; } else if (color_blend_fraction < 0.0f) { From 9329b57882870b8fee1f3ceee46c97fa4f85eecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:20:11 +0000 Subject: [PATCH 150/213] decomp: name the vendor menu frame capture and animation data fields --- .../rnc/overlay/shared/vendor/vendor_menu.h | 14 ++++++------- .../shared/vendor/draw_vendor_inset_quads.c | 20 +++++++++---------- src/overlays/shared/vendor/vendor_menu.c | 16 +++++++-------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/include/rnc/overlay/shared/vendor/vendor_menu.h b/include/rnc/overlay/shared/vendor/vendor_menu.h index 8ac9738341..80abc83337 100644 --- a/include/rnc/overlay/shared/vendor/vendor_menu.h +++ b/include/rnc/overlay/shared/vendor/vendor_menu.h @@ -48,14 +48,14 @@ typedef struct { /* The vendor menu state at D_L00_001CA4C0. */ typedef struct { - s32 state; /* 0x00: menu state: 0 opening, 1 open, 2 closing, 3 exit cutscene */ - s32 frames; /* 0x04: frames in the current state */ - s32 unk08; - s32 unk0C; - s32 unk10; + s32 state; /* 0x00: menu state: 0 opening, 1 open, 2 closing, 3 exit cutscene */ + s32 frames; /* 0x04: frames in the current state */ + s32 capture_state; /* 0x08: 0 until draw_vendor_screen captures the frame, then 1 */ + s32 capture_request; /* 0x0C: set when the menu opens; draw_vendor_screen captures and clears it */ + s32 capture_buffer; /* 0x10: frame capture buffer (D_L00_00173E00[2] + 0x60000) */ struct VendorMoby - *moby_buffer; /* 0x14: auxiliary_moby at +0, menu_mobys at +0x100, unk2C at +0x1400 */ - s32 unk18; /* 0x18: decompressed resource data */ + *moby_buffer; /* 0x14: auxiliary_moby at +0, menu_mobys at +0x100, unk2C at +0x1400 */ + s32 animation_data; /* 0x18: vendor animation data, streamed from disc and decompressed */ struct VendorMoby *vendor_moby; /* 0x1C */ struct VendorMoby *menu_mobys; /* 0x20: the menu's mobys [0..5] */ struct VendorMoby diff --git a/src/overlays/shared/vendor/draw_vendor_inset_quads.c b/src/overlays/shared/vendor/draw_vendor_inset_quads.c index 08b17eaf23..5dbebddb17 100644 --- a/src/overlays/shared/vendor/draw_vendor_inset_quads.c +++ b/src/overlays/shared/vendor/draw_vendor_inset_quads.c @@ -337,28 +337,28 @@ void draw_vendor_screen(void) { return; } append_gif_transfer_packet(); - switch (p->unk08) { + switch (p->capture_state) { case 0: - if (p->unk0C != 0) { + if (p->capture_request != 0) { *(u16 *)(((u8 *)p->vendor_moby) + 0x34) |= 1; } D_L00_0015F3F4 = 0x100FF; - if (p->unk0C != 0 || *(s32 *)p == 3) { + if (p->capture_request != 0 || *(s32 *)p == 3) { D_L00_0015F3F4 = 0x7F; } draw_debug_profiler(); - if (p->unk0C == 0) { + if (p->capture_request == 0) { return; } - p->unk08 = 1; - p->unk0C = 0; + p->capture_state = 1; + p->capture_request = 0; vu1_sync_chain(1); sce_gs_sync_v(0); D_L00_0015F3F8_s = D_L00_0015F3F8_v[0] + 1; vu1_send_chain_render_buffer(); swap_render_buffer_chain(); D_L00_001611CC = 0x60000; - capture_draw_buffer(p->unk10); + capture_draw_buffer(p->capture_buffer); *(u16 *)(((u8 *)p->vendor_moby) + 0x34) &= 0xFFFE; *(f32 *)(((u8 *)p->vendor_moby) + 0x2C) = 0.14190800487995148f; if (p->mode != 0) { @@ -395,9 +395,9 @@ void draw_vendor_screen(void) { initialize_vendor_selected_item_mobys(); p->unk2C = (s32)p->moby_buffer + 0x1400; fast_mem_zero16(p->unk2C, 0x400); - p->unk18 = p->unk2C + 0x400; + p->animation_data = p->unk2C + 0x400; if (cd_read_active[0] == 0) { - if (start_audio_stream_read(p->unk18 + 0x80000, + if (start_audio_stream_read(p->animation_data + 0x80000, disc_table.vendor_animation.sector, disc_table.vendor_animation.size) != 0) { D_L00_0016118C = 1; @@ -413,7 +413,7 @@ void draw_vendor_screen(void) { default: return; } - append_draw_buffer_upload_packets(p->unk10, draw_buffer_address, frame_size[0] << 11); + append_draw_buffer_upload_packets(p->capture_buffer, draw_buffer_address, frame_size[0] << 11); setup_gif_paging(0); update_camera_view_matrices(); reset_gs_registers(); diff --git a/src/overlays/shared/vendor/vendor_menu.c b/src/overlays/shared/vendor/vendor_menu.c index 19855b6159..b5895b69ba 100644 --- a/src/overlays/shared/vendor/vendor_menu.c +++ b/src/overlays/shared/vendor/vendor_menu.c @@ -238,17 +238,17 @@ void decompress_and_relocate_vendor_moby_assets(void) { int *entry_offset_cursor; char *moby_asset_table_container; int compressed_source_address; - compressed_source_address = vendor_menu_lui.unk18 + 0x80000; + compressed_source_address = vendor_menu_lui.animation_data + 0x80000; FlushCache(0); - fast_decompress(compressed_source_address, vendor_menu_lui.unk18); + fast_decompress(compressed_source_address, vendor_menu_lui.animation_data); FlushCache(0); - entry_offset_cursor = (int *)vendor_menu_lui.unk18; + entry_offset_cursor = (int *)vendor_menu_lui.animation_data; moby_asset_table_container = D_L00_00197300_lui[D_L00_00197BCC]; for (i = 0; i < 16; i++) { int entry_offset = *entry_offset_cursor++; if (entry_offset) { *(int *)(moby_asset_table_container + 0x48 + i * 4) = - vendor_menu_lui.unk18 + entry_offset; + vendor_menu_lui.animation_data + entry_offset; relocate_asset_entry_pointers(moby_asset_table_container, i); } } @@ -445,9 +445,9 @@ void open_vendor_menu(void *vendor_moby_arg) { } D_L00_0015F5D8 = 1; vendor_menu.state = VENDOR_MENU_OPENING; - vendor_menu.unk10 = D_L00_00173E00[2] + 0x60000; + vendor_menu.capture_buffer = D_L00_00173E00[2] + 0x60000; vendor_menu.moby_buffer = (struct VendorMoby *)(D_L00_00173E00[1] + 0x60000); - vendor_menu.unk08 = 0; + vendor_menu.capture_state = 0; vendor_menu.vendor_moby = (struct VendorMoby *)vendor_moby; allocate_voice_for_target_entry(3, 0, vendor_moby); if (vendor_menu.mode == VENDOR_MENU_MODE_EXISTING_VENDOR) { @@ -1200,7 +1200,7 @@ void update_vendor_menu(void) { if (vendor_menu.frames >= scale_game_frames(40) || vendor_menu.mode != VENDOR_MENU_MODE_EXISTING_VENDOR) { fade_level = 0.0f; - vendor_menu.unk0C = 1; + vendor_menu.capture_request = 1; vendor_menu.state = VENDOR_MENU_OPEN; vendor_menu.frames = 0; FUN_00212f90(vendor_menu.vendor_moby, 3, 0, 8); @@ -1507,7 +1507,7 @@ void update_vendor_menu(void) { ((Vec4 *)g_debug_camera.basis)[1].q = D_L00_00165F80[1].q; ((Vec4 *)g_debug_camera.basis)[2].q = D_L00_00165F80[2].q; vendor_menu.state = VENDOR_MENU_CLOSING; - vendor_menu.unk08 = 0; + vendor_menu.capture_state = 0; vendor_menu.frames = 0; if (hero.items[0].moby != 0) { select_world_object_resource_tables(((VendorMoby *)hero.items[0].moby)->oclass, From e6534c6c9e33299f3db13a4591a13efed5e6e99e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:21:20 +0000 Subject: [PATCH 151/213] decomp: name the hud channel mode, serial and pending fields and the animation key time and moby rate fields --- src/mobys/animation/apply_pending_animation.c | 6 +++--- .../compute_interpolated_record_value.c | 14 +++++++------- .../is_value_within_interpolated_window.c | 6 +++--- src/mobys/animation/set_animation_parameter.c | 18 ++++++++++-------- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/mobys/animation/apply_pending_animation.c b/src/mobys/animation/apply_pending_animation.c index 80e2da9b7f..a17be23a8d 100644 --- a/src/mobys/animation/apply_pending_animation.c +++ b/src/mobys/animation/apply_pending_animation.c @@ -5,7 +5,7 @@ typedef void (*AnimFn)(struct Anim *); struct Anim { s32 unk0; - s32 a; + s32 mode; s32 b; s32 c; AnimFn fn; @@ -13,7 +13,7 @@ struct Anim { s32 e; u8 pad1c[4]; s32 next_id; - s32 next_a; + s32 next_mode; s32 next_b; s32 next_c; AnimFn next_fn; @@ -28,7 +28,7 @@ void apply_pending_animation(struct Anim *anim) __asm__("FUN_001ff418"); void apply_pending_animation(struct Anim *anim) { load_animation_definition(anim, anim->next_id); - anim->a = anim->next_a; + anim->mode = anim->next_mode; anim->d = anim->next_d; anim->e = anim->next_e; anim->c = anim->next_c; diff --git a/src/mobys/animation/compute_interpolated_record_value.c b/src/mobys/animation/compute_interpolated_record_value.c index 1ab626b737..f34e2281a1 100644 --- a/src/mobys/animation/compute_interpolated_record_value.c +++ b/src/mobys/animation/compute_interpolated_record_value.c @@ -15,12 +15,12 @@ struct InterpolatedStateEntry { struct InterpKeyframeB { u8 pad_0[0x4]; - s16 unk4; + s16 time; /* key time in 1/16 of a 30 Hz frame (ReRAC moby_animation.md frame header +0x4) */ }; struct InterpKeyframeA { u8 pad_0[0x4]; - s16 unk4; + s16 time; /* key time in 1/16 of a 30 Hz frame (ReRAC moby_animation.md frame header +0x4) */ }; extern float convert_integer_to_float() __asm__("func_001FA6C0"); @@ -38,22 +38,22 @@ f32 compute_interpolated_record_value(struct InterpolatedStateEntry *anim) { cur_record = anim->prev_frame_data; } if (anim->anim_time == 0.0f) { - return convert_integer_to_float(cur_record->unk4) * 0.0625f; + return convert_integer_to_float(cur_record->time) * 0.0625f; } if (anim->seq != anim->prev_seq) { - return (convert_integer_to_float(cur_record->unk4) * 0.0625f) + anim->anim_time; + return (convert_integer_to_float(cur_record->time) * 0.0625f) + anim->anim_time; } primary_binding_index = anim->frame; secondary_binding_index = anim->prev_frame; if ((u8)secondary_binding_index >= (u8)primary_binding_index) { next_record = anim->prev_frame_data; weighted_current_record_value = - convert_integer_to_float(cur_record->unk4) * (1.0f - anim->anim_time); + convert_integer_to_float(cur_record->time) * (1.0f - anim->anim_time); return (weighted_current_record_value + - (convert_integer_to_float(next_record->unk4) * anim->anim_time)) * + (convert_integer_to_float(next_record->time) * anim->anim_time)) * 0.0625f; } - return (convert_integer_to_float(cur_record->unk4) * 0.0625f) + anim->anim_time; + return (convert_integer_to_float(cur_record->time) * 0.0625f) + anim->anim_time; } extern f32 func_0020C9E0(struct InterpolatedStateEntry *) __attribute__((alias("FUN_0020c9e0"))); diff --git a/src/mobys/animation/is_value_within_interpolated_window.c b/src/mobys/animation/is_value_within_interpolated_window.c index d27136fc6f..e355e663b0 100644 --- a/src/mobys/animation/is_value_within_interpolated_window.c +++ b/src/mobys/animation/is_value_within_interpolated_window.c @@ -2,8 +2,8 @@ struct InterpolatedAnim { u8 pad_0[0x58]; - f32 unk58; - f32 unk5C; + f32 anim_speed; /* 0x58: struct Moby anim_speed */ + f32 anim_rate; /* 0x5C: struct Moby anim_rate */ }; extern f32 compute_interpolated_record_value() __asm__("func_0020C9E0"); @@ -19,7 +19,7 @@ s32 is_value_within_interpolated_window(struct InterpolatedAnim *anim, f32 thres interp_value = compute_interpolated_record_value(); rounded_value_overshoot = round_float_to_decimal_places(4, interp_value - threshold); - window = round_float_to_decimal_places(4, anim->unk58 * anim->unk5C); + window = round_float_to_decimal_places(4, anim->anim_speed * anim->anim_rate); threshold_within_window = 0; if (threshold <= interp_value) { threshold_within_window = 1; diff --git a/src/mobys/animation/set_animation_parameter.c b/src/mobys/animation/set_animation_parameter.c index 2a8dd1a121..afaeebae79 100644 --- a/src/mobys/animation/set_animation_parameter.c +++ b/src/mobys/animation/set_animation_parameter.c @@ -1,13 +1,15 @@ #include "types.h" +/* A HUD animation channel (0x90 bytes, 13 of them); queue_animation_update and + apply_pending_animation see the same layout. */ struct E { u8 pad0[0x4]; - s32 unk4; + s32 mode; /* 0x04: current mode, copied from next_mode by apply_pending_animation */ u8 pad8[0x1C]; - s32 unk24; + s32 next_mode; /* 0x24 */ u8 pad28[0x3C]; - s32 unk64; - s32 unk68; + s32 serial; /* 0x64: returned by queue_animation_update */ + s32 pending; /* 0x68: next_* waits for apply_pending_animation */ u8 pad6C[0x24]; }; @@ -20,14 +22,14 @@ void set_animation_parameter(s32 anim_id, s32 requested_parameter_value) { struct E *e; for (i = 0; i < 13; i++) { - if (hud_chan_slots[i].unk64 == anim_id) { + if (hud_chan_slots[i].serial == anim_id) { break; } } if (i < 13) { - hud_chan_slots[i].unk24 = requested_parameter_value; - if (hud_chan_slots[i].unk68 == 0) { - hud_chan_slots[i].unk4 = requested_parameter_value; + hud_chan_slots[i].next_mode = requested_parameter_value; + if (hud_chan_slots[i].pending == 0) { + hud_chan_slots[i].mode = requested_parameter_value; } } } From f8ab065fa92411b3d18c119da656492998b22598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:21:41 +0000 Subject: [PATCH 152/213] decomp: name the sky header texture data, fx list, sprite data and clear-screen fields --- src/game/transitions/transition_default_draw.c | 4 ++-- src/rendering/debug/draw_debug_profiler.c | 4 ++-- src/world/loaders/relocate_sky_definition.c | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/game/transitions/transition_default_draw.c b/src/game/transitions/transition_default_draw.c index 8109f06ff7..13cadaf581 100644 --- a/src/game/transitions/transition_default_draw.c +++ b/src/game/transitions/transition_default_draw.c @@ -9,7 +9,7 @@ struct Globals_0016045C { u8 pad_0[0x4]; - s16 unk4; + s16 clear_screen; /* 0x04: sky header frame-clear gate (set to 1 by relocate_sky_definition) */ u8 pad_6[0x2]; }; @@ -59,7 +59,7 @@ void transition_default_draw(s32 *unused_parameter) { }; s32 language_overlay_index; - if (level_sky_effect_data == 0 || level_sky_effect_data->unk4 != 0) { + if (level_sky_effect_data == 0 || level_sky_effect_data->clear_screen != 0) { append_gif_transfer_packet(); } fill_transfer_words(occl_visibility, -1, 0x80); diff --git a/src/rendering/debug/draw_debug_profiler.c b/src/rendering/debug/draw_debug_profiler.c index c9bd9ab6ed..ebd501b34e 100644 --- a/src/rendering/debug/draw_debug_profiler.c +++ b/src/rendering/debug/draw_debug_profiler.c @@ -16,7 +16,7 @@ typedef struct { u8 pad_0[4]; - s16 unk4; + s16 clear_screen; /* 0x04: sky header frame-clear gate */ } SpriteFile; extern u8 D_00100AE0[]; @@ -118,7 +118,7 @@ void draw_debug_profiler(void) { f32 rcnt1_count_float; f32 div; - if (level_sky_effect_data == NULL || level_sky_effect_data->unk4 != 0 || + if (level_sky_effect_data == NULL || level_sky_effect_data->clear_screen != 0 || ((draw_enable_mask ^ 1) & 1) || draw_config.sky == 0 || D_0018C34C[0] != 0) { append_gif_transfer_packet(); } diff --git a/src/world/loaders/relocate_sky_definition.c b/src/world/loaders/relocate_sky_definition.c index 65d50a29e7..641b4b2aa4 100644 --- a/src/world/loaders/relocate_sky_definition.c +++ b/src/world/loaders/relocate_sky_definition.c @@ -1,7 +1,7 @@ #include "types.h" struct Sprite { - s64 unk0; + s64 tex0; /* TEX0 cache, cleared here and every frame by setup_sky_gif_paging */ s16 x; s16 y; s16 w; @@ -22,9 +22,9 @@ struct SpriteFile { s16 nsprites; u8 padE[2]; s32 sprites; - s32 unk14; - s32 unk18; - s32 unk1C; + s32 texture_data; /* 0x14: base of the texture pixels and palettes */ + s32 fx_list; /* 0x18: FX index list */ + s32 sprite_data; /* 0x1C: star sprite scratch area, 0 if none */ s32 groups[1]; }; @@ -57,10 +57,10 @@ void relocate_sky_definition(struct SpriteFile *sky_definition) { level_sky_effect_data = sky_definition; sky_definition->loaded = 1; sky_definition->sprites += (s32)sky_definition; - sky_definition->unk14 += (s32)sky_definition; - sky_definition->unk18 += (s32)sky_definition; - if (sky_definition->unk1C != 0) { - sky_definition->unk1C += (s32)sky_definition; + sky_definition->texture_data += (s32)sky_definition; + sky_definition->fx_list += (s32)sky_definition; + if (sky_definition->sprite_data != 0) { + sky_definition->sprite_data += (s32)sky_definition; } serialized_texture_words = (s32 *)level_sky_effect_data->sprites; for (i = 0; i < level_sky_effect_data->nsprites; i++) { @@ -72,7 +72,7 @@ void relocate_sky_definition(struct SpriteFile *sky_definition) { ((struct Sprite *)level_sky_effect_data->sprites)[i].x = serialized_texel_offset >> 4; ((struct Sprite *)level_sky_effect_data->sprites)[i].w = log2dim(texture_width); ((struct Sprite *)level_sky_effect_data->sprites)[i].h = log2dim(texture_height); - ((struct Sprite *)level_sky_effect_data->sprites)[i].unk0 = 0; + ((struct Sprite *)level_sky_effect_data->sprites)[i].tex0 = 0; } for (k = 0; k < level_sky_effect_data->ngroups; k++) { level_sky_effect_data->groups[k] += (s32)sky_definition; From 30f9d3f16cdaefbac9c79129215dd1e1ccaf0fe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:22:32 +0000 Subject: [PATCH 153/213] decomp: name the scene playback chunk fields and the memory slot ring bounds --- src/game/initialize_level_runtime.c | 12 +++---- .../memory/calculate_ring_buffer_bounds.c | 8 ++--- src/world/update_world_object_animation.c | 34 +++++++++---------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/game/initialize_level_runtime.c b/src/game/initialize_level_runtime.c index 5c4d8279e5..87386954f4 100644 --- a/src/game/initialize_level_runtime.c +++ b/src/game/initialize_level_runtime.c @@ -71,8 +71,8 @@ typedef struct { typedef struct { u8 pad0[4]; - s32 unk4; - s32 unk8; + s32 ring_start; /* 0x04: memory slot 1 (calculate_ring_buffer_bounds) */ + s32 ring_end; /* 0x08: memory slot 2 */ u8 padC[8]; u8 *buffer; s32 unk18; @@ -80,8 +80,8 @@ typedef struct { typedef struct { u8 pad0[0x58]; - s32 unk58; - s32 unk5C; + s32 source_begin; /* 0x58 */ + s32 source_end; /* 0x5C */ s32 chunks[70]; } SceneInfo; @@ -293,8 +293,8 @@ void initialize_level_runtime(void) { scene_offsets = header->scenes; workspace_offset = current_vu_chain - 0x60000; scene_offset = &scene_offsets[level_render_state.scene_mode]; - render_sequence.unk58 = D_001940C0.unk4 + workspace_offset; - render_sequence.unk5C = D_001940C0.unk8 + workspace_offset; + render_sequence.source_begin = D_001940C0.ring_start + workspace_offset; + render_sequence.source_end = D_001940C0.ring_end + workspace_offset; current_vu_chain = workspace_offset; scene_chunk = (Chunk *)(data_base + scene_offsets[level_render_state.scene_mode]); /* The archive list is terminated by a zero size and the resident table holds 70 entries. */ diff --git a/src/runtime/memory/calculate_ring_buffer_bounds.c b/src/runtime/memory/calculate_ring_buffer_bounds.c index a56ade18a6..60ee437f91 100644 --- a/src/runtime/memory/calculate_ring_buffer_bounds.c +++ b/src/runtime/memory/calculate_ring_buffer_bounds.c @@ -3,8 +3,8 @@ struct RingBufferConfig { u8 pad_0[0x4]; - s32 unk4; - s32 unk8; + s32 ring_start; /* 0x04: memory slot 1, start of the VU chain ring */ + s32 ring_end; /* 0x08: memory slot 2, its end */ }; extern struct RingBufferConfig D_001940C0; @@ -16,8 +16,8 @@ s32 calculate_ring_buffer_bounds(u32 size, s32 *out_start, s32 *out_end) { *out_end = 0; return -1; } - *out_start = (D_001940C0.unk4 + current_vu_chain) - size; - *out_end = (D_001940C0.unk8 + current_vu_chain) - size; + *out_start = (D_001940C0.ring_start + current_vu_chain) - size; + *out_end = (D_001940C0.ring_end + current_vu_chain) - size; return 0; } diff --git a/src/world/update_world_object_animation.c b/src/world/update_world_object_animation.c index eaaca93f63..663b82ec9a 100644 --- a/src/world/update_world_object_animation.c +++ b/src/world/update_world_object_animation.c @@ -45,32 +45,32 @@ struct Moby { }; struct ModelRec { - unsigned short flags; /* 0x00 */ + unsigned short end_time; /* 0x00 */ unsigned char pad02[2]; - int part_count; /* 0x04 */ + int subtitles_off; /* 0x04: subtitle table, present when >= 0x400 */ unsigned short pad08; unsigned char pad0A[2]; unsigned short num_parts; /* 0x0C */ unsigned char pad0E[2]; - int end_off; /* 0x10 */ + int keys_off; /* 0x10: camera keys */ int part_off[1]; /* 0x14 */ }; struct TransferState { unsigned char pad00[0x38]; - int unk38; /* 0x38 */ + int frame; /* 0x38: chunk tick */ unsigned char pad3C[4]; - unsigned short unk40; /* 0x40 */ + unsigned short end; /* 0x40: end tick (record +0x00) */ unsigned char pad42[2]; short num_parts; /* 0x44 */ unsigned char pad46[2]; unsigned short unk48; /* 0x48 */ unsigned char pad4A[2]; - int unk4C; /* 0x4C */ - int unk50; /* 0x50 */ - int unk54; /* 0x54 */ - struct ModelRec *rec; /* 0x58 */ - int unk5C; /* 0x5C */ + int subs; /* 0x4C: subtitle table (draw_subtitles) */ + int unk50; /* 0x50 */ + int frames; /* 0x54: camera keys */ + struct ModelRec *rec; /* 0x58 */ + int source_end; /* 0x5C: compressed chunk */ unsigned char pad60[0x118]; struct Moby *slots[1]; /* 0x178 */ }; @@ -96,21 +96,21 @@ void update_world_object_animation(void *unused_arg) { int pc; FlushCache(0); - decompress_wad(D_0018CB20_lui.unk5C, (int)D_0018CB20_lui.rec); + decompress_wad(D_0018CB20_lui.source_end, (int)D_0018CB20_lui.rec); FlushCache(0); rec = D_0018CB20_lui.rec; - D_0018CB20_lui.unk38 = 0; + D_0018CB20_lui.frame = 0; cp = rec->part_off; - D_0018CB20_lui.unk40 = rec->flags; - pc = rec->part_count; + D_0018CB20_lui.end = rec->end_time; + pc = rec->subtitles_off; D_0018CB20_lui.unk48 = rec->pad08; D_0018CB20_lui.num_parts = rec->num_parts; - D_0018CB20_lui.unk54 = (int)rec + rec->end_off; + D_0018CB20_lui.frames = (int)rec + rec->keys_off; if (pc < 0x400) { - D_0018CB20_lui.unk4C = 0; + D_0018CB20_lui.subs = 0; } else { - D_0018CB20_lui.unk4C = (int)rec + pc; + D_0018CB20_lui.subs = (int)rec + pc; } for (i = 0; i < D_0018CB20_lui.num_parts; i++) { From 07633d14ad6e6146a1e1efdb20eb0bde716c2198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:23:06 +0000 Subject: [PATCH 154/213] decomp: name the sound bank handle and memory card fields in the level zero reload and space transition --- .../load_level_zero_preserving_progress.c | 28 +++++++++---------- src/game/transitions/do_space_transition.c | 11 ++------ 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/game/load_level_zero_preserving_progress.c b/src/game/load_level_zero_preserving_progress.c index c4940161e1..062e46c237 100644 --- a/src/game/load_level_zero_preserving_progress.c +++ b/src/game/load_level_zero_preserving_progress.c @@ -17,20 +17,20 @@ typedef struct { u8 pad0[0x14]; - s32 slot; + s32 save_index; /* 0x14: struct MemoryCard save_index */ u8 pad18[8]; struct { - s32 unk0; + s32 id; /* MemoryCardSaveEntry id */ u8 pad4[0x18]; } entries[5]; u8 pad[0xC0 - 0x20 - 5 * 0x1C]; - s32 unkC0; + s32 active_card; /* 0xC0: struct MemoryCardState fields from here */ u8 padC4[0x18]; - s32 unkDC; - s32 unkE0; + s32 pending_state; /* 0xDC */ + s32 pending_card; /* 0xE0 */ u8 padE4[8]; - s32 unkEC; -} Checkpoints; + s32 buf; /* 0xEC */ +} Checkpoints; /* the start of struct MemoryCardState (rnc/save/memory_card_state.h) */ extern Checkpoints D_0013D290; @@ -98,14 +98,14 @@ void load_level_zero_preserving_progress(s32 slot) { sceCdReadClock(D_0015EE98); sceScfGetLocalTimefromRTC(D_0015EE98); if (slot >= 0) { - D_0013D290.slot = slot; - D_0013D290.entries[slot].unk0 = 0; + D_0013D290.save_index = slot; + D_0013D290.entries[slot].id = 0; memcard_make_whole_save(menu_system.save_slot); - D_0013D290.unkEC = menu_system.save_slot; - D_0013D290.unkC0 = 0; - if (D_0013D290.unkDC < 0) { - D_0013D290.unkE0 = 0; - D_0013D290.unkDC = 0x13; + D_0013D290.buf = menu_system.save_slot; + D_0013D290.active_card = 0; + if (D_0013D290.pending_state < 0) { + D_0013D290.pending_card = 0; + D_0013D290.pending_state = 0x13; } } } diff --git a/src/game/transitions/do_space_transition.c b/src/game/transitions/do_space_transition.c index ade38ede9a..2f3db1566f 100644 --- a/src/game/transitions/do_space_transition.c +++ b/src/game/transitions/do_space_transition.c @@ -10,16 +10,11 @@ #include "rnc/sdk/storage/cdvd.h" #include "rnc/ui/loading.h" -struct Globals_0013DD58 { - u8 unk0; - u8 unk1; -}; - #include "rnc/audio/music/music_stream_state.h" struct Globals_0015F634 { u8 pad_0[0x1C]; - s32 unk1C; + s32 bank_handle; /* 0x1C: VoiceDefinition.bank_handle of sound 0 */ }; struct Globals_00194100 { @@ -101,9 +96,9 @@ void do_space_transition(void) { music_stop(); music_stream_state.updates_suspended = 1; if (level_sound_defs != 0) { - snd_unload_bank(level_sound_defs->unk1C); + snd_unload_bank(level_sound_defs->bank_handle); snd_resolve_bank_xrefs(); - DebugPrint(unloaded_sound_bank_format, level_sound_defs->unk1C); + DebugPrint(unloaded_sound_bank_format, level_sound_defs->bank_handle); } sound_bank_handle = 0; snd_stream_safe_cd_callback(0); From ba41be0be67f60c412daaa205eea4f493e56908f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:26:34 +0000 Subject: [PATCH 155/213] decomp: name the bolt spin, target and glint slot vars and the crate velocity, drop mode and respawn vars --- src/overlays/shared/pickups/bolt.c | 38 ++++++++++++++--------------- src/overlays/shared/pickups/crate.c | 16 ++++++------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/overlays/shared/pickups/bolt.c b/src/overlays/shared/pickups/bolt.c index 366c5da855..5722117c77 100644 --- a/src/overlays/shared/pickups/bolt.c +++ b/src/overlays/shared/pickups/bolt.c @@ -43,14 +43,14 @@ typedef struct { u8 pad40[8]; f32 attraction_angle_y; /* 0x48 */ f32 attraction_angle_z; /* 0x4C */ - f32 unk50; /* 0x50 */ + f32 spin_x; /* 0x50: idle spin angle about x */ u8 landed; /* 0x54 */ - u8 unk55; /* 0x55 */ + u8 spin_flags; /* 0x55: bit 0 picks the idle spin direction */ u8 hop_frames; /* 0x56 */ u8 hop_left; /* 0x57 */ - f32 unk58; /* 0x58 */ + f32 spin_z; /* 0x58: idle spin angle about z */ void *ground_moby; /* 0x5C */ - struct Bolt *unk60; /* 0x60 */ + struct Bolt *target; /* 0x60: moby the bolt flies to (the hero's) */ f32 speed; /* 0x64 */ f32 ground_z; /* 0x68 */ s16 slot; /* 0x6C */ @@ -97,7 +97,7 @@ typedef struct { u8 pad16[0xA]; } BoltTrailSlot; -/* What a bolt moby's unkB8 points at: byte 0xB1 is its source's per-level id. */ +/* What a bolt moby's parent points at: byte 0xB1 is its source's per-level id. */ typedef struct { u8 pad_00[0xB1]; u8 id; /* 0x80 set: no id */ @@ -110,14 +110,14 @@ typedef struct { f32 spin[4] __attribute__((aligned(16))); /* 0x30: per-frame rotation (quaternion) */ u8 counted; /* 0x40: CollectBolt also adds the bolt to D_0015EE2C */ u8 pad_41[0xF]; - f32 unk50; /* random angle */ + f32 spin_x; /* 0x50: random angle */ u8 pad_54; - u8 unk55; /* bit 0 set at random */ + u8 spin_flags; /* 0x55: bit 0 set at random */ u8 pad_56[2]; - f32 unk58; /* random angle */ + f32 spin_z; /* 0x58: random angle */ u8 pad_5C[0xC]; - f32 start_z; /* 0x68 */ - s16 unk6C; + f32 start_z; /* 0x68 */ + s16 slot; /* 0x6C: glint slot, -1 none */ s16 glint_delay_frames; /* random 0 .. 600 frames */ } BoltVars_u; @@ -218,7 +218,7 @@ void bolt_update(Bolt *bolt_moby) { bolt_moby->update_dist = 0x20; bolt_moby->draw_distance = 0x20; if (random_integer_below(2) == 0) { - v->unk55 |= 1; + v->spin_flags |= 1; } fast_vec_normalize(&geometry_scratch, &bolt_moby->rot_row2, 0.2f); fast_vec_add(&geometry_scratch, &geometry_scratch, &bolt_moby->pos); @@ -240,8 +240,8 @@ void bolt_update(Bolt *bolt_moby) { qcopy(&v->pos, &bolt_moby->pos); clear_u64_value(&v->rot); } - v->unk50 = random_angle_radians(); - v->unk58 = random_angle_radians(); + v->spin_x = random_angle_radians(); + v->spin_z = random_angle_radians(); v->ground_z = bolt_moby->pos.f[2]; v->slot_timer = FUN_L00_00257b90(0, scale_game_frames(600)); v->slot = -1; @@ -392,7 +392,7 @@ void bolt_update(Bolt *bolt_moby) { return; case BOLT_MOVE_TO_HERO: flag = 0; - if (v->unk60->oclass == 0) { + if (v->target->oclass == 0) { fast_vec_sub(&geometry_scratch, &bolt_moby->pos, &hero.ground_point); transform_vector(&geometry_scratch, &geometry_scratch, hero.inv_rot_matrix); if (geometry_scratch.f[2] < 0.0f) { @@ -769,7 +769,7 @@ struct Moby *spawn_bolt_by_value( if (0 != spawned_bolt) { bolt_vars = (BoltVars_u *)spawned_bolt->pvars; bolt_vars->counted = counted; - /* the bolt source is the root of src's unkB8 chain */ + /* the bolt source is the root of src's parent chain */ root = bolt_source; if (bolt_source != 0) { while (root->parent != 0) @@ -789,13 +789,13 @@ struct Moby *spawn_bolt_by_value( else spawned_bolt->spawn_frame = bolt_source->spawn_frame; bolt_vars->glint_delay_frames = random_int_between(0, scale_game_frames(600)); - bolt_vars->unk6C = -1; + bolt_vars->slot = -1; qcopy(&spawned_bolt->pos, pos); qcopy(bolt_vars->vel, vel); if (random_integer_below(2)) - bolt_vars->unk55 |= 1; - bolt_vars->unk50 = random_angle_radians(); - bolt_vars->unk58 = random_angle_radians(); + bolt_vars->spin_flags |= 1; + bolt_vars->spin_x = random_angle_radians(); + bolt_vars->spin_z = random_angle_radians(); bolt_vars->start_z = spawned_bolt->pos.z; spin = random_float_between(0.0f, bolt_spin_angle_limit_degrees_gp) * 0.017453292f * D_0015ED6C; diff --git a/src/overlays/shared/pickups/crate.c b/src/overlays/shared/pickups/crate.c index cce018aad3..af5edd42c6 100644 --- a/src/overlays/shared/pickups/crate.c +++ b/src/overlays/shared/pickups/crate.c @@ -65,7 +65,7 @@ typedef struct { typedef struct { u8 pad00[0x20]; Coll coll; - u64 unk40; + u64 velocity; /* 0x40: start of the velocity vector, cleared at init */ u8 pad48[0xA0 - 0x48]; struct Moby *rider; /* crate stacked on this one */ struct Moby *below; /* crate this one sits on */ @@ -75,8 +75,8 @@ typedef struct { s32 frameB4; u64 saved_spawn_frame; /* saved moby spawn_frame word */ u8 padC0[0xC6 - 0xC0]; - s16 unkC6; - u8 unkC8; + s16 drop_mode; /* 0xC6: nonzero drops ammo pickups (100 for class 0x1FF) */ + u8 respawns; /* 0xC8 */ u8 respawn_delay_timer; u8 burst_frame; u8 padCB[0xFC - 0xCB]; @@ -304,8 +304,8 @@ void crate_update(struct Moby *moby) { switch (moby->state) { case CRATE_STATE_INITIALIZE: - clear_u64_value(&crate_vars->unk40); - if (D_0015ED84 == 0x12 && moby->oclass == 0x1FF && crate_vars->unkC8 != 0) { + clear_u64_value(&crate_vars->velocity); + if (D_0015ED84 == 0x12 && moby->oclass == 0x1FF && crate_vars->respawns != 0) { moby->state = CRATE_STATE_WAIT_RESPAWN; moby->flags |= 0x41; moby->collision = 0; @@ -319,7 +319,7 @@ void crate_update(struct Moby *moby) { } crate_vars->flags |= 0x14; if (moby->oclass == 0x1FF) { - crate_vars->unkC6 = 100; + crate_vars->drop_mode = 100; } else if (moby->oclass == 0x1F5) { create_linked_class_0326_moby(moby); } @@ -382,7 +382,7 @@ void crate_update(struct Moby *moby) { break; } break_crate(moby, moby->oclass == 0x1F9, hit_contact); - if (crate_vars->unkC8 != 0 && hit_contact != NULL && hit_contact->hit.s.moby != NULL) { + if (crate_vars->respawns != 0 && hit_contact != NULL && hit_contact->hit.s.moby != NULL) { s16 hit_moby_class_id = hit_contact->hit.s.moby->oclass; if (hit_moby_class_id == 0x2CD || hit_moby_class_id == 0x22C) { @@ -424,7 +424,7 @@ void crate_update(struct Moby *moby) { crate_vars->burst_frame++; break; } - if (crate_vars->unkC8 != 0) { + if (crate_vars->respawns != 0) { moby->flags |= 1; moby->collision = 0; moby->flags &= ~0x1000; From 8c9a4a69fa45d29dc63aee6b24328c67b8a64bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:27:02 +0000 Subject: [PATCH 156/213] decomp: name the mine spin and wobble vars and the turret shot probe direction flag --- src/overlays/shared/weapons/mine.c | 18 +++++++++--------- src/overlays/shared/weapons/turret_shot.c | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/overlays/shared/weapons/mine.c b/src/overlays/shared/weapons/mine.c index ac8cbde57f..97c2741551 100644 --- a/src/overlays/shared/weapons/mine.c +++ b/src/overlays/shared/weapons/mine.c @@ -36,12 +36,12 @@ typedef struct MineVars { s32 owner; u8 pad34[0x2]; s16 prediction_done; - f32 unk38; - f32 unk3C; + f32 spin_rate_a; /* 0x38: random 60..180 degrees per second */ + f32 spin_rate_b; /* 0x3C */ u8 pad40[0x1c]; - s32 spawn_frame; /* game frame at spawn; with 8 mines out the oldest gets -1 */ - f32 unk60; - f32 unk64; + s32 spawn_frame; /* game frame at spawn; with 8 mines out the oldest gets -1 */ + f32 wobble_phase_a; /* 0x60 */ + f32 wobble_phase_b; /* 0x64 */ s32 voice; f32 bob_amplitude; f32 bob_phase; @@ -430,14 +430,14 @@ unsigned char *spawn_mine(int mine_owner_moby, OvlQuad *spawn_position) { float frame_scaled_random_sample; int x; float z; - mine_vars->unk38 = a; + mine_vars->spin_rate_a = a; frame_scaled_random_sample = random_float_between(frame_rate_scale * 1.0471976f, frame_rate_scale * 3.1415927f); x = D_L00_0015F5CC_2a9ed0; z = 0.0f; - mine_vars->unk3C = frame_scaled_random_sample; - mine_vars->unk64 = z; - mine_vars->unk60 = z; + mine_vars->spin_rate_b = frame_scaled_random_sample; + mine_vars->wobble_phase_b = z; + mine_vars->wobble_phase_a = z; mine_vars->bob_phase = z; mine_vars->bob_amplitude = z; mine_vars->spawn_frame = x; diff --git a/src/overlays/shared/weapons/turret_shot.c b/src/overlays/shared/weapons/turret_shot.c index 92000224e6..9dc0ba7d6f 100644 --- a/src/overlays/shared/weapons/turret_shot.c +++ b/src/overlays/shared/weapons/turret_shot.c @@ -35,9 +35,9 @@ typedef struct { s32 mask; /* 0x14: collision classes */ u8 unk18; u8 unk19; - s16 oclass; /* 0x1A */ - f32 radius; /* 0x1C */ - s32 unk20; + s16 oclass; /* 0x1A */ + f32 radius; /* 0x1C */ + s32 has_direction; /* 0x20: MobyHit.has_direction */ } CollisionProbe; extern u8 *spawn_source_attached_fading_effect_particle(f32, struct Moby *, u32, s32, s32) __asm__("FUN_L00_0026daa0"); @@ -160,7 +160,7 @@ void turret_shot_update(struct Moby *projectile_moby) { pr.mask = 0x70001; pr.radius = 3.0f; pr.self = projectile_moby; - pr.unk20 = 1; + pr.has_direction = 1; qcopy(&pr.dir, &projectile_vars->vel); fast_vec_sub(&pr.dir, &projectile_moby->pos, &D_0013F3D0_307d68); set_vector_length_xy(&pr.dir, &pr.dir, 1.0f); From 6a230876de4d2139cd6337a34e19c253607fef73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:27:59 +0000 Subject: [PATCH 157/213] decomp: name the hero visibomb fin manipulator buffers --- include/rnc/hero/hero.h | 21 ++++++++++--------- src/check/hero_layout_check.c | 4 ++-- .../shared/weapons/visibomb_missile.c | 4 ++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index 0309b0efe5..eb50b9a75e 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -758,16 +758,17 @@ struct Hero { s8 hop_mode; /* 0x1F3F: cleared when a hop starts */ f32 hop_turn_velocity; /* 0x1F40: spring turn velocity toward hop_heading */ u8 pad_1F44[0x1C]; - u8 unk1F60[0x40]; /* 0x1F60: 0x40-byte buffer cleared by FUN_L00_002b58d8 */ - u8 unk1FA0[0x40]; /* 0x1FA0: 0x40-byte buffer cleared by FUN_L00_002b58d8 */ - u8 *visibomb_missile; /* 0x1FE0: moby set by FUN_L00_002b58d8 */ - u8 pad_1FE4[0x11]; - u8 launch_drones; /* 0x1FF5 */ - u8 ammo_used; /* 0x1FF6 */ - u8 ammo_capacity; /* 0x1FF7 */ - u8 pad_1FF8[0x28]; - u8 *drone_mobys[6]; /* 0x2020: six moby slots, filled at the index a moby carries at +0x54 */ - u8 pad_2038[0x8]; + u8 visibomb_fin_manip0 + [0x40]; /* 0x1F60: joint manipulator of the visibomb missile fin 0 (spawn_visibomb_missile) */ + u8 visibomb_fin_manip1[0x40]; /* 0x1FA0: fin 1 */ + u8 *visibomb_missile; /* 0x1FE0: moby set by FUN_L00_002b58d8 */ + u8 pad_1FE4[0x11]; + u8 launch_drones; /* 0x1FF5 */ + u8 ammo_used; /* 0x1FF6 */ + u8 ammo_capacity; /* 0x1FF7 */ + u8 pad_1FF8[0x28]; + u8 *drone_mobys[6]; /* 0x2020: six moby slots, filled at the index a moby carries at +0x54 */ + u8 pad_2038[0x8]; struct Moby *metal_detector_target; /* 0x2040: nearest oclass 0x25D moby (metal_detector_update) */ f32 detector_target_dist; /* 0x2044: distance to metal_detector_target; 100000 when none */ diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index 43bdfa2ae2..bbc3242fc9 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -439,8 +439,8 @@ HERO_OFFSET_CHECK(hop_horizontal_speed, 0x1F24); HERO_OFFSET_CHECK(hop_heading, 0x1F28); HERO_OFFSET_CHECK(hop_mode, 0x1F3F); HERO_OFFSET_CHECK(hop_turn_velocity, 0x1F40); -HERO_OFFSET_CHECK(unk1F60, 0x1F60); -HERO_OFFSET_CHECK(unk1FA0, 0x1FA0); +HERO_OFFSET_CHECK(visibomb_fin_manip0, 0x1F60); +HERO_OFFSET_CHECK(visibomb_fin_manip1, 0x1FA0); HERO_OFFSET_CHECK(visibomb_missile, 0x1FE0); HERO_OFFSET_CHECK(launch_drones, 0x1FF5); HERO_OFFSET_CHECK(ammo_used, 0x1FF6); diff --git a/src/overlays/shared/weapons/visibomb_missile.c b/src/overlays/shared/weapons/visibomb_missile.c index 3d2c2d859a..3b275bd635 100644 --- a/src/overlays/shared/weapons/visibomb_missile.c +++ b/src/overlays/shared/weapons/visibomb_missile.c @@ -612,8 +612,8 @@ spawn_visibomb_missile(unsigned char *source_moby, V_2b58d8 *launch_position, fl MOBY(spawned_moby)->state = 1; MOBY(spawned_moby)->rot.z = fa; MOBY(spawned_moby)->rot.y = fb; - *(unsigned char **)(spawned_moby_vars + 0x24) = G->unk1F60; - *(unsigned char **)(spawned_moby_vars + 0x28) = G->unk1FA0; + *(unsigned char **)(spawned_moby_vars + 0x24) = G->visibomb_fin_manip0; + *(unsigned char **)(spawned_moby_vars + 0x28) = G->visibomb_fin_manip1; *(unsigned char **)(spawned_moby_vars + 0x0) = source_moby; qcopy(&MOBY(spawned_moby)->pos, launch_position); *(int *)(spawned_moby_vars + 0x8) = 0; From e3f0ef916dba34e5ccd0cb7f29d1df3c004ec87a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:28:30 +0000 Subject: [PATCH 158/213] decomp: name the l11 water tile ripple constants --- src/overlays/l11/mobys/water_tile.c | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/overlays/l11/mobys/water_tile.c b/src/overlays/l11/mobys/water_tile.c index d73a20304d..506966c81a 100644 --- a/src/overlays/l11/mobys/water_tile.c +++ b/src/overlays/l11/mobys/water_tile.c @@ -25,15 +25,15 @@ void populate_water_tile_neighbor_indices(int selected_tile_index) __asm__("FUN_ void populate_water_tile_neighbor_indices(int arg) __asm__("FUN_L11_0030e730"); typedef struct { - f32 unk0; - f32 unk4; - f32 unk8; - f32 unkC; - f32 unk10; - f32 unk14; - f32 unk18; - f32 unk1C; - f32 unk20; + f32 size_x; /* 0x00: patch size (16) */ + f32 size_y; /* 0x04 */ + f32 origin_x; /* 0x08: origin offset (-8) */ + f32 origin_y; /* 0x0C */ + f32 cell_x; /* 0x10: cell size (1) */ + f32 cell_y; /* 0x14 */ + f32 reflection_scale; /* 0x18: sphere-map scale (0.9) */ + f32 damping_threshold; /* 0x1C: kept from the disc */ + f32 clock_step; /* 0x20: ripple clock step (0.1) */ f32 unk24; s32 unk28; s32 unk2C; @@ -42,7 +42,7 @@ typedef struct { f32 light_dir_z; u8 unk3C; u8 unk3D; -} Light_e088; +} Light_e088; /* ripple constants (ReRAC water.rs RippleConsts) */ extern Light_e088 l11_water_tile_light __asm__("D_L11_001CB280"); int l11_water_tile_allocation_count __asm__("D_L11_00161F64") = 0; @@ -103,14 +103,14 @@ void water_tile_update(struct Moby *water_tile_moby) { pool_init_tiles(l11_water_grids, 20); pool_set_scale(1.0f); water_tile_light = &l11_water_tile_light; - water_tile_light->unk0 = 16.0f; - water_tile_light->unk4 = 16.0f; - water_tile_light->unk8 = -8.0f; - water_tile_light->unkC = -8.0f; - water_tile_light->unk10 = 1.0f; - water_tile_light->unk14 = 1.0f; - water_tile_light->unk18 = 0.9f; - water_tile_light->unk20 = 0.1f; + water_tile_light->size_x = 16.0f; + water_tile_light->size_y = 16.0f; + water_tile_light->origin_x = -8.0f; + water_tile_light->origin_y = -8.0f; + water_tile_light->cell_x = 1.0f; + water_tile_light->cell_y = 1.0f; + water_tile_light->reflection_scale = 0.9f; + water_tile_light->clock_step = 0.1f; light_direction_angle = fast_arc_tan(water_light_heading_reference[4], water_light_heading_reference[5]); water_tile_light->light_dir_x = fast_cos(light_direction_angle) * 0.57735f; From ce451b5acc33d1fc6b3a8e65d0766440e6ccfa92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:40:05 +0000 Subject: [PATCH 159/213] decomp: name the l11 water render parameters, seesaw carry flags and resort owner dialogue entry The water tile's render block follows the pool height grid layout (size, origin, cell size) and the WaterGrid texture and alpha fields; the seesaw writes the carry record's flags word; the resort owner reads update_npc_dialogue's current entry. --- src/overlays/l11/mobys/resort_owner.c | 52 ++++++++++++------------ src/overlays/l11/mobys/seesaw_platform.c | 10 ++--- src/overlays/l11/mobys/water_tile.c | 31 +++++++------- 3 files changed, 48 insertions(+), 45 deletions(-) diff --git a/src/overlays/l11/mobys/resort_owner.c b/src/overlays/l11/mobys/resort_owner.c index 337eff6d48..b2a16653d8 100644 --- a/src/overlays/l11/mobys/resort_owner.c +++ b/src/overlays/l11/mobys/resort_owner.c @@ -70,8 +70,8 @@ typedef struct ResortOwnerVars { u8 pad_C[0x20]; f32 talk_range; u8 pad_30[0x26]; - s16 unk56; - u8 pad_58[0x28]; + s16 talk_entry; /* 0x56: talk + 0x36, current dialogue entry of update_npc_dialogue, -1 none */ + u8 pad_58[0x28]; void *clearance_path; void *supplemental_clearance_path; void *penultimate_clearance_path; @@ -331,28 +331,28 @@ extern float resort_owner_gate_jump_target_local_x_offset_gp __asm__("D_L11_0016 /* Pvars of the path-walking NPC run by resort_owner_update. */ struct PokKeeperVars { - u8 pad00[0x20]; - u8 talk[0xC]; /* 0x20: talk prompt (initialize_npc_dialogue / update_npc_dialogue) */ - f32 talk_range; /* 0x2C */ - u8 pad30[0x26]; - s16 unk56; - u8 pad58[8]; - s32 leg_paths[3]; /* 0x60: per-leg clearance paths, set from leg_path_ids[] */ - u8 pad6C[4]; - s32 leg_path_ids[3]; - u8 pad7C[0x54]; - s32 leg_entry_points[4]; - s32 points[4]; /* 0xE0: path point of each leg */ - s32 gates[2]; /* 0xF0: gate mobys */ - s32 volumes[2]; /* 0xF8 */ - s32 final_leg_trigger_moby; - s32 paired_rotation_moby; - s32 first_gate_open_mission; - s32 path_complete_mission; - s32 second_gate_arrival_cuboid_index; - s32 final_path_arrival_cuboid_index; - s32 post_path_dialogue_condition_index; - u8 pad11C[4]; + u8 pad00[0x20]; + u8 talk[0xC]; /* 0x20: talk prompt (initialize_npc_dialogue / update_npc_dialogue) */ + f32 talk_range; /* 0x2C */ + u8 pad30[0x26]; + s16 talk_entry; /* 0x56: talk + 0x36, current dialogue entry of update_npc_dialogue, -1 none */ + u8 pad58[8]; + s32 leg_paths[3]; /* 0x60: per-leg clearance paths, set from leg_path_ids[] */ + u8 pad6C[4]; + s32 leg_path_ids[3]; + u8 pad7C[0x54]; + s32 leg_entry_points[4]; + s32 points[4]; /* 0xE0: path point of each leg */ + s32 gates[2]; /* 0xF0: gate mobys */ + s32 volumes[2]; /* 0xF8 */ + s32 final_leg_trigger_moby; + s32 paired_rotation_moby; + s32 first_gate_open_mission; + s32 path_complete_mission; + s32 second_gate_arrival_cuboid_index; + s32 final_path_arrival_cuboid_index; + s32 post_path_dialogue_condition_index; + u8 pad11C[4]; Vec4f target; /* 0x120 */ Vec4f velocity; Vec4f displacement; @@ -434,7 +434,7 @@ void update_resort_owner_state_transitions(void *resort_owner_moby) { FUN_L11_002d2088_c(moby, 1); break; case RESORT_OWNER_CHECK_INITIAL_DIALOGUE: - if (moby_vars->unk56 == 0) { + if (moby_vars->talk_entry == 0) { if (hero.air_frames.s == 0 && update_npc_dialogue(moby, moby_vars->talk)) { begin_dialogue_camera_transition(moby, 2.5f); FUN_L11_002d2088_c(moby, 2); @@ -618,7 +618,7 @@ void set_resort_owner_state(struct Moby *moby, unsigned char state) { moby_vars->talk_range = 10.0f; clear_u64_value(moby_vars->velocity); if (moby->state == RESORT_OWNER_CHECK_POST_PATH_DIALOGUE) - moby_vars->unk56 = 2; + moby_vars->talk_entry = 2; break; case RESORT_OWNER_FOLLOW_HERO: if (moby->prev_seq != 2) diff --git a/src/overlays/l11/mobys/seesaw_platform.c b/src/overlays/l11/mobys/seesaw_platform.c index 71b8a0e6aa..20640429cc 100644 --- a/src/overlays/l11/mobys/seesaw_platform.c +++ b/src/overlays/l11/mobys/seesaw_platform.c @@ -29,10 +29,10 @@ extern float seesaw_fall_tilt_threshold_degrees_gp __asm__("D_L11_00161F84") __a /* Private variables of the tilting platform (seesaw_platform_update). */ struct L11TiltVars { - u8 pad0[0x20]; - u8 carry[0x3C]; /* 0x20: rider state for update_entity_matrix */ - s32 unk5C; /* 0x5C */ - f32 spin; /* 0x60: rot.y speed */ + u8 pad0[0x20]; + u8 carry[0x3C]; /* 0x20: rider state for update_entity_matrix */ + s32 carry_flags; /* 0x5C: flags word of the carry record (carry + 0x3C; bit 4 read by transform_attachment_pose) */ + f32 spin; /* 0x60: rot.y speed */ }; /* Tilting platform: rot.y springs back and is damped through its spin; the hero standing on it tilts it toward @@ -52,7 +52,7 @@ void seesaw_platform_update(struct Moby *platform) { fast_vec_scale(&platform_translation_delta, &platform->pos, -1.0f); qcopy(&rot, &platform->rot); - platform_vars->unk5C = 1; + platform_vars->carry_flags = 1; spin = platform_vars->spin; /* two separate updates (not one sum): gives retail's FP register allocation */ platform_vars->spin = spin + seesaw_tilt_feedback_gain_degrees_gp * 0.017453292f * diff --git a/src/overlays/l11/mobys/water_tile.c b/src/overlays/l11/mobys/water_tile.c index 506966c81a..b2d254b35e 100644 --- a/src/overlays/l11/mobys/water_tile.c +++ b/src/overlays/l11/mobys/water_tile.c @@ -24,6 +24,9 @@ void populate_water_tile_neighbor_indices(int selected_tile_index) __asm__("FUN_ void populate_water_tile_neighbor_indices(int arg) __asm__("FUN_L11_0030e730"); +/* The water render parameters set up by the first tile: the same grid layout as the pool height + grids (HeightGridLayout: size, origin, cell size; 16 x 16 units, origin -8, cell 1), the texture + ids and alpha FIX values the grids use, and the light direction. No C code reads it back. */ typedef struct { f32 size_x; /* 0x00: patch size (16) */ f32 size_y; /* 0x04 */ @@ -35,18 +38,18 @@ typedef struct { f32 damping_threshold; /* 0x1C: kept from the disc */ f32 clock_step; /* 0x20: ripple clock step (0.1) */ f32 unk24; - s32 unk28; - s32 unk2C; + s32 texture_id; + s32 second_texture_id; f32 light_dir_x; f32 light_dir_y; f32 light_dir_z; - u8 unk3C; - u8 unk3D; -} Light_e088; /* ripple constants (ReRAC water.rs RippleConsts) */ + u8 alpha_2_fix; + u8 alpha_1_fix; +} WaterGridRenderParams; /* ripple constants (ReRAC water.rs RippleConsts) */ -extern Light_e088 l11_water_tile_light __asm__("D_L11_001CB280"); -int l11_water_tile_allocation_count __asm__("D_L11_00161F64") = 0; -char D_L11_0021B4C0[] = +extern WaterGridRenderParams l11_water_tile_light __asm__("D_L11_001CB280"); +int l11_water_tile_allocation_count __asm__("D_L11_00161F64") = 0; +char D_L11_0021B4C0[] = "I'm really sorry, but you can't have more than 128 water tiles in this level"; /* One fixed-point bounds record (pool_bind_tile: x, y, z, two scale shorts) per water grid; the pool reads 20 of them (D_L11_001612D8 = 20 next to their base). */ @@ -95,8 +98,8 @@ void water_tile_update(struct Moby *water_tile_moby) { water_tile_moby->flags |= 1; water_tile_moby->scale = water_tile_moby->pclass->scale + water_tile_moby->pclass->scale; if (water_tile_vars[1] == 0) { - Light_e088 *water_tile_light; - float light_direction_angle; + WaterGridRenderParams *water_tile_light; + float light_direction_angle; for (i = 19; i >= 0; i--) { l11_water_grids[i].visible_subtiles = 0; } @@ -116,10 +119,10 @@ void water_tile_update(struct Moby *water_tile_moby) { water_tile_light->light_dir_x = fast_cos(light_direction_angle) * 0.57735f; water_tile_light->light_dir_y = fast_sin(light_direction_angle) * 0.57735f; water_tile_light->light_dir_z = -0.57735f; - water_tile_light->unk28 = 0x38; - water_tile_light->unk2C = 0x39; - water_tile_light->unk3C = 0x1C; - water_tile_light->unk3D = 0x40; + water_tile_light->texture_id = 0x38; + water_tile_light->second_texture_id = 0x39; + water_tile_light->alpha_2_fix = 0x1C; + water_tile_light->alpha_1_fix = 0x40; D_L11_001612D0 = l11_water_grids; l11_water_tile_binding_record_base = water_tile_binding_records; D_L11_001612D8 = 20; From cb25aa262480e0253517fdf6aaa65f5093063333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:40:10 +0000 Subject: [PATCH 160/213] decomp: name the l01 spark life and alpha, pool tile alpha fixes and hero motion fields in comments Spark fields follow EffectParticle (life at 0xA) and the colour alpha; the pool tile alphas follow WaterGrid; the hero motion comment uses the HeroMotion names and swaps the two resolved velocity descriptions to match the code. --- .../update_hero_motion_for_current_state.c | 18 +++++++++--------- src/overlays/l01/mobys/cutscene_effects.c | 12 ++++++------ .../l01/mobys/pool_tiles_and_effects.c | 4 ++-- src/overlays/l01/mobys/water_current.c | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/overlays/l01/hero/update_hero_motion_for_current_state.c b/src/overlays/l01/hero/update_hero_motion_for_current_state.c index b179ed30fe..b0cfa65e82 100644 --- a/src/overlays/l01/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l01/hero/update_hero_motion_for_current_state.c @@ -27,15 +27,15 @@ /* * Hero movement step: clamps the velocity, moves the hero by it (plus the - * one-frame impulse at unk920 and the push at unkF0), runs collision, then + * one-frame move_impulse and the push in motion.platform_delta), runs collision, then * derives this frame's movement vectors and speeds: - * motion.unk100 position change this frame - * motion.unk110 movement direction scaled by the velocity along it - * motion.unk120 same, without the gravity-up component - * motion.unk130 same, gravity-up part only - * motion.unk140 displacement caused by the push - * motion.speed_xy speed, unk164 horizontal speed, unk168 forward speed - * motion.unk16C slope: vertical / horizontal change, clamped to +-0.5 + * motion.displacement position change this frame + * motion.resolved_velocity movement direction scaled by the velocity along it + * motion.resolved_velocity_z same, gravity-up part only + * motion.resolved_velocity_xy same, without the gravity-up component + * motion.platform_carry displacement caused by the push + * motion.speed_xy speed, flat_speed horizontal speed, forward_speed forward speed + * motion.move_slope slope: vertical / horizontal change, clamped to +-0.5 */ /* The FUN_L00_00233xxx helpers work in the hero's gravity frame (hero byte @@ -164,7 +164,7 @@ void integrate_hero_movement(void) { } fast_vec_sub(&hero.motion.platform_carry, &hero.motion.pos, &movement_vector_scratch); { - /* push w moves to unk140.w; a block-local keeps retail's order */ + /* push w moves to platform_carry.w; a block-local keeps retail's order */ f32 push_w = hero.motion.platform_delta.f[3]; hero.motion.platform_delta.f[3] = 0.0f; diff --git a/src/overlays/l01/mobys/cutscene_effects.c b/src/overlays/l01/mobys/cutscene_effects.c index 2ca141201f..bd17aef4e6 100644 --- a/src/overlays/l01/mobys/cutscene_effects.c +++ b/src/overlays/l01/mobys/cutscene_effects.c @@ -31,14 +31,14 @@ typedef struct { u8 pad0[4]; s32 unk4; u8 pad8[2]; - u8 unkA; + u8 alpha; /* 0x0A: alpha of the spark colour */ u8 initial_frame_count; } FxSparkTail; typedef struct { u8 pad0[9]; u8 unk9; - s16 unkA; + s16 life; /* 0x0A: frames left, as EffectParticle */ u8 padC[0x20 - 0xC]; FxSparkTail tail; } FxSpark; @@ -185,14 +185,14 @@ void level01_cutscene_effects_update(struct Moby *moby) { FxSparkTail *spark_tail = &spark->tail; if (fx_cutscene.frame >= scale_game_frames(1100)) { - spark->unkA = scale_game_frames(30); + spark->life = scale_game_frames(30); } else { - spark->unkA = scale_game_frames(6); + spark->life = scale_game_frames(6); } spark->unk9 = truncate_float_to_s32(4.0f) + 0x40; spark_tail->unk4 = 2; - spark_tail->unkA = color >> 24; - spark_tail->initial_frame_count = spark->unkA; + spark_tail->alpha = color >> 24; + spark_tail->initial_frame_count = spark->life; } } } diff --git a/src/overlays/l01/mobys/pool_tiles_and_effects.c b/src/overlays/l01/mobys/pool_tiles_and_effects.c index 456c0cf874..815b916a78 100644 --- a/src/overlays/l01/mobys/pool_tiles_and_effects.c +++ b/src/overlays/l01/mobys/pool_tiles_and_effects.c @@ -28,8 +28,8 @@ typedef struct { [8]; /* 0x0C: index of the tile 16 units away in each direction, 0xFF: none (WaterGrid layout) */ u32 texture_id; /* 0x14 */ u32 second_texture_id; /* 0x18 */ - u8 unk1C; /* 0x1C */ - u8 unk1D; /* 0x1D */ + u8 alpha_2_fix; /* 0x1C */ + u8 alpha_1_fix; /* 0x1D */ u16 color; /* 0x1E */ f32 f20; f32 f24; diff --git a/src/overlays/l01/mobys/water_current.c b/src/overlays/l01/mobys/water_current.c index b3d77b1e28..b24b72eced 100644 --- a/src/overlays/l01/mobys/water_current.c +++ b/src/overlays/l01/mobys/water_current.c @@ -21,7 +21,7 @@ * (prev control mode 0x12, now 4 or 5) the push is damped instead. */ typedef struct { - Vec4 vel; /* 0x00: path velocity, copied to the hero push (motion.unkF0) */ + Vec4 vel; /* 0x00: path velocity, copied to the hero push (motion.platform_delta) */ u8 pad_10[0x10]; s32 path; /* 0x20: index into D_L01_001B0930, -1 none */ f32 max_speed; /* 0x24 */ From fcaf3ad6762cfff6595bfbfb72f9bb0aaea7f3ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:41:18 +0000 Subject: [PATCH 161/213] decomp: name the l07 target info and ground move fields of the platforms, turrets and snagglebeast The platforms set up MobyTargetInfo at pvars+0x20 (health, hit_weight, flags); the snagglebeast's pvars+0x70 block is the GroundMoveControl that step_mover_2e3f20 takes, so its fields take those names. --- src/overlays/l07/mobys/bombomatic.c | 4 +- .../l07/mobys/command_falling_platform.c | 12 +- .../l07/mobys/hero_falling_platform.c | 16 +- src/overlays/l07/mobys/machinegun_turret.c | 8 +- .../l07/mobys/mission_gated_taxi_platform.c | 16 +- src/overlays/l07/mobys/snagglebeast.c | 151 +++++++++--------- 6 files changed, 104 insertions(+), 103 deletions(-) diff --git a/src/overlays/l07/mobys/bombomatic.c b/src/overlays/l07/mobys/bombomatic.c index 8c9e9393b3..80337e1975 100644 --- a/src/overlays/l07/mobys/bombomatic.c +++ b/src/overlays/l07/mobys/bombomatic.c @@ -161,7 +161,7 @@ typedef struct BombomaticVars { u8 pad_0[0x20]; f32 health; u8 pad_24[0x2]; - s16 unk26; + s16 stun_timer; u8 pad_28[0x38]; struct HitColorFlash hit_flash; u8 manipulator_70; @@ -324,7 +324,7 @@ void bombomatic_update(char *moby) { tv -= hit_damage; *(float *)health_ptr = tv; moby_data->hit_flash.flash_red = 0xFA; - moby_data->unk26 = scale_game_frames(60); + moby_data->stun_timer = scale_game_frames(60); start_hit_color_flash(moby, &moby_data->hit_flash); } eb20: diff --git a/src/overlays/l07/mobys/command_falling_platform.c b/src/overlays/l07/mobys/command_falling_platform.c index 611c6302bd..80be4c4269 100644 --- a/src/overlays/l07/mobys/command_falling_platform.c +++ b/src/overlays/l07/mobys/command_falling_platform.c @@ -31,12 +31,12 @@ void command_falling_platform_update(char *moby) __asm__("FUN_L07_003112 typedef struct CommandFallingPlatformVars { u8 pad_0[0x20]; - s32 unk20; - s16 unk24; + s32 health; /* 0x20: MobyTargetInfo.health, cleared as an int */ + s16 max_health; u8 pad_26[0x2]; u8 hit_weight; /* 0x28: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad_29[0x15]; - s16 unk3E; + s16 target_flags; /* 0x3E: MobyTargetInfo.flags; target info at pvars+0x20, see moby_target_info.h */ u8 pad_40[0x20]; f32 transform[16]; s32 parent_index; @@ -98,10 +98,10 @@ void command_falling_platform_update(char *moby) { } switch (((unsigned char *)moby)[0x20]) { case PLATFORM_INITIALIZE: - falling_platform_vars->unk20 = 0; - falling_platform_vars->unk24 = 0; + falling_platform_vars->health = 0; + falling_platform_vars->max_health = 0; falling_platform_vars->hit_weight = 4; - falling_platform_vars->unk3E = 13; + falling_platform_vars->target_flags = 13; timer = rand(); if (timer & 1) MOBY(moby)->rot.z = fast_add_rotations(MOBY(moby)->rot.z, 3.1415927f); diff --git a/src/overlays/l07/mobys/hero_falling_platform.c b/src/overlays/l07/mobys/hero_falling_platform.c index c85c57a229..f07b7c26fa 100644 --- a/src/overlays/l07/mobys/hero_falling_platform.c +++ b/src/overlays/l07/mobys/hero_falling_platform.c @@ -29,12 +29,12 @@ void hero_falling_platform_update(char *moby) __asm__("FUN_L07_00311bc8") typedef struct HeroFallingPlatformVars { u8 pad_0[0x20]; - s32 unk20; - s16 unk24; + s32 health; /* 0x20: MobyTargetInfo.health, cleared as an int */ + s16 max_health; u8 pad_26[0x2]; - u8 unk28; + u8 hit_weight; u8 pad_29[0x15]; - s16 unk3E; + s16 target_flags; /* 0x3E: MobyTargetInfo.flags; target info at pvars+0x20, see moby_target_info.h */ u8 pad_40[0x20]; f32 transform[16]; s16 timer_A0; @@ -65,10 +65,10 @@ void hero_falling_platform_update(char *moby) { qcopy(previous_position, moby + 0x10); switch (((unsigned char *)moby)[0x20]) { case LEAF_INITIALIZE: - moby_data->unk20 = 0; - moby_data->unk24 = 0; - moby_data->unk28 = 4; - moby_data->unk3E = 0xD; + moby_data->health = 0; + moby_data->max_health = 0; + moby_data->hit_weight = 4; + moby_data->target_flags = 0xD; set_moby_color(moby, 0x50, 0x40, 0x10); MOBY(moby)->rot.x += random_float_between(-0.034906585f, 0.034906585f); MOBY(moby)->rot.y += random_float_between(-0.034906585f, 0.034906585f); diff --git a/src/overlays/l07/mobys/machinegun_turret.c b/src/overlays/l07/mobys/machinegun_turret.c index 141a416df0..8eb2f00e56 100644 --- a/src/overlays/l07/mobys/machinegun_turret.c +++ b/src/overlays/l07/mobys/machinegun_turret.c @@ -42,9 +42,9 @@ typedef struct MachinegunTurretVars { u8 pad_0[0x20]; u8 health; u8 pad_21[0x5]; - s16 unk26; + s16 stun_timer; u8 pad_28[0x1]; - u8 unk29; + u8 wrench_hit_sound; u8 pad_2A[0x36]; struct HitColorFlash hit_flash; s32 sweep_start_moby; @@ -96,7 +96,7 @@ void machinegun_turret_update(unsigned char *moby) { FUN_L00_00257470(moby, 0, -1); MOBY(moby)->flags &= 0xefff; turret_instance_vars->hit_flash.flash_red = 0xfa; - turret_instance_vars->unk26 = scale_game_frames(60); + turret_instance_vars->stun_timer = scale_game_frames(60); start_hit_color_flash(moby, animation); turret_instance_vars->fire_timer = scale_game_frames(60); if ((u8)MOBY(moby)->prev_seq != 2) @@ -135,7 +135,7 @@ void machinegun_turret_update(unsigned char *moby) { turret_instance_vars->sweep_end_yaw - turret_instance_vars->sweep_start_yaw; MOBY(moby)->rot.z = normalize_angle(turret_instance_vars->sweep_start_yaw); turret_instance_vars->base_z = MOBY(moby)->pos.z; - turret_instance_vars->unk29 = 0; + turret_instance_vars->wrench_hit_sound = 0; MOBY(moby)->command = 0; turret_instance_vars->burst_timer = turret_instance_vars->burst_length; if ((u8)MOBY(moby)->prev_seq != 1) diff --git a/src/overlays/l07/mobys/mission_gated_taxi_platform.c b/src/overlays/l07/mobys/mission_gated_taxi_platform.c index 68881ea160..ea3cd2ac61 100644 --- a/src/overlays/l07/mobys/mission_gated_taxi_platform.c +++ b/src/overlays/l07/mobys/mission_gated_taxi_platform.c @@ -41,12 +41,12 @@ s32 allocate_voice_for_target_entry(s32 entry_index, typedef struct MissionGatedTaxiPlatformVars { u8 pad_0[0x20]; - s32 unk20; - s16 unk24; + s32 health; /* 0x20: MobyTargetInfo.health, cleared as an int */ + s16 max_health; u8 pad_26[0x2]; - u8 unk28; + u8 hit_weight; u8 pad_29[0x15]; - s16 unk3E; + s16 target_flags; /* 0x3E: MobyTargetInfo.flags; target info at pvars+0x20, see moby_target_info.h */ u8 pad_40[0x20]; f32 transform[16]; u8 command; @@ -88,10 +88,10 @@ void mission_gated_taxi_platform_update(struct Moby *moby) { if (moby->state == TAXI_PLATFORM_STATE_UNINITIALIZED) { float f; char *pts; - mission_gated_taxi_vars->unk28 = 4; - mission_gated_taxi_vars->unk3E = 5; - mission_gated_taxi_vars->unk20 = 0; - mission_gated_taxi_vars->unk24 = 0; + mission_gated_taxi_vars->hit_weight = 4; + mission_gated_taxi_vars->target_flags = 5; + mission_gated_taxi_vars->health = 0; + mission_gated_taxi_vars->max_health = 0; f = 0.0f; if ((moby->command = mission_gated_taxi_vars->command) == 0) { f = 1.0f; diff --git a/src/overlays/l07/mobys/snagglebeast.c b/src/overlays/l07/mobys/snagglebeast.c index 52503730a7..38b7af2dec 100644 --- a/src/overlays/l07/mobys/snagglebeast.c +++ b/src/overlays/l07/mobys/snagglebeast.c @@ -75,7 +75,7 @@ typedef struct SnagglebeastVars { u8 pad_0[0x20]; f32 health; s16 max_health; - s16 unk26; + s16 stun_timer; u8 pad_28[0x1]; u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad_2A[0x2E]; @@ -84,72 +84,73 @@ typedef struct SnagglebeastVars { u8 look_height; u8 pad_5B[0x5]; struct HitColorFlash hit_flash; - u8 pad_70[0x14]; - s32 unk84; - u8 pad_88[0x10]; - f32 turn_start_angle; - f32 unk9C; - u8 pad_A0[0x8]; - s32 unkA8; - u8 pad_AC[0x14]; - f32 turn_target[4]; - u8 pad_D0[0x30]; - f32 velocity[4]; - f32 rope_start_position[4]; - f32 rope_end_position[4]; - f32 rope_tip_velocity[4]; - f32 rope_tip_position[4]; - f32 rope_target[4]; /* 3 above the position of hero.ground_moby */ - s32 timer; - s32 substate; - s32 turn_controller_state; - f32 rope_extension_length; - s32 navigation_ids[6]; - s32 nav_path; - s32 measured_path; - f32 measured_path_length; - s16 timer_194; - s16 timer_196; - s16 timer_198; - s16 timer_19A; - u8 navigation_mask; - u8 path_select; - s16 ammo_drain_step; - s32 path_1A0; - s32 hero_volume; /* clip volume: updates only while the hero is inside */ - s32 target_nav_point; - f32 drop_path_distance; - s32 health_hud_handle; - s32 health_display; - f32 ground_z; - u8 pad_1BC[0x4]; - s32 nav_point; - u8 hero_captured; - u8 sphere_fade_direction; - u8 sphere_shade; - u8 hero_capture_attack_enabled; - f32 sphere_fade; - s32 death_effect_moby; - s32 death_raised_moby; /* raised to z 34.6 after the death */ - u8 pad_1D4[0x1C]; - s32 cuboid; - u8 turn_saved_state; - u8 turn_fixed_target; - u8 turn_resume_animation; - u8 timer_1F7; - s32 voice; - f32 damage_reaction_amount; - u8 joint_animation[0x64]; - f32 joint_damage_reaction_target; - f32 target_yaw_offset; - u8 pad_26C[0x14]; - s16 point_light; - u8 pad_282[0xE]; - s32 chase_path; - s32 capture_turn_done; /* 1 once the capture turn toward the hero ran */ - s32 chase_frames; - s32 path_1A0_volume; /* the chase uses path_1A0 while the hero is inside */ - u8 manipulator[1]; + u8 pad_70 + [0x14]; /* 0x70: struct GroundMoveControl (step_mover_2e3f20); the move_* fields below are its members */ + s32 move_turn_velocity; + u8 pad_88[0x10]; + f32 move_heading_tolerance; + f32 move_arrive_distance; + u8 pad_A0[0x8]; + s32 move_option_flags; + u8 pad_AC[0x14]; + f32 turn_target[4]; + u8 pad_D0[0x30]; + f32 velocity[4]; + f32 rope_start_position[4]; + f32 rope_end_position[4]; + f32 rope_tip_velocity[4]; + f32 rope_tip_position[4]; + f32 rope_target[4]; /* 3 above the position of hero.ground_moby */ + s32 timer; + s32 substate; + s32 turn_controller_state; + f32 rope_extension_length; + s32 navigation_ids[6]; + s32 nav_path; + s32 measured_path; + f32 measured_path_length; + s16 timer_194; + s16 timer_196; + s16 timer_198; + s16 timer_19A; + u8 navigation_mask; + u8 path_select; + s16 ammo_drain_step; + s32 path_1A0; + s32 hero_volume; /* clip volume: updates only while the hero is inside */ + s32 target_nav_point; + f32 drop_path_distance; + s32 health_hud_handle; + s32 health_display; + f32 ground_z; + u8 pad_1BC[0x4]; + s32 nav_point; + u8 hero_captured; + u8 sphere_fade_direction; + u8 sphere_shade; + u8 hero_capture_attack_enabled; + f32 sphere_fade; + s32 death_effect_moby; + s32 death_raised_moby; /* raised to z 34.6 after the death */ + u8 pad_1D4[0x1C]; + s32 cuboid; + u8 turn_saved_state; + u8 turn_fixed_target; + u8 turn_resume_animation; + u8 timer_1F7; + s32 voice; + f32 damage_reaction_amount; + u8 joint_animation[0x64]; + f32 joint_damage_reaction_target; + f32 target_yaw_offset; + u8 pad_26C[0x14]; + s16 point_light; + u8 pad_282[0xE]; + s32 chase_path; + s32 capture_turn_done; /* 1 once the capture turn toward the hero ran */ + s32 chase_frames; + s32 path_1A0_volume; /* the chase uses path_1A0 while the hero is inside */ + u8 manipulator[1]; } SnagglebeastVars; static inline int tint_color(int color) { @@ -547,7 +548,7 @@ void process_snagglebeast_damage(char *moby, scratch.threshold *= frame; *health -= *(float *)(hit + 0x2c); snagglebeast_instance_vars->hit_flash.flash_red = 0xfa; - snagglebeast_instance_vars->unk26 = scale_game_frames(0); + snagglebeast_instance_vars->stun_timer = scale_game_frames(0); start_hit_color_flash(moby, &snagglebeast_instance_vars->hit_flash); if ((u8)moby[0x20] < 10 && *health < scratch.threshold) { int slot; @@ -800,7 +801,7 @@ int start_snagglebeast_turn_toward_target(unsigned char *moby, }; float target_heading = fast_arc_tan(target_position[0] - MOBY(moby)->pos.x, target_position[1] - MOBY(moby)->pos.y); - if (moby_vars->turn_start_angle < + if (moby_vars->move_heading_tolerance < fast_difference_between_rotations(MOBY(moby)->rot.z, target_heading)) { moby_vars->turn_controller_state = SNAGGLEBEAST_TURN_CONTROLLER_RESET; MOBY(moby)->anim_speed = 1.0f; @@ -1248,7 +1249,7 @@ void snagglebeast_update(unsigned char *moby) { ((ChaserPathPoints *)snagglebeast_instance_state)->path_points[k] = i; } } - snagglebeast_instance_state->unkA8 &= ~8; + snagglebeast_instance_state->move_option_flags &= ~8; MOBY(moby)->flags |= 0x1000; build_symmetric_adjacency_masks( snagglebeast_instance_state->navigation_ids, 3, snagglebeast_instance_state->nav_path); @@ -1262,7 +1263,7 @@ void snagglebeast_update(unsigned char *moby) { suck_reset(moby); MOBY(moby)->scale *= 1.75f; snagglebeast_instance_state->hero_capture_attack_enabled = 0; - snagglebeast_instance_state->turn_start_angle = 1.7453293f; + snagglebeast_instance_state->move_heading_tolerance = 1.7453293f; snagglebeast_instance_state->wrench_hit_sound = 1; snagglebeast_instance_state->look_range = truncate_float_to_s32(30.0f); snagglebeast_instance_state->look_height = truncate_float_to_s32(40.0f); @@ -1534,7 +1535,7 @@ void snagglebeast_update(unsigned char *moby) { 16 + 0x10); dd = vector_distance_xy(moby + 0x10, &velocity); - if (dd < snagglebeast_instance_state->unk9C + 1.0f) + if (dd < snagglebeast_instance_state->move_arrive_distance + 1.0f) qcopy(&velocity, &sight); } } else { @@ -1555,7 +1556,7 @@ void snagglebeast_update(unsigned char *moby) { snagglebeast_instance_state->rope_tip_position); qcopy(&position, snagglebeast_instance_state->rope_tip_position); snagglebeast_instance_state->chase_frames += 1; - if (snagglebeast_instance_state->turn_start_angle < + if (snagglebeast_instance_state->move_heading_tolerance < fast_difference_between_rotations(MOBY(moby)->rot.z, fast_arc_tan(position.f[0] - MOBY(moby)->pos.x, position.f[1] - MOBY(moby)->pos.y))) { @@ -1716,13 +1717,13 @@ void snagglebeast_update(unsigned char *moby) { FUN_00212f90(moby, 3, 5, random_int_between(0xA, 0xD)); } } else { - snagglebeast_instance_state->unk84 = 0; + snagglebeast_instance_state->move_turn_velocity = 0; } if (fast_difference_between_rotations( MOBY(moby)->rot.z, fast_arc_tan(snagglebeast_instance_state->turn_target[0] - MOBY(moby)->pos.x, snagglebeast_instance_state->turn_target[1] - MOBY(moby)->pos.y)) < - snagglebeast_instance_state->turn_start_angle * 0.25f) { + snagglebeast_instance_state->move_heading_tolerance * 0.25f) { qzero(snagglebeast_instance_state->velocity); if (MOBY(moby)->prev_seq != snagglebeast_instance_state->turn_resume_animation) { int anim = snagglebeast_instance_state->turn_resume_animation; From 582df0d00316a8bac080baa3565f2f8d5206d344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:42:05 +0000 Subject: [PATCH 162/213] decomp: name the l04 leg rig gait and stride and the blarg trooper removal status --- include/rnc/overlay/l04/leg_rig.h | 12 ++++++------ src/overlays/l04/mobys/blarg_trooper.c | 6 +++--- src/overlays/l04/mobys/leg_walker.c | 16 ++++++++-------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/rnc/overlay/l04/leg_rig.h b/include/rnc/overlay/l04/leg_rig.h index c5ba73901e..530a625c6b 100644 --- a/include/rnc/overlay/l04/leg_rig.h +++ b/include/rnc/overlay/l04/leg_rig.h @@ -43,11 +43,11 @@ typedef struct { /* Per-animation-sequence entry (FUN_L04_002923b8 fills the timing). */ typedef struct { - /* 0x00 */ s32 id; /* animation sequence id */ - /* 0x04 */ f32 unk4; - /* 0x08 */ f32 rate; /* unk4 / multiply_global_factor_ed64(len * 2) */ - /* 0x0C */ f32 start; /* animation_start(class slot, id) */ - /* 0x10 */ f32 len; /* animation_end(class slot, id) - start */ + /* 0x00 */ s32 id; /* animation sequence id */ + /* 0x04 */ f32 stride; /* distance covered per animation cycle */ + /* 0x08 */ f32 rate; /* stride / multiply_global_factor_ed64(len * 2) */ + /* 0x0C */ f32 start; /* animation_start(class slot, id) */ + /* 0x10 */ f32 len; /* animation_end(class slot, id) - start */ /* 0x14 */ u8 pad14[0xC]; /* 0x20 */ LegRigPhase phase[2]; } LegRigAnim; @@ -65,7 +65,7 @@ typedef struct { /* 0x0B4 */ u8 jointB4; /* 0x0B5 */ u8 jointB5; /* 0x0B6 */ u8 mode; - /* 0x0B7 */ u8 unkB7; + /* 0x0B7 */ u8 gait; /* D_L04_001CA938 gait id of the current animation, 0 for none */ /* 0x0B8 */ s32 pitch_target; /* f32 bits: spring_turn target for rot.y */ /* 0x0BC */ s32 pitch_velocity; /* f32 bits */ /* 0x0C0 */ f32 speed; diff --git a/src/overlays/l04/mobys/blarg_trooper.c b/src/overlays/l04/mobys/blarg_trooper.c index ebfbbeb65d..9cadde9338 100644 --- a/src/overlays/l04/mobys/blarg_trooper.c +++ b/src/overlays/l04/mobys/blarg_trooper.c @@ -26,7 +26,7 @@ typedef struct BlargTrooperVars { u8 hit_response_class; u8 wrench_hit_sound; /* 0x29: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad_2A[0x4]; - u8 unk2E; + u8 removal_status; /* 0x2E: anything but 1 removes the trooper and its gun */ u8 pad_2F[0x9]; s32 retimer; u8 pad_3C[0x1C]; @@ -242,7 +242,7 @@ void blarg_trooper_update(struct Moby *moby) { target_distance = vector_distance_xy(pos, update_scratch.tgt); dmg = 0.0f; alive = compute_interpolated_record_value(moby); - if (moby->state != BLARG_TROOPER_STATE_INITIALIZE && blarg_trooper_pvars->unk2E != 1) { + if (moby->state != BLARG_TROOPER_STATE_INITIALIZE && blarg_trooper_pvars->removal_status != 1) { char *o = blarg_trooper_pvars->gun_moby; if (o != 0) { mark_moby_for_removal(o); @@ -393,7 +393,7 @@ void blarg_trooper_update(struct Moby *moby) { blarg_trooper_pvars->health = 2.0f; blarg_trooper_pvars->max_health = 2; blarg_trooper_pvars->hit_response_class = 1; - blarg_trooper_pvars->unk2E = 1; + blarg_trooper_pvars->removal_status = 1; blarg_trooper_pvars->wrench_hit_sound = 1; blarg_trooper_pvars->timer_F0 = 0; blarg_trooper_pvars->alert_timer = 0; diff --git a/src/overlays/l04/mobys/leg_walker.c b/src/overlays/l04/mobys/leg_walker.c index e445bb9b53..df067bc0c1 100644 --- a/src/overlays/l04/mobys/leg_walker.c +++ b/src/overlays/l04/mobys/leg_walker.c @@ -93,7 +93,7 @@ void initialize_leg_rig(struct Moby *moby, LegRig *rig) { rig->anims[i]->phase[0].from[j]; } rig->anims[i]->rate = - rig->anims[i]->unk4 / FUN_L04_001f1978(rig->anims[i]->len + rig->anims[i]->len); + rig->anims[i]->stride / FUN_L04_001f1978(rig->anims[i]->len + rig->anims[i]->len); } } joints[0] = rig->legs[0].joint; @@ -114,7 +114,7 @@ void initialize_leg_rig(struct Moby *moby, LegRig *rig) { attach_manipulator(moby, rig->legs[k].slot_a, &rig->legs[k].manip_a); } rig->control_flags = 0; - rig->unkB7 = 0; + rig->gait = 0; rig->pitch_target = 0; rig->pitch_velocity = 0; rig->speed = 0.0f; @@ -309,7 +309,7 @@ void FUN_L04_00292d48(struct Moby *moby, LegRig *rig, int flags) { fast_add_rotations(fast_subtract_rotations(leg->yaw, heading), leg->upper_turn), leg->lower_turn); base_yaw = fast_subtract_rotations(heading, twist); - if (rig->unkB7 == 0 || (flags & mask) == 0) { + if (rig->gait == 0 || (flags & mask) == 0) { leg->upper_turn = rig_turn_2d48(leg->upper_turn, 0.0f, &rig->legs[i].upper_turn_speed, @@ -323,7 +323,7 @@ void FUN_L04_00292d48(struct Moby *moby, LegRig *rig, int flags) { 0.1f, frame_scale * 0.034906585f); } else { - if (rig->unkB7 == 13) + if (rig->gait == 13) leg->upper_turn = rig_turn_2d48(leg->upper_turn, 0.0f, &rig->legs[i].upper_turn_speed, @@ -532,10 +532,10 @@ s32 leg_walker_update(struct Moby *moby, LegRig *rig, f32 speed, f32 heading, f3 local.joints[4] = rig->jointB4; local.joints[5] = rig->jointB5; transform_scaled_vertex_batch(moby, 6, local.joints, rig); - if (rig->unkB7 == 0x12 && moby->seq == rig->anims[12]->id) + if (rig->gait == 0x12 && moby->seq == rig->anims[12]->id) return flags; moby->anim_speed = 1.0f; - if (rig->unkB7 != 0) { + if (rig->gait != 0) { LegRigAnim **fallback = rig->anims; LegRigAnim **animation_record_cursor; s32 seq = moby->seq; @@ -617,12 +617,12 @@ void reset_leg_rig_from_animation(struct Moby *moby, LegRig *rig) { } rig->mode = LEG_RIG_FALLBACK_GAIT_MASK; rig->speed = 0.0f; - rig->unkB7 = 0; + rig->gait = 0; animation_cursor = rig->anims; for (j = 12; j >= 0; j--, animation_cursor++) { if ((*animation_cursor)->id == moby->prev_seq) { rig->speed = absolute_float(moby->anim_speed * (*animation_cursor)->rate); - rig->unkB7 = D_L04_001CA938[12 - j][0]; + rig->gait = D_L04_001CA938[12 - j][0]; } } rig->mode = rig_pick_mode(moby, rig, animation_time); From e8bb3c646160bc4411d6f89364d1bdae2b9e8ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:44:09 +0000 Subject: [PATCH 163/213] decomp: name the l05 moby array, hatch, flap, sliding block and water spout updates D_L05_0015FFD8 is the level's moby instance array (0x100-byte records whose byte 0xBC is the command the triggers watch); it is now declared once as l05_moby_array. The four triggered classes are named after what their updates do. --- include/rnc/overlay/l05.h | 5 +++++ include/rnc/overlay/l05/mobys.h | 8 ++++---- ..._emitter_update.h => water_spout_update.h} | 6 +++--- src/overlays/l05/hero/hero_set_state.c | 4 ++-- src/overlays/l05/level_class_tables.c | 8 ++++---- src/overlays/l05/mobys/box.c | 9 +++++---- src/overlays/l05/mobys/electric_gate.c | 19 +++++++++---------- src/overlays/l05/mobys/extermibot.c | 17 +++++++---------- src/overlays/l05/mobys/extermitank.c | 4 ++-- src/overlays/l05/mobys/help_hints.c | 5 +++-- src/overlays/l05/mobys/rising_gate.c | 18 +++++++++--------- src/overlays/l05/mobys/scenery_ship.c | 4 ++-- src/overlays/l05/mobys/triggered_moby_yaw.c | 12 ++++++------ src/overlays/l05/mobys/triggered_motion.c | 13 ++++++------- src/overlays/l05/mobys/triggered_slide.c | 16 ++++++++-------- .../l05/mobys/triggered_spray_emitter.c | 16 ++++++++-------- src/overlays/l05/mobys/water.c | 3 +-- 17 files changed, 84 insertions(+), 83 deletions(-) rename include/rnc/overlay/l05/mobys/triggered_spray_emitter_data/{triggered_spray_emitter_update.h => water_spout_update.h} (76%) diff --git a/include/rnc/overlay/l05.h b/include/rnc/overlay/l05.h index 308d8ca2d4..506e964243 100644 --- a/include/rnc/overlay/l05.h +++ b/include/rnc/overlay/l05.h @@ -3,6 +3,11 @@ #include "types.h" +struct Moby; + +/* The level's moby instances, 0x100 bytes each; mobys refer to one another by index into it. */ +extern struct Moby *l05_moby_array __asm__("D_L05_0015FFD8"); + void render_level_water_grids(void) __asm__("FUN_L05_0030d678"); #endif /* LOMBYTE_RNC_OVERLAY_L05_H */ diff --git a/include/rnc/overlay/l05/mobys.h b/include/rnc/overlay/l05/mobys.h index eaf5469852..50823a2b4d 100644 --- a/include/rnc/overlay/l05/mobys.h +++ b/include/rnc/overlay/l05/mobys.h @@ -30,10 +30,10 @@ void skid_mcmarx_update() __asm__("FUN_L05_00307910"); void taxi_update(struct Moby *) __asm__("FUN_L05_00318c78"); void initialize_taxi_stop_state(void *) __asm__("FUN_L05_00319208"); void television_update(struct Moby *) __asm__("FUN_L05_00318b98"); -void triggered_moby_yaw_update(struct Moby *) __asm__("FUN_L05_003166a0"); -void triggered_motion_update(char *) __asm__("FUN_L05_00316258"); -void triggered_slide_update(char *) __asm__("FUN_L05_0030e508"); -void triggered_spray_emitter_update(struct Moby *) __asm__("FUN_L05_003150f0"); +void swinging_flap_update(struct Moby *) __asm__("FUN_L05_003166a0"); +void hinged_hatch_update(char *) __asm__("FUN_L05_00316258"); +void sliding_block_update(char *) __asm__("FUN_L05_0030e508"); +void water_spout_update(struct Moby *) __asm__("FUN_L05_003150f0"); void water_update(struct Moby *) __asm__("FUN_L05_0030ca80"); #endif /* LOMBYTE_RNC_OVERLAY_L05_MOBYS_H */ diff --git a/include/rnc/overlay/l05/mobys/triggered_spray_emitter_data/triggered_spray_emitter_update.h b/include/rnc/overlay/l05/mobys/triggered_spray_emitter_data/water_spout_update.h similarity index 76% rename from include/rnc/overlay/l05/mobys/triggered_spray_emitter_data/triggered_spray_emitter_update.h rename to include/rnc/overlay/l05/mobys/triggered_spray_emitter_data/water_spout_update.h index 29e442315f..78c2e701f9 100644 --- a/include/rnc/overlay/l05/mobys/triggered_spray_emitter_data/triggered_spray_emitter_update.h +++ b/include/rnc/overlay/l05/mobys/triggered_spray_emitter_data/water_spout_update.h @@ -1,5 +1,5 @@ -#ifndef LOMBYTE_RNC_OVERLAY_L05_MOBYS_TRIGGERED_PARTICLE_SPRAY_EMITTER_DATA_UPDATE_TRIGGERED_PARTICLE_SPRAY_EMITTER_H -#define LOMBYTE_RNC_OVERLAY_L05_MOBYS_TRIGGERED_PARTICLE_SPRAY_EMITTER_DATA_UPDATE_TRIGGERED_PARTICLE_SPRAY_EMITTER_H +#ifndef LOMBYTE_RNC_OVERLAY_L05_MOBYS_TRIGGERED_SPRAY_EMITTER_DATA_WATER_SPOUT_UPDATE_H +#define LOMBYTE_RNC_OVERLAY_L05_MOBYS_TRIGGERED_SPRAY_EMITTER_DATA_WATER_SPOUT_UPDATE_H #include "types.h" @@ -20,4 +20,4 @@ extern float spray_particle_count_limit_per_update_gp __asm__("D_L05_00161EB8") extern float spray_big_particle_selection_threshold_percent_gp __asm__("D_L05_00161EBC") __attribute__((sda)); -#endif /* LOMBYTE_RNC_OVERLAY_L05_MOBYS_TRIGGERED_PARTICLE_SPRAY_EMITTER_DATA_UPDATE_TRIGGERED_PARTICLE_SPRAY_EMITTER_H */ +#endif /* LOMBYTE_RNC_OVERLAY_L05_MOBYS_TRIGGERED_SPRAY_EMITTER_DATA_WATER_SPOUT_UPDATE_H */ diff --git a/src/overlays/l05/hero/hero_set_state.c b/src/overlays/l05/hero/hero_set_state.c index e41876e3fa..254efc58ce 100644 --- a/src/overlays/l05/hero/hero_set_state.c +++ b/src/overlays/l05/hero/hero_set_state.c @@ -1,5 +1,6 @@ /* Level 05 hero state setter: hero_set_state, which leaves the current hero state and enters the new one. */ #include "types.h" +#include "rnc/overlay/l05.h" #include "rnc/hero/hero_state.h" #include "rnc/hero/hero.h" #include "rnc/globals.h" @@ -36,7 +37,6 @@ struct HeroVelocityKey level05_hero_transform_trail_jump_velocity_keys [HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS_COUNT] __asm__("D_L05_0017C380") = HERO_TRANSFORM_TRAIL_JUMP_VELOCITY_KEYS; extern HeroTableRow2C D_L05_0017C088[]; -extern char *moby_pool_4f60 __asm__("D_L05_0015FFD8"); extern char *hero_slot_moby(int) __asm__("FUN_L00_0020d460"); extern float level05_hero_animation_blend_curves[][25] __asm__("D_L05_0017C250"); extern float get_hero_yaw_history(int back) __asm__("FUN_L00_0020d658"); @@ -515,7 +515,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { m = (char *)q->hoverboard_moby; fill_transfer_words(&q->smoothed_spin_stick, 0, 0x210); q->hoverboard_moby = (u8 *)m; - q->unk890 = (u8 *)moby_pool_4f60 + (*(int *)(*(char **)(m + 0x78) + 0x28) << 8); + q->unk890 = (u8 *)l05_moby_array + (*(int *)(*(char **)(m + 0x78) + 0x28) << 8); q->board_gravity = frame_time_sq * 22.0f; q->board_spring_angle = 1.2217305f; q->trick_hud_handle = -1; diff --git a/src/overlays/l05/level_class_tables.c b/src/overlays/l05/level_class_tables.c index 931a58f8b4..ee8c5d6da3 100644 --- a/src/overlays/l05/level_class_tables.c +++ b/src/overlays/l05/level_class_tables.c @@ -177,19 +177,19 @@ struct MobyClassUpdate moby_classes[154] __asm__("D_L05_00218C80") { 832, visibomb_zone_timer_update, default_moby_methods}, { 838, electric_gate_update, default_moby_methods}, { 841, fog_zone_update, default_moby_methods}, - { 843, triggered_slide_update, default_moby_methods}, + { 843, sliding_block_update, default_moby_methods}, { 844, drain_cover_update, default_moby_methods}, { 846, pipe_mounted_grating_update, default_moby_methods}, { 849, suckcannon_update, default_moby_methods}, { 852, rising_gate_update, default_moby_methods}, { 853, rising_gate_update, default_moby_methods}, - { 855, triggered_spray_emitter_update, default_moby_methods}, + { 855, water_spout_update, default_moby_methods}, { 865, large_amoeboid_update, default_moby_methods}, { 866, large_amoeboid_update, D_L05_00219400}, { 877, elevator_with_button_update, default_moby_methods}, { 879, ocean_rilgar_update, default_moby_methods}, - { 893, triggered_motion_update, default_moby_methods}, - { 895, triggered_moby_yaw_update, default_moby_methods}, + { 893, hinged_hatch_update, default_moby_methods}, + { 895, swinging_flap_update, default_moby_methods}, { 918, hoverboard_girl_update, default_moby_methods}, { 919, qwarks_bouncer_update, default_moby_methods}, { 920, qwark_rilgar_update, default_moby_methods}, diff --git a/src/overlays/l05/mobys/box.c b/src/overlays/l05/mobys/box.c index 8cd4e49ce1..84eff0aa02 100644 --- a/src/overlays/l05/mobys/box.c +++ b/src/overlays/l05/mobys/box.c @@ -1,13 +1,13 @@ /* Level 05 moby class box. */ #include "types.h" +#include "rnc/overlay/l05.h" #include "rnc/mobys/moby.h" #include "qcopy.h" #include "rnc/overlay/shared/game/unlock_planet.h" extern void fast_vec_sub(void *out, void *a, void *b) __asm__("FUN_001f9a28"); -extern char *D_L05_0015FFD8_c __asm__("D_L05_0015FFD8"); -extern void transform_attachment_pose(char *, char *, char *, char *, char *, char *) __asm__("FUN_L00_002604f0"); +extern void transform_attachment_pose(char *, char *, char *, char *, char *, char *) __asm__("FUN_L00_002604f0"); extern void FUN_L00_00260738_c(char *, float *, float *, char *) __asm__("FUN_L00_00260738"); void box_update(char *moby) __asm__("FUN_L05_0030bf98"); @@ -27,7 +27,8 @@ void box_update(char *moby) { *(int *)(moby_data + 0x5C) = 1; if (*(int *)(moby_data + 0x80) >= 0) { convert_pose_to_reference_local(moby, - D_L05_0015FFD8_c + (*(int *)(moby_data + 0x80) << 8), + (char *)l05_moby_array + + (*(int *)(moby_data + 0x80) << 8), moby + 0x10, moby + 0x40, moby_data + 0x60, @@ -39,7 +40,7 @@ void box_update(char *moby) { qcopy(previous_position, moby + 0x10); qcopy(previous_rotation, moby + 0x40); transform_attachment_pose(moby, - D_L05_0015FFD8_c + (*(int *)(moby_data + 0x80) << 8), + (char *)l05_moby_array + (*(int *)(moby_data + 0x80) << 8), moby_data + 0x60, moby_data + 0x70, moby + 0x10, diff --git a/src/overlays/l05/mobys/electric_gate.c b/src/overlays/l05/mobys/electric_gate.c index ed09361d92..0c6dfba5b4 100644 --- a/src/overlays/l05/mobys/electric_gate.c +++ b/src/overlays/l05/mobys/electric_gate.c @@ -1,5 +1,6 @@ /* Level 05 moby class electric_gate and its beams. */ #include "types.h" +#include "rnc/overlay/l05.h" #include "qcopy.h" #include "rnc/mobys/moby.h" #include "rnc/rendering/geometry_quad.h" @@ -11,12 +12,11 @@ /* Ported from rac1-decomp (src/overlays/l05_rilgar/vendor_0030EB68.c: func_L05_0030F130), where it is exact; names translated to the US level program. */ -extern char D_0013E550[]; -extern char D_L05_001671C0[]; -extern int D_L05_0015F5CC_e[] __asm__("D_L05_0015F5C4") MACRO_ADDR; -extern int allocate_voice_for_target_entry() __asm__("FUN_0022da68"); -extern short D_L05_0015FFD8_d __asm__("D_L05_0015FFD8"); -extern void draw_electric_gate_beams(struct Moby *moby) __asm__("FUN_L05_0030de90"); +extern char D_0013E550[]; +extern char D_L05_001671C0[]; +extern int D_L05_0015F5CC_e[] __asm__("D_L05_0015F5C4") MACRO_ADDR; +extern int allocate_voice_for_target_entry() __asm__("FUN_0022da68"); +extern void draw_electric_gate_beams(struct Moby *moby) __asm__("FUN_L05_0030de90"); extern short electric_gate_beam_callback_frame_gp __asm__("D_L05_00161D38") __attribute__((sda)); void electric_gate_update(char *m) __asm__("FUN_L05_0030dc68"); @@ -84,8 +84,7 @@ void electric_gate_update(char *gate_moby) { } after: if (*(int *)electric_gate_vars >= 0) { - if ((*(unsigned char **)&D_L05_0015FFD8_d)[*(int *)electric_gate_vars * 256 + 0xBC] != - 0) { + if (((unsigned char *)l05_moby_array)[*(int *)electric_gate_vars * 256 + 0xBC] != 0) { allocate_voice_for_target_entry(1, 0, gate_moby); MOBY(gate_moby)->collision = 0; MOBY(gate_moby)->state = ELECTRIC_GATE_TRIGGERED; @@ -172,12 +171,12 @@ void draw_electric_gate_beams(struct Moby *moby) { do { char *listed_moby; offset = (*list & 0x7FFF) << 8; - listed_moby = (char *)(offset + (int)*(char **)&D_L05_0015FFD8_d); + listed_moby = (char *)(offset + (int)l05_moby_array); next_moby_index_ptr = list + 1; if (*(short *)(listed_moby + 0xA6) == 0x346 && *(unsigned char *)(listed_moby + 0x20) == 1) { copy_matrix_rotation(matrix, listed_moby + 0xC0); - qcopy(matrix + 0x30, (char *)(offset + (int)*(char **)&D_L05_0015FFD8_d) + 0x10); + qcopy(matrix + 0x30, (char *)(offset + (int)l05_moby_array) + 0x10); *(float *)(matrix + 0x3C) = 1.0f; for (k = 0; k < 5; k++) { draw_geometry_quad(&quads[0][k], matrix, 0); diff --git a/src/overlays/l05/mobys/extermibot.c b/src/overlays/l05/mobys/extermibot.c index 68edb4c317..ee1f72c703 100644 --- a/src/overlays/l05/mobys/extermibot.c +++ b/src/overlays/l05/mobys/extermibot.c @@ -1,5 +1,6 @@ /* Level 05 moby class extermibot. */ #include "types.h" +#include "rnc/overlay/l05.h" #include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/overlay/shared/world/level_path.h" #include "rnc/globals.h" @@ -61,7 +62,6 @@ extern f32 approach_value(f32 *, f32, f32) __asm__("FUN_00213ed8"); extern float FUN_L04_001f1978(float); extern float fast_difference_between_rotations(float, float) __asm__("FUN_001fa688"); extern float fast_vec_dist(void *, void *); -extern int D_L05_0015FFD8; extern int D_L05_0015F5C4; extern int step_moby_motion(void *, void *) __asm__("FUN_L00_0025c698"); extern int path_8808(int, void *, void *, void *) __asm__("FUN_L00_00261b48"); @@ -369,8 +369,8 @@ void extermibot_update(unsigned char *moby) { break; case EXTERMIBOT_WAIT_FOR_ACTIVATION_TRIGGER: if ((moby_data->activation_moby_index != -1 && - ((unsigned char *)*( - int *)&D_L05_0015FFD8)[moby_data->activation_moby_index * 256 + 0xBC] != 0) || + ((unsigned char *)l05_moby_array)[moby_data->activation_moby_index * 256 + 0xBC] != + 0) || (moby_data->activation_clip_volume_index != -1 && is_point_inside_clip_volume(((char *)D_0013F3D0), moby_data->activation_clip_volume_index) != 0)) { @@ -1068,10 +1068,7 @@ int test_extermibot_offset_path_clearance(char *moby, float *goal, float probe_o moby_data->path, probe_position, offset_probe_position) == 0; } -extern struct Moby *D_L05_0015FFD8_7920 __asm__("D_L05_0015FFD8"); - extern short *D_L05_001AC040_03f80[] __asm__("D_L05_001ABCC0"); -extern short D_L05_00160098_03f80 __asm__("D_L05_0015FFD8"); char *find_nearest_extermibot_group_target(char *self, int group_index) __asm__("FUN_L05_00303f80"); char *find_nearest_extermibot_group_target(char *search_origin_moby, int group_index) { @@ -1084,13 +1081,13 @@ char *find_nearest_extermibot_group_target(char *search_origin_moby, int group_i { do { int i = *(unsigned short *)list & 0x7FFF; - if (D_L05_0015FFD8_7920[i].flags & 0x1000) { - if (D_L05_0015FFD8_7920[i].state < 0x7F) { + if (l05_moby_array[i].flags & 0x1000) { + if (l05_moby_array[i].state < 0x7F) { float candidate_distance = - fast_vec_dist(&D_L05_0015FFD8_7920[i].pos, search_origin_moby + 0x10); + fast_vec_dist(&l05_moby_array[i].pos, search_origin_moby + 0x10); if (candidate_distance < best) { best = candidate_distance; - nearest_moby = *(char **)&D_L05_00160098_03f80 + (i << 8); + nearest_moby = (char *)l05_moby_array + (i << 8); } } } diff --git a/src/overlays/l05/mobys/extermitank.c b/src/overlays/l05/mobys/extermitank.c index 9811ec9953..ef82e595db 100644 --- a/src/overlays/l05/mobys/extermitank.c +++ b/src/overlays/l05/mobys/extermitank.c @@ -109,7 +109,7 @@ typedef struct ExtermitankVars { u8 pad_2F[0x9]; s32 retimer; u8 pad_3C[0x2]; - u16 unk3E; + u16 target_flags; /* 0x3E: MobyTargetInfo.flags; target info at pvars+0x20 */ f32 velocity[4]; u8 pad_50[0x8]; u8 look_range; @@ -226,7 +226,7 @@ void extermitank_update(unsigned char *moby) { blend_moby_animation(moby, 0, 0, 0); extermitank_vars->mover.max_speed = D_L05_00161AF8 * D_0015ED6C_gp; clear_u64_value(extermitank_vars->velocity); - extermitank_vars->unk3E |= 2; + extermitank_vars->target_flags |= 2; extermitank_vars->lifecycle_state = 1; extermitank_vars->wrench_hit_sound = 0; extermitank_vars->max_health = 6; diff --git a/src/overlays/l05/mobys/help_hints.c b/src/overlays/l05/mobys/help_hints.c index 651b6564a8..2de49ea013 100644 --- a/src/overlays/l05/mobys/help_hints.c +++ b/src/overlays/l05/mobys/help_hints.c @@ -1,5 +1,6 @@ /* Level 05 moby class help_hints (0x543): plays the Rilgar help messages and records the usage stats they depend on. */ #include "types.h" +#include "rnc/overlay/l05.h" #include "qcopy.h" #include "sda.h" #include "rnc/hero/hero.h" @@ -16,7 +17,7 @@ extern char D_0013F3D0[]; extern int camera_secondary_mode_lui __asm__("D_001413D4") NOT_SDA, D_001413DC NOT_SDA, D_0013D464 NOT_SDA; extern unsigned char menu_item_enabled_1 __asm__("D_0013D395"), D_0013D4D6, D_0013D388, D_0013D4CF; -extern int frame_number __asm__("D_L05_0015F5CC"), D_L05_0015FFD8; +extern int frame_number __asm__("D_L05_0015F5CC"); extern int D_001417E0[]; extern int D_0014EE90[]; extern unsigned char D_0014C050[]; @@ -200,7 +201,7 @@ void help_hints_update(struct Moby *moby) { D_0014C050[gameplay_event_pvars[8] + gameplay_event_level_index * 16] == 0xff && (frame_number < 5 || (D_0013F64C && (*(short *)(D_0013F64C + 0xa6) == 0x3e6 || *(short *)(D_0013F64C + 0xa6) == 0x33e)))) { - collect_moby_and_clear_path_keys((void *)(D_L05_0015FFD8 + value * 256)); + collect_moby_and_clear_path_keys((void *)((int)l05_moby_array + value * 256)); gameplay_event_pvars[21] = -1; } qcopy(gameplay_event_pvars, D_0013F3D0); diff --git a/src/overlays/l05/mobys/rising_gate.c b/src/overlays/l05/mobys/rising_gate.c index 70b914c2da..63d8de85ae 100644 --- a/src/overlays/l05/mobys/rising_gate.c +++ b/src/overlays/l05/mobys/rising_gate.c @@ -1,5 +1,6 @@ /* Level 05 moby class rising_gate (0x354, 0x355): once its trigger moby fires, rises to its top height and swings back to yaw 0, with a sound per class. */ #include "types.h" +#include "rnc/overlay/l05.h" #include "rnc/overlay/l05/mobys/rising_gate_globals.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -9,7 +10,7 @@ extern int allocate_voice_for_target_entry() __asm__("FUN_0022da68"); struct GateVars { - s32 trigger; /* D_L05_0015FFD8 index of the moby whose byte 0xBC opens it */ + s32 trigger; /* l05_moby_array index of the moby whose byte 0xBC opens it */ s32 riseTimer; s32 swingTimer; f32 topZ; @@ -17,13 +18,12 @@ struct GateVars { f32 swingSpeed; }; -float gate_rise_acceleration_gp __asm__("D_L05_00161E80") = 5e+01f; -float gate_rise_deceleration_gp __asm__("D_L05_00161E84") = 1e+01f; -float gate_rise_max_speed_gp __asm__("D_L05_00161E88") = 18.0f; -float gate_swing_acceleration_gp __asm__("D_L05_00161E8C") = 3.6e+02f; -float gate_swing_deceleration_gp __asm__("D_L05_00161E90") = 3.6e+02f; -float gate_swing_max_speed_gp __asm__("D_L05_00161E94") = 1.44e+03f; -extern int gate_mobys_314eb0 __asm__("D_L05_0015FFD8"); +float gate_rise_acceleration_gp __asm__("D_L05_00161E80") = 5e+01f; +float gate_rise_deceleration_gp __asm__("D_L05_00161E84") = 1e+01f; +float gate_rise_max_speed_gp __asm__("D_L05_00161E88") = 18.0f; +float gate_swing_acceleration_gp __asm__("D_L05_00161E8C") = 3.6e+02f; +float gate_swing_deceleration_gp __asm__("D_L05_00161E90") = 3.6e+02f; +float gate_swing_max_speed_gp __asm__("D_L05_00161E94") = 1.44e+03f; extern float advance_accelerated_scalar(float, float, float, float, float *, float *) __asm__("FUN_00213f38"); extern float @@ -52,7 +52,7 @@ void rising_gate_update(struct Moby *gate_moby) { gate_moby->pos.z -= 8.0f; break; case GATE_WAIT_FOR_TRIGGER: - trigger_moby = (struct Moby *)((gate_vars->trigger << 8) + gate_mobys_314eb0); + trigger_moby = (struct Moby *)((gate_vars->trigger << 8) + (int)l05_moby_array); if (trigger_moby->command == 1) { gate_moby->state = GATE_RAISE_AND_SWING; break; diff --git a/src/overlays/l05/mobys/scenery_ship.c b/src/overlays/l05/mobys/scenery_ship.c index fd855906d8..c33d5d6c27 100644 --- a/src/overlays/l05/mobys/scenery_ship.c +++ b/src/overlays/l05/mobys/scenery_ship.c @@ -1,5 +1,6 @@ /* Level 05 moby class scenery_ship: ships flying a path, with glow quads and trails. */ #include "types.h" +#include "rnc/overlay/l05.h" #include "rnc/overlay/shared/world/level_path.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" @@ -404,7 +405,6 @@ int l05_scenery_ship_trail_blend_d_selector __asm__("D_L05_0016 int l05_scenery_ship_trail_fade_start_color __asm__("D_L05_00161408") = 0x40806060; int l05_scenery_ship_trail_fade_end_color __asm__("D_L05_0016140C") = 0x802020; extern unsigned char l05_scenery_ship_extended_trail_selector __asm__("D_L05_0015EDB2"); -extern struct Moby *D_L05_0015FFD8 __asm__("D_L05_0015FFD8"); extern short *D_L05_001ABCC0_7920[] __asm__("D_L05_001ABCC0"); float D_L05_001CDD70[4][2] = { @@ -471,7 +471,7 @@ void draw_group_scenery_ship_trails(struct Moby *moby) { matrix[6] = -0.15f; list = D_L05_001ABCC0_7920[(unsigned char)((char)moby->group)]; do { - member = (struct Moby *)(((*list & 0x7fff) << 8) + (int)D_L05_0015FFD8); + member = (struct Moby *)(((*list & 0x7fff) << 8) + (int)l05_moby_array); if (member->oclass == 0x4f && member->state == SCENERY_SHIP_FOLLOW_PATH) { scenery_ship_vars = (char *)member->pvars; qcopy_nc(center, &member->pos); diff --git a/src/overlays/l05/mobys/triggered_moby_yaw.c b/src/overlays/l05/mobys/triggered_moby_yaw.c index e8e271dcbd..ca99fb9db6 100644 --- a/src/overlays/l05/mobys/triggered_moby_yaw.c +++ b/src/overlays/l05/mobys/triggered_moby_yaw.c @@ -1,19 +1,19 @@ -/* Level 05 moby class that turns when triggered. */ +/* Level 05 swinging flap (class 895): turns away from its placed yaw, then swings back once its linked moby gets a command. */ #include "types.h" +#include "rnc/overlay/l05.h" #include "rnc/globals.h" #include "rnc/mobys/moby.h" -extern int allocate_voice_for_target_entry() __asm__("FUN_0022da68"); -extern short D_L05_0015FFD8 __asm__("D_L05_0015FFD8"); +extern int allocate_voice_for_target_entry() __asm__("FUN_0022da68"); extern float approach_angle(float *, float, float *, float, float, float) __asm__("FUN_L00_0025be00"); -void triggered_moby_yaw_update(struct Moby *moby) __asm__("FUN_L05_003166a0"); +void swinging_flap_update(struct Moby *moby) __asm__("FUN_L05_003166a0"); extern float fast_add_rotations(float, float); extern float fast_subtract_rotations(float, float); /* Moby class 895 */ -void triggered_moby_yaw_update(struct Moby *moby) { +void swinging_flap_update(struct Moby *moby) { enum { MOBY_INITIALIZE_YAW = 0, MOBY_WAIT_FOR_TRIGGER = 1, @@ -33,7 +33,7 @@ void triggered_moby_yaw_update(struct Moby *moby) { moby->rot.z = fast_add_rotations(moby->rot.z, 1.5707964f); /* fall through */ case MOBY_WAIT_FOR_TRIGGER: - if (((unsigned char *)*(int *)&D_L05_0015FFD8)[yaw_control_vars[2] * 256 + 0xBC] != 0) { + if (((unsigned char *)l05_moby_array)[yaw_control_vars[2] * 256 + 0xBC] != 0) { allocate_voice_for_target_entry(0, 0, moby); moby->state = MOBY_APPROACH_SAVED_YAW_OFFSET; } diff --git a/src/overlays/l05/mobys/triggered_motion.c b/src/overlays/l05/mobys/triggered_motion.c index c625faebd5..95f81a6217 100644 --- a/src/overlays/l05/mobys/triggered_motion.c +++ b/src/overlays/l05/mobys/triggered_motion.c @@ -1,5 +1,6 @@ -/* Level 05 moby class that moves and turns a manipulator when triggered. */ +/* Level 05 hinged hatch (class 893): a manipulator turns its lid, which falls shut or swings open and slides once its linked moby gets a command. */ #include "types.h" +#include "rnc/overlay/l05.h" #include "rnc/globals.h" #include "qcopy.h" #include "rnc/mobys/moby.h" @@ -8,8 +9,7 @@ #include "sda.h" #include "rnc/mobys/attach_manipulator.h" -extern int allocate_voice_for_target_entry() __asm__("FUN_0022da68"); -extern short D_L05_0015FFD8 __asm__("D_L05_0015FFD8"); +extern int allocate_voice_for_target_entry() __asm__("FUN_0022da68"); extern float advance_accelerated_scalar(float, float, float, float, float *, float *) __asm__("FUN_00213f38"); extern float @@ -18,7 +18,7 @@ approach_angle(float *, float *, float, float, float, float) __asm__("FUN_L00_00 extern void build_axis_rotation_quaternion(void *, int, float) __asm__("FUN_L00_001fff28"); extern char *D_001413D0_lui __asm__("D_001413D0") NOT_SDA; -void triggered_motion_update(char *moby) __asm__("FUN_L05_00316258"); +void hinged_hatch_update(char *moby) __asm__("FUN_L05_00316258"); typedef struct TriggeredMotionVars { u8 pad_0[0x10]; @@ -35,7 +35,7 @@ typedef struct TriggeredMotionVars { } TriggeredMotionVars; /* Moby class 893 */ -void triggered_motion_update(char *moby) { +void hinged_hatch_update(char *moby) { enum { MOBY_INITIALIZE = 0, MOBY_WAIT_FOR_TRIGGER = 1, @@ -79,8 +79,7 @@ void triggered_motion_update(char *moby) { break; case MOBY_WAIT_FOR_TRIGGER: case MOBY_WAIT_TO_RETURN_TO_SAVED_POSITION: { - u8 trigger = - ((u8 *)*(int *)&D_L05_0015FFD8)[motion_and_manipulator_vars->trigger_moby * 256 + 0xBC]; + u8 trigger = ((u8 *)l05_moby_array)[motion_and_manipulator_vars->trigger_moby * 256 + 0xBC]; if (trigger == 0) return; if (MOBY(moby)->state == MOBY_WAIT_TO_RETURN_TO_SAVED_POSITION && trigger != 2) { diff --git a/src/overlays/l05/mobys/triggered_slide.c b/src/overlays/l05/mobys/triggered_slide.c index 0443012e24..c3ba0bdafb 100644 --- a/src/overlays/l05/mobys/triggered_slide.c +++ b/src/overlays/l05/mobys/triggered_slide.c @@ -1,5 +1,6 @@ -/* Level 05 moby class that slides and lowers when triggered. */ +/* Level 05 sliding block (class 843): slides out along its cuboid and lowers once its linked moby gets a command. */ #include "types.h" +#include "rnc/overlay/l05.h" #include "rnc/globals.h" #include "qcopy.h" #include "rnc/mobys/moby.h" @@ -7,16 +8,15 @@ #include "rnc/math/asm_helpers.h" #include "rnc/overlay/shared/world/cuboid.h" -extern int allocate_voice_for_target_entry() __asm__("FUN_0022da68"); -extern short D_L05_0015FFD8; +extern int allocate_voice_for_target_entry() __asm__("FUN_0022da68"); extern float advance_accelerated_scalar(float, float, float, float, float *, float *) __asm__("FUN_00213f38"); /* Slides the moby out along its pose-table entry's direction: 0 places it, - 1 waits for the trigger byte 0xBC of its D_L05_0015FFD8 record, 2 eases + 1 waits for the trigger byte 0xBC (command) of its l05_moby_array record, 2 eases it toward the end point, 3 lowers it to 5.9 below the entry's height. */ -void triggered_slide_update(char *moby) __asm__("FUN_L05_0030e508"); +void sliding_block_update(char *moby) __asm__("FUN_L05_0030e508"); typedef struct TriggeredSlideVars { u8 pad_0[0x8]; @@ -29,7 +29,7 @@ typedef struct TriggeredSlideVars { } TriggeredSlideVars; /* Moby class 843 */ -void triggered_slide_update(char *moby) { +void sliding_block_update(char *moby) { enum { MOBY_PLACE_AT_POSE_OFFSET = 0, MOBY_WAIT_FOR_TRIGGER = 1, @@ -66,8 +66,8 @@ void triggered_slide_update(char *moby) { break; } case MOBY_WAIT_FOR_TRIGGER: - if ((*(unsigned char **)&D_L05_0015FFD8)[slide_and_lowering_vars->trigger_moby * 256 + - 0xBC] != 0) { + if (((unsigned char *)l05_moby_array)[slide_and_lowering_vars->trigger_moby * 256 + 0xBC] != + 0) { allocate_voice_for_target_entry(0, 0, moby); MOBY(moby)->state = MOBY_SLIDE_TO_END_POINT; clear_u64_value(slide_and_lowering_vars); diff --git a/src/overlays/l05/mobys/triggered_spray_emitter.c b/src/overlays/l05/mobys/triggered_spray_emitter.c index fa22a1b1e1..10737ed7d6 100644 --- a/src/overlays/l05/mobys/triggered_spray_emitter.c +++ b/src/overlays/l05/mobys/triggered_spray_emitter.c @@ -1,5 +1,6 @@ -/* Level 05 moby class for a particle spray emitter that runs when triggered. */ +/* Level 05 water spout (class 855): a particle spray emitter that runs once its linked moby gets a command. */ #include "types.h" +#include "rnc/overlay/l05.h" #include "rnc/globals.h" #include "qcopy.h" #include "rnc/mobys/moby.h" @@ -12,12 +13,12 @@ extern char D_0013E550[]; extern char D_L05_001671C0[]; extern int allocate_voice_for_target_entry() __asm__("FUN_0022da68"); -/* pvars of the 0x357 emitter: once woken it sprays particles along its facing (unkC0) that fall to the +/* pvars of the 0x357 emitter: once woken it sprays particles along its facing (rot_row0) that fall to the floor height of its D_L05_001612D0 row and splash there, and keeps the shared voice at the emitter nearest D_L05_001671C0. */ struct EmitterVars { s32 unk0; s32 floor; /* row of D_L05_001612D0 */ - s32 trigger; /* D_L05_0015FFD8 index of the moby whose byte 0xBC wakes it, -1: none */ + s32 trigger; /* l05_moby_array index of the moby whose byte 0xBC wakes it, -1: none */ s32 *voice; /* voice slot shared by the emitters, -1: none */ s32 age; /* frames since it started spraying */ }; @@ -42,16 +43,15 @@ extern void create_particle_with_velocity_and_randomized_parameters( float, float, float, void *, void *, int, int) __asm__("FUN_L05_0029be70"); extern void spawn_splash(float, float, void *, void *, void *) __asm__("FUN_L00_002718d0"); extern unsigned char D_0014C050[][16]; -extern struct Moby *D_L05_0015FFD8; extern struct FloorRow *D_L05_001612D0; extern char D_L05_0015F580_macro[] __asm__("D_L05_0015F580") MACRO_ADDR; -#include "rnc/overlay/l05/mobys/triggered_spray_emitter_data/triggered_spray_emitter_update.h" +#include "rnc/overlay/l05/mobys/triggered_spray_emitter_data/water_spout_update.h" -void triggered_spray_emitter_update(struct Moby *emitter_moby) __asm__("FUN_L05_003150f0"); +void water_spout_update(struct Moby *emitter_moby) __asm__("FUN_L05_003150f0"); /* Moby class 855 */ -void triggered_spray_emitter_update(struct Moby *emitter_moby) { +void water_spout_update(struct Moby *emitter_moby) { enum { EMITTER_INITIALIZE = 0, EMITTER_WAIT_FOR_TRIGGER = 1, @@ -85,7 +85,7 @@ void triggered_spray_emitter_update(struct Moby *emitter_moby) { } break; case EMITTER_WAIT_FOR_TRIGGER: - if (emitter_vars->trigger >= 0 && D_L05_0015FFD8[emitter_vars->trigger].command != 0) { + if (emitter_vars->trigger >= 0 && l05_moby_array[emitter_vars->trigger].command != 0) { set_moby_list_state(emitter_moby->group, 2); } break; diff --git a/src/overlays/l05/mobys/water.c b/src/overlays/l05/mobys/water.c index e49f54ae30..03be0e6790 100644 --- a/src/overlays/l05/mobys/water.c +++ b/src/overlays/l05/mobys/water.c @@ -384,7 +384,6 @@ void water_update(struct Moby *moby) { } } -extern int D_L05_0015FFD8; /* Ported from rac1-decomp (src/overlays/l05_rilgar/vendor_002D28D0.c: func_L05_0030EA88), where it is exact; names translated to the US level program. */ extern short *D_L05_001ABCC0[]; @@ -392,7 +391,7 @@ extern short *D_L05_001ABCC0[]; void synchronize_group_water_heights(char *moby) { char *source_water_vars = ((char *)MOBY(moby)->pvars); short *group_member_list = D_L05_001ABCC0[MOBY(moby)->group]; - char(*base)[256] = (char(*)[256])D_L05_0015FFD8; + char(*base)[256] = (char(*)[256])l05_moby_array; do { int group_member_moby_index = *group_member_list & 0x7FFF; char *linked_water_moby = (char *)(group_member_moby_index * 256 + (int)base); From a20aaab39a7c145d4ff0af52f0ad0f3587768579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:44:47 +0000 Subject: [PATCH 164/213] decomp: name the l00 flock part fields, robot stun timer and clank door dialogue entry --- .../l00/mobys/clank_cutscene_trigger.c | 6 ++--- src/overlays/l00/mobys/cutscene_effects.c | 22 +++++++++---------- src/overlays/l00/mobys/veldin_robot_enemy.c | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/overlays/l00/mobys/clank_cutscene_trigger.c b/src/overlays/l00/mobys/clank_cutscene_trigger.c index a56aea5bf9..155c74ddbf 100644 --- a/src/overlays/l00/mobys/clank_cutscene_trigger.c +++ b/src/overlays/l00/mobys/clank_cutscene_trigger.c @@ -272,7 +272,7 @@ typedef struct { u8 pad26[6]; f32 talk_range; u8 pad30[0x26]; - s16 unk56; + s16 talk_entry; /* 0x56: talk + 0x36, current dialogue entry of update_npc_dialogue */ u8 pad58[8]; s32 talk_volume; /* talk_range is 16 while the hero is inside */ } DoorVars; @@ -316,7 +316,7 @@ void clank_cutscene_trigger_update(DoorMoby *moby) { D_00141628[0] = 1; initialize_npc_dialogue(moby, vars->talk); if (alternate_item_available[8] != 0) { - vars->unk56 = 1; + vars->talk_entry = 1; vars->talk_range = 3.0f; vars->talk_mode = 0; } else { @@ -327,7 +327,7 @@ void clank_cutscene_trigger_update(DoorMoby *moby) { moby->state = CLANK_TRIGGER_POLL_DIALOGUE; break; case CLANK_TRIGGER_POLL_DIALOGUE: - if (vars->unk56 != 0) { + if (vars->talk_entry != 0) { if (is_point_inside_clip_volume((s32)(&hero.motion.pos), vars->talk_volume) != 0) { vars->talk_range = 16.0f; } else { diff --git a/src/overlays/l00/mobys/cutscene_effects.c b/src/overlays/l00/mobys/cutscene_effects.c index b687a96f78..63db2afce4 100644 --- a/src/overlays/l00/mobys/cutscene_effects.c +++ b/src/overlays/l00/mobys/cutscene_effects.c @@ -12,7 +12,7 @@ typedef struct { u8 pad0[0x20]; u8 state; u8 pad21[0xF]; - u8 unk30; + u8 update_dist; /* 0x30: struct Moby update_dist */ } FlockMoby; typedef struct { @@ -27,17 +27,17 @@ typedef struct { u8 pad0[4]; s32 unk4; u8 pad8[2]; - u8 unkA; + u8 alpha; /* 0x0A: alpha of the spark colour */ u8 initial_duration_frames; } FlockTail; typedef struct { u8 pad0[3]; - u8 unk3; + u8 blend; /* 0x03: as EffectParticle */ u8 pad4[4]; - u8 unk8; + u8 spin; u8 pad9; - s16 unkA; + s16 life; u8 padC[0x20 - 0xC]; FlockTail tail; } FlockPart; @@ -69,7 +69,7 @@ void phase_effect_controller_update(FlockMoby *moby) { switch (moby->state) { case FLOCK_EFFECT_STATE_INITIALIZE: - moby->unk30 = 0xFF; + moby->update_dist = 0xFF; moby->state = FLOCK_EFFECT_STATE_PROCESS_PHASE_EFFECTS; break; case FLOCK_EFFECT_STATE_PROCESS_PHASE_EFFECTS: @@ -108,13 +108,13 @@ void phase_effect_controller_update(FlockMoby *moby) { 1.03f, 120000.0f); if (part != 0) { - part->unk3 = 0x44; + part->blend = 0x44; tail = &part->tail; - part->unk8 = random_int_between(0, 0xFF); - part->unkA = scale_game_frames_s32(60); + part->spin = random_int_between(0, 0xFF); + part->life = scale_game_frames_s32(60); tail->unk4 = 2; - tail->unkA = color >> 24; - tail->initial_duration_frames = part->unkA; + tail->alpha = color >> 24; + tail->initial_duration_frames = part->life; } } } diff --git a/src/overlays/l00/mobys/veldin_robot_enemy.c b/src/overlays/l00/mobys/veldin_robot_enemy.c index 4133406716..dcb0222abf 100644 --- a/src/overlays/l00/mobys/veldin_robot_enemy.c +++ b/src/overlays/l00/mobys/veldin_robot_enemy.c @@ -56,7 +56,7 @@ typedef struct { u8 pad0[0x20]; f32 health; s16 max_health; - s16 unk26; + s16 stun_timer; u8 hit_response_class; u8 wrench_hit_sound; u8 pad2A[0x38 - 0x2A]; @@ -498,7 +498,7 @@ void update_veldin_robot_damage_and_targeting(ElectroidMoby *moby) { vars->knockback.landing_animation_frame = vars->knockback.apex_animation_frame = -1.0f; moby->state = VELDIN_ROBOT_STATE_DAMAGE_KNOCKBACK; vars->damage_secondary_red = 0xFA; - vars->unk26 = scale_game_frames(0x3C); + vars->stun_timer = scale_game_frames(0x3C); start_hit_color_flash(moby, anim); } release_beam_slot_by_id(moby); From 0498e3ea35641d16229c6379777aec117ae7c415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:44:47 +0000 Subject: [PATCH 165/213] decomp: name the l03 talk record dialogue entry after update_npc_dialogue --- include/rnc/overlay/l03/mobys/npc_dialogue_state.h | 2 +- src/overlays/l03/mobys/big_al.c | 4 ++-- src/overlays/l03/mobys/helga.c | 2 +- src/overlays/l03/mobys/robot_qwark.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/rnc/overlay/l03/mobys/npc_dialogue_state.h b/include/rnc/overlay/l03/mobys/npc_dialogue_state.h index d58f3b01b1..9450c71024 100644 --- a/include/rnc/overlay/l03/mobys/npc_dialogue_state.h +++ b/include/rnc/overlay/l03/mobys/npc_dialogue_state.h @@ -11,7 +11,7 @@ struct TalkState { u8 pad6[0x1A]; void *script; /* 0x20 */ u8 pad24[0x12]; - s16 unk36; + s16 entry; /* 0x36: current dialogue entry of update_npc_dialogue, -1 none */ u8 pad38[0x10]; s32 unk48; s32 warp; /* 0x4C: index into l03_cuboids, -1 for none */ diff --git a/src/overlays/l03/mobys/big_al.c b/src/overlays/l03/mobys/big_al.c index 1ab225a5a2..13d9a03510 100644 --- a/src/overlays/l03/mobys/big_al.c +++ b/src/overlays/l03/mobys/big_al.c @@ -38,7 +38,7 @@ struct TalkRecord { u8 pad0[4]; s16 mode; /* 0x04: 2 when the talk was accepted */ u8 pad6[0x30]; - s16 unk36; + s16 entry; /* 0x36: current dialogue entry of update_npc_dialogue, -1 none */ u8 pad38[8]; }; @@ -121,7 +121,7 @@ void big_al_update(struct Moby *guide_moby) { initialize_npc_dialogue(guide_moby, (struct TalkState *)&v->talk); initialize_moby_grounding(guide_moby); if (D_0013D4C2[0] != 0) { - v->talk.unk36 = -1; + v->talk.entry = -1; } break; case BIG_AL_UPDATE_DIALOGUE: diff --git a/src/overlays/l03/mobys/helga.c b/src/overlays/l03/mobys/helga.c index 81588f181c..199bd82b7b 100644 --- a/src/overlays/l03/mobys/helga.c +++ b/src/overlays/l03/mobys/helga.c @@ -251,7 +251,7 @@ void helga_update(struct Moby *helga_moby) { mark_moby_for_removal(helga_moby); return; } - } else if (helga_vars->talk.unk36 == 2 && helga_vars->link != -1) { + } else if (helga_vars->talk.entry == 2 && helga_vars->link != -1) { helper_moby = (struct Moby *)((helga_vars->link << 8) + (s32)D_L03_0015FFD8); if (helper_moby->oclass == 0x3F4) { u8 *tv = helper_moby->pvars; diff --git a/src/overlays/l03/mobys/robot_qwark.c b/src/overlays/l03/mobys/robot_qwark.c index 95a571d6f6..2419e37176 100644 --- a/src/overlays/l03/mobys/robot_qwark.c +++ b/src/overlays/l03/mobys/robot_qwark.c @@ -26,7 +26,7 @@ struct TalkerVars { u8 pad0[4]; s16 mode; /* 0x04: 2 when the talk ends in a warp */ u8 pad6[0x30]; - s16 unk36; + s16 entry; /* 0x36: current dialogue entry of update_npc_dialogue, -1 none */ u8 pad38[0x14]; s32 warp; /* 0x4C: index into l03_cuboids, -1 for none */ }; @@ -154,7 +154,7 @@ void robot_qwark_update(struct Moby *robot_qwark_moby) { talker_init(robot_qwark_moby, dialogue_state); if (alternate_item_available[0x19] != 0) { dialogue_state->mode = 1; - dialogue_state->unk36 = 2; + dialogue_state->entry = 2; } break; case ROBOT_QWARK_UPDATE_DIALOGUE: From 87f9aa5073573148090bb754d3177fbde10cac17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:44:47 +0000 Subject: [PATCH 166/213] decomp: name the l10 platform target info fields and blarg ship stun timer --- src/overlays/l10/mobys/blarg_ship.c | 4 ++-- src/overlays/l10/mobys/cycling_platform.c | 16 ++++++++-------- src/overlays/l10/mobys/sinking_platform.c | 16 ++++++++-------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/overlays/l10/mobys/blarg_ship.c b/src/overlays/l10/mobys/blarg_ship.c index 4a8db9b95f..8b0b5f5506 100644 --- a/src/overlays/l10/mobys/blarg_ship.c +++ b/src/overlays/l10/mobys/blarg_ship.c @@ -513,7 +513,7 @@ typedef struct BlargShipVars { u8 pad_0[0x20]; f32 health; u8 pad_24[0x2]; - s16 unk26; + s16 stun_timer; u8 pad_28[0x98]; struct HitColorFlash hit_flash; u8 path_search_point; @@ -564,7 +564,7 @@ void update_blarg_ship_hit_reactions_and_targeting(struct Moby *moby) { break; default: pvars->hit_flash.flash_red = 0xFA; - pvars->unk26 = scale_game_frames(0x3C); + pvars->stun_timer = scale_game_frames(0x3C); start_hit_color_flash(moby, &pvars->hit_flash); blend_moby_animation(moby, 4, 0, scale_game_frames(6)); moby->command = moby->state; diff --git a/src/overlays/l10/mobys/cycling_platform.c b/src/overlays/l10/mobys/cycling_platform.c index 038a2be527..628ef69940 100644 --- a/src/overlays/l10/mobys/cycling_platform.c +++ b/src/overlays/l10/mobys/cycling_platform.c @@ -19,12 +19,12 @@ extern f32 scale_time(f32) __asm__("FUN_001f96b0"); typedef struct CyclingPlatformVars { u8 pad_0[0x20]; - s32 unk20; - s16 unk24; + s32 health; + s16 max_health; u8 pad_26[0x2]; - s8 unk28; + s8 hit_weight; u8 pad_29[0x15]; - s16 unk3E; + s16 target_flags; /* 0x3E: MobyTargetInfo.flags; target info at pvars+0x20 */ u8 pad_40[0x60]; f32 home_position[4]; s32 timer_B0; @@ -49,10 +49,10 @@ void cycling_platform_update(char *platform_moby) { } switch (MOBY(platform_moby)->state) { case PLATFORM_STATE_INITIALIZE: - platform_vars->unk28 = 4; - platform_vars->unk3E = 5; - platform_vars->unk20 = 0; - platform_vars->unk24 = 0; + platform_vars->hit_weight = 4; + platform_vars->target_flags = 5; + platform_vars->health = 0; + platform_vars->max_health = 0; *(OvlQuad *)&platform_vars->home_position[0] = *(OvlQuad *)&MOBY(platform_moby)->pos; platform_moby[0x20] = 1; break; diff --git a/src/overlays/l10/mobys/sinking_platform.c b/src/overlays/l10/mobys/sinking_platform.c index b92e34fd3e..49ae25f398 100644 --- a/src/overlays/l10/mobys/sinking_platform.c +++ b/src/overlays/l10/mobys/sinking_platform.c @@ -24,12 +24,12 @@ void sinking_platform_update(struct Moby *moby) __asm__("FUN_L10_00295c20"); typedef struct SinkingPlatformVars { u8 pad_0[0x20]; - s32 unk20; - s16 unk24; + s32 health; + s16 max_health; u8 pad_26[0x2]; - u8 unk28; + u8 hit_weight; u8 pad_29[0x15]; - s16 unk3E; + s16 target_flags; /* 0x3E: MobyTargetInfo.flags; target info at pvars+0x20 */ u8 pad_40[0x20]; f32 entity_matrix[4]; u8 pad_70[0x30]; @@ -60,10 +60,10 @@ void sinking_platform_update(struct Moby *moby) { fast_dec_timer(&platform_vars->timer_BC); switch (moby->state) { case PLATFORM_STATE_INITIALIZE: - platform_vars->unk28 = 4; - platform_vars->unk3E = 5; - platform_vars->unk20 = 0; - platform_vars->unk24 = 0; + platform_vars->hit_weight = 4; + platform_vars->target_flags = 5; + platform_vars->health = 0; + platform_vars->max_health = 0; platform_vars->home_z = moby->pos.z; platform_vars->bob_phase = random_angle_radians(); platform_vars->tilt_phase_1 = random_angle_radians(); From 1c573517b8849d723689c947a64c790f2472e73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:44:48 +0000 Subject: [PATCH 167/213] decomp: name the l14 path mover target info and tilting platform carry flags --- src/overlays/l14/mobys/path_mover.c | 12 ++++++------ src/overlays/l14/mobys/platform.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/overlays/l14/mobys/path_mover.c b/src/overlays/l14/mobys/path_mover.c index 07e2ad6972..7bbdb4aa95 100644 --- a/src/overlays/l14/mobys/path_mover.c +++ b/src/overlays/l14/mobys/path_mover.c @@ -16,12 +16,12 @@ typedef struct { u8 pad0[0x20]; - s32 unk20; - s16 unk24; + s32 health; + s16 max_health; u8 pad26[2]; u8 hit_weight; /* 0x28: enemy target info at pvars+0x20, see moby_target_info.h */ u8 pad29[0x15]; - s16 unk3E; + s16 target_flags; /* 0x3E: MobyTargetInfo.flags; target info at pvars+0x20 */ u8 pad40[0x20]; u8 carry[0x40]; /* 0x60: carried-object state for update_entity_matrix */ u8 start_end; /* 0xA0: 0 starts at the far end */ @@ -121,9 +121,9 @@ void path_mover_update(struct Moby *moby) { Vec4 *points; path_mover_vars->hit_weight = 4; - path_mover_vars->unk3E = 5; - path_mover_vars->unk20 = 0; - path_mover_vars->unk24 = 0; + path_mover_vars->target_flags = 5; + path_mover_vars->health = 0; + path_mover_vars->max_health = 0; t = 0.0f; if ((moby->command = path_mover_vars->start_end) == 0) { t = 1.0f; diff --git a/src/overlays/l14/mobys/platform.c b/src/overlays/l14/mobys/platform.c index f71428af8d..802041b906 100644 --- a/src/overlays/l14/mobys/platform.c +++ b/src/overlays/l14/mobys/platform.c @@ -44,7 +44,7 @@ typedef struct TiltingPlatformVars { u8 pad_0[0x20]; f32 carry[4]; /* carried-object state for update_entity_matrix */ u8 pad_30[0x2C]; - s32 unk5C; + s32 carry_flags; /* 0x5C: flags word of the carry record at pvars+0x20 (bit 4 read by transform_attachment_pose) */ f32 up_vector_x_velocity; f32 up_vector_y_velocity; f32 up_vector_z_velocity; @@ -68,7 +68,7 @@ void tilting_platform_update(struct Moby *moby) { moby->command = 0; moby->flags |= 0x100; moby->pos.z += 0.35f; - tilting_platform_state->unk5C = 1; + tilting_platform_state->carry_flags = 1; tilting_platform_state->timer_70 = 0; qzero(&tilting_platform_state->up_vector_x_velocity); qzero(&moby->rot); From d0f09a7ea9f4864c976e0bbf4f2ebe150da44ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:44:48 +0000 Subject: [PATCH 168/213] decomp: name the l16 conveyor belt carry flags --- src/overlays/l16/mobys/conveyor_belt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/overlays/l16/mobys/conveyor_belt.c b/src/overlays/l16/mobys/conveyor_belt.c index beeb163ec1..f925d1a22e 100644 --- a/src/overlays/l16/mobys/conveyor_belt.c +++ b/src/overlays/l16/mobys/conveyor_belt.c @@ -39,8 +39,8 @@ float conveyor_belt_base_speed_gp __asm__("D_L16_0016198C") = 4.0f; void conveyor_belt_update(struct Moby *m) __asm__("FUN_L16_002c9878"); typedef struct ConveyorBeltVars { - u8 pad_0[0x5C]; - s32 unk5C; + u8 pad_0[0x5C]; + s32 carry_flags; /* 0x5C: flags word of the carry record at pvars+0x20 (bit 4 read by transform_attachment_pose) */ s32 belt_cuboid; s32 clip_volume_64; s32 clip_volume_68; @@ -62,7 +62,7 @@ void conveyor_belt_update(struct Moby *moby) { int one = 1; switch (moby->state) { case CONVEYOR_BELT_STATE_INITIALIZE: - conveyor_data->unk5C |= 4; + conveyor_data->carry_flags |= 4; moby->visible = 0; moby->flags |= one; if (conveyor_data->belt_cuboid == -1) { From 07c21c14045593cfcec092b9eae7146f91e46815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:44:48 +0000 Subject: [PATCH 169/213] decomp: name the l08 blarg bombthrower's bomb update --- include/rnc/overlay/l08/mobys.h | 2 +- src/overlays/l08/level_class_tables.c | 2 +- src/overlays/l08/mobys/bomb.c | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/rnc/overlay/l08/mobys.h b/include/rnc/overlay/l08/mobys.h index f3712d1761..4b7a957483 100644 --- a/include/rnc/overlay/l08/mobys.h +++ b/include/rnc/overlay/l08/mobys.h @@ -12,7 +12,7 @@ void batalia_textured_effect_update(struct Moby *) __asm__("FUN_L08_00 void blarg_bombthrower_update(struct Moby *) __asm__("FUN_L08_002dabf0"); void bolt_pickup_update() __asm__("FUN_L08_002b82a0"); void bolt_thief_update(struct Moby *) __asm__("FUN_L08_002e2df0"); -void moby_248_update(char *) __asm__("FUN_L08_002d23f0"); +void blarg_bomb_update(char *) __asm__("FUN_L08_002d23f0"); void bomber_tank_update() __asm__("FUN_L08_002d42d8"); void commando_update() __asm__("FUN_L08_00302ce8"); void cutscene_camera_target_update(struct Moby *) __asm__("FUN_L08_003084d8"); diff --git a/src/overlays/l08/level_class_tables.c b/src/overlays/l08/level_class_tables.c index 6a10a90291..dee7887148 100644 --- a/src/overlays/l08/level_class_tables.c +++ b/src/overlays/l08/level_class_tables.c @@ -111,7 +111,7 @@ struct MobyClassUpdate moby_classes[190] __asm__("D_L08_001FC900") { 226, devestator_ammo_update, default_moby_methods}, { 229, glove_of_doom_update, default_moby_methods}, { 230, doom_bot_spawner_update, default_moby_methods}, - { 248, moby_248_update, default_moby_methods}, + { 248, blarg_bomb_update, default_moby_methods}, { 252, scoutbot_update, D_L08_001FD200}, { 253, bomber_tank_update, default_moby_methods}, { 270, morphoray_chicken_update, D_L08_001FD218}, diff --git a/src/overlays/l08/mobys/bomb.c b/src/overlays/l08/mobys/bomb.c index 456dc865f2..353922244d 100644 --- a/src/overlays/l08/mobys/bomb.c +++ b/src/overlays/l08/mobys/bomb.c @@ -1,4 +1,4 @@ -/* Level 08 moby class 0xf8: bomb. */ +/* Level 08 moby class 0xf8: the bomb blarg_bombthrower throws. */ #include "types.h" #include "asm.h" #include "rnc/mobys/moby.h" @@ -78,14 +78,14 @@ extern void spawn_explosion(void *, int) __asm__("FUN_L00_0025e450"); extern void spawn_effect(void *, void *, int, int, int, int, int, int) __asm__("FUN_L00_00269958"); extern float D_L08_0015F580_macro[] __asm__("D_L08_0015F580") MACRO_ADDR; -void moby_248_update(char *moby) __asm__("FUN_L08_002d23f0"); +void blarg_bomb_update(char *moby) __asm__("FUN_L08_002d23f0"); extern float D_0015ED6C; blk16 l08_bomb_moving_particle_initial_colors __asm__("D_L08_00161868") = { {-1, -1, -1, 0x2f, -1, -1, 0, 0x2f, -1, 0x7f, 0, 0x2f, -1, 0x4f, 0, 0x2f} }; -typedef struct Moby248Vars { +typedef struct BlargBombVars { u8 pad_0[0x7]; u8 fuse_flash_target_red; u8 pad_8[0x8]; @@ -98,10 +98,10 @@ typedef struct Moby248Vars { f32 fuse_flash_step; u8 pad_2C[0x4]; s32 thrower; -} Moby248Vars; +} BlargBombVars; /* Moby class 248 */ -void moby_248_update(char *moby) { +void blarg_bomb_update(char *moby) { enum { BOMB_STATE_MOVING = 1, BOMB_STATE_STATIONARY_FUSE = 2, @@ -112,12 +112,12 @@ void moby_248_update(char *moby) { blk16 table_or_bounce_scratch; float normalized_direction[4]; float random_direction[4]; - Moby248Vars *bomb_vars; + BlargBombVars *bomb_vars; int st; int two; float collision_z_offset; - bomb_vars = (Moby248Vars *)MOBY(moby)->pvars; + bomb_vars = (BlargBombVars *)MOBY(moby)->pvars; if (MOBY(moby)->state != 0x37) { if (coll_sphere(0.5f, moby + 0x10, 0x11, moby)) { int sphere_hit_moby = D_L08_00174658_lui; From f26cf22e951ee747b018616ff983e68f603cf28e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:44:49 +0000 Subject: [PATCH 170/213] decomp: name the l18 drifting mine update --- include/rnc/overlay/l18/mobys.h | 2 +- src/overlays/l18/level_class_tables.c | 2 +- src/overlays/l18/mobys/mine.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/rnc/overlay/l18/mobys.h b/include/rnc/overlay/l18/mobys.h index 266a3bebd7..6550e17d24 100644 --- a/include/rnc/overlay/l18/mobys.h +++ b/include/rnc/overlay/l18/mobys.h @@ -25,7 +25,7 @@ void hidden_deplanetizer_gun_update(struct Moby *) __asm__("FUN_L18_002fa640"); void inert_moby_update() __asm__("FUN_L18_002f7ab0"); void lift_update(struct Moby *) __asm__("FUN_L18_002f2310"); void hide_moby_and_disable_collision(struct Moby *) __asm__("FUN_L18_002d6280"); -void moby_568_update(struct Moby *) __asm__("FUN_L18_002d5918"); +void drifting_mine_update(struct Moby *) __asm__("FUN_L18_002d5918"); int moby_hold_state_while_active(struct Moby *) __asm__("FUN_L18_002d6190"); int update_moby_state_pause(struct Moby *) __asm__("FUN_L18_002d6108"); void rocket_moby_update(struct Moby *) __asm__("FUN_L18_002d5050"); diff --git a/src/overlays/l18/level_class_tables.c b/src/overlays/l18/level_class_tables.c index f1ba4a4162..2a82730b7c 100644 --- a/src/overlays/l18/level_class_tables.c +++ b/src/overlays/l18/level_class_tables.c @@ -157,7 +157,7 @@ struct MobyClassUpdate moby_classes[158] __asm__("D_L18_001F2D00") { 511, crate_update, default_moby_methods}, { 562, decoy_glove_update, default_moby_methods}, { 564, rocket_moby_update, default_moby_methods}, - { 568, moby_568_update, D_L18_001F3498}, + { 568, drifting_mine_update, D_L18_001F3498}, { 582, grind_rail_junction_update, default_moby_methods}, { 583, thruster_pack_lock_green_update, default_moby_methods}, { 585, metal_detector_update, default_moby_methods}, diff --git a/src/overlays/l18/mobys/mine.c b/src/overlays/l18/mobys/mine.c index c20c1f8247..aa1dabd414 100644 --- a/src/overlays/l18/mobys/mine.c +++ b/src/overlays/l18/mobys/mine.c @@ -44,10 +44,10 @@ void update_mine_detonation(unsigned char *moby) __asm__("FUN_L18_002d5f void update_mine_detonation(unsigned char *m) __asm__("FUN_L18_002d5f20"); -void moby_568_update(struct Moby *moby) __asm__("FUN_L18_002d5918"); +void drifting_mine_update(struct Moby *moby) __asm__("FUN_L18_002d5918"); /* Moby class 568 */ -void moby_568_update(struct Moby *moby) { +void drifting_mine_update(struct Moby *moby) { char *class_238_update_private_vars = (char *)moby->pvars; float settling_displacement_or_steering_increment[4]; update_mine_detonation(moby); From 17bd747c0ef12f544230eb24f1f7582ee2fcf406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:52:47 +0000 Subject: [PATCH 171/213] decomp: name the l05 triggered moby, l08 bomb and l18 mine files after their mobys --- configure.py | 12 ++++++------ .../water_spout_update.h | 0 .../l05/mobys/{triggered_motion.c => hinged_hatch.c} | 0 .../l05/mobys/{triggered_slide.c => sliding_block.c} | 0 .../mobys/{triggered_moby_yaw.c => swinging_flap.c} | 0 .../{triggered_spray_emitter.c => water_spout.c} | 2 +- src/overlays/l08/mobys/{bomb.c => blarg_bomb.c} | 0 src/overlays/l18/mobys/{mine.c => drifting_mine.c} | 0 8 files changed, 7 insertions(+), 7 deletions(-) rename include/rnc/overlay/l05/mobys/{triggered_spray_emitter_data => water_spout_data}/water_spout_update.h (100%) rename src/overlays/l05/mobys/{triggered_motion.c => hinged_hatch.c} (100%) rename src/overlays/l05/mobys/{triggered_slide.c => sliding_block.c} (100%) rename src/overlays/l05/mobys/{triggered_moby_yaw.c => swinging_flap.c} (100%) rename src/overlays/l05/mobys/{triggered_spray_emitter.c => water_spout.c} (99%) rename src/overlays/l08/mobys/{bomb.c => blarg_bomb.c} (100%) rename src/overlays/l18/mobys/{mine.c => drifting_mine.c} (100%) diff --git a/configure.py b/configure.py index 73d595ffd0..1993a6686c 100755 --- a/configure.py +++ b/configure.py @@ -317,10 +317,10 @@ "l05/mobys/skid_mcmarx.c", "l05/mobys/taxi.c", "l05/mobys/television.c", - "l05/mobys/triggered_motion.c", - "l05/mobys/triggered_slide.c", - "l05/mobys/triggered_moby_yaw.c", - "l05/mobys/triggered_spray_emitter.c", + "l05/mobys/hinged_hatch.c", + "l05/mobys/sliding_block.c", + "l05/mobys/swinging_flap.c", + "l05/mobys/water_spout.c", "l05/mobys/water.c", "l06/hero/hero_set_state.c", "l06/hero/update_hero_state_machine.c", @@ -379,7 +379,7 @@ "l08/mobys/blarg_bombthrower.c", "l08/mobys/bolt_pickup.c", "l08/mobys/bolt_thief.c", - "l08/mobys/bomb.c", + "l08/mobys/blarg_bomb.c", "l08/mobys/bomber_tank.c", "l08/mobys/bomber_tank_bomb.c", "l08/mobys/commando.c", @@ -675,7 +675,7 @@ "l18/mobys/hidden_deplanetizer_gun.c", "l18/mobys/inert_moby.c", "l18/mobys/lift.c", - "l18/mobys/mine.c", + "l18/mobys/drifting_mine.c", "l18/mobys/rocket.c", "l18/mobys/rocket_tank.c", "l18/mobys/rocket_tank_rocket.c", diff --git a/include/rnc/overlay/l05/mobys/triggered_spray_emitter_data/water_spout_update.h b/include/rnc/overlay/l05/mobys/water_spout_data/water_spout_update.h similarity index 100% rename from include/rnc/overlay/l05/mobys/triggered_spray_emitter_data/water_spout_update.h rename to include/rnc/overlay/l05/mobys/water_spout_data/water_spout_update.h diff --git a/src/overlays/l05/mobys/triggered_motion.c b/src/overlays/l05/mobys/hinged_hatch.c similarity index 100% rename from src/overlays/l05/mobys/triggered_motion.c rename to src/overlays/l05/mobys/hinged_hatch.c diff --git a/src/overlays/l05/mobys/triggered_slide.c b/src/overlays/l05/mobys/sliding_block.c similarity index 100% rename from src/overlays/l05/mobys/triggered_slide.c rename to src/overlays/l05/mobys/sliding_block.c diff --git a/src/overlays/l05/mobys/triggered_moby_yaw.c b/src/overlays/l05/mobys/swinging_flap.c similarity index 100% rename from src/overlays/l05/mobys/triggered_moby_yaw.c rename to src/overlays/l05/mobys/swinging_flap.c diff --git a/src/overlays/l05/mobys/triggered_spray_emitter.c b/src/overlays/l05/mobys/water_spout.c similarity index 99% rename from src/overlays/l05/mobys/triggered_spray_emitter.c rename to src/overlays/l05/mobys/water_spout.c index 10737ed7d6..712d810583 100644 --- a/src/overlays/l05/mobys/triggered_spray_emitter.c +++ b/src/overlays/l05/mobys/water_spout.c @@ -46,7 +46,7 @@ extern unsigned char D_0014C050[][16]; extern struct FloorRow *D_L05_001612D0; extern char D_L05_0015F580_macro[] __asm__("D_L05_0015F580") MACRO_ADDR; -#include "rnc/overlay/l05/mobys/triggered_spray_emitter_data/water_spout_update.h" +#include "rnc/overlay/l05/mobys/water_spout_data/water_spout_update.h" void water_spout_update(struct Moby *emitter_moby) __asm__("FUN_L05_003150f0"); diff --git a/src/overlays/l08/mobys/bomb.c b/src/overlays/l08/mobys/blarg_bomb.c similarity index 100% rename from src/overlays/l08/mobys/bomb.c rename to src/overlays/l08/mobys/blarg_bomb.c diff --git a/src/overlays/l18/mobys/mine.c b/src/overlays/l18/mobys/drifting_mine.c similarity index 100% rename from src/overlays/l18/mobys/mine.c rename to src/overlays/l18/mobys/drifting_mine.c From 02766e190401cc14679d16f3e80cd335825d7403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:41:51 +0000 Subject: [PATCH 172/213] decomp: name the menu system travel state, sequence autoclose and allocation cursors and the card save flag --- include/rnc/game/overlay_game_state.h | 6 +++--- include/rnc/save/memory_card_state.h | 2 +- include/rnc/ui/menus/menu_system.h | 18 +++++++++--------- src/audio/voices/pause_all_sounds.c | 2 +- src/check/menu_layout_check.c | 4 ++-- .../cutscenes/update_cutscene_playback.c | 10 +++++----- src/save/memcard_save_data.c | 4 ++-- src/ui/map/draw_map_screen.c | 2 +- src/ui/menus/initialize_menu_preview_scene.c | 4 ++-- src/ui/menus/save_data/loading_data_menu.c | 2 +- src/ui/menus/save_data/prepare_save_game.c | 2 +- .../save_data/save_card_state_good_save.c | 4 ++-- src/ui/menus/save_data/save_card_state_init.c | 2 +- .../menus/save_data/save_card_state_new_card.c | 2 +- src/ui/menus/save_data/saving_data_menu2.c | 2 +- .../menus/save_data/start_memory_card_save.c | 2 +- .../menus/system/handle_menu_action_buttons.c | 2 +- .../menus/system/update_menu_entry_actions.c | 13 +++++++------ .../menus/system/update_timed_menu_sequence.c | 4 ++-- 19 files changed, 44 insertions(+), 43 deletions(-) diff --git a/include/rnc/game/overlay_game_state.h b/include/rnc/game/overlay_game_state.h index b02796840e..4c941fbefa 100644 --- a/include/rnc/game/overlay_game_state.h +++ b/include/rnc/game/overlay_game_state.h @@ -40,9 +40,9 @@ struct GameState { u8 padDC[8]; void *travel_level; /* 0xE4: level, movie or scene for close_request */ f32 saved_tan_half_fov; /* 0xE8 */ - void *unkEC; - struct Own *pending_owner; - s32 pending_state; + void *action_message; /* 0xEC */ + struct Own *pending_owner; /* 0xF0: travel_page in the boot copy */ + s32 pending_state; /* 0xF4: travel_state in the boot copy */ u8 padF8[4]; s32 first_base; /* 0xFC: render archive allocation */ s32 second_base; /* 0x100 */ diff --git a/include/rnc/save/memory_card_state.h b/include/rnc/save/memory_card_state.h index b72b6cded7..4ab3fcdf12 100644 --- a/include/rnc/save/memory_card_state.h +++ b/include/rnc/save/memory_card_state.h @@ -191,7 +191,7 @@ struct MemoryCardState { s32 err_card; /* 0xE8 */ void *buf; /* 0xEC: save data to write */ s32 size; /* 0xF0: bytes of the current read/write */ - s32 unkF4; /* 0xF4: set 1 by prepare_save_game and the load menu */ + s32 card_save_active; /* 0xF4: 1 once a save is written (prepare_save_game) or loaded (loading_data_menu); 0 at init and after a card sync error; CS_GOOD_SAVE needs it */ }; extern struct MemoryCardState memory_card_state __asm__("D_0013D290"); diff --git a/include/rnc/ui/menus/menu_system.h b/include/rnc/ui/menus/menu_system.h index 380dd42fb3..60276471ce 100644 --- a/include/rnc/ui/menus/menu_system.h +++ b/include/rnc/ui/menus/menu_system.h @@ -43,7 +43,7 @@ struct MenuPage { * * Evidence for the less obvious fields: * - close_request: nonzero makes update_menu_system call close_menu_system (release the - * page, state 20); 1 from a screen update, 3 with travel_level..unkF4 set + * page, state 20); 1 from a screen update, 3 with travel_level..travel_state set * (fun_00221968, draw_map_screen), 3/4/5 from update_menu_entry_actions. * - equipped: D_001863D8[id] +0 names the slot; draw_menu_item_grid draws the * held item with frame +1; load_hand_gadget builds the preview mobys from @@ -63,7 +63,7 @@ struct MenuPage { * selected class. * - unk134 / unk138: while set, pages with flags 8 / 4 are skipped * (find_next_pause_page) and grid items with those flags draw frame +2. - * - The buffer addresses (graphics_workspace, unkFC..stream_buffer_base) are carved from + * - The buffer addresses (graphics_workspace, first_base..stream_buffer_base) are carved from * D_001940C0[1] / [2] by FUN_00218f98. */ struct MenuSystem { @@ -99,19 +99,19 @@ struct MenuSystem { struct MenuPage *previous; /* 0x0D0: page left by the last switch */ s32 save_prompt_variant; /* 0x0D4: 0 saving_data_menu, 1/2 saving_data_menu2; picks draw_prompt_box text */ s32 goodies_tab_shown; /* 0x0D8: render_level_effects_and_screen_sprites draws slot 6 only while set */ - s32 unkDC; /* 0x0DC: pause_all_sounds: (mode == 0x23) */ - s32 save_slot; /* 0x0E0: memcard_make_whole_save / memcard_restore_game argument */ - s32 travel_level; /* 0x0E4: written with travel_page/unkF4 before close_request 3 */ + s32 sequence_autoclose; /* 0x0DC: pause_all_sounds mode 0x23; the timed sequence closes the menu at its end and start/select close it only with L1+L2+R1+R2+triangle held */ + s32 save_slot; /* 0x0E0: memcard_make_whole_save / memcard_restore_game argument */ + s32 travel_level; /* 0x0E4: written with travel_page/travel_state before close_request 3 */ f32 saved_tan_half_fov; /* 0x0E8: view tan_half_fov while paused */ s32 action_message; /* 0x0EC: menu_action_messages[] entry (update_menu_entry_actions) */ struct MenuPage * travel_page; /* 0x0F0: menu_system.current, or map_circle_destination_page (draw_map_screen) */ - s32 unkF4; /* 0x0F4: 0, 2, 0xB or 0xF */ - s32 unkF8; /* 0x0F8: read by pause_all_sounds */ + s32 travel_state; /* 0x0F4: state resumed with travel_page (0, 2, 0xB or 0xF); the level copy restores it as pending_state */ + s32 unkF8; /* 0x0F8: read by pause_all_sounds */ /* Buffers carved at init (FUN_00218f98) */ - s32 unkFC; /* 0x0FC: from D_001940C0[1] */ - s32 unk100; /* 0x100: from D_001940C0[2] */ + s32 first_base; /* 0x0FC: allocation cursor in D_001940C0[1]; the level copy allocates from it */ + s32 second_base; /* 0x100: allocation cursor in D_001940C0[2] */ s32 preview_workspace; /* 0x104: D_001940C0[1] + 0xA0000 */ s32 help_text_buffer; /* 0x108: help text read target, D_001940C0[1] + 0xDC000 */ s32 stream_buffer_base; /* 0x10C: D_001940C0[2] + 0x180000 */ diff --git a/src/audio/voices/pause_all_sounds.c b/src/audio/voices/pause_all_sounds.c index 18bee0c3c2..01a442f8ce 100644 --- a/src/audio/voices/pause_all_sounds.c +++ b/src/audio/voices/pause_all_sounds.c @@ -68,7 +68,7 @@ void pause_all_sounds(s32 mode) { { struct MenuSystem *g = &menu_system; struct MenuTextListScreen *head = &pause_menu_chain_head; - g->unkDC = mode == 0x23; + g->sequence_autoclose = mode == 0x23; head->list.up = g->goodies_tab_shown ? (struct MenuScreen *)&pause_goodies_tab : (struct MenuScreen *)&pause_menu_chain_tail; } diff --git a/src/check/menu_layout_check.c b/src/check/menu_layout_check.c index ddfb40ff77..fcdeb733c4 100644 --- a/src/check/menu_layout_check.c +++ b/src/check/menu_layout_check.c @@ -36,9 +36,9 @@ CHECK(MenuSystem, goodies_tab_shown, goodies_tab_shown, 0xD8); CHECK(MenuSystem, travel_level, travel_level, 0xE4); CHECK(MenuSystem, action_message, action_message, 0xEC); CHECK(MenuSystem, travel_page, travel_page, 0xF0); -CHECK(MenuSystem, unkF4, unkF4, 0xF4); +CHECK(MenuSystem, travel_state, travel_state, 0xF4); CHECK(MenuSystem, unkF8, unkF8, 0xF8); -CHECK(MenuSystem, unkFC, unkFC, 0xFC); +CHECK(MenuSystem, first_base, first_base, 0xFC); CHECK(MenuSystem, help_text_buffer, help_text_buffer, 0x108); CHECK(MenuSystem, update_count, update_count, 0x110); CHECK(MenuSystem, resource_table_toggle, resource_table_toggle, 0x118); diff --git a/src/overlays/shared/cutscenes/update_cutscene_playback.c b/src/overlays/shared/cutscenes/update_cutscene_playback.c index ef3c6b7787..58c1fc2211 100644 --- a/src/overlays/shared/cutscenes/update_cutscene_playback.c +++ b/src/overlays/shared/cutscenes/update_cutscene_playback.c @@ -439,8 +439,8 @@ void start_scene(int scene_id) { set_hero_item_moby_flag_bit0(); if (active_scene_trigger.moby) active_scene_trigger.moby->flags |= 1; - if (D_L00_001B9CF0.unkEC) - ((struct Moby *)D_L00_001B9CF0.unkEC)->flags |= 1; + if (D_L00_001B9CF0.action_message) + ((struct Moby *)D_L00_001B9CF0.action_message)->flags |= 1; start_cutscene_chunk_read(0); fade_to_black(scale_game_frames(6)); update_audio_stream_until_idle(1); @@ -546,9 +546,9 @@ void finish_cutscene(void) { } if (active_scene_trigger.moby) active_scene_trigger.moby->flags &= ~1; - if (D_L00_001B9CF0.unkEC) { - ((struct Moby *)D_L00_001B9CF0.unkEC)->flags &= ~1; - D_L00_001B9CF0.unkEC = 0; + if (D_L00_001B9CF0.action_message) { + ((struct Moby *)D_L00_001B9CF0.action_message)->flags &= ~1; + D_L00_001B9CF0.action_message = 0; } if (active_scene_trigger.moby) { F_298b18 *scene_trigger_moby = active_scene_trigger.moby; diff --git a/src/save/memcard_save_data.c b/src/save/memcard_save_data.c index 5cd70bbb52..c2b775b649 100644 --- a/src/save/memcard_save_data.c +++ b/src/save/memcard_save_data.c @@ -43,8 +43,8 @@ int memcard_save_data(int slot, int flags) { if (active == -1 || card_state->card[active].save_index < 0) { return slot == 0; } - mask = card_state->unkF4 | slot; - card_state->unkF4 = mask; + mask = card_state->card_save_active | slot; + card_state->card_save_active = mask; if (mask == 0) { goto done; } diff --git a/src/ui/map/draw_map_screen.c b/src/ui/map/draw_map_screen.c index 3b79262faa..db74da5ecb 100644 --- a/src/ui/map/draw_map_screen.c +++ b/src/ui/map/draw_map_screen.c @@ -99,7 +99,7 @@ s32 draw_map_screen(struct MenuScreen *screen) { } if ((controller_state.pressed_unmasked & PAD_CIRCLE) && level_map_selection.level != 0) { menu_system.travel_page = (struct MenuPage *)map_circle_destination_page; - menu_system.unkF4 = 0xB; + menu_system.travel_state = 0xB; menu_system.close_request = 3; menu_system.travel_level = level_map_selection.level; allocate_voice_for_target_entry(0, 0x11, screen->moby); diff --git a/src/ui/menus/initialize_menu_preview_scene.c b/src/ui/menus/initialize_menu_preview_scene.c index a1858e4ce3..839e53dc66 100644 --- a/src/ui/menus/initialize_menu_preview_scene.c +++ b/src/ui/menus/initialize_menu_preview_scene.c @@ -73,8 +73,8 @@ void initialize_menu_preview_scene(void) { graphics_workspace_base = D_001940C0[2] + 0xA0000; help_text_buffer_start = preview_workspace_start + 0x3C000; graphics_buffer_start = graphics_workspace_base + 0xE0000; - menu_system.unkFC = help_text_buffer_start + 0xC1000; - menu_system.unk100 = graphics_buffer_start + 0x11800; + menu_system.first_base = help_text_buffer_start + 0xC1000; + menu_system.second_base = graphics_buffer_start + 0x11800; current_vu_chain = 0xA0000; menu_system.preview_workspace = preview_workspace_start; menu_system.graphics_workspace = graphics_workspace_base; diff --git a/src/ui/menus/save_data/loading_data_menu.c b/src/ui/menus/save_data/loading_data_menu.c index 184c0ea37d..bf151a0045 100644 --- a/src/ui/menus/save_data/loading_data_menu.c +++ b/src/ui/menus/save_data/loading_data_menu.c @@ -52,7 +52,7 @@ s32 loading_data_menu(struct LoadMenuDescriptor *menu) { mode_freeze_init(3, menu_system.current); return 0; } - memory_card_state.unkF4 = 1; + memory_card_state.card_save_active = 1; voice_pool.group_0_volume = ((s32)(sound_volume * 8)) / 10; voice_pool.group_1_volume = music_volume; scaled_volume_70 = ((s32)(sound_volume * 7)) / 10; diff --git a/src/ui/menus/save_data/prepare_save_game.c b/src/ui/menus/save_data/prepare_save_game.c index 8fa02fd56b..d601e6ee45 100644 --- a/src/ui/menus/save_data/prepare_save_game.c +++ b/src/ui/menus/save_data/prepare_save_game.c @@ -25,7 +25,7 @@ void prepare_save_game(int save_data, int slot) { copy_level_object_positions(); save_map_coverage(map_coverage_pages + (current_level_index << 11)); memcard_make_whole_save((char *)save_data); - card_state->unkF4 = saving; + card_state->card_save_active = saving; card_state->buf = (void *)save_data; card_state->card[0].save_index = slot; card_state->active_card = 0; diff --git a/src/ui/menus/save_data/save_card_state_good_save.c b/src/ui/menus/save_data/save_card_state_good_save.c index f330c9b955..492e31a5a6 100644 --- a/src/ui/menus/save_data/save_card_state_good_save.c +++ b/src/ui/menus/save_data/save_card_state_good_save.c @@ -18,7 +18,7 @@ void save_card_state_good_save(void) { card_state = &memory_card_state; nf = mode_freeze_flags & ~2; mode_freeze_flags = nf; - if (card_state->unkF4 == 0) { + if (card_state->card_save_active == 0) { save_card_state = CS_NOCARD; return; } @@ -33,7 +33,7 @@ void save_card_state_good_save(void) { return; } if (card_state->card[0].sync_result != 0) { - card_state->unkF4 = 0; + card_state->card_save_active = 0; mode_freeze_flags = nf | 1; save_card_state = CS_WARNING; return; diff --git a/src/ui/menus/save_data/save_card_state_init.c b/src/ui/menus/save_data/save_card_state_init.c index c58b86b988..a8c18a6be6 100644 --- a/src/ui/menus/save_data/save_card_state_init.c +++ b/src/ui/menus/save_data/save_card_state_init.c @@ -7,7 +7,7 @@ void save_card_state_init(void) __asm__("FUN_002088a8"); void save_card_state_init(void) { save_card_state = CS_NOCARD; memory_card_state.card[0].sync_result = memory_card_state.result; - memory_card_state.unkF4 = 0; + memory_card_state.card_save_active = 0; } extern __typeof__(save_card_state_init) func_002088A8 __attribute__((alias("FUN_002088a8"))); diff --git a/src/ui/menus/save_data/save_card_state_new_card.c b/src/ui/menus/save_data/save_card_state_new_card.c index 6a2b515272..5f2dfa8054 100644 --- a/src/ui/menus/save_data/save_card_state_new_card.c +++ b/src/ui/menus/save_data/save_card_state_new_card.c @@ -25,7 +25,7 @@ void save_card_state_new_card(void) { save_card_state = CS_NOCARD; return; } - if (card_state->unkF4 != 0) + if (card_state->card_save_active != 0) save_card_state = CS_GOOD_SAVE; } diff --git a/src/ui/menus/save_data/saving_data_menu2.c b/src/ui/menus/save_data/saving_data_menu2.c index 791d2a0006..eb32ede1f6 100644 --- a/src/ui/menus/save_data/saving_data_menu2.c +++ b/src/ui/menus/save_data/saving_data_menu2.c @@ -128,7 +128,7 @@ s32 saving_data_menu2(struct MenuScreen *w) { w->data.save.step = 1; } } else if (pad & 0x20) { - memory_card_state.unkF4 = 0; + memory_card_state.card_save_active = 0; fl = mode_freeze_flags & ~2; mode_freeze_flags = fl & ~4; load_and_initialize_level_chunk(); diff --git a/src/ui/menus/save_data/start_memory_card_save.c b/src/ui/menus/save_data/start_memory_card_save.c index 29d466bb59..79e87f17d5 100644 --- a/src/ui/menus/save_data/start_memory_card_save.c +++ b/src/ui/menus/save_data/start_memory_card_save.c @@ -18,7 +18,7 @@ void start_memory_card_save(s32 save_data, s32 slot) { memory_card_state.active_card = 0; memory_card_state.card[0].save_index = slot; *(s32 *)((u8 *)&memory_card_state + slot * 0x1C + 0x20) = 0; - memory_card_state.unkF4 = 1; + memory_card_state.card_save_active = 1; memory_card_state.buf = save_data; if (memory_card_state.pending_state < MEMCARD_QUERY_INFO) { memory_card_state.pending_card = 0; diff --git a/src/ui/menus/system/handle_menu_action_buttons.c b/src/ui/menus/system/handle_menu_action_buttons.c index 91fd304e19..5067977f6f 100644 --- a/src/ui/menus/system/handle_menu_action_buttons.c +++ b/src/ui/menus/system/handle_menu_action_buttons.c @@ -26,7 +26,7 @@ s32 handle_menu_action_buttons(struct MenuScreen *menu_screen) { menu_system.travel_level = selected_level_index[0]; menu_system.travel_page = menu_system.current; menu_system.close_request = 3; - menu_system.unkF4 = 0xF; + menu_system.travel_state = 0xF; allocate_voice_for_target_entry(0, 0x11, menu_screen->moby); } return 0; diff --git a/src/ui/menus/system/update_menu_entry_actions.c b/src/ui/menus/system/update_menu_entry_actions.c index 0e72fc7bbc..5022cda230 100644 --- a/src/ui/menus/system/update_menu_entry_actions.c +++ b/src/ui/menus/system/update_menu_entry_actions.c @@ -109,26 +109,27 @@ s32 update_menu_entry_actions(struct MenuScreen *menu) { } menu_system.close_request = 5; menu_system.travel_page = menu_system.current; - menu_system.unkF4 = 0; - menu_system.travel_level = menu->data.list.items[menu->data.list.selected].param.half.lo; + menu_system.travel_state = 0; + menu_system.travel_level = + menu->data.list.items[menu->data.list.selected].param.half.lo; allocate_voice_for_target_entry(0, 0x11, menu->moby); return 0; case MENU_ACTION_REQUEST_CLOSE_WITH_WORD_PAYLOAD: - menu_system.unkF4 = 2; + menu_system.travel_state = 2; menu_system.travel_page = menu_system.current; menu_system.close_request = 3; menu_system.travel_level = menu->data.list.items[menu->data.list.selected].param.value; allocate_voice_for_target_entry(0, 0x11, menu->moby); return 0; case MENU_ACTION_REQUEST_CLOSE_4_WITH_WORD_PAYLOAD: - menu_system.unkF4 = 2; + menu_system.travel_state = 2; menu_system.travel_page = menu_system.current; menu_system.close_request = 4; menu_system.travel_level = menu->data.list.items[menu->data.list.selected].param.value; allocate_voice_for_target_entry(0, 0x11, menu->moby); return 0; case MENU_ACTION_REQUEST_CLOSE_6_WITH_WORD_PAYLOAD: - menu_system.unkF4 = 2; + menu_system.travel_state = 2; menu_system.travel_page = menu_system.current; menu_system.close_request = 6; menu_system.travel_level = menu->data.list.items[menu->data.list.selected].param.value; @@ -136,7 +137,7 @@ s32 update_menu_entry_actions(struct MenuScreen *menu) { return 0; case MENU_ACTION_REQUEST_CLOSE_PRESERVING_PAYLOAD: menu_system.travel_page = menu_system.current; - menu_system.unkF4 = 2; + menu_system.travel_state = 2; menu_system.close_request = 7; allocate_voice_for_target_entry(0, 0x11, menu->moby); return 0; diff --git a/src/ui/menus/system/update_timed_menu_sequence.c b/src/ui/menus/system/update_timed_menu_sequence.c index 7a69f4dbfa..b82b30505f 100644 --- a/src/ui/menus/system/update_timed_menu_sequence.c +++ b/src/ui/menus/system/update_timed_menu_sequence.c @@ -83,7 +83,7 @@ s32 update_timed_menu_sequence(struct MenuScreen *menu) { s32 previous_counter_value; flag = (((struct PadStateWords *)&controller_state)->buttons.held_pressed & 0xF) == 0xF; - if ((menu_system.unkDC == 0) || + if ((menu_system.sequence_autoclose == 0) || (flag && (((s32)((struct PadStateWords *)&controller_state)->buttons.held_pressed) & 0x10))) { if ((controller_state.pressed_unmasked & (PAD_SELECT | PAD_R3 | PAD_START)) && @@ -231,7 +231,7 @@ s32 update_timed_menu_sequence(struct MenuScreen *menu) { case WAIT_FOR_FINAL_DELAY: if (menu->data.timed.timer == 0) { - if (menu_system.unkDC != 0) { + if (menu_system.sequence_autoclose != 0) { return 1; } } From 8956c53b4e5c1fb0d366f6395dbbbb5018ed8bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:44:25 +0000 Subject: [PATCH 173/213] decomp: name the menu screen map flags and draw flags, the quit menu size and the vendor preview list --- include/rnc/ui/menus/menu_screen.h | 23 ++++++++++--------- src/check/menu_layout_check.c | 5 ++-- src/ui/map/draw_map_screen.c | 4 ++-- src/ui/menus/initialize_menu_preview_scene.c | 6 ++--- .../load_preview_resource_bindings.c | 2 +- src/ui/menus/pause/draw_pause_ring.c | 4 ++-- src/ui/menus/pause/draw_quit_game_menu.c | 10 ++++---- .../selection/build_filtered_menu_item_list.c | 12 +++++----- src/ui/menus/system/update_menu_system.c | 23 ++++++++++--------- .../weapons/obtain_all_gold_weapons_menu.c | 6 ++--- .../menus/widgets/draw_menu_side_indicator.c | 2 +- src/ui/menus/widgets/enter_menu_help_text.c | 4 ---- .../vendor/render_vendor_item_details_pass.c | 12 +++++----- 13 files changed, 55 insertions(+), 58 deletions(-) diff --git a/include/rnc/ui/menus/menu_screen.h b/include/rnc/ui/menus/menu_screen.h index e34e76ccf0..0b940d8675 100644 --- a/include/rnc/ui/menus/menu_screen.h +++ b/include/rnc/ui/menus/menu_screen.h @@ -15,15 +15,16 @@ struct Moby; /* MenuScreen 0x30-0x5F as plain words, for screens not understood yet. */ struct MenuScreenWords { u8 pad_30[0x4]; - s32 unk34; /* 0x34: flags 0x40 / 0x80 (draw_map_screen) */ - s32 unk38; /* 0x38: cleared by enter_menu_help_text */ - s32 unk3C; /* 0x3C */ - u8 pad_40[0x10]; - s32 unk50; /* 0x50: 0, 1 or 3 (enter_menu_help_text) */ - s32 unk54; /* 0x54: cleared by enter_menu_help_text */ - u8 pad_58[0x8]; + s32 map_flags; /* 0x34: draw_map_screen: MENU_MAP_* */ + u8 pad_38[0x28]; }; +/* MenuScreenWords.map_flags (draw_map_screen); the planet select map has both, + the planet confirm map only NO_INPUT. */ +#define MENU_MAP_NO_INPUT \ + 0x40 /* skips the start/select close and the triangle, cross and circle input */ +#define MENU_MAP_NO_TEXTURE_REGISTER 0x80 /* skips registering the map textures */ + /* Option list screen (update_menu_option_list). */ struct MenuOption { s32 label; /* 0x0: text id of the option; 0 ends the list */ @@ -175,7 +176,7 @@ struct MenuCycleData { */ /* MenuTextItem.action: what confirm does (update_menu_entry_actions). The REQUEST_CLOSE actions set menu_system.close_request: 6 -> 5, 7 -> 3, - 8 -> 4, 10 -> 6, 11 -> 7, with param in menu_system.unkE4. */ + 8 -> 4, 10 -> 6, 11 -> 7, with param in menu_system.travel_level. */ enum MenuTextAction { MENU_ACTION_LOCKED = -1, /* goodies entry not unlocked yet: confirm does nothing */ MENU_ACTION_DISABLED = 0, /* dimmed and skipped */ @@ -198,7 +199,7 @@ struct MenuTextItem { union { s32 value; /* page, close value, level or language */ struct { - u16 lo; /* action 6: menu_system.unkE4 */ + u16 lo; /* action 6: menu_system.travel_level */ s16 hi; /* action 6: menu_action_messages index, 0 = none */ } half; } param; /* 0x4 */ @@ -269,7 +270,7 @@ struct MenuLabelData { s32 value_variant; /* 0x4C */ }; -/* MenuScreen.unk10: how the page draws the screen (port docs/port/rerac/plan/menus.md). */ +/* MenuScreen.flags: how the page draws the screen (port docs/port/rerac/plan/menus.md). */ #define MENU_SCREEN_DRAW_DIRECT 0x1 #define MENU_SCREEN_DRAW_3D 0x2 /* drawn in the first, 3D pass */ #define MENU_SCREEN_HIDDEN 0x4 @@ -391,7 +392,7 @@ struct MenuScreenHead { s32 (*draw)(struct MenuScreen *); /* 0x04 */ void (*enter)(struct MenuScreen *, s32); /* 0x08 */ void (*leave)(struct MenuScreen *, s32); /* 0x0C */ - s32 unk10; /* 0x10 */ + s32 flags; /* 0x10: MENU_SCREEN_* draw flags */ s32 moby; /* 0x14 */ s32 x; /* 0x18 */ s32 y; /* 0x1C */ diff --git a/src/check/menu_layout_check.c b/src/check/menu_layout_check.c index fcdeb733c4..8757b11a0d 100644 --- a/src/check/menu_layout_check.c +++ b/src/check/menu_layout_check.c @@ -57,9 +57,8 @@ CHECK(MenuScreen, x, x, 0x18); CHECK(MenuScreen, y, y, 0x1C); CHECK(MenuScreen, width, width, 0x20); CHECK(MenuScreen, height, height, 0x24); -CHECK(MenuScreen, raw_unk34, data.raw.unk34, 0x34); -CHECK(MenuScreen, raw_unk50, data.raw.unk50, 0x50); -CHECK(MenuScreen, raw_end, data.raw.pad_58[7], 0x5F); +CHECK(MenuScreen, raw_map_flags, data.raw.map_flags, 0x34); +CHECK(MenuScreen, raw_end, data.raw.pad_38[0x27], 0x5F); CHECK(MenuScreen, options_selection, data.options.selection, 0x38); CHECK(MenuScreen, choices_selection, data.choices.selection, 0x38); CHECK(MenuScreen, missions_count, data.missions.count, 0x7C); diff --git a/src/ui/map/draw_map_screen.c b/src/ui/map/draw_map_screen.c index db74da5ecb..2f1c2a7e1f 100644 --- a/src/ui/map/draw_map_screen.c +++ b/src/ui/map/draw_map_screen.c @@ -80,7 +80,7 @@ s32 draw_map_screen(struct MenuScreen *screen) { struct MapEntry *map_read_entry; update_map_zoom_and_pan(); - if (!(screen->data.raw.unk34 & 0x40)) { + if (!(screen->data.raw.map_flags & MENU_MAP_NO_INPUT)) { previous_selected_level_id = level_map_selection.level; if (controller_state.pressed_unmasked & (PAD_SELECT | PAD_R3 | PAD_START)) { if (menu_system.close_locked == 0) { @@ -161,7 +161,7 @@ s32 draw_map_screen(struct MenuScreen *screen) { compose_bitmap_from_mask(pal, pix, pal, map_mask_buffer); } } - if (!(screen->data.raw.unk34 & 0x80)) { + if (!(screen->data.raw.map_flags & MENU_MAP_NO_TEXTURE_REGISTER)) { tbase = (u8 *)level_map_selection.hdr; texture_block_base = tbase + hdr->tex0_offset; b = tbase + hdr->tex1_offset + 0x420; diff --git a/src/ui/menus/initialize_menu_preview_scene.c b/src/ui/menus/initialize_menu_preview_scene.c index 839e53dc66..879f2cb911 100644 --- a/src/ui/menus/initialize_menu_preview_scene.c +++ b/src/ui/menus/initialize_menu_preview_scene.c @@ -739,7 +739,7 @@ struct MenuLevelMapScreen planet_select_galaxy_map = { struct MenuMapScreen planet_select_map_screen = { {draw_map_screen, 0, 0, leave_map_screen}, - {{0}, 0xC0}, + {{0}, MENU_MAP_NO_INPUT | MENU_MAP_NO_TEXTURE_REGISTER}, }; struct MenuPage planet_confirm_page = { @@ -766,7 +766,7 @@ struct MenuScreen planet_confirm_missions_screen = { struct MenuMapScreen planet_confirm_map_screen = { {draw_map_screen, draw_map_screen_layers, reset_pause_memory_card_state, leave_map_screen}, - {{0}, 0x40} + {{0}, MENU_MAP_NO_INPUT} }; struct MenuItemPreviewScreen planet_confirm_gold_bolt_screen = { @@ -1309,7 +1309,7 @@ struct MenuLabelScreen in_level_movies_title_label = { }; /* The In-Level Movies lists, one per level (in_level_movie_lists). param.half: - {lo: menu_system.unkE4, hi: menu_action_messages index, 0 = none}. */ + {lo: menu_system.travel_level, hi: menu_action_messages index, 0 = none}. */ struct MenuTextItem in_level_movies_veldin[4] = { {0x5022, MENU_ACTION_REQUEST_CLOSE_WITH_OPTIONAL_MESSAGE, {.half = {1, 0}}}, {0x5023, MENU_ACTION_REQUEST_CLOSE_WITH_OPTIONAL_MESSAGE, {.half = {2, 0}}}, diff --git a/src/ui/menus/item_preview/load_preview_resource_bindings.c b/src/ui/menus/item_preview/load_preview_resource_bindings.c index 5798e7ab21..487a676e5a 100644 --- a/src/ui/menus/item_preview/load_preview_resource_bindings.c +++ b/src/ui/menus/item_preview/load_preview_resource_bindings.c @@ -14,7 +14,7 @@ void load_preview_resource_bindings(s32 first_resource, s32 resource_count) __as /* Streams each bound resource into its buffer, unpacks it and points the class animation slot at it. The buffers are the stream state's - unkB0 array; reading them through the struct gives + preview_resource_buffers array; reading them through the struct gives the state base its own register. */ void load_preview_resource_bindings(s32 first_resource, s32 resource_count) { s32 count; diff --git a/src/ui/menus/pause/draw_pause_ring.c b/src/ui/menus/pause/draw_pause_ring.c index a89fea89d5..c333e60b84 100644 --- a/src/ui/menus/pause/draw_pause_ring.c +++ b/src/ui/menus/pause/draw_pause_ring.c @@ -4,8 +4,8 @@ #include "rnc/game/game_globals.h" /* Draws the pause menu's ring of 8 icons and the quick-select overlay. - arg0 is the pause-state object: unk20/unk24 give the viewport - width/height (used for the ring's center and radius), unk50 the + arg0 is the pause-state object: w/h give the viewport + width/height (used for the ring's center and radius), sel the selected slot (drawn with a pulsing highlight box), and slots[i] indexes an icon-info table (D_001863D0, 0x4C bytes/entry) and a byte flags table (item_text_variant) when nonzero. */ diff --git a/src/ui/menus/pause/draw_quit_game_menu.c b/src/ui/menus/pause/draw_quit_game_menu.c index 7cac45eb12..6f2f17aa46 100644 --- a/src/ui/menus/pause/draw_quit_game_menu.c +++ b/src/ui/menus/pause/draw_quit_game_menu.c @@ -11,8 +11,8 @@ typedef double f64; struct QuitMenu { u8 pad_0[0x20]; - s32 unk20; - s32 unk24; + s32 width; /* 0x20: MenuScreen width */ + s32 height; /* 0x24: MenuScreen height */ }; extern void setup_gif_paging(s32) __asm__("func_001F4280"); @@ -35,8 +35,8 @@ s32 draw_quit_game_menu(struct QuitMenu *quit_menu) { s32 half_width; s32 yes_width; s32 menu_width; - menu_width = quit_menu->unk20; - menu_height = quit_menu->unk24; + menu_width = quit_menu->width; + menu_height = quit_menu->height; memset(packet, 0, 0x18); half_width = (s32)(menu_width + (((u32)menu_width) >> 0x1F)); half_width = half_width >> 1; @@ -57,7 +57,7 @@ s32 draw_quit_game_menu(struct QuitMenu *quit_menu) { half_width, menu_height - 0x40, 0x80FFA888, get_help_message_text(0x4F3F), -1); no_width = measure_text_width_regular(get_help_message_text(0x524B), -1); yes_width = measure_text_width_regular(get_help_message_text(0x524F), -1); - text_x = ((s32)(quit_menu->unk20 - ((yes_width >= no_width) ? (yes_width) : (no_width)))) >> 1; + text_x = ((s32)(quit_menu->width - ((yes_width >= no_width) ? (yes_width) : (no_width)))) >> 1; font_print_large(text_x, menu_height - 0x28, 0x80FFA888, get_help_message_text(0x524B), -1); font_print_large(text_x, menu_height - 0x14, 0x80FFA888, get_help_message_text(0x524F), -1); do_gif_paging(); diff --git a/src/ui/menus/selection/build_filtered_menu_item_list.c b/src/ui/menus/selection/build_filtered_menu_item_list.c index d614f5be68..8bca37bd21 100644 --- a/src/ui/menus/selection/build_filtered_menu_item_list.c +++ b/src/ui/menus/selection/build_filtered_menu_item_list.c @@ -2,10 +2,10 @@ struct Item { u16 icon; - s16 unk2; - s16 unk4; + s16 frame; /* 0x2: MenuGridCell.frame */ + s16 kind; /* 0x4: MenuGridCell.kind, 0 = item */ s16 id; - s16 index; + s16 index; /* 0x8 */ }; #include "rnc/game/item_state.h" @@ -36,8 +36,8 @@ s32 build_filtered_menu_item_list(void) { if (item_available[id] != 0) { item_info = &menu_item_info[id]; filtered_menu_item_records[filtered_item_count].icon = item_info->icon; - filtered_menu_item_records[filtered_item_count].unk2 = 0; - filtered_menu_item_records[filtered_item_count].unk4 = 0; + filtered_menu_item_records[filtered_item_count].frame = 0; + filtered_menu_item_records[filtered_item_count].kind = 0; filtered_menu_item_records[filtered_item_count].id = id; gadget_help_name_text_ids[filtered_item_count] = item_info->name_text; gadget_help_text_ids[filtered_item_count] = item_info->description_text; @@ -55,7 +55,7 @@ extern __typeof__(build_filtered_menu_item_list) func_002216C0 /* Written by build_filtered_menu_item_list: at most one entry per candidate (14). */ struct Item filtered_menu_item_records[14] = {0}; -/* Text ids of each entry's item (menu_item_info unk40 / unk44), the tables of +/* Text ids of each entry's item (menu_item_info name_text / description_text), the tables of the Help / Gadgets name and text labels. */ s32 gadget_help_name_text_ids[14] = {0}; diff --git a/src/ui/menus/system/update_menu_system.c b/src/ui/menus/system/update_menu_system.c index a41c77dfe2..1d70f4824b 100644 --- a/src/ui/menus/system/update_menu_system.c +++ b/src/ui/menus/system/update_menu_system.c @@ -16,19 +16,19 @@ struct Ent3 { u8 pad0[0x10]; - u8 unk10; + u8 frame_count; /* 0x10: AnimSeq frame count */ }; struct Ent2 { u8 pad0[0x48]; - struct Ent3 *unk48[1]; + struct Ent3 *seqs[1]; /* 0x48: MobyClass.seqs */ }; struct Ent { u8 pad0[0x24]; - struct Ent2 *unk24; + struct Ent2 *pclass; /* 0x24: Moby.pclass */ u8 pad28[0x30]; - f32 unk58; + f32 anim_speed; /* 0x58: Moby.anim_speed */ }; extern void reset_active_camera_position_and_basis(void) __asm__("func_00218D10"); @@ -118,15 +118,16 @@ void update_menu_system(void) { } if (flag) { s32 current_animation_index = menu_system.current->moby_anims[j]; - set_moby_animation( - panel_slots[j], - current_animation_index, - ((struct Ent *)panel_slots[j])->unk24->unk48[current_animation_index]->unk10 - - 1); - ((struct Ent *)panel_slots[j])->unk58 = -1.0f; + set_moby_animation(panel_slots[j], + current_animation_index, + ((struct Ent *)panel_slots[j]) + ->pclass->seqs[current_animation_index] + ->frame_count - + 1); + ((struct Ent *)panel_slots[j])->anim_speed = -1.0f; } else { set_moby_animation(panel_slots[j], menu_system.next->moby_anims[j], 0); - ((struct Ent *)panel_slots[j])->unk58 = 1.0f; + ((struct Ent *)panel_slots[j])->anim_speed = 1.0f; } } menu_system.state = MENU_SYSTEM_STATE_PAGE_TRANSITION_PENDING; diff --git a/src/ui/menus/weapons/obtain_all_gold_weapons_menu.c b/src/ui/menus/weapons/obtain_all_gold_weapons_menu.c index b543b46b74..4be31ed33f 100644 --- a/src/ui/menus/weapons/obtain_all_gold_weapons_menu.c +++ b/src/ui/menus/weapons/obtain_all_gold_weapons_menu.c @@ -12,8 +12,8 @@ struct MenuPacket { s16 x; /* 0x8: text x */ s16 y; /* 0xA: text y */ u8 pad_C[2]; - u16 end_y; /* 0xE: y below the printed text; the next line starts 0x10 lower */ - s16 unk10; + u16 end_y; /* 0xE: y below the printed text; the next line starts 0x10 lower */ + s16 line_advance; /* 0x10: TextRegion.line_advance */ u8 pad_12[6]; }; @@ -38,7 +38,7 @@ s32 obtain_all_gold_weapons_menu(struct MenuScreen *menu) { memset(&text_window_template, 0, 0x18); text_window_template.height = menu->height; text_window_template.width = menu->width; - text_window_template.unk10 = 0x10; + text_window_template.line_advance = 0x10; packet = text_window_template; setup_gif_paging(0); draw_hud_sprite(get_icon_frame(0xE99A, 6), 4, 0xC, 0x10, 0x10, 0x80); diff --git a/src/ui/menus/widgets/draw_menu_side_indicator.c b/src/ui/menus/widgets/draw_menu_side_indicator.c index bf35b61ed8..5ba6d46ef0 100644 --- a/src/ui/menus/widgets/draw_menu_side_indicator.c +++ b/src/ui/menus/widgets/draw_menu_side_indicator.c @@ -23,7 +23,7 @@ int draw_menu_side_indicator(struct MenuScreen *menu) { Glyph2 indicator_glyph_string; setup_gif_paging(0); - if (menu->data.raw.unk38 != 0) { + if (menu->data.cycle.side != 0) { indicator_glyph_string = *(Glyph2 *)menu_side_indicator_set_glyph_string; font_print_large(4, menu->height / 2 - 8, 0x80FFA888L, &indicator_glyph_string, -1); draw_rotated_sprite(640.0f, diff --git a/src/ui/menus/widgets/enter_menu_help_text.c b/src/ui/menus/widgets/enter_menu_help_text.c index 41d13b207e..60e9e76fcc 100644 --- a/src/ui/menus/widgets/enter_menu_help_text.c +++ b/src/ui/menus/widgets/enter_menu_help_text.c @@ -6,10 +6,6 @@ #include "rnc/audio/music/music_stream_state.h" #include "rnc/ui/menus/menu_screen.h" -struct WordCell { - s32 unk0; -}; - extern s32 help_text_read_destination[] __asm__("D_001D5CF8"); extern void initialize_menu_stream_buffers(s32) __asm__("func_00225AC0"); extern s32 start_audio_stream_read(s32, s32, s32) __asm__("FUN_00216788"); diff --git a/src/ui/vendor/render_vendor_item_details_pass.c b/src/ui/vendor/render_vendor_item_details_pass.c index abe3dbaeb2..f520cf78a6 100644 --- a/src/ui/vendor/render_vendor_item_details_pass.c +++ b/src/ui/vendor/render_vendor_item_details_pass.c @@ -9,9 +9,9 @@ typedef struct { typedef struct { u8 pad_0[0x20]; - s32 unk20; + s32 preview_mobys; /* 0x20: moby list drawn by draw_moby_list, two halves 0x100 apart */ u8 pad_24[0x1C]; - s32 unk40; + s32 discount_ammo_pricing; /* 0x40: as in render_vendor_buy_label_pass */ u8 pad_44[0x14]; s32 sel; u8 pad_5C[0x74]; @@ -50,8 +50,8 @@ void render_vendor_item_details_pass(void) { s32 text_width; draw_framebuffer_rect(0, 0, 0x200, 0x80, 0x200, 0x80, 0); - draw_moby_list(D_001E63C0.unk20 + 0x100, 1); - draw_moby_list(D_001E63C0.unk20, 1); + draw_moby_list(D_001E63C0.preview_mobys + 0x100, 1); + draw_moby_list(D_001E63C0.preview_mobys, 1); if (D_001E63C0.items[D_001E63C0.sel].type == 1) { font_print_small( 6, @@ -62,7 +62,7 @@ void render_vendor_item_details_pass(void) { font_print_small(0x18, 0x18, 0x80F0F0F0, get_help_message_text(0x4F5D), -1); format_scaled_display_value(text, D_001DFFB0[D_001E63C0.items[D_001E63C0.sel].id].c); font_print_right_small(0x76, 0x65, 0x80F0F0F0, text, -1); - if (D_001E63C0.unk40 != 0) { + if (D_001E63C0.discount_ammo_pricing != 0) { text_width = measure_text_width_regular(text, -1); append_screen_rect_packet(0x75 - text_width, 0x6D, 0x7B, 0x70, 0x20959544, 0); append_screen_rect_packet(0x76 - text_width, 0x6D, 0x7A, 0x70, 0x30959544, 0); @@ -72,7 +72,7 @@ void render_vendor_item_details_pass(void) { append_screen_rect_packet(0x7A - text_width, 0x6D, 0x76, 0x70, 0x70959544, 0); append_screen_rect_packet(0x7B - text_width, 0x6D, 0x75, 0x70, 0x80959544, 0); format_scaled_display_value(text, - D_001E63C0.unk40 + D_001E63C0.discount_ammo_pricing ? D_001DFFB0[D_001E63C0.items[D_001E63C0.sel].id].d : D_001DFFB0[D_001E63C0.items[D_001E63C0.sel].id].c); font_print_right_small(0x76, 0x55, 0x80F0F0F0, text, -1); From a73672761bb41f889990c385dcca81ac93661db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:46:26 +0000 Subject: [PATCH 174/213] decomp: name the map state readiness flag, coverage run table and cell scratch buffer --- include/rnc/ui/map/map_state.h | 14 +++++++------- src/check/map_layout_check.c | 2 +- src/overlays/shared/game/run_level_main_loop.c | 17 +++++++++-------- src/ui/map/coverage/save_map_coverage.c | 2 +- src/ui/map/draw_map_overlay.c | 4 ++-- src/ui/map/update_map_zoom_and_pan.c | 2 +- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/include/rnc/ui/map/map_state.h b/include/rnc/ui/map/map_state.h index ef33317ea7..e507c098c1 100644 --- a/include/rnc/ui/map/map_state.h +++ b/include/rnc/ui/map/map_state.h @@ -29,17 +29,17 @@ struct MapHdr; * draw_map_screen_layers and draw_transition_overlay. */ struct MapState { - u8 pad0[0x8]; - s32 unk8; /* 0x008: draw_map_overlay draft tests it with unk2C */ - u8 *mask; /* 0x00C: 512x512 1-bit explored mask of the current level */ - u8 pad10[0x4]; - s32 unk14; /* 0x014: passed with mask to func_001FA860 */ + u8 pad0[0x8]; + s32 scratch_data; /* 0x008: 0x1000-byte heap buffer split into the eight highlighted_cells buffers (level copy); draw_map_overlay draws the cells only while set and unk2C */ + u8 *mask; /* 0x00C: 512x512 1-bit explored mask of the current level */ + u8 pad10[0x4]; + s32 coverage_runs; /* 0x014: byte-pair run table over the 512x512 mask (map archive chunk 2); func_001FA860 packs mask into the save page with it, load_map_chunk unpacks it */ s32 z; /* 0x018: GS Z of the map quads (draw_map_overlay packets) */ struct MapMarker *markers; /* 0x01C: drawn by draw_map_markers, may be null */ struct MapIcon *icons; /* 0x020: icon list of the shown level */ - s32 unk24; /* 0x024: zero: update_map_zoom_and_pan and draw_map_overlay return early */ + s32 map_ready; /* 0x024: set once the level's map archive is loaded or stashed; zero: "no map" text, update_map_zoom_and_pan returns early */ s32 coverage_enabled; /* 0x028: zero: the save page is cleared, not packed */ - s32 unk2C; /* 0x02C: see unk8 */ + s32 unk2C; /* 0x02C: see scratch_data */ struct { s32 cell; /* cell of a 16x16 grid over the map, <0 = unused */ u8 pad4[0xC]; diff --git a/src/check/map_layout_check.c b/src/check/map_layout_check.c index 5af26e5770..581a281f44 100644 --- a/src/check/map_layout_check.c +++ b/src/check/map_layout_check.c @@ -11,7 +11,7 @@ CHECK(MapState, mask, mask, 0xC); CHECK(MapState, markers, markers, 0x1C); CHECK(MapState, icons, icons, 0x20); -CHECK(MapState, unk24, unk24, 0x24); +CHECK(MapState, map_ready, map_ready, 0x24); CHECK(MapState, highlighted_cells, highlighted_cells, 0x30); CHECK(MapState, marker_count, marker_count, 0xB0); CHECK(MapState, zoom, zoom, 0xB4); diff --git a/src/overlays/shared/game/run_level_main_loop.c b/src/overlays/shared/game/run_level_main_loop.c index 149a293a7f..f9b985287f 100644 --- a/src/overlays/shared/game/run_level_main_loop.c +++ b/src/overlays/shared/game/run_level_main_loop.c @@ -338,9 +338,9 @@ typedef struct { s32 scratch_data; s32 mask_data; s32 initialized; - s32 second_raw; + s32 coverage_runs; /* 0x14: MapState.coverage_runs */ u8 pad18[0xc]; - s32 active; + s32 map_ready; /* 0x24: MapState.map_ready */ s32 coverage_enabled; /* 0x28: set while the level has a map archive */ u8 pad2c[4]; MapChunkSlot slots[8]; @@ -458,8 +458,8 @@ void initialize_level_map_archive(void) { state->first_data += 8; state->second_data = state->first_data; second_size = archive[2] - archive[1]; - state->second_raw = hud_heap_alloc(second_size, 0, (char *)heap_tag, 0x2EC); - fast_mem_copy((void *)state->second_raw, (char *)archive + archive[1], second_size); + state->coverage_runs = hud_heap_alloc(second_size, 0, (char *)heap_tag, 0x2EC); + fast_mem_copy((void *)state->coverage_runs, (char *)archive + archive[1], second_size); state->scratch_data = hud_heap_alloc(0x1000, 0, (char *)heap_tag, 0x2F3); for (i = 0; i < 8; i++) { D_L00_001841F0.slots[i].unk0 = -1; @@ -470,7 +470,8 @@ void initialize_level_map_archive(void) { level_data = ((char *)map_coverage_pages) + D_L00_001841F0.archive_index * 0x800; D_L00_001841F0.mask_data = mask_buffer; if (level_data[0] != 0) { - load_map_chunk((void *)D_L00_001841F0.mask_data, level_data, D_L00_001841F0.second_raw); + load_map_chunk( + (void *)D_L00_001841F0.mask_data, level_data, D_L00_001841F0.coverage_runs); } else { decode_map_mask((int *)D_L00_001841F0.mask_data, (unsigned char *)D_L00_001841F0.first_data, @@ -545,7 +546,7 @@ void initialize_render_archive_transfer(void) { send_dma_to_stash_slot(state->buffer, state->file_handle, 0, bytes); state->level_slot = current_level_index + 0x100; state->last_transfer_bytes = bytes; - state->active = 1; + state->map_ready = 1; state->load_state = -2; return; } @@ -558,12 +559,12 @@ void initialize_render_archive_transfer(void) { 0); D_L00_001841F0.level_slot = D_0013D4E1 != 0 ? current_level_index + 0x100 : current_level_index; - D_L00_001841F0.active = 1; + D_L00_001841F0.map_ready = 1; D_L00_001841F0.load_state = -2; return; } } - D_L00_001841F0.active = 0; + D_L00_001841F0.map_ready = 0; } s32 D_L00_00184420[1] __attribute__((section(".data"))) = {0}; diff --git a/src/ui/map/coverage/save_map_coverage.c b/src/ui/map/coverage/save_map_coverage.c index c8474f8dc1..5ad7780fe2 100644 --- a/src/ui/map/coverage/save_map_coverage.c +++ b/src/ui/map/coverage/save_map_coverage.c @@ -19,7 +19,7 @@ void save_map_coverage(s32 map_coverage_buffer) { return; } coverage_save_result = func_001FA860( - map_coverage_buffer, 0x800, level_map_selection.unk14, level_map_selection.mask); + map_coverage_buffer, 0x800, level_map_selection.coverage_runs, level_map_selection.mask); if (coverage_save_result == -1) { downsample_map_coverage(map_coverage_buffer); } diff --git a/src/ui/map/draw_map_overlay.c b/src/ui/map/draw_map_overlay.c index b22ab41add..606873b0f6 100644 --- a/src/ui/map/draw_map_overlay.c +++ b/src/ui/map/draw_map_overlay.c @@ -87,7 +87,7 @@ void draw_map_overlay(void) { s32 label_x, label_y; s32 tile_limit; - if (level_map_selection.unk24 == 0) { + if (level_map_selection.map_ready == 0) { char *text = no_map_available_text; setup_gif_paging(0); @@ -180,7 +180,7 @@ void draw_map_overlay(void) { render_packet_cursor.tag = (struct DmaTag *)((u8 *)render_packet_cursor.tag + 0x50); vu1_add_g_sregister(0x47, 0x360B); - if (level_map_selection.unk2C != 0 && level_map_selection.unk8 != 0) { + if (level_map_selection.unk2C != 0 && level_map_selection.scratch_data != 0) { dx = map_right - map_left; dy = map_bottom - map_top; for (i = 0; i < 8; i++) { diff --git a/src/ui/map/update_map_zoom_and_pan.c b/src/ui/map/update_map_zoom_and_pan.c index 4b99baa9b6..6f49dcb3cd 100644 --- a/src/ui/map/update_map_zoom_and_pan.c +++ b/src/ui/map/update_map_zoom_and_pan.c @@ -15,7 +15,7 @@ int update_map_zoom_and_pan(void) { if (controller_state.pressed & (PAD_SELECT | PAD_R3)) { return 1; } - if (level_map_selection.unk24 == 0) { + if (level_map_selection.map_ready == 0) { return 0; } if (level_map_selection.loaded < 0) { From 01ca44060a94a7d43038921712ad69b224ede57b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:48:26 +0000 Subject: [PATCH 175/213] decomp: name the hero grounded normal, board stick, ground material 6 flag and voice slot 1 --- include/rnc/hero/hero.h | 72 +++++++++---------- src/check/hero_layout_check.c | 6 +- .../hero/apply_hero_ground_material_effects.c | 2 +- .../hero/apply_hero_ground_material_effects.c | 2 +- .../update_hero_motion_for_current_state.c | 4 +- 5 files changed, 42 insertions(+), 44 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index eb50b9a75e..5623b9f3de 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -172,9 +172,6 @@ struct HeroHealth { * code in src/ or src/overlays uses are listed; unkXXX = meaning not known yet, * pad_XXX = no named access. Some level overlays read the item-slot mobys and * 0x2080 as raw bytes, and one view reads 0x560 as an int *. - * Notes on unknown fields: - * unk458 / unk45C - speeds eased in and scaled into velocity (hero_update_hop_velocity) - * unk22DA - nonzero makes FUN_L00_002133a8 call FUN_L00_002347c0 * Item switching (hero_switch_item): a nonzero pending_item[i] that differs * moves into selected_item[i] and changes slot i; saved_item[i] keeps the * slot's item while 0x1C, 0x1D, 6 or 4 is forced in (0x26 when it was empty). @@ -480,7 +477,7 @@ struct Hero { u8 pad_710[0x10]; Vec4 smoothed_steer_stick; /* 0x720 */ u8 pad_730[0x10]; - Vec4 unk740; /* 0x740 */ + Vec4 grounded_normal; /* 0x740: copy of ground_normal while grounded (l16 board update) */ Vec4 landing_displacement; /* 0x750 */ Vec4 board_ground_pos; /* 0x760 */ Vec4 @@ -530,37 +527,38 @@ struct Hero { union { f32 f; s32 i; - } last_ground_z; /* 0x8B8: read as a float, zeroed as an int */ - s16 hoverboard_airborne; /* 0x8BC */ - s16 board_respawn_delay; /* 0x8BE */ - s32 race_position; /* 0x8C0: 1..3 picks the HUD rank string (FUN_L05_00266320) */ - s32 boost_pad_timer; /* 0x8C4 */ - s16 wrong_way_path_point; /* 0x8C8 */ - s16 help_hint_frames; /* 0x8CA */ - s16 boost_min_frames; /* 0x8CC */ - u8 race_ammo; /* 0x8CE */ - u8 shot_cooldown; /* 0x8CF */ - Vec4 unk8D0; /* 0x8D0 */ - s32 swim_entry_frames; /* 0x8E0: frames in the swim entry splash step */ - f32 swim_lean_vel; /* 0x8E4 */ - f32 swim_roll_velocity; /* 0x8E8 */ - f32 swim_yaw_rate; /* 0x8EC */ - s32 puff_timer; /* 0x8F0 */ - s32 swim_thrust_timer; /* 0x8F4 */ - s16 pack_particle_timer; /* 0x8F8 */ - u8 pad_8FA[0x2]; - f32 drown_sink_speed; /* 0x8FC */ - s16 cw_turn_frames; /* 0x900 */ - s16 swim_square_hold_frames; /* 0x902 */ - s16 wake_ring_counter; /* 0x904 */ - s16 spray_counter; /* 0x906 */ - s16 bow_ring_counter; /* 0x908 */ - s16 splash_effect_timer; /* 0x90A */ - s16 swim_hard_press_frames; /* 0x90C */ - s16 jump_button_frames; /* 0x90E */ - s32 swim_cross_tap_count; /* 0x910 */ - s32 last_cross_press_frame; /* 0x914 */ - u8 pad_918[0x8]; + } last_ground_z; /* 0x8B8: read as a float, zeroed as an int */ + s16 hoverboard_airborne; /* 0x8BC */ + s16 board_respawn_delay; /* 0x8BE */ + s32 race_position; /* 0x8C0: 1..3 picks the HUD rank string (FUN_L05_00266320) */ + s32 boost_pad_timer; /* 0x8C4 */ + s16 wrong_way_path_point; /* 0x8C8 */ + s16 help_hint_frames; /* 0x8CA */ + s16 boost_min_frames; /* 0x8CC */ + u8 race_ammo; /* 0x8CE */ + u8 shot_cooldown; /* 0x8CF */ + Vec4 + smoothed_board_stick; /* 0x8D0: board stick smoothed by smooth_and_clamp_value_pair (l16), like smoothed_steer_stick */ + s32 swim_entry_frames; /* 0x8E0: frames in the swim entry splash step */ + f32 swim_lean_vel; /* 0x8E4 */ + f32 swim_roll_velocity; /* 0x8E8 */ + f32 swim_yaw_rate; /* 0x8EC */ + s32 puff_timer; /* 0x8F0 */ + s32 swim_thrust_timer; /* 0x8F4 */ + s16 pack_particle_timer; /* 0x8F8 */ + u8 pad_8FA[0x2]; + f32 drown_sink_speed; /* 0x8FC */ + s16 cw_turn_frames; /* 0x900 */ + s16 swim_square_hold_frames; /* 0x902 */ + s16 wake_ring_counter; /* 0x904 */ + s16 spray_counter; /* 0x906 */ + s16 bow_ring_counter; /* 0x908 */ + s16 splash_effect_timer; /* 0x90A */ + s16 swim_hard_press_frames; /* 0x90C */ + s16 jump_button_frames; /* 0x90E */ + s32 swim_cross_tap_count; /* 0x910 */ + s32 last_cross_press_frame; /* 0x914 */ + u8 pad_918[0x8]; Vec4 move_impulse; /* 0x920: one-frame displacement; the hero update adds it to motion.pos and clears it (some states; zero while running) */ f32 push_length; /* 0x930: length of the move_impulse that build_scaled_hero_move_impulse builds; > 0 enables it */ @@ -684,7 +682,7 @@ struct Hero { u8 selector_3; /* 0x12E6 */ u8 on_magnet_ground; /* 0x12E7 */ u8 selector_5; /* 0x12E8 */ - u8 unk12E9; /* 0x12E9 */ + u8 selector_6; /* 0x12E9: set on ground material 6 */ u8 on_slip_ground; /* 0x12EA */ u8 selector_11; /* 0x12EB */ u8 selector_13; /* 0x12EC */ @@ -811,7 +809,7 @@ struct Hero { s16 delayed_voices [8][4]; /* 0x21D8: delayed voice queue (help_queue_add): busy, entry, timer, argument */ s32 grind_voice; /* 0x2218: voice of sound slot 0, -1 = none (slots 0-7 run to 0x2234, FUN_L00_00206c08) */ - s32 unk221C; /* 0x221C: voice of sound slot 1 */ + s32 voice_slot1; /* 0x221C: voice of sound slot 1 */ s32 voice_slot2; /* 0x2220 */ s32 loop_voice_slot; /* 0x2224: voice of the looping move sound, -1 = none */ s32 voice_slot4; /* 0x2228 */ diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index bbc3242fc9..bf5bfe4757 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -405,7 +405,7 @@ HERO_OFFSET_CHECK(selector_1, 0x12E5); HERO_OFFSET_CHECK(selector_3, 0x12E6); HERO_OFFSET_CHECK(on_magnet_ground, 0x12E7); HERO_OFFSET_CHECK(selector_5, 0x12E8); -HERO_OFFSET_CHECK(unk12E9, 0x12E9); +HERO_OFFSET_CHECK(selector_6, 0x12E9); HERO_OFFSET_CHECK(on_slip_ground, 0x12EA); HERO_OFFSET_CHECK(selector_11, 0x12EB); HERO_OFFSET_CHECK(selector_13, 0x12EC); @@ -540,7 +540,7 @@ HERO_OFFSET_CHECK(trick_rot_y, 0x6D4); HERO_OFFSET_CHECK(tricks_landed, 0x6E0); HERO_OFFSET_CHECK(tricks_landed_count, 0x6F8); HERO_OFFSET_CHECK(smoothed_steer_stick, 0x720); -HERO_OFFSET_CHECK(unk740, 0x740); +HERO_OFFSET_CHECK(grounded_normal, 0x740); HERO_OFFSET_CHECK(landing_displacement, 0x750); HERO_OFFSET_CHECK(board_ground_pos, 0x760); HERO_OFFSET_CHECK(ramp_launch_forward, 0x770); @@ -562,7 +562,7 @@ HERO_OFFSET_CHECK(vert_ramp_launch, 0x88E); HERO_OFFSET_CHECK(air_pose_index, 0x88F); HERO_OFFSET_CHECK(wall_face_yaw, 0x8A4); HERO_OFFSET_CHECK(boost_min_frames, 0x8CC); -HERO_OFFSET_CHECK(unk8D0, 0x8D0); +HERO_OFFSET_CHECK(smoothed_board_stick, 0x8D0); HERO_OFFSET_CHECK(voice_slot6, 0x2230); HERO_OFFSET_CHECK(board_boost_voice, 0x2234); HERO_OFFSET_CHECK(sway_phase, 0x6B0); diff --git a/src/overlays/l05/hero/apply_hero_ground_material_effects.c b/src/overlays/l05/hero/apply_hero_ground_material_effects.c index 027ab95bba..1ffc44f09c 100644 --- a/src/overlays/l05/hero/apply_hero_ground_material_effects.c +++ b/src/overlays/l05/hero/apply_hero_ground_material_effects.c @@ -78,7 +78,7 @@ void apply_hero_ground_material_effects(void) { if (saved_ground_type == 5) hero.selector_5 = 1; if (saved_ground_type == 6) - hero.unk12E9 = 1; + hero.selector_6 = 1; if (saved_ground_type == 4) hero.selector_4 = 1; if (saved_ground_type == GROUND_MATERIAL_SINK_TRIGGER) diff --git a/src/overlays/l16/hero/apply_hero_ground_material_effects.c b/src/overlays/l16/hero/apply_hero_ground_material_effects.c index ac4270a98e..fceb8ce17c 100644 --- a/src/overlays/l16/hero/apply_hero_ground_material_effects.c +++ b/src/overlays/l16/hero/apply_hero_ground_material_effects.c @@ -101,7 +101,7 @@ void apply_hero_ground_material_effects(void) { } if (saved_ground_type == 0x6) { struct Hero *q = &hero; - q->unk12E9 = 1; + q->selector_6 = 1; } if (saved_ground_type == GROUND_MATERIAL_MAGNET) { struct Hero *q = &hero; diff --git a/src/overlays/l16/hero/update_hero_motion_for_current_state.c b/src/overlays/l16/hero/update_hero_motion_for_current_state.c index c834b8d5c3..13fb6bb6a8 100644 --- a/src/overlays/l16/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l16/hero/update_hero_motion_for_current_state.c @@ -906,7 +906,7 @@ void update_hero_motion_for_current_state(void) { } } if (hero.air_frames.s == 0) { - qcopy(&hero.unk740, &hero.ground_normal); + qcopy(&hero.grounded_normal, &hero.ground_normal); if (hero.air_frames.s == 0 && pad_pressed_within(0x40, scale_game_frames(9), 0) != 0) { if (a != 0 || b != 0) { hero.steep_jump = 1; @@ -923,7 +923,7 @@ void update_hero_motion_for_current_state(void) { } } } - smooth_and_clamp_value_pair(&v10, &hero.unk8D0, frame_scale_sq * 0.1f); + smooth_and_clamp_value_pair(&v10, &hero.smoothed_board_stick, frame_scale_sq * 0.1f); if (hero.vert_ramp_launch != 0) { apply_hero_rotation_offset(0.0f, 0.0f, v10.f[0] * (frame_time * 6.2831855f)); } else if (fast_dec_timer_s16(&hero.landing_turn_delay) == 0) { From 2daaaa5c5aa1df77ad60a7da873687c941a2b2c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:53:24 +0000 Subject: [PATCH 176/213] decomp: use the card save flag name in the memory card state initializer --- src/save/memcard_get_name.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/save/memcard_get_name.c b/src/save/memcard_get_name.c index 48fbf6f621..dd9f779cd0 100644 --- a/src/save/memcard_get_name.c +++ b/src/save/memcard_get_name.c @@ -48,7 +48,7 @@ struct MemoryCardState memory_card_state = { .pending_state = -1, .pending_card = -1, .err_card = -1, - .unkF4 = 1, + .card_save_active = 1, }; u8 alternate_item_available[128] = {0}; From 456a98d2c261fa2c8afb4b69cdf893b5b7cee3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:54:32 +0000 Subject: [PATCH 177/213] decomp: name the moby hit attack type and subtype and the hit descriptor bytes that fill them --- include/rnc/overlay/shared/mobys/entities.h | 11 ++++---- include/rnc/overlay/shared/mobys/moby_hit.h | 26 +++++++++++++------ src/check/overlay_types_layout_check.c | 4 +-- .../l02/hero/update_hero_state_motion.c | 4 +-- .../update_hero_motion_for_current_state.c | 4 +-- .../l14/hero/update_hero_motion_by_state.c | 4 +-- .../l17/hero/process_hero_hit_response.c | 4 +-- .../shared/enemies/blarg_space_commando.c | 16 ++++++------ src/overlays/shared/hero/handle_hero_hit.c | 4 +-- src/overlays/shared/hero/hero_frame_update.c | 4 +-- src/overlays/shared/hero/hero_switch_item.c | 2 +- src/overlays/shared/mobys/find_moby_hit.c | 6 ++--- src/overlays/shared/props/electric_water.c | 8 +++--- src/overlays/shared/weapons/turret_shot.c | 20 +++++++------- 14 files changed, 64 insertions(+), 53 deletions(-) diff --git a/include/rnc/overlay/shared/mobys/entities.h b/include/rnc/overlay/shared/mobys/entities.h index aa3d6dcf97..c278966202 100644 --- a/include/rnc/overlay/shared/mobys/entities.h +++ b/include/rnc/overlay/shared/mobys/entities.h @@ -5,17 +5,18 @@ #include "rnc/overlay/shared/math/quad.h" /* + * The level view of the MobyHit records (moby_hit.h). * Per-level table of 0x40-byte entries indexed by the moby byte at +0xA4 * (0xFF = none), e.g. D_L08_00178900. FUN_L08_00222800 uses an entry only - * when owner == that moby and bit 0 of unk24 is set, then stores target in + * when owner == that moby and bit 0 of hit_flags is set, then stores target in * hero.damage_source_moby and aims the hero at pos (flags bit 0) or at target+0x10. */ typedef struct { u8 pad0[0x10]; - OvlQuad pos; /* 0x10: used when flags & 1; w == 5627.9248 is special-cased */ - u8 *target; /* 0x20: moby; its type (+0xA6) picks the hero state */ - s32 unk24; /* 0x24: bit 0 tested */ - u8 unk28; /* 0x28: tested == 4 */ + OvlQuad pos; /* 0x10: used when flags & 1; w == 5627.9248 is special-cased */ + u8 *target; /* 0x20: moby; its type (+0xA6) picks the hero state */ + s32 hit_flags; /* 0x24: MobyHit.flags; bit 0 = hurts the hero */ + u8 attack_type; /* 0x28: MobyHit.attack_type; 4 doubles the upward push */ u8 pad29[7]; s32 flags; /* 0x30: bit 0 = use pos */ u8 *owner; /* 0x34: moby the entry belongs to */ diff --git a/include/rnc/overlay/shared/mobys/moby_hit.h b/include/rnc/overlay/shared/mobys/moby_hit.h index 454104d825..0510e6bbd6 100644 --- a/include/rnc/overlay/shared/mobys/moby_hit.h +++ b/include/rnc/overlay/shared/mobys/moby_hit.h @@ -7,15 +7,25 @@ /* One of the 64 hit records at D_L00_00178100 (per-level copies at other addresses). record_moby_hit and spawn_nearby_effect fill the next one and store its index in the owner moby at +0xA4; find_moby_hit and the hero's - damage check read it back. */ + damage check read it back. + attack_type / attack_subtype come from bytes 0x18 / 0x19 of the hit + descriptor (record_moby_hit). The creature hit resolver (L01 0x26f378, port + moby_update/creature/damage.rs) picks the reaction kind from the pair and + scales an exact push (w 5627.9248) by the type; without an exact push it + treats the hit as type 8. The hero doubles the upward push of type 4. Values + the descriptors use (type / subtype): 0 enemy shots, contact and Ratchet's + body hits (0/1); 1 blaster, suck cannon shot, turret shot (1/1, 1/3), drone + (1/2); 2 explosions and bomb glove; 3 rockets, visibomb, the helicopter and + Ratchet's push on classes 500..540 (3/2, 3/3); 5 tesla claw and pyrocitor + (5/1, 5/3); 7 Giant Clank. */ typedef struct { - OvlVec4 position; /* 0x00 */ - OvlVec4 direction; /* 0x10: the hero is knocked back along it when has_direction is set */ - u8 *source_moby; /* 0x20: becomes hero.damage_source_moby */ - s32 flags; /* 0x24: tested against the caller's mask */ - u8 unk28; - u8 unk29; - u16 source_class; /* 0x2A: oclass of source_moby */ + OvlVec4 position; /* 0x00 */ + OvlVec4 direction; /* 0x10: the hero is knocked back along it when has_direction is set */ + u8 *source_moby; /* 0x20: becomes hero.damage_source_moby */ + s32 flags; /* 0x24: tested against the caller's mask */ + u8 attack_type; /* 0x28: kind of attack (see above) */ + u8 attack_subtype; /* 0x29: 1..3, picks the creature reaction within a type */ + u16 source_class; /* 0x2A: oclass of source_moby */ f32 damage; /* 0x2C: taken off hero.vehicle_hp; a weaker hit does not replace the owner's */ s32 has_direction; /* 0x30: set when direction is longer than 0.0001 */ void *owner; /* 0x34: the moby that was hit */ diff --git a/src/check/overlay_types_layout_check.c b/src/check/overlay_types_layout_check.c index a9fd94500b..aedf0ca06d 100644 --- a/src/check/overlay_types_layout_check.c +++ b/src/check/overlay_types_layout_check.c @@ -14,8 +14,8 @@ OFFSET_CHECK(hit_normal_x, CollisionHit, normal_x, 0x40); OFFSET_CHECK(hit_normal_z, CollisionHit, normal_z, 0x48); OFFSET_CHECK(link_pos, OvlMobyEntry40, pos, 0x10); OFFSET_CHECK(link_target, OvlMobyEntry40, target, 0x20); -OFFSET_CHECK(link_unk24, OvlMobyEntry40, unk24, 0x24); -OFFSET_CHECK(link_unk28, OvlMobyEntry40, unk28, 0x28); +OFFSET_CHECK(link_hit_flags, OvlMobyEntry40, hit_flags, 0x24); +OFFSET_CHECK(link_attack_type, OvlMobyEntry40, attack_type, 0x28); OFFSET_CHECK(link_flags, OvlMobyEntry40, flags, 0x30); OFFSET_CHECK(link_owner, OvlMobyEntry40, owner, 0x34); SIZE_CHECK(moby_link, OvlMobyEntry40, 0x40); diff --git a/src/overlays/l02/hero/update_hero_state_motion.c b/src/overlays/l02/hero/update_hero_state_motion.c index 90f538bbad..1902bf9574 100644 --- a/src/overlays/l02/hero/update_hero_state_motion.c +++ b/src/overlays/l02/hero/update_hero_state_motion.c @@ -207,7 +207,7 @@ s32 process_hero_hurt_response(s32 apply_hurt_response) { if (hurt_response_entry->owner != hero_moby) { return 0; } - if ((hurt_response_entry->unk24 ^ 1) & 1) { + if ((hurt_response_entry->hit_flags ^ 1) & 1) { return 0; } D_0013DF88[D_0015ED84_8]++; @@ -253,7 +253,7 @@ s32 process_hero_hurt_response(s32 apply_hurt_response) { vertical_impulse_scale = cached_frame_time * 1.7f; } hero_knockback(&hurt_impulse, flag, planar_impulse_scale, vertical_impulse_scale); - if (flag != 0 && hurt_response_entry->unk28 == 4) { + if (flag != 0 && hurt_response_entry->attack_type == 4) { hurt_impulse.f[2] += hurt_impulse.f[2]; } break; diff --git a/src/overlays/l06/hero/update_hero_motion_for_current_state.c b/src/overlays/l06/hero/update_hero_motion_for_current_state.c index 70cc34933a..6343fbef2f 100644 --- a/src/overlays/l06/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l06/hero/update_hero_motion_for_current_state.c @@ -179,7 +179,7 @@ s32 process_hero_hit_response(s32 apply_hurt_response) { if (hero_hit_entry->owner != hero_moby) { return 0; } - if ((hero_hit_entry->unk24 ^ 1) & 1) { + if ((hero_hit_entry->hit_flags ^ 1) & 1) { return 0; } D_0013DF88[current_level_index]++; @@ -230,7 +230,7 @@ s32 process_hero_hit_response(s32 apply_hurt_response) { } hero_knockback( &hurt_impulse, flag, horizontal_hurt_impulse_scale, vertical_hurt_impulse_scale); - if (flag != 0 && hero_hit_entry->unk28 == 4) { + if (flag != 0 && hero_hit_entry->attack_type == 4) { hurt_impulse.f[2] += hurt_impulse.f[2]; } break; diff --git a/src/overlays/l14/hero/update_hero_motion_by_state.c b/src/overlays/l14/hero/update_hero_motion_by_state.c index 6b0ece68eb..3ab37afe6c 100644 --- a/src/overlays/l14/hero/update_hero_motion_by_state.c +++ b/src/overlays/l14/hero/update_hero_motion_by_state.c @@ -172,7 +172,7 @@ s32 process_hero_hit_reaction(s32 apply_hit_reaction) { if (hero_hit_entry->owner != hero_moby_bytes) { return 0; } - if ((hero_hit_entry->unk24 ^ 1) & 1) { + if ((hero_hit_entry->hit_flags ^ 1) & 1) { return 0; } D_0013DF88[current_level_index]++; @@ -223,7 +223,7 @@ s32 process_hero_hit_reaction(s32 apply_hit_reaction) { } hero_knockback( &knockback_impulse, flag, horizontal_knockback_scale, vertical_knockback_scale); - if (flag != 0 && hero_hit_entry->unk28 == 4) { + if (flag != 0 && hero_hit_entry->attack_type == 4) { knockback_impulse.f[2] += knockback_impulse.f[2]; } break; diff --git a/src/overlays/l17/hero/process_hero_hit_response.c b/src/overlays/l17/hero/process_hero_hit_response.c index 1522ad5ab9..374703d586 100644 --- a/src/overlays/l17/hero/process_hero_hit_response.c +++ b/src/overlays/l17/hero/process_hero_hit_response.c @@ -109,7 +109,7 @@ s32 process_hero_hit_response(s32 apply_state_and_motion_response) { if (hero_moby_entry->owner != hero_moby) { return 0; } - if ((hero_moby_entry->unk24 ^ 1) & 1) { + if ((hero_moby_entry->hit_flags ^ 1) & 1) { return 0; } D_0013DF88[current_level_index]++; @@ -191,7 +191,7 @@ s32 process_hero_hit_response(s32 apply_state_and_motion_response) { z_response = frame_duration * 1.7f; } hero_knockback(&motion_delta, flag, xy_scale, z_response); - if (flag != 0 && hero_moby_entry->unk28 == 4) { + if (flag != 0 && hero_moby_entry->attack_type == 4) { motion_delta.f[2] += motion_delta.f[2]; } break; diff --git a/src/overlays/shared/enemies/blarg_space_commando.c b/src/overlays/shared/enemies/blarg_space_commando.c index 82d7c2a8b7..811a085743 100644 --- a/src/overlays/shared/enemies/blarg_space_commando.c +++ b/src/overlays/shared/enemies/blarg_space_commando.c @@ -36,8 +36,8 @@ enum { typedef struct { u8 pad0[0x18]; - u8 unk18; - u8 unk19; + u8 attack_type; /* 0x18: MobyHit.attack_type */ + u8 attack_subtype; /* 0x19: MobyHit.attack_subtype */ s16 oclass; u8 pad1C[0x14]; } ShotInfo; @@ -340,8 +340,8 @@ void blarg_space_commando_update(struct Moby *moby) { movement_output_or_hit_vector_or_path_point.f[2] = 1.0f; movement_output_or_hit_vector_or_path_point.f[3] = 5627.925f; make_hit_descriptor(&shot, moby, 1, &movement_output_or_hit_vector_or_path_point, 1.0f); - shot.unk18 = 0; - shot.unk19 = 1; + shot.attack_type = 0; + shot.attack_subtype = 1; shot.oclass = moby->oclass; sweep_hit_segment(&position_or_movement_vector, &movement_input_or_output_or_melee_origin, @@ -419,8 +419,8 @@ void blarg_space_commando_update(struct Moby *moby) { movement_output_or_hit_vector_or_path_point.f[2] = 1.0f; movement_output_or_hit_vector_or_path_point.f[3] = 5627.925f; make_hit_descriptor(&shot, moby, 1, &movement_output_or_hit_vector_or_path_point, 1.0f); - shot.unk18 = 0; - shot.unk19 = 1; + shot.attack_type = 0; + shot.attack_subtype = 1; shot.oclass = moby->oclass; sweep_hit_segment(&position_or_movement_vector, &movement_input_or_output_or_melee_origin, @@ -888,8 +888,8 @@ void update_blarg_space_commando_beam(void *owner_moby) { } make_hit_descriptor(&shot, (struct Moby *)moby, hit_type, point, 1.0f); shot.oclass = MOBY(moby)->oclass; - shot.unk18 = 0; - shot.unk19 = 1; + shot.attack_type = 0; + shot.attack_subtype = 1; collision_line(&beam_state->pts[j], &beam_state->pts[j + 1], 0, moby, &shot); } } diff --git a/src/overlays/shared/hero/handle_hero_hit.c b/src/overlays/shared/hero/handle_hero_hit.c index 452fad73a4..52c9520502 100644 --- a/src/overlays/shared/hero/handle_hero_hit.c +++ b/src/overlays/shared/hero/handle_hero_hit.c @@ -57,7 +57,7 @@ s32 handle_hero_hit(s32 apply_response) { if (hero_moby_entry->owner != hero_moby) { return 0; } - if ((hero_moby_entry->unk24 ^ 1) & 1) { + if ((hero_moby_entry->hit_flags ^ 1) & 1) { return 0; } D_0013DF88[current_level_index]++; @@ -139,7 +139,7 @@ s32 handle_hero_hit(s32 apply_response) { z_response_amount = frame_time_scale * 1.7f; } hero_knockback(&response_vector, flag, xy_response_scale, z_response_amount); - if (flag != 0 && hero_moby_entry->unk28 == 4) { + if (flag != 0 && hero_moby_entry->attack_type == 4) { response_vector.f[2] += response_vector.f[2]; } break; diff --git a/src/overlays/shared/hero/hero_frame_update.c b/src/overlays/shared/hero/hero_frame_update.c index 3e7741c612..cba4c821a7 100644 --- a/src/overlays/shared/hero/hero_frame_update.c +++ b/src/overlays/shared/hero/hero_frame_update.c @@ -862,7 +862,7 @@ s32 process_hero_hit_response(s32 apply_state_and_motion_response) { if (hero_moby_entry->owner != hero_moby) { return 0; } - if ((hero_moby_entry->unk24 ^ 1) & 1) { + if ((hero_moby_entry->hit_flags ^ 1) & 1) { return 0; } D_0013DF88[current_level_index]++; @@ -940,7 +940,7 @@ s32 process_hero_hit_response(s32 apply_state_and_motion_response) { vertical_amount = cached_frame_time * 1.7f; } hero_knockback(&motion_delta, flag, horizontal_scale, vertical_amount); - if (flag != 0 && hero_moby_entry->unk28 == 4) { + if (flag != 0 && hero_moby_entry->attack_type == 4) { motion_delta.f[2] += motion_delta.f[2]; } break; diff --git a/src/overlays/shared/hero/hero_switch_item.c b/src/overlays/shared/hero/hero_switch_item.c index 64d4c1cb98..a356863e57 100644 --- a/src/overlays/shared/hero/hero_switch_item.c +++ b/src/overlays/shared/hero/hero_switch_item.c @@ -2591,7 +2591,7 @@ s32 hero_check_damage(s32 apply_damage_response) { } hero_knockback( &knockback_vector, flag, horizontal_knockback_strength, vertical_knockback_strength); - if (flag != 0 && hero_hit_entry->unk28 == 4) { + if (flag != 0 && hero_hit_entry->attack_type == 4) { knockback_vector.f[2] += knockback_vector.f[2]; } break; diff --git a/src/overlays/shared/mobys/find_moby_hit.c b/src/overlays/shared/mobys/find_moby_hit.c index cec664bcb0..c0866461b1 100644 --- a/src/overlays/shared/mobys/find_moby_hit.c +++ b/src/overlays/shared/mobys/find_moby_hit.c @@ -171,7 +171,7 @@ typedef unsigned int u128_259a88 __attribute__((mode(TI), aligned(16))); typedef struct { u128_259a88 v; int x, y; - unsigned char b0, b1; + unsigned char attack_type, attack_subtype; unsigned short s; float f; int flag; @@ -205,8 +205,8 @@ void record_moby_hit(struct Moby *owner_moby, L_259a88 *hit_descriptor) { qcopy(&moby_hits[i].direction, &hit_descriptor->v); hit_record->source_moby = (u8 *)hit_descriptor->x; hit_record->flags = hit_descriptor->y; - hit_record->unk28 = hit_descriptor->b0; - hit_record->unk29 = hit_descriptor->b1; + hit_record->attack_type = hit_descriptor->attack_type; + hit_record->attack_subtype = hit_descriptor->attack_subtype; hit_record->source_class = hit_descriptor->s; hit_record->damage = hit_descriptor->f; hit_record->has_direction = hit_descriptor->flag; diff --git a/src/overlays/shared/props/electric_water.c b/src/overlays/shared/props/electric_water.c index 324c149edf..464badcb41 100644 --- a/src/overlays/shared/props/electric_water.c +++ b/src/overlays/shared/props/electric_water.c @@ -47,8 +47,8 @@ typedef struct { float v[4]; struct Moby *attacker; int flags; - unsigned char unk18; - unsigned char unk19; + unsigned char attack_type; /* 0x18: MobyHit.attack_type */ + unsigned char attack_subtype; /* 0x19: MobyHit.attack_subtype */ unsigned short attacker_class; float damage; char reserved[16]; @@ -372,11 +372,11 @@ void electric_water_update(struct Moby *moby) { hit.v[1] = fast_sin(moby->rot.z) * 0.2f; hit.v[2] = 0.0f; set_vector_length_xy(hit.v, hit.v, 1.0f); - hit.unk19 = 1; + hit.attack_subtype = 1; hit.attacker_class = moby->oclass; hit.v[2] = 1.0f; hit.v[3] = 5627.9248f; - hit.unk18 = 0; + hit.attack_type = 0; record_moby_hit(hero.moby, &hit); if (moby->state == ELECTRIC_WATER_OFF) { D_L15_0015F448 = electric_water_controller_vars->saved_fog[0]; diff --git a/src/overlays/shared/weapons/turret_shot.c b/src/overlays/shared/weapons/turret_shot.c index 9dc0ba7d6f..66aa8db094 100644 --- a/src/overlays/shared/weapons/turret_shot.c +++ b/src/overlays/shared/weapons/turret_shot.c @@ -30,14 +30,14 @@ typedef struct { /* Optional query block for collision_line: a swept probe along dir. */ typedef struct { - OvlVec4 dir; /* 0x00: unit direction; z/w overwritten with 1 and a range */ - struct Moby *self; /* 0x10: moby to ignore */ - s32 mask; /* 0x14: collision classes */ - u8 unk18; - u8 unk19; - s16 oclass; /* 0x1A */ - f32 radius; /* 0x1C */ - s32 has_direction; /* 0x20: MobyHit.has_direction */ + OvlVec4 dir; /* 0x00: unit direction; z/w overwritten with 1 and a range */ + struct Moby *self; /* 0x10: moby to ignore */ + s32 mask; /* 0x14: collision classes */ + u8 attack_type; /* 0x18: MobyHit.attack_type */ + u8 attack_subtype; /* 0x19: MobyHit.attack_subtype */ + s16 oclass; /* 0x1A */ + f32 radius; /* 0x1C */ + s32 has_direction; /* 0x20: MobyHit.has_direction */ } CollisionProbe; extern u8 *spawn_source_attached_fading_effect_particle(f32, struct Moby *, u32, s32, s32) __asm__("FUN_L00_0026daa0"); @@ -167,8 +167,8 @@ void turret_shot_update(struct Moby *projectile_moby) { probe = ≺ pr.dir.f[2] = 1.0f; pr.dir.f[3] = 5627.9248f; - pr.unk18 = 1; - pr.unk19 = 3; + pr.attack_type = 1; + pr.attack_subtype = 3; pr.oclass = projectile_moby->oclass; } if (fast_dec_timer_s16(&projectile_vars->life) && projectile_moby->command == 0) { From c55cdd6549a41901993c496b07dc33e83e81a87a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:55:48 +0000 Subject: [PATCH 178/213] decomp: name the hit resolver attack type fields, the tesla target hit cooldown and the chicken class LOD byte --- include/rnc/overlay/shared/mobys/moby_hit.h | 7 ++-- src/mobys/resolve_moby_hit_response.c | 34 +++++++++---------- src/overlays/shared/pickups/crate.c | 2 +- .../shared/weapons/morphoray_chicken.c | 2 +- src/overlays/shared/weapons/tesla_claw_beam.c | 7 ++-- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/rnc/overlay/shared/mobys/moby_hit.h b/include/rnc/overlay/shared/mobys/moby_hit.h index 0510e6bbd6..105be3fe1d 100644 --- a/include/rnc/overlay/shared/mobys/moby_hit.h +++ b/include/rnc/overlay/shared/mobys/moby_hit.h @@ -9,10 +9,9 @@ store its index in the owner moby at +0xA4; find_moby_hit and the hero's damage check read it back. attack_type / attack_subtype come from bytes 0x18 / 0x19 of the hit - descriptor (record_moby_hit). The creature hit resolver (L01 0x26f378, port - moby_update/creature/damage.rs) picks the reaction kind from the pair and - scales an exact push (w 5627.9248) by the type; without an exact push it - treats the hit as type 8. The hero doubles the upward push of type 4. Values + descriptor (record_moby_hit). resolve_moby_hit_response picks the reaction + kind from the pair and scales an exact push (w 5627.9248) by the type; + without an exact push it treats the hit as type 8. The hero doubles the upward push of type 4. Values the descriptors use (type / subtype): 0 enemy shots, contact and Ratchet's body hits (0/1); 1 blaster, suck cannon shot, turret shot (1/1, 1/3), drone (1/2); 2 explosions and bomb glove; 3 rockets, visibomb, the helicopter and diff --git a/src/mobys/resolve_moby_hit_response.c b/src/mobys/resolve_moby_hit_response.c index 987423b530..4ec6e555d6 100644 --- a/src/mobys/resolve_moby_hit_response.c +++ b/src/mobys/resolve_moby_hit_response.c @@ -28,9 +28,9 @@ typedef struct { } u; T_25a478 *tgt; u8 pad24[4]; - u8 state; - u8 sub; - u16 kind; + u8 attack_type; /* 0x28: MobyHit.attack_type */ + u8 attack_subtype; /* 0x29 */ + u16 source_class; /* 0x2A */ f32 f2C; } P_25a478; @@ -95,7 +95,7 @@ s32 resolve_moby_hit_response(O_25a478 *hit_recipient_moby, SUBSTATE_GATED_COOLDOWN_DAMAGE_CLEARING_HIT_STATE = 7 }; enum { - FALLBACK_RESPONSE_HIT_STATE = 8 + FALLBACK_ATTACK_TYPE = 8 }; enum { FALLBACK_HIT_KIND = 0x47 @@ -146,8 +146,8 @@ s32 resolve_moby_hit_response(O_25a478 *hit_recipient_moby, V_25a478 *hit_vector = &hit_record->u.pos; fast_vec_scale(hit_vector, hit_vector, - hit_vector_scale_table[hit_vector_scale_row][hit_record->state]); - kind = hit_record->kind; + hit_vector_scale_table[hit_vector_scale_row][hit_record->attack_type]); + kind = hit_record->source_class; hit_record->u.s.f1C = 5627.9248f; if (kind == FALLBACK_HIT_KIND) { hit_blend_vector.f[0] = @@ -166,28 +166,28 @@ s32 resolve_moby_hit_response(O_25a478 *hit_recipient_moby, } } else { if (!hit_record->tgt) { - hit_record->state = FALLBACK_RESPONSE_HIT_STATE; + hit_record->attack_type = FALLBACK_ATTACK_TYPE; kind = FALLBACK_HIT_KIND; } else { kind = hit_record->tgt->hA6; - hit_record->state = FALLBACK_RESPONSE_HIT_STATE; + hit_record->attack_type = FALLBACK_ATTACK_TYPE; } } - switch (hit_record->state) { + switch (hit_record->attack_type) { case KIND_GATED_HIT_STATE: - if (hit_record->kind == 1 || hit_record->kind == 2) { + if (hit_record->source_class == 1 || hit_record->source_class == 2) { *hit_status_output = 2; hit_response_index = 0; break; } goto dflt; case SUBSTATE_GATED_DAMAGE_PRESERVING_HIT_STATE: - if (hit_record->sub < 2) { + if (hit_record->attack_subtype < 2) { *hit_status_output = 2; hit_response_index = 0xB; break; } - if (hit_record->sub == 2) { + if (hit_record->attack_subtype == 2) { *hit_status_output = 2; hit_response_index = 5; break; @@ -196,7 +196,7 @@ s32 resolve_moby_hit_response(O_25a478 *hit_recipient_moby, hit_response_index = 9; break; case SUBSTATE_GATED_HIT_STATE: - if (hit_record->sub < 2) { + if (hit_record->attack_subtype < 2) { *hit_status_output = 2; hit_response_index = 8; break; @@ -205,12 +205,12 @@ s32 resolve_moby_hit_response(O_25a478 *hit_recipient_moby, hit_response_index = 0xD; break; case COOLDOWN_RESETTING_HIT_STATE: - if (hit_record->sub < 2) { + if (hit_record->attack_subtype < 2) { *hit_status_output = 2; hit_response_index = 0xA; break; } - if (hit_record->sub < 3) { + if (hit_record->attack_subtype < 3) { *hit_status_output = 2; hit_response_index = 0xF; break; @@ -225,7 +225,7 @@ s32 resolve_moby_hit_response(O_25a478 *hit_recipient_moby, hit_response_index = 0xE; break; case SUBSTATE_GATED_AUXILIARY_FLAG_HIT_STATE: - if (hit_record->sub < 2) { + if (hit_record->attack_subtype < 2) { *hit_status_output = 3; hit_response_index = 4; break; @@ -234,7 +234,7 @@ s32 resolve_moby_hit_response(O_25a478 *hit_recipient_moby, hit_response_index = 7; break; case SUBSTATE_GATED_COOLDOWN_DAMAGE_CLEARING_HIT_STATE: - if (hit_record->sub < 2) { + if (hit_record->attack_subtype < 2) { *hit_status_output = 2; hit_response_index = 0xC; break; diff --git a/src/overlays/shared/pickups/crate.c b/src/overlays/shared/pickups/crate.c index af5edd42c6..01d119cb6f 100644 --- a/src/overlays/shared/pickups/crate.c +++ b/src/overlays/shared/pickups/crate.c @@ -252,7 +252,7 @@ extern int get_first_moby_in_group(struct Moby **, int, int, int) __asm__("FUN extern int get_next_moby_in_group(struct Moby **, struct Moby *, int, int) __asm__("FUN_L00_002592b8"); -/* D_L00_001C40B0 rows (0x18 bytes); unkE is compared with weapon_ammo_counts. */ +/* D_L00_001C40B0 rows (0x18 bytes); hE (the ammo capacity) is compared with weapon_ammo_counts. */ void crate_update(struct Moby *moby) __asm__("FUN_L00_002cf218"); diff --git a/src/overlays/shared/weapons/morphoray_chicken.c b/src/overlays/shared/weapons/morphoray_chicken.c index 15d77f3b73..a2b93c890b 100644 --- a/src/overlays/shared/weapons/morphoray_chicken.c +++ b/src/overlays/shared/weapons/morphoray_chicken.c @@ -53,7 +53,7 @@ typedef struct { /* Class header view: pclass + 0xE and + 0x10. */ typedef struct { u8 pad00[0xE]; - u8 unkE; + u8 lod_trans; /* 0xE: MobyClass.lod_trans */ u8 pad0F; u32 collision; /* 0x10: the class's default moby collision */ } Part; diff --git a/src/overlays/shared/weapons/tesla_claw_beam.c b/src/overlays/shared/weapons/tesla_claw_beam.c index 20cb7f3e30..6df8e338bd 100644 --- a/src/overlays/shared/weapons/tesla_claw_beam.c +++ b/src/overlays/shared/weapons/tesla_claw_beam.c @@ -36,8 +36,9 @@ typedef struct { short count3e; short target_timer; short second_timer; - short unk44; - short second_target_hit_cooldown; + short + target_hit_cooldown; /* 0x44: frames before the target is hit again; tested with target_timer in one word */ + short second_target_hit_cooldown; } WalloperBeam; typedef struct { @@ -1226,7 +1227,7 @@ void build_beam_and_arc_points(struct Moby *beam_owner_moby) { aim = (char *)get_moby_target_info(beam_state->target); if (aim && *(short *)(aim + 4) == 1) frames = 1; - beam_state->unk44 = scale_game_frames(frames); + beam_state->target_hit_cooldown = scale_game_frames(frames); } } if (beam_state->second_target && From 0d5a49badd8a7a677abaf218bcaa73efd32382d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:57:15 +0000 Subject: [PATCH 179/213] decomp: name the screen point, tie texture bases, transition overlay size, shrub switch, light flags and view GIF tag --- include/rnc/rendering/view.h | 6 +++--- src/rendering/effects/draw_transition_overlay.c | 12 ++++++------ src/rendering/lights/detach_point_light.c | 8 ++++---- src/rendering/shrubs/draw_shrubs.c | 4 ++-- src/rendering/texture/patch_tie_texture_fields.c | 12 ++++++------ src/rendering/view/project_to_screen.c | 12 ++++++------ src/rendering/view/update_view_context.c | 6 +++--- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/include/rnc/rendering/view.h b/include/rnc/rendering/view.h index 446293c65b..2139d5b063 100644 --- a/include/rnc/rendering/view.h +++ b/include/rnc/rendering/view.h @@ -12,9 +12,9 @@ derives the projection matrices, scales and fog packet words. */ struct View { s32 fog_color; - s32 unk4; - s32 unk8; - s32 unkC; + s32 gif_tag_hi; /* 0x04: 0x103E4000, GIFtag bits 32..63 (NREG 1, PRE, PRIM) */ + s32 gif_tag_regs; /* 0x08: 0xE, register descriptor A+D */ + s32 gif_tag_regs_hi; /* 0x0C */ Vec4 regs[5]; Vec4 gif[4]; f32 near_clip; diff --git a/src/rendering/effects/draw_transition_overlay.c b/src/rendering/effects/draw_transition_overlay.c index 9037f81bb4..49ad408a38 100644 --- a/src/rendering/effects/draw_transition_overlay.c +++ b/src/rendering/effects/draw_transition_overlay.c @@ -3,10 +3,10 @@ struct TransitionState { u8 pad_0[0x38]; - s32 unk38; - s32 unk3C; + s32 texture_width; /* 0x38: MenuStreamData.texture_width */ + s32 texture_height; /* 0x3C */ u8 pad_40[0x4]; - s32 unk44; + s32 state; /* 0x44: MenuStreamData.state; below 2 nothing is drawn */ }; #include "rnc/ui/map/map_state.h" @@ -16,7 +16,7 @@ extern void draw_textured_quad() __asm__("func_001F5450"); s32 draw_transition_overlay(struct TransitionState *transition) __asm__("FUN_0021fc68"); s32 draw_transition_overlay(struct TransitionState *transition) { - if (transition->unk44 < 2) { + if (transition->state < 2) { return 0; } draw_textured_quad(0, @@ -25,8 +25,8 @@ s32 draw_transition_overlay(struct TransitionState *transition) { fs_aa_buffer.target_height, 0, 0, - transition->unk38, - transition->unk3C, + transition->texture_width, + transition->texture_height, ((u64)0x8080 << 16) | 0x8080, level_map_selection.tex0); return 0x10; diff --git a/src/rendering/lights/detach_point_light.c b/src/rendering/lights/detach_point_light.c index d18fecaa79..b57e4275a2 100644 --- a/src/rendering/lights/detach_point_light.c +++ b/src/rendering/lights/detach_point_light.c @@ -5,7 +5,7 @@ struct ShrubLightLink { u8 pad_0[0x1B]; - u8 unk1B; + u8 refresh_pending; /* set once all four light slots are empty, as for tfrags */ u8 pad_1C[0x2]; u16 packed_lights; }; @@ -18,7 +18,7 @@ struct TfragLightLink { struct TieLightLink { u8 pad_0[0x1B]; - u8 unk1B; + u8 refresh_pending; /* set once all four light slots are empty, as for tfrags */ u8 pad_1C[0x2]; u16 packed_lights; }; @@ -86,7 +86,7 @@ void detach_point_light(s32 light_index) { } tie_index_cursor += 1; if (tie_packed_lights == 0xFFFF) { - tie_link->unk1B = 1; + tie_link->refresh_pending = 1; } tie_link->packed_lights = tie_packed_lights; } while (tie_index_cursor != tie_indices_end_address); @@ -144,7 +144,7 @@ void detach_point_light(s32 light_index) { } shrub_index_cursor += 1; if (shrub_packed_lights == 0xFFFF) { - shrub_link->unk1B = 1; + shrub_link->refresh_pending = 1; } shrub_link->packed_lights = shrub_packed_lights; } while (shrub_index_cursor != shrub_indices_end_address); diff --git a/src/rendering/shrubs/draw_shrubs.c b/src/rendering/shrubs/draw_shrubs.c index 5ef136b185..1c9d0b69f5 100644 --- a/src/rendering/shrubs/draw_shrubs.c +++ b/src/rendering/shrubs/draw_shrubs.c @@ -7,7 +7,7 @@ extern const char shrub_textures_label[] __asm__("D_001603B0"); extern const char shrub_draw_label[] __asm__("D_001603C0"); struct ShrubDrawState { - s32 unk0; + s32 enabled; /* draw_config.shrub.enabled (D_0018A2D0 = draw_config + 0x20) */ s32 pad[2]; }; @@ -30,7 +30,7 @@ void draw_shrubs(void) { packet += 0x10; render_packet_cursor.addr = packet; noop_core_callback_secondary(shrub_textures_label, 1); - if (shrub_draw_submission_state.unk0 != 0) { + if (shrub_draw_submission_state.enabled != 0) { flush_cache(0); shrub_proc(); WriteDmaChannel(D_001D8EB0, 0x3200, 0x40); diff --git a/src/rendering/texture/patch_tie_texture_fields.c b/src/rendering/texture/patch_tie_texture_fields.c index b2aa9c2c1b..512deea6ca 100644 --- a/src/rendering/texture/patch_tie_texture_fields.c +++ b/src/rendering/texture/patch_tie_texture_fields.c @@ -2,8 +2,8 @@ #include "rnc/rendering/object_render_class.h" struct Pair { - s16 unk0; - s16 unk2; + s16 tex_base; /* TBP0 for tex0 bits 0..13, 0 = keep */ + s16 mip_base; /* TBP1 for mip bits 0..13, 0 = keep */ }; extern s32 D_001E3000[]; @@ -24,13 +24,13 @@ void patch_tie_texture_fields(void) { render_record = render_class_descriptor->records; for (i = 0; i < render_class_descriptor->record_count; i++, render_record++) { render_address_offsets = &D_001E2A00[render_record->clamp.b[3]]; - if (render_address_offsets->unk0 != 0) { + if (render_address_offsets->tex_base != 0) { render_record->tex0.w[0] = - (render_record->tex0.w[0] & 0xFFFFC000) | render_address_offsets->unk0; + (render_record->tex0.w[0] & 0xFFFFC000) | render_address_offsets->tex_base; } - if (render_address_offsets->unk2 != 0) { + if (render_address_offsets->mip_base != 0) { render_record->mip.w[0] = - (render_record->mip.w[0] & 0xFFFFC000) | render_address_offsets->unk2; + (render_record->mip.w[0] & 0xFFFFC000) | render_address_offsets->mip_base; } } } diff --git a/src/rendering/view/project_to_screen.c b/src/rendering/view/project_to_screen.c index 6d9c4706bf..a340f34412 100644 --- a/src/rendering/view/project_to_screen.c +++ b/src/rendering/view/project_to_screen.c @@ -3,9 +3,9 @@ #include "rnc/math/asm_helpers.h" struct ScreenPoint { - f32 unk0; - f32 unk4; - f32 unk8; + f32 x; /* GS screen x, 1/16 pixel, offset 2048 */ + f32 y; /* GS screen y, 1/16 pixel, offset 2048 */ + f32 depth; /* view-space depth, world units */ }; struct Locals { @@ -44,13 +44,13 @@ void project_to_screen(struct ScreenPoint *screen_out, s32 world_pos) { L.v8C = 1.0f; transform_vector(&L.v90, &L.blk80, &L.v40); scale = D_0018CF10[0] / L.v9C; - screen_out->unk8 = L.v98 * 0.0009765625f; + screen_out->depth = L.v98 * 0.0009765625f; x = L.v90 * scale + 2048.0f; y = L.v94 * scale + 2048.0f; L.v90 = x; L.v94 = y; - screen_out->unk0 = x * 16.0f; - screen_out->unk4 = y * 16.0f; + screen_out->x = x * 16.0f; + screen_out->y = y * 16.0f; } extern __typeof__(project_to_screen) func_001F2070 __attribute__((alias("FUN_001f2070"))); diff --git a/src/rendering/view/update_view_context.c b/src/rendering/view/update_view_context.c index 5d25c977ff..dd33ee63e0 100644 --- a/src/rendering/view/update_view_context.c +++ b/src/rendering/view/update_view_context.c @@ -196,9 +196,9 @@ void update_view_context(void) { view->viewport_aspect.f[2] = 1.0f; view->viewport_aspect.f[3] = 1.0f; view->fog_color = *(s32 *)&view->fog_far_int; - view->unk4 = 0x103E4000; - view->unk8 = 0xE; - view->unkC = 0; + view->gif_tag_hi = 0x103E4000; + view->gif_tag_regs = 0xE; + view->gif_tag_regs_hi = 0; qzero(&view->regs[0]); packet_view = &view_context; From 55a99f21d97268990262aa4a304b84a24b335c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:58:29 +0000 Subject: [PATCH 180/213] decomp: name the l02 sand shark max health and smoke vent mode The sand shark sets its s16 at pvars+0x24 next to health, as the nest and other enemies name max_health; the smoke vent starts in state mode + 1. --- src/overlays/l02/mobys/sand_shark.c | 4 ++-- src/overlays/l02/mobys/smoke_vent.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/overlays/l02/mobys/sand_shark.c b/src/overlays/l02/mobys/sand_shark.c index 313611c06b..3b33f07f23 100644 --- a/src/overlays/l02/mobys/sand_shark.c +++ b/src/overlays/l02/mobys/sand_shark.c @@ -187,7 +187,7 @@ void emit_sand_shark_dust_burst(void *moby) { typedef struct { /* 0x000 */ char pad0[0x20]; /* 0x020 */ float health; - /* 0x024 */ short unk24; + /* 0x024 */ short max_health; /* 0x026 */ char pad26[3]; /* 0x029 */ unsigned char wrench_hit_sound; /* 0x02A */ char pad2A[4]; @@ -337,7 +337,7 @@ void sand_shark_update(struct Moby *moby) { } qcopy(&sand_shark_behavior_vars->home, &moby->pos); qcopy(&sand_shark_behavior_vars->spawn_position, &moby->pos); - sand_shark_behavior_vars->unk24 = 1; + sand_shark_behavior_vars->max_health = 1; sand_shark_behavior_vars->health = 1.0f; sand_shark_behavior_vars->look_range = D_L02_00161900; sand_shark_behavior_vars->unk5C = 1; diff --git a/src/overlays/l02/mobys/smoke_vent.c b/src/overlays/l02/mobys/smoke_vent.c index 9c04ef052c..56d41f4a8e 100644 --- a/src/overlays/l02/mobys/smoke_vent.c +++ b/src/overlays/l02/mobys/smoke_vent.c @@ -117,7 +117,7 @@ s32 l02_alternating_smoke_burst_spawn_options __asm__("D_L02_00162164") = void smoke_vent_update(struct Moby *moby) __asm__("FUN_L02_002ef020"); typedef struct SmokeVentVars { - s8 unk0; + s8 mode; /* placed: the vent starts in state mode + 1 */ u8 pad_1[0xBF]; s32 timer_C0; s32 timer_C4; @@ -162,7 +162,7 @@ void smoke_vent_update(struct Moby *moby) { switch (moby->state) { case SMOKE_VENT_STATE_INITIALIZE: - moby->state = smoke_vent_vars->unk0 + 1; + moby->state = smoke_vent_vars->mode + 1; euler_rotation_basis(&moby->rot_row0, &moby->rot); break; case SMOKE_VENT_STATE_VIEW_GATED_EMISSION: From a059fd8bf9de1b9a63865f6d69f2e7a9e03e5ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:58:29 +0000 Subject: [PATCH 181/213] decomp: name the l06 countdown sequence moby lists and alien queen linked mobys The countdown sequence fields are the moby lists and mobys it puts in states 3, 4, 5, 15, 17 and 18; the alien queen keeps two linked mobys it switches on for the fight and off on death, and the camera id it writes to D_0014162A. --- src/overlays/l06/mobys/alien_queen.c | 21 ++++++------ src/overlays/l06/mobys/countdown_sequence.c | 38 ++++++++++----------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/src/overlays/l06/mobys/alien_queen.c b/src/overlays/l06/mobys/alien_queen.c index f6c3241985..4639bad761 100644 --- a/src/overlays/l06/mobys/alien_queen.c +++ b/src/overlays/l06/mobys/alien_queen.c @@ -387,10 +387,10 @@ typedef struct AlienQueenVars { s32 frog_list; s32 state18_list; s32 cuboid; - s32 unkFC; - s32 unk100; + s32 post_death_linked_moby; /* links on at the start, off after death */ + s32 death_linked_moby; /* links on at the start, off on death */ s32 slider_list; - s32 unk108; + s32 camera; /* written to D_0014162A in states 4-13, -1: none */ s32 animation_update; s32 health_sixteenths; s32 saved_path_point_count; @@ -480,8 +480,8 @@ void alien_queen_update(unsigned char *moby) { } if (alien_queen_update_vars->timer_12C != 0) return; - func_L06_002F6818_q(level_mobys_q + (alien_queen_update_vars->unkFC << 8)); - func_L06_002F6818_q(level_mobys_q + (alien_queen_update_vars->unk100 << 8)); + func_L06_002F6818_q(level_mobys_q + (alien_queen_update_vars->post_death_linked_moby << 8)); + func_L06_002F6818_q(level_mobys_q + (alien_queen_update_vars->death_linked_moby << 8)); set_listed_alien_queen_sliders_state_2_and_data_28_to_one( alien_queen_update_vars->slider_list); alien_queen_update_vars->intro_or_recovery_delay_active = 0; @@ -730,7 +730,7 @@ void alien_queen_update(unsigned char *moby) { alien_queen_update_vars->health_sixteenths = 0; moby[0x30] = 0xFF; if (alien_queen_update_vars->death_control_flags == 2) { - func_L06_002F6790_q(level_mobys_q + (alien_queen_update_vars->unk100 << 8)); + func_L06_002F6790_q(level_mobys_q + (alien_queen_update_vars->death_linked_moby << 8)); set_listed_alien_queen_sliders_state_2_and_clear_data_28( alien_queen_update_vars->slider_list); MOBY(moby)->flags |= 1; @@ -749,7 +749,7 @@ void alien_queen_update(unsigned char *moby) { step[2] = step[2] + 1.0f; func_L00_00260460_q(moby, step, -1, 2.0f, 20.0f); spawn_moby_break_fragments(moby, 0x6A2, 1, 0x6A3, 3, 6, 2); - func_L06_002F6790_q(level_mobys_q + (alien_queen_update_vars->unk100 << 8)); + func_L06_002F6790_q(level_mobys_q + (alien_queen_update_vars->death_linked_moby << 8)); set_listed_alien_queen_sliders_state_2_and_clear_data_28( alien_queen_update_vars->slider_list); moby[0x20] = 0xF; @@ -782,7 +782,8 @@ void alien_queen_update(unsigned char *moby) { } } if (level_game_mode_q == 2) { - func_L06_002F6790_q(level_mobys_q + (alien_queen_update_vars->unkFC << 8)); + func_L06_002F6790_q(level_mobys_q + + (alien_queen_update_vars->post_death_linked_moby << 8)); mark_moby_for_removal(moby); } break; @@ -823,8 +824,8 @@ void update_alien_queen_hit_response_and_recovery(char *moby) { alien_queen_hit_recovery_vars = ((char *)MOBY(moby)->pvars); if (MOBY(moby)->state == ALIEN_QUEEN_STATE_INITIALIZE) return; - if ((unsigned int)(MOBY(moby)->state - 4) < 10 && alien_queen_hit_recovery_vars->unk108 != -1) - D_L06_0014162A = *(short *)&alien_queen_hit_recovery_vars->unk108; + if ((unsigned int)(MOBY(moby)->state - 4) < 10 && alien_queen_hit_recovery_vars->camera != -1) + D_L06_0014162A = *(short *)&alien_queen_hit_recovery_vars->camera; alien_queen_hit_recovery_vars->health_sixteenths = truncate_float_to_s32(alien_queen_hit_recovery_vars->health * 16.0f); dmg = 0.0f; diff --git a/src/overlays/l06/mobys/countdown_sequence.c b/src/overlays/l06/mobys/countdown_sequence.c index 1a61efbcdf..f02df2669f 100644 --- a/src/overlays/l06/mobys/countdown_sequence.c +++ b/src/overlays/l06/mobys/countdown_sequence.c @@ -167,19 +167,19 @@ void set_moby_list_state_17(int moby_list_index) { } typedef struct CountdownSequenceVars { - s32 unk0; - s32 unk4; - s32 unk8; + s32 state_4_list; /* moby list held in state 4 until the countdown starts */ + s32 state_18_list; /* moby lists held in state 18 until the countdown starts */ + s32 state_18_list2; s32 raised_cuboid; /* cuboid moved up by 10 when the countdown starts */ - s32 unk10; - s32 unk14; - s32 unk18; + s32 state_17_list; /* moby list switched to state 17 when the countdown starts */ + s32 state_15_list; /* moby lists switched to state 15 when the countdown starts */ + s32 state_15_list2; s32 watched_group; - s32 unk20; + s32 state_3_moby_index; /* moby set to state 3 when the countdown starts */ s32 path_index; s32 cuboid_28; s32 red_button_moby_index; - s32 unk30; + s32 state_5_moby_index; /* moby set to state 5 when the countdown runs out */ s32 spark_emitter_list; u8 pad_38[0x78]; s32 path_node_counter; @@ -212,9 +212,9 @@ void countdown_sequence_update(unsigned char *moby) { mark_moby_for_removal((struct Obj *)moby); return; } - set_moby_list_state_4(moby_vars->unk0); - set_moby_list_state_18(moby_vars->unk4); - set_moby_list_state_18(moby_vars->unk8); + set_moby_list_state_4(moby_vars->state_4_list); + set_moby_list_state_18(moby_vars->state_18_list); + set_moby_list_state_18(moby_vars->state_18_list2); moby[0x20] = 1; moby[0x30] = 0xFF; return; @@ -239,13 +239,13 @@ void countdown_sequence_update(unsigned char *moby) { request_music_track(6, 9); if (*(short *)dialogue_playback_phase == DIALOGUE_PHASE_READY_TO_CONTINUE) continue_audio_stream_if_ready(); - set_moby_list_state_17(moby_vars->unk10); - set_moby_list_state_15(moby_vars->unk14); - set_moby_list_state_15(moby_vars->unk18); - clear_moby_list_state_4(moby_vars->unk0); - clear_moby_list_state_18(moby_vars->unk4); - clear_moby_list_state_18(moby_vars->unk8); - set_moby_state_3(D_L06_0015FFD8_301b90 + (moby_vars->unk20 << 8)); + set_moby_list_state_17(moby_vars->state_17_list); + set_moby_list_state_15(moby_vars->state_15_list); + set_moby_list_state_15(moby_vars->state_15_list2); + clear_moby_list_state_4(moby_vars->state_4_list); + clear_moby_list_state_18(moby_vars->state_18_list); + clear_moby_list_state_18(moby_vars->state_18_list2); + set_moby_state_3(D_L06_0015FFD8_301b90 + (moby_vars->state_3_moby_index << 8)); { ((LevelCuboid *)((moby_vars->raised_cuboid << 7) + (int)l06_cuboids))->pos.z += 10.0f; p = D_L06_001B0C30_301b90[moby_vars->path_index]; @@ -340,7 +340,7 @@ void countdown_sequence_update(unsigned char *moby) { return; moby[0x20] = 5; x = scale_game_frames(15); - q = D_L06_0015FFD8_301b90 + (moby_vars->unk30 << 8); + q = D_L06_0015FFD8_301b90 + (moby_vars->state_5_moby_index << 8); moby_vars->exit_ramp_progress = 0.0f; moby_vars->timer_BC = x; set_moby_state_5(q); From e3c8e2452a528a2aced35a74c84b51c86418027c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:59:12 +0000 Subject: [PATCH 182/213] decomp: name the l08 shuttle route selection and bomber tank bomb source hit flag select_shuttle_route_for_hero compares and stores its pick at pvars+0x100; the bomb update detonates on its source moby only while pvars+0x14 is set. --- src/overlays/l08/mobys/bomber_tank_bomb.c | 4 ++-- src/overlays/l08/mobys/shuttle.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/overlays/l08/mobys/bomber_tank_bomb.c b/src/overlays/l08/mobys/bomber_tank_bomb.c index bd9c517c9e..25ba8d13f0 100644 --- a/src/overlays/l08/mobys/bomber_tank_bomb.c +++ b/src/overlays/l08/mobys/bomber_tank_bomb.c @@ -65,7 +65,7 @@ char *spawn_bomber_tank_bomb(char *source_moby, typedef struct BomberTankBombVars { u8 pad_0[0x10]; s32 lifetime_timer; - s32 unk14; + s32 can_hit_source; /* nonzero: hitting the source moby detonates it too */ u8 pad_18[0x4]; f32 unk1C; char *source_moby; @@ -83,7 +83,7 @@ char *spawn_bomber_tank_bomb(char *source_moby, char *spawn_position, char *init projectile_vars->source_moby = source_moby; projectile_vars->lifetime_timer = scale_game_frames(0x12C); projectile_vars->unk1C = 1.0f; - projectile_vars->unk14 = 0; + projectile_vars->can_hit_source = 0; qcopy(moby + 0x10, spawn_position); qcopy(projectile_vars, initial_velocity); MOBY(moby)->rot.x = random_float_between(-180.0f, 180.0f) * DEG_TO_RAD; diff --git a/src/overlays/l08/mobys/shuttle.c b/src/overlays/l08/mobys/shuttle.c index c5eb407f76..2160578ba4 100644 --- a/src/overlays/l08/mobys/shuttle.c +++ b/src/overlays/l08/mobys/shuttle.c @@ -39,7 +39,7 @@ typedef struct { u8 spin_state[0x30]; /* 0xB0 */ s16 unkE0; /* 0xE0 */ u8 padE2[0x1E]; - s32 unk100; /* 0x100 */ + s32 route_selection; /* 0x100: route select_shuttle_route_for_hero picked last, -1: none */ u8 pad104[0xC]; Vec4 spin; /* 0x110: x is the wheel angle */ s32 active; /* 0x120 */ @@ -128,7 +128,7 @@ void shuttle_update(struct Moby *moby) { moby->state = SHUTTLE_STATE_NO_PATH; shuttle_vars->ridable = 1; } else { - shuttle_vars->unk100 = -1; + shuttle_vars->route_selection = -1; shuttle_vars->unkE0 = -1; select_shuttle_route_for_hero((char *)moby); moby->state = SHUTTLE_STATE_WAIT_FOR_DEPARTURE; From 5da2eb528ff1b8320513bcdcc7dbae9dacbe8b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 18:59:45 +0000 Subject: [PATCH 183/213] decomp: name the l09 path asteroid node and init fields The spawned asteroids share the spawner's pvars layout, whose update reads pvars+0x14 as the path node and pvars+0x48 as the init flag. --- src/overlays/l09/mobys/asteroid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/overlays/l09/mobys/asteroid.c b/src/overlays/l09/mobys/asteroid.c index cfc9ccf4ce..fbf33013ce 100644 --- a/src/overlays/l09/mobys/asteroid.c +++ b/src/overlays/l09/mobys/asteroid.c @@ -36,14 +36,14 @@ typedef struct { f32 vel[3]; /* 0x00: sideways drift */ f32 speed; /* 0x0C */ s32 path; /* 0x10 */ - s32 unk14; /* 0x14 */ + s32 node; /* 0x14: path node, see Data_2ECC50 */ s32 count; /* 0x18: pebbles spawned (on the spawner) */ u8 pad1C[4]; Vec4 start; /* 0x20 */ Vec4 offset; /* 0x30 */ f32 spin_x; /* 0x40 */ f32 spin_y; /* 0x44 */ - s32 unk48; /* 0x48 */ + s32 init; /* 0x48: 1 skips the spawner set-up */ u8 pad4C[4]; struct Moby *owner; /* 0x50 */ } PebbleVars; @@ -264,8 +264,8 @@ struct Moby *spawn_path_following_asteroid(struct Moby *owner) { ovars->count++; spawned_asteroid_vars->owner = owner; spawned_asteroid_vars->path = ovars->path; - spawned_asteroid_vars->unk48 = 1; - spawned_asteroid_vars->unk14 = 0; + spawned_asteroid_vars->init = 1; + spawned_asteroid_vars->node = 0; spawned_moby->command = 1; spawned_moby->visible = 1; spawned_moby->update_dist = 0xFF; From 64fe6d86c14528c6708e4aac7d2aef4cb6bce78a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:00:55 +0000 Subject: [PATCH 184/213] decomp: name the l12 blarg helicopter respawn flag, rocket hit fields and water tile grid The helicopter resets to its first state after it is destroyed only when pvars+0xC0 is set; the rocket's hit record takes the L16HitDescriptor names; the water tile slots are the shared WaterGrid. --- src/overlays/l12/mobys/blarg_helicopter.c | 34 ++++++++++++----------- src/overlays/l12/mobys/rocket.c | 11 ++++---- src/overlays/l12/mobys/water_tile.c | 16 ++++------- 3 files changed, 29 insertions(+), 32 deletions(-) diff --git a/src/overlays/l12/mobys/blarg_helicopter.c b/src/overlays/l12/mobys/blarg_helicopter.c index d6e268b323..a5a0068c7b 100644 --- a/src/overlays/l12/mobys/blarg_helicopter.c +++ b/src/overlays/l12/mobys/blarg_helicopter.c @@ -160,7 +160,7 @@ typedef struct BlargHelicopterVars { s32 muzzle_index; s16 rockets_fired; s16 target_first_path_endpoint; - s32 unkC0; + s32 respawns; /* nonzero: comes back after it is destroyed */ s32 activation_timer; u8 pad_C8[0x8]; u8 manipulator; @@ -207,7 +207,7 @@ void blarg_helicopter_update(struct Moby *moby) { release_voice_slot(index); blarg_helicopter_vars->voice = -1; } - index = blarg_helicopter_vars->unkC0; + index = blarg_helicopter_vars->respawns; if (current_level_index == LEVEL_HOVEN && D_L12_00161F00 != 0) { if (index == 0) { if (l12_camera.focus_moby == moby) @@ -220,7 +220,7 @@ void blarg_helicopter_update(struct Moby *moby) { mark_moby_for_removal(moby); return; } - index = blarg_helicopter_vars->unkC0; + index = blarg_helicopter_vars->respawns; goto check_mode; } } else { @@ -270,7 +270,7 @@ void blarg_helicopter_update(struct Moby *moby) { blarg_helicopter_vars->commander->flags |= 0x41; } qcopy(&moby->pos, ((char *)l12_paths[blarg_helicopter_vars->initial_path_index]) + 0x10); - if (blarg_helicopter_vars->unkC0 != 0 && blarg_helicopter_vars->activation_timer == 0) { + if (blarg_helicopter_vars->respawns != 0 && blarg_helicopter_vars->activation_timer == 0) { a = scale_game_frames(240); b = scale_game_frames(400); a = FUN_L00_00257b90(a, b); @@ -292,7 +292,7 @@ void blarg_helicopter_update(struct Moby *moby) { int triggered, a; struct Moby *child; triggered = 0; - if (blarg_helicopter_vars->unkC0 && D_L12_00161F00) + if (blarg_helicopter_vars->respawns && D_L12_00161F00) triggered = fast_dec_timer(&blarg_helicopter_vars->activation_timer) != 0; if ((blarg_helicopter_vars->trigger_volume != -1 && is_point_inside_clip_volume(&hero.motion.pos, @@ -314,11 +314,11 @@ void blarg_helicopter_update(struct Moby *moby) { break; } case BLARG_HELICOPTER_FOLLOW_INITIAL_PATH: - if (blarg_helicopter_vars->unkC0 == 0 && l12_camera.focus_moby == 0) { + if (blarg_helicopter_vars->respawns == 0 && l12_camera.focus_moby == 0) { l12_camera.focus_moby = moby; l12_camera.focus_time = 0; } - if (blarg_helicopter_vars->unkC0) { + if (blarg_helicopter_vars->respawns) { count = blarg_helicopter_vars->rocket_fire_timer_frames; limit = D_L12_00161F20 - 3; if (limit > 5) @@ -337,7 +337,7 @@ void blarg_helicopter_update(struct Moby *moby) { if (current_level_index == LEVEL_HOVEN && !D_0013D4CB && !D_00141C50) help_request(0x2ee2, 0x5d); distance = vector_distance_xy(&moby->pos, &hero.motion.pos); - if (blarg_helicopter_vars->unkC0 == 0) { + if (blarg_helicopter_vars->respawns == 0) { if (distance < 21.0f && moby->pos.z - hero.motion.pos.f[2] > 1.0f) { if (l12_camera.focus_moby == 0) { l12_camera.focus_moby = moby; @@ -347,7 +347,8 @@ void blarg_helicopter_update(struct Moby *moby) { l12_camera.focus_moby = 0; } distance = vector_distance_xy(&moby->pos, target); - if ((distance < 40.0f && moby->pos.z - target[2] > -2.0f) || blarg_helicopter_vars->unkC0) { + if ((distance < 40.0f && moby->pos.z - target[2] > -2.0f) || + blarg_helicopter_vars->respawns) { angle = fast_arc_tan(target[0] - moby->pos.x, target[1] - moby->pos.y); moby->rot.z = spring_turn(&blarg_helicopter_vars->yaw_turn_velocity, moby->rot.z, @@ -370,13 +371,13 @@ void blarg_helicopter_update(struct Moby *moby) { moby_point_position(moby, blarg_helicopter_vars->muzzle_index, &position); blarg_helicopter_vars->muzzle_index = blarg_helicopter_vars->muzzle_index == 0; qcopy(&aim, target + 8); - if (blarg_helicopter_vars->unkC0) { + if (blarg_helicopter_vars->respawns) { qcopy(&aim, D_L12_00167240); aim.f[2] += random_float_between(-0.5f, 0.1f); aim.f[0] += randf_sym(0.0f, 0.4f); } fast_vec_sub(&delta, &aim, &position); - if (blarg_helicopter_vars->unkC0) + if (blarg_helicopter_vars->respawns) fast_vec_normalize(&delta, &delta, frame_time * 22.0f); else fast_vec_normalize(&delta, &delta, frame_time * 15.0f); @@ -400,7 +401,7 @@ void blarg_helicopter_update(struct Moby *moby) { spawn_effect(&position, &velocity, color, 255, life, 30, size, 1); } limit = 4; - if (blarg_helicopter_vars->unkC0) { + if (blarg_helicopter_vars->respawns) { if (D_L12_00161F20 > 10) limit = 2; if (D_L12_00161F20 > 6) @@ -490,7 +491,7 @@ void blarg_helicopter_update(struct Moby *moby) { 1, -1, 0); - if (blarg_helicopter_vars->unkC0 == 0) + if (blarg_helicopter_vars->respawns == 0) FUN_L00_00257470(moby, 0, -1); index = blarg_helicopter_vars->voice; if (index != -1 && @@ -498,7 +499,7 @@ void blarg_helicopter_update(struct Moby *moby) { ((VoicePoolWindow *)(D_0013E550 + index * 0x70))->voice.state) release_voice_slot(index); blarg_helicopter_vars->voice = -1; - if (blarg_helicopter_vars->unkC0 == 0) { + if (blarg_helicopter_vars->respawns == 0) { remove: mark_moby_for_removal(moby); return; @@ -528,8 +529,9 @@ void blarg_helicopter_update(struct Moby *moby) { blarg_helicopter_vars->commander->flags |= 6; } } - if (blarg_helicopter_vars->unkC0 == 0 && moby->state > BLARG_HELICOPTER_WAIT_FOR_ACTIVATION && - moby->visible && fast_vec_dist(&moby->pos, D_L12_00167240) < 30.0f) { + if (blarg_helicopter_vars->respawns == 0 && + moby->state > BLARG_HELICOPTER_WAIT_FOR_ACTIVATION && moby->visible && + fast_vec_dist(&moby->pos, D_L12_00167240) < 30.0f) { FUN_L00_0025a120((char *)moby); moby->shadow_range = 24; } diff --git a/src/overlays/l12/mobys/rocket.c b/src/overlays/l12/mobys/rocket.c index 6015d12ce3..ba9f5c7ecc 100644 --- a/src/overlays/l12/mobys/rocket.c +++ b/src/overlays/l12/mobys/rocket.c @@ -82,9 +82,10 @@ typedef struct { typedef struct { float dir[4]; - float unk10[2]; - char unk18; - char unk19; + void *owner; + int flags; + char kind; /* named as in L16HitDescriptor */ + char enabled; short oclass; int pad1C; int pad20[4]; @@ -181,8 +182,8 @@ void rocket_update(struct Moby *moby) { hit.dir[1] = fast_sin(rocket_state->yaw); hit.dir[2] = 1.0f; hit.dir[3] = 5627.9248f; - hit.unk18 = 1; - hit.unk19 = 1; + hit.kind = 1; + hit.enabled = 1; hit.oclass = moby->oclass; record_moby_hit(D_L12_001742C0_lui.moby, &hit); } diff --git a/src/overlays/l12/mobys/water_tile.c b/src/overlays/l12/mobys/water_tile.c index a6f47af78e..1efacf8e33 100644 --- a/src/overlays/l12/mobys/water_tile.c +++ b/src/overlays/l12/mobys/water_tile.c @@ -14,13 +14,7 @@ #include "rnc/overlay/shared/rendering/render_water_grids.h" #include "qcopy.h" #include "rnc/rendering/clip_volume.h" - -typedef struct { - float position[3]; - char unk0C[0x12]; - u16 visibility; - char unk20[0x1170]; -} L12Slot; +#include "rnc/overlay/shared/world/water_grid.h" extern char D_L12_001CBF40_c[] __asm__("D_L12_001CBF40"); extern char D_L12_001CAD00_c[] __asm__("D_L12_001CAD00"); @@ -85,7 +79,7 @@ void level_12_water_tile_update(struct Moby *moby) { { int i = 16; do { - ((L12Slot *)D_L12_001CBF40_c)[i].visibility = 0; + ((WaterGrid *)D_L12_001CBF40_c)[i].visible_subtiles = 0; } while (--i >= 0); } pool_init_tiles(D_L12_001CBF40_c, 17); @@ -121,7 +115,7 @@ void level_12_water_tile_update(struct Moby *moby) { *(int *)(D_L12_001CBF40_c + water_tile_vars[3] * 0x1190 + 0x18) = water_tile_vars[1] + 0x28; *(u8 *)(D_L12_001CBF40_c + water_tile_vars[3] * 0x1190 + 0x1c) = 0x1c; *(u8 *)(D_L12_001CBF40_c + water_tile_vars[3] * 0x1190 + 0x1d) = 0x44; - ((L12Slot *)D_L12_001CBF40_c)[water_tile_vars[3]].visibility = 0xffff; + ((WaterGrid *)D_L12_001CBF40_c)[water_tile_vars[3]].visible_subtiles = 0xffff; pool_bind_tile(D_L12_001CBF40_c + water_tile_vars[3] * 0x1190, D_L12_001CBE00_c + water_tile_vars[3] * 16); moby->state = SLOT_INITIALIZE_NEIGHBORS_AND_HEIGHT; @@ -180,9 +174,9 @@ void level_12_water_tile_update(struct Moby *moby) { is_point_inside_clip_volume(D_L12_00167240, water_tile_vars[6]) == 0) visible = 0.0f; if (visible == 0.0f) { - ((L12Slot *)D_L12_001CBF40_c)[water_tile_vars[3]].visibility = 0; + ((WaterGrid *)D_L12_001CBF40_c)[water_tile_vars[3]].visible_subtiles = 0; } else { - ((L12Slot *)D_L12_001CBF40_c)[water_tile_vars[3]].visibility = 0xffff; + ((WaterGrid *)D_L12_001CBF40_c)[water_tile_vars[3]].visible_subtiles = 0xffff; } if (water_tile_vars[3] == 0) { pool_flush(D_L12_001CBF40_c, 17); From 6e442c41a39b9c6392e5d661e23b0dbb38b234a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:01:50 +0000 Subject: [PATCH 185/213] decomp: name the l13 attached rocket and gemlik projectile level hit flag Both shots pass pvars+0x24 == 0 to collision_line as its flag 1, which skips the level and tests only mobys. --- src/overlays/l13/mobys/attached_rocket.c | 8 ++++---- src/overlays/l13/mobys/gemlik_projectile.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/overlays/l13/mobys/attached_rocket.c b/src/overlays/l13/mobys/attached_rocket.c index 0ceee46e83..75304685e5 100644 --- a/src/overlays/l13/mobys/attached_rocket.c +++ b/src/overlays/l13/mobys/attached_rocket.c @@ -53,7 +53,7 @@ typedef struct AttachedRocketVars { u8 launch_position; u8 pad_11[0xF]; struct Moby *source_moby; - s16 unk24; + s16 hits_level; /* 0: the hit line skips the level (collision_line flag 1) */ s16 attachment_joint_index; f32 max_travel_distance; s32 distance_reference_moby; @@ -134,7 +134,7 @@ void attached_rocket_update(struct Moby *moby) { L13Vector_5a58 random_direction; } work; int i; - int stationary; + int skip_level; float length; float distance; float other_distance; @@ -195,7 +195,7 @@ void attached_rocket_update(struct Moby *moby) { set_vector_length_xy(&work.velocity, &work.velocity, 1.0f); work.velocity.z = 1.0f; make_hit_descriptor(work.hit, moby, 0x10001, 1.0f, &work.velocity); - stationary = attached_rocket_vars->unk24 == 0; + skip_level = attached_rocket_vars->hits_level == 0; distance = vector_distance_xy(&moby->pos, &attached_rocket_vars->launch_position); other_distance = vector_distance_xy(*(char **)&attached_rocket_vars->distance_reference_moby + 0x10, @@ -221,7 +221,7 @@ void attached_rocket_update(struct Moby *moby) { spawn_attached_rocket_explosion(moby); goto remove; } - if (collision_line(&work.old_pos, &moby->pos, stationary, moby, work.hit) == 0) + if (collision_line(&work.old_pos, &moby->pos, skip_level, moby, work.hit) == 0) goto bounds; { struct Moby *target = (struct Moby *)coll_hit_1638.moby; diff --git a/src/overlays/l13/mobys/gemlik_projectile.c b/src/overlays/l13/mobys/gemlik_projectile.c index ad9e12ceaa..e104d98cf9 100644 --- a/src/overlays/l13/mobys/gemlik_projectile.c +++ b/src/overlays/l13/mobys/gemlik_projectile.c @@ -98,7 +98,7 @@ typedef struct GemlikProjectileVars { f32 deflected_marker; /* 31337.6 once the hero has knocked it back */ f32 launch_position[4]; void *owner; - s32 unk24; + s32 hits_level; /* 0: the hit line skips the level (collision_line flag 1) */ f32 max_travel_distance; s32 timer_2C; } GemlikProjectileVars; @@ -115,7 +115,7 @@ void gemlik_projectile_update(struct Moby *moby) { } work; int i; int flags; - int stationary; + int skip_level; unsigned char *hero_bytes; char *ent; struct L13Ent00178480 *target_hit_entry; @@ -169,7 +169,7 @@ void gemlik_projectile_update(struct Moby *moby) { *(unsigned short *)(work.hit + 0x1A) = *(unsigned short *)((char *)moby + 0xA6); work.hit[0x18] = 1; work.hit[0x19] = 1; - stationary = projectile_vars->unk24 == 0; + skip_level = projectile_vars->hits_level == 0; if (projectile_vars->max_travel_distance < vector_distance_xy(&moby->pos, projectile_vars->launch_position) || fast_dec_timer(&projectile_vars->timer_2C) != 0) { @@ -194,7 +194,7 @@ void gemlik_projectile_update(struct Moby *moby) { } goto remove; } - if (collision_line(&work.old_pos, &moby->pos, stationary, projectile_vars->owner, work.hit) == + if (collision_line(&work.old_pos, &moby->pos, skip_level, projectile_vars->owner, work.hit) == 0) goto bounds; qcopy(&moby->pos, &coll_hit_1638.point); From 1f9fec69cff2130b7f84452463c4668a2491f028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:03:28 +0000 Subject: [PATCH 186/213] decomp: name the l17 camera box hero cuboid and fleet backdrop endpoint fields The camera box's cuboid error message prints pvars+0x48 as hero; the backdrop draws its quad end with the width at pvars+0x28 and offsets the endpoint by the angle at pvars+0x44. --- src/overlays/l17/mobys/camera_box_watcher.c | 6 +++--- src/overlays/l17/mobys/fleet_backdrop.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/overlays/l17/mobys/camera_box_watcher.c b/src/overlays/l17/mobys/camera_box_watcher.c index 059aa0a075..ad1a210df6 100644 --- a/src/overlays/l17/mobys/camera_box_watcher.c +++ b/src/overlays/l17/mobys/camera_box_watcher.c @@ -56,7 +56,7 @@ typedef struct CameraBoxWatcherVars { s32 camera_sequence_clip_volume; s32 second_camera_target_cuboid; s32 first_camera_target_cuboid; - s32 unk48; + s32 hero_cuboid; /* "hero" in the cuboid error message */ u8 camera_sequence_done; u8 pad_4D[0x3]; s32 unk50; @@ -163,10 +163,10 @@ void fleet_camera_box_watcher_update(struct Moby *moby) { pvars->dwell_help_delay = scale_game_frames(600); pvars->camera_sequence_done = 0; if (pvars->first_camera_target_cuboid == -1 || pvars->second_camera_target_cuboid == -1 || - pvars->camera_sequence_clip_volume == -1 || pvars->unk48 == -1) { + pvars->camera_sequence_clip_volume == -1 || pvars->hero_cuboid == -1) { DebugPrint(fleet_camera_box_configuration_error_format, pvars->camera_sequence_clip_volume, - pvars->unk48, + pvars->hero_cuboid, pvars->second_camera_target_cuboid, pvars->first_camera_target_cuboid); pvars->camera_sequence_done = 1; diff --git a/src/overlays/l17/mobys/fleet_backdrop.c b/src/overlays/l17/mobys/fleet_backdrop.c index 482ae4b5db..5dbaa5551f 100644 --- a/src/overlays/l17/mobys/fleet_backdrop.c +++ b/src/overlays/l17/mobys/fleet_backdrop.c @@ -78,9 +78,9 @@ typedef struct FleetBackdropAnimationVars { f32 endpoint_y; f32 endpoint_z; u8 pad_1C[0xC]; - f32 unk28; + f32 end_half_width; /* half width of the quad at the endpoint */ u8 pad_2C[0x18]; - f32 unk44; + f32 endpoint_yaw; /* placed angle of the endpoint offset */ u8 pad_48[0x4]; s32 clip_volume_4C; } FleetBackdropAnimationVars; @@ -110,7 +110,7 @@ void draw_fleet_backdrop_quads(struct Moby *moby) { fast_vec_cross(&vv[0], &vv[0], vb); fast_vec_normalize(&vv[0], &vv[0], backdrop_scrolling_quad_start_half_widths[i]); fast_vec_cross(&vv[1], &vv[1], vb); - fast_vec_normalize(&vv[1], &vv[1], backdrop_pvars->unk28); + fast_vec_normalize(&vv[1], &vv[1], backdrop_pvars->end_half_width); *(long *)&pkt.q[4] = 0x0000FF9000000260LL; *(long *)&pkt.q[6] = 0x0000008000000048LL; *(long *)&pkt.q[0] = 0; @@ -247,7 +247,7 @@ void fleet_backdrop_animation_update(struct Moby *moby) { build_spherical_offset(pvar_angle_offset, backdrop_shared_radius_numerator_gp / backdrop_offset_radius_divisor_gp, - moby_pvars->unk44, + moby_pvars->endpoint_yaw, 0.0f); fast_vec_add(vector_sum, offset_accumulator, pvar_angle_offset); *(OvlQuad *)offset_accumulator = *(OvlQuad *)vector_sum; From be296db0a553870fb06cf6203883de5e15122bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:05:04 +0000 Subject: [PATCH 187/213] decomp: name the l18 drek missile motion fields, child carrier flag and gadgebot launch effect The missile's wander step passes pvars+0x144/0x150/0x15C to advance_accelerated_scalar and approach_angle as velocity, acceleration and max speed, and its trail draw counts pvars+0x164; the carrier spawns its child only when pvars+0x80 is set; the gadgebot launch value at pvars+0x1F4 stretches the moby and fades its glow; the drifting mine's moby copy takes the struct Moby names. --- src/overlays/l18/mobys/child_carrier.c | 4 ++-- src/overlays/l18/mobys/drek_fight_missile.c | 16 ++++++++-------- src/overlays/l18/mobys/drifting_mine.c | 4 ++-- src/overlays/l18/mobys/gadgebot.c | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/overlays/l18/mobys/child_carrier.c b/src/overlays/l18/mobys/child_carrier.c index 6a9514d08e..425b163ea6 100644 --- a/src/overlays/l18/mobys/child_carrier.c +++ b/src/overlays/l18/mobys/child_carrier.c @@ -21,7 +21,7 @@ typedef struct ChildCarrierVars { f32 previous_position[4]; u8 previous_rotation; u8 pad_71[0xF]; - s32 unk80; + s32 spawns_child; /* nonzero: creates the class 0x764 child to carry */ char *carried_child_moby; } ChildCarrierVars; @@ -46,7 +46,7 @@ void child_carrier_update(char *moby) { moby + 0x40); break; } - if (MOBY(moby)->command != 0 && transform_and_child_vars->unk80 != 0 && + if (MOBY(moby)->command != 0 && transform_and_child_vars->spawns_child != 0 && *(int *)&transform_and_child_vars->carried_child_moby == 0) { char *new_child = create_moby(0x764); transform_and_child_vars->carried_child_moby = new_child; diff --git a/src/overlays/l18/mobys/drek_fight_missile.c b/src/overlays/l18/mobys/drek_fight_missile.c index 68b95ddc03..c74b153110 100644 --- a/src/overlays/l18/mobys/drek_fight_missile.c +++ b/src/overlays/l18/mobys/drek_fight_missile.c @@ -107,15 +107,15 @@ typedef struct DrekFightMissileVars { u8 pad_12C[0x4]; f32 dive_start_velocity[4]; u8 pad_140[0x4]; - f32 unk144; + f32 vertical_velocity; /* advance_accelerated_scalar velocity of pos.z */ u8 pad_148[0x4]; s32 dive_motion_blend_factor; - f32 unk150; + f32 wander_yaw_acceleration; f32 wander_yaw_approach_scale; f32 wander_vertical_approach_scale; - f32 unk15C; + f32 wander_vertical_max_speed; s32 timer_160; - s16 unk164; + s16 trail_segment_count; /* trail quads drawn, head slot at 0x166 */ u8 pad_166[0x2]; f32 effect_color_phase; void *activating_moby; @@ -142,8 +142,8 @@ void drek_fight_missile_update(struct Moby *moby) { float initialization_frame_time = frame_time; missile_vars->wander_vertical_approach_scale = wander_acceleration_scale * 10.0f; missile_vars->wander_yaw_approach_scale = initialization_frame_time * 12.566371f; - missile_vars->unk150 = wander_acceleration_scale * 3.1415927f; - missile_vars->unk15C = initialization_frame_time * 10.0f; + missile_vars->wander_yaw_acceleration = wander_acceleration_scale * 3.1415927f; + missile_vars->wander_vertical_max_speed = initialization_frame_time * 10.0f; missile_vars->effect_color_phase = random_angle_radians(); moby->draw_dist = 0xFF; qcopy(&missile_vars->dive_target_position, &moby->pos); @@ -173,7 +173,7 @@ void drek_fight_missile_update(struct Moby *moby) { missile_vars->dive_start_velocity[1] = fast_sin(moby->rot.z) * (*(float *)&l18_drek_missile_wander_horizontal_speed_gp * frame_time); - missile_vars->dive_start_velocity[2] = missile_vars->unk144; + missile_vars->dive_start_velocity[2] = missile_vars->vertical_velocity; missile_vars->dive_motion_blend_factor = 0; break; } @@ -217,7 +217,7 @@ void drek_fight_missile_update(struct Moby *moby) { int i; char *pos = &moby->pos; moby->state = DREK_MISSILE_WANDER; - missile_vars->unk164 = 0; + missile_vars->trail_segment_count = 0; spawn_explosion(missile_vars->activating_moby, D_L18_0015F580, pos, diff --git a/src/overlays/l18/mobys/drifting_mine.c b/src/overlays/l18/mobys/drifting_mine.c index aa1dabd414..236ff21941 100644 --- a/src/overlays/l18/mobys/drifting_mine.c +++ b/src/overlays/l18/mobys/drifting_mine.c @@ -177,11 +177,11 @@ typedef struct { unsigned char seq; /* 0x52 */ unsigned char prevSeq; /* 0x53 */ char _pad54[0x5C - 0x54]; - float unk5C; /* 0x5C */ + float anim_rate; /* 0x5C: as in struct Moby */ char _pad60[0x68 - 0x60]; float *frameData; /* 0x68 */ char _pad6C[4]; - unsigned char unk70; /* 0x70 */ + unsigned char anim_flags; /* 0x70 */ } MobyAnim_q; extern float FUN_L00_0025abf0_q(float *a, float *b, float *out, float speed, float g) __asm__("FUN_L00_0025abf0"); diff --git a/src/overlays/l18/mobys/gadgebot.c b/src/overlays/l18/mobys/gadgebot.c index df551d4387..1973f4db32 100644 --- a/src/overlays/l18/mobys/gadgebot.c +++ b/src/overlays/l18/mobys/gadgebot.c @@ -456,7 +456,7 @@ typedef struct { u8 pad1E0[0xC]; f32 spin; /* 0x1EC: random 15..45 degrees, in radians */ u8 pad1F0[4]; - f32 unk1F4; /* 0x1F4: set to 1.0 on launch */ + f32 launch_effect; /* 0x1F4: 1.0 on launch, falls to 0: stretches the moby and fades the launch glow */ } LaunchedMobyVars; extern float FUN_L00_0025abf0(void *, void *, float, float, int); @@ -486,7 +486,7 @@ int launch_first_idle_group_class_0772_moby(int group, void *from, void *to, flo moby->flags |= 0x1000; qcopy(&moby->pos, from); moby->state = GADGEBOT_LAUNCH_FLIGHT; - launched_moby_vars->unk1F4 = 1.0f; + launched_moby_vars->launch_effect = 1.0f; fast_vec_sub(launched_moby_vars->velocity, to, from); launched_moby_vars->velocity[2] = 0.0f; fast_vec_normalize( From c51073af61d5f8054603b352726d2a5769edd8a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:19:51 +0000 Subject: [PATCH 188/213] decomp: name hero and moby local layout fields after Moby, the wrench pvars, frame headers and the race path --- .../shared/hero/advance_hero_animation.c | 4 ++-- src/overlays/shared/hero/hero_idle_sequence.c | 12 +++++------ .../shared/hero/hero_move_state_velocity.c | 20 +++++++++---------- .../hero/process_hero_primary_item_input.c | 8 ++++---- src/overlays/shared/hero/set_hero_animation.c | 16 +++++++-------- src/overlays/shared/mobys/is_hero_on_moby.c | 4 ++-- .../mobys/select_auto_aim_target_moby.c | 14 ++++++------- 7 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/overlays/shared/hero/advance_hero_animation.c b/src/overlays/shared/hero/advance_hero_animation.c index 33f6ada9dc..eebbe78ac3 100644 --- a/src/overlays/shared/hero/advance_hero_animation.c +++ b/src/overlays/shared/hero/advance_hero_animation.c @@ -11,8 +11,8 @@ struct AnimSeq670 { u8 pad0[0x10]; - u8 frame_count; /* 0x10 */ - u8 unk11; + u8 frame_count; /* 0x10 */ + u8 sound; /* 0x11: looping sound (Moby.seq_sound) */ u8 trigger_count; /* 0x12 */ u8 pad13[9]; void *frames[1]; /* 0x1C; the triggers follow the frames */ diff --git a/src/overlays/shared/hero/hero_idle_sequence.c b/src/overlays/shared/hero/hero_idle_sequence.c index aa93a77730..f020250df9 100644 --- a/src/overlays/shared/hero/hero_idle_sequence.c +++ b/src/overlays/shared/hero/hero_idle_sequence.c @@ -2340,9 +2340,9 @@ void update_hero_world_matrices(s32 moby_override) { 0x10; scales (4096 = 1.0) and translations follow, each entry tagged with its joint index in the top s16 (scales also with 0x8000). */ typedef struct { - u16 unk0; - u16 unk2; - u16 unk4; + u16 rate_lo; /* 0x0: f32 frame rate (t step per tick to the next key), low half */ + u16 rate_hi; /* 0x2: high half */ + u16 time; /* 0x4: time of this key in 1/8 ticks */ u16 size; /* 0x6: quadwords from 0x10 to the end */ u16 scale_offset; /* 0x8: bytes from 0x10 to the scale list */ u16 scale_count; /* 0xA */ @@ -2431,9 +2431,9 @@ void pack_pose(s32 *joints, PackedPose *pose, u8 *model, s32 padding, s32 pose_s pose->size = ((u8 *)packed_pose_write_cursor - (u8 *)&pose->root_rotation) >> 4; pose->scale_count = scale_count; pose->translation_offset = (rotation_count + scale_count) << 3; - pose->unk2 = 0; - pose->unk4 = 0; - pose->unk0 = 0; + pose->rate_hi = 0; + pose->time = 0; + pose->rate_lo = 0; } typedef struct { diff --git a/src/overlays/shared/hero/hero_move_state_velocity.c b/src/overlays/shared/hero/hero_move_state_velocity.c index 338fcf0a8e..b152fd0e40 100644 --- a/src/overlays/shared/hero/hero_move_state_velocity.c +++ b/src/overlays/shared/hero/hero_move_state_velocity.c @@ -1220,10 +1220,10 @@ void spawn_hero_radial_particle_burst(void) { typedef struct { u8 pad00[0x40]; - f32 unk40[4]; /* 0x40: launch direction */ - f32 unk50[4]; /* 0x50 */ - f32 unk60; /* 0x60: speed */ - s32 unk64; + f32 direction[4]; /* 0x40: launch direction (WrenchVars in shared/weapons/wrench.c) */ + f32 target[4]; /* 0x50: aim target position */ + f32 speed; /* 0x60 */ + s32 acceleration; /* 0x64: f32, cleared as an int */ u8 pad68[0xE]; s16 near_wall_launch_flag; u8 pad78[6]; @@ -1276,7 +1276,7 @@ void launch_hero_wrench(void) { if (tpv->has_aim_target_position) { has_target = 1; transform_hero_local_offset_to_world(aim_origin_or_euler_angles, 0.5f, 0.0f, 0.5f); - fast_vec_sub(delta, tpv->unk50, aim_origin_or_euler_angles); + fast_vec_sub(delta, tpv->target, aim_origin_or_euler_angles); hero.aim_yaw = FUN_001f9e90_c2(delta[0], delta[1]); hero.aim_pitch = FUN_001f9e90_c2(vector_length_xy(delta), delta[2]); } @@ -1300,11 +1300,11 @@ void launch_hero_wrench(void) { !hero.wall_probe_moby_in_class_range) { launched_item_vars->near_wall_launch_flag = 1; } - clear_u64_value(launched_item_vars->unk40); + clear_u64_value(launched_item_vars->direction); if (!aimed) { - add_hero_forward_offset(launched_item_vars->unk40, launched_item_vars->unk40, 1.0f); + add_hero_forward_offset(launched_item_vars->direction, launched_item_vars->direction, 1.0f); } else { - build_spherical_offset(launched_item_vars->unk40, 1.0f, hero.aim_yaw, hero.aim_pitch); + build_spherical_offset(launched_item_vars->direction, 1.0f, hero.aim_yaw, hero.aim_pitch); } clear_u64_value(aim_origin_or_euler_angles); euler_rotation_basis(item_rotation_matrix, aim_origin_or_euler_angles); @@ -1319,8 +1319,8 @@ void launch_hero_wrench(void) { } copy_matrix_rotation(out_mat, item_rotation_matrix); matrix_to_euler(out_mat, &equipped_wrench_moby->rot); - launched_item_vars->unk64 = 0; - launched_item_vars->unk60 = frame_time * 23.0f; + launched_item_vars->acceleration = 0; + launched_item_vars->speed = frame_time * 23.0f; initialize_moby_transform_history(equipped_wrench_moby, hero.wrench_trail); create_moby_transform_history_entry(hero.wrench_trail, 0x30, 3); create_moby_transform_history_entry(hero.wrench_trail, 0x17, 5); diff --git a/src/overlays/shared/hero/process_hero_primary_item_input.c b/src/overlays/shared/hero/process_hero_primary_item_input.c index 6d0ddc8fb1..185eff3b11 100644 --- a/src/overlays/shared/hero/process_hero_primary_item_input.c +++ b/src/overlays/shared/hero/process_hero_primary_item_input.c @@ -1527,8 +1527,8 @@ typedef struct { typedef struct { char pad0[0x20]; - int unk20; - int unk24; + int path_index; /* l05_paths entry of the race course, -1: none */ + int pad24; int f28; int f2C[5]; int f40; @@ -1580,10 +1580,10 @@ void update_hero_hoverboard_race_progress(void) { return; } race_pvars = (Data *)((struct Moby *)hero.hoverboard_moby)->pvars; - if (race_pvars->unk20 == -1) { + if (race_pvars->path_index == -1) { return; } - path = ((Path **)((char **)l05_paths))[race_pvars->unk20]; + path = ((Path **)((char **)l05_paths))[race_pvars->path_index]; hero.race_path = (void *)path; if (D_0015ED84_lui == 0x10) { *(u128_254608 *)world_position_scratch = 0; diff --git a/src/overlays/shared/hero/set_hero_animation.c b/src/overlays/shared/hero/set_hero_animation.c index fcd9752bc5..dca7777553 100644 --- a/src/overlays/shared/hero/set_hero_animation.c +++ b/src/overlays/shared/hero/set_hero_animation.c @@ -71,7 +71,7 @@ void blend_hero_slot3_animation_pair(void) { typedef struct { short seq; unsigned char key; - unsigned char unk3; + unsigned char secondary_seq; /* 0x3: E_231ff8.secondary_animation_id */ } SeqEntry; extern SeqEntry D_L00_0017BBD0[]; @@ -384,8 +384,8 @@ void sync_hero_mapped_moby_animation_frames(void) { typedef struct { char _pad00[0x11]; - unsigned char unk11; /* 0x11: copied to a moby's +0x7C */ - unsigned char unk12; /* 0x12: copied to a moby's +0x7E */ + unsigned char sound; /* 0x11: looping sound, copied to a moby's seq_sound (+0x7C) */ + unsigned char trigger_count; /* 0x12: copied to a moby's anim_trigger_count (+0x7E) */ char _pad13[0x1C - 0x13]; int frames[1]; /* 0x1C */ } MobySeq; @@ -401,7 +401,7 @@ typedef struct { char _pad21[0x24 - 0x21]; MobyClass *pClass; /* 0x24 */ char _pad28[0x38 - 0x28]; - unsigned long unk38; /* 0x38 */ + unsigned long spawn_frame; /* 0x38 */ char _pad40[0x50 - 0x40]; unsigned char frame; /* 0x50 */ unsigned char prevFrame; /* 0x51 */ @@ -411,10 +411,10 @@ typedef struct { int frameData; /* 0x68 */ int prevFrameData; /* 0x6C */ char _pad70[0x78 - 0x70]; - char *pvars; /* 0x78: this moby's 0x80 bytes at D_00160028 */ - unsigned char unk7C; /* 0x7C: the sound it wants (func_0020D790) */ - unsigned char unk7D; /* 0x7D: the handle of the one playing, or 0xFF */ - unsigned char unk7E; /* 0x7E */ + char *pvars; /* 0x78: this moby's 0x80 bytes at D_00160028 */ + unsigned char seq_sound; /* 0x7C: the sound it wants (func_0020D790) */ + unsigned char sound_slot; /* 0x7D: the handle of the one playing, or 0xFF */ + unsigned char anim_trigger_count; /* 0x7E */ char _pad7F[0x100 - 0x7F]; } Moby; diff --git a/src/overlays/shared/mobys/is_hero_on_moby.c b/src/overlays/shared/mobys/is_hero_on_moby.c index 0a61c9f743..cc44171799 100644 --- a/src/overlays/shared/mobys/is_hero_on_moby.c +++ b/src/overlays/shared/mobys/is_hero_on_moby.c @@ -11,8 +11,8 @@ #include "rnc/overlay/shared/mobys/evaluate_moby_animation_pose.h" #include "rnc/overlay/shared/game/unlock_planet.h" -/* 1 when m is the hero's current moby of interest: unk4F8 in control mode 3 - or state 0x1C, otherwise unk2FC while unk30E is clear. */ +/* 1 when m is the hero's current moby of interest: ledge_moby in control mode 3 + or state 0x1C, otherwise ground_moby while air_frames is clear. */ s32 is_hero_on_moby(struct Moby *candidate_moby) __asm__("FUN_L01_00277fb8"); s32 is_hero_on_moby(struct Moby *candidate_moby) { diff --git a/src/overlays/shared/mobys/select_auto_aim_target_moby.c b/src/overlays/shared/mobys/select_auto_aim_target_moby.c index d0b810cbde..c73ecc1ae1 100644 --- a/src/overlays/shared/mobys/select_auto_aim_target_moby.c +++ b/src/overlays/shared/mobys/select_auto_aim_target_moby.c @@ -542,8 +542,8 @@ void spawn_moby_break_fragments(unsigned char *source_moby, typedef struct { char _pad00[0x11]; - unsigned char unk11; /* 0x11: copied to a moby's +0x7C */ - unsigned char unk12; /* 0x12: copied to a moby's +0x7E */ + unsigned char sound; /* 0x11: looping sound, copied to a moby's seq_sound (+0x7C) */ + unsigned char trigger_count; /* 0x12: copied to a moby's anim_trigger_count (+0x7E) */ char _pad13[0x1C - 0x13]; int frames[1]; /* 0x1C */ } MobySeq; @@ -559,7 +559,7 @@ typedef struct { char _pad21[0x24 - 0x21]; MobyClass *pClass; /* 0x24 */ char _pad28[0x38 - 0x28]; - unsigned long unk38; /* 0x38 */ + unsigned long spawn_frame; /* 0x38 */ char _pad40[0x50 - 0x40]; unsigned char frame; /* 0x50 */ unsigned char prevFrame; /* 0x51 */ @@ -569,10 +569,10 @@ typedef struct { int frameData; /* 0x68 */ int prevFrameData; /* 0x6C */ char _pad70[0x78 - 0x70]; - char *pvars; /* 0x78: this moby's 0x80 bytes at D_00160028 */ - unsigned char unk7C; /* 0x7C: the sound it wants (func_0020D790) */ - unsigned char unk7D; /* 0x7D: the handle of the one playing, or 0xFF */ - unsigned char unk7E; /* 0x7E */ + char *pvars; /* 0x78: this moby's 0x80 bytes at D_00160028 */ + unsigned char seq_sound; /* 0x7C: the sound it wants (func_0020D790) */ + unsigned char sound_slot; /* 0x7D: the handle of the one playing, or 0xFF */ + unsigned char anim_trigger_count; /* 0x7E */ char _pad7F[0x100 - 0x7F]; } Moby; From bd5d2d32ffa2c33e6018e10288123bc4491ded67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:24:25 +0000 Subject: [PATCH 189/213] decomp: name weapon local fields after the suck record, the collision hit and the hit descriptor --- src/overlays/shared/weapons/blaster_shot.c | 2 +- src/overlays/shared/weapons/drone.c | 15 ++++++++------- src/overlays/shared/weapons/morphoray_chicken.c | 11 ++++++----- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/overlays/shared/weapons/blaster_shot.c b/src/overlays/shared/weapons/blaster_shot.c index 93d15f9809..b774941636 100644 --- a/src/overlays/shared/weapons/blaster_shot.c +++ b/src/overlays/shared/weapons/blaster_shot.c @@ -37,7 +37,7 @@ typedef int w128 __attribute__((mode(TI))); /* Vars of the homing shot FUN_L00_002caf70 spawns. */ typedef struct { f32 target_x, target_y, target_z; - f32 unk0C; + f32 target_w; /* the target position is copied as one quadword */ f32 yaw_rate; f32 pitch_rate; f32 rest_yaw; diff --git a/src/overlays/shared/weapons/drone.c b/src/overlays/shared/weapons/drone.c index ad923eb126..9f318ca8f2 100644 --- a/src/overlays/shared/weapons/drone.c +++ b/src/overlays/shared/weapons/drone.c @@ -42,7 +42,7 @@ typedef int OvlQuad_2C9820 __attribute__((mode(TI))); typedef struct { u8 pad0[0x18]; s32 moby; /* 0x18: passed to FUN_002141f8 (reads moby+0x34, moby+0x78); 0 when no moby was hit */ - s32 unk1C; /* 0x1C: > 0 gates copying point and the normal into the hero (get_hero_idle_animation_index in shared/hero/hero_frame_update.c) */ + s32 surface_type; /* 0x1C: hit face type word (CollisionHit.surface_type); > 0 gates copying point and the normal into the hero */ union { OvlQuad_2C9820 q; f32 f[4]; @@ -88,12 +88,13 @@ typedef struct { /* Hit record passed to FUN_L00_00259a88; the drone builds it over its direction and rotated vectors. */ typedef struct { - Vec4 direction; /* 0x00 */ - s32 unk10[2]; - u8 kind; /* 0x18 */ - u8 mode; /* 0x19 */ - u16 oclass; /* 0x1A */ - f32 amount; /* 0x1C: read back after the hit */ + Vec4 direction; /* 0x00 */ + s32 source_moby; /* 0x10: hit descriptor (record_moby_hit): MobyHit.source_moby */ + s32 flags; /* 0x14: MobyHit.flags */ + u8 kind; /* 0x18 */ + u8 mode; /* 0x19 */ + u16 oclass; /* 0x1A */ + f32 amount; /* 0x1C: read back after the hit */ } BombHit; extern s32 D_L00_0015F5C4_2c8440 __asm__("D_L00_0015F5C4"); /* nonzero: no throws */ diff --git a/src/overlays/shared/weapons/morphoray_chicken.c b/src/overlays/shared/weapons/morphoray_chicken.c index a2b93c890b..406cd1a81f 100644 --- a/src/overlays/shared/weapons/morphoray_chicken.c +++ b/src/overlays/shared/weapons/morphoray_chicken.c @@ -31,11 +31,12 @@ typedef union { f32 f[4]; } V4; +/* Suck cannon record of a chicken slot (state at +0x68, defaults from +0x78). */ typedef struct { u8 pad00[0x70]; - void *unk70; + void *sequences; /* 0x70: the class's sequence table, read by the suck cannon handlers */ u8 pad74[0xB0 - 0x74]; -} Node; +} SuckRecord; typedef struct { u8 pad00[0x10]; @@ -143,7 +144,7 @@ extern void fast_vec_sub(void *, void *, void *) __asm__("FUN_001f9a28") extern u8 D_0013E520[]; extern Data D_L00_00173E40; extern struct Moby *D_L00_001DD100[]; -extern Node l00_morphoray_chicken_slot_records[] __asm__("D_L00_001DD150"); +extern SuckRecord l00_morphoray_chicken_slot_records[] __asm__("D_L00_001DD150"); extern u8 morphoray_chicken_slot_buffers[] __asm__("D_L00_001DDF10"); extern s32 D_L00_00161854 __attribute__((sda)); extern s32 D_L00_00161854_gp __asm__("D_L00_00161854") __attribute__((sda)); @@ -338,7 +339,7 @@ struct Moby *spawn_morphoray_chicken(State *source_state) { moby_vars->slot_buffer = (void *)(morphoray_chicken_slot_buffers + D_L00_00161854 * 0x60); spawned_moby->flags |= 0x1020; - ((Node *)moby_vars->slot_record)->unk70 = (void *)D_L00_00161840; + ((SuckRecord *)moby_vars->slot_record)->sequences = (void *)D_L00_00161840; } ((Sub *)D_L00_001DD100[D_L00_00161854]->pvars)->expire_timer = (void *)1; } else if (!moby_vars->gold) { @@ -346,7 +347,7 @@ struct Moby *spawn_morphoray_chicken(State *source_state) { moby_vars->slot_buffer = (void *)(morphoray_chicken_slot_buffers + D_L00_00161854 * 0x60); spawned_moby->flags |= 0x1020; - ((Node *)moby_vars->slot_record)->unk70 = (void *)D_L00_00161840; + ((SuckRecord *)moby_vars->slot_record)->sequences = (void *)D_L00_00161840; } FUN_L00_002c92d8_c(moby_vars->slot_record); D_L00_001DD100[D_L00_00161854] = spawned_moby; From 2badd72d8bb1f75f2026fd4ee0a66f25b2219a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:24:26 +0000 Subject: [PATCH 190/213] decomp: name enemy suck record, target info, hit flash and level gate fields in shared enemies and level copies --- src/overlays/l02/mobys/sand_shark.c | 8 +-- src/overlays/l11/mobys/puffoid.c | 13 ++-- src/overlays/l16/mobys/chomper.c | 8 +-- src/overlays/shared/enemies/blarg_commander.c | 8 +-- .../shared/enemies/blarg_trooper_projectile.c | 18 +++--- .../shared/enemies/bomb_spawner_bomb.c | 60 ++++++++++--------- src/overlays/shared/enemies/frog.c | 52 ++++++++-------- src/overlays/shared/enemies/horny_toad.c | 8 +-- src/overlays/shared/enemies/large_amoeboid.c | 18 +++--- src/overlays/shared/enemies/plasmabot.c | 4 +- src/overlays/shared/enemies/scoutbot.c | 4 +- src/overlays/shared/enemies/spawner.c | 12 ++-- 12 files changed, 108 insertions(+), 105 deletions(-) diff --git a/src/overlays/l02/mobys/sand_shark.c b/src/overlays/l02/mobys/sand_shark.c index 3b33f07f23..099c6506ec 100644 --- a/src/overlays/l02/mobys/sand_shark.c +++ b/src/overlays/l02/mobys/sand_shark.c @@ -199,9 +199,9 @@ typedef struct { /* 0x059 */ char pad59[3]; /* 0x05C */ unsigned char unk5C; /* 0x05D */ char pad5D[0x6B]; - /* 0x0C8 */ short unkC8; + /* 0x0C8 */ short suck_state; /* 0x0CA */ char padCA[6]; - /* 0x0D0 */ void *unkD0; + /* 0x0D0 */ void *suck_sequences; /* 0x0D4 */ char padD4[0x4C]; /* 0x120 */ char motion[0x60]; /* 0x180 */ int walk_mode; @@ -352,7 +352,7 @@ void sand_shark_update(struct Moby *moby) { if (rand_e50() & 1) { moby->flags |= 0x8000; } - sand_shark_behavior_vars->unkD0 = &D_L02_001619B0; + sand_shark_behavior_vars->suck_sequences = &D_L02_001619B0; if (sand_shark_behavior_vars->primary_hero_launch_trigger_volume_index >= 0) { if (sand_shark_behavior_vars->launch_origin_moby_index == -1) { mark_moby_for_removal(moby); @@ -819,7 +819,7 @@ void sand_shark_update(struct Moby *moby) { case SAND_SHARK_SUCK_CANNON_INTERACTION: if (FUN_L00_002dc9f0_e50(moby, sand_shark_behavior_vars->motion)) { moby->state = SAND_SHARK_BEGIN_RETURN_HOME_WITH_HEIGHT_OFFSET; - sand_shark_behavior_vars->unkC8 = 0; + sand_shark_behavior_vars->suck_state = 0; } break; case SAND_SHARK_WAIT_FOR_HERO_LAUNCH_TRIGGER: { diff --git a/src/overlays/l11/mobys/puffoid.c b/src/overlays/l11/mobys/puffoid.c index c736e7bb7e..158032c814 100644 --- a/src/overlays/l11/mobys/puffoid.c +++ b/src/overlays/l11/mobys/puffoid.c @@ -65,9 +65,9 @@ typedef struct { u8 pad59; u8 look_height; /* 0x5A */ u8 pad5B[0x6D]; - s16 unkC8; /* 0xC8 */ + s16 suck_state; /* 0xC8 */ u8 padCA[6]; - void *unkD0; /* 0xD0 */ + void *suck_sequences; /* 0xD0 */ u8 padD4[0x4C]; struct KnockbackMotion knockback; /* 0x120: step_moby_motion / FUN_L00_002dc9f0 state */ struct GroundMoveControl move_control; /* 0x180 */ @@ -143,7 +143,7 @@ void puffoid_update(struct Moby *moby) { int i; if (moby->state != PUFFOID_STATE_WAIT_TO_RESUME_COMMAND) { - puffoid_vars->unkC8 = 0; + puffoid_vars->suck_state = 0; update_puffoid_damage_and_path_goal(moby); } target = puffoid_vars->target; @@ -161,7 +161,7 @@ void puffoid_update(struct Moby *moby) { puffoid_vars->look_range = truncate_float_to_s32(8.0f); puffoid_vars->look_height = truncate_float_to_s32(2.0f); puffoid_vars->wrench_hit_sound = 1; - puffoid_vars->unkD0 = &D_L11_001622C0; + puffoid_vars->suck_sequences = &D_L11_001622C0; init_ground_move_control(&puffoid_vars->move_control); puffoid_vars->move_control.max_climb = 0.5f; puffoid_vars->move_control.max_drop = 0.5f; @@ -632,9 +632,10 @@ void puffoid_update(struct Moby *moby) { break; } case PUFFOID_STATE_WAIT_TO_RESUME_COMMAND: - if (puffoid_vars->unkC8 != 0 && FUN_L00_002dc9f0_4318(moby, &puffoid_vars->knockback)) { + if (puffoid_vars->suck_state != 0 && + FUN_L00_002dc9f0_4318(moby, &puffoid_vars->knockback)) { moby->state = moby->command; - puffoid_vars->unkC8 = 0; + puffoid_vars->suck_state = 0; } break; } diff --git a/src/overlays/l16/mobys/chomper.c b/src/overlays/l16/mobys/chomper.c index 88b3575284..9ba30d2eec 100644 --- a/src/overlays/l16/mobys/chomper.c +++ b/src/overlays/l16/mobys/chomper.c @@ -79,9 +79,9 @@ typedef struct ChomperVars { u8 pad_59[0x1]; u8 look_height; u8 pad_5B[0x6D]; - u16 unkC8; + u16 suck_state; u8 pad_CA[0x6]; - s32 unkD0; + s32 suck_sequences; u8 pad_D4[0x4C]; u8 motion; u8 pad_121[0x5F]; @@ -120,7 +120,7 @@ void chomper_update(struct Moby *chomper_moby) { chomper_data->max_health = 1; chomper_data->hit_response_class = 0; chomper_data->health = 1.0f; - chomper_data->unkD0 = (int)&D_L16_00161E48; + chomper_data->suck_sequences = (int)&D_L16_00161E48; if (rand() & 1) chomper_moby->flags |= 0x8000; qcopy(chomper_data->home_position, &chomper_moby->pos); @@ -179,7 +179,7 @@ void chomper_update(struct Moby *chomper_moby) { case 7: if (FUN_L00_002dc9f0(chomper_moby, &chomper_data->motion)) { chomper_moby->state = CHOMPER_WAIT_TO_APPROACH_TARGET; - chomper_data->unkC8 = 0; + chomper_data->suck_state = 0; } break; case CHOMPER_KNOCKBACK: diff --git a/src/overlays/shared/enemies/blarg_commander.c b/src/overlays/shared/enemies/blarg_commander.c index 20be08e2f3..1d04264b03 100644 --- a/src/overlays/shared/enemies/blarg_commander.c +++ b/src/overlays/shared/enemies/blarg_commander.c @@ -50,9 +50,9 @@ typedef struct { s32 motion_flags; /* 0x44: set to 1 on launch */ f32 collision_z_offset; /* 0x48: 0.7 on launch */ u8 pad4C[0x11]; - u8 unk5D; + u8 unk5D; /* KnockbackMotion.unk3D */ u8 pad5E[0xE]; - f32 unk6C; /* 0x6C */ + f32 target_speed; /* 0x6C: KnockbackMotion.target_speed (motion at +0x20) */ f32 apex_animation_frame; /* 0x70: -1 on launch */ f32 landing_animation_frame; /* 0x74: -1 on launch */ } LobbedVars; @@ -72,7 +72,7 @@ void start_blarg_commander_knockback(void *unused, struct Moby *moby) { } lobbed_vars->collision_z_offset = 0.7f; lobbed_vars->collision_radius = truncate_float_to_s32(716.8f); - lobbed_vars->unk6C = 0.0f; + lobbed_vars->target_speed = 0.0f; moby->update_dist = 0xFF; moby->flags &= ~6; knockback_heading = fast_add_rotations(moby->rot.z, 3.1415927f); @@ -98,7 +98,7 @@ void start_blarg_commander_knockback(void *unused, struct Moby *moby) { &lobbed_vars->launch_speed, &lobbed_vars->vertical_speed); trooper_start_knockback(knockback_heading, moby, &lobbed_vars->arc, 1, 5, 2); - lobbed_vars->unk6C = frame_time + frame_time; + lobbed_vars->target_speed = frame_time + frame_time; lobbed_vars->apex_animation_frame = -1.0f; lobbed_vars->landing_animation_frame = -1.0f; moby->flags &= ~0x1000; diff --git a/src/overlays/shared/enemies/blarg_trooper_projectile.c b/src/overlays/shared/enemies/blarg_trooper_projectile.c index 87266eae7f..ab184117dd 100644 --- a/src/overlays/shared/enemies/blarg_trooper_projectile.c +++ b/src/overlays/shared/enemies/blarg_trooper_projectile.c @@ -165,14 +165,14 @@ typedef struct { struct { f32 x, y, z, w; } v; - } dir; /* 0x00: unit direction; z/w overwritten with 1 and a range */ - struct Moby *self; /* 0x10: moby to ignore */ - s32 mask; /* 0x14: collision classes */ - u8 unk18; - u8 unk19; - s16 oclass; /* 0x1A */ - f32 radius; /* 0x1C */ - s32 has_direction; /* 0x20: 1 from make_hit_descriptor, which copies dir */ + } dir; /* 0x00: unit direction; z/w overwritten with 1 and a range */ + struct Moby *self; /* 0x10: moby to ignore */ + s32 mask; /* 0x14: collision classes */ + u8 attack_type; /* 0x18: MobyHit.attack_type */ + u8 attack_subtype; /* 0x19 */ + s16 oclass; /* 0x1A */ + f32 radius; /* 0x1C */ + s32 has_direction; /* 0x20: 1 from make_hit_descriptor, which copies dir */ } CollisionProbe; extern f32 D_L04_00166F40[]; /* arena centre */ @@ -238,7 +238,7 @@ void blarg_trooper_projectile_update(struct Moby *moby) { probe = ≺ pr.dir.v.z = 1.0f; pr.dir.v.w = 5627.9248f; - pr.unk19 = pr.unk18 = 1; + pr.attack_subtype = pr.attack_type = 1; pr.oclass = moby->oclass; } if (fast_dec_timer_s16(&v->time) && moby->command == 0) { diff --git a/src/overlays/shared/enemies/bomb_spawner_bomb.c b/src/overlays/shared/enemies/bomb_spawner_bomb.c index ff94900ae3..c9eb27ae5e 100644 --- a/src/overlays/shared/enemies/bomb_spawner_bomb.c +++ b/src/overlays/shared/enemies/bomb_spawner_bomb.c @@ -45,22 +45,24 @@ typedef struct { s32 slots[18]; /* 0xE8: moby indices of the pooled children, -1 = empty */ } Spawner; +/* MobyTargetInfo (get_moby_target_info) as this unit reads it. */ typedef struct { - f32 timer; /* 0x00 */ - s16 duration; /* 0x04 */ + f32 health; /* 0x00 */ + s16 max_health; /* 0x04 */ u8 pad6[0x2A]; s32 unk30; s32 unk34; -} SpawnSound; +} SpawnTargetInfo; +/* Suck cannon record (get_moby_suck_cannon_record). */ typedef struct { u8 pad0[0x68]; - s16 unk68; + s16 state; /* 0x68 */ u8 pad6A[2]; - s32 unk6C; + s32 progress; /* 0x6C: f32, cleared as an int */ u8 pad70[0x24]; - s32 unk94; -} SpawnTarget; + s32 flight_timer; /* 0x94 */ +} SuckRecord; extern struct Moby *D_L03_0015FFD8_gp __asm__("D_L03_0015FFD8") __attribute__((sda)); extern struct Moby *D_L03_0015FFE4; @@ -85,18 +87,18 @@ struct Moby *revive_spawner_pooled_child(struct Moby *spawner_moby, Vec4 *at, s3 enum { SPAWNER_CHILD_STATE_INITIAL = 0 }; - Vec4 pos; - Vec4 *spawn_position_source; - Spawner *spawner_data; - struct Moby *current_moby; - struct Moby *spawned; - SpawnClass *spawned_moby_class; - SpawnTarget *target; - SpawnSound *sound; - s32 found; - s32 i; - s32 pooled_child_moby_index; - u16 flags; + Vec4 pos; + Vec4 *spawn_position_source; + Spawner *spawner_data; + struct Moby *current_moby; + struct Moby *spawned; + SpawnClass *spawned_moby_class; + SuckRecord *suck_record; + SpawnTargetInfo *target_info; + s32 found; + s32 i; + s32 pooled_child_moby_index; + u16 flags; spawn_position_source = &pos; pos.q = at->q; @@ -151,11 +153,11 @@ struct Moby *revive_spawner_pooled_child(struct Moby *spawner_moby, Vec4 *at, s3 current_moby->scale = ((SpawnClass *)current_moby->pclass)->scale * 0.1f; } set_moby_animation(current_moby, 0, 0); - target = get_moby_suck_cannon_record(current_moby); - if (target != NULL) { - target->unk94 = 0; - target->unk68 = 0; - target->unk6C = 0; + suck_record = get_moby_suck_cannon_record(current_moby); + if (suck_record != NULL) { + suck_record->flight_timer = 0; + suck_record->state = 0; + suck_record->progress = 0; } if (spawner_moby->bolts < current_moby->bolts) { current_moby->bolts = spawner_moby->bolts; @@ -171,11 +173,11 @@ struct Moby *revive_spawner_pooled_child(struct Moby *spawner_moby, Vec4 *at, s3 copy_hero_moby_field_38(current_moby); update_entity(current_moby); spawned = current_moby; - sound = get_moby_target_info(spawned); - if (sound != NULL) { - sound->unk34 = 0; - sound->unk30 = 0; - sound->timer = sound->duration; + target_info = get_moby_target_info(spawned); + if (target_info != NULL) { + target_info->unk34 = 0; + target_info->unk30 = 0; + target_info->health = target_info->max_health; } } for (current_moby = D_L03_0015FFE4; current_moby != NULL; current_moby = current_moby->next) { diff --git a/src/overlays/shared/enemies/frog.c b/src/overlays/shared/enemies/frog.c index c1766ebe01..1d4f215ba4 100644 --- a/src/overlays/shared/enemies/frog.c +++ b/src/overlays/shared/enemies/frog.c @@ -47,9 +47,9 @@ typedef struct FrogVars { u8 pad59[0x1]; s8 look_height; u8 pad5B[0x6d]; - s16 unkC8; + s16 suck_state; /* suck cannon record (pvars + 0x60) + 0x68: its suck state */ u8 padCA[0x6]; - short *unkD0; + short *suck_sequences; /* suck record + 0x70: the class's sequence table */ u8 padD4[0x4c]; struct KnockbackMotion knockback; /* 0x120 */ u8 pad180[0x40]; @@ -62,25 +62,25 @@ typedef struct FrogVars { f32 movement_speed; s16 blink_countdown; s16 hidden; - s32 unk1EC; - u8 pad1F0[0x8]; - s32 path_index; - s32 wander_destination_timer; - s16 spawns_child; - s16 initialize_in_respawn; - u8 pad204[0x4]; - s16 path_point; - s16 target_selection_frame_slot; - char *child; - f32 home_position[4]; - u8 home_rotation[0x10]; - u8 wander_destination[0x10]; - s16 bolt_divisor; - s16 unk242; - f32 approach_stop_distance; - f32 glow_animation_phase; - f32 path_activation_distance_xy; - u8 big_head_manipulator[0x4]; + s32 boundary_path; /* path index: path_8808 stops the approach where it crosses this path */ + u8 pad1F0[0x8]; + s32 path_index; + s32 wander_destination_timer; + s16 spawns_child; + s16 initialize_in_respawn; + u8 pad204[0x4]; + s16 path_point; + s16 target_selection_frame_slot; + char *child; + f32 home_position[4]; + u8 home_rotation[0x10]; + u8 wander_destination[0x10]; + s16 bolt_divisor; + s16 needs_l06_flag; /* outside the suck cannon it updates only while D_L06_0015FDF8 is set (1) or clear (0) */ + f32 approach_stop_distance; + f32 glow_animation_phase; + f32 path_activation_distance_xy; + u8 big_head_manipulator[0x4]; } FrogVars; struct MobyHit { @@ -279,10 +279,10 @@ void frog_update(unsigned char *moby) { } if (MOBY(moby)->state != FROG_STATE_SUCK_CANNON_HELD) { if (*(int *)&D_L06_0015FDF8 != 0) { - if (frog_instance_vars->unk242 == 0) + if (frog_instance_vars->needs_l06_flag == 0) return; } else { - if (frog_instance_vars->unk242 != 0) + if (frog_instance_vars->needs_l06_flag != 0) return; } } @@ -318,7 +318,7 @@ void frog_update(unsigned char *moby) { frog_instance_vars->knockback.collision_radius_1024ths = 0x200; frog_instance_vars->approach_stop_distance = wait; frog_instance_vars->glow_animation_phase = random_angle_radians(); - frog_instance_vars->unkD0 = D_L06_00161BF0; + frog_instance_vars->suck_sequences = D_L06_00161BF0; frog_instance_vars->wrench_hit_sound = 1; if (frog_instance_vars->spawns_child != 0) { char *child; @@ -535,7 +535,7 @@ void frog_update(unsigned char *moby) { blend_frog_rotation_to_facing_frame((char *)moby, (float *)D_L06_00174600, B); fast_vec_normalize(A, moby + 0xC0, frog_instance_vars->movement_speed * D_0015ED6C_gp); FUN_L06_002e9b60_c(moby, A, 1, 0.3f, 0.3f); - if (path_8808(frog_instance_vars->unk1EC, &MOBY(moby)->pos, target + 0x10, D) != 0 && + if (path_8808(frog_instance_vars->boundary_path, &MOBY(moby)->pos, target + 0x10, D) != 0 && fast_vec_dist(&MOBY(moby)->pos, D) < frog_instance_vars->approach_stop_distance) { near = 1; } @@ -608,7 +608,7 @@ void frog_update(unsigned char *moby) { MOBY(moby)->state = FROG_STATE_WANDER; if (MOBY(moby)->prev_seq != 0) blend_moby_animation(moby, 0, 0, scale_game_frames(10)); - frog_instance_vars->unkC8 = 0; + frog_instance_vars->suck_state = 0; } break; } diff --git a/src/overlays/shared/enemies/horny_toad.c b/src/overlays/shared/enemies/horny_toad.c index e1d19338ef..95494f91c6 100644 --- a/src/overlays/shared/enemies/horny_toad.c +++ b/src/overlays/shared/enemies/horny_toad.c @@ -59,9 +59,9 @@ typedef struct { u8 look_height; u8 pad5B[0x70 - 0x5B]; u8 motion[0x138 - 0x70]; - s16 unk138; + s16 suck_state; /* suck cannon record (pvars + 0xD0) + 0x68: its suck state */ u8 pad13A[0x140 - 0x13A]; - void *unk140; + void *suck_sequences; /* suck record + 0x70: the class's sequence table */ u8 pad144[0x180 - 0x144]; ToadVec approach_position; u8 pad190[0x1C0 - 0x190]; @@ -224,7 +224,7 @@ void horny_toad_update(Moby *moby) { if (moby->prev_seq != 1) blend_moby_animation(moby, 1, 0, 0); horny_toad_vars->wrench_hit_sound = 1; - horny_toad_vars->unk140 = &D_L00_00161960; + horny_toad_vars->suck_sequences = &D_L00_00161960; qcopy(horny_toad_vars->wander_center, (*(ToadVec *)&moby->pos)); k = frame_time; horny_toad_vars->wander_radius = 1.5f; @@ -264,7 +264,7 @@ void horny_toad_update(Moby *moby) { case HORNY_TOAD_RUN_MOVEMENT_SEQUENCE: if (FUN_L00_002dc9f0_2d4610(moby, horny_toad_vars->motion) != 0) { moby->state = HORNY_TOAD_ROAM; - horny_toad_vars->unk138 = 0; + horny_toad_vars->suck_state = 0; } break; case HORNY_TOAD_FACE_FOLLOW_MOBY: { diff --git a/src/overlays/shared/enemies/large_amoeboid.c b/src/overlays/shared/enemies/large_amoeboid.c index d524a05a76..d950133a99 100644 --- a/src/overlays/shared/enemies/large_amoeboid.c +++ b/src/overlays/shared/enemies/large_amoeboid.c @@ -57,12 +57,12 @@ typedef struct LargeAmoeboidVars { u8 pad59[0x1]; s8 look_height; /* 0x5A */ u8 pad5B[0x5]; - struct KnockbackMotion knockback; /* 0x60 */ - u8 padC0[0x68]; - u16 unk128; - u8 pad12A[0x6]; - void *unk130; - u8 pad134[0x3c]; + struct KnockbackMotion knockback; /* 0x60 */ + u8 padC0[0x68]; + u16 suck_state; /* suck cannon record (pvars + 0xC0) + 0x68: its suck state */ + u8 pad12A[0x6]; + void *suck_sequences; /* suck record + 0x70: the class's sequence table */ + u8 pad134[0x3c]; struct GroundMoveControl move_control; /* 0x170 */ f32 path_search_point[4]; u8 pad1D0[0x30]; @@ -281,9 +281,9 @@ void large_amoeboid_update(unsigned char *moby) { large_amoeboid_vars->aim_height = large_amoeboid_vars->size_scale; large_amoeboid_vars->glow_cycle_phase = FUN_00213308(); if (MOBY(moby)->oclass == 0x362) - large_amoeboid_vars->unk130 = &D_L01_00161A50; + large_amoeboid_vars->suck_sequences = &D_L01_00161A50; else - large_amoeboid_vars->unk130 = &D_L01_00161A40; + large_amoeboid_vars->suck_sequences = &D_L01_00161A40; large_amoeboid_vars->wrench_hit_sound = 1; if (large_amoeboid_vars->removal_height_table_index != 0) { large_amoeboid_vars->health = 1.0f; @@ -661,7 +661,7 @@ void large_amoeboid_update(unsigned char *moby) { case LARGE_AMOEBOID_PROCESS_SUCK_CANNON_INTERACTION: if (FUN_L00_002dc9f0(moby, &large_amoeboid_vars->knockback)) { MOBY(moby)->state = LARGE_AMOEBOID_TRY_ACQUIRE_TARGET_PATH; - large_amoeboid_vars->unk128 = 0; + large_amoeboid_vars->suck_state = 0; } break; } diff --git a/src/overlays/shared/enemies/plasmabot.c b/src/overlays/shared/enemies/plasmabot.c index a8c5e1913c..c6b42fd011 100644 --- a/src/overlays/shared/enemies/plasmabot.c +++ b/src/overlays/shared/enemies/plasmabot.c @@ -114,7 +114,7 @@ typedef struct PlasmabotVars { f32 path_traversal_direction; s32 aim_pitch_angle; s32 aim_pitch_angular_velocity; - s32 unk288; + s32 giant_clank_only; /* set: hidden and without collision unless the hero body (D_001413F4) is Giant Clank (2) */ } PlasmabotVars; extern char D_0013E533[]; @@ -377,7 +377,7 @@ void plasmabot_update(char *moby) { plasmabot_update_private_vars = (PlasmabotVars *)MOBY(moby)->pvars; plasmabot_aim_target_moby = 0; FUN_L00_00263ac8(2.5f, moby, 2, &plasmabot_update_private_vars->aim_joint_manipulator); - if (plasmabot_update_private_vars->unk288 != 0) { + if (plasmabot_update_private_vars->giant_clank_only != 0) { if (((unsigned char *)D_001413F4)[0] != 2) { MOBY(moby)->flags |= 0x41; MOBY(moby)->collision = 0; diff --git a/src/overlays/shared/enemies/scoutbot.c b/src/overlays/shared/enemies/scoutbot.c index 2d176cc486..b199b82329 100644 --- a/src/overlays/shared/enemies/scoutbot.c +++ b/src/overlays/shared/enemies/scoutbot.c @@ -38,7 +38,7 @@ typedef struct ScoutbotVars { u8 pad24[0x1C]; f32 velocity[4]; u8 pad50[0x78]; - s16 unkC8; + s16 suck_state; /* suck cannon record (pvars + 0x60) + 0x68: its suck state */ u8 padCA[0xa6]; f32 tracked_target_position[4]; u8 pad180[0x30]; @@ -665,7 +665,7 @@ void *enter_scoutbot_return_home_state(struct Moby *moby) { if ((unsigned char)((char)moby->prev_seq) != 2) { blend_moby_animation(moby, 2, 0, 3); } - scoutbot_data->unkC8 = 0; + scoutbot_data->suck_state = 0; return suction_cancel_status; } diff --git a/src/overlays/shared/enemies/spawner.c b/src/overlays/shared/enemies/spawner.c index a775e42791..f684768b3a 100644 --- a/src/overlays/shared/enemies/spawner.c +++ b/src/overlays/shared/enemies/spawner.c @@ -5,6 +5,7 @@ #include "sda.h" #include "qcopy.h" #include "rnc/mobys/moby.h" +#include "rnc/overlay/shared/mobys/hit_color_flash.h" #include "rnc/data_labels.h" #include "rnc/math/fast_math.h" #include "rnc/math/asm_helpers.h" @@ -27,12 +28,11 @@ enum { }; typedef struct SpawnerVars { - u8 pad0[0x20]; - f32 unk20; - u8 pad24[0x3c]; - u8 unk60[0x7]; - s8 unk67; - u8 pad68[0x8]; + u8 pad0[0x20]; + f32 health; /* 0x20: target info (moby_target_info.h); hits subtract their damage */ + u8 pad24[0x3c]; + struct HitColorFlash + hit_flash; /* 0x60: flash_red (0x67) is set to 0x5A on a hit, 0x78 on the last */ u8 unk70[0x10]; f32 target_search_radius; s32 excluded_moby; From cbeeaafa6e8b2742ebc3ade47bacb3f849720639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:28:50 +0000 Subject: [PATCH 191/213] decomp: name the grindrail camera velocity pad lane --- src/overlays/shared/camera/grindrail_camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/overlays/shared/camera/grindrail_camera.c b/src/overlays/shared/camera/grindrail_camera.c index 529c5e0197..0235ecb0d8 100644 --- a/src/overlays/shared/camera/grindrail_camera.c +++ b/src/overlays/shared/camera/grindrail_camera.c @@ -284,7 +284,7 @@ typedef struct { typedef struct { float vel[3]; - float unk0C; + float pad0C; /* w lane of the velocity quadword */ float position_rate; char p14[0x1C]; SubA a; From c9a98b5804cfe4effdf538f9e0c6efcc25cbd368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:28:50 +0000 Subject: [PATCH 192/213] decomp: name the pause menu fog fields after struct View and the map slot cell after MapState --- .../shared/game/run_level_main_loop.c | 6 ++--- .../shared/ui/menus/initialize_pause_menu.c | 22 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/overlays/shared/game/run_level_main_loop.c b/src/overlays/shared/game/run_level_main_loop.c index f9b985287f..6eced50497 100644 --- a/src/overlays/shared/game/run_level_main_loop.c +++ b/src/overlays/shared/game/run_level_main_loop.c @@ -326,10 +326,10 @@ void run_level_main_loop(void) { #include "rnc/streaming/disc_table.h" typedef struct { - s32 unk0; + s32 cell; /* MapState.highlighted_cells[].cell: grid cell, <0 unused */ s32 unk4; s32 buffer; - s32 unkC; + s32 padC; } MapChunkSlot; typedef struct { @@ -462,7 +462,7 @@ void initialize_level_map_archive(void) { fast_mem_copy((void *)state->coverage_runs, (char *)archive + archive[1], second_size); state->scratch_data = hud_heap_alloc(0x1000, 0, (char *)heap_tag, 0x2F3); for (i = 0; i < 8; i++) { - D_L00_001841F0.slots[i].unk0 = -1; + D_L00_001841F0.slots[i].cell = -1; D_L00_001841F0.slots[i].unk4 = -1; D_L00_001841F0.slots[i].buffer = D_L00_001841F0.scratch_data + i * 0x200; } diff --git a/src/overlays/shared/ui/menus/initialize_pause_menu.c b/src/overlays/shared/ui/menus/initialize_pause_menu.c index 44d585daea..7a25fb3cb4 100644 --- a/src/overlays/shared/ui/menus/initialize_pause_menu.c +++ b/src/overlays/shared/ui/menus/initialize_pause_menu.c @@ -127,12 +127,12 @@ typedef struct { u8 pad0[0xB0]; f32 tan_half_fov; u8 padB4[0x164]; - s32 fog_start_distance; - f32 unk21C; + s32 fog_near_dist; + f32 fog_far_dist; u8 pad220[8]; - f32 unk228; - s32 unk22C; -} ViewSettings; + f32 fog_near_int; + s32 fog_far_int; +} ViewSettings; /* the level copy of struct View (rnc/rendering/view.h) */ extern Ent *l00_pause_menu_page_mobys[] __asm__("D_L00_001B9E90"); extern s32 D_L00_0015F5D8; @@ -287,15 +287,15 @@ void initialize_pause_menu(void) { qcopy(&D_L00_001B9CF0.saved_camera_position, &g_debug_camera.position); qcopy(&D_L00_001B9CF0.saved_camera_angles, &g_debug_camera.angles); { - f32 unk21C = 524288.0f; - f32 unk228 = 255.0f; + f32 fog_far_dist = 524288.0f; + f32 fog_near_int = 255.0f; f32 tan_half_fov = 0.63f; D_L00_001B9CF0.saved_tan_half_fov = ((ViewSettings *)D_L00_0016CA40)->tan_half_fov; ((ViewSettings *)D_L00_0016CA40)->tan_half_fov = tan_half_fov; - ((ViewSettings *)D_L00_0016CA40)->unk21C = unk21C; - ((ViewSettings *)D_L00_0016CA40)->unk228 = unk228; - ((ViewSettings *)D_L00_0016CA40)->unk22C = 0; - ((ViewSettings *)D_L00_0016CA40)->fog_start_distance = 0; + ((ViewSettings *)D_L00_0016CA40)->fog_far_dist = fog_far_dist; + ((ViewSettings *)D_L00_0016CA40)->fog_near_int = fog_near_int; + ((ViewSettings *)D_L00_0016CA40)->fog_far_int = 0; + ((ViewSettings *)D_L00_0016CA40)->fog_near_dist = 0; } update_view_context(); reset_active_camera_position_and_basis(); From bdafda5806856a3fe598301f9b085ef3f3a11003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:28:50 +0000 Subject: [PATCH 193/213] decomp: refer to named HUD element fields in the HUD comments --- src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c | 4 ++-- src/overlays/shared/ui/hud/initialize_numeric_hud_element.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c b/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c index f6eb0e0f48..657d712851 100644 --- a/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c +++ b/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c @@ -1236,7 +1236,7 @@ void update_bolt_counter_hud_animation_and_visibility(T00239d00 *hud_element) { /* * Draw callback of the bolt counter HUD element (queued by update_npc_dialogue * with FUN_L00_00239cc8 / FUN_L00_00239d00): a panel that slides open by - * cnt[0] / bolt_panel_open_steps_gp, the spinning bolt icon (frame from *unk80), the + * cnt[0] / bolt_panel_open_steps_gp, the spinning bolt icon (frame from *animation_counters), the * bolt count with a drop shadow, and a thousands separator every three * digits (an apostrophe, or a dot for languages 3 and 5). Returns the element width. */ @@ -1480,7 +1480,7 @@ int draw_hud_cropped_gauge_panel(char *cropped_gauge_element) { of 30 + func_001F9850(120). */ /* Ported from rac1-decomp (src/overlays/shared/hud_00235960.c: func_L00_0023B0F8), where it is exact; names translated to the US level program. */ -/* Sets unk7C to scale_game_frames(0x78) + 0x1E and w/h to 0x20, calls FUN_L00_00235c80. */ +/* Sets visible_timer to scale_game_frames(0x78) + 0x1E and w/h to 0x20, calls FUN_L00_00235c80. */ void initialize_numeric_hud_timer_and_base_dimensions(HudElem *hud_element) { hud_element->visible_timer = scale_game_frames(0x78) + 0x1E; hud_element->w = 0x20; diff --git a/src/overlays/shared/ui/hud/initialize_numeric_hud_element.c b/src/overlays/shared/ui/hud/initialize_numeric_hud_element.c index 742f19562c..f0308a10d5 100644 --- a/src/overlays/shared/ui/hud/initialize_numeric_hud_element.c +++ b/src/overlays/shared/ui/hud/initialize_numeric_hud_element.c @@ -7,7 +7,7 @@ /* Ported from rac1-decomp (src/overlays/shared/hud_00235960.c: func_L00_00237B20), where it is exact; names translated to the US level program. */ -/* Sets unk7C to scale_game_frames(0xA) + 0x1E, clears 0x48/0x4A, w/h 0x20, calls 00235c80. */ +/* Sets visible_timer to scale_game_frames(0xA) + 0x1E, clears offset_x/offset_y, w/h 0x20, calls 00235c80. */ void initialize_numeric_hud_element(HudElem *hud_element) __asm__("FUN_L00_00237190"); void initialize_numeric_hud_element(HudElem *hud_element) { From 34874743f9fc67620810e6322bb4a439a9c6a027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:28:50 +0000 Subject: [PATCH 194/213] decomp: name beam trail slot rows and the effect probe hit descriptor flag --- src/overlays/shared/rendering/effects/beam_slots.c | 3 ++- .../rendering/effects/update_three_phase_effect_particle.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/overlays/shared/rendering/effects/beam_slots.c b/src/overlays/shared/rendering/effects/beam_slots.c index 373d947672..542f4b4ba7 100644 --- a/src/overlays/shared/rendering/effects/beam_slots.c +++ b/src/overlays/shared/rendering/effects/beam_slots.c @@ -134,8 +134,9 @@ typedef struct { } BeamStrand; /* Ported from rac1-decomp (src/overlays/shared/vendor_002E1660.c: func_L00_002E4138). */ +/* beam_transforms seen from 0x10 in: basis rows 1 and 2, the origin, then the next transform's row 0. */ typedef struct { - OvlVec4 axis, unk10, position, unk30; + OvlVec4 axis, basis_row2, position, next_basis_row0; } TrailSlot; typedef struct { diff --git a/src/overlays/shared/rendering/effects/update_three_phase_effect_particle.c b/src/overlays/shared/rendering/effects/update_three_phase_effect_particle.c index 4535951ac5..26b0fe9126 100644 --- a/src/overlays/shared/rendering/effects/update_three_phase_effect_particle.c +++ b/src/overlays/shared/rendering/effects/update_three_phase_effect_particle.c @@ -3317,7 +3317,7 @@ typedef struct { s32 f14; s32 f18; f32 f1C; - s32 unk20; + s32 has_direction; /* 0x20: hit descriptor flag (record_moby_hit), the probe direction is v */ char pad[0xC]; } S_26ff10; @@ -3408,7 +3408,7 @@ void update_splitting_effect_particle_with_collision_response_and_fade(Moby_26ff collision_parameters.v_26ff10.q_26ff10 = *(U128 *)pv; if (fl & 0x40) clear_u64_value(&collision_parameters); - collision_parameters.unk20 = 1; + collision_parameters.has_direction = 1; col = pv->f1C; aux = &collision_parameters; pa = v1u.f; From 3654556379b937a5c7d0125164f7468c56f90b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:28:50 +0000 Subject: [PATCH 195/213] decomp: name the level stash slot record after StashEntry --- src/overlays/shared/streaming/send_dma_to_stash_slot.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/overlays/shared/streaming/send_dma_to_stash_slot.c b/src/overlays/shared/streaming/send_dma_to_stash_slot.c index a59338be74..9d06ef5c1c 100644 --- a/src/overlays/shared/streaming/send_dma_to_stash_slot.c +++ b/src/overlays/shared/streaming/send_dma_to_stash_slot.c @@ -4,11 +4,12 @@ /* Ported from rac1-decomp (src/overlays/shared/stash_00295010.c: func_L00_00295010), where it is exact; names translated to the US level program. */ +/* The level copy of struct StashEntry (rnc/streaming/stash/stash.h). */ typedef struct { - char *base; - int limit; - int unk8; - int unkC; + char *base; /* iop_address */ + int limit; /* reserved_qwords */ + int tag; + int pad_0C; } StashSlot; extern StashSlot l00_stash_slots[] __asm__("D_L00_001C12D8"); From 5fb623fd33b29eae09f5bd3829d5637f01344dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:28:51 +0000 Subject: [PATCH 196/213] decomp: refer to Moby.save_id in the garage door and spawn point comments --- src/overlays/shared/props/garage_door.c | 2 +- src/overlays/shared/props/spawn_point.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/overlays/shared/props/garage_door.c b/src/overlays/shared/props/garage_door.c index 21a5aec258..b678e2f442 100644 --- a/src/overlays/shared/props/garage_door.c +++ b/src/overlays/shared/props/garage_door.c @@ -11,7 +11,7 @@ typedef struct Moby Moby; extern s32 current_level_index_gp __asm__("D_0015ED84") __attribute__((sda)); /* - * Rises once its moby (unkB2) is collected: waits in state 0 (keeping the + * Rises once its moby (save_id) is collected: waits in state 0 (keeping the * target point at its position), then climbs D_0015ED6C per frame until 4 * above the target, and stays there. */ diff --git a/src/overlays/shared/props/spawn_point.c b/src/overlays/shared/props/spawn_point.c index 09d4823a3a..05a56c4dcf 100644 --- a/src/overlays/shared/props/spawn_point.c +++ b/src/overlays/shared/props/spawn_point.c @@ -25,7 +25,7 @@ typedef struct { s32 spawn_slot; /* 0x18: slot in the level's D_0014C050 row, -1 for none */ } PickupVars; -/* Per-level pickup state; collected[] is indexed by the moby's unkB2 id. */ +/* Per-level pickup state; collected[] is indexed by the moby's save_id. */ typedef struct { u8 pad0[0x454]; u8 collected[1]; From 48fac7ff45e0ab48f1579deeccb6f69e3122b8b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:17:47 +0000 Subject: [PATCH 197/213] decomp: name the HUD element animation id, mode, next id/mode, pending flag and the boot channel slide/timer --- include/rnc/overlay/shared/ui/hud.h | 14 +++++++------- src/mobys/animation/apply_pending_animation.c | 2 +- src/mobys/animation/queue_animation_update.c | 10 +++++----- .../shared/ui/hud/draw_weapon_ammo_hud_panel.c | 4 ++-- src/overlays/shared/ui/hud/hud_keep_visible.c | 2 +- src/ui/hud/init_hud.c | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/include/rnc/overlay/shared/ui/hud.h b/include/rnc/overlay/shared/ui/hud.h index 17f045f675..306a42d249 100644 --- a/include/rnc/overlay/shared/ui/hud.h +++ b/include/rnc/overlay/shared/ui/hud.h @@ -4,19 +4,19 @@ #include "types.h" /* One of the 13 HUD element records at D_L00_0017DC50. update_hud_elements - counts visible_timer down each frame (unk04 bit 0x10 holds it up), moves slide + counts visible_timer down each frame (mode bit 0x10 holds it up), moves slide between -6 and 30 with it and calls update; hud_keep_visible finds a record by key. */ typedef struct HudElem { - int unk00; - int unk04; + int anim_id; /* 0x00: id of the loaded HUD animation (load_animation_definition) */ + int mode; /* 0x04: current animation mode; bit 0x10 keeps the element shown */ int max_value; int *value_source; char pad10[0x4]; void (*update)(struct HudElem *); - char pad18[0x8]; - int unk20; - int unk24; + char pad18[0x8]; + int next_anim_id; /* 0x20: queued by queue_animation_update, loaded by apply_pending_animation */ + int next_mode; /* 0x24 */ char pad28[0x1C]; int icon; /* 0x44: icon sprite id */ short offset_x; @@ -28,7 +28,7 @@ typedef struct HudElem { int h; int flags; int key; - int unk68; + int pending; /* 0x68: a queued animation waits for apply_pending_animation */ int slide; unsigned char cnt[4]; int shown_value; diff --git a/src/mobys/animation/apply_pending_animation.c b/src/mobys/animation/apply_pending_animation.c index a17be23a8d..5acecca5ec 100644 --- a/src/mobys/animation/apply_pending_animation.c +++ b/src/mobys/animation/apply_pending_animation.c @@ -4,7 +4,7 @@ struct Anim; typedef void (*AnimFn)(struct Anim *); struct Anim { - s32 unk0; + s32 id; s32 mode; s32 b; s32 c; diff --git a/src/mobys/animation/queue_animation_update.c b/src/mobys/animation/queue_animation_update.c index 6479ea4673..0c219100fe 100644 --- a/src/mobys/animation/queue_animation_update.c +++ b/src/mobys/animation/queue_animation_update.c @@ -3,7 +3,7 @@ #include "rnc/globals.h" struct Anim { - s32 unk0; + s32 id; s32 flags; u8 pad8[0x18]; s32 next_id; @@ -17,9 +17,9 @@ struct Anim { s32 serial; s32 pending; u8 pad6c[4]; - s32 unk70; + s32 counter_digits; /* 0x70: HudElem.cnt */ u8 pad74[8]; - s32 unk7C; + s32 visible_timer; u8 pad80[0x10]; }; @@ -54,8 +54,8 @@ s32 queue_animation_update(s32 chan, anim->next_e = queued_animation_callback; anim->pending = 1; anim->next_mode = mode; - anim->unk7C = 0; - anim->unk70 = 0; + anim->visible_timer = 0; + anim->counter_digits = 0; if (mode & anim->flags & 0x20) { apply_pending_animation(anim); } diff --git a/src/overlays/shared/ui/hud/draw_weapon_ammo_hud_panel.c b/src/overlays/shared/ui/hud/draw_weapon_ammo_hud_panel.c index 010fc0e981..b593b47a82 100644 --- a/src/overlays/shared/ui/hud/draw_weapon_ammo_hud_panel.c +++ b/src/overlays/shared/ui/hud/draw_weapon_ammo_hud_panel.c @@ -212,7 +212,7 @@ int update_hud_elements(int call) { hud_element = hud_elements; hud_timer_refresh_control = &D_L00_0017E4D8; do { - if ((hud_element->unk04 & 0x10) || hud_timer_refresh_control->b != 0) { + if ((hud_element->mode & 0x10) || hud_timer_refresh_control->b != 0) { if (hud_element->visible_timer < scale_game_frames(10)) { hud_element->visible_timer = scale_game_frames(10); } @@ -225,7 +225,7 @@ int update_hud_elements(int call) { if (hud_element->slide >= -5) hud_element->slide--; } - if (hud_element->unk68 && hud_element->slide == -6) { + if (hud_element->pending && hud_element->slide == -6) { apply_pending_animation(hud_element); } if (call && hud_element->update) { diff --git a/src/overlays/shared/ui/hud/hud_keep_visible.c b/src/overlays/shared/ui/hud/hud_keep_visible.c index 976a2b1614..5bbaefa797 100644 --- a/src/overlays/shared/ui/hud/hud_keep_visible.c +++ b/src/overlays/shared/ui/hud/hud_keep_visible.c @@ -195,7 +195,7 @@ s32 hud_keep_visible(s32 key, s32 minimum_visible_frames) { if (hud_elements[i].key == key) break; } - if (i < 13 && hud_elements[i].unk68 == 0) { + if (i < 13 && hud_elements[i].pending == 0) { hud_element = hud_elements + i; hud_element->visible_timer = (minimum_visible_frames < hud_element->visible_timer) ? hud_element->visible_timer diff --git a/src/ui/hud/init_hud.c b/src/ui/hud/init_hud.c index 5812e42a23..f03df67648 100644 --- a/src/ui/hud/init_hud.c +++ b/src/ui/hud/init_hud.c @@ -13,9 +13,9 @@ struct HudSlot { u8 pad_4[0x3C]; s32 item_id; /* 0x64 of the slot: remove_hud_item's slot_item_id, -1 none */ u8 pad_44[0x4]; - s32 unk48; + s32 slide; /* 0x6C of the slot */ u8 pad_4C[0xC]; - s32 unk58; + s32 visible_timer; /* 0x7C of the slot */ }; #include "rnc/ui/hud/hud_state.h" @@ -52,8 +52,8 @@ void init_hud(void) { *(s32 *)((u8 *)slot - 0x4) = 0x10000; queue_animation_update(slot_index, 0xFFFF, 0, 0, 0, 0, 1); slot_index += 1; - slot->unk58 = 0; - slot->unk48 = -6; + slot->visible_timer = 0; + slot->slide = -6; *(s32 *)((u8 *)slot - 0x20) = 0; slot->next_mode = 0; slot = (struct HudSlot *)((u8 *)slot + 0x90); From c5e436e910400abbfe6b78f3b656fa2603f57db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:21:16 +0000 Subject: [PATCH 198/213] decomp: name the point light intensity in the boot and level light records --- include/rnc/overlay/shared/rendering/point_light.h | 2 +- include/rnc/rendering/lights/point_light.h | 2 +- src/overlays/shared/rendering/effects/explosion_light.c | 2 +- src/overlays/shared/rendering/effects/glow_quads_draw.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/rnc/overlay/shared/rendering/point_light.h b/include/rnc/overlay/shared/rendering/point_light.h index 9a36dd47bf..477b5f827c 100644 --- a/include/rnc/overlay/shared/rendering/point_light.h +++ b/include/rnc/overlay/shared/rendering/point_light.h @@ -10,7 +10,7 @@ clears it. */ typedef struct { f32 color[3]; - f32 unkC; + f32 intensity; OvlVec4 position; /* w: radius */ } PointLight; diff --git a/include/rnc/rendering/lights/point_light.h b/include/rnc/rendering/lights/point_light.h index 253b2ce37f..d1666d69b3 100644 --- a/include/rnc/rendering/lights/point_light.h +++ b/include/rnc/rendering/lights/point_light.h @@ -7,7 +7,7 @@ PointLight has the same layout. */ struct PointLight { f32 color[3]; - f32 unkC; + f32 intensity; f32 sphere[4]; /* 0x10: position, w: radius */ }; diff --git a/src/overlays/shared/rendering/effects/explosion_light.c b/src/overlays/shared/rendering/effects/explosion_light.c index 63bfbbc1b6..6a3f8aedee 100644 --- a/src/overlays/shared/rendering/effects/explosion_light.c +++ b/src/overlays/shared/rendering/effects/explosion_light.c @@ -546,7 +546,7 @@ void explosion_light_update(unsigned char *moby) { point_light->color[0] = animated_point_light_vars->color[0]; point_light->color[1] = animated_point_light_vars->color[1]; point_light->color[2] = animated_point_light_vars->color[2]; - point_light->unkC = + point_light->intensity = convert_integer_to_float(animated_point_light_vars->intensity) / 100.0f; } } else { diff --git a/src/overlays/shared/rendering/effects/glow_quads_draw.c b/src/overlays/shared/rendering/effects/glow_quads_draw.c index f0e4eff10f..b8d3d6335d 100644 --- a/src/overlays/shared/rendering/effects/glow_quads_draw.c +++ b/src/overlays/shared/rendering/effects/glow_quads_draw.c @@ -296,7 +296,7 @@ int allocate_packed_color_point_light_slot(u128 *position, float radius, float b parameter_entry->color[0] = convert_integer_to_float(col & 0xFF) * 0.0078125f; parameter_entry->color[1] = convert_integer_to_float((col >> 8) & 0xFF) * 0.0078125f; parameter_entry->color[2] = convert_integer_to_float((col >> 16) & 0xFF) * 0.0078125f; - parameter_entry->unkC = b; + parameter_entry->intensity = b; fast_mem_zero16(slot_state, 0x30); slot_state->used = 1; slot_state->buf = (char *)l00_point_light_slot_buffers[i]; @@ -337,7 +337,7 @@ int allocate_colored_effect_slot(u128 *position, parameter_entry->color[0] = color_component_x; parameter_entry->color[1] = color_component_y; parameter_entry->color[2] = color_component_z; - parameter_entry->unkC = b_0023e738; + parameter_entry->intensity = b_0023e738; fast_mem_zero16(slot_state, 0x30); slot_state->used = 1; slot_state->buf = (char *)l00_point_light_slot_buffers[i]; From f763f9aeb0ed3c2b52d90720e3445c8a141d7f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:21:16 +0000 Subject: [PATCH 199/213] decomp: name the effect part type and allocation flags --- .../shared/rendering/effects/create_part.h | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/rnc/overlay/shared/rendering/effects/create_part.h b/include/rnc/overlay/shared/rendering/effects/create_part.h index 71d7ab4379..afa4fb662c 100644 --- a/include/rnc/overlay/shared/rendering/effects/create_part.h +++ b/include/rnc/overlay/shared/rendering/effects/create_part.h @@ -7,16 +7,16 @@ /* One 0x40-byte slot of the part table. The first 0x20 bytes are the same for every part type; the rest belong to the type's update function. */ struct EffectParticle { - u8 unk0; - u8 unk1; - u8 texture; /* 0x2 */ - u8 blend; /* 0x3: 0x44 or 0x48 */ - s32 color; /* 0x4: 0xAABBGGRR */ - u8 spin; /* 0x8 */ - u8 unk9; - s16 life; /* 0xA: frames left (fast_dec_timer_s16) */ - f32 size; /* 0xC: a two-point part keeps its second colour here */ - Vec4 pos; /* 0x10 */ + u8 type; /* 0x0: part type create_part was given */ + u8 flags; /* 0x1: 0x40 marks a slot from the second allocation bitmap (free_effect_particle) */ + u8 texture; /* 0x2 */ + u8 blend; /* 0x3: 0x44 or 0x48 */ + s32 color; /* 0x4: 0xAABBGGRR */ + u8 spin; /* 0x8 */ + u8 unk9; + s16 life; /* 0xA: frames left (fast_dec_timer_s16) */ + f32 size; /* 0xC: a two-point part keeps its second colour here */ + Vec4 pos; /* 0x10 */ u8 data[0x20]; }; From 3e592cac5817eaf4938907905b85de71c81db045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:21:17 +0000 Subject: [PATCH 200/213] decomp: name the item def icon and slot anim count views, the MobyAnim rate/flags; pad unread manipulator and move bytes --- include/rnc/hero/hero.h | 4 ++-- include/rnc/overlay/shared/hero/hero_tables.h | 2 +- include/rnc/overlay/shared/hero/item_defs.h | 2 +- include/rnc/overlay/shared/mobys/ground_move_control.h | 2 +- include/rnc/overlay/shared/mobys/moby_anim.h | 4 ++-- src/overlays/l06/hero/update_hero_motion_for_current_state.c | 2 +- src/overlays/l08/hero/update_hero_motion_for_current_state.c | 2 +- src/overlays/l14/hero/update_hero_motion_by_state.c | 2 +- src/overlays/l16/hero/update_hero_motion_for_current_state.c | 2 +- src/overlays/l17/hero/update_hero_motion_for_current_state.c | 2 +- src/overlays/l18/hero/update_hero_motion_for_current_state.c | 2 +- src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index 5623b9f3de..ad18d672be 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -43,8 +43,8 @@ struct MobyTrail { struct HeroManipulator { u8 anim_joint; /* 0x00 */ u8 attached; /* 0x01 */ - u8 unk2; /* 0x02 */ - u8 absolute; /* 0x03 */ + u8 pad_2; + u8 absolute; /* 0x03 */ u8 pad_4[0x8]; f32 blend; /* 0x0C */ Vec4 quat; /* 0x10 */ diff --git a/include/rnc/overlay/shared/hero/hero_tables.h b/include/rnc/overlay/shared/hero/hero_tables.h index 3918758f38..8bc71f266b 100644 --- a/include/rnc/overlay/shared/hero/hero_tables.h +++ b/include/rnc/overlay/shared/hero/hero_tables.h @@ -43,7 +43,7 @@ typedef struct HeroAnimRow { u8 pad_0[0xC]; s32 joint; /* hero.joint_matrices index the item moby follows */ u8 pad_10[0x8]; - s32 unk18; /* tested != 0 */ + s32 slot_anim_count; /* ItemDef.slot_anim_count, tested != 0 */ u8 pad_1C[0x8]; s32 anim; /* animation id, compared with moby+0x53 */ u8 pad_28[0x24]; diff --git a/include/rnc/overlay/shared/hero/item_defs.h b/include/rnc/overlay/shared/hero/item_defs.h index edc6bd7ce2..23f6ed9d3f 100644 --- a/include/rnc/overlay/shared/hero/item_defs.h +++ b/include/rnc/overlay/shared/hero/item_defs.h @@ -24,7 +24,7 @@ typedef struct ItemDef { s32 weapon_up; /* 0x30: copied to hero.weapon_up when the item is drawn */ s16 pickup_message_multiple; /* 0x34: dialogue message when more than one ammo is picked up */ s16 pickup_message_single; /* 0x36: dialogue message when one ammo is picked up */ - u16 unk38; /* 0x38 */ + u16 icon; /* 0x38: HUD icon sprite (the item selector slots) */ s16 ammo_pickup_cls; /* 0x3A: moby class spawned as the item's ammo pickup; <= 0 none */ u8 pad_3C[0x2]; union { diff --git a/include/rnc/overlay/shared/mobys/ground_move_control.h b/include/rnc/overlay/shared/mobys/ground_move_control.h index 5db3a01a98..d9fb8adf3a 100644 --- a/include/rnc/overlay/shared/mobys/ground_move_control.h +++ b/include/rnc/overlay/shared/mobys/ground_move_control.h @@ -21,7 +21,7 @@ struct GroundMoveControl { f32 heading_tolerance; /* 0x28: moves only while the heading error is smaller */ f32 arrive_distance; /* 0x2C: result flag 4 when the target is closer */ f32 ground_probe_depth; /* 0x30: ground probe goes this far below pos.z */ - f32 unk34; + u8 pad_34[0x4]; s32 movement_option_flags; /* 0x38: 1 no gravity, 4 use move_heading, 0x20 probe flag */ f32 turn_spring; /* 0x3C: spring_turn spring strength */ f32 turn_damping; /* 0x40 */ diff --git a/include/rnc/overlay/shared/mobys/moby_anim.h b/include/rnc/overlay/shared/mobys/moby_anim.h index 0cfc3ae33d..640f884cf5 100644 --- a/include/rnc/overlay/shared/mobys/moby_anim.h +++ b/include/rnc/overlay/shared/mobys/moby_anim.h @@ -22,11 +22,11 @@ typedef struct { unsigned char seq; /* 0x52 */ unsigned char prevSeq; /* 0x53 */ char _pad54[0x5C - 0x54]; - float unk5C; /* 0x5C */ + float animRate; /* 0x5C: Moby.anim_rate */ char _pad60[0x68 - 0x60]; float *frameData; /* 0x68 */ char _pad6C[4]; - unsigned char unk70; /* 0x70 */ + unsigned char animFlags; /* 0x70: Moby.anim_flags */ } MobyAnim; #endif /* LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_MOBY_ANIM_H */ diff --git a/src/overlays/l06/hero/update_hero_motion_for_current_state.c b/src/overlays/l06/hero/update_hero_motion_for_current_state.c index 6343fbef2f..19b0a8ca96 100644 --- a/src/overlays/l06/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l06/hero/update_hero_motion_for_current_state.c @@ -2023,7 +2023,7 @@ void update_hero_motion_for_current_state(void) { spawn_color_decaying_effect_particle(&vector_or_hit_descriptor_scratch, &v10, 0); } t = hero.items[0].item_id; - has = D_L06_0017A240_t[t].unk18 != 0; + has = D_L06_0017A240_t[t].slot_anim_count != 0; if (t == 0xC) { has = 0; } diff --git a/src/overlays/l08/hero/update_hero_motion_for_current_state.c b/src/overlays/l08/hero/update_hero_motion_for_current_state.c index 0a1f2f754f..fb1f046843 100644 --- a/src/overlays/l08/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l08/hero/update_hero_motion_for_current_state.c @@ -1913,7 +1913,7 @@ void update_hero_motion_for_current_state(void) { spawn_color_decaying_effect_particle(&vector_and_attack_descriptor_scratch, &v10, 0); } t = hero.items[0].item_id; - has = D_L00_00179AC0_t[t].unk18 != 0; + has = D_L00_00179AC0_t[t].slot_anim_count != 0; if (t == 0xC) { has = 0; } diff --git a/src/overlays/l14/hero/update_hero_motion_by_state.c b/src/overlays/l14/hero/update_hero_motion_by_state.c index 3ab37afe6c..1f590a2c75 100644 --- a/src/overlays/l14/hero/update_hero_motion_by_state.c +++ b/src/overlays/l14/hero/update_hero_motion_by_state.c @@ -1632,7 +1632,7 @@ void update_hero_motion_by_state(void) { spawn_color_decaying_effect_particle(&vector_and_descriptor_scratch, &v10, 0); } t = hero.items[0].item_id; - has = D_L14_0017A1C0_t[t].unk18 != 0; + has = D_L14_0017A1C0_t[t].slot_anim_count != 0; if (t == 0xC) { has = 0; } diff --git a/src/overlays/l16/hero/update_hero_motion_for_current_state.c b/src/overlays/l16/hero/update_hero_motion_for_current_state.c index 13fb6bb6a8..33ebac3807 100644 --- a/src/overlays/l16/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l16/hero/update_hero_motion_for_current_state.c @@ -2237,7 +2237,7 @@ void update_hero_motion_for_current_state(void) { spawn_color_decaying_effect_particle(&primary_vector_scratch, &v10, 0); } t = hero.items[0].item_id; - has = D_L16_00179F20_t[t].unk18 != 0; + has = D_L16_00179F20_t[t].slot_anim_count != 0; if (t == 0xC) { has = 0; } diff --git a/src/overlays/l17/hero/update_hero_motion_for_current_state.c b/src/overlays/l17/hero/update_hero_motion_for_current_state.c index b21c8b8111..fee43103d2 100644 --- a/src/overlays/l17/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l17/hero/update_hero_motion_for_current_state.c @@ -1879,7 +1879,7 @@ void update_hero_motion_for_current_state(void) { spawn_color_decaying_effect_particle(&scratch_vector, &v10, 0); } t = hero.items[0].item_id; - has = D_L00_00179AC0_t[t].unk18 != 0; + has = D_L00_00179AC0_t[t].slot_anim_count != 0; if (t == 0xC) { has = 0; } diff --git a/src/overlays/l18/hero/update_hero_motion_for_current_state.c b/src/overlays/l18/hero/update_hero_motion_for_current_state.c index 0799a31a7b..1345d06288 100644 --- a/src/overlays/l18/hero/update_hero_motion_for_current_state.c +++ b/src/overlays/l18/hero/update_hero_motion_for_current_state.c @@ -1821,7 +1821,7 @@ void update_hero_motion_for_current_state(void) { &general_vector_or_hit_descriptor_scratch, &v10, 0); } t = hero.items[0].item_id; - has = D_L00_00179AC0_t[t].unk18 != 0; + has = D_L00_00179AC0_t[t].slot_anim_count != 0; if (t == 0xC) { has = 0; } diff --git a/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c b/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c index 657d712851..f074cdd5a4 100644 --- a/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c +++ b/src/overlays/shared/ui/hud/draw_hud_item_selector_panel.c @@ -193,7 +193,7 @@ void initialize_eight_slot_hud_selector(O00237ae8 *hud_element) { item_id_cursor = pause_iop_sprite_lists; for (i = 7; i >= 0; i--) { slot_entry->command = *item_id_cursor; - slot_entry->icon = tab[*item_id_cursor].unk38; + slot_entry->icon = tab[*item_id_cursor].icon; item_id_cursor++; slot_entry++; } From d7dea82158a5eded1208a107fb3a47c1fa0f1523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:22:27 +0000 Subject: [PATCH 201/213] decomp: name the vendor menu exit anchor, scratch buffer, reaction time/variant and language fields --- .../rnc/overlay/shared/vendor/vendor_menu.h | 51 ++++++++++--------- .../shared/vendor/draw_vendor_inset_quads.c | 6 +-- src/overlays/shared/vendor/vendor_menu.c | 6 +-- 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/include/rnc/overlay/shared/vendor/vendor_menu.h b/include/rnc/overlay/shared/vendor/vendor_menu.h index 80abc83337..12010d148e 100644 --- a/include/rnc/overlay/shared/vendor/vendor_menu.h +++ b/include/rnc/overlay/shared/vendor/vendor_menu.h @@ -42,7 +42,7 @@ typedef struct { s32 item; /* 0x00: item id */ s32 is_ammo; /* 0x04: 1 = the row sells ammo for the item */ s32 state; /* 0x08 */ - s32 unkC; + u8 pad_C[0x4]; s32 sound; /* 0x10 */ } VendorMenuRow; @@ -53,34 +53,35 @@ typedef struct { s32 capture_state; /* 0x08: 0 until draw_vendor_screen captures the frame, then 1 */ s32 capture_request; /* 0x0C: set when the menu opens; draw_vendor_screen captures and clears it */ s32 capture_buffer; /* 0x10: frame capture buffer (D_L00_00173E00[2] + 0x60000) */ - struct VendorMoby - *moby_buffer; /* 0x14: auxiliary_moby at +0, menu_mobys at +0x100, unk2C at +0x1400 */ - s32 animation_data; /* 0x18: vendor animation data, streamed from disc and decompressed */ + struct VendorMoby * + moby_buffer; /* 0x14: auxiliary_moby at +0, menu_mobys at +0x100, scratch_buffer at +0x1400 */ + s32 animation_data; /* 0x18: vendor animation data, streamed from disc and decompressed */ struct VendorMoby *vendor_moby; /* 0x1C */ struct VendorMoby *menu_mobys; /* 0x20: the menu's mobys [0..5] */ struct VendorMoby *auxiliary_moby; /* 0x24: placed at vendor_auxiliary_moby_local_offset on the vendor */ - struct VendorMoby *unk28; - s32 unk2C; - s32 unk30; - s32 unk34; - s32 timer; /* 0x38 */ - s32 unk3C; - s32 mode; /* 0x40: nonzero: rows and prices are for ammo */ - s32 unk44; - s32 purchased_item; /* 0x48 */ - s32 scroll; /* 0x4C: list scroll, in steps of 0x38 */ - s32 item_text; /* 0x50: hud animation of the item text, -1 = none */ - s32 title_text; /* 0x54 */ - s32 cursor; /* 0x58: selected row */ - s32 purchase_state; /* 0x5C */ - Vec4 eye; /* 0x60 */ - Vec4 look; /* 0x70 */ - Vec4 basis[4]; /* 0x80: the vendor's transform */ - Vec4 cutscene_offset; /* 0xC0: added to the exit cutscene positions after basis */ - VendorMenuRow rows[16]; /* 0xD0 */ - s32 row_count; /* 0x210 */ - u8 pad214[0xC]; + struct VendorMoby + *exit_anchor_moby; /* 0x28: the hero is placed beside it after the exit cutscene */ + s32 scratch_buffer; /* 0x2C: 0x400 zeroed bytes before animation_data */ + s32 auxiliary_reaction_time; /* 0x30: frame of the auxiliary moby's last selection reaction */ + u8 pad_34[0x4]; + s32 language; /* 0x38: game language - 1 (clamped to 0), added to the reaction dialogue ids */ + s32 auxiliary_reaction_variant; /* 0x3C: dialogue variant of the auxiliary moby's reaction */ + s32 mode; /* 0x40: nonzero: rows and prices are for ammo */ + s32 unk44; + s32 purchased_item; /* 0x48 */ + s32 scroll; /* 0x4C: list scroll, in steps of 0x38 */ + s32 item_text; /* 0x50: hud animation of the item text, -1 = none */ + s32 title_text; /* 0x54 */ + s32 cursor; /* 0x58: selected row */ + s32 purchase_state; /* 0x5C */ + Vec4 eye; /* 0x60 */ + Vec4 look; /* 0x70 */ + Vec4 basis[4]; /* 0x80: the vendor's transform */ + Vec4 cutscene_offset; /* 0xC0: added to the exit cutscene positions after basis */ + VendorMenuRow rows[16]; /* 0xD0 */ + s32 row_count; /* 0x210 */ + u8 pad214[0xC]; } VendorMenu; void open_vendor_menu(void *) __asm__("FUN_L00_0029a6b0"); diff --git a/src/overlays/shared/vendor/draw_vendor_inset_quads.c b/src/overlays/shared/vendor/draw_vendor_inset_quads.c index 5dbebddb17..e7d6fe8da6 100644 --- a/src/overlays/shared/vendor/draw_vendor_inset_quads.c +++ b/src/overlays/shared/vendor/draw_vendor_inset_quads.c @@ -393,9 +393,9 @@ void draw_vendor_screen(void) { update_entity(((u8 *)p->menu_mobys) + 0x500); pack_render_command_fields(((u8 *)p->menu_mobys) + 0x500, 0x202020, 0xE, 0xE, 0); initialize_vendor_selected_item_mobys(); - p->unk2C = (s32)p->moby_buffer + 0x1400; - fast_mem_zero16(p->unk2C, 0x400); - p->animation_data = p->unk2C + 0x400; + p->scratch_buffer = (s32)p->moby_buffer + 0x1400; + fast_mem_zero16(p->scratch_buffer, 0x400); + p->animation_data = p->scratch_buffer + 0x400; if (cd_read_active[0] == 0) { if (start_audio_stream_read(p->animation_data + 0x80000, disc_table.vendor_animation.sector, diff --git a/src/overlays/shared/vendor/vendor_menu.c b/src/overlays/shared/vendor/vendor_menu.c index b5895b69ba..cc025e7524 100644 --- a/src/overlays/shared/vendor/vendor_menu.c +++ b/src/overlays/shared/vendor/vendor_menu.c @@ -400,8 +400,8 @@ void open_vendor_menu(void *vendor_moby_arg) { vendor_moby->state = 3; vendor_menu.mode = VENDOR_MENU_MODE_SPAWNED_VENDOR; } - if ((vendor_menu.timer = game_language_macro - 1) < 0) { - vendor_menu.timer = 0; + if ((vendor_menu.language = game_language_macro - 1) < 0) { + vendor_menu.language = 0; } vendor_menu.unk44 = 0; vendor_menu.purchased_item = vendor_menu.title_text = vendor_menu.item_text = -1; @@ -1556,7 +1556,7 @@ void update_vendor_menu(void) { mark_moby_for_removal(cutscene_moby_to_remove); } } - if (vendor_menu.unk28 != 0) { + if (vendor_menu.exit_anchor_moby != 0) { restore_hero_after_vendor_exit_cutscene(); } else { close_vendor_menu(1); From d880a317296da1d453d650defca19265311856f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:24:39 +0000 Subject: [PATCH 202/213] decomp: name the tie and shrub class position scale and mip distance --- include/rnc/rendering/object_render_class.h | 8 +++--- include/rnc/rendering/shrub_render_class.h | 26 +++++++++---------- .../frame/initialize_level_render_state.c | 5 ++-- .../shrubs/register_shrub_render_class.c | 2 +- .../ties/register_object_render_class.c | 2 +- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/include/rnc/rendering/object_render_class.h b/include/rnc/rendering/object_render_class.h index 5b464fd4b5..992ca8753b 100644 --- a/include/rnc/rendering/object_render_class.h +++ b/include/rnc/rendering/object_render_class.h @@ -48,10 +48,10 @@ typedef struct { struct TieInstance *first_instance; /* 0x28 */ ObjectRenderRecord *records; f32 bounding_sphere[4]; /* 0x30: center xyz, radius */ - f32 unk40; /* 0x40 */ - u8 pad44[2]; - u16 class_slot; - f32 scale; + f32 position_scale; /* 0x40: vertex dequantisation scale, the instance matrix w */ + u8 pad44[2]; + u16 class_slot; + f32 mip_distance; /* 0x48: texture paging distance (x 1024 per class) */ } ObjectRenderClass; extern ObjectRenderClass *object_render_classes[128] __asm__("D_001E1700"); diff --git a/include/rnc/rendering/shrub_render_class.h b/include/rnc/rendering/shrub_render_class.h index 9c85268f56..843e463ba2 100644 --- a/include/rnc/rendering/shrub_render_class.h +++ b/include/rnc/rendering/shrub_render_class.h @@ -60,19 +60,19 @@ typedef struct { struct ShrubInstance; typedef struct { - f32 bounding_sphere[4]; /* 0x00: center xyz, radius */ - f32 scale; /* 0x10 */ - u8 pad14[2]; - u16 instance_count; /* 0x16 */ - struct ShrubInstance *first_instance; /* 0x18 */ - ShrubMipPacket *mip_packet; /* 0x1C */ - f32 unk20; /* 0x20 */ - u8 pad24[2]; - u16 class_slot; - s16 group_count; - u8 pad2A[2]; - s32 packed_geometry; - u8 pad30[0x10]; + f32 bounding_sphere[4]; /* 0x00: center xyz, radius */ + f32 mip_distance; /* 0x10: texture paging distance (x 1024 per class) */ + u8 pad14[2]; + u16 instance_count; /* 0x16 */ + struct ShrubInstance *first_instance; /* 0x18 */ + ShrubMipPacket *mip_packet; /* 0x1C */ + f32 position_scale; /* 0x20: vertex dequantisation scale, the instance matrix w */ + u8 pad24[2]; + u16 class_slot; + s16 group_count; + u8 pad2A[2]; + s32 packed_geometry; + u8 pad30[0x10]; ShrubRenderGroupReference groups[1]; } ShrubRenderClass; diff --git a/src/rendering/frame/initialize_level_render_state.c b/src/rendering/frame/initialize_level_render_state.c index 430b181442..d133d01dd0 100644 --- a/src/rendering/frame/initialize_level_render_state.c +++ b/src/rendering/frame/initialize_level_render_state.c @@ -291,7 +291,7 @@ u8 *initialize_level_render_state(LevelHeader *header) { qcopy(&tie_data->m[3], tie_record + 0x40); tie->x18 = tie_unk18; tie_record += 0x50; - tie_data->m[3].w = object_render_classes[tie->cls]->unk40; + tie_data->m[3].w = object_render_classes[tie->cls]->position_scale; transform_vector_by_basis(tie, object_render_classes[tie->cls]->bounding_sphere, tie_data); max_axis_length = fast_vec_length(&tie_data->m[0]); max_axis_length = max_float(max_axis_length, fast_vec_length(&tie_data->m[1])); @@ -375,7 +375,8 @@ u8 *initialize_level_render_state(LevelHeader *header) { qcopy(&shrub_data->m[2], shrub_record + 0x30); qcopy(&shrub_data->translation_and_position_scale, shrub_record + 0x40); shrub_record += 0x50; - shrub_data->translation_and_position_scale.w = shrub_render_classes[shrub_class]->unk20; + shrub_data->translation_and_position_scale.w = + shrub_render_classes[shrub_class]->position_scale; horizontal_scale = (fast_vec_length(&shrub_data->m[0]) + fast_vec_length(&shrub_data->m[1])) * 0.5f; vertical_scale = fast_vec_length(&shrub_data->m[2]); diff --git a/src/rendering/shrubs/register_shrub_render_class.c b/src/rendering/shrubs/register_shrub_render_class.c index 0fd6fde9ee..9b4abcdca4 100644 --- a/src/rendering/shrubs/register_shrub_render_class.c +++ b/src/rendering/shrubs/register_shrub_render_class.c @@ -35,7 +35,7 @@ void register_shrub_render_class(ShrubRenderClass *render_class, shrub_render_class_ids[registered_shrub_render_class_count] = class_id; shrub_render_classes[registered_shrub_render_class_count] = render_class; render_class->class_slot = registered_shrub_render_class_count; - fixed_threshold = truncate_float_to_s32(render_class->scale * 1024.0f); + fixed_threshold = truncate_float_to_s32(render_class->mip_distance * 1024.0f); shrub_render_class_fixed_thresholds[registered_shrub_render_class_count] = fixed_threshold; registered_shrub_render_class_count++; render_class->first_instance = 0; diff --git a/src/rendering/ties/register_object_render_class.c b/src/rendering/ties/register_object_render_class.c index f42e281838..901967e77d 100644 --- a/src/rendering/ties/register_object_render_class.c +++ b/src/rendering/ties/register_object_render_class.c @@ -52,7 +52,7 @@ void register_object_render_class(ObjectRenderClass *render_class, object_render_class_slot_by_id[class_id] = registered_object_render_class_count; object_render_classes[registered_object_render_class_count] = render_class; render_class->class_slot = registered_object_render_class_count; - fixed_threshold = truncate_float_to_s32(render_class->scale * 1024.0f); + fixed_threshold = truncate_float_to_s32(render_class->mip_distance * 1024.0f); slot = registered_object_render_class_count; registered_object_render_class_count = slot + 1; object_render_class_fixed_thresholds[slot] = fixed_threshold; From 69cd097f5e468557589312d5b6b2e0068afe32cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:24:39 +0000 Subject: [PATCH 203/213] decomp: name the vendor price pickup ammo and fix a stale pad history comment --- include/rnc/input/pad_state.h | 2 +- include/rnc/ui/vendor/vendor_capture.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rnc/input/pad_state.h b/include/rnc/input/pad_state.h index 16765856c8..537eada12f 100644 --- a/include/rnc/input/pad_state.h +++ b/include/rnc/input/pad_state.h @@ -41,7 +41,7 @@ struct PadState { u8 unk188; u8 unk189; /* 0x189: copied by metal_detector_update on spawn */ u8 pad_18A[0x4]; - s16 hist_idx; /* 0x18E: cleared with unk190 by reset_pad_history */ + s16 hist_idx; /* 0x18E: cleared with hist_count by reset_pad_history */ s32 hist_count; /* 0x190 */ s32 socket; /* 0x194: scePad2CreateSocket(¶m, &D_0013C940) result, init_pads */ s32 profile_state; /* 0x198: 0 query profile, 1 read pad, 2 profile too long */ diff --git a/include/rnc/ui/vendor/vendor_capture.h b/include/rnc/ui/vendor/vendor_capture.h index 64bbb7836f..adf29d51eb 100644 --- a/include/rnc/ui/vendor/vendor_capture.h +++ b/include/rnc/ui/vendor/vendor_capture.h @@ -10,7 +10,7 @@ struct VendorItemPricing { s32 discounted_purchase_price; u16 ammo_price; u16 discounted_ammo_price; - u16 unk0C; + u16 pickup_ammo; /* 0x0C: ammo an ammo pickup of the item gives */ u16 ammo_capacity; u16 unk10; u16 unk12; From f0c89e517328445338248de0088779e04a9b6f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:27:02 +0000 Subject: [PATCH 204/213] decomp: name the boot moby views' state, voice owner, sequence trigger count and quaternion w --- src/math/rotations/build_quaternion_from_axis_angle.c | 4 ++-- src/mobys/animation/blend_moby_animation_ex.c | 6 +++--- src/mobys/animation/update_moby_animation_state.c | 4 ++-- src/mobys/prune_moby_references.c | 4 ++-- src/mobys/update_moby_voice.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/math/rotations/build_quaternion_from_axis_angle.c b/src/math/rotations/build_quaternion_from_axis_angle.c index 2a1f3e9aaa..dcef303e1e 100644 --- a/src/math/rotations/build_quaternion_from_axis_angle.c +++ b/src/math/rotations/build_quaternion_from_axis_angle.c @@ -2,7 +2,7 @@ struct Quaternion { u8 pad_0[0xC]; - f32 unkC; + f32 w; }; extern s32 fast_vec_scale(s32, s32, f32) __asm__("func_001F9A68"); @@ -17,5 +17,5 @@ void build_quaternion_from_axis_angle(struct Quaternion *quat, s32 axis, f32 ang half_angle = angle * 0.5f; fast_vec_scale(quat, axis, fast_sin(half_angle)); - quat->unkC = fast_cos(half_angle); + quat->w = fast_cos(half_angle); } diff --git a/src/mobys/animation/blend_moby_animation_ex.c b/src/mobys/animation/blend_moby_animation_ex.c index 06e2caf642..0ec832cc7b 100644 --- a/src/mobys/animation/blend_moby_animation_ex.c +++ b/src/mobys/animation/blend_moby_animation_ex.c @@ -10,15 +10,15 @@ extern int find_or_allocate_moby_render_slot(int v) __asm__("func_0020CC18"); extern void update_moby_animation_state(void *) __asm__("func_0020C880"); extern void FUN_0020ede8(void *, int); /* Re-registers this MobyAnim in the shared slot table (D_001B2F40, via - find_or_allocate_moby_render_slot) when it hasn't settled yet (anim_time > 0.025, or unk60/manips + find_or_allocate_moby_render_slot) when it hasn't settled yet (anim_time > 0.025, or pose_layers/manips nonzero) or the caller forces it (arg4 & 4): builds a flags byte from arg4 bits 0/1 (0x100/0x200), hands it to FUN_0020ede8, snapshots this moby's unkF0 vector into the matching D_001B2C00 slot, remembers the old seq in saved_seq (unless it was already 0xFF), then marks seq 0xFF and frame = slot. Either way it then sets nextFrame/prevSeq from arg2/arg1, refreshes frame pointers (update_moby_animation_state), arms the timer (anim_speed = 1), - resets anim_time, clears unk70 bit 1, stores 1/convert_integer_to_float(arg3) into - unk5C, and copies sound out of + resets anim_time, clears anim_flags bit 1, stores 1/convert_integer_to_float(arg3) into + anim_rate, and copies sound out of pClass->seqs[arg1] into seq_sound. */ void blend_moby_animation_ex(MobyAnim *moby, int new_seq, diff --git a/src/mobys/animation/update_moby_animation_state.c b/src/mobys/animation/update_moby_animation_state.c index 9dc2c40978..36c72d9280 100644 --- a/src/mobys/animation/update_moby_animation_state.c +++ b/src/mobys/animation/update_moby_animation_state.c @@ -5,7 +5,7 @@ struct AnimSeq { u8 pad0[0x11]; u8 sound; - u8 unk12; + u8 trigger_count; u8 pad13[9]; void *frames[1]; }; @@ -17,7 +17,7 @@ void update_moby_animation_state(struct Moby *m) __asm__("FUN_0020c880"); void update_moby_animation_state(struct Moby *moby) { if (moby->seq != 0xFF) { moby->cur_frame_data = moby->pclass->seqs[moby->seq]->frames[moby->frame]; - moby->anim_trigger_count = moby->pclass->seqs[moby->seq]->unk12; + moby->anim_trigger_count = moby->pclass->seqs[moby->seq]->trigger_count; moby->seq_sound = moby->pclass->seqs[moby->seq]->sound; } else { moby->seq_sound = 0xFF; diff --git a/src/mobys/prune_moby_references.c b/src/mobys/prune_moby_references.c index 47e32d7224..e4c7d7f4be 100644 --- a/src/mobys/prune_moby_references.c +++ b/src/mobys/prune_moby_references.c @@ -3,7 +3,7 @@ struct MobyRecord { u8 pad_0[0x20]; - u8 unk20; + u8 state; u8 pad_21[0x31]; u8 primary_binding_selector; }; @@ -21,7 +21,7 @@ void prune_moby_references(void) { do { moby = *slot; remaining -= 1; - if ((moby != NULL) && ((moby->unk20 & 0x80) || (moby->primary_binding_selector != mask))) { + if ((moby != NULL) && ((moby->state & 0x80) || (moby->primary_binding_selector != mask))) { *slot = NULL; } slot += 1; diff --git a/src/mobys/update_moby_voice.c b/src/mobys/update_moby_voice.c index b2a1288644..185c2fad61 100644 --- a/src/mobys/update_moby_voice.c +++ b/src/mobys/update_moby_voice.c @@ -12,7 +12,7 @@ struct MobyVoiceEntry { u8 pad_0[0x7E]; s16 voice_entry_index; u8 pad_80[0x8]; - s32 unk88; + s32 owner; /* VoiceSlot.owner */ }; extern s32 allocate_voice_for_target_entry() __asm__("func_0022DA68"); @@ -26,7 +26,7 @@ void update_moby_voice(struct MobyVoiceFlags *moby) { if (moby->current_voice_slot_index != 0xFF) { voice_slot_index = moby->current_voice_slot_index; voice_slot = (struct MobyVoiceEntry *)(voice_slot_index * 0x70 + ((u8 *)&voice_pool)); - if (voice_slot->unk88 != (s32)moby) { + if (voice_slot->owner != (s32)moby) { moby->current_voice_slot_index = 0xFF; } else if (voice_slot->voice_entry_index != moby->seq_sound) { release_voice_slot(voice_slot_index); From e3ede7aada0088dbe9e3d691ca05c7abd52891a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:27:02 +0000 Subject: [PATCH 205/213] decomp: name the music channel fade timer and the voice state view --- include/rnc/audio/music/music_stream_state.h | 14 +++++++------- src/audio/music/music_pause.c | 6 +++--- src/audio/music/music_update_stream.c | 4 ++-- src/audio/voices/is_voice_active.c | 4 ++-- .../audio/music/music_set_active_track_value.c | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/rnc/audio/music/music_stream_state.h b/include/rnc/audio/music/music_stream_state.h index f2d1fefe34..37510a6545 100644 --- a/include/rnc/audio/music/music_stream_state.h +++ b/include/rnc/audio/music/music_stream_state.h @@ -16,13 +16,13 @@ /* One music channel record (0x1C bytes). */ struct MusicStreamChannel { - s32 handle; /* 0x00: stream handle from the start callback; -1 while starting */ - s16 track; /* 0x04 */ - s16 volume; /* 0x06 */ - s16 flags; /* 0x08 */ - s16 state; /* 0x0A: set 1 on start, 1 -> 2 in the start callback */ - s16 fade_flags; /* 0x0C: -0x8000 on music_pause, 4 on music_unpause */ - s16 unkE; /* 0x0E: cleared by music_pause */ + s32 handle; /* 0x00: stream handle from the start callback; -1 while starting */ + s16 track; /* 0x04 */ + s16 volume; /* 0x06 */ + s16 flags; /* 0x08 */ + s16 state; /* 0x0A: set 1 on start, 1 -> 2 in the start callback */ + s16 fade_flags; /* 0x0C: -0x8000 on music_pause, 4 on music_unpause */ + s16 fade_timer; /* 0x0E: counted down by music_update_stream while fading; cleared by music_pause */ s16 crossfade_enabled; /* 0x10: remaining-time callback starts the crossfade */ u8 pad_12[0x2]; s32 poll_interval; /* 0x14 */ diff --git a/src/audio/music/music_pause.c b/src/audio/music/music_pause.c index ac18b2231e..9805bd2edd 100644 --- a/src/audio/music/music_pause.c +++ b/src/audio/music/music_pause.c @@ -4,12 +4,12 @@ void music_pause(s32 pause_secondary) { if (pause_secondary != 0) { music_stream_state.secondary.fade_flags = -0x8000; - music_stream_state.secondary.unkE = 0; + music_stream_state.secondary.fade_timer = 0; } music_stream_state.primary.fade_flags = -0x8000; - music_stream_state.primary.unkE = 0; + music_stream_state.primary.fade_timer = 0; music_stream_state.transition.fade_flags = -0x8000; - music_stream_state.transition.unkE = 0; + music_stream_state.transition.fade_timer = 0; } /* ACCEPTED: attempt-1 (sn-O2) direct 100/100/100; s16 fields at 0x40/0x42/0x5C/0x5E/0x78/0x7A, retail store order. */ diff --git a/src/audio/music/music_update_stream.c b/src/audio/music/music_update_stream.c index 36794746b4..2a5b30a2fe 100644 --- a/src/audio/music/music_update_stream.c +++ b/src/audio/music/music_update_stream.c @@ -8,8 +8,8 @@ extern void snd_continue_vag_stream(void *) __asm__("func_0012ECA0"); typedef struct { unsigned int handle; /* 0x00: 0 none, 0xFFFFFFFF starting/released */ short id; /* 0x04 */ - short unk06; - short unk08; + short volume; + short flags; short state; /* 0x0A: low bits the state, 0x8000 paused */ short fade; /* 0x0C: 0x8000 fading */ short fadeT; /* 0x0E */ diff --git a/src/audio/voices/is_voice_active.c b/src/audio/voices/is_voice_active.c index 86fc88d890..fa82db8bf6 100644 --- a/src/audio/voices/is_voice_active.c +++ b/src/audio/voices/is_voice_active.c @@ -4,7 +4,7 @@ struct VoiceState { u8 pad_0[0x74]; - u8 unk74; + u8 state; /* VoiceSlot.state: 1 and 2 are playing */ u8 pad_75[0x9]; s16 resolved_sound_id; }; @@ -17,7 +17,7 @@ s32 is_voice_active(s32 voice_index, s32 sound_id) { if (voice_index >= 0) { voice = (struct VoiceState *)(voice_index * 0x70 + ((u8 *)&voice_pool)); if (voice->resolved_sound_id == sound_id + D_0015F5B4) { - if ((u32)(voice->unk74 - 1) < 2) { + if ((u32)(voice->state - 1) < 2) { return 1; } } diff --git a/src/overlays/shared/audio/music/music_set_active_track_value.c b/src/overlays/shared/audio/music/music_set_active_track_value.c index 8fc4882a0a..d495c23b18 100644 --- a/src/overlays/shared/audio/music/music_set_active_track_value.c +++ b/src/overlays/shared/audio/music/music_set_active_track_value.c @@ -5,15 +5,15 @@ /* Ported from rac1-decomp (src/overlays/shared/music_002664B0.c: func_L00_002666C8), where it is exact; names translated to the US level program. */ -/* Stores v in unkE of the three music channels whose fade flag 0x8000 is set. */ +/* Stores v in fade_timer of the three music channels whose fade flag 0x8000 is set. */ void music_set_active_track_value(int v) __asm__("FUN_L00_00265880"); void music_set_active_track_value(int entry_value) { struct MusicStreamState *music = &music_stream_state; if (music->primary.fade_flags & 0x8000) - music->primary.unkE = entry_value; + music->primary.fade_timer = entry_value; if (music->transition.fade_flags & 0x8000) - music->transition.unkE = entry_value; + music->transition.fade_timer = entry_value; if (music->secondary.fade_flags & 0x8000) - music->secondary.unkE = entry_value; + music->secondary.fade_timer = entry_value; } From cbb7a732e0822a8ce15ce02d0a360eed8fe6de56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:27:02 +0000 Subject: [PATCH 206/213] decomp: name the effect texture tex0 view and the moby scale of the vertex batch transform --- .../effects/render_level_effects_and_screen_sprites.c | 2 +- src/rendering/packets/transform_scaled_vertex_batch.c | 2 +- src/rendering/texture/setup_gif_paging.c | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/rendering/effects/render_level_effects_and_screen_sprites.c b/src/rendering/effects/render_level_effects_and_screen_sprites.c index a1f3cd1ed4..0f89ba8bbd 100644 --- a/src/rendering/effects/render_level_effects_and_screen_sprites.c +++ b/src/rendering/effects/render_level_effects_and_screen_sprites.c @@ -30,7 +30,7 @@ contents into a power-of-two texture page and blits it back, and finally draws the flashing panel overlays. - Slot 6 is skipped in every loop while menu_system.unkD8 is clear. */ + Slot 6 is skipped in every loop while menu_system.goodies_tab_shown is clear. */ typedef struct { u8 pad0[0x50]; diff --git a/src/rendering/packets/transform_scaled_vertex_batch.c b/src/rendering/packets/transform_scaled_vertex_batch.c index 157a5bdb20..d2a49d6fa6 100644 --- a/src/rendering/packets/transform_scaled_vertex_batch.c +++ b/src/rendering/packets/transform_scaled_vertex_batch.c @@ -2,7 +2,7 @@ struct VertexBatch { u8 pad_0[0x2C]; - s32 unk2C; + f32 scale; /* 0x2C: Moby.scale */ }; extern void fast_vec_add(void *arg0, void *arg1, void *arg2) __asm__("func_001F9A10"); diff --git a/src/rendering/texture/setup_gif_paging.c b/src/rendering/texture/setup_gif_paging.c index e8084123d7..68ed5b978b 100644 --- a/src/rendering/texture/setup_gif_paging.c +++ b/src/rendering/texture/setup_gif_paging.c @@ -8,9 +8,11 @@ extern int *gif_page_marker __asm__("D_0015F450") MACRO_ADDR; +/* An effect texture definition (EffectTextureDefinition in get_effect_texture); + a cleared tex0 makes get_effect_texture upload it again. */ typedef struct { - long unk0; - long unk8; + long tex0; + u8 pad_8[0x8]; } PageSlot; extern char D_0019A3E8[]; @@ -49,7 +51,7 @@ void setup_gif_paging(int skip_paging_entry_reset) { int k; for (k = 0; k < effect_tex_cnt; k++) { - effect_texture_definitions[k].unk0 = 0; + effect_texture_definitions[k].tex0 = 0; } } if (skip_paging_entry_reset == 0) { From 77098f763a909a99cb6c8e758604577f82b14a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:27:02 +0000 Subject: [PATCH 207/213] decomp: name the memory slot 6 free start, pad the cutscene state word and name the card sync result --- src/game/initialize_level_runtime.c | 4 ++-- src/input/clear_pad_input.c | 5 +++-- src/save/check_memory_card.c | 13 +++++++------ src/world/update_world_object_animation.c | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/game/initialize_level_runtime.c b/src/game/initialize_level_runtime.c index 87386954f4..6c6f1fec16 100644 --- a/src/game/initialize_level_runtime.c +++ b/src/game/initialize_level_runtime.c @@ -75,7 +75,7 @@ typedef struct { s32 ring_end; /* 0x08: memory slot 2 */ u8 padC[8]; u8 *buffer; - s32 unk18; + s32 free_start; /* 0x18: memory slot 6: first free byte past the loaded level archive */ } MemInfo; typedef struct { @@ -253,7 +253,7 @@ void initialize_level_runtime(void) { texture_cursor = gs_texture_allocation_cursor + 0x2000; allocation_cursor = D_001940C0.buffer + archive_size; gs_texture_allocation_cursor = texture_cursor; - D_001940C0.unk18 = (s32)allocation_cursor; + D_001940C0.free_start = (s32)allocation_cursor; gs_texture_allocation_start = texture_cursor; D_00160588 = texture_packet[0]; clear_blocks_16(point_lights, 0x100); diff --git a/src/input/clear_pad_input.c b/src/input/clear_pad_input.c index 68afa8853d..9621d6f767 100644 --- a/src/input/clear_pad_input.c +++ b/src/input/clear_pad_input.c @@ -1,8 +1,9 @@ #include "types.h" #include "rnc/input/pad_state.h" +/* One PadState.analog_prev entry, cleared as a word. */ struct WordCell { - s32 unk0; + s32 bits; }; void clear_pad_input(struct PadState *pad_state) __asm__("FUN_002172c0"); @@ -28,7 +29,7 @@ void clear_pad_input(struct PadState *pad_state) { do { *(s32 *)((u8 *)slot - 0x40) = 0; remaining -= 1; - slot->unk0 = 0; + slot->bits = 0; slot += 1; } while (remaining >= 0); } diff --git a/src/save/check_memory_card.c b/src/save/check_memory_card.c index 43df863555..f6bb1e511f 100644 --- a/src/save/check_memory_card.c +++ b/src/save/check_memory_card.c @@ -2,11 +2,12 @@ #include "rnc/sdk/graph.h" #include "rnc/sdk/storage/memory_card.h" +/* memory_card_state viewed from the sceMcSync outputs at +0xB8. */ struct McDirBlk { u8 pad_0[0x4]; - s32 unk4; + s32 slot; /* 0x04: memory_card_state.card[0].slot */ u8 pad_8[0xB4]; - s32 unkBC; + s32 sync_result; /* 0xBC: sceMcSync result of the sceMcGetInfo call */ }; #include "rnc/save/memory_card_state.h" @@ -34,13 +35,13 @@ s32 check_memory_card(void) { sceGsSyncV(0); } card_state = (struct McDirBlk *)((u8 *)memory_card_info_sync_outputs - 0xB8); - if (card_state->unkBC == -5) { + if (card_state->sync_result == -5) { return 1; } - if (card_state->unkBC < -9) { + if (card_state->sync_result < -9) { return 1; } - if (card_state->unkBC == -2) { + if (card_state->sync_result == -2) { return 0; } if (card_type != MEMCARD_TYPE_SUPPORTED_FOR_STARTUP) { @@ -50,7 +51,7 @@ s32 check_memory_card(void) { return 0; } card_command_result = sceMcGetDir( - memory_card_state.card[0].port, card_state->unk4, save_directory_path, 0, -1, 0); + memory_card_state.card[0].port, card_state->slot, save_directory_path, 0, -1, 0); while (sceMcSync(1, &cmd_code, &card_command_result) == 0) { sceGsSyncV(0); } diff --git a/src/world/update_world_object_animation.c b/src/world/update_world_object_animation.c index 663b82ec9a..ff04364e9d 100644 --- a/src/world/update_world_object_animation.c +++ b/src/world/update_world_object_animation.c @@ -66,8 +66,8 @@ struct TransferState { unsigned char pad46[2]; unsigned short unk48; /* 0x48 */ unsigned char pad4A[2]; - int subs; /* 0x4C: subtitle table (draw_subtitles) */ - int unk50; /* 0x50 */ + int subs; /* 0x4C: subtitle table (draw_subtitles) */ + unsigned char pad50[4]; int frames; /* 0x54: camera keys */ struct ModelRec *rec; /* 0x58 */ int source_end; /* 0x5C: compressed chunk */ From 3ade14d1797f4d48ab2d085de2eae915efe253e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:27:41 +0000 Subject: [PATCH 208/213] decomp: name the movie CD stream sector and the MPEG error callback message --- src/movies/decoder/callbacks/mpeg_error.c | 6 +++--- src/movies/decoder/read_cd_stream_sectors.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/movies/decoder/callbacks/mpeg_error.c b/src/movies/decoder/callbacks/mpeg_error.c index 729834b257..2afa13daad 100644 --- a/src/movies/decoder/callbacks/mpeg_error.c +++ b/src/movies/decoder/callbacks/mpeg_error.c @@ -2,15 +2,15 @@ #include "rnc/sdk/debug.h" struct MpegErrorData { - u8 pad_0[0x4]; - s32 unk4; + u8 pad_0[0x4]; + char *errMessage; /* sceMpegCbDataError.errMessage */ }; extern const char video_error_message[] __asm__("D_00161220"); s32 mpeg_error(s32 unused_mpeg, struct MpegErrorData *cb_data) __asm__("FUN_0023d080"); s32 mpeg_error(s32 unused_mpeg, struct MpegErrorData *cb_data) { - DebugPrint(video_error_message, cb_data->unk4); + DebugPrint(video_error_message, cb_data->errMessage); return 1; } diff --git a/src/movies/decoder/read_cd_stream_sectors.c b/src/movies/decoder/read_cd_stream_sectors.c index 1c62b5d797..377b6fcf5e 100644 --- a/src/movies/decoder/read_cd_stream_sectors.c +++ b/src/movies/decoder/read_cd_stream_sectors.c @@ -3,7 +3,7 @@ struct CdStream { u8 pad_0[0x4]; - s32 unk4; + s32 sector; /* next sector to read; advanced after a synchronous read */ }; s32 read_cd_stream_sectors(struct CdStream *stream, @@ -25,9 +25,9 @@ s32 read_cd_stream_sectors(struct CdStream *stream, readcmd[0] = 0x64; readcmd[1] = 0; readcmd[2] = 0; - sceCdRead(stream->unk4, blocks, sector_read_destination, readcmd); + sceCdRead(stream->sector, blocks, sector_read_destination, readcmd); if (is_async == 0) { - stream->unk4 += blocks; + stream->sector += blocks; sceCdSync(0); returned_byte_count = size; } From d59f13d7e915235cbad401f535e67a141dcf135f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:31:59 +0000 Subject: [PATCH 209/213] decomp: name the hero fire ring/spark timers, swim level velocity, flips, race moby, shadow pitch and glow count --- include/rnc/hero/hero.h | 98 +++++++++---------- src/check/hero_layout_check.c | 14 +-- src/game/update_mode_freeze.c | 2 +- src/overlays/l01/hero/hero_set_state.c | 4 +- src/overlays/l02/hero/hero_set_state.c | 2 +- src/overlays/l03/hero/hero_set_state.c | 4 +- src/overlays/l05/hero/hero_set_state.c | 12 +-- src/overlays/l06/hero/hero_set_state.c | 6 +- src/overlays/l08/hero/hero_set_state.c | 4 +- src/overlays/l11/hero/hero_set_state.c | 4 +- src/overlays/l12/hero/hero_set_state.c | 4 +- src/overlays/l14/hero/hero_set_state.c | 2 +- src/overlays/l15/hero/hero_set_state.c | 2 +- src/overlays/l16/hero/hero_set_state.c | 8 +- src/overlays/l17/hero/hero_set_state.c | 8 +- src/overlays/l18/hero/hero_set_state.c | 2 +- src/overlays/shared/hero/hero_frame_update.c | 2 +- src/overlays/shared/hero/hero_idle_sequence.c | 4 +- src/overlays/shared/hero/hero_set_state.c | 8 +- src/overlays/shared/hero/initialize_hero.c | 4 +- .../hero/process_hero_primary_item_input.c | 4 +- .../shared/hero/update_hero_frame_pipeline.c | 2 +- .../shared/ui/hud/draw_trick_combo_hud.c | 2 +- 23 files changed, 101 insertions(+), 101 deletions(-) diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index ad18d672be..3b6aec800b 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -362,8 +362,8 @@ struct Hero { f32 jump_anim_retime_scale; /* 0x494 */ s16 jump_ramp_frames; /* 0x498 */ s16 jump_max_frames; /* 0x49A */ - s16 unk49C; /* 0x49C */ - s16 unk49E; /* 0x49E */ + s16 fire_ring_timer; /* 0x49C: frames to the next fire-ring puff while rising */ + s16 side_spark_timer; /* 0x49E: frames to the next side spark while rising */ f32 jump_gravity; /* 0x4A0 */ s16 jump_blocked_ahead; /* 0x4A4 */ s16 pack_glide_delay; /* 0x4A6 */ @@ -453,16 +453,16 @@ struct Hero { f32 basis_pitch; /* 0x684 */ f32 held_pose_yaw; /* 0x688 */ u8 pad_68C[0x4]; - f32 swim_bob_offset; /* 0x690 */ - f32 swim_bob_velocity; /* 0x694 */ - s32 swim_stroke_timer; /* 0x698 */ - f32 swim_water_level; /* 0x69C */ - s32 unk6A0; /* 0x6A0 */ - struct Moby *sink_effect_moby; /* 0x6A4 */ - f32 bob_phase; /* 0x6A8 */ - f32 bob_offset; /* 0x6AC */ - f32 sway_phase; /* 0x6B0 */ - f32 sway_axis_phase; /* 0x6B4 */ + f32 swim_bob_offset; /* 0x690 */ + f32 swim_bob_velocity; /* 0x694 */ + s32 swim_stroke_timer; /* 0x698 */ + f32 swim_water_level; /* 0x69C */ + s32 swim_water_level_velocity; /* 0x6A0: spring velocity of swim_water_level */ + struct Moby *sink_effect_moby; /* 0x6A4 */ + f32 bob_phase; /* 0x6A8 */ + f32 bob_offset; /* 0x6AC */ + f32 sway_phase; /* 0x6B0 */ + f32 sway_axis_phase; /* 0x6B4 */ u8 pad_6B8[0x8]; Vec4 smoothed_spin_stick; /* 0x6C0: 0x60 bytes cleared by fill_transfer_words */ f32 pivot_rot_x; /* 0x6D0 */ @@ -471,8 +471,8 @@ struct Hero { s32 tricks_landed[6]; /* 0x6E0: one flag per pose, indexed by air_pose_index */ s32 tricks_landed_count; /* 0x6F8: counts the flags set in tricks_landed */ u8 pad_6FC[0x4]; - s32 unk700 - [3]; /* 0x700: cleared with tricks_landed when the HUD combo ends (FUN_L05_00262b58) */ + s32 flips_per_axis + [3]; /* 0x700: flips of the jump per axis; cleared with tricks_landed when the HUD combo ends (FUN_L05_00262b58) */ s32 trick_combo_count; /* 0x70C: combo count the HUD keeps the best of (FUN_L05_00262b58) */ u8 pad_710[0x10]; Vec4 smoothed_steer_stick; /* 0x720 */ @@ -509,7 +509,7 @@ struct Hero { u8 trick_input; /* 0x88D */ u8 vert_ramp_launch; /* 0x88E */ u8 air_pose_index; /* 0x88F */ - u8 *unk890; /* 0x890 */ + u8 *race_moby; /* 0x890: the race moby (freeze-menu restart sets its +0xBC to 3) */ s32 race_time_frames; /* 0x894: frame counter shown as m:ss.hh on the HUD (FUN_L05_00266710) */ s16 race_path_node; /* 0x898 */ s16 race_lap; /* 0x89A: shown + 1 (capped at 3) on the HUD (FUN_L05_00266320) */ @@ -646,7 +646,7 @@ struct Hero { u8 *face_anim_layer; /* 0xD10 */ s32 arm_layer_fade; /* 0xD14 */ u8 pad_D18[0x8]; - f32 unkD20; /* 0xD20 */ + f32 shadow_pitch; /* 0xD20: pitch of the hero shadow direction, eased toward 0.97 */ u8 pad_D24[0xC]; struct HeroManipulator manipulators[7]; /* 0xD30: attached by FUN_L00_002056a8 while rand_timer runs */ @@ -658,37 +658,37 @@ struct Hero { u8 pad_100C[0x4]; s32 head_look_timer; /* 0x1010 */ f32 idle_look_ease_rate; /* 0x1014 */ - f32 unk1018; /* 0x1018 */ - u8 pad_101C[0x8]; - s32 unk1024; /* 0x1024: cleared by FUN_L00_0020a500 */ - s32 unk1028; /* 0x1028: cleared by FUN_L00_0020a500 */ - u8 pad_102C[0x8]; - s32 unk1034; /* 0x1034: cleared by FUN_L00_0020a500 */ - s32 unk1038; /* 0x1038: cleared by FUN_L00_0020a500 */ - u8 pad_103C[0x8]; - s32 unk1044; /* 0x1044: cleared by FUN_L00_0020a500 */ - s32 unk1048; /* 0x1048: cleared by FUN_L00_0020a500 */ - u8 pad_104C[0x8]; - s32 unk1054; /* 0x1054: cleared by FUN_L00_0020a500 */ - s32 unk1058; /* 0x1058: cleared by FUN_L00_0020a500 */ - u8 pad_105C[0x34]; - struct HeroItemSlot items[7]; /* 0x1090: item slots; slot 0 is the equipped gadget */ - u8 pad_12C0[0x20]; - s16 ground_type; /* 0x12E0 */ - u8 on_ice_ground; /* 0x12E2 */ - u8 selector_4; /* 0x12E3 */ - u8 base_condition; /* 0x12E4 */ - u8 selector_1; /* 0x12E5 */ - u8 selector_3; /* 0x12E6 */ - u8 on_magnet_ground; /* 0x12E7 */ - u8 selector_5; /* 0x12E8 */ - u8 selector_6; /* 0x12E9: set on ground material 6 */ - u8 on_slip_ground; /* 0x12EA */ - u8 selector_11; /* 0x12EB */ - u8 selector_13; /* 0x12EC */ - u8 ground_sound_class; /* 0x12ED */ - u8 grind_jump_block; /* 0x12EE */ - u8 pad_12EF[0x301]; + f32 idle_look_damping; /* 0x1018: head look spring damping (idle_look_ease_rate is its k) */ + u8 pad_101C[0x8]; + s32 unk1024; /* 0x1024: cleared by FUN_L00_0020a500 */ + s32 unk1028; /* 0x1028: cleared by FUN_L00_0020a500 */ + u8 pad_102C[0x8]; + s32 unk1034; /* 0x1034: cleared by FUN_L00_0020a500 */ + s32 unk1038; /* 0x1038: cleared by FUN_L00_0020a500 */ + u8 pad_103C[0x8]; + s32 unk1044; /* 0x1044: cleared by FUN_L00_0020a500 */ + s32 unk1048; /* 0x1048: cleared by FUN_L00_0020a500 */ + u8 pad_104C[0x8]; + s32 unk1054; /* 0x1054: cleared by FUN_L00_0020a500 */ + s32 unk1058; /* 0x1058: cleared by FUN_L00_0020a500 */ + u8 pad_105C[0x34]; + struct HeroItemSlot items[7]; /* 0x1090: item slots; slot 0 is the equipped gadget */ + u8 pad_12C0[0x20]; + s16 ground_type; /* 0x12E0 */ + u8 on_ice_ground; /* 0x12E2 */ + u8 selector_4; /* 0x12E3 */ + u8 base_condition; /* 0x12E4 */ + u8 selector_1; /* 0x12E5 */ + u8 selector_3; /* 0x12E6 */ + u8 on_magnet_ground; /* 0x12E7 */ + u8 selector_5; /* 0x12E8 */ + u8 selector_6; /* 0x12E9: set on ground material 6 */ + u8 on_slip_ground; /* 0x12EA */ + u8 selector_11; /* 0x12EB */ + u8 selector_13; /* 0x12EC */ + u8 ground_sound_class; /* 0x12ED */ + u8 grind_jump_block; /* 0x12EE */ + u8 pad_12EF[0x301]; struct Moby *ship_moby; /* 0x15F0: the ship the hero is flying (l17 fighter_jet_update) */ s16 ship_oclass; /* 0x15F4: its oclass, -1 when none */ u8 ship_ammo; /* 0x15F6: shots left in the space levels; firing needs one and takes it (FUN_L11_003126f8) */ @@ -732,8 +732,8 @@ struct Hero { u8 pad_1D28[0x68]; struct HeroEase item5_manipulator; /* 0x1D90: manipulator record handed to attach_manipulator (FUN_L00_00234808) */ - u8 pad_1E40[0x70]; - s16 unk1EB0; /* 0x1EB0 */ + u8 pad_1E40[0x70]; + s16 glow_point_count; /* 0x1EB0: glow sprite points queued this frame, cleared each hero update */ s16 glow_draw_queued; /* 0x1EB2: draw_hero_glow_quads queued this frame */ u8 pad_1EB4[0x1C]; /* 0x1EC0..0x1F10: a struct GroundMoveControl (ground_move_control.h) that doom diff --git a/src/check/hero_layout_check.c b/src/check/hero_layout_check.c index bf5bfe4757..543646e429 100644 --- a/src/check/hero_layout_check.c +++ b/src/check/hero_layout_check.c @@ -207,8 +207,8 @@ HERO_OFFSET_CHECK(fall_start_distance, 0x490); HERO_OFFSET_CHECK(jump_anim_retime_scale, 0x494); HERO_OFFSET_CHECK(jump_ramp_frames, 0x498); HERO_OFFSET_CHECK(jump_max_frames, 0x49A); -HERO_OFFSET_CHECK(unk49C, 0x49C); -HERO_OFFSET_CHECK(unk49E, 0x49E); +HERO_OFFSET_CHECK(fire_ring_timer, 0x49C); +HERO_OFFSET_CHECK(side_spark_timer, 0x49E); HERO_OFFSET_CHECK(jump_gravity, 0x4A0); HERO_OFFSET_CHECK(jump_blocked_ahead, 0x4A4); HERO_OFFSET_CHECK(pack_glide_delay, 0x4A6); @@ -276,7 +276,7 @@ HERO_OFFSET_CHECK(swim_bob_offset, 0x690); HERO_OFFSET_CHECK(swim_bob_velocity, 0x694); HERO_OFFSET_CHECK(swim_stroke_timer, 0x698); HERO_OFFSET_CHECK(swim_water_level, 0x69C); -HERO_OFFSET_CHECK(unk6A0, 0x6A0); +HERO_OFFSET_CHECK(swim_water_level_velocity, 0x6A0); HERO_OFFSET_CHECK(sink_effect_moby, 0x6A4); HERO_OFFSET_CHECK(bob_phase, 0x6A8); HERO_OFFSET_CHECK(bob_offset, 0x6AC); @@ -386,14 +386,14 @@ HERO_OFFSET_CHECK(held_item_anim_blend, 0xD08); HERO_OFFSET_CHECK(held_item_anim_blend[1], 0xD0C); HERO_OFFSET_CHECK(face_anim_layer, 0xD10); HERO_OFFSET_CHECK(arm_layer_fade, 0xD14); -HERO_OFFSET_CHECK(unkD20, 0xD20); +HERO_OFFSET_CHECK(shadow_pitch, 0xD20); HERO_OFFSET_CHECK(manipulators, 0xD30); HERO_OFFSET_CHECK(rand_timer.fired, 0xFF0); HERO_OFFSET_CHECK(rand_timer.deadline, 0xFF4); HERO_OFFSET_CHECK(rand_timer.range, 0xFF8); HERO_OFFSET_CHECK(head_look_timer, 0x1010); HERO_OFFSET_CHECK(idle_look_ease_rate, 0x1014); -HERO_OFFSET_CHECK(unk1018, 0x1018); +HERO_OFFSET_CHECK(idle_look_damping, 0x1018); HERO_OFFSET_CHECK(head_look_pitch, 0x1004); HERO_OFFSET_CHECK(head_look_yaw, 0x1008); HERO_OFFSET_CHECK(items, 0x1090); @@ -426,7 +426,7 @@ HERO_OFFSET_CHECK(pos_history[31], 0x1CF0); HERO_OFFSET_CHECK(stick_x, 0x1D20); HERO_OFFSET_CHECK(stick_y, 0x1D24); HERO_OFFSET_CHECK(item5_manipulator, 0x1D90); -HERO_OFFSET_CHECK(unk1EB0, 0x1EB0); +HERO_OFFSET_CHECK(glow_point_count, 0x1EB0); HERO_OFFSET_CHECK(glow_draw_queued, 0x1EB2); HERO_OFFSET_CHECK(move_speed, 0x1ED0); HERO_OFFSET_CHECK(move_turn_velocity, 0x1ED4); @@ -568,7 +568,7 @@ HERO_OFFSET_CHECK(board_boost_voice, 0x2234); HERO_OFFSET_CHECK(sway_phase, 0x6B0); HERO_OFFSET_CHECK(sway_axis_phase, 0x6B4); HERO_OFFSET_CHECK(trick_hud_handle, 0x880); -HERO_OFFSET_CHECK(unk890, 0x890); +HERO_OFFSET_CHECK(race_moby, 0x890); HERO_OFFSET_CHECK(wrench_trail, 0x17B0); HERO_OFFSET_CHECK(saved_pos_rot, 0x1D00); HERO_OFFSET_CHECK(grapple_target_swings, 0x978); diff --git a/src/game/update_mode_freeze.c b/src/game/update_mode_freeze.c index 60377050f1..4b7c348e29 100644 --- a/src/game/update_mode_freeze.c +++ b/src/game/update_mode_freeze.c @@ -218,7 +218,7 @@ void update_mode_freeze(void) { game_mode = GAME_MODE_CONTINUE; if (hero.race_lap >= 3) { hero.race_lap = (s16)(((u16)hero.race_lap) - 1); - hero.unk890[0xBC] = 3; + hero.race_moby[0xBC] = 3; } } } diff --git a/src/overlays/l01/hero/hero_set_state.c b/src/overlays/l01/hero/hero_set_state.c index c1b3c787f4..b21a853393 100644 --- a/src/overlays/l01/hero/hero_set_state.c +++ b/src/overlays/l01/hero/hero_set_state.c @@ -224,7 +224,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { if (p->swim_bob_velocity < frame_time * -7.0f) p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (animation_setup_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); @@ -346,7 +346,7 @@ int l01_hero_set_state(int requested_state, int animation_setup_mode) { if (s->swim_bob_velocity < frame_time * -7.0f) s->swim_bob_velocity = frame_time * -7.0f; s->swim_water_level = s->water_surface_z; - s->unk6A0 = 0; + s->swim_water_level_velocity = 0; s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; diff --git a/src/overlays/l02/hero/hero_set_state.c b/src/overlays/l02/hero/hero_set_state.c index 548fc6993a..06416874b1 100644 --- a/src/overlays/l02/hero/hero_set_state.c +++ b/src/overlays/l02/hero/hero_set_state.c @@ -224,7 +224,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if (p->swim_bob_velocity < frame_time * -7.0f) p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (entry_animation_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); diff --git a/src/overlays/l03/hero/hero_set_state.c b/src/overlays/l03/hero/hero_set_state.c index b223b91e2c..a77d8b1585 100644 --- a/src/overlays/l03/hero/hero_set_state.c +++ b/src/overlays/l03/hero/hero_set_state.c @@ -224,7 +224,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if (p->swim_bob_velocity < frame_time * -7.0f) p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (entry_animation_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); @@ -353,7 +353,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if (s->swim_bob_velocity < frame_time * -7.0f) s->swim_bob_velocity = frame_time * -7.0f; s->swim_water_level = s->water_surface_z; - s->unk6A0 = 0; + s->swim_water_level_velocity = 0; s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; diff --git a/src/overlays/l05/hero/hero_set_state.c b/src/overlays/l05/hero/hero_set_state.c index 254efc58ce..8845c44cc8 100644 --- a/src/overlays/l05/hero/hero_set_state.c +++ b/src/overlays/l05/hero/hero_set_state.c @@ -238,7 +238,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { if (p->swim_bob_velocity < frame_time * -7.0f) p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (animation_request_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); @@ -367,7 +367,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { if (s->swim_bob_velocity < frame_time * -7.0f) s->swim_bob_velocity = frame_time * -7.0f; s->swim_water_level = s->water_surface_z; - s->unk6A0 = 0; + s->swim_water_level_velocity = 0; s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; @@ -515,7 +515,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { m = (char *)q->hoverboard_moby; fill_transfer_words(&q->smoothed_spin_stick, 0, 0x210); q->hoverboard_moby = (u8 *)m; - q->unk890 = (u8 *)l05_moby_array + (*(int *)(*(char **)(m + 0x78) + 0x28) << 8); + q->race_moby = (u8 *)l05_moby_array + (*(int *)(*(char **)(m + 0x78) + 0x28) << 8); q->board_gravity = frame_time_sq * 22.0f; q->board_spring_angle = 1.2217305f; q->trick_hud_handle = -1; @@ -602,7 +602,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { if (p->swim_bob_velocity < frame_time * -5.7f) p->swim_bob_velocity = frame_time * -5.7f; p->swim_water_level = p->board_floor_z; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level - -0.12f; if (0.2f < p->swim_bob_offset) { p->swim_bob_offset = 0.2f; @@ -1271,8 +1271,8 @@ int hero_set_state(int requested_state, int animation_request_mode) { struct Hero *w = &hero; w->fall_delay_frames = scale_game_frames(0x96); w->jump_gravity = frame_time_sq * 15.0f; - w->unk49C = scale_game_frames(5); - w->unk49E = scale_game_frames(4); + w->fire_ring_timer = scale_game_frames(5); + w->side_spark_timer = scale_game_frames(4); } } else if (u->state.current == 0x69) { float v; diff --git a/src/overlays/l06/hero/hero_set_state.c b/src/overlays/l06/hero/hero_set_state.c index fac51d3618..57182441d6 100644 --- a/src/overlays/l06/hero/hero_set_state.c +++ b/src/overlays/l06/hero/hero_set_state.c @@ -226,7 +226,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if (p->swim_bob_velocity < frame_time * -7.0f) p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (entry_animation_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); @@ -856,8 +856,8 @@ int hero_set_state(int requested_state, int entry_animation_mode) { struct Hero *w = &hero; w->fall_delay_frames = scale_game_frames(0x96); w->jump_gravity = frame_time_sq * 15.0f; - w->unk49C = scale_game_frames(5); - w->unk49E = scale_game_frames(4); + w->fire_ring_timer = scale_game_frames(5); + w->side_spark_timer = scale_game_frames(4); } } else if (u->state.current == 0x29) { u->jump_height = 2.4f; diff --git a/src/overlays/l08/hero/hero_set_state.c b/src/overlays/l08/hero/hero_set_state.c index a5a7761bea..c8bae57bb2 100644 --- a/src/overlays/l08/hero/hero_set_state.c +++ b/src/overlays/l08/hero/hero_set_state.c @@ -224,7 +224,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { if (p->swim_bob_velocity < frame_time * -7.0f) p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (animation_request_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); @@ -353,7 +353,7 @@ int hero_set_state(int requested_state, int animation_request_mode) { if (s->swim_bob_velocity < frame_time * -7.0f) s->swim_bob_velocity = frame_time * -7.0f; s->swim_water_level = s->water_surface_z; - s->unk6A0 = 0; + s->swim_water_level_velocity = 0; s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; diff --git a/src/overlays/l11/hero/hero_set_state.c b/src/overlays/l11/hero/hero_set_state.c index d57e2cfd2a..a4a470ad05 100644 --- a/src/overlays/l11/hero/hero_set_state.c +++ b/src/overlays/l11/hero/hero_set_state.c @@ -220,7 +220,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (p->swim_bob_velocity < frame_time * -7.0f) p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (animation_update_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); @@ -342,7 +342,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (s->swim_bob_velocity < frame_time * -7.0f) s->swim_bob_velocity = frame_time * -7.0f; s->swim_water_level = s->water_surface_z; - s->unk6A0 = 0; + s->swim_water_level_velocity = 0; s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; diff --git a/src/overlays/l12/hero/hero_set_state.c b/src/overlays/l12/hero/hero_set_state.c index beaf7a069e..fe66ee52e3 100644 --- a/src/overlays/l12/hero/hero_set_state.c +++ b/src/overlays/l12/hero/hero_set_state.c @@ -228,7 +228,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if (p->swim_bob_velocity < frame_time * -7.0f) p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (entry_animation_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); @@ -350,7 +350,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if (s->swim_bob_velocity < frame_time * -7.0f) s->swim_bob_velocity = frame_time * -7.0f; s->swim_water_level = s->water_surface_z; - s->unk6A0 = 0; + s->swim_water_level_velocity = 0; s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; diff --git a/src/overlays/l14/hero/hero_set_state.c b/src/overlays/l14/hero/hero_set_state.c index 4ad551aac2..378b6e217c 100644 --- a/src/overlays/l14/hero/hero_set_state.c +++ b/src/overlays/l14/hero/hero_set_state.c @@ -225,7 +225,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (p->swim_bob_velocity < frame_time * -7.0f) p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (animation_update_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); diff --git a/src/overlays/l15/hero/hero_set_state.c b/src/overlays/l15/hero/hero_set_state.c index ac88b4027b..3fa3d7b7ba 100644 --- a/src/overlays/l15/hero/hero_set_state.c +++ b/src/overlays/l15/hero/hero_set_state.c @@ -323,7 +323,7 @@ int hero_set_state(int requested_state, int entry_animation_mode) { if (s->swim_bob_velocity < frame_time * -7.0f) s->swim_bob_velocity = frame_time * -7.0f; s->swim_water_level = s->water_surface_z; - s->unk6A0 = 0; + s->swim_water_level_velocity = 0; s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; diff --git a/src/overlays/l16/hero/hero_set_state.c b/src/overlays/l16/hero/hero_set_state.c index bcb680f868..b5c0fd906d 100644 --- a/src/overlays/l16/hero/hero_set_state.c +++ b/src/overlays/l16/hero/hero_set_state.c @@ -239,7 +239,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (p->swim_bob_velocity < frame_time * -7.0f) p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (animation_update_mode) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); @@ -368,7 +368,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (s->swim_bob_velocity < frame_time * -7.0f) s->swim_bob_velocity = frame_time * -7.0f; s->swim_water_level = s->water_surface_z; - s->unk6A0 = 0; + s->swim_water_level_velocity = 0; s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; @@ -527,7 +527,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { m = (char *)q->hoverboard_moby; fill_transfer_words(&q->smoothed_spin_stick, 0, 0x210); q->hoverboard_moby = (u8 *)m; - q->unk890 = (u8 *)D_L16_0015FFD8 + (*(int *)(*(char **)(m + 0x78) + 0x28) << 8); + q->race_moby = (u8 *)D_L16_0015FFD8 + (*(int *)(*(char **)(m + 0x78) + 0x28) << 8); q->board_gravity = frame_time_sq * 22.0f; q->board_spring_angle = 1.2217305f; q->trick_hud_handle = -1; @@ -614,7 +614,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (p->swim_bob_velocity < frame_time * -5.7f) p->swim_bob_velocity = frame_time * -5.7f; p->swim_water_level = p->board_floor_z; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level - -0.12f; if (0.2f < p->swim_bob_offset) { p->swim_bob_offset = 0.2f; diff --git a/src/overlays/l17/hero/hero_set_state.c b/src/overlays/l17/hero/hero_set_state.c index 023db9e6bb..a6065c5b88 100644 --- a/src/overlays/l17/hero/hero_set_state.c +++ b/src/overlays/l17/hero/hero_set_state.c @@ -256,7 +256,7 @@ int hero_set_state(int requested_state, int b) { if (p->swim_bob_velocity < frame_time * -7.0f) p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (b) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); @@ -378,7 +378,7 @@ int hero_set_state(int requested_state, int b) { if (s->swim_bob_velocity < frame_time * -7.0f) s->swim_bob_velocity = frame_time * -7.0f; s->swim_water_level = s->water_surface_z; - s->unk6A0 = 0; + s->swim_water_level_velocity = 0; s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; @@ -1245,8 +1245,8 @@ int hero_set_state(int requested_state, int b) { struct Hero *w = &hero; w->fall_delay_frames = scale_game_frames(0x96); w->jump_gravity = frame_time_sq * 15.0f; - w->unk49C = scale_game_frames(5); - w->unk49E = scale_game_frames(4); + w->fire_ring_timer = scale_game_frames(5); + w->side_spark_timer = scale_game_frames(4); } } else if (u->state.current == 0x69) { float v; diff --git a/src/overlays/l18/hero/hero_set_state.c b/src/overlays/l18/hero/hero_set_state.c index 3814863027..dccfe625db 100644 --- a/src/overlays/l18/hero/hero_set_state.c +++ b/src/overlays/l18/hero/hero_set_state.c @@ -325,7 +325,7 @@ int hero_set_state(int requested_state, int animation_update_mode) { if (s->swim_bob_velocity < frame_time * -7.0f) s->swim_bob_velocity = frame_time * -7.0f; s->swim_water_level = s->water_surface_z; - s->unk6A0 = 0; + s->swim_water_level_velocity = 0; s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; diff --git a/src/overlays/shared/hero/hero_frame_update.c b/src/overlays/shared/hero/hero_frame_update.c index cba4c821a7..ac96b60bd6 100644 --- a/src/overlays/shared/hero/hero_frame_update.c +++ b/src/overlays/shared/hero/hero_frame_update.c @@ -254,7 +254,7 @@ void update_hero_frame(void) { return; } hero_state_base->glow_draw_queued = 0; - hero_state_base->unk1EB0 = 0; + hero_state_base->glow_point_count = 0; if (hero_state_base->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { hero_frame_update(); return; diff --git a/src/overlays/shared/hero/hero_idle_sequence.c b/src/overlays/shared/hero/hero_idle_sequence.c index f020250df9..0aad0bcc69 100644 --- a/src/overlays/shared/hero/hero_idle_sequence.c +++ b/src/overlays/shared/hero/hero_idle_sequence.c @@ -1252,7 +1252,7 @@ void coordinate_hero_frame_update(void) { return; } hero_state->glow_draw_queued = 0; - hero_state->unk1EB0 = 0; + hero_state->glow_point_count = 0; if (hero_state->vehicle_mode) { update_hero_in_vehicle_mode(); return; @@ -2732,7 +2732,7 @@ void emit_hero_timed_effects(void) { frame_count = random_int_between(scale_game_frames(3), scale_game_frames(7)); { struct Hero *hero_state = &hero; - hero_state->unk49C = frame_count; + hero_state->fire_ring_timer = frame_count; } } diff --git a/src/overlays/shared/hero/hero_set_state.c b/src/overlays/shared/hero/hero_set_state.c index a2198ec38e..f161ee6e89 100644 --- a/src/overlays/shared/hero/hero_set_state.c +++ b/src/overlays/shared/hero/hero_set_state.c @@ -838,7 +838,7 @@ int hero_set_state(int requested_state, int b) { if (p->swim_bob_velocity < frame_time * -7.0f) p->swim_bob_velocity = frame_time * -7.0f; p->item_select_blocked = 1; - p->unk6A0 = 0; + p->swim_water_level_velocity = 0; p->swim_bob_offset = p->motion.pos.f[2] - p->swim_water_level; if (b) set_hero_animation(0x74, 0, (float)scale_game_frames(0xB)); @@ -960,7 +960,7 @@ int hero_set_state(int requested_state, int b) { if (s->swim_bob_velocity < frame_time * -7.0f) s->swim_bob_velocity = frame_time * -7.0f; s->swim_water_level = s->water_surface_z; - s->unk6A0 = 0; + s->swim_water_level_velocity = 0; s->swim_bob_offset = s->motion.pos.f[2] - s->swim_water_level - -0.12f; qcopy(&s->motion.momentum, &s->motion.resolved_velocity); s->motion.momentum.f[2] = 0.0f; @@ -1835,8 +1835,8 @@ int hero_set_state(int requested_state, int b) { struct Hero *w = &hero; w->fall_delay_frames = scale_game_frames(0x96); w->jump_gravity = frame_time_sq * 15.0f; - w->unk49C = scale_game_frames(5); - w->unk49E = scale_game_frames(4); + w->fire_ring_timer = scale_game_frames(5); + w->side_spark_timer = scale_game_frames(4); } } else if (u->state.current == 0x69) { float v; diff --git a/src/overlays/shared/hero/initialize_hero.c b/src/overlays/shared/hero/initialize_hero.c index f7380444a9..ead7ceccc6 100644 --- a/src/overlays/shared/hero/initialize_hero.c +++ b/src/overlays/shared/hero/initialize_hero.c @@ -90,6 +90,6 @@ void initialize_hero(void) { hero.health.saved_hp = hero.health.hp; hero.head_look_timer = random_int_between(scale_game_frames(0xB4), scale_game_frames(0x12C)); hero.idle_look_ease_rate = 0.007f; - hero.unk1018 = 0.3f; - hero.unkD20 = 0.97f; + hero.idle_look_damping = 0.3f; + hero.shadow_pitch = 0.97f; } diff --git a/src/overlays/shared/hero/process_hero_primary_item_input.c b/src/overlays/shared/hero/process_hero_primary_item_input.c index 185eff3b11..42f05313bd 100644 --- a/src/overlays/shared/hero/process_hero_primary_item_input.c +++ b/src/overlays/shared/hero/process_hero_primary_item_input.c @@ -1756,7 +1756,7 @@ void update_hero_hoverboard_race_progress(void) { if (*(alternate_item_available_lui) == 0 && hero.race_position == 1) { D_L05_0015FFD8_macro[race_pvars->f28].command = 1; } else { - hero.unk890 = (u8 *)(&D_L05_0015FFD8_macro[race_pvars->f28]); + hero.race_moby = (u8 *)(&D_L05_0015FFD8_macro[race_pvars->f28]); mode_freeze_init(0, 0); } if (freeze_stats_time_ref_macro[0] == 0) { @@ -1783,7 +1783,7 @@ void update_hero_hoverboard_race_progress(void) { if (D_0013D4DF_lui == 0 && hero.race_position == 1) { D_L05_0015FFD8_macro[race_pvars->f28].command = 1; } else { - hero.unk890 = (u8 *)(&D_L05_0015FFD8_macro[race_pvars->f28]); + hero.race_moby = (u8 *)(&D_L05_0015FFD8_macro[race_pvars->f28]); mode_freeze_init(0, 0); } if (freeze_stats_time_ref_macro[1] == 0) { diff --git a/src/overlays/shared/hero/update_hero_frame_pipeline.c b/src/overlays/shared/hero/update_hero_frame_pipeline.c index 911e7480b0..12a32db2af 100644 --- a/src/overlays/shared/hero/update_hero_frame_pipeline.c +++ b/src/overlays/shared/hero/update_hero_frame_pipeline.c @@ -33,7 +33,7 @@ void update_hero_frame_pipeline(void) { return; } hero_state->glow_draw_queued = 0; - hero_state->unk1EB0 = 0; + hero_state->glow_point_count = 0; if (hero_state->vehicle_mode != HERO_VEHICLE_MODE_ON_FOOT) { hero_frame_update(); return; diff --git a/src/overlays/shared/ui/hud/draw_trick_combo_hud.c b/src/overlays/shared/ui/hud/draw_trick_combo_hud.c index 93e5903660..6d008a29bc 100644 --- a/src/overlays/shared/ui/hud/draw_trick_combo_hud.c +++ b/src/overlays/shared/ui/hud/draw_trick_combo_hud.c @@ -164,7 +164,7 @@ void update_trick_combo_hud(HudCounter *element) { { int k; for (k = 2; k >= 0; k--) { - hero.unk700[k] = 0; + hero.flips_per_axis[k] = 0; } } if (hero.state.current == 0x6B) { From 1759fcc66ab9de8e3b6f97a7c6fed19d66d22d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:31:59 +0000 Subject: [PATCH 210/213] decomp: name the level story trip, landing flag, hero start position/rotation and the reverb request owner --- include/rnc/audio/voice_pool.h | 2 +- include/rnc/rendering/level_render_state.h | 52 +++++++++++----------- src/game/startlevel.c | 2 +- src/game/update_resident_gameplay_state.c | 5 ++- 4 files changed, 31 insertions(+), 30 deletions(-) diff --git a/include/rnc/audio/voice_pool.h b/include/rnc/audio/voice_pool.h index a7d572e573..e6b398a4ed 100644 --- a/include/rnc/audio/voice_pool.h +++ b/include/rnc/audio/voice_pool.h @@ -69,7 +69,7 @@ typedef struct { s32 group_3_volume; s32 group_4_volume; s32 group_5_volume; - s32 unk60; + s32 reverb_owner; /* 0x060: owner of the reverb request */ s32 reverb_depth; /* 0x064 */ u8 reverb_type; u8 reverb_delay; diff --git a/include/rnc/rendering/level_render_state.h b/include/rnc/rendering/level_render_state.h index 6fee69add6..c2378b2fd7 100644 --- a/include/rnc/rendering/level_render_state.h +++ b/include/rnc/rendering/level_render_state.h @@ -20,32 +20,32 @@ typedef struct LevelRenderState { s16 timer; /* 0x24 */ s16 content_variant; /* 0x26: picks the effect and flare tables */ s16 skip; /* 0x28 */ - s16 unk2A; /* 0x2A: set to 1 by startlevel */ - s16 unk2C; /* 0x2C */ - u8 pad2E[2]; - s32 path; /* 0x30 */ - s32 source_camera_index; /* 0x34 */ - s32 destination_camera_index; /* 0x38 */ - f32 path_progress; /* 0x3C */ - f32 speed; /* 0x40 */ - f32 path_segment_length; /* 0x44 */ - f32 blend; /* 0x48 */ - f32 interpolation_velocity; /* 0x4C */ - s32 history_index; /* 0x50 */ - s32 history_count; /* 0x54 */ - s32 scene_mode; /* 0x58: scene variant set at level init */ - s32 scene_state; /* 0x5C */ - Vec4 unk60; /* 0x60 */ - Vec4 unk70; /* 0x70 */ - Vec4 startPos; /* 0x80 */ - Vec4 pathPos; /* 0x90 */ - Vec4 startRot; /* 0xA0 */ - f32 unkB0; - f32 rotY; /* 0xB4 */ - f32 rotZ; /* 0xB8 */ - f32 unkBC; - Vec4 primary_history[32]; /* 0xC0 */ - Vec4 secondary_history[32]; /* 0x2C0 */ + s16 story_trip; /* 0x2A: the level exit runs the story trip: 1 new game, 0 loaded game */ + s16 landing; /* 0x2C: the ship lands at the level start */ + u8 pad2E[2]; + s32 path; /* 0x30 */ + s32 source_camera_index; /* 0x34 */ + s32 destination_camera_index; /* 0x38 */ + f32 path_progress; /* 0x3C */ + f32 speed; /* 0x40 */ + f32 path_segment_length; /* 0x44 */ + f32 blend; /* 0x48 */ + f32 interpolation_velocity; /* 0x4C */ + s32 history_index; /* 0x50 */ + s32 history_count; /* 0x54 */ + s32 scene_mode; /* 0x58: scene variant set at level init */ + s32 scene_state; /* 0x5C */ + Vec4 hero_start_pos; /* 0x60: where the hero is teleported at the level start */ + Vec4 hero_start_rot; /* 0x70 */ + Vec4 startPos; /* 0x80 */ + Vec4 pathPos; /* 0x90 */ + Vec4 startRot; /* 0xA0 */ + f32 unkB0; + f32 rotY; /* 0xB4 */ + f32 rotZ; /* 0xB8 */ + f32 unkBC; + Vec4 primary_history[32]; /* 0xC0 */ + Vec4 secondary_history[32]; /* 0x2C0 */ } LevelRenderState; extern LevelRenderState level_render_state __asm__("D_0013E030"); diff --git a/src/game/startlevel.c b/src/game/startlevel.c index 88356f9817..c1981a9bb1 100644 --- a/src/game/startlevel.c +++ b/src/game/startlevel.c @@ -204,7 +204,7 @@ void startlevel(void) { put_disp_buffer(); } space_load = current_level_index_macro; - level_render_state.unk2A = 1; + level_render_state.story_trip = 1; current_level_index_macro = -1; do_space_transition(); } diff --git a/src/game/update_resident_gameplay_state.c b/src/game/update_resident_gameplay_state.c index 6f18cdc73f..0223997d51 100644 --- a/src/game/update_resident_gameplay_state.c +++ b/src/game/update_resident_gameplay_state.c @@ -263,11 +263,12 @@ void update_resident_gameplay_state(void) { space_load_in_progress[0] = 1; D_001413F5[0] = 0; noop_callback_j(); - if (level_render_state.unk2C != 0) { + if (level_render_state.landing != 0) { noop_callback_d(); return; } - noop_callback_k(&level_render_state.unk60, &level_render_state.unk70, 0, 1); + noop_callback_k( + &level_render_state.hero_start_pos, &level_render_state.hero_start_rot, 0, 1); return; } bank_tick_limit = pal_mode ? 0x50 : 0x60; From a6164d09afc3d373cb90aa64d3379da3b615b151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:36:33 +0000 Subject: [PATCH 211/213] decomp: name the l13 gemlik hero start fields and the electric water light intensity --- src/overlays/l13/mobys/gemlik_scene_controller.c | 12 ++++++------ src/overlays/shared/props/electric_water.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/overlays/l13/mobys/gemlik_scene_controller.c b/src/overlays/l13/mobys/gemlik_scene_controller.c index f3e7bf47c6..2c73b211c6 100644 --- a/src/overlays/l13/mobys/gemlik_scene_controller.c +++ b/src/overlays/l13/mobys/gemlik_scene_controller.c @@ -21,9 +21,9 @@ extern int D_L13_0015F404; extern struct { char pad0[0x60]; - float unk60, unk64, unk68; + float hero_start_x, hero_start_y, hero_start_z; /* LevelRenderState.hero_start_pos */ char pad6C[0xC]; - float unk78; + float hero_start_yaw; /* LevelRenderState.hero_start_rot z */ } D_0013E030; extern unsigned char D_L13_0015FC88[] MACRO_ADDR; @@ -194,10 +194,10 @@ void gemlik_scene_controller_update(struct Moby *moby) { struct Moby *other = (struct Moby *)(moby_base + scene_controller_vars[8] * 0x100); other->flags &= 0xffbe; initialize_moby_state_record(other); - D_0013E030.unk60 = 464.66f; - D_0013E030.unk64 = 580.68f; - D_0013E030.unk68 = 316.72f; - D_0013E030.unk78 = 2.77f; + D_0013E030.hero_start_x = 464.66f; + D_0013E030.hero_start_y = 580.68f; + D_0013E030.hero_start_z = 316.72f; + D_0013E030.hero_start_yaw = 2.77f; } D_L13_0015F404 = 0; moby->state = WAIT_LINKED_MOBY_REMOVAL_BEFORE_SAVE; diff --git a/src/overlays/shared/props/electric_water.c b/src/overlays/shared/props/electric_water.c index 464badcb41..8caba1ffee 100644 --- a/src/overlays/shared/props/electric_water.c +++ b/src/overlays/shared/props/electric_water.c @@ -58,8 +58,8 @@ typedef struct { float red; /* the colour, as PointLight.color */ float green; float blue; - int unkC; - Vec4 pos; /* w: radius */ + int intensity; /* PointLight.intensity */ + Vec4 pos; /* w: radius */ } Light29FF90; typedef struct { @@ -297,7 +297,7 @@ void electric_water_update(struct Moby *moby) { light->pos.f[3] = 8.0f; light->green = 1.0f; light->blue = 0.5f; - light->unkC = 0; + light->intensity = 0; } initialize_electric_water_bolt_effect((char *)moby); update_electric_water_bolt_effect(moby); From 15cccd509e5d5b5e3484731c083e8a7c783abec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 19:46:21 +0000 Subject: [PATCH 212/213] decomp: name the glow quad corner texture coordinates and the orbit offset projection; format three files --- include/rnc/game/startlevel.h | 14 ++++---- src/overlays/l00/mobys/veldin_robot_enemy.c | 32 +++++++++---------- .../shared/camera/follow_camera_setup.c | 7 ++-- .../shared/enemies/plasmabot_death_debris.c | 20 ++++++------ .../streaming/load_scene_chunks_with_fade.c | 15 +++++---- src/overlays/shared/weapons/morphoray.c | 24 +++++++------- src/overlays/shared/weapons/walloper.c | 24 +++++++------- src/runtime/startup/init_once.c | 4 ++- 8 files changed, 73 insertions(+), 67 deletions(-) diff --git a/include/rnc/game/startlevel.h b/include/rnc/game/startlevel.h index 27f0834943..b5cd318862 100644 --- a/include/rnc/game/startlevel.h +++ b/include/rnc/game/startlevel.h @@ -6,13 +6,13 @@ /* A sound definition, 0x20 bytes (MobyClass.sound_defs entries); startlevel fills in the bank loaded from disc_table.sound_bank. */ typedef struct { - s32 min_range; /* 0x00 */ - f32 max_range; /* 0x04: 128.0f in every boot definition */ - s32 far_volume; /* 0x08: calculate_voice_distance_volume */ - s32 near_volume; /* 0x0C */ - s32 min_pitch; /* 0x10 */ - s32 max_pitch; /* 0x14 */ - u8 loop; /* 0x18 */ + s32 min_range; /* 0x00 */ + f32 max_range; /* 0x04: 128.0f in every boot definition */ + s32 far_volume; /* 0x08: calculate_voice_distance_volume */ + s32 near_volume; /* 0x0C */ + s32 min_pitch; /* 0x10 */ + s32 max_pitch; /* 0x14 */ + u8 loop; /* 0x18 */ u8 attenuation_flags; /* 0x19: bit 0 = quadratic distance falloff, else linear */ s16 sound; /* 0x1A: sound index (sound_update) */ s32 bank; /* 0x1C: bank handle */ diff --git a/src/overlays/l00/mobys/veldin_robot_enemy.c b/src/overlays/l00/mobys/veldin_robot_enemy.c index dcb0222abf..fc6690f38f 100644 --- a/src/overlays/l00/mobys/veldin_robot_enemy.c +++ b/src/overlays/l00/mobys/veldin_robot_enemy.c @@ -614,14 +614,14 @@ typedef union { typedef struct { GlowVec corner[4]; u32 color[4]; - s32 u0; /* texture coordinates of the four corners */ - s32 v0; - s32 u1; - f32 v1; - f32 u2; - s32 v2; - f32 u3; - f32 v3; + s32 corner0_u; /* texture coordinates of the four corners */ + s32 corner0_v; + s32 corner1_u; + f32 corner1_v; + f32 corner2_u; + s32 corner2_v; + f32 corner3_u; + f32 corner3_v; s64 clamp; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ s64 tex; s64 tex1; @@ -669,15 +669,15 @@ void draw_veldin_robot_effect_quad(GlowMoby *moby) { quad.color[3] = 0x80FFFFFF; quad.color[2] = 0x80FFFFFF; quad.color[1] = 0x80FFFFFF; - quad.u0 = 0; - quad.v0 = 0; - quad.u1 = 0; - quad.v1 = one; - quad.u2 = one; + quad.corner0_u = 0; + quad.corner0_v = 0; + quad.corner1_u = 0; + quad.corner1_v = one; + quad.corner2_u = one; quad.color[0] = 0x80FFFFFF; - quad.v2 = 0; - quad.u3 = one; - quad.v3 = one; + quad.corner2_v = 0; + quad.corner3_u = one; + quad.corner3_v = one; template_corner = l00_veldin_robot_effect_quad_template_corners; quad_corner = quad.corner; for (i = 0; i < 4; i++) { diff --git a/src/overlays/shared/camera/follow_camera_setup.c b/src/overlays/shared/camera/follow_camera_setup.c index 328d85b28d..4cda7ed305 100644 --- a/src/overlays/shared/camera/follow_camera_setup.c +++ b/src/overlays/shared/camera/follow_camera_setup.c @@ -776,7 +776,7 @@ void follow_camera_setup(Moby_2E8210 *camera_moby) { Cam240 *p240; int r; float orbit_distance_shortfall; - float v0[4]; + float orbit_offset_projection[4]; float orbit_offset_remainder[4]; D_L00_00161D8C = 0; @@ -898,8 +898,9 @@ void follow_camera_setup(Moby_2E8210 *camera_moby) { qcopy(b->v10, b->v0); qcopy(camera_state->pos, camera_moby->v30); qcopy(g->v20, camera_moby->v30); - fast_vec_scale(v0, D_0013F6E0_2E8210, fast_vec_dot(b->v0, D_0013F6E0_2E8210)); - fast_vec_sub(orbit_offset_remainder, b->v0, v0); + fast_vec_scale( + orbit_offset_projection, D_0013F6E0_2E8210, fast_vec_dot(b->v0, D_0013F6E0_2E8210)); + fast_vec_sub(orbit_offset_remainder, b->v0, orbit_offset_projection); orbit_distance_shortfall = b->target_orbit_distance - fast_vec_length(orbit_offset_remainder); g->f30 = orbit_distance_shortfall; if (orbit_distance_shortfall < -0.1f) { diff --git a/src/overlays/shared/enemies/plasmabot_death_debris.c b/src/overlays/shared/enemies/plasmabot_death_debris.c index 478fa61449..c2590f15cd 100644 --- a/src/overlays/shared/enemies/plasmabot_death_debris.c +++ b/src/overlays/shared/enemies/plasmabot_death_debris.c @@ -212,10 +212,10 @@ typedef struct { typedef struct { GlowVec_bfa8 corner[4]; u32 color[4]; - s32 u0, v0, u1; /* texture coordinates of the four corners */ - f32 v1, u2; + s32 corner0_u, corner0_v, corner1_u; /* texture coordinates of the four corners */ + f32 corner1_v, corner2_u; s32 corner_2_texture_t; - f32 u3, v3; + f32 corner3_u, corner3_v; s64 clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } GlowQuad_bfa8; @@ -259,14 +259,14 @@ void draw_moby_offset_textured_quad(char *moby) { local.quad.alpha = 0x8000000048L; local.quad.tex1 = 0xFF9000000260L; local.quad.clamp = 5; - local.quad.u0 = 0; - local.quad.v0 = 0; - local.quad.u1 = 0; - local.quad.v1 = one; - local.quad.u2 = one; + local.quad.corner0_u = 0; + local.quad.corner0_v = 0; + local.quad.corner1_u = 0; + local.quad.corner1_v = one; + local.quad.corner2_u = one; local.quad.corner_2_texture_t = 0; - local.quad.u3 = one; - local.quad.v3 = one; + local.quad.corner3_u = one; + local.quad.corner3_v = one; fast_vec_scale(&local.basis.offset, moby + 0xc0, moby_quad_c0_offset_scale_gp); fast_vec_scale(&local.basis.partial, moby + 0xe0, moby_quad_e0_offset_scale_gp); diff --git a/src/overlays/shared/streaming/load_scene_chunks_with_fade.c b/src/overlays/shared/streaming/load_scene_chunks_with_fade.c index 42aa0ca2a3..68c5fbef0f 100644 --- a/src/overlays/shared/streaming/load_scene_chunks_with_fade.c +++ b/src/overlays/shared/streaming/load_scene_chunks_with_fade.c @@ -24,11 +24,13 @@ void load_scene_chunks_with_fade(s32 i) { s32 pointer_index; s32 *offset_entry; if (pal_mode == PAL_MODE_DISABLED) { - start_audio_stream_read( - D_L00_0016C860.buf, disc_table.scene_chunk_archives[i].sector, disc_table.scene_chunk_archives[i].size); + start_audio_stream_read(D_L00_0016C860.buf, + disc_table.scene_chunk_archives[i].sector, + disc_table.scene_chunk_archives[i].size); } else { - start_audio_stream_read( - D_L00_0016C860.buf, disc_table.scene_chunk_archives_alt[i].sector, disc_table.scene_chunk_archives_alt[i].size); + start_audio_stream_read(D_L00_0016C860.buf, + disc_table.scene_chunk_archives_alt[i].sector, + disc_table.scene_chunk_archives_alt[i].size); } update_audio_stream_until_idle(0); fade_to_black(4); @@ -63,8 +65,9 @@ void load_chunks_with_optional_fade(s32 i, s32 fade_frame_count) { start_audio_stream_read( H245610.buf, disc_table.chunk_archives[i].sector, disc_table.chunk_archives[i].size); } else { - start_audio_stream_read( - H245610.buf, disc_table.chunk_archives_alt[i].sector, disc_table.chunk_archives_alt[i].size); + start_audio_stream_read(H245610.buf, + disc_table.chunk_archives_alt[i].sector, + disc_table.chunk_archives_alt[i].size); } if (fade_frame_count != 0) { update_audio_stream_until_idle(0); diff --git a/src/overlays/shared/weapons/morphoray.c b/src/overlays/shared/weapons/morphoray.c index 27aae47811..12e906de18 100644 --- a/src/overlays/shared/weapons/morphoray.c +++ b/src/overlays/shared/weapons/morphoray.c @@ -129,10 +129,10 @@ typedef struct { typedef struct { V_2be890 corner[4]; int color[4]; - int u0, v0, u1; /* texture coordinates of the four corners */ - float v1, u2; - int v2; - float u3, v3; + int corner0_u, corner0_v, corner1_u; /* texture coordinates of the four corners */ + float corner1_v, corner2_u; + int corner2_v; + float corner3_u, corner3_v; long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Q_2be890; @@ -2353,18 +2353,18 @@ void draw_beam_origin_camera_facing_quads(void *mv) { quad.alpha = 0x8000000048L; quad.tex1 = 0xFF9000000260L; quad.clamp = 0; - quad.u0 = 0; - quad.v0 = 0; + quad.corner0_u = 0; + quad.corner0_v = 0; quad.color[3] = first_pass_vertex_color; quad.color[2] = first_pass_vertex_color; quad.color[1] = first_pass_vertex_color; quad.color[0] = first_pass_vertex_color; - quad.u1 = 0; - quad.v1 = 1.0f; - quad.u2 = 1.0f; - quad.v2 = 0; - quad.u3 = 1.0f; - quad.v3 = 1.0f; + quad.corner1_u = 0; + quad.corner1_v = 1.0f; + quad.corner2_u = 1.0f; + quad.corner2_v = 0; + quad.corner3_u = 1.0f; + quad.corner3_v = 1.0f; FUN_001f9bf8_2be890(&offset_vector, moby_bytes + 0xD0, beam_origin_quad_basis_offset_length_gp); FUN_001f9a10_2be890(&camera_facing_transform[3], &beam_nodes[0], &offset_vector); FUN_001f9a28_2be890( diff --git a/src/overlays/shared/weapons/walloper.c b/src/overlays/shared/weapons/walloper.c index 65cb457621..0a65673bc3 100644 --- a/src/overlays/shared/weapons/walloper.c +++ b/src/overlays/shared/weapons/walloper.c @@ -42,10 +42,10 @@ typedef struct { typedef struct { V_2bc1a0 corner[4]; unsigned int color[4]; - int u0, v0, u1; /* texture coordinates of the four corners */ - float v1, u2; - int v2; - float u3, v3; + int corner0_u, corner0_v, corner1_u; /* texture coordinates of the four corners */ + float corner1_v, corner2_u; + int corner2_v; + float corner3_u, corner3_v; long clamp, tex, tex1, alpha; /* GS CLAMP_1, TEX0_1, TEX1_1 and ALPHA_1 values */ } Q_2bc1a0; @@ -1050,14 +1050,14 @@ void draw_walloper_camera_facing_quad(void *mv) { quad.alpha = 0x8000000048L; quad.tex1 = 0xFF9000000260L; quad.clamp = 0; - quad.u0 = 0; - quad.v0 = 0; - quad.u1 = 0; - quad.v1 = 1.0f; - quad.u2 = 1.0f; - quad.v2 = 0; - quad.u3 = 1.0f; - quad.v3 = 1.0f; + quad.corner0_u = 0; + quad.corner0_v = 0; + quad.corner1_u = 0; + quad.corner1_v = 1.0f; + quad.corner2_u = 1.0f; + quad.corner2_v = 0; + quad.corner3_u = 1.0f; + quad.corner3_v = 1.0f; if (!random_integer_below(4)) uniform_vertex_color = l00_walloper_quad_rare_base_vertex_color; else diff --git a/src/runtime/startup/init_once.c b/src/runtime/startup/init_once.c index 259a5556bf..26a0e5fb63 100644 --- a/src/runtime/startup/init_once.c +++ b/src/runtime/startup/init_once.c @@ -107,7 +107,9 @@ void init_once(void) { aligned_memory_base = (u32)D_24135F & 0xFFFFC000; boot_archive = (struct BootArchive *)(aligned_memory_base + 0x2C0000); compressed_archive_buffer = (s32 *)(D_1FF8000 - (disc_table.startup_archive.size << 0xB)); - wad_get_sectors(disc_table.startup_archive.sector, disc_table.startup_archive.size, compressed_archive_buffer); + wad_get_sectors(disc_table.startup_archive.sector, + disc_table.startup_archive.size, + compressed_archive_buffer); FlushCache(0); decompress_wad(compressed_archive_buffer, boot_archive); FlushCache(0); From 6e9f8c8d1cc0f28185f09a8f76bcd3f4bfa4d846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20K=C5=82ysz?= Date: Fri, 6 Nov 2026 21:19:03 +0000 Subject: [PATCH 213/213] fix: correct names from the audit: orbit duration, music pause fields, unproven l05 classes, Drek boss mine, bombthrower bomb --- configure.py | 12 ++--- include/rnc/audio/music/music_stream_state.h | 14 ++--- include/rnc/camera/camera_globals.h | 2 +- include/rnc/game/overlay_game_state.h | 2 +- include/rnc/hero/hero.h | 2 +- include/rnc/overlay/l05/mobys.h | 8 +-- .../moby_855_update.h} | 8 +-- include/rnc/overlay/l08/mobys.h | 2 +- include/rnc/overlay/l18/mobys.h | 2 +- .../rnc/overlay/shared/camera/level_camera.h | 2 +- include/rnc/overlay/shared/mobys/moby_anim.h | 4 +- src/audio/music/music_pause.c | 12 ++--- src/audio/music/music_unpause.c | 6 +-- src/audio/music/music_update.c | 6 +-- src/audio/music/music_update_stream.c | 12 ++--- .../advance_alternate_camera_transition.c | 4 +- src/camera/start_camera_blend.c | 2 +- src/overlays/l05/level_class_tables.c | 8 +-- .../l05/mobys/{sliding_block.c => moby_843.c} | 24 ++++----- .../l05/mobys/{water_spout.c => moby_855.c} | 8 +-- .../l05/mobys/{hinged_hatch.c => moby_893.c} | 18 +++---- .../l05/mobys/{swinging_flap.c => moby_895.c} | 6 +-- src/overlays/l08/level_class_tables.c | 2 +- ...{blarg_bomb.c => blarg_bombthrower_bomb.c} | 26 ++++----- src/overlays/l18/level_class_tables.c | 2 +- .../{drifting_mine.c => drek_boss_mine.c} | 54 +++++++++---------- .../l18/mobys/drek_final_boss_robot.c | 8 +-- .../music/music_set_active_track_value.c | 14 ++--- .../shared/game/run_level_main_loop.c | 4 +- src/overlays/shared/hero/initialize_hero.c | 3 +- 30 files changed, 137 insertions(+), 140 deletions(-) rename include/rnc/overlay/l05/mobys/{water_spout_data/water_spout_update.h => moby_855_data/moby_855_update.h} (76%) rename src/overlays/l05/mobys/{sliding_block.c => moby_843.c} (87%) rename src/overlays/l05/mobys/{water_spout.c => moby_855.c} (96%) rename src/overlays/l05/mobys/{hinged_hatch.c => moby_893.c} (92%) rename src/overlays/l05/mobys/{swinging_flap.c => moby_895.c} (87%) rename src/overlays/l08/mobys/{blarg_bomb.c => blarg_bombthrower_bomb.c} (94%) rename src/overlays/l18/mobys/{drifting_mine.c => drek_boss_mine.c} (88%) diff --git a/configure.py b/configure.py index 1993a6686c..805d5277ef 100755 --- a/configure.py +++ b/configure.py @@ -317,10 +317,10 @@ "l05/mobys/skid_mcmarx.c", "l05/mobys/taxi.c", "l05/mobys/television.c", - "l05/mobys/hinged_hatch.c", - "l05/mobys/sliding_block.c", - "l05/mobys/swinging_flap.c", - "l05/mobys/water_spout.c", + "l05/mobys/moby_893.c", + "l05/mobys/moby_843.c", + "l05/mobys/moby_895.c", + "l05/mobys/moby_855.c", "l05/mobys/water.c", "l06/hero/hero_set_state.c", "l06/hero/update_hero_state_machine.c", @@ -379,7 +379,7 @@ "l08/mobys/blarg_bombthrower.c", "l08/mobys/bolt_pickup.c", "l08/mobys/bolt_thief.c", - "l08/mobys/blarg_bomb.c", + "l08/mobys/blarg_bombthrower_bomb.c", "l08/mobys/bomber_tank.c", "l08/mobys/bomber_tank_bomb.c", "l08/mobys/commando.c", @@ -675,7 +675,7 @@ "l18/mobys/hidden_deplanetizer_gun.c", "l18/mobys/inert_moby.c", "l18/mobys/lift.c", - "l18/mobys/drifting_mine.c", + "l18/mobys/drek_boss_mine.c", "l18/mobys/rocket.c", "l18/mobys/rocket_tank.c", "l18/mobys/rocket_tank_rocket.c", diff --git a/include/rnc/audio/music/music_stream_state.h b/include/rnc/audio/music/music_stream_state.h index 37510a6545..a33517b055 100644 --- a/include/rnc/audio/music/music_stream_state.h +++ b/include/rnc/audio/music/music_stream_state.h @@ -16,13 +16,13 @@ /* One music channel record (0x1C bytes). */ struct MusicStreamChannel { - s32 handle; /* 0x00: stream handle from the start callback; -1 while starting */ - s16 track; /* 0x04 */ - s16 volume; /* 0x06 */ - s16 flags; /* 0x08 */ - s16 state; /* 0x0A: set 1 on start, 1 -> 2 in the start callback */ - s16 fade_flags; /* 0x0C: -0x8000 on music_pause, 4 on music_unpause */ - s16 fade_timer; /* 0x0E: counted down by music_update_stream while fading; cleared by music_pause */ + s32 handle; /* 0x00: stream handle from the start callback; -1 while starting */ + s16 track; /* 0x04 */ + s16 volume; /* 0x06 */ + s16 flags; /* 0x08 */ + s16 state; /* 0x0A: set 1 on start, 1 -> 2 in the start callback */ + s16 pause_flags; /* 0x0C: bit 0x8000 pauses the stream (music_pause), 4 resumes it (music_unpause) */ + s16 pause_timer; /* 0x0E: frames until a timed pause ends; 0 from music_pause pauses until music_unpause */ s16 crossfade_enabled; /* 0x10: remaining-time callback starts the crossfade */ u8 pad_12[0x2]; s32 poll_interval; /* 0x14 */ diff --git a/include/rnc/camera/camera_globals.h b/include/rnc/camera/camera_globals.h index f7095061a0..ba3e39d024 100644 --- a/include/rnc/camera/camera_globals.h +++ b/include/rnc/camera/camera_globals.h @@ -26,7 +26,7 @@ struct CameraOrbit { f32 angles[3]; /* 0x00: yaw, pitch, distance (compute_camera_angles) */ s32 frames; /* 0x0C */ f32 frame_step; /* 0x10: 1 / frames */ - s32 length; /* 0x14: orbit length from the level; start_camera_blend adds one and scales it into frames */ + s32 duration_frames; /* 0x14: orbit duration set by the camera; start_camera_blend adds one and scales it into frames */ u8 pad_18[0x8]; f32 forward[4]; /* 0x20 */ f32 up[4]; /* 0x30 */ diff --git a/include/rnc/game/overlay_game_state.h b/include/rnc/game/overlay_game_state.h index 4c941fbefa..1a2d942465 100644 --- a/include/rnc/game/overlay_game_state.h +++ b/include/rnc/game/overlay_game_state.h @@ -55,7 +55,7 @@ struct GameState { u8 pad128[0x130 - 0x128]; s32 saved_decode_mode; /* 0x130: decode_mode before a menu movie */ u8 pad134[0x13C - 0x134]; - s32 memcard_icon_hidden; /* 0x13C: skips the busy card icon for one frame */ + s32 card_icon_hidden; /* 0x13C: skips the busy card icon for one frame */ s32 resource_table_class; /* 0x140: oclass at the last resource table select */ s32 last_resource_table_toggle; /* 0x144 */ s32 stash_handles[20]; /* 0x148: FUN_L00_00276078 */ diff --git a/include/rnc/hero/hero.h b/include/rnc/hero/hero.h index 3b6aec800b..880aeb2686 100644 --- a/include/rnc/hero/hero.h +++ b/include/rnc/hero/hero.h @@ -457,7 +457,7 @@ struct Hero { f32 swim_bob_velocity; /* 0x694 */ s32 swim_stroke_timer; /* 0x698 */ f32 swim_water_level; /* 0x69C */ - s32 swim_water_level_velocity; /* 0x6A0: spring velocity of swim_water_level */ + f32 swim_water_level_velocity; /* 0x6A0: spring velocity of swim_water_level */ struct Moby *sink_effect_moby; /* 0x6A4 */ f32 bob_phase; /* 0x6A8 */ f32 bob_offset; /* 0x6AC */ diff --git a/include/rnc/overlay/l05/mobys.h b/include/rnc/overlay/l05/mobys.h index 50823a2b4d..61d41f4104 100644 --- a/include/rnc/overlay/l05/mobys.h +++ b/include/rnc/overlay/l05/mobys.h @@ -30,10 +30,10 @@ void skid_mcmarx_update() __asm__("FUN_L05_00307910"); void taxi_update(struct Moby *) __asm__("FUN_L05_00318c78"); void initialize_taxi_stop_state(void *) __asm__("FUN_L05_00319208"); void television_update(struct Moby *) __asm__("FUN_L05_00318b98"); -void swinging_flap_update(struct Moby *) __asm__("FUN_L05_003166a0"); -void hinged_hatch_update(char *) __asm__("FUN_L05_00316258"); -void sliding_block_update(char *) __asm__("FUN_L05_0030e508"); -void water_spout_update(struct Moby *) __asm__("FUN_L05_003150f0"); +void moby_895_update(struct Moby *) __asm__("FUN_L05_003166a0"); +void moby_893_update(char *) __asm__("FUN_L05_00316258"); +void moby_843_update(char *) __asm__("FUN_L05_0030e508"); +void moby_855_update(struct Moby *) __asm__("FUN_L05_003150f0"); void water_update(struct Moby *) __asm__("FUN_L05_0030ca80"); #endif /* LOMBYTE_RNC_OVERLAY_L05_MOBYS_H */ diff --git a/include/rnc/overlay/l05/mobys/water_spout_data/water_spout_update.h b/include/rnc/overlay/l05/mobys/moby_855_data/moby_855_update.h similarity index 76% rename from include/rnc/overlay/l05/mobys/water_spout_data/water_spout_update.h rename to include/rnc/overlay/l05/mobys/moby_855_data/moby_855_update.h index 78c2e701f9..49cab14bf0 100644 --- a/include/rnc/overlay/l05/mobys/water_spout_data/water_spout_update.h +++ b/include/rnc/overlay/l05/mobys/moby_855_data/moby_855_update.h @@ -1,9 +1,9 @@ -#ifndef LOMBYTE_RNC_OVERLAY_L05_MOBYS_TRIGGERED_SPRAY_EMITTER_DATA_WATER_SPOUT_UPDATE_H -#define LOMBYTE_RNC_OVERLAY_L05_MOBYS_TRIGGERED_SPRAY_EMITTER_DATA_WATER_SPOUT_UPDATE_H +#ifndef LOMBYTE_RNC_OVERLAY_L05_MOBYS_MOBY_855_DATA_MOBY_855_UPDATE_H +#define LOMBYTE_RNC_OVERLAY_L05_MOBYS_MOBY_855_DATA_MOBY_855_UPDATE_H #include "types.h" -/* Scalar data for src/overlays/l05/mobys/triggered_particle_spray_emitter.c. +/* Scalar data for src/overlays/l05/mobys/moby_855.c. * Keep its include at this declaration block: SN small-data ordering matters. */ extern int spray_big_particle_kind_gp __asm__("D_L05_00161E98") __attribute__((sda)); extern int spray_small_particle_kind_gp __asm__("D_L05_00161E9C") __attribute__((sda)); @@ -20,4 +20,4 @@ extern float spray_particle_count_limit_per_update_gp __asm__("D_L05_00161EB8") extern float spray_big_particle_selection_threshold_percent_gp __asm__("D_L05_00161EBC") __attribute__((sda)); -#endif /* LOMBYTE_RNC_OVERLAY_L05_MOBYS_TRIGGERED_SPRAY_EMITTER_DATA_WATER_SPOUT_UPDATE_H */ +#endif /* LOMBYTE_RNC_OVERLAY_L05_MOBYS_MOBY_855_DATA_MOBY_855_UPDATE_H */ diff --git a/include/rnc/overlay/l08/mobys.h b/include/rnc/overlay/l08/mobys.h index 4b7a957483..ac183c6a1f 100644 --- a/include/rnc/overlay/l08/mobys.h +++ b/include/rnc/overlay/l08/mobys.h @@ -12,7 +12,7 @@ void batalia_textured_effect_update(struct Moby *) __asm__("FUN_L08_00 void blarg_bombthrower_update(struct Moby *) __asm__("FUN_L08_002dabf0"); void bolt_pickup_update() __asm__("FUN_L08_002b82a0"); void bolt_thief_update(struct Moby *) __asm__("FUN_L08_002e2df0"); -void blarg_bomb_update(char *) __asm__("FUN_L08_002d23f0"); +void blarg_bombthrower_bomb_update(char *) __asm__("FUN_L08_002d23f0"); void bomber_tank_update() __asm__("FUN_L08_002d42d8"); void commando_update() __asm__("FUN_L08_00302ce8"); void cutscene_camera_target_update(struct Moby *) __asm__("FUN_L08_003084d8"); diff --git a/include/rnc/overlay/l18/mobys.h b/include/rnc/overlay/l18/mobys.h index 6550e17d24..254accfb43 100644 --- a/include/rnc/overlay/l18/mobys.h +++ b/include/rnc/overlay/l18/mobys.h @@ -25,7 +25,7 @@ void hidden_deplanetizer_gun_update(struct Moby *) __asm__("FUN_L18_002fa640"); void inert_moby_update() __asm__("FUN_L18_002f7ab0"); void lift_update(struct Moby *) __asm__("FUN_L18_002f2310"); void hide_moby_and_disable_collision(struct Moby *) __asm__("FUN_L18_002d6280"); -void drifting_mine_update(struct Moby *) __asm__("FUN_L18_002d5918"); +void drek_boss_mine_update(struct Moby *) __asm__("FUN_L18_002d5918"); int moby_hold_state_while_active(struct Moby *) __asm__("FUN_L18_002d6190"); int update_moby_state_pause(struct Moby *) __asm__("FUN_L18_002d6108"); void rocket_moby_update(struct Moby *) __asm__("FUN_L18_002d5050"); diff --git a/include/rnc/overlay/shared/camera/level_camera.h b/include/rnc/overlay/shared/camera/level_camera.h index eadd7af172..6810940979 100644 --- a/include/rnc/overlay/shared/camera/level_camera.h +++ b/include/rnc/overlay/shared/camera/level_camera.h @@ -49,7 +49,7 @@ typedef struct LevelCamera { u8 pad28C[0x8]; f32 transition_position_rate; /* 0x294: CameraBlend.configured_position_rate */ u8 pad298[0x5c]; - s32 transition_orbit_frames; /* 0x2F4: CameraOrbit.length; start_camera_blend adds one */ + s32 transition_orbit_frames; /* 0x2F4: CameraOrbit.duration_frames; start_camera_blend adds one */ u8 pad2F8[0x58]; f32 rows[12]; /* 0x350: forward, right and up; the hero's input direction is turned by them */ u8 pad380[0x10]; diff --git a/include/rnc/overlay/shared/mobys/moby_anim.h b/include/rnc/overlay/shared/mobys/moby_anim.h index 640f884cf5..575b7cc352 100644 --- a/include/rnc/overlay/shared/mobys/moby_anim.h +++ b/include/rnc/overlay/shared/mobys/moby_anim.h @@ -22,11 +22,11 @@ typedef struct { unsigned char seq; /* 0x52 */ unsigned char prevSeq; /* 0x53 */ char _pad54[0x5C - 0x54]; - float animRate; /* 0x5C: Moby.anim_rate */ + float anim_rate; /* 0x5C: Moby.anim_rate */ char _pad60[0x68 - 0x60]; float *frameData; /* 0x68 */ char _pad6C[4]; - unsigned char animFlags; /* 0x70: Moby.anim_flags */ + unsigned char anim_flags; /* 0x70: Moby.anim_flags */ } MobyAnim; #endif /* LOMBYTE_RNC_OVERLAY_SHARED_MOBYS_MOBY_ANIM_H */ diff --git a/src/audio/music/music_pause.c b/src/audio/music/music_pause.c index 9805bd2edd..08674aaa48 100644 --- a/src/audio/music/music_pause.c +++ b/src/audio/music/music_pause.c @@ -3,13 +3,13 @@ void music_pause(s32 pause_secondary) { if (pause_secondary != 0) { - music_stream_state.secondary.fade_flags = -0x8000; - music_stream_state.secondary.fade_timer = 0; + music_stream_state.secondary.pause_flags = -0x8000; + music_stream_state.secondary.pause_timer = 0; } - music_stream_state.primary.fade_flags = -0x8000; - music_stream_state.primary.fade_timer = 0; - music_stream_state.transition.fade_flags = -0x8000; - music_stream_state.transition.fade_timer = 0; + music_stream_state.primary.pause_flags = -0x8000; + music_stream_state.primary.pause_timer = 0; + music_stream_state.transition.pause_flags = -0x8000; + music_stream_state.transition.pause_timer = 0; } /* ACCEPTED: attempt-1 (sn-O2) direct 100/100/100; s16 fields at 0x40/0x42/0x5C/0x5E/0x78/0x7A, retail store order. */ diff --git a/src/audio/music/music_unpause.c b/src/audio/music/music_unpause.c index 95c15b854a..31b49cfe59 100644 --- a/src/audio/music/music_unpause.c +++ b/src/audio/music/music_unpause.c @@ -4,7 +4,7 @@ void music_unpause(void) __asm__("music_unpause"); void music_unpause(void) { - music_stream_state.primary.fade_flags = 4; - music_stream_state.transition.fade_flags = 4; - music_stream_state.secondary.fade_flags = 4; + music_stream_state.primary.pause_flags = 4; + music_stream_state.transition.pause_flags = 4; + music_stream_state.secondary.pause_flags = 4; } diff --git a/src/audio/music/music_update.c b/src/audio/music/music_update.c index 12c069c962..472d52a344 100644 --- a/src/audio/music/music_update.c +++ b/src/audio/music/music_update.c @@ -41,7 +41,7 @@ void music_update(void) { if (music_stream_state.updates_suspended != 0) { return; } - if (!(music_stream_state.primary.fade_flags & 0x8000) && + if (!(music_stream_state.primary.pause_flags & 0x8000) && !(music_stream_state.primary.state & 0x8000)) { if (music_stream_state.primary.handle == 0 && (music_stream_state.primary.flags & 1) && music_stream_state.requested_track == -1) { @@ -85,9 +85,9 @@ void music_update(void) { } } if (music_stream_state.primary.state != 9 && music_stream_state.primary.handle != 0xFFFFFFFF && - !(music_stream_state.primary.fade_flags & 0x8000) && + !(music_stream_state.primary.pause_flags & 0x8000) && !(music_stream_state.primary.state & 0x8000) && - !(music_stream_state.transition.fade_flags & 0x8000) && + !(music_stream_state.transition.pause_flags & 0x8000) && !(music_stream_state.transition.state & 0x8000)) { switch (music_stream_state.crossfade_state) { case CROSSFADE_FADE_OUT_PRIMARY: diff --git a/src/audio/music/music_update_stream.c b/src/audio/music/music_update_stream.c index 2a5b30a2fe..112f49acf0 100644 --- a/src/audio/music/music_update_stream.c +++ b/src/audio/music/music_update_stream.c @@ -10,9 +10,9 @@ typedef struct { short id; /* 0x04 */ short volume; short flags; - short state; /* 0x0A: low bits the state, 0x8000 paused */ - short fade; /* 0x0C: 0x8000 fading */ - short fadeT; /* 0x0E */ + short state; /* 0x0A: low bits the state, 0x8000 paused */ + short pause_flags; /* 0x0C: MusicStreamChannel.pause_flags */ + short pause_timer; /* 0x0E: MusicStreamChannel.pause_timer */ } MusicPlaying; extern void snd_stop_sound(int) __asm__("func_0012E368"); @@ -61,13 +61,13 @@ void music_update_stream(MusicPlaying *music_stream) { if (music_stream->handle == 0) { return; } - if (music_stream->fade & 0x8000) { + if (music_stream->pause_flags & 0x8000) { if (!(music_stream->state & 0x8000)) { snd_pause_vag_stream(music_stream->handle); music_stream->state |= 0x8000; } - if (fast_dec_timer_s16(&music_stream->fadeT) == 2) { - music_stream->fade = 4; + if (fast_dec_timer_s16(&music_stream->pause_timer) == 2) { + music_stream->pause_flags = 4; } } else if (music_stream->state & 0x8000) { snd_continue_vag_stream((void *)music_stream->handle); diff --git a/src/camera/advance_alternate_camera_transition.c b/src/camera/advance_alternate_camera_transition.c index 74d1960766..a335ac54ef 100644 --- a/src/camera/advance_alternate_camera_transition.c +++ b/src/camera/advance_alternate_camera_transition.c @@ -67,8 +67,8 @@ int advance_alternate_camera_transition(char *target_camera, struct CameraOrbit if (orbit->frames <= 0) { return 1; } - step = - 1.0f / cosine_interpolate(1.0f, (f32)orbit->length, (f32)orbit->frames * orbit->frame_step); + step = 1.0f / cosine_interpolate( + 1.0f, (f32)orbit->duration_frames, (f32)orbit->frames * orbit->frame_step); if (cam_trans_state.kind == CAMERA_TRANSITION_KIND_STORED_FOCUS_ORBIT) { qcopy(&focus_position, D_0013F3D0); qcopy(&forward_axis, orbit->forward); diff --git a/src/camera/start_camera_blend.c b/src/camera/start_camera_blend.c index ee82639593..1a3e9b8869 100644 --- a/src/camera/start_camera_blend.c +++ b/src/camera/start_camera_blend.c @@ -83,7 +83,7 @@ void start_camera_blend(struct UpdateCam *source) { qcopy(blend->from_rotation, blend->rotation); } else { struct CameraOrbit *orbit = &transition->orbit; - int configured_frame_count = ++orbit->length; + int configured_frame_count = ++orbit->duration_frames; orbit->frames = scale_game_frames(configured_frame_count); orbit->frame_step = 1.0f / convert_integer_to_float(orbit->frames); diff --git a/src/overlays/l05/level_class_tables.c b/src/overlays/l05/level_class_tables.c index ee8c5d6da3..000127bc5b 100644 --- a/src/overlays/l05/level_class_tables.c +++ b/src/overlays/l05/level_class_tables.c @@ -177,19 +177,19 @@ struct MobyClassUpdate moby_classes[154] __asm__("D_L05_00218C80") { 832, visibomb_zone_timer_update, default_moby_methods}, { 838, electric_gate_update, default_moby_methods}, { 841, fog_zone_update, default_moby_methods}, - { 843, sliding_block_update, default_moby_methods}, + { 843, moby_843_update, default_moby_methods}, { 844, drain_cover_update, default_moby_methods}, { 846, pipe_mounted_grating_update, default_moby_methods}, { 849, suckcannon_update, default_moby_methods}, { 852, rising_gate_update, default_moby_methods}, { 853, rising_gate_update, default_moby_methods}, - { 855, water_spout_update, default_moby_methods}, + { 855, moby_855_update, default_moby_methods}, { 865, large_amoeboid_update, default_moby_methods}, { 866, large_amoeboid_update, D_L05_00219400}, { 877, elevator_with_button_update, default_moby_methods}, { 879, ocean_rilgar_update, default_moby_methods}, - { 893, hinged_hatch_update, default_moby_methods}, - { 895, swinging_flap_update, default_moby_methods}, + { 893, moby_893_update, default_moby_methods}, + { 895, moby_895_update, default_moby_methods}, { 918, hoverboard_girl_update, default_moby_methods}, { 919, qwarks_bouncer_update, default_moby_methods}, { 920, qwark_rilgar_update, default_moby_methods}, diff --git a/src/overlays/l05/mobys/sliding_block.c b/src/overlays/l05/mobys/moby_843.c similarity index 87% rename from src/overlays/l05/mobys/sliding_block.c rename to src/overlays/l05/mobys/moby_843.c index c3ba0bdafb..dc6a307368 100644 --- a/src/overlays/l05/mobys/sliding_block.c +++ b/src/overlays/l05/mobys/moby_843.c @@ -1,4 +1,4 @@ -/* Level 05 sliding block (class 843): slides out along its cuboid and lowers once its linked moby gets a command. */ +/* Level 05 moby class 843: placed out along its cuboid, it slides to its end point and lowers once its linked moby gets a command. */ #include "types.h" #include "rnc/overlay/l05.h" #include "rnc/globals.h" @@ -16,9 +16,9 @@ advance_accelerated_scalar(float, float, float, float, float *, float *) __asm__ /* Slides the moby out along its pose-table entry's direction: 0 places it, 1 waits for the trigger byte 0xBC (command) of its l05_moby_array record, 2 eases it toward the end point, 3 lowers it to 5.9 below the entry's height. */ -void sliding_block_update(char *moby) __asm__("FUN_L05_0030e508"); +void moby_843_update(char *moby) __asm__("FUN_L05_0030e508"); -typedef struct TriggeredSlideVars { +typedef struct Moby843Vars { u8 pad_0[0x8]; f32 lower_speed; /* z of the slide velocity (pvars 0x0), reused while lowering */ u8 pad_C[0x4]; @@ -26,10 +26,10 @@ typedef struct TriggeredSlideVars { s32 trigger_moby; /* moby index whose command byte triggers it */ f32 slide_distance; s32 reversed; /* nonzero: offset and slide along -axes[1] */ -} TriggeredSlideVars; +} Moby843Vars; /* Moby class 843 */ -void sliding_block_update(char *moby) { +void moby_843_update(char *moby) { enum { MOBY_PLACE_AT_POSE_OFFSET = 0, MOBY_WAIT_FOR_TRIGGER = 1, @@ -39,13 +39,13 @@ void sliding_block_update(char *moby) { enum { MOBY_LOWERING_COMPLETE = 4 }; - TriggeredSlideVars *slide_and_lowering_vars = (TriggeredSlideVars *)MOBY(moby)->pvars; - float slide_motion_scratch[4]; - float slide_step_distance; - float speed; - LevelCuboid *pose_entry; - float remaining_slide_distance; - float reach; + Moby843Vars *slide_and_lowering_vars = (Moby843Vars *)MOBY(moby)->pvars; + float slide_motion_scratch[4]; + float slide_step_distance; + float speed; + LevelCuboid *pose_entry; + float remaining_slide_distance; + float reach; switch (MOBY(moby)->state) { case MOBY_PLACE_AT_POSE_OFFSET: { diff --git a/src/overlays/l05/mobys/water_spout.c b/src/overlays/l05/mobys/moby_855.c similarity index 96% rename from src/overlays/l05/mobys/water_spout.c rename to src/overlays/l05/mobys/moby_855.c index 712d810583..6e5a71d000 100644 --- a/src/overlays/l05/mobys/water_spout.c +++ b/src/overlays/l05/mobys/moby_855.c @@ -1,4 +1,4 @@ -/* Level 05 water spout (class 855): a particle spray emitter that runs once its linked moby gets a command. */ +/* Level 05 moby class 855: a particle spray emitter that sprays along its facing and splashes on the floor once its linked moby gets a command. */ #include "types.h" #include "rnc/overlay/l05.h" #include "rnc/globals.h" @@ -46,12 +46,12 @@ extern unsigned char D_0014C050[][16]; extern struct FloorRow *D_L05_001612D0; extern char D_L05_0015F580_macro[] __asm__("D_L05_0015F580") MACRO_ADDR; -#include "rnc/overlay/l05/mobys/water_spout_data/water_spout_update.h" +#include "rnc/overlay/l05/mobys/moby_855_data/moby_855_update.h" -void water_spout_update(struct Moby *emitter_moby) __asm__("FUN_L05_003150f0"); +void moby_855_update(struct Moby *emitter_moby) __asm__("FUN_L05_003150f0"); /* Moby class 855 */ -void water_spout_update(struct Moby *emitter_moby) { +void moby_855_update(struct Moby *emitter_moby) { enum { EMITTER_INITIALIZE = 0, EMITTER_WAIT_FOR_TRIGGER = 1, diff --git a/src/overlays/l05/mobys/hinged_hatch.c b/src/overlays/l05/mobys/moby_893.c similarity index 92% rename from src/overlays/l05/mobys/hinged_hatch.c rename to src/overlays/l05/mobys/moby_893.c index 95f81a6217..df419a13a5 100644 --- a/src/overlays/l05/mobys/hinged_hatch.c +++ b/src/overlays/l05/mobys/moby_893.c @@ -1,4 +1,4 @@ -/* Level 05 hinged hatch (class 893): a manipulator turns its lid, which falls shut or swings open and slides once its linked moby gets a command. */ +/* Level 05 moby class 893: once its linked moby gets a command, a manipulator turns joint 0 shut with a bounce, then the moby slides back. */ #include "types.h" #include "rnc/overlay/l05.h" #include "rnc/globals.h" @@ -18,9 +18,9 @@ approach_angle(float *, float *, float, float, float, float) __asm__("FUN_L00_00 extern void build_axis_rotation_quaternion(void *, int, float) __asm__("FUN_L00_001fff28"); extern char *D_001413D0_lui __asm__("D_001413D0") NOT_SDA; -void hinged_hatch_update(char *moby) __asm__("FUN_L05_00316258"); +void moby_893_update(char *moby) __asm__("FUN_L05_00316258"); -typedef struct TriggeredMotionVars { +typedef struct Moby893Vars { u8 pad_0[0x10]; u8 manipulator_10; u8 pad_11[0xF]; @@ -32,10 +32,10 @@ typedef struct TriggeredMotionVars { f32 move_speed; f32 manipulator_angle; f32 manipulator_angular_velocity; -} TriggeredMotionVars; +} Moby893Vars; /* Moby class 893 */ -void hinged_hatch_update(char *moby) { +void moby_893_update(char *moby) { enum { MOBY_INITIALIZE = 0, MOBY_WAIT_FOR_TRIGGER = 1, @@ -48,10 +48,10 @@ void hinged_hatch_update(char *moby) { enum { MOBY_MOTION_SEQUENCE_COMPLETE = 7 }; - TriggeredMotionVars *motion_and_manipulator_vars = (TriggeredMotionVars *)MOBY(moby)->pvars; - float target[4]; - float delta[4]; - float stopped; + Moby893Vars *motion_and_manipulator_vars = (Moby893Vars *)MOBY(moby)->pvars; + float target[4]; + float delta[4]; + float stopped; switch (MOBY(moby)->state) { case MOBY_INITIALIZE: diff --git a/src/overlays/l05/mobys/swinging_flap.c b/src/overlays/l05/mobys/moby_895.c similarity index 87% rename from src/overlays/l05/mobys/swinging_flap.c rename to src/overlays/l05/mobys/moby_895.c index ca99fb9db6..a67b11da90 100644 --- a/src/overlays/l05/mobys/swinging_flap.c +++ b/src/overlays/l05/mobys/moby_895.c @@ -1,4 +1,4 @@ -/* Level 05 swinging flap (class 895): turns away from its placed yaw, then swings back once its linked moby gets a command. */ +/* Level 05 moby class 895: starts turned 90 degrees from its placed yaw and turns to 40 degrees from it once its linked moby gets a command. */ #include "types.h" #include "rnc/overlay/l05.h" #include "rnc/globals.h" @@ -8,12 +8,12 @@ extern int allocate_voice_for_target_entry() __asm__("FUN_0022da68"); extern float approach_angle(float *, float, float *, float, float, float) __asm__("FUN_L00_0025be00"); -void swinging_flap_update(struct Moby *moby) __asm__("FUN_L05_003166a0"); +void moby_895_update(struct Moby *moby) __asm__("FUN_L05_003166a0"); extern float fast_add_rotations(float, float); extern float fast_subtract_rotations(float, float); /* Moby class 895 */ -void swinging_flap_update(struct Moby *moby) { +void moby_895_update(struct Moby *moby) { enum { MOBY_INITIALIZE_YAW = 0, MOBY_WAIT_FOR_TRIGGER = 1, diff --git a/src/overlays/l08/level_class_tables.c b/src/overlays/l08/level_class_tables.c index dee7887148..22b954f03f 100644 --- a/src/overlays/l08/level_class_tables.c +++ b/src/overlays/l08/level_class_tables.c @@ -111,7 +111,7 @@ struct MobyClassUpdate moby_classes[190] __asm__("D_L08_001FC900") { 226, devestator_ammo_update, default_moby_methods}, { 229, glove_of_doom_update, default_moby_methods}, { 230, doom_bot_spawner_update, default_moby_methods}, - { 248, blarg_bomb_update, default_moby_methods}, + { 248, blarg_bombthrower_bomb_update, default_moby_methods}, { 252, scoutbot_update, D_L08_001FD200}, { 253, bomber_tank_update, default_moby_methods}, { 270, morphoray_chicken_update, D_L08_001FD218}, diff --git a/src/overlays/l08/mobys/blarg_bomb.c b/src/overlays/l08/mobys/blarg_bombthrower_bomb.c similarity index 94% rename from src/overlays/l08/mobys/blarg_bomb.c rename to src/overlays/l08/mobys/blarg_bombthrower_bomb.c index 353922244d..8e2b0cca35 100644 --- a/src/overlays/l08/mobys/blarg_bomb.c +++ b/src/overlays/l08/mobys/blarg_bombthrower_bomb.c @@ -78,14 +78,14 @@ extern void spawn_explosion(void *, int) __asm__("FUN_L00_0025e450"); extern void spawn_effect(void *, void *, int, int, int, int, int, int) __asm__("FUN_L00_00269958"); extern float D_L08_0015F580_macro[] __asm__("D_L08_0015F580") MACRO_ADDR; -void blarg_bomb_update(char *moby) __asm__("FUN_L08_002d23f0"); +void blarg_bombthrower_bomb_update(char *moby) __asm__("FUN_L08_002d23f0"); extern float D_0015ED6C; blk16 l08_bomb_moving_particle_initial_colors __asm__("D_L08_00161868") = { {-1, -1, -1, 0x2f, -1, -1, 0, 0x2f, -1, 0x7f, 0, 0x2f, -1, 0x4f, 0, 0x2f} }; -typedef struct BlargBombVars { +typedef struct BlargBombthrowerBombVars { u8 pad_0[0x7]; u8 fuse_flash_target_red; u8 pad_8[0x8]; @@ -98,26 +98,26 @@ typedef struct BlargBombVars { f32 fuse_flash_step; u8 pad_2C[0x4]; s32 thrower; -} BlargBombVars; +} BlargBombthrowerBombVars; /* Moby class 248 */ -void blarg_bomb_update(char *moby) { +void blarg_bombthrower_bomb_update(char *moby) { enum { BOMB_STATE_MOVING = 1, BOMB_STATE_STATIONARY_FUSE = 2, BOMB_STATE_EXPLODE_AND_REMOVE = 0x62, BOMB_STATE_BURST_AND_REMOVE = 0x63 }; - union Coll_36F8 c; - blk16 table_or_bounce_scratch; - float normalized_direction[4]; - float random_direction[4]; - BlargBombVars *bomb_vars; - int st; - int two; - float collision_z_offset; + union Coll_36F8 c; + blk16 table_or_bounce_scratch; + float normalized_direction[4]; + float random_direction[4]; + BlargBombthrowerBombVars *bomb_vars; + int st; + int two; + float collision_z_offset; - bomb_vars = (BlargBombVars *)MOBY(moby)->pvars; + bomb_vars = (BlargBombthrowerBombVars *)MOBY(moby)->pvars; if (MOBY(moby)->state != 0x37) { if (coll_sphere(0.5f, moby + 0x10, 0x11, moby)) { int sphere_hit_moby = D_L08_00174658_lui; diff --git a/src/overlays/l18/level_class_tables.c b/src/overlays/l18/level_class_tables.c index 2a82730b7c..2fe8c738ac 100644 --- a/src/overlays/l18/level_class_tables.c +++ b/src/overlays/l18/level_class_tables.c @@ -157,7 +157,7 @@ struct MobyClassUpdate moby_classes[158] __asm__("D_L18_001F2D00") { 511, crate_update, default_moby_methods}, { 562, decoy_glove_update, default_moby_methods}, { 564, rocket_moby_update, default_moby_methods}, - { 568, drifting_mine_update, D_L18_001F3498}, + { 568, drek_boss_mine_update, D_L18_001F3498}, { 582, grind_rail_junction_update, default_moby_methods}, { 583, thruster_pack_lock_green_update, default_moby_methods}, { 585, metal_detector_update, default_moby_methods}, diff --git a/src/overlays/l18/mobys/drifting_mine.c b/src/overlays/l18/mobys/drek_boss_mine.c similarity index 88% rename from src/overlays/l18/mobys/drifting_mine.c rename to src/overlays/l18/mobys/drek_boss_mine.c index 236ff21941..d607c71b37 100644 --- a/src/overlays/l18/mobys/drifting_mine.c +++ b/src/overlays/l18/mobys/drek_boss_mine.c @@ -1,4 +1,4 @@ -/* Level 18 mine (class 0x238): update, launch, detonation and its method table entries. */ +/* Level 18 Drek boss mine (class 568, record name "mine"): launched by the final boss robot; update, launch, detonation and its method table entries. */ #include "types.h" #include "rnc/overlay/shared/camera/level_camera.h" #include "rnc/audio/voice_pool.h" @@ -32,7 +32,7 @@ enum { extern int scale_game_frames(int); -/* Moby update: hovers, drifts toward the player and plays its animations by state. */ +/* Moby update: falls to the ground, creeps toward a target within 6 units and explodes after 18 to 20 seconds. */ extern f32 approach_value(f32 *, f32, f32) __asm__("FUN_00213ed8"); extern int D_001413D0[]; extern int select_moby_combat_target(char *, char *, float) __asm__("FUN_L00_0025fcb8"); @@ -44,36 +44,33 @@ void update_mine_detonation(unsigned char *moby) __asm__("FUN_L18_002d5f void update_mine_detonation(unsigned char *m) __asm__("FUN_L18_002d5f20"); -void drifting_mine_update(struct Moby *moby) __asm__("FUN_L18_002d5918"); +void drek_boss_mine_update(struct Moby *moby) __asm__("FUN_L18_002d5918"); /* Moby class 568 */ -void drifting_mine_update(struct Moby *moby) { - char *class_238_update_private_vars = (char *)moby->pvars; +void drek_boss_mine_update(struct Moby *moby) { + char *mine_vars = (char *)moby->pvars; float settling_displacement_or_steering_increment[4]; update_mine_detonation(moby); switch (moby->state) { case STATE_INITIALIZE: moby->collision = 0; moby->flags = (moby->flags | 0x41) & 0xEFFF; - *(void **)(class_238_update_private_vars + 0xD0) = &D_L18_00161988; - *(float *)(class_238_update_private_vars + 0x30) = 0.05f; + *(void **)(mine_vars + 0xD0) = &D_L18_00161988; + *(float *)(mine_vars + 0x30) = 0.05f; moby->state = STATE_INACTIVE; break; case STATE_BALLISTIC_FLIGHT: - fast_vec_add(&moby->pos, &moby->pos, class_238_update_private_vars + 0x180); - *(float *)(class_238_update_private_vars + 0x188) -= frame_time_sq * 10.0f; - if (moby->pos.z < *(float *)(class_238_update_private_vars + 0x178)) { - moby->pos.z = *(float *)(class_238_update_private_vars + 0x178); + fast_vec_add(&moby->pos, &moby->pos, mine_vars + 0x180); + *(float *)(mine_vars + 0x188) -= frame_time_sq * 10.0f; + if (moby->pos.z < *(float *)(mine_vars + 0x178)) { + moby->pos.z = *(float *)(mine_vars + 0x178); moby->state = STATE_POST_FLIGHT_SETTLING; - *(float *)(class_238_update_private_vars + 0x188) = - -(D_L18_00161994 * 2.0f * frame_time); + *(float *)(mine_vars + 0x188) = -(D_L18_00161994 * 2.0f * frame_time); } break; case STATE_POST_FLIGHT_SETTLING: { - float settling_motion_step = - approach_value((float *)(class_238_update_private_vars + 0x188), - 0.0f, - D_L18_00161994 * 2.0f * frame_time_sq); + float settling_motion_step = approach_value( + (float *)(mine_vars + 0x188), 0.0f, D_L18_00161994 * 2.0f * frame_time_sq); moby->rot.y += settling_motion_step; settling_displacement_or_steering_increment[0] = fast_cos(moby->rot.z) * settling_motion_step; @@ -81,7 +78,7 @@ void drifting_mine_update(struct Moby *moby) { fast_sin(moby->rot.z) * settling_motion_step; settling_displacement_or_steering_increment[2] = 0.0f; fast_vec_add(&moby->pos, &moby->pos, settling_displacement_or_steering_increment); - if (*(float *)(class_238_update_private_vars + 0x188) == 0.0f) { + if (*(float *)(mine_vars + 0x188) == 0.0f) { if (moby->prev_seq != 1) { blend_moby_animation(moby, 1, 0, scale_game_frames(12)); } @@ -121,7 +118,7 @@ void drifting_mine_update(struct Moby *moby) { settling_displacement_or_steering_increment, horizontal_steering_increment_limit); } - movement_step = class_238_update_private_vars + 0x40; + movement_step = mine_vars + 0x40; fast_vec_add( movement_step, movement_step, settling_displacement_or_steering_increment); if (movement_step_limit < vector_length_xy(movement_step)) { @@ -129,25 +126,24 @@ void drifting_mine_update(struct Moby *moby) { } FUN_L00_00258830((int)moby, (int)movement_step, 0.0f, 0.5f, 0.0f, 0); fast_vec_sub(movement_step, &moby->pos, previous_position); - if (0.0f < *(float *)(class_238_update_private_vars + 0x48)) { - *(float *)(class_238_update_private_vars + 0x48) = 0.0f; - } else if (*(float *)(class_238_update_private_vars + 0x48) < - -movement_step_limit) { - *(float *)(class_238_update_private_vars + 0x48) = -movement_step_limit; + if (0.0f < *(float *)(mine_vars + 0x48)) { + *(float *)(mine_vars + 0x48) = 0.0f; + } else if (*(float *)(mine_vars + 0x48) < -movement_step_limit) { + *(float *)(mine_vars + 0x48) = -movement_step_limit; } if (*(char **)(target_search_output + 0x40) != (char *)D_001413D0[0]) { if (fast_vec_dist(*(char **)(target_search_output + 0x40) + 0x10, &moby->pos) < 2.0f) { - *(int *)(class_238_update_private_vars + 0x19C) = 1; + *(int *)(mine_vars + 0x19C) = 1; } } } } break; case STATE_WAIT_TO_RESUME_APPROACH: - if (FUN_L00_002dc9f0(moby, class_238_update_private_vars + 0x110)) { + if (FUN_L00_002dc9f0(moby, mine_vars + 0x110)) { moby->state = STATE_APPROACH_NEARBY_TARGET; - *(short *)(class_238_update_private_vars + 0xC8) = 0; + *(short *)(mine_vars + 0xC8) = 0; } break; } @@ -189,14 +185,14 @@ extern int *D_L18_001AC240_lui[] __asm__("D_L18_001AC240") NOT_SDA; extern int D_L18_0015FFD8_m __asm__("D_L18_0015FFD8"); f32 mine_launch_pitch_and_setback_gp __asm__("D_L18_00161994") = 2.5f; -char *launch_class_238_moby_from_list(float horizontal_speed, +char *launch_drek_boss_mine_from_list(float horizontal_speed, int launching_moby, int moby_list_index, float *launch_position, float *target_position, int detonation_countdown) __asm__("FUN_L18_002d5cf8"); -char *launch_class_238_moby_from_list(float horizontal_speed, +char *launch_drek_boss_mine_from_list(float horizontal_speed, int launching_moby, int moby_list_index, float *launch_position, diff --git a/src/overlays/l18/mobys/drek_final_boss_robot.c b/src/overlays/l18/mobys/drek_final_boss_robot.c index 22e2475438..2286e9f604 100644 --- a/src/overlays/l18/mobys/drek_final_boss_robot.c +++ b/src/overlays/l18/mobys/drek_final_boss_robot.c @@ -231,7 +231,7 @@ typedef struct BossData { char p28C[8]; int scene_camera_node_index; int paired_transition_node_index; - int class_238_launch_group_index; + int mine_launch_group_index; int race_camera_node_index; char p2A4[0xC]; int persistent_jet_slot_index; @@ -299,7 +299,7 @@ extern char *create_rocket_moby(float *pos, float b, int frames, int kind) __asm__("FUN_L18_002d5348"); -extern char *launch_class_238_moby_from_list(int owner, +extern char *launch_drek_boss_mine_from_list(int owner, int idx, float *from, float *to, @@ -1384,9 +1384,9 @@ void drek_final_boss_robot_update(BossMoby *moby) { (float)scale_game_frames(0x3C); float w = random_float_between(18.0f, 20.0f); - launch_class_238_moby_from_list( + launch_drek_boss_mine_from_list( (int)moby, - boss_data->class_238_launch_group_index, + boss_data->mine_launch_group_index, position_displacement_direction_and_rotation_scratch, position_direction_and_rotation_scratch, speed, diff --git a/src/overlays/shared/audio/music/music_set_active_track_value.c b/src/overlays/shared/audio/music/music_set_active_track_value.c index d495c23b18..ba6494fe9b 100644 --- a/src/overlays/shared/audio/music/music_set_active_track_value.c +++ b/src/overlays/shared/audio/music/music_set_active_track_value.c @@ -5,15 +5,15 @@ /* Ported from rac1-decomp (src/overlays/shared/music_002664B0.c: func_L00_002666C8), where it is exact; names translated to the US level program. */ -/* Stores v in fade_timer of the three music channels whose fade flag 0x8000 is set. */ +/* Stores v in pause_timer of the three music channels whose pause flag 0x8000 is set. */ void music_set_active_track_value(int v) __asm__("FUN_L00_00265880"); void music_set_active_track_value(int entry_value) { struct MusicStreamState *music = &music_stream_state; - if (music->primary.fade_flags & 0x8000) - music->primary.fade_timer = entry_value; - if (music->transition.fade_flags & 0x8000) - music->transition.fade_timer = entry_value; - if (music->secondary.fade_flags & 0x8000) - music->secondary.fade_timer = entry_value; + if (music->primary.pause_flags & 0x8000) + music->primary.pause_timer = entry_value; + if (music->transition.pause_flags & 0x8000) + music->transition.pause_timer = entry_value; + if (music->secondary.pause_flags & 0x8000) + music->secondary.pause_timer = entry_value; } diff --git a/src/overlays/shared/game/run_level_main_loop.c b/src/overlays/shared/game/run_level_main_loop.c index 6eced50497..a73c790a09 100644 --- a/src/overlays/shared/game/run_level_main_loop.c +++ b/src/overlays/shared/game/run_level_main_loop.c @@ -233,7 +233,7 @@ void run_level_main_loop(void) { run_state_handler(); if (memory_card_state.state >= MEMCARD_REQUEST_FORMAT || memory_card_state.pending_state >= MEMCARD_QUERY_INFO) { - if (D_L00_001B9CF0.memcard_icon_hidden == 0) { + if (D_L00_001B9CF0.card_icon_hidden == 0) { int rotation_period_frames = 55; float size; float sprite_rotation_radians; @@ -257,7 +257,7 @@ void run_level_main_loop(void) { do_gif_paging(); } } - D_L00_001B9CF0.memcard_icon_hidden = 0; + D_L00_001B9CF0.card_icon_hidden = 0; flush_debug_text_queue(); noop_main_callback(level_frame_callback_args, 0x10); noop_main_callback(level_frame_callback_args, 0x10); diff --git a/src/overlays/shared/hero/initialize_hero.c b/src/overlays/shared/hero/initialize_hero.c index ead7ceccc6..247cfec390 100644 --- a/src/overlays/shared/hero/initialize_hero.c +++ b/src/overlays/shared/hero/initialize_hero.c @@ -15,7 +15,8 @@ #include "rnc/world/collision/ground_probe.h" #include "rnc/overlay/shared/math/random/random_int_between.h" -extern Vec4 D_0013E090[2] NOT_SDA; /* camera start: position, rotation */ +extern Vec4 D_0013E090 + [2] NOT_SDA; /* LevelRenderState.hero_start_pos and hero_start_rot: where the landing scene places the hero */ extern s32 D_00141660 NOT_SDA; #include "rnc/overlay/shared/world/level_labels.h"